Changeset 13101


Ignore:
Timestamp:
08/20/12 17:39:30 (13 years ago)
Author:
cborstad
Message:

merged trunk-jpl through revision 13099 into branch

Location:
issm/branches/trunk-jpl-damage
Files:
17 deleted
492 edited
44 copied

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-jpl-damage

    • Property svn:ignore
      •  

        old new  
         1projects
        12autom4te.cache
        23aclocal.m4
    • Property svn:mergeinfo changed
      /issm/trunk-jplmerged: 12948-13099
  • issm/branches/trunk-jpl-damage/Makefile.am

    r12878 r13101  
    11EXTRA_DIST = reconf scripts test m4 examples cron etc doc packages contributors.txt
    2 SUBDIRS = src bin
     2SUBDIRS = src
    33bin_SCRIPTS=config.h startup.m README.rtf
     4
     5ACLOCAL_AMFLAGS = -I externalpackages/libtool/install/share/aclocal
  • issm/branches/trunk-jpl-damage/configs/config-macosx64-larour-ad.sh

    r12878 r13101  
    33./configure \
    44        --prefix=$ISSM_DIR \
    5         --without-modules\
    6         --without-thermal \
    7         --without-control \
    8         --without-hydrology \
    9         --without-diagnostic \
    10         --without-balanced \
    11         --without-responses \
    12         --without-slope \
    13         --without-rifts \
    14         --without-steadystate \
    15         --without-transient \
    16         --without-3d \
    17         --without-groundingline \
     5        --without-modules \
    186        --without-kriging  \
    19         --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
    20         #--with-adolc-dir=$ISSM_DIR/externalpackages/adolc/install\
     7        --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install \
     8        --with-adolc-dir=$ISSM_DIR/externalpackages/adolc/install
  • issm/branches/trunk-jpl-damage/configure.ac

    r12946 r13101  
    44AC_INIT([ISSM],[4.2.1],[issm@jpl.nasa.gov],[issm],[http://issm.jpl.nasa.gov]) #Initializing configure
    55AC_CONFIG_AUX_DIR([./aux-config])         #Put config files in aux-config
    6 AC_CONFIG_MACRO_DIR([m4])                 #m4 macros are located in m4
     6AC_CONFIG_MACRO_DIR([externalpackages/libtool/install/share/aclocal])                 #m4 macros are located in m4
     7m4_include([m4/issm_options.m4])
    78AC_CANONICAL_TARGET                       #Determine the system type
     9
    810#Compilers
    911AC_PROG_CC([cccl cl icl gcc])
     
    1113AC_PROG_CXX([cccl cl icl g++])
    1214AC_PROG_F77([ifort g77 gfortran])
     15
    1316#Libraries and linking
    1417AC_F77_LIBRARY_LDFLAGS
     
    2225AM_PROG_CC_C_O
    2326AM_PROG_AR
    24 AC_PROG_RANLIB
    2527
    26 # To produce shared libraries uncomment LT_INIT. In theory, Libtool can be initialized
    27 # even if all linking is static, since, if not shared libraries are to be produce, libtool
    28 # will act simply as a wrapper around AR and Ranlib.
    29 #LT_INIT
     28#Libtool
     29LT_INIT
    3030
    3131#Run issm_options.m4
     
    3636                        src/Makefile
    3737                        src/c/Makefile
    38                         src/py/Makefile
    39                         src/py/model/Makefile
    4038                        src/modules/Makefile
    4139                        src/modules/python/Makefile
    4240                        src/modules/matlab/Makefile
    43                         src/m/Makefile
    44                         bin/Makefile])
     41                        src/m/Makefile])
    4542
    4643#End of configure.ac
  • issm/branches/trunk-jpl-damage/etc/environment.csh

    r12878 r13101  
    11#ISSM_DIR and ISSM_ARCH should have been defined already in your shell settings file (.bashrc, .cshrc, etc ...)
    2 source $ISSM_DIR/etc/environment_variables.csh
    32
    4 #Do we have any command line arguments? (such as MATLAB_DIR=otherdirthandefault), source them before exporting the variables
    5 #to environment.
    6 
    7 #foreach i ($@)
    8 #eval $i
    9 #end
    10 
    11 #CRON utilities
    12 setenv PATH {$PATH}:{$ISSM_DIR}/cron
    13 
    14 #SCRIPTS utilities
     3#Load ISSM scripts
    154setenv PATH {$PATH}:{$ISSM_DIR}/scripts
    165
    176#MATLAB
    18 setenv MATLAB_DIR {$MATLAB_DIR}
    19 setenv PATH {$MATLAB_DIR}/bin:{$PATH}
    20 setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:$MATLAB_DIR/lib
     7set MATLAB_DIR="$ISSM_DIR/externalpackages/matlab/install"
     8if (-d MATLAB_DIR) then
     9        setenv MATLAB_DIR {$MATLAB_DIR}
     10        setenv PATH {$MATLAB_DIR}/bin:{$PATH}
     11        setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$MATLAB_DIR}/bin/glnxa64
     12endif
    2113
    2214#MPI
    23 setenv MPI_DIR {$MPI_DIR}
    24 setenv PATH {$MPI_DIR}/bin:{$PATH}
    25 setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:$MPI_DIR/lib
    26 setenv MANPATH {$MANPATH}:$MPI_DIR/man
    27 setenv MPIRUN_NPROCS 8
     15set MPI_DIR="$ISSM_DIR/externalpackages/mpich2/install"
     16if (-d $MPI_DIR) then
     17        setenv MPI_DIR {$MPI_DIR}
     18        setenv PATH {$MPI_DIR}/bin:{$PATH}
     19        setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:$MPI_DIR/lib
     20        setenv MANPATH {$MANPATH}:$MPI_DIR/man
     21endif
    2822
    2923#PETSC
    30 setenv PETSC_DIR {$PETSC_DIR}
    31 setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:$PETSC_DIR/lib/{$ISSM_ARCH}
     24set PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install"
     25if (-d $PETSC_DIR) then
     26        setenv PETSC_DIR {$PETSC_DIR}
     27        setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:$PETSC_DIR/lib/{$ISSM_ARCH}
     28endif
    3229
    3330#SLEPC
    34 setenv SLEPC_DIR {$SLEPC_DIR}
    35 setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:$SLEPC_DIR/lib/{$ISSM_ARCH}
     31set SLEPC_DIR="$ISSM_DIR/externalpackages/slepc/install"
     32if (-d $SLEPC_DIR) then
     33        setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:$SLEPC_DIR/lib/{$ISSM_ARCH}
     34endif
    3635
     36#PETSC
     37set TAO_DIR="$ISSM_DIR/externalpackages/tao/install"
     38if (-d $TAO_DIR) then
     39        setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:$TAO_DIR/lib/{$ISSM_ARCH}
     40endif
    3741
    3842#Dakota
    39 setenv DAKOTA_DIR {$DAKOTA_DIR}
    40 setenv PATH {$PATH}:{$DAKOTA_DIR}/bin
    41 setenv MANPATH {$MANPATH}:{$MPI_DIR}/man:{$DAKOTA_DIR}/docs/man:{$DAKOTA_DIR}/docs/man-ref
    42 
    43 #Qhull
    44 setenv QHULL_DIR {$QHULL_DIR}
    45 setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$QHULL_DIR}/lib
    46 
     43set DAKOTA_DIR="$ISSM_DIR/externalpackages/dakota/install"
     44if (-d $DAKOTA_DIR) then
     45        setenv PATH {$PATH}:{$DAKOTA_DIR}/bin
     46        setenv MANPATH {$MANPATH}:{$MPI_DIR}/man:{$DAKOTA_DIR}/docs/man:{$DAKOTA_DIR}/docs/man-ref
     47endif
    4748
    4849#Doxygen
    49 setenv DOXYGEN_DIR {$DOXYGEN_DIR}
    50 setenv MANPATH {$MANPATH}:{$DOXYGEN_DIR}/man
    51 setenv PATH {$PATH}:{$DOXYGEN_DIR}/bin
    52 
    53 #MTOC
    54 setenv MTOC_DIR {$MTOC_DIR}
    55 setenv PATH {$PATH}:{$MTOC_DIR}
    56 
    57 #MATLAB
    58 setenv MATLAB_DIR {$MATLAB_DIR}
    59 setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$MATLAB_DIR}/bin/glnxa64
    60 setenv PATH {$PATH}:{$MATLAB_DIR}/bin
    61 
    62 #TRIANGLE
    63 setenv TRIANGLE_DIR {$TRIANGLE_DIR}
    64 
    65 #METIS
    66 setenv METIS_DIR {$METIS_DIR}
    67        
    68 #BLAS
    69 setenv BLAS_DIR {$BLAS_DIR}
    70 
    71 #LAPACK
    72 setenv LAPACK_DIR {$LAPACK_DIR}
    73 
    74 #SCALAPACK
    75 setenv SCALAPACK_DIR {$SCALAPACK_DIR}
    76 
    77 #PLAPACK
    78 setenv PLAPACK_DIR {$PLAPACK_DIR}
    79 
    80 #BLACS
    81 setenv BLACS_DIR {$BLACS_DIR}
    82 
    83 #YAMS
    84 setenv YAMS_DIR {$YAMS_DIR}
    85 setenv PATH {$PATH}:{$YAMS_DIR}
    86 
    87 #TEX2IM
    88 setenv TEX2IM_DIR {$TEX2IM_DIR}
    89 setenv PATH {$PATH}:{$TEX2IM_DIR}
    90 
    91 #SOWING
    92 setenv SOWING_DIR {$SOWING_DIR}
    93 setenv PATH {$PATH}:{$SOWING_DIR}/bin
    94 setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$SOWING_DIR}/lib
    95 setenv MANPATH {$MANPATH}:{$SOWING_DIR}/man
    96 
    97 #Chaco
    98 setenv CHACO_DIR {$CHACO_DIR}
    99 setenv PATH {$PATH}:{$CHACO_DIR}
    100 
    101 #MeshPart
    102 setenv MESHPART_DIR {$MESHPART_DIR}
    103 setenv PATH {$PATH}:{$MESHPART_DIR}
    104 
    105 #SCOTCH
    106 setenv SCOTCH_DIR {$SCOTCH_DIR}
    107 setenv PATH {$PATH}:{$SCOTCH_DIR}
    108 setenv MANPATH {$MANPATH}:{$SCOTCH_DIR}/man
     50set DOXYGEN_DIR="$ISSM_DIR/externalpackages/doxygen/install"
     51if (-d $DOXYGEN_DIR) then
     52        setenv MANPATH {$MANPATH}:{$DOXYGEN_DIR}/man
     53        setenv PATH {$PATH}:{$DOXYGEN_DIR}/bin
     54endif
    10955
    11056#AUTOCONF
    111 setenv AUTOCONF_DIR {$AUTOCONF_DIR}
    112 setenv PATH {$AUTOCONF_DIR}/bin:{$PATH}
     57set AUTOCONF_DIR="$ISSM_DIR/externalpackages/autoconf/install"
     58if (-d $AUTOCONF_DIR) then
     59        setenv PATH {$AUTOCONF_DIR}/bin:{$PATH}
     60endif
    11361
    11462#AUTOMAKE
    115 setenv AUTOMAKE_DIR {$AUTOMAKE_DIR}
    116 setenv PATH {$AUTOMAKE_DIR}/bin:{$PATH}
    117 
    118 #BORLAND
    119 setenv BORLAND_DIR {$BORLAND_DIR}
    120 setenv PATH {$PATH}:{$BORLAND_DIR}/Bin
     63set AUTOMAKE_DIR="$ISSM_DIR/externalpackages/automake/install"
     64if (-d $AUTOMAKE_DIR) then
     65        setenv PATH {$AUTOMAKE_DIR}/bin:{$PATH}
     66endif
    12167
    12268#SSH
    123 setenv SSH_DIR {$SSH_DIR}
    124 setenv PATH {$PATH}:{$SSH_DIR}
     69set SSH_DIR="$ISSM_DIR/externalpackages/ssh"
     70if (-d $SSH_DIR) then
     71        setenv PATH {$PATH}:{$SSH_DIR}
     72endif
    12573
    12674#VALGRIND
    127 setenv VALGRIND_DIR {$VALGRIND_DIR}
    128 setenv PATH {$PATH}:{$VALGRIND_DIR}
     75set VALGRIND_DIR="$ISSM_DIR/externalpackages/valgrind/install/bin"
     76if (-d $VALGRIND_DIR) then
     77        setenv PATH {$PATH}:{$VALGRIND_DIR}
     78endif
    12979
    13080#MERCURIAL
    131 #setenv PYTHONPATH {$PYTHONPATH}:{$MERCURIAL_DIR}/mercurial/pure/
    132 setenv PYTHONPATH {$MERCURIAL_DIR}/mercurial/pure/
    133 setenv PATH {$PATH}:{$MERCURIAL_DIR}
     81set MERCURIAL_DIR="$ISSM_DIR/externalpackages/mercurial/install"
     82if (-d $MERCURIAL_DIR) then
     83        setenv PYTHONPATH {$MERCURIAL_DIR}/mercurial/pure/
     84        setenv PATH {$PATH}:{$MERCURIAL_DIR}
     85endif
    13486
    13587#GSL
    136 setenv GSL_DIR {$GSL_DIR}
    137 setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$GSL_DIR}/lib
     88set GSL_DIR="$ISSM_DIR/externalpackages/gsl/install"
     89if (-d $GSL_DIR) then
     90        setenv LD_LIBRARY_PATH {$LD_LIBRARY_PATH}:{$GSL_DIR}/lib
     91endif
    13892
    13993#CMAKE
    140 setenv PATH {$PATH}:{$CMAKE_DIR}/bin
     94set CMAKE_DIR="$ISSM_DIR/externalpackages/cmake/install"
     95if (-d $CMAKE_DIR) then
     96        setenv PATH {$PATH}:{$CMAKE_DIR}/bin
     97endif
  • issm/branches/trunk-jpl-damage/etc/environment.sh

    r12946 r13101  
    11#ISSM_DIR and ISSM_ARCH should have been defined already in your shell settings file (.bashrc, .cshrc, etc ...)
     2
     3#FIXME: during installation packages are installed one by one but environment.sh was sourced
     4#before so new packages are NOT in the path.
     5#may resource environment.sh with:
     6#if [ -z $(echo "$PATH" | grep "$MATLAB_DIR") ]; then export $PATH...; fi
    27
    38#Windows compilers:
     
    611fi
    712
    8 source $ISSM_DIR/etc/environment_variables.sh
    9 
    10 #Do we have any command line arguments? (such as MATLAB_DIR=otherdirthandefault), source them after exporting the variables
    11 #to environment.
    12 for i in $@
    13 do
    14         eval $i
    15 done
    16 
    17 #CRON utilities
    18 PATH="$PATH:$ISSM_DIR/cron"
    19 
    20 #scripts
    21 PATH="$PATH:$ISSM_DIR/scripts"
    22 
    23 ##MATLAB
    24 export MATLAB_DIR
    25 PATH="$MATLAB_DIR/bin:$PATH" #take precedence over /usr/local/bin/matlab
    26 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_DIR/lib"
    27 export LD_RUN_PATH="$LD_RUN_PATH:$MATLAB_DIR/lib"
    28 #export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_DIR/bin/glnxa64"
    29 #export LD_RUN_PATH="$LD_RUN_PATH:$MATLAB_DIR/bin/glnxa64"
    30 
    31 #MPI
    32 export MPI_DIR
    33 PATH="$MPI_DIR/bin:$PATH"
    34 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MPI_DIR/lib"
    35 export LD_RUN_PATH="$LD_RUN_PATH:$MPI_DIR/lib"
    36 export MANPATH="$MANPATH:$MPI_DIR/man"
    37 export MPIRUN_NPROCS=24
    38 
    39 #PETSC
    40 export PETSC_DIR
    41 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PETSC_DIR/lib/$ISSM_ARCH:$PETSC_DIR/lib"
    42 export LD_RUN_PATH="$LD_RUN_PATH:$PETSC_DIR/lib/$ISSM_ARCH"
    43 
    44 #SLEPC
    45 export SLEPC_DIR
    46 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SLEPC_DIR/lib/$ISSM_ARCH"
    47 export LD_RUN_PATH="$LD_RUN_PATH:$SLEPC_DIR/lib/$ISSM_ARCH"
    48 
    49 #Dakota
    50 export DAKOTA_DIR
    51 PATH="$PATH:$DAKOTA_DIR/bin"
    52 export MANPATH="$MANPATH:$MPI_DIR/man:$DAKOTA_DIR/docs/man:$DAKOTA_DIR/docs/man-ref"
    53 
    54 #Qhull
    55 export QHULL_DIR
    56 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$QHULL_DIR/lib"
    57 export LD_RUN_PATH="$LD_RUN_PATH:$QHULL_DIR/lib"
    58 
    59 #Doxygen
    60 export DOXYGEN_DIR
    61 MANPATH="$MANPATH:$DOXYGEN_DIR/man"
    62 PATH="$PATH:$DOXYGEN_DIR/bin"
    63 
    64 #MTOC
    65 export MTOC_DIR
    66 PATH="$PATH:$MTOC_DIR"
    67 
    68 #TRIANGLE
    69 export TRIANGLE_DIR
    70 
    71 #METIS
    72 export METIS_DIR
    73        
    74 #BLAS
    75 export BLAS_DIR
    76 
    77 #LAPACK
    78 export LAPACK_DIR
    79 
    80 #SCALAPACK
    81 export SCALAPACK_DIR
    82 
    83 #PLAPACK
    84 export PLAPACK_DIR
    85 
    86 #BLACS
    87 export BLACS_DIR
    88 
    89 #YAMS
    90 export YAMS_DIR
    91 PATH="$PATH:$YAMS_DIR"
    92 
    93 #BAMG
    94 export BAMG_DIR
    95 PATH="$PATH:$BAMG_DIR"
    96 
    97 #TEX2IM
    98 export TEX2IM_DIR
    99 PATH="$PATH:$TEX2IM_DIR"
    100 
    101 #SOWING
    102 export SOWING_DIR
    103 PATH="$PATH:$SOWING_DIR/bin"
    104 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SOWING_DIR/lib"
    105 export LD_RUN_PATH="$LD_RUN_PATH:$SOWING_DIR/lib"
    106 export MANPATH="$MANPATH:$SOWING_DIR/man"
    107 
    108 #Chaco
    109 export CHACO_DIR
    110 PATH="$PATH:$CHACO_DIR"
    111 
    112 #MeshPart
    113 export MESHPART_DIR
    114 PATH="$PATH:$MESHPART_DIR"
    115 
    116 #SCOTCH
    117 export SCOTCH_DIR
    118 PATH="$PATH:$SCOTCH_DIR"
    119 export MANPATH="$MANPATH:$SCOTCH_DIR/man"
    120 
    121 #AUTOCONF
    122 export AUTOCONF_DIR
    123 PATH="$AUTOCONF_DIR/bin:$PATH"
    124 
    125 #AUTOMAKE
    126 export AUTOMAKE_DIR
    127 PATH="$AUTOMAKE_DIR/bin:$PATH"
    128 
    129 export LIBTOOL_DIR
    130 PATH="$LIBTOOL_DIR/bin:$PATH"
    131 
    132 #BORLAND
    133 export BORLAND_DIR
    134 PATH="$PATH:$BORLAND_DIR/Bin"
    135 
    136 #INTEL
    137 #export INTEL_DIR
    138 #PATH="$PATH:$INTEL_DIR"
    139 #source $ISSM_DIR/externalpackages/intel/intel.sh
    140 
    141 #SDK
    142 export SDK_DIR
    143 PATH="$PATH:$SDK_DIR"
    144 
    145 #SSH
    146 export SSH_DIR
    147 PATH="$PATH:$SSH_DIR"
    148 
    149 #VALGRIND
    150 export VALGRIND_DIR
    151 PATH="$PATH:$VALGRIND_DIR"
    152 
    153 #GRAPHVIZ
    154 export GRAPHVIZ_DIR
    155 PATH="$PATH:$GRAPHVIZ_DIR"
    156 
    157 #CPPCHECK
    158 export CPPCHECK_DIR
    159 PATH="$PATH:$CPPCHECK_DIR"
    160 
    161 #GDAL
    162 export GDAL_DIR
    163 PATH="$GDAL_DIR/bin:$PATH"
    164 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GDAL_DIR/lib"
    165 
    166 #MERCURIAL
    167 export PYTHONPATH="$PYTHONPATH:$MERCURIAL_DIR/mercurial/pure/"
    168 export PATH="$PATH:$MERCURIAL_DIR/"
    169 
    170 #BOOST
    171 export BOOSTROOT
    172 export BOOST_DIR
    173 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$BOOST_DIR/lib"
    174 export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$BOOST_DIR/lib"
    175 export PATH="$PATH:$BOOST_DIR/bin"
    176 
    177 #XERCES
    178 export XERCESROOT
    179 export XERCESCROOT
    180 
    181 #xaifBooster
    182 export XAIFBOOSTERROOT
    183 export XAIFBOOSTER_HOME
    184 export XAIF_DIR
    185 export PLATFORM
    186 
    187 #angel
    188 export ANGELROOT
    189 
    190 #openanalysis
    191 export OPENANALYSISROOT
    192 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$OPENANALYSISROOT/lib"
    193 
    194 #JAVA
    195 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JVM_DIR"
    196 
    197 #BBFTP
    198 export PATH="$PATH:$BBFTP_DIR/bin"
    199 
    200 #ADIC
    201 export PATH="$PATH:$ADIC_DIR/bin"
    202 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ADIC_DIR/lib"
    203 export LD_RUN_PATH="$LD_RUN_PATH:$ADIC_DIR/lib"
    204 
    205 #COLPACK
    206 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$COLPACK_DIR/lib"
    207 export LD_RUN_PATH="$LD_RUN_PATH:$COLPACK_DIR/lib"
    208 
    209 #ECLIPSE
    210 export PATH="$PATH:$ECLIPSE_DIR"
    211 
    212 #FLAIM
    213 export FLAIM_DIR
    214 
    215 #APPSCAN
    216 export PATH="$PATH:$APPSCAN_DIR/install/bin"
    217 export PATH="$PATH:$APPSCAN_DIR/bin"
    218 
    219 #CPPCHECK
    220 export PATH="$PATH:$CPPCHECK_DIR/bin"
    221 
    222 #RATS
    223 export PATH="$PATH:$RATS_DIR/bin"
    224 
    225 #DYSON
    226 export PATH="$PATH:$DYSON_DIR"
    227 
    228 #CMAKE
    229 export PATH="$PATH:$CMAKE_DIR/bin"
    230 
    231 #SHAPELIB
    232 export PATH="$PATH:$SHAPELIB_DIR/exec"
    233 
    234 #CCCL
    235 export PATH="$PATH:$CCCL_DIR/bin"
    236 
    237 #PACKAGEMAKER
    238 export PATH="$PATH:$PACKAGEMAKER_DIR"
    239 
    240 #ANDROID_NDK:
    241 export ANDROID_NDK_DIR
    242 export PATH="$PATH:$ANDROID_NDK_DIR/"
    243 
    244 #ANDROID_DIR
    245 export ANDROID_DIR
    246 
    247 #ANDROID_SDK
    248 export PATH="$PATH:$ANDROID_SDK_DIR/"
    249 
    250 #ANDROID_ANT
    251 export PATH="$PATH:$ANDROID_ANT_DIR/"
    252 
    253 #GSL
    254 export PATH="$PATH:$GSL_DIR/bin"
    255 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GSL_DIR/lib"
    256 export LD_RUN_PATH="$LD_RUN_PATH:$GSL_DIR/lib"
    257 
    258 #GMAKE
    259 export PATH="$GMAKE_DIR/bin:$PATH"
    260 
    261 #PYTHON
    262 export PATH="$PYTHON_DIR/bin:$PATH"
    263 export PYTHONPATH="$PYTHONPATH:$ISSM_DIR/src/modules/python"
    264 export LD_LIBRARY_PATH=$ISSM_DIR/src/modules/python:$ISSM_DIR/externalpackages/python/install/lib:$LD_LIBRARY_PATH
    265 export PYTHONSTARTUP
    266 
    267 #MODELE
    268 export PATH="$MODELE_DIR/src/exec:$PATH"
    269 
    270 #GIT
    271 export PATH="$PATH:$GIT_DIR/install/bin"
    272 
    273 #NCVIEW
    274 export PATH="$PATH:$NCVIEW_DIR/install"
    275 
    276 #TCLX
    277 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TCLX_DIR"
    278 export LD_RUN_PATH="$LD_RUN_PATH:$TCLX_DIR"
    279 
    280 #TCL/TK
     13#Some basic path, in case it is not included by default
    28114export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
    28215export LD_RUN_PATH="$LD_RUN_PATH:/usr/local/lib"
    28316
     17#Load ISSM scripts
     18export PATH="$PATH:$ISSM_DIR/scripts"
     19
     20#MATLAB
     21MATLAB_DIR="$ISSM_DIR/externalpackages/matlab/install"
     22#if [ -d "$MATLAB_DIR" ]; then
     23        export MATLAB_DIR
     24        export PATH="$MATLAB_DIR/bin:$PATH" #take precedence over /usr/local/bin/matlab
     25        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MATLAB_DIR/lib"
     26        export LD_RUN_PATH="$LD_RUN_PATH:$MATLAB_DIR/lib"
     27#fi
     28
     29#MPI
     30MPI_DIR="$ISSM_DIR/externalpackages/mpich2/install"
     31#if [ -d "$MPI_DIR" ]; then
     32        export MPI_DIR
     33        export PATH="$MPI_DIR/bin:$PATH"
     34        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$MPI_DIR/lib"
     35        export LD_RUN_PATH="$LD_RUN_PATH:$MPI_DIR/lib"
     36        export MANPATH="$MANPATH:$MPI_DIR/man"
     37#fi
     38
     39#PETSC
     40PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install"
     41#if [ -d "$PETSC_DIR" ]; then
     42        export PETSC_DIR
     43        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PETSC_DIR/lib:$PETSC_DIR/lib"
     44        export LD_RUN_PATH="$LD_RUN_PATH:$PETSC_DIR/lib"
     45#fi
     46
     47#SLEPC
     48SLEPC_DIR="$ISSM_DIR/externalpackages/slepc/install"
     49if [ -d "$SLEPC_DIR" ]; then
     50        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SLEPC_DIR/lib/$ISSM_ARCH"
     51        export LD_RUN_PATH="$LD_RUN_PATH:$SLEPC_DIR/lib/$ISSM_ARCH"
     52fi
     53
     54#PETSC
     55TAO_DIR="$ISSM_DIR/externalpackages/tao/install"
     56if [ -d "$TAO_DIR" ]; then
     57        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TAO_DIR/lib:$TAO_DIR/lib"
     58        export LD_RUN_PATH="$LD_RUN_PATH:$TAO_DIR/lib"
     59fi
     60
     61#Dakota
     62DAKOTA_DIR="$ISSM_DIR/externalpackages/dakota/install"
     63if [ -d "$DAKOTA_DIR" ]; then
     64        export PATH="$PATH:$DAKOTA_DIR/bin"
     65        export MANPATH="$MANPATH:$MPI_DIR/man:$DAKOTA_DIR/docs/man:$DAKOTA_DIR/docs/man-ref"
     66fi
     67
     68#Doxygen
     69DOXYGEN_DIR="$ISSM_DIR/externalpackages/doxygen/install"
     70if [ -d "$DOXYGEN_DIR" ]; then
     71        export MANPATH="$MANPATH:$DOXYGEN_DIR/man"
     72        export PATH="$PATH:$DOXYGEN_DIR/bin"
     73fi
     74
     75#AUTOCONF
     76AUTOCONF_DIR="$ISSM_DIR/externalpackages/autoconf/install"
     77#if [ -d "$AUTOCONF_DIR" ]; then
     78        export PATH="$AUTOCONF_DIR/bin:$PATH"
     79#fi
     80
     81#AUTOMAKE
     82AUTOMAKE_DIR="$ISSM_DIR/externalpackages/automake/install"
     83#if [ -d "$AUTOMAKE_DIR" ]; then
     84        export PATH="$AUTOMAKE_DIR/bin:$PATH"
     85#fi
     86
     87#LIBTOOL
     88LIBTOOL_DIR="$ISSM_DIR/externalpackages/libtool/install"
     89#if [ -d "$LIBTOOL_DIR" ]; then
     90        export PATH="$LIBTOOL_DIR/bin:$PATH"
     91#fi
     92
     93#SDK
     94SDK_DIR="C:/MicrosoftVisualStudio 9.0/Microsoft Visual C++ 2008 Express Edition with SP1 - ENU"
     95if [ -d "$SDK_DIR" ]; then
     96        export PATH="$PATH:$SDK_DIR"
     97fi
     98
     99#SSH
     100SSH_DIR="$ISSM_DIR/externalpackages/ssh"
     101if [ -d "$SSH_DIR" ]; then
     102        export PATH="$PATH:$SSH_DIR"
     103fi
     104
     105#VALGRIND
     106VALGRIND_DIR="$ISSM_DIR/externalpackages/valgrind/install"
     107if [ -d "$VALGRIND_DIR" ]; then
     108        export PATH="$VALGRIND_DIR/bin:$PATH"
     109fi
     110
     111#CPPCHECK
     112CPPCHECK_DIR="$ISSM_DIR/externalpackages/cppcheck/install"
     113if [ -d "$CPPCHECK_DIR" ]; then
     114        export PATH="$PATH:$CPPCHECK_DIR/bin"
     115fi
     116
     117#GDAL
     118GDAL_DIR="$ISSM_DIR/externalpackages/gdal/install"
     119if [ -d "$GDAL_DIR" ]; then
     120        export PATH="$GDAL_DIR/bin:$PATH"
     121        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GDAL_DIR/lib"
     122fi
     123
     124#MERCURIAL
     125MERCURIAL_DIR="$ISSM_DIR/externalpackages/mercurial/install"
     126if [ -d "$MERCURIAL_DIR" ]; then
     127        export PYTHONPATH="$PYTHONPATH:$MERCURIAL_DIR/mercurial/pure/"
     128        export PATH="$PATH:$MERCURIAL_DIR/"
     129fi
     130
     131#BOOST
     132BOOST_DIR="$ISSM_DIR/externalpackages/boost/install"
     133BOOSTROOT="$ISSM_DIR/externalpackages/boost/install"
     134if [ -d "$BOOST_DIR" ]; then
     135        export BOOSTROOT
     136        export BOOST_DIR
     137        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$BOOST_DIR/lib"
     138        export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$BOOST_DIR/lib"
     139        export PATH="$PATH:$BOOST_DIR/bin"
     140fi
     141
     142#XERCES
     143XERCESROOT="$ISSM_DIR/externalpackages/xerces/install"
     144XERCESCROOT="$ISSM_DIR/externalpackages/xerces/src"
     145if [ -d "$XERCESROOT" ]; then
     146        export XERCESROOT
     147        export XERCESCROOT
     148fi
     149
     150#xaifBooster
     151XAIF_DIR="$ISSM_DIR/externalpackages/xaifbooster/xaifBooster"
     152XAIFBOOSTERROOT="$ISSM_DIR/externalpackages/xaifbooster/"
     153XAIFBOOSTER_HOME="$ISSM_DIR/externalpackages/xaifbooster/xaifBooster"
     154PLATFORM="x86-Linux"
     155if [ -d "$XAIF_DIR" ]; then
     156        export XAIFBOOSTERROOT
     157        export XAIFBOOSTER_HOME
     158        export XAIF_DIR
     159        export PLATFORM
     160fi
     161
     162#angel
     163ANGELROOT="$ISSM_DIR/externalpackages/angel/angel"
     164if [ -d "$ANGELROOT" ]; then
     165        export ANGELROOT
     166fi
     167
     168#openanalysis
     169OPENANALYSISROOT="$ISSM_DIR/externalpackages/openanalysis/install"
     170if [ -d "$OPENANALYSISROOT" ]; then
     171        export OPENANALYSISROOT
     172        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$OPENANALYSISROOT/lib"
     173fi
     174
     175#JAVA
     176JVM_DIR="/usr/local/gcc/4.3.2/lib64/gcj-4.3.2-9/"
     177if [ -d "$JVM_DIR" ]; then
     178        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JVM_DIR"
     179fi
     180
     181#BBFTP
     182BBFTP_DIR="$ISSM_DIR/externalpackages/bbftp/install"
     183if [ -d "$BBFTP_DIR" ]; then
     184        export PATH="$PATH:$BBFTP_DIR/bin"
     185fi
     186
     187#ADIC
     188ADIC_DIR="$ISSM_DIR/externalpackages/adic/install"
     189if [ -d "$ADIC_DIR" ]; then
     190        export PATH="$PATH:$ADIC_DIR/bin"
     191        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ADIC_DIR/lib"
     192        export LD_RUN_PATH="$LD_RUN_PATH:$ADIC_DIR/lib"
     193fi
     194
     195#COLPACK
     196COLPACK_DIR="$ISSM_DIR/externalpackages/colpack/install"
     197if [ -d "$COLPACK_DIR" ]; then
     198        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$COLPACK_DIR/lib"
     199        export LD_RUN_PATH="$LD_RUN_PATH:$COLPACK_DIR/lib"
     200fi
     201
     202#ECLIPSE
     203ECLIPSE_DIR="$ISSM_DIR/externalpackages/eclipse/install"
     204if [ -d "$ECLIPSE_DIR" ]; then
     205        export PATH="$PATH:$ECLIPSE_DIR"
     206fi
     207
     208#APPSCAN
     209APPSCAN_DIR="$ISSM_DIR/externalpackages/appscan/install"
     210if [ -d "$APPSCAN_DIR" ]; then
     211        export PATH="$PATH:$APPSCAN_DIR/bin"
     212fi
     213
     214#RATS
     215RATS_DIR="$ISSM_DIR/externalpackages/rats/install"
     216if [ -d "$RATS_DIR" ]; then
     217        export PATH="$PATH:$RATS_DIR/bin"
     218fi
     219
     220#DYSON
     221DYSON_DIR="$ISSM_DIR/externalpackages/dyson/"
     222if [ -d "$DYSON_DIR" ]; then
     223        export PATH="$PATH:$DYSON_DIR"
     224fi
     225
     226#CMAKE
     227CMAKE_DIR="$ISSM_DIR/externalpackages/cmake/install"
     228if [ -d "$CMAKE_DIR" ]; then
     229        export PATH="$PATH:$CMAKE_DIR/bin"
     230fi
     231
     232#SHAPELIB
     233SHAPELIB_DIR="$ISSM_DIR/externalpackages/shapelib/install"
     234if [ -d "$SHAPELIB_DIR" ]; then
     235        export PATH="$PATH:$SHAPELIB_DIR/exec"
     236fi
     237
     238#CCCL
     239CCCL_DIR="$ISSM_DIR/externalpackages/cccl/install"
     240if [ -d "$CCCL_DIR" ]; then
     241        export PATH="$PATH:$CCCL_DIR/bin"
     242fi
     243
     244#PACKAGEMAKER
     245PACKAGEMAKER_DIR="$ISSM_DIR/externalpackages/packagemaker/install"
     246if [ -d "$PACKAGEMAKER_DIR" ]; then
     247        export PATH="$PATH:$PACKAGEMAKER_DIR"
     248fi
     249
     250#ANDROID_NDK:
     251ANDROID_NDK_DIR="$ISSM_DIR/externalpackages/android-ndk/install"
     252if [ -d "$ANDROID_NDK_DIR" ]; then
     253        export PATH="$PATH:$ANDROID_NDK_DIR/"
     254fi
     255
     256#ANDROID_SDK
     257ANDROID_SDK_DIR="$ANDROID_DIR/android-sdk/install-sdk"
     258if [ -d "$ANDROID_SDK_DIR" ]; then
     259        export PATH="$PATH:$ANDROID_SDK_DIR/"
     260fi
     261
     262#GSL
     263GSL_DIR="$ISSM_DIR/externalpackages/gsl/install"
     264if [ -d "$GSL_DIR" ]; then
     265        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GSL_DIR/lib"
     266        export LD_RUN_PATH="$LD_RUN_PATH:$GSL_DIR/lib"
     267fi
     268
     269#GMAKE
     270GMAKE_DIR="$ISSM_DIR/externalpackages/gmake/install"
     271if [ -d "$GMAKE_DIR" ]; then
     272        export PATH="$GMAKE_DIR/bin:$PATH"
     273fi
     274
     275#PYTHON
     276PYTHON_DIR="$ISSM_DIR/externalpackages/python/install"
     277if [ -d "$PYTHON_DIR" ]; then
     278        PYTHONSTARTUP="$ISSM_DIR/startup.py"
     279        export PATH="$PYTHON_DIR/bin:$PATH"
     280        export PYTHONPATH="$PYTHONPATH:$ISSM_DIR/src/modules/python"
     281        export LD_LIBRARY_PATH=$ISSM_DIR/src/modules/python:$ISSM_DIR/externalpackages/python/install/lib:$LD_LIBRARY_PATH
     282        export PYTHONSTARTUP="$ISSM_DIR/startup.py"
     283fi
     284
     285#MODELE
     286MODELE_DIR="$ISSM_DIR/externalpackages/modelE/install"
     287if [ -d "$MODELE_DIR" ]; then
     288        export PATH="$MODELE_DIR/src/exec:$PATH"
     289fi
     290
     291#GIT
     292GIT_DIR="$ISSM_DIR/externalpackages/git/install"
     293if [ -d "$GIT_DIR" ]; then
     294        export PATH="$PATH:$GIT_DIR/bin"
     295fi
     296
     297#NCVIEW
     298NCVIEW_DIR="$ISSM_DIR/externalpackages/ncview/install"
     299if [ -d "$NCVIEW_DIR" ]; then
     300        export PATH="$PATH:$NCVIEW_DIR"
     301fi
     302
     303#TCLX
     304TCLX_DIR="$ISSM_DIR/externalpackages/tclx/install/lib/tclx8.4"
     305if [ -d "$TCLX_DIR" ]; then
     306        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TCLX_DIR"
     307        export LD_RUN_PATH="$LD_RUN_PATH:$TCLX_DIR"
     308fi
     309
    284310#ASPELL
    285 export PATH="$ASPELL_DIR/install/bin:$PATH"
    286 
     311ASPELL_DIR="$ISSM_DIR/externalpackages/aspell/install"
     312if [ -d "$ASPELL_DIR" ]; then
     313        export PATH="$ASPELL_DIR/bin:$PATH"
     314fi
    287315
    288316#ESMF
    289 export ESMF_DIR=$ISSM_DIR/externalpackages/esmf/esmf
    290 export ESMF_COMPILER=gfortran
    291 export ESMF_COMM=mpich2
     317ESMF_DIR="$ISSM_DIR/externalpackages/esmf/esmf"
     318if [ -d "$ESMF_DIR" ]; then
     319        export ESMF_COMPILER=gfortran
     320        export ESMF_COMM=mpich2
     321fi
    292322
    293323#HDF5
    294 export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$HDF5_DIR/lib"
    295 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HDF5_DIR/lib"
    296 export LIBRARY_PATH="$LIBRARY_PATH:$HDF5_DIR/lib"
    297 export C_INCLUDE_PATH="$C_INCLUDE_PATH:$HDF5_DIR/include"
    298 
     324HDF5_DIR="$ISSM_DIR/externalpackages/hdf5/install"
     325if [ -d "$HDF5_DIR" ]; then
     326        export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$HDF5_DIR/lib"
     327        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HDF5_DIR/lib"
     328        export LIBRARY_PATH="$LIBRARY_PATH:$HDF5_DIR/lib"
     329        export C_INCLUDE_PATH="$C_INCLUDE_PATH:$HDF5_DIR/include"
     330fi
     331
     332#SVN
     333SVN_DIR="$ISSM_DIR/externalpackages/svn/install"
     334if [ -d "$SVN_DIR" ]; then
     335        export PATH="$SVN_DIR/bin:$PATH"
     336        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SVN_DIR/lib"
     337        export LIBRARY_PATH="$LIBRARY_PATH:$SVN_DIR/lib"
     338fi
     339
     340#APR
     341APR_DIR="$ISSM_DIR/externalpackages/apr/install"
     342if [ -d "$APR_DIR" ]; then
     343        export PATH="$APR_DIR/bin:$PATH"
     344        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APR_DIR/lib"
     345        export LIBRARY_PATH="$LIBRARY_PATH:$APR_DIR/lib"
     346fi
     347
     348#APR_UTIL
     349APR_UTIL_DIR="$ISSM_DIR/externalpackages/apr-util/install"
     350if [ -d "$APR_UTIL_DIR" ]; then
     351        export PATH="$APR_UTIL_DIR/bin:$PATH"
     352        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$APR_UTIL_DIR/lib"
     353        export LIBRARY_PATH="$LIBRARY_PATH:$APR_UTIL_DIR/lib"
     354fi
     355
     356#SQLITE
     357SQLITE_DIR="$ISSM_DIR/externalpackages/sqlite/install"
     358if [ -d "$SQLITE_DIR" ]; then
     359        export PATH="$SQLITE_DIR/bin:$PATH"
     360        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SQLITE_DIR/lib"
     361        export LIBRARY_PATH="$LIBRARY_PATH:$SQLITE_DIR/lib"
     362fi
  • issm/branches/trunk-jpl-damage/externalpackages

    • Property svn:ignore
      •  

        old new  
         1archive
        12MITgcm
        23OpenAD
  • issm/branches/trunk-jpl-damage/externalpackages/adolc

    • Property svn:ignore
      •  

        old new  
         1trunk
        12*.gz
        23install*
        34src
         5src-*
        46configure.sh
        57.ignore.txt
  • issm/branches/trunk-jpl-damage/externalpackages/adolc/install.sh

    r12878 r13101  
    44
    55#Some cleanup
    6 rm -rf install ADOL-C-2.2.0 src
     6rm -rf install ADOL-C-2.2.0 src trunk
     7
     8#Create install directories
     9mkdir install src
    710
    811#Download from ISSM server
    912$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ADOL-C-2.2.0.tar.gz' 'ADOL-C-2.2.0.tar.gz'
    10 
    11 #Create install directories
    12 mkdir install src
    1313
    1414#Untar
     
    1919rm -rf ADOL-C-2.2.0
    2020
     21
    2122#Compile ADOL-C
    2223cd src
    2324
    24 export CC=gcc
    25 export CXX=g++
    26 export CFLAGS="-arch x86_64"
    27 export CXXFLAGS="-arch x86_64"
     25#export CC=gcc
     26#export CXX=g++
     27#export CFLAGS="-arch x86_64"
     28#export CXXFLAGS="-arch x86_64"
    2829
    2930./configure \
     
    4041fi
    4142make install
     43
     44
     45#Ok, bug with libtool: replace all LIBTOOL= by LIBTOOL=libtool
     46#in all Makefiles
     47for i in `find ./ -name Makefile `
     48do
     49        echo $i
     50        cat $i | sed 's/LIBTOOL =/LIBTOOL = libtool/g' > $i.bak
     51        mv $i.bak $i
     52done
     53
     54#remake:
     55if [ -z $1 ]; then
     56        make
     57else
     58        make -j $1
     59fi
     60make install
     61
     62
  • issm/branches/trunk-jpl-damage/externalpackages/distribute

    • Property svn:ignore
      •  

        old new  
         1*.gz
        12distribute_setup.py
  • issm/branches/trunk-jpl-damage/externalpackages/matlab/install.sh

    r12878 r13101  
    55
    66#Select or create a new simlink
    7 ln -s /usr/local/pkgs/matlab-7.6/ install
     7#ln -s /usr/local/pkgs/matlab-7.6/ install
    88#ln -s /discover/vis/mathworks/matlab_r2011b/ install
    99#ln -s /usr/local/matlab704/ install
  • issm/branches/trunk-jpl-damage/externalpackages/readline

    • Property svn:ignore
      •  

        old new  
         1*.gz
        12src
        23src-*
  • issm/branches/trunk-jpl-damage/externalpackages/swig

    • Property svn:ignore set to
      install
      *.gz
  • issm/branches/trunk-jpl-damage/externalpackages/swig/install.sh

    r12258 r13101  
    2121export LDFLAGS="-L$ISSM_DIR/externalpackages/pcre/install/.libs/"
    2222export LIBS="-lpcre"
    23 #Configure doxygen
     23#Configure swig
    2424./configure \
    25  --prefix="$ISSM_DIR/externalpackages/python/install" \
     25 --prefix="$ISSM_DIR/externalpackages/swig/install" \
    2626 --with-pcre-prefix="$ISSM_DIR/externalpackages/pcre/install" \
    27  --with-pcre-exec-prefix="$ISSM_DIR/externalpackages/pcre/install"
    28 make
     27 --with-pcre-exec-prefix="$ISSM_DIR/externalpackages/pcre/install" \
     28 --with-python="$ISSM_DIR/externalpackages/python/install/bin/python"
     29
     30#Compile and install gdal
     31if [ -z $1 ]; then
     32        make
     33else
     34        make -j $1
     35fi
    2936make install
  • issm/branches/trunk-jpl-damage/externalpackages/valgrind

    • Property svn:ignore
      •  

        old new  
        33src
        44.ignore.txt
         5*.bz2
  • issm/branches/trunk-jpl-damage/externalpackages/vim/addons/vim/syntax/Synchronize.sh

    r12946 r13101  
    66cat c.vim | sed "/ISSM's Enums begin/,/vim: ts=8/d" > temp
    77echo "\"ISSM's Enums begin" >> temp
    8 cat ../../../../../src/c/EnumDefinitions/EnumDefinitions.h | grep -e "[0-9]Enum," -e "[aA-zZ]Enum," | grep -v StringToEnum | sed -e "s/,//g" | awk '{ printf "syn keyword cConstant " $1 "\n"}' >> temp
     8cat ../../../../../src/c/EnumDefinitions/EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-z]Enum," -e "[A-Z]Enum," | grep -v StringToEnum | sed -e "s/,//g" | awk '{ printf "syn keyword cConstant " $1 "\n"}' >> temp
    99echo "\"ISSM's Enums end" >> temp
    1010cat c.vim | sed "1,/ISSM's Enums end/d" >> temp
    11 
    1211mv temp c.vim
     12exit 1
    1313
    1414#Synchronize objects
     
    1616echo "\"ISSM's objects begin" >> temp
    1717find ../../../../../src/c/classes -name "*.h" | sed -e "s/\// /g" -e "s/\.h//"| awk '{print  $(NF)}' | awk '{ printf "syn keyword cType " $1 "\n"}'>> temp
     18echo "\"ISSM's objects end" >> temp
    1819cat c.vim | sed "1,/ISSM's objects end/d" >> temp
    1920
  • issm/branches/trunk-jpl-damage/externalpackages/vim/addons/vim/syntax/c.vim

    r12946 r13101  
    408408syn keyword     cType           Vec Mat SeqVec SeqMat
    409409"other ISSM's syntax
    410 syn keyword     cType           mxArray ErrorException QuadtreeBox IssmDouble IssmPDouble
     410syn keyword     cType           mxArray ErrorException QuadtreeBox IssmDouble IssmPDouble Observations
    411411
    412412"ISSM's objects begin
    413 syn keyword cType AdjacentTriangle
    414 syn keyword cType BamgGeom
    415 syn keyword cType BamgMesh
    416 syn keyword cType bamgobjects
    417 syn keyword cType BamgOpts
    418 syn keyword cType BamgQuadtree
    419 syn keyword cType BamgVertex
    420 syn keyword cType CrackedEdge
    421 syn keyword cType Curve
    422 syn keyword cType Direction
    423 syn keyword cType DoubleAndInt
    424 syn keyword cType Edge
    425 syn keyword cType GeomEdge
    426 syn keyword cType Geometry
    427 syn keyword cType GeomSubDomain
    428 syn keyword cType GeomVertex
    429 syn keyword cType include
    430 syn keyword cType ListofIntersectionTriangles
    431 syn keyword cType macros
    432 syn keyword cType Mesh
    433 syn keyword cType Metric
    434 syn keyword cType R2
    435 syn keyword cType SetOfE4
    436 syn keyword cType SubDomain
    437 syn keyword cType Triangle
    438 syn keyword cType typedefs
    439 syn keyword cType VertexOnEdge
    440 syn keyword cType VertexOnGeom
    441 syn keyword cType VertexOnVertex
    442 syn keyword cType classes
    443 syn keyword cType DakotaPlugin
    444 syn keyword cType DofIndexing
    445 syn keyword cType FemModel
     413syn keyword cType GaussPenta
    446414syn keyword cType gaussobjects
    447 syn keyword cType GaussPenta
    448415syn keyword cType GaussTria
    449 syn keyword cType Hook
    450 syn keyword cType IoModel
    451 syn keyword cType ExponentialVariogram
    452 syn keyword cType GaussianVariogram
    453 syn keyword cType krigingobjects
    454 syn keyword cType Observation
    455 syn keyword cType PowerVariogram
    456 syn keyword cType Quadtree
    457 syn keyword cType SphericalVariogram
    458 syn keyword cType Variogram
    459 syn keyword cType ElementMatrix
    460 syn keyword cType ElementVector
    461 syn keyword cType Matrix
    462 syn keyword cType matrixobjects
    463 syn keyword cType Vector
    464 syn keyword cType Constraint
     416syn keyword cType objects
     417syn keyword cType Material
     418syn keyword cType Matice
     419syn keyword cType Matpar
     420syn keyword cType objects
     421syn keyword cType Contour
     422syn keyword cType DoubleInput
     423syn keyword cType Input
     424syn keyword cType ControlInput
     425syn keyword cType DatasetInput
     426syn keyword cType IntInput
     427syn keyword cType BoolInput
     428syn keyword cType TriaP1Input
     429syn keyword cType TransientInput
     430syn keyword cType PentaP1Input
     431syn keyword cType KML_Icon
     432syn keyword cType KML_Point
     433syn keyword cType KML_LinearRing
     434syn keyword cType KML_Feature
     435syn keyword cType KMLFileReadUtils
     436syn keyword cType KML_StyleSelector
     437syn keyword cType KML_LatLonBox
     438syn keyword cType KML_Attribute
     439syn keyword cType KML_PolyStyle
     440syn keyword cType KML_Object
     441syn keyword cType KML_SubStyle
     442syn keyword cType KML_LineString
     443syn keyword cType KML_Overlay
     444syn keyword cType KML_Container
     445syn keyword cType KML_Polygon
     446syn keyword cType KML_Geometry
     447syn keyword cType KML_ColorStyle
     448syn keyword cType KML_Placemark
     449syn keyword cType KML_Unknown
     450syn keyword cType KML_GroundOverlay
     451syn keyword cType KML_Style
     452syn keyword cType KML_Comment
     453syn keyword cType KML_MultiGeometry
     454syn keyword cType KML_LineStyle
     455syn keyword cType KML_Folder
     456syn keyword cType KML_Document
     457syn keyword cType KML_File
     458syn keyword cType DoubleVecParam
     459syn keyword cType DoubleParam
     460syn keyword cType DoubleMatArrayParam
     461syn keyword cType DoubleMatParam
     462syn keyword cType Param
     463syn keyword cType FileParam
     464syn keyword cType IntVecParam
     465syn keyword cType IntParam
     466syn keyword cType BoolParam
     467syn keyword cType IntMatParam
     468syn keyword cType VectorParam
     469syn keyword cType DoubleTransientMatParam
     470syn keyword cType MatrixParam
     471syn keyword cType StringArrayParam
     472syn keyword cType StringParam
     473syn keyword cType TransientParam
     474syn keyword cType OptionStruct
     475syn keyword cType OptionDouble
     476syn keyword cType OptionLogical
     477syn keyword cType OptionUtilities
     478syn keyword cType OptionChar
     479syn keyword cType Option
     480syn keyword cType OptionCell
     481syn keyword cType Segment
     482syn keyword cType Icefront
     483syn keyword cType Friction
     484syn keyword cType Riftfront
     485syn keyword cType Numericalflux
     486syn keyword cType Penpair
     487syn keyword cType Load
     488syn keyword cType Pengrid
     489syn keyword cType Object
     490syn keyword cType DoubleVecExternalResult
     491syn keyword cType DoubleExternalResult
     492syn keyword cType IntExternalResult
     493syn keyword cType BoolExternalResult
     494syn keyword cType DoubleMatExternalResult
     495syn keyword cType PetscVecExternalResult
     496syn keyword cType ExternalResult
     497syn keyword cType StringExternalResult
     498syn keyword cType Vertex
    465499syn keyword cType SpcDynamic
    466500syn keyword cType SpcStatic
    467501syn keyword cType SpcTransient
    468 syn keyword cType Contour
     502syn keyword cType Constraint
     503syn keyword cType TriaP1ElementResult
     504syn keyword cType PentaP1ElementResult
     505syn keyword cType DoubleElementResult
     506syn keyword cType ElementResultLocal
    469507syn keyword cType BoolElementResult
    470 syn keyword cType DoubleElementResult
    471508syn keyword cType ElementResult
    472 syn keyword cType ElementResultLocal
    473 syn keyword cType PentaP1ElementResult
    474 syn keyword cType TriaP1ElementResult
     509syn keyword cType Node
     510syn keyword cType TriaRef
     511syn keyword cType TriaHook
     512syn keyword cType PentaRef
     513syn keyword cType PentaHook
     514syn keyword cType Tria
    475515syn keyword cType Element
    476516syn keyword cType Penta
    477 syn keyword cType PentaHook
    478 syn keyword cType PentaRef
    479 syn keyword cType Tria
    480 syn keyword cType TriaHook
    481 syn keyword cType TriaRef
    482 syn keyword cType BoolExternalResult
    483 syn keyword cType DoubleExternalResult
    484 syn keyword cType DoubleMatExternalResult
    485 syn keyword cType DoubleVecExternalResult
    486 syn keyword cType ExternalResult
    487 syn keyword cType IntExternalResult
    488 syn keyword cType PetscVecExternalResult
    489 syn keyword cType StringExternalResult
    490 syn keyword cType BoolInput
    491 syn keyword cType ControlInput
    492 syn keyword cType DatasetInput
    493 syn keyword cType DoubleInput
    494 syn keyword cType Input
    495 syn keyword cType IntInput
    496 syn keyword cType PentaP1Input
    497 syn keyword cType TransientInput
    498 syn keyword cType TriaP1Input
    499 syn keyword cType KML_Attribute
    500 syn keyword cType KML_ColorStyle
    501 syn keyword cType KML_Comment
    502 syn keyword cType KML_Container
    503 syn keyword cType KML_Document
    504 syn keyword cType KML_Feature
    505 syn keyword cType KML_File
    506 syn keyword cType KML_Folder
    507 syn keyword cType KML_Geometry
    508 syn keyword cType KML_GroundOverlay
    509 syn keyword cType KML_Icon
    510 syn keyword cType KML_LatLonBox
    511 syn keyword cType KML_LinearRing
    512 syn keyword cType KML_LineString
    513 syn keyword cType KML_LineStyle
    514 syn keyword cType KML_MultiGeometry
    515 syn keyword cType KML_Object
    516 syn keyword cType KML_Overlay
    517 syn keyword cType KML_Placemark
    518 syn keyword cType KML_Point
    519 syn keyword cType KML_Polygon
    520 syn keyword cType KML_PolyStyle
    521 syn keyword cType KML_Style
    522 syn keyword cType KML_StyleSelector
    523 syn keyword cType KML_SubStyle
    524 syn keyword cType KML_Unknown
    525 syn keyword cType KMLFileReadUtils
    526 syn keyword cType Friction
    527 syn keyword cType Icefront
    528 syn keyword cType Load
    529 syn keyword cType Numericalflux
    530 syn keyword cType Pengrid
    531 syn keyword cType Penpair
    532 syn keyword cType Riftfront
    533 syn keyword cType Material
    534 syn keyword cType Matice
    535 syn keyword cType Matpar
    536 syn keyword cType Node
    537 syn keyword cType Object
    538 syn keyword cType objects
    539 syn keyword cType Option
    540 syn keyword cType OptionCell
    541 syn keyword cType OptionChar
    542 syn keyword cType OptionDouble
    543 syn keyword cType OptionLogical
    544 syn keyword cType OptionStruct
    545 syn keyword cType OptionUtilities
    546 syn keyword cType BoolParam
    547 syn keyword cType DoubleMatArrayParam
    548 syn keyword cType DoubleMatParam
    549 syn keyword cType DoubleParam
    550 syn keyword cType DoubleTransientMatParam
    551 syn keyword cType DoubleVecParam
    552 syn keyword cType FileParam
    553 syn keyword cType IntMatParam
    554 syn keyword cType IntParam
    555 syn keyword cType IntVecParam
    556 syn keyword cType MatrixParam
    557 syn keyword cType Param
    558 syn keyword cType StringArrayParam
    559 syn keyword cType StringParam
    560 syn keyword cType TransientParam
    561 syn keyword cType VectorParam
    562 syn keyword cType Segment
    563 syn keyword cType Vertex
    564 syn keyword cType objects
     517syn keyword cType classes
     518syn keyword cType DofIndexing
     519syn keyword cType Patch
     520syn keyword cType Hook
     521syn keyword cType Quadtree
     522syn keyword cType Observation
     523syn keyword cType ExponentialVariogram
     524syn keyword cType GaussianVariogram
     525syn keyword cType SphericalVariogram
     526syn keyword cType PowerVariogram
     527syn keyword cType krigingobjects
     528syn keyword cType Variogram
     529syn keyword cType DakotaPlugin
     530syn keyword cType ElementVector
     531syn keyword cType ElementMatrix
     532syn keyword cType matrixobjects
     533syn keyword cType Vector
     534syn keyword cType Matrix
     535syn keyword cType GeomSubDomain
     536syn keyword cType Geometry
     537syn keyword cType AdjacentTriangle
     538syn keyword cType VertexOnEdge
     539syn keyword cType BamgQuadtree
     540syn keyword cType Edge
     541syn keyword cType BamgVertex
     542syn keyword cType SetOfE4
     543syn keyword cType GeomEdge
     544syn keyword cType Direction
     545syn keyword cType VertexOnGeom
     546syn keyword cType R2
     547syn keyword cType Mesh
     548syn keyword cType ListofIntersectionTriangles
     549syn keyword cType Triangle
     550syn keyword cType DoubleAndInt
     551syn keyword cType VertexOnVertex
     552syn keyword cType BamgOpts
     553syn keyword cType BamgGeom
     554syn keyword cType bamgobjects
     555syn keyword cType CrackedEdge
     556syn keyword cType SubDomain
     557syn keyword cType BamgMesh
     558syn keyword cType Metric
     559syn keyword cType include
     560syn keyword cType typedefs
     561syn keyword cType Curve
     562syn keyword cType macros
     563syn keyword cType GeomVertex
    565564syn keyword cType OptArgs
     565syn keyword cType Update
    566566syn keyword cType OptPars
    567567syn keyword cType BamgOpts
  • issm/branches/trunk-jpl-damage/externalpackages/vim/addons/vimrc

    r10985 r13101  
    203203au BufRead,BufNewFile *.c*       iabbr <silent> p1  printf("\n");<Left><Left><Left><Left><Left><C-R>=Eatchar('\s')<CR>
    204204au BufRead,BufNewFile *.c*,*.h   iabbr <silent> ER  _error_("");<Left><Left><Left><C-R>=Eatchar('\s')<CR>
     205au BufRead,BufNewFile *.py       iabbr <silent> ER  raise NameError('')<Left><Left><C-R>=Eatchar('\s')<CR>
     206au BufRead,BufNewFile *.m        iabbr <silent> ER  error('');<Left><Left><Left><C-R>=Eatchar('\s')<CR>
    205207au BufRead,BufNewFile *.c*       ab VV VecView(ug,PETSC_VIEWER_STDOUT_WORLD);
    206208au BufRead,BufNewFile *.c*       ab AS _assert_();
  • issm/branches/trunk-jpl-damage/ltmain.sh

    r11116 r13101  
    1 # Generated from ltmain.m4sh.
    2 
    3 # ltmain.sh (GNU libtool) 2.2.6b
     1
     2# libtool (GNU libtool) 2.4.2
    43# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    54
    6 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
     5# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
     6# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
    77# This is free software; see the source for copying conditions.  There is NO
    88# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     
    3333# Provide generalized library-building support services.
    3434#
    35 #     --config             show all configuration variables
    36 #     --debug              enable verbose shell tracing
    37 # -n, --dry-run            display commands without modifying any files
    38 #     --features           display basic configuration information and exit
    39 #     --mode=MODE          use operation mode MODE
    40 #     --preserve-dup-deps  don't remove duplicate dependency libraries
    41 #     --quiet, --silent    don't print informational messages
    42 #     --tag=TAG            use configuration variables from tag TAG
    43 # -v, --verbose            print informational messages (default)
    44 #     --version            print version information
    45 # -h, --help               print short or long help message
     35#       --config             show all configuration variables
     36#       --debug              enable verbose shell tracing
     37#   -n, --dry-run            display commands without modifying any files
     38#       --features           display basic configuration information and exit
     39#       --mode=MODE          use operation mode MODE
     40#       --preserve-dup-deps  don't remove duplicate dependency libraries
     41#       --quiet, --silent    don't print informational messages
     42#       --no-quiet, --no-silent
     43#                            print informational messages (default)
     44#       --no-warn            don't display warning messages
     45#       --tag=TAG            use configuration variables from tag TAG
     46#   -v, --verbose            print more informational messages than default
     47#       --no-verbose         don't print the extra informational messages
     48#       --version            print version information
     49#   -h, --help, --help-all   print short, long, or detailed help message
    4650#
    4751# MODE must be one of the following:
    4852#
    49 #       clean              remove files from the build directory
    50 #       compile            compile a source file into a libtool object
    51 #       execute            automatically set library path, then run a program
    52 #       finish             complete the installation of libtool libraries
    53 #       install            install libraries or executables
    54 #       link               create a library or an executable
    55 #       uninstall          remove libraries from an installed directory
     53#         clean              remove files from the build directory
     54#         compile            compile a source file into a libtool object
     55#         execute            automatically set library path, then run a program
     56#         finish             complete the installation of libtool libraries
     57#         install            install libraries or executables
     58#         link               create a library or an executable
     59#         uninstall          remove libraries from an installed directory
    5660#
    57 # MODE-ARGS vary depending on the MODE.
     61# MODE-ARGS vary depending on the MODE.  When passed as first option,
     62# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
    5863# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
    5964#
     
    6166# include the following information:
    6267#
    63 #       host-triplet:   $host
    64 #       shell:          $SHELL
    65 #       compiler:               $LTCC
    66 #       compiler flags:         $LTCFLAGS
    67 #       linker:         $LD (gnu? $with_gnu_ld)
    68 #       $progname:              (GNU libtool) 2.2.6b
    69 #       automake:               $automake_version
    70 #       autoconf:               $autoconf_version
     68#         host-triplet: $host
     69#         shell:                $SHELL
     70#         compiler:             $LTCC
     71#         compiler flags:               $LTCFLAGS
     72#         linker:               $LD (gnu? $with_gnu_ld)
     73#         $progname:    (GNU libtool) 2.4.2
     74#         automake:     $automake_version
     75#         autoconf:     $autoconf_version
    7176#
    7277# Report bugs to <bug-libtool@gnu.org>.
    73 
    74 PROGRAM=ltmain.sh
     78# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
     79# General help using GNU software: <http://www.gnu.org/gethelp/>.
     80
     81PROGRAM=libtool
    7582PACKAGE=libtool
    76 VERSION=2.2.6b
     83VERSION=2.4.2
    7784TIMESTAMP=""
    78 package_revision=1.3017
     85package_revision=1.3337
    7986
    8087# Be Bourne compatible
     
    9299DUALCASE=1; export DUALCASE # for MKS sh
    93100
     101# A function that is used when there is no print builtin or printf.
     102func_fallback_echo ()
     103{
     104  eval 'cat <<_LTECHO_EOF
     105$1
     106_LTECHO_EOF'
     107}
     108
    94109# NLS nuisances: We save the old values to restore during execute mode.
    95 # Only set LANG and LC_ALL to C if already set.
    96 # These must not be set unconditionally because not all systems understand
    97 # e.g. LANG=C (notably SCO).
    98110lt_user_locale=
    99111lt_safe_locale=
     
    108120        fi"
    109121done
     122LC_ALL=C
     123LANGUAGE=C
     124export LANGUAGE LC_ALL
    110125
    111126$lt_unset CDPATH
    112127
    113128
     129# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
     130# is ksh but when the shell is invoked as "sh" and the current value of
     131# the _XPG environment variable is not equal to 1 (one), the special
     132# positional parameter $0, within a function call, is the name of the
     133# function.
     134progpath="$0"
    114135
    115136
    116137
    117138: ${CP="cp -f"}
    118 : ${ECHO="echo"}
    119 : ${EGREP="/bin/grep -E"}
    120 : ${FGREP="/bin/grep -F"}
    121 : ${GREP="/bin/grep"}
    122 : ${LN_S="ln -s"}
     139test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
    123140: ${MAKE="make"}
    124141: ${MKDIR="mkdir"}
    125142: ${MV="mv -f"}
    126143: ${RM="rm -f"}
    127 : ${SED="/bin/sed"}
    128144: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
    129145: ${Xsed="$SED -e 1s/^X//"}
     
    144160dirname="s,/[^/]*$,,"
    145161basename="s,^.*/,,"
     162
     163# func_dirname file append nondir_replacement
     164# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
     165# otherwise set result to NONDIR_REPLACEMENT.
     166func_dirname ()
     167{
     168    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
     169    if test "X$func_dirname_result" = "X${1}"; then
     170      func_dirname_result="${3}"
     171    else
     172      func_dirname_result="$func_dirname_result${2}"
     173    fi
     174} # func_dirname may be replaced by extended shell implementation
     175
     176
     177# func_basename file
     178func_basename ()
     179{
     180    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
     181} # func_basename may be replaced by extended shell implementation
     182
    146183
    147184# func_dirname_and_basename file append nondir_replacement
     
    159196func_dirname_and_basename ()
    160197{
    161   # Extract subdirectory from the argument.
    162   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
    163   if test "X$func_dirname_result" = "X${1}"; then
    164     func_dirname_result="${3}"
    165   else
    166     func_dirname_result="$func_dirname_result${2}"
     198    # Extract subdirectory from the argument.
     199    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
     200    if test "X$func_dirname_result" = "X${1}"; then
     201      func_dirname_result="${3}"
     202    else
     203      func_dirname_result="$func_dirname_result${2}"
     204    fi
     205    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
     206} # func_dirname_and_basename may be replaced by extended shell implementation
     207
     208
     209# func_stripname prefix suffix name
     210# strip PREFIX and SUFFIX off of NAME.
     211# PREFIX and SUFFIX must not contain globbing or regex special
     212# characters, hashes, percent signs, but SUFFIX may contain a leading
     213# dot (in which case that matches only a dot).
     214# func_strip_suffix prefix name
     215func_stripname ()
     216{
     217    case ${2} in
     218      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
     219      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
     220    esac
     221} # func_stripname may be replaced by extended shell implementation
     222
     223
     224# These SED scripts presuppose an absolute path with a trailing slash.
     225pathcar='s,^/\([^/]*\).*$,\1,'
     226pathcdr='s,^/[^/]*,,'
     227removedotparts=':dotsl
     228                s@/\./@/@g
     229                t dotsl
     230                s,/\.$,/,'
     231collapseslashes='s@/\{1,\}@/@g'
     232finalslash='s,/*$,/,'
     233
     234# func_normal_abspath PATH
     235# Remove doubled-up and trailing slashes, "." path components,
     236# and cancel out any ".." path components in PATH after making
     237# it an absolute path.
     238#             value returned in "$func_normal_abspath_result"
     239func_normal_abspath ()
     240{
     241  # Start from root dir and reassemble the path.
     242  func_normal_abspath_result=
     243  func_normal_abspath_tpath=$1
     244  func_normal_abspath_altnamespace=
     245  case $func_normal_abspath_tpath in
     246    "")
     247      # Empty path, that just means $cwd.
     248      func_stripname '' '/' "`pwd`"
     249      func_normal_abspath_result=$func_stripname_result
     250      return
     251    ;;
     252    # The next three entries are used to spot a run of precisely
     253    # two leading slashes without using negated character classes;
     254    # we take advantage of case's first-match behaviour.
     255    ///*)
     256      # Unusual form of absolute path, do nothing.
     257    ;;
     258    //*)
     259      # Not necessarily an ordinary path; POSIX reserves leading '//'
     260      # and for example Cygwin uses it to access remote file shares
     261      # over CIFS/SMB, so we conserve a leading double slash if found.
     262      func_normal_abspath_altnamespace=/
     263    ;;
     264    /*)
     265      # Absolute path, do nothing.
     266    ;;
     267    *)
     268      # Relative path, prepend $cwd.
     269      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
     270    ;;
     271  esac
     272  # Cancel out all the simple stuff to save iterations.  We also want
     273  # the path to end with a slash for ease of parsing, so make sure
     274  # there is one (and only one) here.
     275  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
     276        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
     277  while :; do
     278    # Processed it all yet?
     279    if test "$func_normal_abspath_tpath" = / ; then
     280      # If we ascended to the root using ".." the result may be empty now.
     281      if test -z "$func_normal_abspath_result" ; then
     282        func_normal_abspath_result=/
     283      fi
     284      break
     285    fi
     286    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
     287        -e "$pathcar"`
     288    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
     289        -e "$pathcdr"`
     290    # Figure out what to do with it
     291    case $func_normal_abspath_tcomponent in
     292      "")
     293        # Trailing empty path component, ignore it.
     294      ;;
     295      ..)
     296        # Parent dir; strip last assembled component from result.
     297        func_dirname "$func_normal_abspath_result"
     298        func_normal_abspath_result=$func_dirname_result
     299      ;;
     300      *)
     301        # Actual path component, append it.
     302        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
     303      ;;
     304    esac
     305  done
     306  # Restore leading double-slash if one was found on entry.
     307  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
     308}
     309
     310# func_relative_path SRCDIR DSTDIR
     311# generates a relative path from SRCDIR to DSTDIR, with a trailing
     312# slash if non-empty, suitable for immediately appending a filename
     313# without needing to append a separator.
     314#             value returned in "$func_relative_path_result"
     315func_relative_path ()
     316{
     317  func_relative_path_result=
     318  func_normal_abspath "$1"
     319  func_relative_path_tlibdir=$func_normal_abspath_result
     320  func_normal_abspath "$2"
     321  func_relative_path_tbindir=$func_normal_abspath_result
     322
     323  # Ascend the tree starting from libdir
     324  while :; do
     325    # check if we have found a prefix of bindir
     326    case $func_relative_path_tbindir in
     327      $func_relative_path_tlibdir)
     328        # found an exact match
     329        func_relative_path_tcancelled=
     330        break
     331        ;;
     332      $func_relative_path_tlibdir*)
     333        # found a matching prefix
     334        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
     335        func_relative_path_tcancelled=$func_stripname_result
     336        if test -z "$func_relative_path_result"; then
     337          func_relative_path_result=.
     338        fi
     339        break
     340        ;;
     341      *)
     342        func_dirname $func_relative_path_tlibdir
     343        func_relative_path_tlibdir=${func_dirname_result}
     344        if test "x$func_relative_path_tlibdir" = x ; then
     345          # Have to descend all the way to the root!
     346          func_relative_path_result=../$func_relative_path_result
     347          func_relative_path_tcancelled=$func_relative_path_tbindir
     348          break
     349        fi
     350        func_relative_path_result=../$func_relative_path_result
     351        ;;
     352    esac
     353  done
     354
     355  # Now calculate path; take care to avoid doubling-up slashes.
     356  func_stripname '' '/' "$func_relative_path_result"
     357  func_relative_path_result=$func_stripname_result
     358  func_stripname '/' '/' "$func_relative_path_tcancelled"
     359  if test "x$func_stripname_result" != x ; then
     360    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
    167361  fi
    168   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
    169 }
    170 
    171 # Generated shell functions inserted here.
    172 
    173 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
    174 # is ksh but when the shell is invoked as "sh" and the current value of
    175 # the _XPG environment variable is not equal to 1 (one), the special
    176 # positional parameter $0, within a function call, is the name of the
    177 # function.
    178 progpath="$0"
     362
     363  # Normalisation. If bindir is libdir, return empty string,
     364  # else relative path ending with a slash; either way, target
     365  # file name can be directly appended.
     366  if test ! -z "$func_relative_path_result"; then
     367    func_stripname './' '' "$func_relative_path_result/"
     368    func_relative_path_result=$func_stripname_result
     369  fi
     370}
    179371
    180372# The name of this program:
    181 # In the unlikely event $progname began with a '-', it would play havoc with
    182 # func_echo (imagine progname=-n), so we prepend ./ in that case:
    183373func_dirname_and_basename "$progpath"
    184374progname=$func_basename_result
    185 case $progname in
    186   -*) progname=./$progname ;;
    187 esac
    188375
    189376# Make sure we have an absolute path for reexecution:
     
    197384  *)
    198385     save_IFS="$IFS"
    199      IFS=:
     386     IFS=${PATH_SEPARATOR-:}
    200387     for progdir in $PATH; do
    201388       IFS="$save_IFS"
     
    215402# Same as above, but do not quote variable references.
    216403double_quote_subst='s/\(["`\\]\)/\\\1/g'
     404
     405# Sed substitution that turns a string into a regex matching for the
     406# string literally.
     407sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
     408
     409# Sed substitution that converts a w32 file name or path
     410# which contains forward slashes, into one that contains
     411# (escaped) backslashes.  A very naive implementation.
     412lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
    217413
    218414# Re-`\' parameter expansions in output of double_quote_subst that were
     
    244440func_echo ()
    245441{
    246     $ECHO "$progname${mode+: }$mode: $*"
     442    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
    247443}
    248444
     
    259455}
    260456
     457# func_echo_all arg...
     458# Invoke $ECHO with all args, space-separated.
     459func_echo_all ()
     460{
     461    $ECHO "$*"
     462}
     463
    261464# func_error arg...
    262465# Echo program name prefixed message to standard error.
    263466func_error ()
    264467{
    265     $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
     468    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
    266469}
    267470
     
    270473func_warning ()
    271474{
    272     $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
     475    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
    273476
    274477    # bash bug again:
     
    327530
    328531        # ...otherwise throw away the child directory and loop
    329         my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
     532        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
    330533      done
    331       my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
     534      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
    332535
    333536      save_mkdir_p_IFS="$IFS"; IFS=':'
     
    379582    fi
    380583
    381     $ECHO "X$my_tmpdir" | $Xsed
     584    $ECHO "$my_tmpdir"
    382585}
    383586
     
    393596    case $1 in
    394597      *[\\\`\"\$]*)
    395         func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
     598        func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
    396599      *)
    397600        func_quote_for_eval_unquoted_result="$1" ;;
     
    420623    case $1 in
    421624      *[\\\`\"]*)
    422         my_arg=`$ECHO "X$1" | $Xsed \
     625        my_arg=`$ECHO "$1" | $SED \
    423626            -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
    424627      *)
     
    489692}
    490693
    491 
    492 
     694# func_tr_sh
     695# Turn $1 into a string suitable for a shell variable name.
     696# Result is stored in $func_tr_sh_result.  All characters
     697# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
     698# if $1 begins with a digit, a '_' is prepended as well.
     699func_tr_sh ()
     700{
     701  case $1 in
     702  [0-9]* | *[!a-zA-Z0-9_]*)
     703    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
     704    ;;
     705  * )
     706    func_tr_sh_result=$1
     707    ;;
     708  esac
     709}
    493710
    494711
     
    497714func_version ()
    498715{
    499     $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
     716    $opt_debug
     717
     718    $SED -n '/(C)/!b go
     719        :more
     720        /\./!{
     721          N
     722          s/\n# / /
     723          b more
     724        }
     725        :go
     726        /^# '$PROGRAM' (GNU /,/# warranty; / {
    500727        s/^# //
    501728        s/^# *$//
     
    510737func_usage ()
    511738{
    512     $SED -n '/^# Usage:/,/# -h/ {
     739    $opt_debug
     740
     741    $SED -n '/^# Usage:/,/^#  *.*--help/ {
    513742        s/^# //
    514743        s/^# *$//
     
    516745        p
    517746    }' < "$progpath"
    518     $ECHO
     747    echo
    519748    $ECHO "run \`$progname --help | more' for full usage"
    520749    exit $?
    521750}
    522751
    523 # func_help
    524 # Echo long help message to standard output and exit.
     752# func_help [NOEXIT]
     753# Echo long help message to standard output and exit,
     754# unless 'noexit' is passed as argument.
    525755func_help ()
    526756{
     757    $opt_debug
     758
    527759    $SED -n '/^# Usage:/,/# Report bugs to/ {
     760        :print
    528761        s/^# //
    529762        s/^# *$//
     
    535768        s*\$LD*'"$LD"'*
    536769        s/\$with_gnu_ld/'"$with_gnu_ld"'/
    537         s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
    538         s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
     770        s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
     771        s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
    539772        p
    540      }' < "$progpath"
    541     exit $?
     773        d
     774     }
     775     /^# .* home page:/b print
     776     /^# General help using/b print
     777     ' < "$progpath"
     778    ret=$?
     779    if test -z "$1"; then
     780      exit $ret
     781    fi
    542782}
    543783
     
    547787func_missing_arg ()
    548788{
    549     func_error "missing argument for $1"
     789    $opt_debug
     790
     791    func_error "missing argument for $1."
    550792    exit_cmd=exit
    551793}
    552794
     795
     796# func_split_short_opt shortopt
     797# Set func_split_short_opt_name and func_split_short_opt_arg shell
     798# variables after splitting SHORTOPT after the 2nd character.
     799func_split_short_opt ()
     800{
     801    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
     802    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
     803
     804    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
     805    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
     806} # func_split_short_opt may be replaced by extended shell implementation
     807
     808
     809# func_split_long_opt longopt
     810# Set func_split_long_opt_name and func_split_long_opt_arg shell
     811# variables after splitting LONGOPT at the `=' sign.
     812func_split_long_opt ()
     813{
     814    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
     815    my_sed_long_arg='1s/^--[^=]*=//'
     816
     817    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
     818    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
     819} # func_split_long_opt may be replaced by extended shell implementation
     820
    553821exit_cmd=:
    554822
     
    556824
    557825
    558 
    559 # Check that we have a working $ECHO.
    560 if test "X$1" = X--no-reexec; then
    561   # Discard the --no-reexec flag, and continue.
    562   shift
    563 elif test "X$1" = X--fallback-echo; then
    564   # Avoid inline document here, it may be left over
    565   :
    566 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
    567   # Yippee, $ECHO works!
    568   :
    569 else
    570   # Restart under the correct shell, and then maybe $ECHO will work.
    571   exec $SHELL "$progpath" --no-reexec ${1+"$@"}
    572 fi
    573 
    574 if test "X$1" = X--fallback-echo; then
    575   # used as fallback echo
    576   shift
    577   cat <<EOF
    578 $*
    579 EOF
    580   exit $EXIT_SUCCESS
    581 fi
    582826
    583827magic="%%%MAGIC variable%%%"
     
    585829
    586830# Global variables.
    587 # $mode is unset
    588831nonopt=
    589 execute_dlfiles=
    590832preserve_args=
    591833lo2o="s/\\.lo\$/.${objext}/"
     
    594836extracted_serial=0
    595837
    596 opt_dry_run=false
    597 opt_duplicate_deps=false
    598 opt_silent=false
    599 opt_debug=:
    600 
    601838# If this variable is set in any of the actions, the command in it
    602839# will be execed at the end.  This prevents here-documents from being
     
    604841exec_cmd=
    605842
     843# func_append var value
     844# Append VALUE to the end of shell variable VAR.
     845func_append ()
     846{
     847    eval "${1}=\$${1}\${2}"
     848} # func_append may be replaced by extended shell implementation
     849
     850# func_append_quoted var value
     851# Quote VALUE and append to the end of shell variable VAR, separated
     852# by a space.
     853func_append_quoted ()
     854{
     855    func_quote_for_eval "${2}"
     856    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
     857} # func_append_quoted may be replaced by extended shell implementation
     858
     859
     860# func_arith arithmetic-term...
     861func_arith ()
     862{
     863    func_arith_result=`expr "${@}"`
     864} # func_arith may be replaced by extended shell implementation
     865
     866
     867# func_len string
     868# STRING may not start with a hyphen.
     869func_len ()
     870{
     871    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
     872} # func_len may be replaced by extended shell implementation
     873
     874
     875# func_lo2o object
     876func_lo2o ()
     877{
     878    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
     879} # func_lo2o may be replaced by extended shell implementation
     880
     881
     882# func_xform libobj-or-source
     883func_xform ()
     884{
     885    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
     886} # func_xform may be replaced by extended shell implementation
     887
     888
    606889# func_fatal_configuration arg...
    607890# Echo program name prefixed message to standard error, followed by
     
    637920func_features ()
    638921{
    639     $ECHO "host: $host"
     922    echo "host: $host"
    640923    if test "$build_libtool_libs" = yes; then
    641       $ECHO "enable shared libraries"
     924      echo "enable shared libraries"
    642925    else
    643       $ECHO "disable shared libraries"
     926      echo "disable shared libraries"
    644927    fi
    645928    if test "$build_old_libs" = yes; then
    646       $ECHO "enable static libraries"
     929      echo "enable static libraries"
    647930    else
    648       $ECHO "disable static libraries"
     931      echo "disable static libraries"
    649932    fi
    650933
     
    691974      ;;
    692975  esac
    693 }
    694 
    695 # Parse options once, thoroughly.  This comes as soon as possible in
    696 # the script to make things like `libtool --version' happen quickly.
    697 {
    698 
    699   # Shorthand for --mode=foo, only valid as the first argument
    700   case $1 in
    701   clean|clea|cle|cl)
    702     shift; set dummy --mode clean ${1+"$@"}; shift
    703     ;;
    704   compile|compil|compi|comp|com|co|c)
    705     shift; set dummy --mode compile ${1+"$@"}; shift
    706     ;;
    707   execute|execut|execu|exec|exe|ex|e)
    708     shift; set dummy --mode execute ${1+"$@"}; shift
    709     ;;
    710   finish|finis|fini|fin|fi|f)
    711     shift; set dummy --mode finish ${1+"$@"}; shift
    712     ;;
    713   install|instal|insta|inst|ins|in|i)
    714     shift; set dummy --mode install ${1+"$@"}; shift
    715     ;;
    716   link|lin|li|l)
    717     shift; set dummy --mode link ${1+"$@"}; shift
    718     ;;
    719   uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
    720     shift; set dummy --mode uninstall ${1+"$@"}; shift
    721     ;;
    722   esac
    723 
    724   # Parse non-mode specific arguments:
    725   while test "$#" -gt 0; do
    726     opt="$1"
    727     shift
    728 
    729     case $opt in
    730       --config)         func_config                                     ;;
    731 
    732       --debug)          preserve_args="$preserve_args $opt"
    733                         func_echo "enabling shell trace mode"
    734                         opt_debug='set -x'
    735                         $opt_debug
    736                         ;;
    737 
    738       -dlopen)          test "$#" -eq 0 && func_missing_arg "$opt" && break
    739                         execute_dlfiles="$execute_dlfiles $1"
    740                         shift
    741                         ;;
    742 
    743       --dry-run | -n)   opt_dry_run=:                                   ;;
    744       --features)       func_features                                   ;;
    745       --finish)         mode="finish"                                   ;;
    746 
    747       --mode)           test "$#" -eq 0 && func_missing_arg "$opt" && break
    748                         case $1 in
    749                           # Valid mode arguments:
    750                           clean)        ;;
    751                           compile)      ;;
    752                           execute)      ;;
    753                           finish)       ;;
    754                           install)      ;;
    755                           link)         ;;
    756                           relink)       ;;
    757                           uninstall)    ;;
    758 
    759                           # Catch anything else as an error
    760                           *) func_error "invalid argument for $opt"
    761                              exit_cmd=exit
    762                              break
    763                              ;;
    764                         esac
    765 
    766                         mode="$1"
    767                         shift
    768                         ;;
    769 
    770       --preserve-dup-deps)
    771                         opt_duplicate_deps=:                            ;;
    772 
    773       --quiet|--silent) preserve_args="$preserve_args $opt"
    774                         opt_silent=:
    775                         ;;
    776 
    777       --verbose| -v)    preserve_args="$preserve_args $opt"
    778                         opt_silent=false
    779                         ;;
    780 
    781       --tag)            test "$#" -eq 0 && func_missing_arg "$opt" && break
    782                         preserve_args="$preserve_args $opt $1"
    783                         func_enable_tag "$1"    # tagname is set here
    784                         shift
    785                         ;;
    786 
    787       # Separate optargs to long options:
    788       -dlopen=*|--mode=*|--tag=*)
    789                         func_opt_split "$opt"
    790                         set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
    791                         shift
    792                         ;;
    793 
    794       -\?|-h)           func_usage                                      ;;
    795       --help)           opt_help=:                                      ;;
    796       --version)        func_version                                    ;;
    797 
    798       -*)               func_fatal_help "unrecognized option \`$opt'"   ;;
    799 
    800       *)                nonopt="$opt"
    801                         break
    802                         ;;
    803     esac
    804   done
    805 
    806 
    807   case $host in
    808     *cygwin* | *mingw* | *pw32* | *cegcc*)
    809       # don't eliminate duplications in $postdeps and $predeps
    810       opt_duplicate_compiler_generated_deps=:
    811       ;;
    812     *)
    813       opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
    814       ;;
    815   esac
    816 
    817   # Having warned about all mis-specified options, bail out if
    818   # anything was wrong.
    819   $exit_cmd $EXIT_FAILURE
    820976}
    821977
     
    8561012
    8571013
     1014# Shorthand for --mode=foo, only valid as the first argument
     1015case $1 in
     1016clean|clea|cle|cl)
     1017  shift; set dummy --mode clean ${1+"$@"}; shift
     1018  ;;
     1019compile|compil|compi|comp|com|co|c)
     1020  shift; set dummy --mode compile ${1+"$@"}; shift
     1021  ;;
     1022execute|execut|execu|exec|exe|ex|e)
     1023  shift; set dummy --mode execute ${1+"$@"}; shift
     1024  ;;
     1025finish|finis|fini|fin|fi|f)
     1026  shift; set dummy --mode finish ${1+"$@"}; shift
     1027  ;;
     1028install|instal|insta|inst|ins|in|i)
     1029  shift; set dummy --mode install ${1+"$@"}; shift
     1030  ;;
     1031link|lin|li|l)
     1032  shift; set dummy --mode link ${1+"$@"}; shift
     1033  ;;
     1034uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
     1035  shift; set dummy --mode uninstall ${1+"$@"}; shift
     1036  ;;
     1037esac
     1038
     1039
     1040
     1041# Option defaults:
     1042opt_debug=:
     1043opt_dry_run=false
     1044opt_config=false
     1045opt_preserve_dup_deps=false
     1046opt_features=false
     1047opt_finish=false
     1048opt_help=false
     1049opt_help_all=false
     1050opt_silent=:
     1051opt_warning=:
     1052opt_verbose=:
     1053opt_silent=false
     1054opt_verbose=false
     1055
     1056
     1057# Parse options once, thoroughly.  This comes as soon as possible in the
     1058# script to make things like `--version' happen as quickly as we can.
     1059{
     1060  # this just eases exit handling
     1061  while test $# -gt 0; do
     1062    opt="$1"
     1063    shift
     1064    case $opt in
     1065      --debug|-x)       opt_debug='set -x'
     1066                        func_echo "enabling shell trace mode"
     1067                        $opt_debug
     1068                        ;;
     1069      --dry-run|--dryrun|-n)
     1070                        opt_dry_run=:
     1071                        ;;
     1072      --config)
     1073                        opt_config=:
     1074func_config
     1075                        ;;
     1076      --dlopen|-dlopen)
     1077                        optarg="$1"
     1078                        opt_dlopen="${opt_dlopen+$opt_dlopen
     1079}$optarg"
     1080                        shift
     1081                        ;;
     1082      --preserve-dup-deps)
     1083                        opt_preserve_dup_deps=:
     1084                        ;;
     1085      --features)
     1086                        opt_features=:
     1087func_features
     1088                        ;;
     1089      --finish)
     1090                        opt_finish=:
     1091set dummy --mode finish ${1+"$@"}; shift
     1092                        ;;
     1093      --help)
     1094                        opt_help=:
     1095                        ;;
     1096      --help-all)
     1097                        opt_help_all=:
     1098opt_help=': help-all'
     1099                        ;;
     1100      --mode)
     1101                        test $# = 0 && func_missing_arg $opt && break
     1102                        optarg="$1"
     1103                        opt_mode="$optarg"
     1104case $optarg in
     1105  # Valid mode arguments:
     1106  clean|compile|execute|finish|install|link|relink|uninstall) ;;
     1107
     1108  # Catch anything else as an error
     1109  *) func_error "invalid argument for $opt"
     1110     exit_cmd=exit
     1111     break
     1112     ;;
     1113esac
     1114                        shift
     1115                        ;;
     1116      --no-silent|--no-quiet)
     1117                        opt_silent=false
     1118func_append preserve_args " $opt"
     1119                        ;;
     1120      --no-warning|--no-warn)
     1121                        opt_warning=false
     1122func_append preserve_args " $opt"
     1123                        ;;
     1124      --no-verbose)
     1125                        opt_verbose=false
     1126func_append preserve_args " $opt"
     1127                        ;;
     1128      --silent|--quiet)
     1129                        opt_silent=:
     1130func_append preserve_args " $opt"
     1131        opt_verbose=false
     1132                        ;;
     1133      --verbose|-v)
     1134                        opt_verbose=:
     1135func_append preserve_args " $opt"
     1136opt_silent=false
     1137                        ;;
     1138      --tag)
     1139                        test $# = 0 && func_missing_arg $opt && break
     1140                        optarg="$1"
     1141                        opt_tag="$optarg"
     1142func_append preserve_args " $opt $optarg"
     1143func_enable_tag "$optarg"
     1144                        shift
     1145                        ;;
     1146
     1147      -\?|-h)           func_usage                              ;;
     1148      --help)           func_help                               ;;
     1149      --version)        func_version                            ;;
     1150
     1151      # Separate optargs to long options:
     1152      --*=*)
     1153                        func_split_long_opt "$opt"
     1154                        set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
     1155                        shift
     1156                        ;;
     1157
     1158      # Separate non-argument short options:
     1159      -\?*|-h*|-n*|-v*)
     1160                        func_split_short_opt "$opt"
     1161                        set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
     1162                        shift
     1163                        ;;
     1164
     1165      --)               break                                   ;;
     1166      -*)               func_fatal_help "unrecognized option \`$opt'" ;;
     1167      *)                set dummy "$opt" ${1+"$@"};     shift; break  ;;
     1168    esac
     1169  done
     1170
     1171  # Validate options:
     1172
     1173  # save first non-option argument
     1174  if test "$#" -gt 0; then
     1175    nonopt="$opt"
     1176    shift
     1177  fi
     1178
     1179  # preserve --debug
     1180  test "$opt_debug" = : || func_append preserve_args " --debug"
     1181
     1182  case $host in
     1183    *cygwin* | *mingw* | *pw32* | *cegcc*)
     1184      # don't eliminate duplications in $postdeps and $predeps
     1185      opt_duplicate_compiler_generated_deps=:
     1186      ;;
     1187    *)
     1188      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
     1189      ;;
     1190  esac
     1191
     1192  $opt_help || {
     1193    # Sanity checks first:
     1194    func_check_version_match
     1195
     1196    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
     1197      func_fatal_configuration "not configured to build any kind of library"
     1198    fi
     1199
     1200    # Darwin sucks
     1201    eval std_shrext=\"$shrext_cmds\"
     1202
     1203    # Only execute mode is allowed to have -dlopen flags.
     1204    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
     1205      func_error "unrecognized option \`-dlopen'"
     1206      $ECHO "$help" 1>&2
     1207      exit $EXIT_FAILURE
     1208    fi
     1209
     1210    # Change the help message to a mode-specific one.
     1211    generic_help="$help"
     1212    help="Try \`$progname --help --mode=$opt_mode' for more information."
     1213  }
     1214
     1215
     1216  # Bail if the options were screwed
     1217  $exit_cmd $EXIT_FAILURE
     1218}
     1219
     1220
     1221
     1222
    8581223## ----------- ##
    8591224##    Main.    ##
    8601225## ----------- ##
    861 
    862 $opt_help || {
    863   # Sanity checks first:
    864   func_check_version_match
    865 
    866   if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
    867     func_fatal_configuration "not configured to build any kind of library"
    868   fi
    869 
    870   test -z "$mode" && func_fatal_error "error: you must specify a MODE."
    871 
    872 
    873   # Darwin sucks
    874   eval std_shrext=\"$shrext_cmds\"
    875 
    876 
    877   # Only execute mode is allowed to have -dlopen flags.
    878   if test -n "$execute_dlfiles" && test "$mode" != execute; then
    879     func_error "unrecognized option \`-dlopen'"
    880     $ECHO "$help" 1>&2
    881     exit $EXIT_FAILURE
    882   fi
    883 
    884   # Change the help message to a mode-specific one.
    885   generic_help="$help"
    886   help="Try \`$progname --help --mode=$mode' for more information."
    887 }
    888 
    8891226
    8901227# func_lalib_p file
     
    9511288func_ltwrapper_scriptname ()
    9521289{
    953     func_ltwrapper_scriptname_result=""
    954     if func_ltwrapper_executable_p "$1"; then
    955         func_dirname_and_basename "$1" "" "."
    956         func_stripname '' '.exe' "$func_basename_result"
    957         func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
    958     fi
     1290    func_dirname_and_basename "$1" "" "."
     1291    func_stripname '' '.exe' "$func_basename_result"
     1292    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
    9591293}
    9601294
     
    10021336
    10031337
     1338# func_resolve_sysroot PATH
     1339# Replace a leading = in PATH with a sysroot.  Store the result into
     1340# func_resolve_sysroot_result
     1341func_resolve_sysroot ()
     1342{
     1343  func_resolve_sysroot_result=$1
     1344  case $func_resolve_sysroot_result in
     1345  =*)
     1346    func_stripname '=' '' "$func_resolve_sysroot_result"
     1347    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
     1348    ;;
     1349  esac
     1350}
     1351
     1352# func_replace_sysroot PATH
     1353# If PATH begins with the sysroot, replace it with = and
     1354# store the result into func_replace_sysroot_result.
     1355func_replace_sysroot ()
     1356{
     1357  case "$lt_sysroot:$1" in
     1358  ?*:"$lt_sysroot"*)
     1359    func_stripname "$lt_sysroot" '' "$1"
     1360    func_replace_sysroot_result="=$func_stripname_result"
     1361    ;;
     1362  *)
     1363    # Including no sysroot.
     1364    func_replace_sysroot_result=$1
     1365    ;;
     1366  esac
     1367}
     1368
    10041369# func_infer_tag arg
    10051370# Infer tagged configuration to use if any are available and
     
    10141379      CC_quoted=
    10151380      for arg in $CC; do
    1016         func_quote_for_eval "$arg"
    1017         CC_quoted="$CC_quoted $func_quote_for_eval_result"
     1381        func_append_quoted CC_quoted "$arg"
    10181382      done
     1383      CC_expanded=`func_echo_all $CC`
     1384      CC_quoted_expanded=`func_echo_all $CC_quoted`
    10191385      case $@ in
    10201386      # Blanks in the command may have been stripped by the calling shell,
    10211387      # but not from the CC environment variable when configure was run.
    1022       " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
     1388      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
     1389      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
    10231390      # Blanks at the start of $base_compile will cause this to fail
    10241391      # if we don't check for them as well.
     
    10311398            for arg in $CC; do
    10321399              # Double-quote args containing other shell metacharacters.
    1033               func_quote_for_eval "$arg"
    1034               CC_quoted="$CC_quoted $func_quote_for_eval_result"
     1400              func_append_quoted CC_quoted "$arg"
    10351401            done
     1402            CC_expanded=`func_echo_all $CC`
     1403            CC_quoted_expanded=`func_echo_all $CC_quoted`
    10361404            case "$@ " in
    1037               " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
     1405            " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
     1406            " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
    10381407              # The compiler in the base compile command matches
    10391408              # the one in the tagged configuration.
     
    10981467}
    10991468
     1469
     1470##################################################
     1471# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
     1472##################################################
     1473
     1474# func_convert_core_file_wine_to_w32 ARG
     1475# Helper function used by file name conversion functions when $build is *nix,
     1476# and $host is mingw, cygwin, or some other w32 environment. Relies on a
     1477# correctly configured wine environment available, with the winepath program
     1478# in $build's $PATH.
     1479#
     1480# ARG is the $build file name to be converted to w32 format.
     1481# Result is available in $func_convert_core_file_wine_to_w32_result, and will
     1482# be empty on error (or when ARG is empty)
     1483func_convert_core_file_wine_to_w32 ()
     1484{
     1485  $opt_debug
     1486  func_convert_core_file_wine_to_w32_result="$1"
     1487  if test -n "$1"; then
     1488    # Unfortunately, winepath does not exit with a non-zero error code, so we
     1489    # are forced to check the contents of stdout. On the other hand, if the
     1490    # command is not found, the shell will set an exit code of 127 and print
     1491    # *an error message* to stdout. So we must check for both error code of
     1492    # zero AND non-empty stdout, which explains the odd construction:
     1493    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
     1494    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
     1495      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
     1496        $SED -e "$lt_sed_naive_backslashify"`
     1497    else
     1498      func_convert_core_file_wine_to_w32_result=
     1499    fi
     1500  fi
     1501}
     1502# end: func_convert_core_file_wine_to_w32
     1503
     1504
     1505# func_convert_core_path_wine_to_w32 ARG
     1506# Helper function used by path conversion functions when $build is *nix, and
     1507# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
     1508# configured wine environment available, with the winepath program in $build's
     1509# $PATH. Assumes ARG has no leading or trailing path separator characters.
     1510#
     1511# ARG is path to be converted from $build format to win32.
     1512# Result is available in $func_convert_core_path_wine_to_w32_result.
     1513# Unconvertible file (directory) names in ARG are skipped; if no directory names
     1514# are convertible, then the result may be empty.
     1515func_convert_core_path_wine_to_w32 ()
     1516{
     1517  $opt_debug
     1518  # unfortunately, winepath doesn't convert paths, only file names
     1519  func_convert_core_path_wine_to_w32_result=""
     1520  if test -n "$1"; then
     1521    oldIFS=$IFS
     1522    IFS=:
     1523    for func_convert_core_path_wine_to_w32_f in $1; do
     1524      IFS=$oldIFS
     1525      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
     1526      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
     1527        if test -z "$func_convert_core_path_wine_to_w32_result"; then
     1528          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
     1529        else
     1530          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
     1531        fi
     1532      fi
     1533    done
     1534    IFS=$oldIFS
     1535  fi
     1536}
     1537# end: func_convert_core_path_wine_to_w32
     1538
     1539
     1540# func_cygpath ARGS...
     1541# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
     1542# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
     1543# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
     1544# (2), returns the Cygwin file name or path in func_cygpath_result (input
     1545# file name or path is assumed to be in w32 format, as previously converted
     1546# from $build's *nix or MSYS format). In case (3), returns the w32 file name
     1547# or path in func_cygpath_result (input file name or path is assumed to be in
     1548# Cygwin format). Returns an empty string on error.
     1549#
     1550# ARGS are passed to cygpath, with the last one being the file name or path to
     1551# be converted.
     1552#
     1553# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
     1554# environment variable; do not put it in $PATH.
     1555func_cygpath ()
     1556{
     1557  $opt_debug
     1558  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
     1559    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
     1560    if test "$?" -ne 0; then
     1561      # on failure, ensure result is empty
     1562      func_cygpath_result=
     1563    fi
     1564  else
     1565    func_cygpath_result=
     1566    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
     1567  fi
     1568}
     1569#end: func_cygpath
     1570
     1571
     1572# func_convert_core_msys_to_w32 ARG
     1573# Convert file name or path ARG from MSYS format to w32 format.  Return
     1574# result in func_convert_core_msys_to_w32_result.
     1575func_convert_core_msys_to_w32 ()
     1576{
     1577  $opt_debug
     1578  # awkward: cmd appends spaces to result
     1579  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
     1580    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
     1581}
     1582#end: func_convert_core_msys_to_w32
     1583
     1584
     1585# func_convert_file_check ARG1 ARG2
     1586# Verify that ARG1 (a file name in $build format) was converted to $host
     1587# format in ARG2. Otherwise, emit an error message, but continue (resetting
     1588# func_to_host_file_result to ARG1).
     1589func_convert_file_check ()
     1590{
     1591  $opt_debug
     1592  if test -z "$2" && test -n "$1" ; then
     1593    func_error "Could not determine host file name corresponding to"
     1594    func_error "  \`$1'"
     1595    func_error "Continuing, but uninstalled executables may not work."
     1596    # Fallback:
     1597    func_to_host_file_result="$1"
     1598  fi
     1599}
     1600# end func_convert_file_check
     1601
     1602
     1603# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
     1604# Verify that FROM_PATH (a path in $build format) was converted to $host
     1605# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
     1606# func_to_host_file_result to a simplistic fallback value (see below).
     1607func_convert_path_check ()
     1608{
     1609  $opt_debug
     1610  if test -z "$4" && test -n "$3"; then
     1611    func_error "Could not determine the host path corresponding to"
     1612    func_error "  \`$3'"
     1613    func_error "Continuing, but uninstalled executables may not work."
     1614    # Fallback.  This is a deliberately simplistic "conversion" and
     1615    # should not be "improved".  See libtool.info.
     1616    if test "x$1" != "x$2"; then
     1617      lt_replace_pathsep_chars="s|$1|$2|g"
     1618      func_to_host_path_result=`echo "$3" |
     1619        $SED -e "$lt_replace_pathsep_chars"`
     1620    else
     1621      func_to_host_path_result="$3"
     1622    fi
     1623  fi
     1624}
     1625# end func_convert_path_check
     1626
     1627
     1628# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
     1629# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
     1630# and appending REPL if ORIG matches BACKPAT.
     1631func_convert_path_front_back_pathsep ()
     1632{
     1633  $opt_debug
     1634  case $4 in
     1635  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
     1636    ;;
     1637  esac
     1638  case $4 in
     1639  $2 ) func_append func_to_host_path_result "$3"
     1640    ;;
     1641  esac
     1642}
     1643# end func_convert_path_front_back_pathsep
     1644
     1645
     1646##################################################
     1647# $build to $host FILE NAME CONVERSION FUNCTIONS #
     1648##################################################
     1649# invoked via `$to_host_file_cmd ARG'
     1650#
     1651# In each case, ARG is the path to be converted from $build to $host format.
     1652# Result will be available in $func_to_host_file_result.
     1653
     1654
     1655# func_to_host_file ARG
     1656# Converts the file name ARG from $build format to $host format. Return result
     1657# in func_to_host_file_result.
     1658func_to_host_file ()
     1659{
     1660  $opt_debug
     1661  $to_host_file_cmd "$1"
     1662}
     1663# end func_to_host_file
     1664
     1665
     1666# func_to_tool_file ARG LAZY
     1667# converts the file name ARG from $build format to toolchain format. Return
     1668# result in func_to_tool_file_result.  If the conversion in use is listed
     1669# in (the comma separated) LAZY, no conversion takes place.
     1670func_to_tool_file ()
     1671{
     1672  $opt_debug
     1673  case ,$2, in
     1674    *,"$to_tool_file_cmd",*)
     1675      func_to_tool_file_result=$1
     1676      ;;
     1677    *)
     1678      $to_tool_file_cmd "$1"
     1679      func_to_tool_file_result=$func_to_host_file_result
     1680      ;;
     1681  esac
     1682}
     1683# end func_to_tool_file
     1684
     1685
     1686# func_convert_file_noop ARG
     1687# Copy ARG to func_to_host_file_result.
     1688func_convert_file_noop ()
     1689{
     1690  func_to_host_file_result="$1"
     1691}
     1692# end func_convert_file_noop
     1693
     1694
     1695# func_convert_file_msys_to_w32 ARG
     1696# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
     1697# conversion to w32 is not available inside the cwrapper.  Returns result in
     1698# func_to_host_file_result.
     1699func_convert_file_msys_to_w32 ()
     1700{
     1701  $opt_debug
     1702  func_to_host_file_result="$1"
     1703  if test -n "$1"; then
     1704    func_convert_core_msys_to_w32 "$1"
     1705    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
     1706  fi
     1707  func_convert_file_check "$1" "$func_to_host_file_result"
     1708}
     1709# end func_convert_file_msys_to_w32
     1710
     1711
     1712# func_convert_file_cygwin_to_w32 ARG
     1713# Convert file name ARG from Cygwin to w32 format.  Returns result in
     1714# func_to_host_file_result.
     1715func_convert_file_cygwin_to_w32 ()
     1716{
     1717  $opt_debug
     1718  func_to_host_file_result="$1"
     1719  if test -n "$1"; then
     1720    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
     1721    # LT_CYGPATH in this case.
     1722    func_to_host_file_result=`cygpath -m "$1"`
     1723  fi
     1724  func_convert_file_check "$1" "$func_to_host_file_result"
     1725}
     1726# end func_convert_file_cygwin_to_w32
     1727
     1728
     1729# func_convert_file_nix_to_w32 ARG
     1730# Convert file name ARG from *nix to w32 format.  Requires a wine environment
     1731# and a working winepath. Returns result in func_to_host_file_result.
     1732func_convert_file_nix_to_w32 ()
     1733{
     1734  $opt_debug
     1735  func_to_host_file_result="$1"
     1736  if test -n "$1"; then
     1737    func_convert_core_file_wine_to_w32 "$1"
     1738    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
     1739  fi
     1740  func_convert_file_check "$1" "$func_to_host_file_result"
     1741}
     1742# end func_convert_file_nix_to_w32
     1743
     1744
     1745# func_convert_file_msys_to_cygwin ARG
     1746# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
     1747# Returns result in func_to_host_file_result.
     1748func_convert_file_msys_to_cygwin ()
     1749{
     1750  $opt_debug
     1751  func_to_host_file_result="$1"
     1752  if test -n "$1"; then
     1753    func_convert_core_msys_to_w32 "$1"
     1754    func_cygpath -u "$func_convert_core_msys_to_w32_result"
     1755    func_to_host_file_result="$func_cygpath_result"
     1756  fi
     1757  func_convert_file_check "$1" "$func_to_host_file_result"
     1758}
     1759# end func_convert_file_msys_to_cygwin
     1760
     1761
     1762# func_convert_file_nix_to_cygwin ARG
     1763# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
     1764# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
     1765# in func_to_host_file_result.
     1766func_convert_file_nix_to_cygwin ()
     1767{
     1768  $opt_debug
     1769  func_to_host_file_result="$1"
     1770  if test -n "$1"; then
     1771    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
     1772    func_convert_core_file_wine_to_w32 "$1"
     1773    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
     1774    func_to_host_file_result="$func_cygpath_result"
     1775  fi
     1776  func_convert_file_check "$1" "$func_to_host_file_result"
     1777}
     1778# end func_convert_file_nix_to_cygwin
     1779
     1780
     1781#############################################
     1782# $build to $host PATH CONVERSION FUNCTIONS #
     1783#############################################
     1784# invoked via `$to_host_path_cmd ARG'
     1785#
     1786# In each case, ARG is the path to be converted from $build to $host format.
     1787# The result will be available in $func_to_host_path_result.
     1788#
     1789# Path separators are also converted from $build format to $host format.  If
     1790# ARG begins or ends with a path separator character, it is preserved (but
     1791# converted to $host format) on output.
     1792#
     1793# All path conversion functions are named using the following convention:
     1794#   file name conversion function    : func_convert_file_X_to_Y ()
     1795#   path conversion function         : func_convert_path_X_to_Y ()
     1796# where, for any given $build/$host combination the 'X_to_Y' value is the
     1797# same.  If conversion functions are added for new $build/$host combinations,
     1798# the two new functions must follow this pattern, or func_init_to_host_path_cmd
     1799# will break.
     1800
     1801
     1802# func_init_to_host_path_cmd
     1803# Ensures that function "pointer" variable $to_host_path_cmd is set to the
     1804# appropriate value, based on the value of $to_host_file_cmd.
     1805to_host_path_cmd=
     1806func_init_to_host_path_cmd ()
     1807{
     1808  $opt_debug
     1809  if test -z "$to_host_path_cmd"; then
     1810    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
     1811    to_host_path_cmd="func_convert_path_${func_stripname_result}"
     1812  fi
     1813}
     1814
     1815
     1816# func_to_host_path ARG
     1817# Converts the path ARG from $build format to $host format. Return result
     1818# in func_to_host_path_result.
     1819func_to_host_path ()
     1820{
     1821  $opt_debug
     1822  func_init_to_host_path_cmd
     1823  $to_host_path_cmd "$1"
     1824}
     1825# end func_to_host_path
     1826
     1827
     1828# func_convert_path_noop ARG
     1829# Copy ARG to func_to_host_path_result.
     1830func_convert_path_noop ()
     1831{
     1832  func_to_host_path_result="$1"
     1833}
     1834# end func_convert_path_noop
     1835
     1836
     1837# func_convert_path_msys_to_w32 ARG
     1838# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
     1839# conversion to w32 is not available inside the cwrapper.  Returns result in
     1840# func_to_host_path_result.
     1841func_convert_path_msys_to_w32 ()
     1842{
     1843  $opt_debug
     1844  func_to_host_path_result="$1"
     1845  if test -n "$1"; then
     1846    # Remove leading and trailing path separator characters from ARG.  MSYS
     1847    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
     1848    # and winepath ignores them completely.
     1849    func_stripname : : "$1"
     1850    func_to_host_path_tmp1=$func_stripname_result
     1851    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
     1852    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
     1853    func_convert_path_check : ";" \
     1854      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     1855    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
     1856  fi
     1857}
     1858# end func_convert_path_msys_to_w32
     1859
     1860
     1861# func_convert_path_cygwin_to_w32 ARG
     1862# Convert path ARG from Cygwin to w32 format.  Returns result in
     1863# func_to_host_file_result.
     1864func_convert_path_cygwin_to_w32 ()
     1865{
     1866  $opt_debug
     1867  func_to_host_path_result="$1"
     1868  if test -n "$1"; then
     1869    # See func_convert_path_msys_to_w32:
     1870    func_stripname : : "$1"
     1871    func_to_host_path_tmp1=$func_stripname_result
     1872    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
     1873    func_convert_path_check : ";" \
     1874      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     1875    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
     1876  fi
     1877}
     1878# end func_convert_path_cygwin_to_w32
     1879
     1880
     1881# func_convert_path_nix_to_w32 ARG
     1882# Convert path ARG from *nix to w32 format.  Requires a wine environment and
     1883# a working winepath.  Returns result in func_to_host_file_result.
     1884func_convert_path_nix_to_w32 ()
     1885{
     1886  $opt_debug
     1887  func_to_host_path_result="$1"
     1888  if test -n "$1"; then
     1889    # See func_convert_path_msys_to_w32:
     1890    func_stripname : : "$1"
     1891    func_to_host_path_tmp1=$func_stripname_result
     1892    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
     1893    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
     1894    func_convert_path_check : ";" \
     1895      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     1896    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
     1897  fi
     1898}
     1899# end func_convert_path_nix_to_w32
     1900
     1901
     1902# func_convert_path_msys_to_cygwin ARG
     1903# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
     1904# Returns result in func_to_host_file_result.
     1905func_convert_path_msys_to_cygwin ()
     1906{
     1907  $opt_debug
     1908  func_to_host_path_result="$1"
     1909  if test -n "$1"; then
     1910    # See func_convert_path_msys_to_w32:
     1911    func_stripname : : "$1"
     1912    func_to_host_path_tmp1=$func_stripname_result
     1913    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
     1914    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
     1915    func_to_host_path_result="$func_cygpath_result"
     1916    func_convert_path_check : : \
     1917      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     1918    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
     1919  fi
     1920}
     1921# end func_convert_path_msys_to_cygwin
     1922
     1923
     1924# func_convert_path_nix_to_cygwin ARG
     1925# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
     1926# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
     1927# func_to_host_file_result.
     1928func_convert_path_nix_to_cygwin ()
     1929{
     1930  $opt_debug
     1931  func_to_host_path_result="$1"
     1932  if test -n "$1"; then
     1933    # Remove leading and trailing path separator characters from
     1934    # ARG. msys behavior is inconsistent here, cygpath turns them
     1935    # into '.;' and ';.', and winepath ignores them completely.
     1936    func_stripname : : "$1"
     1937    func_to_host_path_tmp1=$func_stripname_result
     1938    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
     1939    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
     1940    func_to_host_path_result="$func_cygpath_result"
     1941    func_convert_path_check : : \
     1942      "$func_to_host_path_tmp1" "$func_to_host_path_result"
     1943    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
     1944  fi
     1945}
     1946# end func_convert_path_nix_to_cygwin
     1947
     1948
    11001949# func_mode_compile arg...
    11011950func_mode_compile ()
     
    11381987
    11391988        -pie | -fpie | -fPIE)
    1140           pie_flag="$pie_flag $arg"
     1989          func_append pie_flag " $arg"
    11411990          continue
    11421991          ;;
    11431992
    11441993        -shared | -static | -prefer-pic | -prefer-non-pic)
    1145           later="$later $arg"
     1994          func_append later " $arg"
    11461995          continue
    11471996          ;;
     
    11642013          for arg in $args; do
    11652014            IFS="$save_ifs"
    1166             func_quote_for_eval "$arg"
    1167             lastarg="$lastarg $func_quote_for_eval_result"
     2015            func_append_quoted lastarg "$arg"
    11682016          done
    11692017          IFS="$save_ifs"
     
    11722020
    11732021          # Add the arguments to base_compile.
    1174           base_compile="$base_compile $lastarg"
     2022          func_append base_compile " $lastarg"
    11752023          continue
    11762024          ;;
     
    11882036
    11892037      # Aesthetically quote the previous argument.
    1190       func_quote_for_eval "$lastarg"
    1191       base_compile="$base_compile $func_quote_for_eval_result"
     2038      func_append_quoted base_compile "$lastarg"
    11922039    done # for arg
    11932040
     
    12142061    *.ada | *.adb | *.ads | *.asm | \
    12152062    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
    1216     *.[fF][09]? | *.for | *.java | *.obj | *.sx)
     2063    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
    12172064      func_xform "$libobj"
    12182065      libobj=$func_xform_result
     
    12892136    # not support -o with -c
    12902137    if test "$compiler_c_o" = no; then
    1291       output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
     2138      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
    12922139      lockfile="$output_obj.lock"
    12932140    else
     
    13202167        exit $EXIT_FAILURE
    13212168      fi
    1322       removelist="$removelist $output_obj"
     2169      func_append removelist " $output_obj"
    13232170      $ECHO "$srcfile" > "$lockfile"
    13242171    fi
    13252172
    13262173    $opt_dry_run || $RM $removelist
    1327     removelist="$removelist $lockfile"
     2174    func_append removelist " $lockfile"
    13282175    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
    13292176
    1330     if test -n "$fix_srcfile_path"; then
    1331       eval srcfile=\"$fix_srcfile_path\"
    1332     fi
     2177    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
     2178    srcfile=$func_to_tool_file_result
    13332179    func_quote_for_eval "$srcfile"
    13342180    qsrcfile=$func_quote_for_eval_result
     
    13502196      if test -z "$output_obj"; then
    13512197        # Place PIC objects in $objdir
    1352         command="$command -o $lobj"
     2198        func_append command " -o $lobj"
    13532199      fi
    13542200
     
    13972243      fi
    13982244      if test "$compiler_c_o" = yes; then
    1399         command="$command -o $obj"
     2245        func_append command " -o $obj"
    14002246      fi
    14012247
    14022248      # Suppress compiler output if we already did a PIC compilation.
    1403       command="$command$suppress_output"
     2249      func_append command "$suppress_output"
    14042250      func_show_eval_locale "$command" \
    14052251        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
     
    14462292
    14472293$opt_help || {
    1448 test "$mode" = compile && func_mode_compile ${1+"$@"}
     2294  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
    14492295}
    14502296
     
    14522298{
    14532299    # We need to display help for each of the modes.
    1454     case $mode in
     2300    case $opt_mode in
    14552301      "")
    14562302        # Generic help is extracted from the usage comments
     
    14832329  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
    14842330  -no-suppress      do not suppress compiler output for multiple passes
    1485   -prefer-pic       try to building PIC objects only
    1486   -prefer-non-pic   try to building non-PIC objects only
     2331  -prefer-pic       try to build PIC objects only
     2332  -prefer-non-pic   try to build non-PIC objects only
    14872333  -shared           do not build a \`.o' file suitable for static linking
    14882334  -static           only build a \`.o' file suitable for static linking
     2335  -Wc,FLAG          pass FLAG directly to the compiler
    14892336
    14902337COMPILE-COMMAND is a command to be used in creating a \`standard' object file
     
    15392386The following components of INSTALL-COMMAND are treated specially:
    15402387
    1541   -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
     2388  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
    15422389
    15432390The rest of the components are interpreted as arguments to that command (only
     
    15592406  -all-static       do not do any dynamic linking at all
    15602407  -avoid-version    do not add a version suffix if possible
     2408  -bindir BINDIR    specify path to binaries directory (for systems where
     2409                    libraries must be found in the PATH setting at runtime)
    15612410  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
    15622411  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
     
    15872436                    specify library version info [each variable defaults to 0]
    15882437  -weak LIBNAME     declare that the target provides the LIBNAME interface
     2438  -Wc,FLAG
     2439  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
     2440  -Wl,FLAG
     2441  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
     2442  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
    15892443
    15902444All other options (arguments beginning with \`-') are ignored.
     
    16202474
    16212475      *)
    1622         func_fatal_help "invalid operation mode \`$mode'"
     2476        func_fatal_help "invalid operation mode \`$opt_mode'"
    16232477        ;;
    16242478    esac
    16252479
    1626     $ECHO
     2480    echo
    16272481    $ECHO "Try \`$progname --help' for more information about other modes."
    1628 
    1629     exit $?
    1630 }
    1631 
    1632   # Now that we've collected a possible --mode arg, show help if necessary
    1633   $opt_help && func_mode_help
     2482}
     2483
     2484# Now that we've collected a possible --mode arg, show help if necessary
     2485if $opt_help; then
     2486  if test "$opt_help" = :; then
     2487    func_mode_help
     2488  else
     2489    {
     2490      func_help noexit
     2491      for opt_mode in compile link execute install finish uninstall clean; do
     2492        func_mode_help
     2493      done
     2494    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
     2495    {
     2496      func_help noexit
     2497      for opt_mode in compile link execute install finish uninstall clean; do
     2498        echo
     2499        func_mode_help
     2500      done
     2501    } |
     2502    sed '1d
     2503      /^When reporting/,/^Report/{
     2504        H
     2505        d
     2506      }
     2507      $x
     2508      /information about other modes/d
     2509      /more detailed .*MODE/d
     2510      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
     2511  fi
     2512  exit $?
     2513fi
    16342514
    16352515
     
    16442524
    16452525    # Handle -dlopen flags immediately.
    1646     for file in $execute_dlfiles; do
     2526    for file in $opt_dlopen; do
    16472527      test -f "$file" \
    16482528        || func_fatal_help "\`$file' is not a file"
     
    16512531      case $file in
    16522532      *.la)
     2533        func_resolve_sysroot "$file"
     2534        file=$func_resolve_sysroot_result
     2535
    16532536        # Check to see that this really is a libtool archive.
    16542537        func_lalib_unsafe_p "$file" \
     
    16722555
    16732556        if test -f "$dir/$objdir/$dlname"; then
    1674           dir="$dir/$objdir"
     2557          func_append dir "/$objdir"
    16752558        else
    16762559          if test ! -f "$dir/$dlname"; then
     
    17132596    do
    17142597      case $file in
    1715       -*) ;;
     2598      -* | *.la | *.lo ) ;;
    17162599      *)
    17172600        # Do a test to see if this is really a libtool program.
     
    17292612      esac
    17302613      # Quote arguments (to preserve shell metacharacters).
    1731       func_quote_for_eval "$file"
    1732       args="$args $func_quote_for_eval_result"
     2614      func_append_quoted args "$file"
    17332615    done
    17342616
     
    17552637      if test -n "$shlibpath_var"; then
    17562638        eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
    1757         $ECHO "export $shlibpath_var"
     2639        echo "export $shlibpath_var"
    17582640      fi
    17592641      $ECHO "$cmd$args"
     
    17622644}
    17632645
    1764 test "$mode" = execute && func_mode_execute ${1+"$@"}
     2646test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
    17652647
    17662648
     
    17692651{
    17702652    $opt_debug
    1771     libdirs="$nonopt"
     2653    libs=
     2654    libdirs=
    17722655    admincmds=
    17732656
     2657    for opt in "$nonopt" ${1+"$@"}
     2658    do
     2659      if test -d "$opt"; then
     2660        func_append libdirs " $opt"
     2661
     2662      elif test -f "$opt"; then
     2663        if func_lalib_unsafe_p "$opt"; then
     2664          func_append libs " $opt"
     2665        else
     2666          func_warning "\`$opt' is not a valid libtool archive"
     2667        fi
     2668
     2669      else
     2670        func_fatal_error "invalid argument \`$opt'"
     2671      fi
     2672    done
     2673
     2674    if test -n "$libs"; then
     2675      if test -n "$lt_sysroot"; then
     2676        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
     2677        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
     2678      else
     2679        sysroot_cmd=
     2680      fi
     2681
     2682      # Remove sysroot references
     2683      if $opt_dry_run; then
     2684        for lib in $libs; do
     2685          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
     2686        done
     2687      else
     2688        tmpdir=`func_mktempdir`
     2689        for lib in $libs; do
     2690          sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
     2691            > $tmpdir/tmp-la
     2692          mv -f $tmpdir/tmp-la $lib
     2693        done
     2694        ${RM}r "$tmpdir"
     2695      fi
     2696    fi
     2697
    17742698    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
    1775       for dir
    1776       do
    1777         libdirs="$libdirs $dir"
    1778       done
    1779 
    17802699      for libdir in $libdirs; do
    17812700        if test -n "$finish_cmds"; then
     
    17872706          # Do the single finish_eval.
    17882707          eval cmds=\"$finish_eval\"
    1789           $opt_dry_run || eval "$cmds" || admincmds="$admincmds
     2708          $opt_dry_run || eval "$cmds" || func_append admincmds "
    17902709       $cmds"
    17912710        fi
     
    17962715    $opt_silent && exit $EXIT_SUCCESS
    17972716
    1798     $ECHO "X----------------------------------------------------------------------" | $Xsed
    1799     $ECHO "Libraries have been installed in:"
    1800     for libdir in $libdirs; do
    1801       $ECHO "   $libdir"
    1802     done
    1803     $ECHO
    1804     $ECHO "If you ever happen to want to link against installed libraries"
    1805     $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
    1806     $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
    1807     $ECHO "flag during linking and do at least one of the following:"
    1808     if test -n "$shlibpath_var"; then
    1809       $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
    1810       $ECHO "     during execution"
     2717    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
     2718      echo "----------------------------------------------------------------------"
     2719      echo "Libraries have been installed in:"
     2720      for libdir in $libdirs; do
     2721        $ECHO "   $libdir"
     2722      done
     2723      echo
     2724      echo "If you ever happen to want to link against installed libraries"
     2725      echo "in a given directory, LIBDIR, you must either use libtool, and"
     2726      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
     2727      echo "flag during linking and do at least one of the following:"
     2728      if test -n "$shlibpath_var"; then
     2729        echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
     2730        echo "     during execution"
     2731      fi
     2732      if test -n "$runpath_var"; then
     2733        echo "   - add LIBDIR to the \`$runpath_var' environment variable"
     2734        echo "     during linking"
     2735      fi
     2736      if test -n "$hardcode_libdir_flag_spec"; then
     2737        libdir=LIBDIR
     2738        eval flag=\"$hardcode_libdir_flag_spec\"
     2739
     2740        $ECHO "   - use the \`$flag' linker flag"
     2741      fi
     2742      if test -n "$admincmds"; then
     2743        $ECHO "   - have your system administrator run these commands:$admincmds"
     2744      fi
     2745      if test -f /etc/ld.so.conf; then
     2746        echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
     2747      fi
     2748      echo
     2749
     2750      echo "See any operating system documentation about shared libraries for"
     2751      case $host in
     2752        solaris2.[6789]|solaris2.1[0-9])
     2753          echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
     2754          echo "pages."
     2755          ;;
     2756        *)
     2757          echo "more information, such as the ld(1) and ld.so(8) manual pages."
     2758          ;;
     2759      esac
     2760      echo "----------------------------------------------------------------------"
    18112761    fi
    1812     if test -n "$runpath_var"; then
    1813       $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
    1814       $ECHO "     during linking"
    1815     fi
    1816     if test -n "$hardcode_libdir_flag_spec"; then
    1817       libdir=LIBDIR
    1818       eval flag=\"$hardcode_libdir_flag_spec\"
    1819 
    1820       $ECHO "   - use the \`$flag' linker flag"
    1821     fi
    1822     if test -n "$admincmds"; then
    1823       $ECHO "   - have your system administrator run these commands:$admincmds"
    1824     fi
    1825     if test -f /etc/ld.so.conf; then
    1826       $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
    1827     fi
    1828     $ECHO
    1829 
    1830     $ECHO "See any operating system documentation about shared libraries for"
    1831     case $host in
    1832       solaris2.[6789]|solaris2.1[0-9])
    1833         $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
    1834         $ECHO "pages."
    1835         ;;
    1836       *)
    1837         $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
    1838         ;;
    1839     esac
    1840     $ECHO "X----------------------------------------------------------------------" | $Xsed
    18412762    exit $EXIT_SUCCESS
    18422763}
    18432764
    1844 test "$mode" = finish && func_mode_finish ${1+"$@"}
     2765test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
    18452766
    18462767
     
    18532774    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
    18542775       # Allow the use of GNU shtool's install command.
    1855        $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
     2776       case $nonopt in *shtool*) :;; *) false;; esac; then
    18562777      # Aesthetically quote it.
    18572778      func_quote_for_eval "$nonopt"
     
    18672788    # Aesthetically quote it.
    18682789    func_quote_for_eval "$arg"
    1869     install_prog="$install_prog$func_quote_for_eval_result"
     2790    func_append install_prog "$func_quote_for_eval_result"
     2791    install_shared_prog=$install_prog
     2792    case " $install_prog " in
     2793      *[\\\ /]cp\ *) install_cp=: ;;
     2794      *) install_cp=false ;;
     2795    esac
    18702796
    18712797    # We need to accept at least all the BSD install flags.
     
    18772803    isdir=no
    18782804    stripme=
     2805    no_mode=:
    18792806    for arg
    18802807    do
     2808      arg2=
    18812809      if test -n "$dest"; then
    1882         files="$files $dest"
     2810        func_append files " $dest"
    18832811        dest=$arg
    18842812        continue
     
    18882816      -d) isdir=yes ;;
    18892817      -f)
    1890         case " $install_prog " in
    1891         *[\\\ /]cp\ *) ;;
    1892         *) prev=$arg ;;
    1893         esac
     2818        if $install_cp; then :; else
     2819          prev=$arg
     2820        fi
    18942821        ;;
    18952822      -g | -m | -o)
     
    19052832        # If the previous option needed an argument, then skip it.
    19062833        if test -n "$prev"; then
     2834          if test "x$prev" = x-m && test -n "$install_override_mode"; then
     2835            arg2=$install_override_mode
     2836            no_mode=false
     2837          fi
    19072838          prev=
    19082839        else
     
    19152846      # Aesthetically quote the argument.
    19162847      func_quote_for_eval "$arg"
    1917       install_prog="$install_prog $func_quote_for_eval_result"
     2848      func_append install_prog " $func_quote_for_eval_result"
     2849      if test -n "$arg2"; then
     2850        func_quote_for_eval "$arg2"
     2851      fi
     2852      func_append install_shared_prog " $func_quote_for_eval_result"
    19182853    done
    19192854
     
    19232858    test -n "$prev" && \
    19242859      func_fatal_help "the \`$prev' option requires an argument"
     2860
     2861    if test -n "$install_override_mode" && $no_mode; then
     2862      if $install_cp; then :; else
     2863        func_quote_for_eval "$install_override_mode"
     2864        func_append install_shared_prog " -m $func_quote_for_eval_result"
     2865      fi
     2866    fi
    19252867
    19262868    if test -z "$files"; then
     
    19782920      *.$libext)
    19792921        # Do the static libraries later.
    1980         staticlibs="$staticlibs $file"
     2922        func_append staticlibs " $file"
    19812923        ;;
    19822924
    19832925      *.la)
     2926        func_resolve_sysroot "$file"
     2927        file=$func_resolve_sysroot_result
     2928
    19842929        # Check to see that this really is a libtool archive.
    19852930        func_lalib_unsafe_p "$file" \
     
    19952940          case "$current_libdirs " in
    19962941          *" $libdir "*) ;;
    1997           *) current_libdirs="$current_libdirs $libdir" ;;
     2942          *) func_append current_libdirs " $libdir" ;;
    19982943          esac
    19992944        else
     
    20012946          case "$future_libdirs " in
    20022947          *" $libdir "*) ;;
    2003           *) future_libdirs="$future_libdirs $libdir" ;;
     2948          *) func_append future_libdirs " $libdir" ;;
    20042949          esac
    20052950        fi
     
    20072952        func_dirname "$file" "/" ""
    20082953        dir="$func_dirname_result"
    2009         dir="$dir$objdir"
     2954        func_append dir "$objdir"
    20102955
    20112956        if test -n "$relink_command"; then
    20122957          # Determine the prefix the user has applied to our future dir.
    2013           inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
     2958          inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
    20142959
    20152960          # Don't allow the user to place us outside of our expected
     
    20242969          if test -n "$inst_prefix_dir"; then
    20252970            # Stick the inst_prefix_dir data into the link command.
    2026             relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
     2971            relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
    20272972          else
    2028             relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
     2973            relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
    20292974          fi
    20302975
     
    20442989
    20452990          # Install the shared library and build the symlinks.
    2046           func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
     2991          func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
    20472992              'exit $?'
    20482993          tstripme="$stripme"
     
    20843029
    20853030        # Maybe install the static library, too.
    2086         test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
     3031        test -n "$old_library" && func_append staticlibs " $dir/$old_library"
    20873032        ;;
    20883033
     
    21843129              func_source "$lib"
    21853130            fi
    2186             libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
     3131            libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
    21873132            if test -n "$libdir" && test ! -f "$libfile"; then
    21883133              func_warning "\`$lib' has not been installed in \`$libdir'"
     
    22033148                outputname="$tmpdir/$file"
    22043149                # Replace the output file specification.
    2205                 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
     3150                relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
    22063151
    22073152                $opt_silent || {
     
    22223167          else
    22233168            # Install the binary that we compiled earlier.
    2224             file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
     3169            file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
    22253170          fi
    22263171        fi
     
    22583203      # Set up the ranlib parameters.
    22593204      oldlib="$destdir/$name"
     3205      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
     3206      tool_oldlib=$func_to_tool_file_result
    22603207
    22613208      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
    22623209
    22633210      if test -n "$stripme" && test -n "$old_striplib"; then
    2264         func_show_eval "$old_striplib $oldlib" 'exit $?'
     3211        func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
    22653212      fi
    22663213
     
    22813228}
    22823229
    2283 test "$mode" = install && func_mode_install ${1+"$@"}
     3230test "$opt_mode" = install && func_mode_install ${1+"$@"}
    22843231
    22853232
     
    23243271#endif
    23253272
     3273#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
     3274#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
     3275#endif
     3276
     3277/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
     3278#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
     3279/* DATA imports from DLLs on WIN32 con't be const, because runtime
     3280   relocations are performed -- see ld's documentation on pseudo-relocs.  */
     3281# define LT_DLSYM_CONST
     3282#elif defined(__osf__)
     3283/* This system does not cope well with relocations in const data.  */
     3284# define LT_DLSYM_CONST
     3285#else
     3286# define LT_DLSYM_CONST const
     3287#endif
     3288
    23263289/* External symbol declarations for the compiler. */\
    23273290"
     
    23333296
    23343297          # Add our own program objects to the symbol list.
    2335           progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
     3298          progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
    23363299          for progfile in $progfiles; do
    2337             func_verbose "extracting global C symbols from \`$progfile'"
    2338             $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
     3300            func_to_tool_file "$progfile" func_convert_file_msys_to_w32
     3301            func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
     3302            $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
    23393303          done
    23403304
     
    23723336              eval '$MV "$nlist"T "$nlist"'
    23733337              case $host in
    2374                 *cygwin | *mingw* | *cegcc* )
     3338                *cygwin* | *mingw* | *cegcc* )
    23753339                  eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
    23763340                  eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
     
    23853349          func_basename "$dlprefile"
    23863350          name="$func_basename_result"
    2387           $opt_dry_run || {
    2388             eval '$ECHO ": $name " >> "$nlist"'
    2389             eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
    2390           }
     3351          case $host in
     3352            *cygwin* | *mingw* | *cegcc* )
     3353              # if an import library, we need to obtain dlname
     3354              if func_win32_import_lib_p "$dlprefile"; then
     3355                func_tr_sh "$dlprefile"
     3356                eval "curr_lafile=\$libfile_$func_tr_sh_result"
     3357                dlprefile_dlbasename=""
     3358                if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
     3359                  # Use subshell, to avoid clobbering current variable values
     3360                  dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
     3361                  if test -n "$dlprefile_dlname" ; then
     3362                    func_basename "$dlprefile_dlname"
     3363                    dlprefile_dlbasename="$func_basename_result"
     3364                  else
     3365                    # no lafile. user explicitly requested -dlpreopen <import library>.
     3366                    $sharedlib_from_linklib_cmd "$dlprefile"
     3367                    dlprefile_dlbasename=$sharedlib_from_linklib_result
     3368                  fi
     3369                fi
     3370                $opt_dry_run || {
     3371                  if test -n "$dlprefile_dlbasename" ; then
     3372                    eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
     3373                  else
     3374                    func_warning "Could not compute DLL name from $name"
     3375                    eval '$ECHO ": $name " >> "$nlist"'
     3376                  fi
     3377                  func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
     3378                  eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
     3379                    $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
     3380                }
     3381              else # not an import lib
     3382                $opt_dry_run || {
     3383                  eval '$ECHO ": $name " >> "$nlist"'
     3384                  func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
     3385                  eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
     3386                }
     3387              fi
     3388            ;;
     3389            *)
     3390              $opt_dry_run || {
     3391                eval '$ECHO ": $name " >> "$nlist"'
     3392                func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
     3393                eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
     3394              }
     3395            ;;
     3396          esac
    23913397        done
    23923398
     
    24163422            eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
    24173423          else
    2418             $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
     3424            echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
    24193425          fi
    24203426
    2421           $ECHO >> "$output_objdir/$my_dlsyms" "\
     3427          echo >> "$output_objdir/$my_dlsyms" "\
    24223428
    24233429/* The mapping between symbol names and symbols.  */
     
    24263432  void *address;
    24273433} lt_dlsymlist;
    2428 "
    2429           case $host in
    2430           *cygwin* | *mingw* | *cegcc* )
    2431             $ECHO >> "$output_objdir/$my_dlsyms" "\
    2432 /* DATA imports from DLLs on WIN32 con't be const, because
    2433    runtime relocations are performed -- see ld's documentation
    2434    on pseudo-relocs.  */"
    2435             lt_dlsym_const= ;;
    2436           *osf5*)
    2437             echo >> "$output_objdir/$my_dlsyms" "\
    2438 /* This system does not cope well with relocations in const data */"
    2439             lt_dlsym_const= ;;
    2440           *)
    2441             lt_dlsym_const=const ;;
    2442           esac
    2443 
    2444           $ECHO >> "$output_objdir/$my_dlsyms" "\
    2445 extern $lt_dlsym_const lt_dlsymlist
     3434extern LT_DLSYM_CONST lt_dlsymlist
    24463435lt_${my_prefix}_LTX_preloaded_symbols[];
    2447 $lt_dlsym_const lt_dlsymlist
     3436LT_DLSYM_CONST lt_dlsymlist
    24483437lt_${my_prefix}_LTX_preloaded_symbols[] =
    24493438{\
     
    24583447            ;;
    24593448          esac
    2460           $ECHO >> "$output_objdir/$my_dlsyms" "\
     3449          echo >> "$output_objdir/$my_dlsyms" "\
    24613450  {0, (void *) 0}
    24623451};
     
    24853474          # pic_flag when linking with -static.  The problem exists in
    24863475          # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
    2487           *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
     3476          *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
    24883477            pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
    24893478          *-*-hpux*)
     
    25013490          case $arg in
    25023491          -pie | -fpie | -fPIE) ;;
    2503           *) symtab_cflags="$symtab_cflags $arg" ;;
     3492          *) func_append symtab_cflags " $arg" ;;
    25043493          esac
    25053494        done
     
    25163505        *cygwin* | *mingw* | *cegcc* )
    25173506          if test -f "$output_objdir/$my_outputname.def"; then
    2518             compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
    2519             finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
     3507            compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
     3508            finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
    25203509          else
    2521             compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
    2522             finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
     3510            compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
     3511            finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
    25233512          fi
    25243513          ;;
    25253514        *)
    2526           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
    2527           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
     3515          compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
     3516          finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
    25283517          ;;
    25293518        esac
     
    25393528
    25403529      # Nullify the symbol file.
    2541       compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
    2542       finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
     3530      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
     3531      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
    25433532    fi
    25443533}
     
    25503539# Has to be a shell function in order to 'eat' the argument
    25513540# that is supplied when $file_magic_command is called.
     3541# Despite the name, also deal with 64 bit binaries.
    25523542func_win32_libid ()
    25533543{
     
    25603550    ;;
    25613551  *ar\ archive*) # could be an import, or static
     3552    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
    25623553    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
    2563        $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
    2564       win32_nmres=`eval $NM -f posix -A $1 |
     3554       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
     3555      func_to_tool_file "$1" func_convert_file_msys_to_w32
     3556      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
    25653557        $SED -n -e '
    25663558            1,100{
     
    25913583}
    25923584
     3585# func_cygming_dll_for_implib ARG
     3586#
     3587# Platform-specific function to extract the
     3588# name of the DLL associated with the specified
     3589# import library ARG.
     3590# Invoked by eval'ing the libtool variable
     3591#    $sharedlib_from_linklib_cmd
     3592# Result is available in the variable
     3593#    $sharedlib_from_linklib_result
     3594func_cygming_dll_for_implib ()
     3595{
     3596  $opt_debug
     3597  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
     3598}
     3599
     3600# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
     3601#
     3602# The is the core of a fallback implementation of a
     3603# platform-specific function to extract the name of the
     3604# DLL associated with the specified import library LIBNAME.
     3605#
     3606# SECTION_NAME is either .idata$6 or .idata$7, depending
     3607# on the platform and compiler that created the implib.
     3608#
     3609# Echos the name of the DLL associated with the
     3610# specified import library.
     3611func_cygming_dll_for_implib_fallback_core ()
     3612{
     3613  $opt_debug
     3614  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
     3615  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
     3616    $SED '/^Contents of section '"$match_literal"':/{
     3617      # Place marker at beginning of archive member dllname section
     3618      s/.*/====MARK====/
     3619      p
     3620      d
     3621    }
     3622    # These lines can sometimes be longer than 43 characters, but
     3623    # are always uninteresting
     3624    /:[  ]*file format pe[i]\{,1\}-/d
     3625    /^In archive [^:]*:/d
     3626    # Ensure marker is printed
     3627    /^====MARK====/p
     3628    # Remove all lines with less than 43 characters
     3629    /^.\{43\}/!d
     3630    # From remaining lines, remove first 43 characters
     3631    s/^.\{43\}//' |
     3632    $SED -n '
     3633      # Join marker and all lines until next marker into a single line
     3634      /^====MARK====/ b para
     3635      H
     3636      $ b para
     3637      b
     3638      :para
     3639      x
     3640      s/\n//g
     3641      # Remove the marker
     3642      s/^====MARK====//
     3643      # Remove trailing dots and whitespace
     3644      s/[\. \t]*$//
     3645      # Print
     3646      /./p' |
     3647    # we now have a list, one entry per line, of the stringified
     3648    # contents of the appropriate section of all members of the
     3649    # archive which possess that section. Heuristic: eliminate
     3650    # all those which have a first or second character that is
     3651    # a '.' (that is, objdump's representation of an unprintable
     3652    # character.) This should work for all archives with less than
     3653    # 0x302f exports -- but will fail for DLLs whose name actually
     3654    # begins with a literal '.' or a single character followed by
     3655    # a '.'.
     3656    #
     3657    # Of those that remain, print the first one.
     3658    $SED -e '/^\./d;/^.\./d;q'
     3659}
     3660
     3661# func_cygming_gnu_implib_p ARG
     3662# This predicate returns with zero status (TRUE) if
     3663# ARG is a GNU/binutils-style import library. Returns
     3664# with nonzero status (FALSE) otherwise.
     3665func_cygming_gnu_implib_p ()
     3666{
     3667  $opt_debug
     3668  func_to_tool_file "$1" func_convert_file_msys_to_w32
     3669  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
     3670  test -n "$func_cygming_gnu_implib_tmp"
     3671}
     3672
     3673# func_cygming_ms_implib_p ARG
     3674# This predicate returns with zero status (TRUE) if
     3675# ARG is an MS-style import library. Returns
     3676# with nonzero status (FALSE) otherwise.
     3677func_cygming_ms_implib_p ()
     3678{
     3679  $opt_debug
     3680  func_to_tool_file "$1" func_convert_file_msys_to_w32
     3681  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
     3682  test -n "$func_cygming_ms_implib_tmp"
     3683}
     3684
     3685# func_cygming_dll_for_implib_fallback ARG
     3686# Platform-specific function to extract the
     3687# name of the DLL associated with the specified
     3688# import library ARG.
     3689#
     3690# This fallback implementation is for use when $DLLTOOL
     3691# does not support the --identify-strict option.
     3692# Invoked by eval'ing the libtool variable
     3693#    $sharedlib_from_linklib_cmd
     3694# Result is available in the variable
     3695#    $sharedlib_from_linklib_result
     3696func_cygming_dll_for_implib_fallback ()
     3697{
     3698  $opt_debug
     3699  if func_cygming_gnu_implib_p "$1" ; then
     3700    # binutils import library
     3701    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
     3702  elif func_cygming_ms_implib_p "$1" ; then
     3703    # ms-generated import library
     3704    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
     3705  else
     3706    # unknown
     3707    sharedlib_from_linklib_result=""
     3708  fi
     3709}
    25933710
    25943711
     
    25993716    f_ex_an_ar_dir="$1"; shift
    26003717    f_ex_an_ar_oldlib="$1"
    2601     func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
     3718    if test "$lock_old_archive_extraction" = yes; then
     3719      lockfile=$f_ex_an_ar_oldlib.lock
     3720      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
     3721        func_echo "Waiting for $lockfile to be removed"
     3722        sleep 2
     3723      done
     3724    fi
     3725    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
     3726                   'stat=$?; rm -f "$lockfile"; exit $stat'
     3727    if test "$lock_old_archive_extraction" = yes; then
     3728      $opt_dry_run || rm -f "$lockfile"
     3729    fi
    26023730    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
    26033731     :
     
    26703798            darwin_files=
    26713799            for darwin_file in $darwin_filelist; do
    2672               darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
     3800              darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
    26733801              $LIPO -create -output "$darwin_file" $darwin_files
    26743802            done # $darwin_filelist
     
    26853813        ;;
    26863814      esac
    2687       my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
     3815      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
    26883816    done
    26893817
    26903818    func_extract_archives_result="$my_oldobjs"
    26913819}
    2692 
    2693 
    2694 
    2695 # func_emit_wrapper_part1 [arg=no]
    2696 #
    2697 # Emit the first part of a libtool wrapper script on stdout.
    2698 # For more information, see the description associated with
    2699 # func_emit_wrapper(), below.
    2700 func_emit_wrapper_part1 ()
    2701 {
    2702         func_emit_wrapper_part1_arg1=no
    2703         if test -n "$1" ; then
    2704           func_emit_wrapper_part1_arg1=$1
    2705         fi
    2706 
    2707         $ECHO "\
    2708 #! $SHELL
    2709 
    2710 # $output - temporary wrapper script for $objdir/$outputname
    2711 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
    2712 #
    2713 # The $output program cannot be directly executed until all the libtool
    2714 # libraries that it depends on are installed.
    2715 #
    2716 # This wrapper script should never be moved out of the build directory.
    2717 # If it is, it will not operate correctly.
    2718 
    2719 # Sed substitution that helps us do robust quoting.  It backslashifies
    2720 # metacharacters that are still active within double-quoted strings.
    2721 Xsed='${SED} -e 1s/^X//'
    2722 sed_quote_subst='$sed_quote_subst'
    2723 
    2724 # Be Bourne compatible
    2725 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
    2726   emulate sh
    2727   NULLCMD=:
    2728   # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
    2729   # is contrary to our usage.  Disable this feature.
    2730   alias -g '\${1+\"\$@\"}'='\"\$@\"'
    2731   setopt NO_GLOB_SUBST
    2732 else
    2733   case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
    2734 fi
    2735 BIN_SH=xpg4; export BIN_SH # for Tru64
    2736 DUALCASE=1; export DUALCASE # for MKS sh
    2737 
    2738 # The HP-UX ksh and POSIX shell print the target directory to stdout
    2739 # if CDPATH is set.
    2740 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    2741 
    2742 relink_command=\"$relink_command\"
    2743 
    2744 # This environment variable determines our operation mode.
    2745 if test \"\$libtool_install_magic\" = \"$magic\"; then
    2746   # install mode needs the following variables:
    2747   generated_by_libtool_version='$macro_version'
    2748   notinst_deplibs='$notinst_deplibs'
    2749 else
    2750   # When we are sourced in execute mode, \$file and \$ECHO are already set.
    2751   if test \"\$libtool_execute_magic\" != \"$magic\"; then
    2752     ECHO=\"$qecho\"
    2753     file=\"\$0\"
    2754     # Make sure echo works.
    2755     if test \"X\$1\" = X--no-reexec; then
    2756       # Discard the --no-reexec flag, and continue.
    2757       shift
    2758     elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
    2759       # Yippee, \$ECHO works!
    2760       :
    2761     else
    2762       # Restart under the correct shell, and then maybe \$ECHO will work.
    2763       exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
    2764     fi
    2765   fi\
    2766 "
    2767         $ECHO "\
    2768 
    2769   # Find the directory that this script lives in.
    2770   thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
    2771   test \"x\$thisdir\" = \"x\$file\" && thisdir=.
    2772 
    2773   # Follow symbolic links until we get to the real thisdir.
    2774   file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
    2775   while test -n \"\$file\"; do
    2776     destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
    2777 
    2778     # If there was a directory component, then change thisdir.
    2779     if test \"x\$destdir\" != \"x\$file\"; then
    2780       case \"\$destdir\" in
    2781       [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
    2782       *) thisdir=\"\$thisdir/\$destdir\" ;;
    2783       esac
    2784     fi
    2785 
    2786     file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
    2787     file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
    2788   done
    2789 "
    2790 }
    2791 # end: func_emit_wrapper_part1
    2792 
    2793 # func_emit_wrapper_part2 [arg=no]
    2794 #
    2795 # Emit the second part of a libtool wrapper script on stdout.
    2796 # For more information, see the description associated with
    2797 # func_emit_wrapper(), below.
    2798 func_emit_wrapper_part2 ()
    2799 {
    2800         func_emit_wrapper_part2_arg1=no
    2801         if test -n "$1" ; then
    2802           func_emit_wrapper_part2_arg1=$1
    2803         fi
    2804 
    2805         $ECHO "\
    2806 
    2807   # Usually 'no', except on cygwin/mingw when embedded into
    2808   # the cwrapper.
    2809   WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
    2810   if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
    2811     # special case for '.'
    2812     if test \"\$thisdir\" = \".\"; then
    2813       thisdir=\`pwd\`
    2814     fi
    2815     # remove .libs from thisdir
    2816     case \"\$thisdir\" in
    2817     *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
    2818     $objdir )   thisdir=. ;;
    2819     esac
    2820   fi
    2821 
    2822   # Try to get the absolute directory name.
    2823   absdir=\`cd \"\$thisdir\" && pwd\`
    2824   test -n \"\$absdir\" && thisdir=\"\$absdir\"
    2825 "
    2826 
    2827         if test "$fast_install" = yes; then
    2828           $ECHO "\
    2829   program=lt-'$outputname'$exeext
    2830   progdir=\"\$thisdir/$objdir\"
    2831 
    2832   if test ! -f \"\$progdir/\$program\" ||
    2833      { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
    2834        test \"X\$file\" != \"X\$progdir/\$program\"; }; then
    2835 
    2836     file=\"\$\$-\$program\"
    2837 
    2838     if test ! -d \"\$progdir\"; then
    2839       $MKDIR \"\$progdir\"
    2840     else
    2841       $RM \"\$progdir/\$file\"
    2842     fi"
    2843 
    2844           $ECHO "\
    2845 
    2846     # relink executable if necessary
    2847     if test -n \"\$relink_command\"; then
    2848       if relink_command_output=\`eval \$relink_command 2>&1\`; then :
    2849       else
    2850         $ECHO \"\$relink_command_output\" >&2
    2851         $RM \"\$progdir/\$file\"
    2852         exit 1
    2853       fi
    2854     fi
    2855 
    2856     $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
    2857     { $RM \"\$progdir/\$program\";
    2858       $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
    2859     $RM \"\$progdir/\$file\"
    2860   fi"
    2861         else
    2862           $ECHO "\
    2863   program='$outputname'
    2864   progdir=\"\$thisdir/$objdir\"
    2865 "
    2866         fi
    2867 
    2868         $ECHO "\
    2869 
    2870   if test -f \"\$progdir/\$program\"; then"
    2871 
    2872         # Export our shlibpath_var if we have one.
    2873         if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
    2874           $ECHO "\
    2875     # Add our own library path to $shlibpath_var
    2876     $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
    2877 
    2878     # Some systems cannot cope with colon-terminated $shlibpath_var
    2879     # The second colon is a workaround for a bug in BeOS R4 sed
    2880     $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
    2881 
    2882     export $shlibpath_var
    2883 "
    2884         fi
    2885 
    2886         # fixup the dll searchpath if we need to.
    2887         if test -n "$dllsearchpath"; then
    2888           $ECHO "\
    2889     # Add the dll search path components to the executable PATH
    2890     PATH=$dllsearchpath:\$PATH
    2891 "
    2892         fi
    2893 
    2894         $ECHO "\
    2895     if test \"\$libtool_execute_magic\" != \"$magic\"; then
    2896       # Run the actual program with our arguments.
    2897 "
    2898         case $host in
    2899         # Backslashes separate directories on plain windows
    2900         *-*-mingw | *-*-os2* | *-cegcc*)
    2901           $ECHO "\
    2902       exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
    2903 "
    2904           ;;
    2905 
    2906         *)
    2907           $ECHO "\
    2908       exec \"\$progdir/\$program\" \${1+\"\$@\"}
    2909 "
    2910           ;;
    2911         esac
    2912         $ECHO "\
    2913       \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
    2914       exit 1
    2915     fi
    2916   else
    2917     # The program doesn't exist.
    2918     \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
    2919     \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
    2920     $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
    2921     exit 1
    2922   fi
    2923 fi\
    2924 "
    2925 }
    2926 # end: func_emit_wrapper_part2
    29273820
    29283821
     
    29433836func_emit_wrapper ()
    29443837{
    2945         func_emit_wrapper_arg1=no
    2946         if test -n "$1" ; then
    2947           func_emit_wrapper_arg1=$1
    2948         fi
    2949 
    2950         # split this up so that func_emit_cwrapperexe_src
    2951         # can call each part independently.
    2952         func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
    2953         func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
    2954 }
    2955 
    2956 
    2957 # func_to_host_path arg
     3838        func_emit_wrapper_arg1=${1-no}
     3839
     3840        $ECHO "\
     3841#! $SHELL
     3842
     3843# $output - temporary wrapper script for $objdir/$outputname
     3844# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
    29583845#
    2959 # Convert paths to host format when used with build tools.
    2960 # Intended for use with "native" mingw (where libtool itself
    2961 # is running under the msys shell), or in the following cross-
    2962 # build environments:
    2963 #    $build          $host
    2964 #    mingw (msys)    mingw  [e.g. native]
    2965 #    cygwin          mingw
    2966 #    *nix + wine     mingw
    2967 # where wine is equipped with the `winepath' executable.
    2968 # In the native mingw case, the (msys) shell automatically
    2969 # converts paths for any non-msys applications it launches,
    2970 # but that facility isn't available from inside the cwrapper.
    2971 # Similar accommodations are necessary for $host mingw and
    2972 # $build cygwin.  Calling this function does no harm for other
    2973 # $host/$build combinations not listed above.
     3846# The $output program cannot be directly executed until all the libtool
     3847# libraries that it depends on are installed.
    29743848#
    2975 # ARG is the path (on $build) that should be converted to
    2976 # the proper representation for $host. The result is stored
    2977 # in $func_to_host_path_result.
    2978 func_to_host_path ()
    2979 {
    2980   func_to_host_path_result="$1"
    2981   if test -n "$1" ; then
    2982     case $host in
    2983       *mingw* )
    2984         lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
    2985         case $build in
    2986           *mingw* ) # actually, msys
    2987             # awkward: cmd appends spaces to result
    2988             lt_sed_strip_trailing_spaces="s/[ ]*\$//"
    2989             func_to_host_path_tmp1=`( cmd //c echo "$1" |\
    2990               $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
    2991             func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
    2992               $SED -e "$lt_sed_naive_backslashify"`
    2993             ;;
    2994           *cygwin* )
    2995             func_to_host_path_tmp1=`cygpath -w "$1"`
    2996             func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
    2997               $SED -e "$lt_sed_naive_backslashify"`
    2998             ;;
    2999           * )
    3000             # Unfortunately, winepath does not exit with a non-zero
    3001             # error code, so we are forced to check the contents of
    3002             # stdout. On the other hand, if the command is not
    3003             # found, the shell will set an exit code of 127 and print
    3004             # *an error message* to stdout. So we must check for both
    3005             # error code of zero AND non-empty stdout, which explains
    3006             # the odd construction:
    3007             func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
    3008             if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
    3009               func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
    3010                 $SED -e "$lt_sed_naive_backslashify"`
    3011             else
    3012               # Allow warning below.
    3013               func_to_host_path_result=""
    3014             fi
    3015             ;;
    3016         esac
    3017         if test -z "$func_to_host_path_result" ; then
    3018           func_error "Could not determine host path corresponding to"
    3019           func_error "  '$1'"
    3020           func_error "Continuing, but uninstalled executables may not work."
    3021           # Fallback:
    3022           func_to_host_path_result="$1"
    3023         fi
    3024         ;;
     3849# This wrapper script should never be moved out of the build directory.
     3850# If it is, it will not operate correctly.
     3851
     3852# Sed substitution that helps us do robust quoting.  It backslashifies
     3853# metacharacters that are still active within double-quoted strings.
     3854sed_quote_subst='$sed_quote_subst'
     3855
     3856# Be Bourne compatible
     3857if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
     3858  emulate sh
     3859  NULLCMD=:
     3860  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
     3861  # is contrary to our usage.  Disable this feature.
     3862  alias -g '\${1+\"\$@\"}'='\"\$@\"'
     3863  setopt NO_GLOB_SUBST
     3864else
     3865  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
     3866fi
     3867BIN_SH=xpg4; export BIN_SH # for Tru64
     3868DUALCASE=1; export DUALCASE # for MKS sh
     3869
     3870# The HP-UX ksh and POSIX shell print the target directory to stdout
     3871# if CDPATH is set.
     3872(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
     3873
     3874relink_command=\"$relink_command\"
     3875
     3876# This environment variable determines our operation mode.
     3877if test \"\$libtool_install_magic\" = \"$magic\"; then
     3878  # install mode needs the following variables:
     3879  generated_by_libtool_version='$macro_version'
     3880  notinst_deplibs='$notinst_deplibs'
     3881else
     3882  # When we are sourced in execute mode, \$file and \$ECHO are already set.
     3883  if test \"\$libtool_execute_magic\" != \"$magic\"; then
     3884    file=\"\$0\""
     3885
     3886    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
     3887    $ECHO "\
     3888
     3889# A function that is used when there is no print builtin or printf.
     3890func_fallback_echo ()
     3891{
     3892  eval 'cat <<_LTECHO_EOF
     3893\$1
     3894_LTECHO_EOF'
     3895}
     3896    ECHO=\"$qECHO\"
     3897  fi
     3898
     3899# Very basic option parsing. These options are (a) specific to
     3900# the libtool wrapper, (b) are identical between the wrapper
     3901# /script/ and the wrapper /executable/ which is used only on
     3902# windows platforms, and (c) all begin with the string "--lt-"
     3903# (application programs are unlikely to have options which match
     3904# this pattern).
     3905#
     3906# There are only two supported options: --lt-debug and
     3907# --lt-dump-script. There is, deliberately, no --lt-help.
     3908#
     3909# The first argument to this parsing function should be the
     3910# script's $0 value, followed by "$@".
     3911lt_option_debug=
     3912func_parse_lt_options ()
     3913{
     3914  lt_script_arg0=\$0
     3915  shift
     3916  for lt_opt
     3917  do
     3918    case \"\$lt_opt\" in
     3919    --lt-debug) lt_option_debug=1 ;;
     3920    --lt-dump-script)
     3921        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
     3922        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
     3923        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
     3924        cat \"\$lt_dump_D/\$lt_dump_F\"
     3925        exit 0
     3926      ;;
     3927    --lt-*)
     3928        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
     3929        exit 1
     3930      ;;
     3931    esac
     3932  done
     3933
     3934  # Print the debug banner immediately:
     3935  if test -n \"\$lt_option_debug\"; then
     3936    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
     3937  fi
     3938}
     3939
     3940# Used when --lt-debug. Prints its arguments to stdout
     3941# (redirection is the responsibility of the caller)
     3942func_lt_dump_args ()
     3943{
     3944  lt_dump_args_N=1;
     3945  for lt_arg
     3946  do
     3947    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
     3948    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
     3949  done
     3950}
     3951
     3952# Core function for launching the target application
     3953func_exec_program_core ()
     3954{
     3955"
     3956  case $host in
     3957  # Backslashes separate directories on plain windows
     3958  *-*-mingw | *-*-os2* | *-cegcc*)
     3959    $ECHO "\
     3960      if test -n \"\$lt_option_debug\"; then
     3961        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
     3962        func_lt_dump_args \${1+\"\$@\"} 1>&2
     3963      fi
     3964      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
     3965"
     3966    ;;
     3967
     3968  *)
     3969    $ECHO "\
     3970      if test -n \"\$lt_option_debug\"; then
     3971        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
     3972        func_lt_dump_args \${1+\"\$@\"} 1>&2
     3973      fi
     3974      exec \"\$progdir/\$program\" \${1+\"\$@\"}
     3975"
     3976    ;;
     3977  esac
     3978  $ECHO "\
     3979      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
     3980      exit 1
     3981}
     3982
     3983# A function to encapsulate launching the target application
     3984# Strips options in the --lt-* namespace from \$@ and
     3985# launches target application with the remaining arguments.
     3986func_exec_program ()
     3987{
     3988  case \" \$* \" in
     3989  *\\ --lt-*)
     3990    for lt_wr_arg
     3991    do
     3992      case \$lt_wr_arg in
     3993      --lt-*) ;;
     3994      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
     3995      esac
     3996      shift
     3997    done ;;
     3998  esac
     3999  func_exec_program_core \${1+\"\$@\"}
     4000}
     4001
     4002  # Parse options
     4003  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
     4004
     4005  # Find the directory that this script lives in.
     4006  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
     4007  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
     4008
     4009  # Follow symbolic links until we get to the real thisdir.
     4010  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
     4011  while test -n \"\$file\"; do
     4012    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
     4013
     4014    # If there was a directory component, then change thisdir.
     4015    if test \"x\$destdir\" != \"x\$file\"; then
     4016      case \"\$destdir\" in
     4017      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
     4018      *) thisdir=\"\$thisdir/\$destdir\" ;;
     4019      esac
     4020    fi
     4021
     4022    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
     4023    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
     4024  done
     4025
     4026  # Usually 'no', except on cygwin/mingw when embedded into
     4027  # the cwrapper.
     4028  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
     4029  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
     4030    # special case for '.'
     4031    if test \"\$thisdir\" = \".\"; then
     4032      thisdir=\`pwd\`
     4033    fi
     4034    # remove .libs from thisdir
     4035    case \"\$thisdir\" in
     4036    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
     4037    $objdir )   thisdir=. ;;
    30254038    esac
    30264039  fi
    3027 }
    3028 # end: func_to_host_path
    3029 
    3030 # func_to_host_pathlist arg
    3031 #
    3032 # Convert pathlists to host format when used with build tools.
    3033 # See func_to_host_path(), above. This function supports the
    3034 # following $build/$host combinations (but does no harm for
    3035 # combinations not listed here):
    3036 #    $build          $host
    3037 #    mingw (msys)    mingw  [e.g. native]
    3038 #    cygwin          mingw
    3039 #    *nix + wine     mingw
    3040 #
    3041 # Path separators are also converted from $build format to
    3042 # $host format. If ARG begins or ends with a path separator
    3043 # character, it is preserved (but converted to $host format)
    3044 # on output.
    3045 #
    3046 # ARG is a pathlist (on $build) that should be converted to
    3047 # the proper representation on $host. The result is stored
    3048 # in $func_to_host_pathlist_result.
    3049 func_to_host_pathlist ()
    3050 {
    3051   func_to_host_pathlist_result="$1"
    3052   if test -n "$1" ; then
    3053     case $host in
    3054       *mingw* )
    3055         lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
    3056         # Remove leading and trailing path separator characters from
    3057         # ARG. msys behavior is inconsistent here, cygpath turns them
    3058         # into '.;' and ';.', and winepath ignores them completely.
    3059         func_to_host_pathlist_tmp2="$1"
    3060         # Once set for this call, this variable should not be
    3061         # reassigned. It is used in tha fallback case.
    3062         func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
    3063           $SED -e 's|^:*||' -e 's|:*$||'`
    3064         case $build in
    3065           *mingw* ) # Actually, msys.
    3066             # Awkward: cmd appends spaces to result.
    3067             lt_sed_strip_trailing_spaces="s/[ ]*\$//"
    3068             func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
    3069               $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
    3070             func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
    3071               $SED -e "$lt_sed_naive_backslashify"`
    3072             ;;
    3073           *cygwin* )
    3074             func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
    3075             func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
    3076               $SED -e "$lt_sed_naive_backslashify"`
    3077             ;;
    3078           * )
    3079             # unfortunately, winepath doesn't convert pathlists
    3080             func_to_host_pathlist_result=""
    3081             func_to_host_pathlist_oldIFS=$IFS
    3082             IFS=:
    3083             for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
    3084               IFS=$func_to_host_pathlist_oldIFS
    3085               if test -n "$func_to_host_pathlist_f" ; then
    3086                 func_to_host_path "$func_to_host_pathlist_f"
    3087                 if test -n "$func_to_host_path_result" ; then
    3088                   if test -z "$func_to_host_pathlist_result" ; then
    3089                     func_to_host_pathlist_result="$func_to_host_path_result"
    3090                   else
    3091                     func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
    3092                   fi
    3093                 fi
    3094               fi
    3095               IFS=:
    3096             done
    3097             IFS=$func_to_host_pathlist_oldIFS
    3098             ;;
    3099         esac
    3100         if test -z "$func_to_host_pathlist_result" ; then
    3101           func_error "Could not determine the host path(s) corresponding to"
    3102           func_error "  '$1'"
    3103           func_error "Continuing, but uninstalled executables may not work."
    3104           # Fallback. This may break if $1 contains DOS-style drive
    3105           # specifications. The fix is not to complicate the expression
    3106           # below, but for the user to provide a working wine installation
    3107           # with winepath so that path translation in the cross-to-mingw
    3108           # case works properly.
    3109           lt_replace_pathsep_nix_to_dos="s|:|;|g"
    3110           func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
    3111             $SED -e "$lt_replace_pathsep_nix_to_dos"`
    3112         fi
    3113         # Now, add the leading and trailing path separators back
    3114         case "$1" in
    3115           :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
    3116             ;;
    3117         esac
    3118         case "$1" in
    3119           *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
    3120             ;;
    3121         esac
    3122         ;;
    3123     esac
     4040
     4041  # Try to get the absolute directory name.
     4042  absdir=\`cd \"\$thisdir\" && pwd\`
     4043  test -n \"\$absdir\" && thisdir=\"\$absdir\"
     4044"
     4045
     4046        if test "$fast_install" = yes; then
     4047          $ECHO "\
     4048  program=lt-'$outputname'$exeext
     4049  progdir=\"\$thisdir/$objdir\"
     4050
     4051  if test ! -f \"\$progdir/\$program\" ||
     4052     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
     4053       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
     4054
     4055    file=\"\$\$-\$program\"
     4056
     4057    if test ! -d \"\$progdir\"; then
     4058      $MKDIR \"\$progdir\"
     4059    else
     4060      $RM \"\$progdir/\$file\"
     4061    fi"
     4062
     4063          $ECHO "\
     4064
     4065    # relink executable if necessary
     4066    if test -n \"\$relink_command\"; then
     4067      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
     4068      else
     4069        $ECHO \"\$relink_command_output\" >&2
     4070        $RM \"\$progdir/\$file\"
     4071        exit 1
     4072      fi
     4073    fi
     4074
     4075    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
     4076    { $RM \"\$progdir/\$program\";
     4077      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
     4078    $RM \"\$progdir/\$file\"
     4079  fi"
     4080        else
     4081          $ECHO "\
     4082  program='$outputname'
     4083  progdir=\"\$thisdir/$objdir\"
     4084"
     4085        fi
     4086
     4087        $ECHO "\
     4088
     4089  if test -f \"\$progdir/\$program\"; then"
     4090
     4091        # fixup the dll searchpath if we need to.
     4092        #
     4093        # Fix the DLL searchpath if we need to.  Do this before prepending
     4094        # to shlibpath, because on Windows, both are PATH and uninstalled
     4095        # libraries must come first.
     4096        if test -n "$dllsearchpath"; then
     4097          $ECHO "\
     4098    # Add the dll search path components to the executable PATH
     4099    PATH=$dllsearchpath:\$PATH
     4100"
     4101        fi
     4102
     4103        # Export our shlibpath_var if we have one.
     4104        if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
     4105          $ECHO "\
     4106    # Add our own library path to $shlibpath_var
     4107    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
     4108
     4109    # Some systems cannot cope with colon-terminated $shlibpath_var
     4110    # The second colon is a workaround for a bug in BeOS R4 sed
     4111    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
     4112
     4113    export $shlibpath_var
     4114"
     4115        fi
     4116
     4117        $ECHO "\
     4118    if test \"\$libtool_execute_magic\" != \"$magic\"; then
     4119      # Run the actual program with our arguments.
     4120      func_exec_program \${1+\"\$@\"}
     4121    fi
     4122  else
     4123    # The program doesn't exist.
     4124    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
     4125    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
     4126    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
     4127    exit 1
    31244128  fi
    3125 }
    3126 # end: func_to_host_pathlist
     4129fi\
     4130"
     4131}
     4132
    31274133
    31284134# func_emit_cwrapperexe_src
     
    31424148   This wrapper executable should never be moved out of the build directory.
    31434149   If it is, it will not operate correctly.
    3144 
    3145    Currently, it simply execs the wrapper *script* "$SHELL $output",
    3146    but could eventually absorb all of the scripts functionality and
    3147    exec $objdir/$outputname directly.
    31484150*/
    31494151EOF
    31504152            cat <<"EOF"
     4153#ifdef _MSC_VER
     4154# define _CRT_SECURE_NO_DEPRECATE 1
     4155#endif
    31514156#include <stdio.h>
    31524157#include <stdlib.h>
     
    31554160# include <process.h>
    31564161# include <io.h>
    3157 # define setmode _setmode
    31584162#else
    31594163# include <unistd.h>
     
    31614165# ifdef __CYGWIN__
    31624166#  include <io.h>
    3163 #  define HAVE_SETENV
    3164 #  ifdef __STRICT_ANSI__
    3165 char *realpath (const char *, char *);
    3166 int putenv (char *);
    3167 int setenv (const char *, const char *, int);
    3168 #  endif
    31694167# endif
    31704168#endif
     
    31784176#include <sys/stat.h>
    31794177
     4178/* declarations of non-ANSI functions */
     4179#if defined(__MINGW32__)
     4180# ifdef __STRICT_ANSI__
     4181int _putenv (const char *);
     4182# endif
     4183#elif defined(__CYGWIN__)
     4184# ifdef __STRICT_ANSI__
     4185char *realpath (const char *, char *);
     4186int putenv (char *);
     4187int setenv (const char *, const char *, int);
     4188# endif
     4189/* #elif defined (other platforms) ... */
     4190#endif
     4191
     4192/* portability defines, excluding path handling macros */
     4193#if defined(_MSC_VER)
     4194# define setmode _setmode
     4195# define stat    _stat
     4196# define chmod   _chmod
     4197# define getcwd  _getcwd
     4198# define putenv  _putenv
     4199# define S_IXUSR _S_IEXEC
     4200# ifndef _INTPTR_T_DEFINED
     4201#  define _INTPTR_T_DEFINED
     4202#  define intptr_t int
     4203# endif
     4204#elif defined(__MINGW32__)
     4205# define setmode _setmode
     4206# define stat    _stat
     4207# define chmod   _chmod
     4208# define getcwd  _getcwd
     4209# define putenv  _putenv
     4210#elif defined(__CYGWIN__)
     4211# define HAVE_SETENV
     4212# define FOPEN_WB "wb"
     4213/* #elif defined (other platforms) ... */
     4214#endif
     4215
    31804216#if defined(PATH_MAX)
    31814217# define LT_PATHMAX PATH_MAX
     
    31934229#endif
    31944230
    3195 #ifdef _MSC_VER
    3196 # define S_IXUSR _S_IEXEC
    3197 # define stat _stat
    3198 # ifndef _INTPTR_T_DEFINED
    3199 #  define intptr_t int
    3200 # endif
    3201 #endif
    3202 
     4231/* path handling portability macros */
    32034232#ifndef DIR_SEPARATOR
    32044233# define DIR_SEPARATOR '/'
     
    32314260#endif /* PATH_SEPARATOR_2 */
    32324261
    3233 #ifdef __CYGWIN__
    3234 # define FOPEN_WB "wb"
    3235 #endif
    3236 
    32374262#ifndef FOPEN_WB
    32384263# define FOPEN_WB "w"
     
    32474272} while (0)
    32484273
    3249 #undef LTWRAPPER_DEBUGPRINTF
    3250 #if defined DEBUGWRAPPER
    3251 # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
    3252 static void
    3253 ltwrapper_debugprintf (const char *fmt, ...)
    3254 {
    3255     va_list args;
    3256     va_start (args, fmt);
    3257     (void) vfprintf (stderr, fmt, args);
    3258     va_end (args);
    3259 }
     4274#if defined(LT_DEBUGWRAPPER)
     4275static int lt_debug = 1;
    32604276#else
    3261 # define LTWRAPPER_DEBUGPRINTF(args)
     4277static int lt_debug = 0;
    32624278#endif
    32634279
    3264 const char *program_name = NULL;
     4280const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
    32654281
    32664282void *xmalloc (size_t num);
     
    32724288int check_executable (const char *path);
    32734289char *strendzap (char *str, const char *pat);
    3274 void lt_fatal (const char *message, ...);
     4290void lt_debugprintf (const char *file, int line, const char *fmt, ...);
     4291void lt_fatal (const char *file, int line, const char *message, ...);
     4292static const char *nonnull (const char *s);
     4293static const char *nonempty (const char *s);
    32754294void lt_setenv (const char *name, const char *value);
    32764295char *lt_extend_str (const char *orig_value, const char *add, int to_end);
    3277 void lt_opt_process_env_set (const char *arg);
    3278 void lt_opt_process_env_prepend (const char *arg);
    3279 void lt_opt_process_env_append (const char *arg);
    3280 int lt_split_name_value (const char *arg, char** name, char** value);
    32814296void lt_update_exe_path (const char *name, const char *value);
    32824297void lt_update_lib_path (const char *name, const char *value);
    3283 
    3284 static const char *script_text_part1 =
     4298char **prepare_spawn (char **argv);
     4299void lt_dump_script (FILE *f);
    32854300EOF
    32864301
    3287             func_emit_wrapper_part1 yes |
    3288                 $SED -e 's/\([\\"]\)/\\\1/g' \
    3289                      -e 's/^/  "/' -e 's/$/\\n"/'
    3290             echo ";"
    32914302            cat <<EOF
    3292 
    3293 static const char *script_text_part2 =
    3294 EOF
    3295             func_emit_wrapper_part2 yes |
    3296                 $SED -e 's/\([\\"]\)/\\\1/g' \
    3297                      -e 's/^/  "/' -e 's/$/\\n"/'
    3298             echo ";"
    3299 
    3300             cat <<EOF
    3301 const char * MAGIC_EXE = "$magic_exe";
     4303volatile const char * MAGIC_EXE = "$magic_exe";
    33024304const char * LIB_PATH_VARNAME = "$shlibpath_var";
    33034305EOF
    33044306
    33054307            if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
    3306               func_to_host_pathlist "$temp_rpath"
     4308              func_to_host_path "$temp_rpath"
    33074309              cat <<EOF
    3308 const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
     4310const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
    33094311EOF
    33104312            else
     
    33154317
    33164318            if test -n "$dllsearchpath"; then
    3317               func_to_host_pathlist "$dllsearchpath:"
     4319              func_to_host_path "$dllsearchpath:"
    33184320              cat <<EOF
    33194321const char * EXE_PATH_VARNAME = "PATH";
    3320 const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
     4322const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
    33214323EOF
    33224324            else
     
    33414343
    33424344#define LTWRAPPER_OPTION_PREFIX         "--lt-"
    3343 #define LTWRAPPER_OPTION_PREFIX_LENGTH  5
    3344 
    3345 static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
     4345
    33464346static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
    3347 
    33484347static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
    3349 
    3350 static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
    3351 static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
    3352   /* argument is putenv-style "foo=bar", value of foo is set to bar */
    3353 
    3354 static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
    3355 static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
    3356   /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
    3357 
    3358 static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
    3359 static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
    3360   /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
     4348static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
    33614349
    33624350int
     
    33754363
    33764364  program_name = (char *) xstrdup (base_name (argv[0]));
    3377   LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
    3378   LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
    3379 
    3380   /* very simple arg parsing; don't want to rely on getopt */
     4365  newargz = XMALLOC (char *, argc + 1);
     4366
     4367  /* very simple arg parsing; don't want to rely on getopt
     4368   * also, copy all non cwrapper options to newargz, except
     4369   * argz[0], which is handled differently
     4370   */
     4371  newargc=0;
    33814372  for (i = 1; i < argc; i++)
    33824373    {
     
    33924383
    33934384            cat <<"EOF"
    3394           printf ("%s", script_text_part1);
    3395           printf ("%s", script_text_part2);
     4385          lt_dump_script (stdout);
    33964386          return 0;
    33974387        }
     4388      if (strcmp (argv[i], debug_opt) == 0)
     4389        {
     4390          lt_debug = 1;
     4391          continue;
     4392        }
     4393      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
     4394        {
     4395          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
     4396             namespace, but it is not one of the ones we know about and
     4397             have already dealt with, above (inluding dump-script), then
     4398             report an error. Otherwise, targets might begin to believe
     4399             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
     4400             namespace. The first time any user complains about this, we'll
     4401             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
     4402             or a configure.ac-settable value.
     4403           */
     4404          lt_fatal (__FILE__, __LINE__,
     4405                    "unrecognized %s option: '%s'",
     4406                    ltwrapper_option_prefix, argv[i]);
     4407        }
     4408      /* otherwise ... */
     4409      newargz[++newargc] = xstrdup (argv[i]);
    33984410    }
    3399 
    3400   newargz = XMALLOC (char *, argc + 1);
     4411  newargz[++newargc] = NULL;
     4412
     4413EOF
     4414            cat <<EOF
     4415  /* The GNU banner must be the first non-error debug message */
     4416  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
     4417EOF
     4418            cat <<"EOF"
     4419  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
     4420  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
     4421
    34014422  tmp_pathspec = find_executable (argv[0]);
    34024423  if (tmp_pathspec == NULL)
    3403     lt_fatal ("Couldn't find %s", argv[0]);
    3404   LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
    3405                           tmp_pathspec));
     4424    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
     4425  lt_debugprintf (__FILE__, __LINE__,
     4426                  "(main) found exe (before symlink chase) at: %s\n",
     4427                  tmp_pathspec);
    34064428
    34074429  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
    3408   LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
    3409                           actual_cwrapper_path));
     4430  lt_debugprintf (__FILE__, __LINE__,
     4431                  "(main) found exe (after symlink chase) at: %s\n",
     4432                  actual_cwrapper_path);
    34104433  XFREE (tmp_pathspec);
    34114434
    3412   actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
     4435  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
    34134436  strendzap (actual_cwrapper_path, actual_cwrapper_name);
    34144437
     
    34284451  tmp_pathspec = 0;
    34294452
    3430   LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
    3431                           target_name));
     4453  lt_debugprintf (__FILE__, __LINE__,
     4454                  "(main) libtool target name: %s\n",
     4455                  target_name);
    34324456EOF
    34334457
     
    34794503  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
    34804504  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
     4505  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
     4506     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
     4507     because on Windows, both *_VARNAMEs are PATH but uninstalled
     4508     libraries must come first. */
     4509  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
    34814510  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
    3482   lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
    3483 
    3484   newargc=0;
    3485   for (i = 1; i < argc; i++)
    3486     {
    3487       if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
    3488         {
    3489           if (argv[i][env_set_opt_len] == '=')
    3490             {
    3491               const char *p = argv[i] + env_set_opt_len + 1;
    3492               lt_opt_process_env_set (p);
    3493             }
    3494           else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
    3495             {
    3496               lt_opt_process_env_set (argv[++i]); /* don't copy */
    3497             }
    3498           else
    3499             lt_fatal ("%s missing required argument", env_set_opt);
    3500           continue;
    3501         }
    3502       if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
    3503         {
    3504           if (argv[i][env_prepend_opt_len] == '=')
    3505             {
    3506               const char *p = argv[i] + env_prepend_opt_len + 1;
    3507               lt_opt_process_env_prepend (p);
    3508             }
    3509           else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
    3510             {
    3511               lt_opt_process_env_prepend (argv[++i]); /* don't copy */
    3512             }
    3513           else
    3514             lt_fatal ("%s missing required argument", env_prepend_opt);
    3515           continue;
    3516         }
    3517       if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
    3518         {
    3519           if (argv[i][env_append_opt_len] == '=')
    3520             {
    3521               const char *p = argv[i] + env_append_opt_len + 1;
    3522               lt_opt_process_env_append (p);
    3523             }
    3524           else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
    3525             {
    3526               lt_opt_process_env_append (argv[++i]); /* don't copy */
    3527             }
    3528           else
    3529             lt_fatal ("%s missing required argument", env_append_opt);
    3530           continue;
    3531         }
    3532       if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
    3533         {
    3534           /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
    3535              namespace, but it is not one of the ones we know about and
    3536              have already dealt with, above (inluding dump-script), then
    3537              report an error. Otherwise, targets might begin to believe
    3538              they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
    3539              namespace. The first time any user complains about this, we'll
    3540              need to make LTWRAPPER_OPTION_PREFIX a configure-time option
    3541              or a configure.ac-settable value.
    3542            */
    3543           lt_fatal ("Unrecognized option in %s namespace: '%s'",
    3544                     ltwrapper_option_prefix, argv[i]);
    3545         }
    3546       /* otherwise ... */
    3547       newargz[++newargc] = xstrdup (argv[i]);
    3548     }
    3549   newargz[++newargc] = NULL;
    3550 
    3551   LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
     4511
     4512  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
     4513                  nonnull (lt_argv_zero));
    35524514  for (i = 0; i < newargc; i++)
    35534515    {
    3554       LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
     4516      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
     4517                      i, nonnull (newargz[i]));
    35554518    }
    35564519
     
    35614524                cat <<"EOF"
    35624525  /* execv doesn't actually work on mingw as expected on unix */
     4526  newargz = prepare_spawn (newargz);
    35634527  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
    35644528  if (rval == -1)
    35654529    {
    35664530      /* failed to start process */
    3567       LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
     4531      lt_debugprintf (__FILE__, __LINE__,
     4532                      "(main) failed to launch target \"%s\": %s\n",
     4533                      lt_argv_zero, nonnull (strerror (errno)));
    35684534      return 127;
    35694535    }
     
    35874553  void *p = (void *) malloc (num);
    35884554  if (!p)
    3589     lt_fatal ("Memory exhausted");
     4555    lt_fatal (__FILE__, __LINE__, "memory exhausted");
    35904556
    35914557  return p;
     
    36214587  struct stat st;
    36224588
    3623   LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
    3624                           path ? (*path ? path : "EMPTY!") : "NULL!"));
     4589  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
     4590                  nonempty (path));
    36254591  if ((!path) || (!*path))
    36264592    return 0;
     
    36394605  struct stat st;
    36404606
    3641   LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
    3642                           path ? (*path ? path : "EMPTY!") : "NULL!"));
     4607  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
     4608                  nonempty (path));
    36434609  if ((!path) || (!*path))
    36444610    return 0;
     
    36664632  char *concat_name;
    36674633
    3668   LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
    3669                           wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
     4634  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
     4635                  nonempty (wrapper));
    36704636
    36714637  if ((wrapper == NULL) || (*wrapper == '\0'))
     
    37204686                  /* empty path: current directory */
    37214687                  if (getcwd (tmp, LT_PATHMAX) == NULL)
    3722                     lt_fatal ("getcwd failed");
     4688                    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
     4689                              nonnull (strerror (errno)));
    37234690                  tmp_len = strlen (tmp);
    37244691                  concat_name =
     
    37454712  /* Relative path | not found in path: prepend cwd */
    37464713  if (getcwd (tmp, LT_PATHMAX) == NULL)
    3747     lt_fatal ("getcwd failed");
     4714    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
     4715              nonnull (strerror (errno)));
    37484716  tmp_len = strlen (tmp);
    37494717  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
     
    37714739  while (strlen (tmp_pathspec) && !has_symlinks)
    37724740    {
    3773       LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
    3774                               tmp_pathspec));
     4741      lt_debugprintf (__FILE__, __LINE__,
     4742                      "checking path component for symlinks: %s\n",
     4743                      tmp_pathspec);
    37754744      if (lstat (tmp_pathspec, &s) == 0)
    37764745        {
     
    37944763      else
    37954764        {
    3796           char *errstr = strerror (errno);
    3797           lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
     4765          lt_fatal (__FILE__, __LINE__,
     4766                    "error accessing file \"%s\": %s",
     4767                    tmp_pathspec, nonnull (strerror (errno)));
    37984768        }
    37994769    }
     
    38084778  if (tmp_pathspec == 0)
    38094779    {
    3810       lt_fatal ("Could not follow symlinks for %s", pathspec);
     4780      lt_fatal (__FILE__, __LINE__,
     4781                "could not follow symlinks for %s", pathspec);
    38114782    }
    38124783  return xstrdup (tmp_pathspec);
     
    38344805}
    38354806
     4807void
     4808lt_debugprintf (const char *file, int line, const char *fmt, ...)
     4809{
     4810  va_list args;
     4811  if (lt_debug)
     4812    {
     4813      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
     4814      va_start (args, fmt);
     4815      (void) vfprintf (stderr, fmt, args);
     4816      va_end (args);
     4817    }
     4818}
     4819
    38364820static void
    3837 lt_error_core (int exit_status, const char *mode,
     4821lt_error_core (int exit_status, const char *file,
     4822               int line, const char *mode,
    38384823               const char *message, va_list ap)
    38394824{
    3840   fprintf (stderr, "%s: %s: ", program_name, mode);
     4825  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
    38414826  vfprintf (stderr, message, ap);
    38424827  fprintf (stderr, ".\n");
     
    38474832
    38484833void
    3849 lt_fatal (const char *message, ...)
     4834lt_fatal (const char *file, int line, const char *message, ...)
    38504835{
    38514836  va_list ap;
    38524837  va_start (ap, message);
    3853   lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
     4838  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
    38544839  va_end (ap);
     4840}
     4841
     4842static const char *
     4843nonnull (const char *s)
     4844{
     4845  return s ? s : "(null)";
     4846}
     4847
     4848static const char *
     4849nonempty (const char *s)
     4850{
     4851  return (s && !*s) ? "(empty)" : nonnull (s);
    38554852}
    38564853
     
    38584855lt_setenv (const char *name, const char *value)
    38594856{
    3860   LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
    3861                           (name ? name : "<NULL>"),
    3862                           (value ? value : "<NULL>")));
     4857  lt_debugprintf (__FILE__, __LINE__,
     4858                  "(lt_setenv) setting '%s' to '%s'\n",
     4859                  nonnull (name), nonnull (value));
    38634860  {
    38644861#ifdef HAVE_SETENV
     
    39054902}
    39064903
    3907 int
    3908 lt_split_name_value (const char *arg, char** name, char** value)
    3909 {
    3910   const char *p;
    3911   int len;
    3912   if (!arg || !*arg)
    3913     return 1;
    3914 
    3915   p = strchr (arg, (int)'=');
    3916 
    3917   if (!p)
    3918     return 1;
    3919 
    3920   *value = xstrdup (++p);
    3921 
    3922   len = strlen (arg) - strlen (*value);
    3923   *name = XMALLOC (char, len);
    3924   strncpy (*name, arg, len-1);
    3925   (*name)[len - 1] = '\0';
    3926 
    3927   return 0;
    3928 }
    3929 
    3930 void
    3931 lt_opt_process_env_set (const char *arg)
    3932 {
    3933   char *name = NULL;
    3934   char *value = NULL;
    3935 
    3936   if (lt_split_name_value (arg, &name, &value) != 0)
    3937     {
    3938       XFREE (name);
    3939       XFREE (value);
    3940       lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
    3941     }
    3942 
    3943   lt_setenv (name, value);
    3944   XFREE (name);
    3945   XFREE (value);
    3946 }
    3947 
    3948 void
    3949 lt_opt_process_env_prepend (const char *arg)
    3950 {
    3951   char *name = NULL;
    3952   char *value = NULL;
    3953   char *new_value = NULL;
    3954 
    3955   if (lt_split_name_value (arg, &name, &value) != 0)
    3956     {
    3957       XFREE (name);
    3958       XFREE (value);
    3959       lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
    3960     }
    3961 
    3962   new_value = lt_extend_str (getenv (name), value, 0);
    3963   lt_setenv (name, new_value);
    3964   XFREE (new_value);
    3965   XFREE (name);
    3966   XFREE (value);
    3967 }
    3968 
    3969 void
    3970 lt_opt_process_env_append (const char *arg)
    3971 {
    3972   char *name = NULL;
    3973   char *value = NULL;
    3974   char *new_value = NULL;
    3975 
    3976   if (lt_split_name_value (arg, &name, &value) != 0)
    3977     {
    3978       XFREE (name);
    3979       XFREE (value);
    3980       lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
    3981     }
    3982 
    3983   new_value = lt_extend_str (getenv (name), value, 1);
    3984   lt_setenv (name, new_value);
    3985   XFREE (new_value);
    3986   XFREE (name);
    3987   XFREE (value);
    3988 }
    3989 
    39904904void
    39914905lt_update_exe_path (const char *name, const char *value)
    39924906{
    3993   LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
    3994                           (name ? name : "<NULL>"),
    3995                           (value ? value : "<NULL>")));
     4907  lt_debugprintf (__FILE__, __LINE__,
     4908                  "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
     4909                  nonnull (name), nonnull (value));
    39964910
    39974911  if (name && *name && value && *value)
     
    40124926lt_update_lib_path (const char *name, const char *value)
    40134927{
    4014   LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
    4015                           (name ? name : "<NULL>"),
    4016                           (value ? value : "<NULL>")));
     4928  lt_debugprintf (__FILE__, __LINE__,
     4929                  "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
     4930                  nonnull (name), nonnull (value));
    40174931
    40184932  if (name && *name && value && *value)
     
    40244938}
    40254939
    4026 
    40274940EOF
     4941            case $host_os in
     4942              mingw*)
     4943                cat <<"EOF"
     4944
     4945/* Prepares an argument vector before calling spawn().
     4946   Note that spawn() does not by itself call the command interpreter
     4947     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
     4948      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
     4949         GetVersionEx(&v);
     4950         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
     4951      }) ? "cmd.exe" : "command.com").
     4952   Instead it simply concatenates the arguments, separated by ' ', and calls
     4953   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
     4954   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
     4955   special way:
     4956   - Space and tab are interpreted as delimiters. They are not treated as
     4957     delimiters if they are surrounded by double quotes: "...".
     4958   - Unescaped double quotes are removed from the input. Their only effect is
     4959     that within double quotes, space and tab are treated like normal
     4960     characters.
     4961   - Backslashes not followed by double quotes are not special.
     4962   - But 2*n+1 backslashes followed by a double quote become
     4963     n backslashes followed by a double quote (n >= 0):
     4964       \" -> "
     4965       \\\" -> \"
     4966       \\\\\" -> \\"
     4967 */
     4968#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
     4969#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
     4970char **
     4971prepare_spawn (char **argv)
     4972{
     4973  size_t argc;
     4974  char **new_argv;
     4975  size_t i;
     4976
     4977  /* Count number of arguments.  */
     4978  for (argc = 0; argv[argc] != NULL; argc++)
     4979    ;
     4980
     4981  /* Allocate new argument vector.  */
     4982  new_argv = XMALLOC (char *, argc + 1);
     4983
     4984  /* Put quoted arguments into the new argument vector.  */
     4985  for (i = 0; i < argc; i++)
     4986    {
     4987      const char *string = argv[i];
     4988
     4989      if (string[0] == '\0')
     4990        new_argv[i] = xstrdup ("\"\"");
     4991      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
     4992        {
     4993          int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
     4994          size_t length;
     4995          unsigned int backslashes;
     4996          const char *s;
     4997          char *quoted_string;
     4998          char *p;
     4999
     5000          length = 0;
     5001          backslashes = 0;
     5002          if (quote_around)
     5003            length++;
     5004          for (s = string; *s != '\0'; s++)
     5005            {
     5006              char c = *s;
     5007              if (c == '"')
     5008                length += backslashes + 1;
     5009              length++;
     5010              if (c == '\\')
     5011                backslashes++;
     5012              else
     5013                backslashes = 0;
     5014            }
     5015          if (quote_around)
     5016            length += backslashes + 1;
     5017
     5018          quoted_string = XMALLOC (char, length + 1);
     5019
     5020          p = quoted_string;
     5021          backslashes = 0;
     5022          if (quote_around)
     5023            *p++ = '"';
     5024          for (s = string; *s != '\0'; s++)
     5025            {
     5026              char c = *s;
     5027              if (c == '"')
     5028                {
     5029                  unsigned int j;
     5030                  for (j = backslashes + 1; j > 0; j--)
     5031                    *p++ = '\\';
     5032                }
     5033              *p++ = c;
     5034              if (c == '\\')
     5035                backslashes++;
     5036              else
     5037                backslashes = 0;
     5038            }
     5039          if (quote_around)
     5040            {
     5041              unsigned int j;
     5042              for (j = backslashes; j > 0; j--)
     5043                *p++ = '\\';
     5044              *p++ = '"';
     5045            }
     5046          *p = '\0';
     5047
     5048          new_argv[i] = quoted_string;
     5049        }
     5050      else
     5051        new_argv[i] = (char *) string;
     5052    }
     5053  new_argv[argc] = NULL;
     5054
     5055  return new_argv;
     5056}
     5057EOF
     5058                ;;
     5059            esac
     5060
     5061            cat <<"EOF"
     5062void lt_dump_script (FILE* f)
     5063{
     5064EOF
     5065            func_emit_wrapper yes |
     5066              $SED -n -e '
     5067s/^\(.\{79\}\)\(..*\)/\1\
     5068\2/
     5069h
     5070s/\([\\"]\)/\\\1/g
     5071s/$/\\n/
     5072s/\([^\n]*\).*/  fputs ("\1", f);/p
     5073g
     5074D'
     5075            cat <<"EOF"
     5076}
     5077EOF
    40285078}
    40295079# end: func_emit_cwrapperexe_src
     5080
     5081# func_win32_import_lib_p ARG
     5082# True if ARG is an import lib, as indicated by $file_magic_cmd
     5083func_win32_import_lib_p ()
     5084{
     5085    $opt_debug
     5086    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
     5087    *import*) : ;;
     5088    *) false ;;
     5089    esac
     5090}
    40305091
    40315092# func_mode_link arg...
     
    40735134
    40745135    avoid_version=no
     5136    bindir=
    40755137    dlfiles=
    40765138    dlprefiles=
     
    41655227
    41665228        case $prev in
     5229        bindir)
     5230          bindir="$arg"
     5231          prev=
     5232          continue
     5233          ;;
    41675234        dlfiles|dlprefiles)
    41685235          if test "$preload" = no; then
     
    41965263          *)
    41975264            if test "$prev" = dlfiles; then
    4198               dlfiles="$dlfiles $arg"
     5265              func_append dlfiles " $arg"
    41995266            else
    4200               dlprefiles="$dlprefiles $arg"
     5267              func_append dlprefiles " $arg"
    42015268            fi
    42025269            prev=
     
    42225289              case "$deplibs " in
    42235290                *" $qarg.ltframework "*) ;;
    4224                 *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
     5291                *) func_append deplibs " $qarg.ltframework" # this is fixed later
    42255292                   ;;
    42265293              esac
     
    42415308            for fil in `cat "$save_arg"`
    42425309            do
    4243 #             moreargs="$moreargs $fil"
     5310#             func_append moreargs " $fil"
    42445311              arg=$fil
    42455312              # A libtool-controlled object.
     
    42705337                  if test "$prev" = dlfiles; then
    42715338                    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
    4272                       dlfiles="$dlfiles $pic_object"
     5339                      func_append dlfiles " $pic_object"
    42735340                      prev=
    42745341                      continue
     
    42825349                  if test "$prev" = dlprefiles; then
    42835350                    # Preload the old-style object.
    4284                     dlprefiles="$dlprefiles $pic_object"
     5351                    func_append dlprefiles " $pic_object"
    42855352                    prev=
    42865353                  fi
     
    43525419            case "$rpath " in
    43535420            *" $arg "*) ;;
    4354             *) rpath="$rpath $arg" ;;
     5421            *) func_append rpath " $arg" ;;
    43555422            esac
    43565423          else
    43575424            case "$xrpath " in
    43585425            *" $arg "*) ;;
    4359             *) xrpath="$xrpath $arg" ;;
     5426            *) func_append xrpath " $arg" ;;
    43605427            esac
    43615428          fi
     
    43695436          ;;
    43705437        weak)
    4371           weak_libs="$weak_libs $arg"
     5438          func_append weak_libs " $arg"
    43725439          prev=
    43735440          continue
    43745441          ;;
    43755442        xcclinker)
    4376           linker_flags="$linker_flags $qarg"
    4377           compiler_flags="$compiler_flags $qarg"
     5443          func_append linker_flags " $qarg"
     5444          func_append compiler_flags " $qarg"
    43785445          prev=
    43795446          func_append compile_command " $qarg"
     
    43825449          ;;
    43835450        xcompiler)
    4384           compiler_flags="$compiler_flags $qarg"
     5451          func_append compiler_flags " $qarg"
    43855452          prev=
    43865453          func_append compile_command " $qarg"
     
    43895456          ;;
    43905457        xlinker)
    4391           linker_flags="$linker_flags $qarg"
    4392           compiler_flags="$compiler_flags $wl$qarg"
     5458          func_append linker_flags " $qarg"
     5459          func_append compiler_flags " $wl$qarg"
    43935460          prev=
    43945461          func_append compile_command " $wl$qarg"
     
    44265493        ;;
    44275494
     5495      -bindir)
     5496        prev=bindir
     5497        continue
     5498        ;;
     5499
    44285500      -dlopen)
    44295501        prev=dlfiles
     
    44765548
    44775549      -L*)
    4478         func_stripname '-L' '' "$arg"
    4479         dir=$func_stripname_result
    4480         if test -z "$dir"; then
     5550        func_stripname "-L" '' "$arg"
     5551        if test -z "$func_stripname_result"; then
    44815552          if test "$#" -gt 0; then
    44825553            func_fatal_error "require no space between \`-L' and \`$1'"
     
    44855556          fi
    44865557        fi
     5558        func_resolve_sysroot "$func_stripname_result"
     5559        dir=$func_resolve_sysroot_result
    44875560        # We need an absolute path.
    44885561        case $dir in
     
    44965569        esac
    44975570        case "$deplibs " in
    4498         *" -L$dir "*) ;;
     5571        *" -L$dir "* | *" $arg "*)
     5572          # Will only happen for absolute or sysroot arguments
     5573          ;;
    44995574        *)
    4500           deplibs="$deplibs -L$dir"
    4501           lib_search_path="$lib_search_path $dir"
     5575          # Preserve sysroot, but never include relative directories
     5576          case $dir in
     5577            [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
     5578            *) func_append deplibs " -L$dir" ;;
     5579          esac
     5580          func_append lib_search_path " $dir"
    45025581          ;;
    45035582        esac
    45045583        case $host in
    45055584        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
    4506           testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
     5585          testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
    45075586          case :$dllsearchpath: in
    45085587          *":$dir:"*) ;;
    45095588          ::) dllsearchpath=$dir;;
    4510           *) dllsearchpath="$dllsearchpath:$dir";;
     5589          *) func_append dllsearchpath ":$dir";;
    45115590          esac
    45125591          case :$dllsearchpath: in
    45135592          *":$testbindir:"*) ;;
    45145593          ::) dllsearchpath=$testbindir;;
    4515           *) dllsearchpath="$dllsearchpath:$testbindir";;
     5594          *) func_append dllsearchpath ":$testbindir";;
    45165595          esac
    45175596          ;;
     
    45235602        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
    45245603          case $host in
    4525           *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
     5604          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
    45265605            # These systems don't actually have a C or math library (as such)
    45275606            continue
     
    45375616          *-*-rhapsody* | *-*-darwin1.[012])
    45385617            # Rhapsody C and math libraries are in the System framework
    4539             deplibs="$deplibs System.ltframework"
     5618            func_append deplibs " System.ltframework"
    45405619            continue
    45415620            ;;
     
    45575636         esac
    45585637        fi
    4559         deplibs="$deplibs $arg"
     5638        func_append deplibs " $arg"
    45605639        continue
    45615640        ;;
     
    45695648      # classes, name mangling, and exception handling.
    45705649      # Darwin uses the -arch flag to determine output architecture.
    4571       -model|-arch|-isysroot)
    4572         compiler_flags="$compiler_flags $arg"
     5650      -model|-arch|-isysroot|--sysroot)
     5651        func_append compiler_flags " $arg"
    45735652        func_append compile_command " $arg"
    45745653        func_append finalize_command " $arg"
     
    45775656        ;;
    45785657
    4579       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
    4580         compiler_flags="$compiler_flags $arg"
     5658      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
     5659      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
     5660        func_append compiler_flags " $arg"
    45815661        func_append compile_command " $arg"
    45825662        func_append finalize_command " $arg"
    45835663        case "$new_inherited_linker_flags " in
    45845664            *" $arg "*) ;;
    4585             * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
     5665            * ) func_append new_inherited_linker_flags " $arg" ;;
    45865666        esac
    45875667        continue
     
    46505730        case $dir in
    46515731        [\\/]* | [A-Za-z]:[\\/]*) ;;
     5732        =*)
     5733          func_stripname '=' '' "$dir"
     5734          dir=$lt_sysroot$func_stripname_result
     5735          ;;
    46525736        *)
    46535737          func_fatal_error "only absolute run-paths are allowed"
     
    46565740        case "$xrpath " in
    46575741        *" $dir "*) ;;
    4658         *) xrpath="$xrpath $dir" ;;
     5742        *) func_append xrpath " $dir" ;;
    46595743        esac
    46605744        continue
     
    47095793          IFS="$save_ifs"
    47105794          func_quote_for_eval "$flag"
    4711           arg="$arg $wl$func_quote_for_eval_result"
    4712           compiler_flags="$compiler_flags $func_quote_for_eval_result"
     5795          func_append arg " $func_quote_for_eval_result"
     5796          func_append compiler_flags " $func_quote_for_eval_result"
    47135797        done
    47145798        IFS="$save_ifs"
     
    47255809          IFS="$save_ifs"
    47265810          func_quote_for_eval "$flag"
    4727           arg="$arg $wl$func_quote_for_eval_result"
    4728           compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
    4729           linker_flags="$linker_flags $func_quote_for_eval_result"
     5811          func_append arg " $wl$func_quote_for_eval_result"
     5812          func_append compiler_flags " $wl$func_quote_for_eval_result"
     5813          func_append linker_flags " $func_quote_for_eval_result"
    47305814        done
    47315815        IFS="$save_ifs"
     
    47555839        ;;
    47565840
    4757       # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
    4758       # -r[0-9][0-9]* specifies the processor on the SGI compiler
    4759       # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
    4760       # +DA*, +DD* enable 64-bit mode on the HP compiler
    4761       # -q* pass through compiler args for the IBM compiler
    4762       # -m*, -t[45]*, -txscale* pass through architecture-specific
    4763       # compiler args for GCC
    4764       # -F/path gives path to uninstalled frameworks, gcc on darwin
    4765       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
    4766       # @file GCC response files
     5841      # Flags to be passed through unchanged, with rationale:
     5842      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
     5843      # -r[0-9][0-9]*        specify processor for the SGI compiler
     5844      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
     5845      # +DA*, +DD*           enable 64-bit mode for the HP compiler
     5846      # -q*                  compiler args for the IBM compiler
     5847      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
     5848      # -F/path              path to uninstalled frameworks, gcc on darwin
     5849      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
     5850      # @file                GCC response files
     5851      # -tp=*                Portland pgcc target processor selection
     5852      # --sysroot=*          for sysroot support
     5853      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
    47675854      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
    4768       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
     5855      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
     5856      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
    47695857        func_quote_for_eval "$arg"
    47705858        arg="$func_quote_for_eval_result"
    47715859        func_append compile_command " $arg"
    47725860        func_append finalize_command " $arg"
    4773         compiler_flags="$compiler_flags $arg"
     5861        func_append compiler_flags " $arg"
    47745862        continue
    47755863        ;;
     
    47835871      *.$objext)
    47845872        # A standard object.
    4785         objs="$objs $arg"
     5873        func_append objs " $arg"
    47865874        ;;
    47875875
     
    48145902            if test "$prev" = dlfiles; then
    48155903              if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
    4816                 dlfiles="$dlfiles $pic_object"
     5904                func_append dlfiles " $pic_object"
    48175905                prev=
    48185906                continue
     
    48265914            if test "$prev" = dlprefiles; then
    48275915              # Preload the old-style object.
    4828               dlprefiles="$dlprefiles $pic_object"
     5916              func_append dlprefiles " $pic_object"
    48295917              prev=
    48305918            fi
     
    48715959      *.$libext)
    48725960        # An archive.
    4873         deplibs="$deplibs $arg"
    4874         old_deplibs="$old_deplibs $arg"
     5961        func_append deplibs " $arg"
     5962        func_append old_deplibs " $arg"
    48755963        continue
    48765964        ;;
     
    48795967        # A libtool-controlled library.
    48805968
     5969        func_resolve_sysroot "$arg"
    48815970        if test "$prev" = dlfiles; then
    48825971          # This library was specified with -dlopen.
    4883           dlfiles="$dlfiles $arg"
     5972          func_append dlfiles " $func_resolve_sysroot_result"
    48845973          prev=
    48855974        elif test "$prev" = dlprefiles; then
    48865975          # The library was specified with -dlpreopen.
    4887           dlprefiles="$dlprefiles $arg"
     5976          func_append dlprefiles " $func_resolve_sysroot_result"
    48885977          prev=
    48895978        else
    4890           deplibs="$deplibs $arg"
     5979          func_append deplibs " $func_resolve_sysroot_result"
    48915980        fi
    48925981        continue
     
    49266015    if test -n "$shlibpath_var"; then
    49276016      # get the directories listed in $shlibpath_var
    4928       eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
     6017      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
    49296018    else
    49306019      shlib_search_path=
     
    49356024    func_dirname "$output" "/" ""
    49366025    output_objdir="$func_dirname_result$objdir"
     6026    func_to_tool_file "$output_objdir/"
     6027    tool_output_objdir=$func_to_tool_file_result
    49376028    # Create the object directory.
    49386029    func_mkdir_p "$output_objdir"
     
    49556046    # that are linked more than once (e.g. -la -lb -la)
    49566047    for deplib in $deplibs; do
    4957       if $opt_duplicate_deps ; then
     6048      if $opt_preserve_dup_deps ; then
    49586049        case "$libs " in
    4959         *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
     6050        *" $deplib "*) func_append specialdeplibs " $deplib" ;;
    49606051        esac
    49616052      fi
    4962       libs="$libs $deplib"
     6053      func_append libs " $deplib"
    49636054    done
    49646055
     
    49736064        for pre_post_dep in $predeps $postdeps; do
    49746065          case "$pre_post_deps " in
    4975           *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
     6066          *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
    49766067          esac
    4977           pre_post_deps="$pre_post_deps $pre_post_dep"
     6068          func_append pre_post_deps " $pre_post_dep"
    49786069        done
    49796070      fi
     
    50426133          # Ignore non-libtool-libs
    50436134          dependency_libs=
     6135          func_resolve_sysroot "$lib"
    50446136          case $lib in
    5045           *.la) func_source "$lib" ;;
     6137          *.la) func_source "$func_resolve_sysroot_result" ;;
    50466138          esac
    50476139
     
    50496141          # has declared as weak libs
    50506142          for deplib in $dependency_libs; do
    5051             deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
     6143            func_basename "$deplib"
     6144            deplib_base=$func_basename_result
    50526145            case " $weak_libs " in
    50536146            *" $deplib_base "*) ;;
    5054             *) deplibs="$deplibs $deplib" ;;
     6147            *) func_append deplibs " $deplib" ;;
    50556148            esac
    50566149          done
     
    50686161        found=no
    50696162        case $deplib in
    5070         -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
     6163        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
     6164        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
    50716165          if test "$linkmode,$pass" = "prog,link"; then
    50726166            compile_deplibs="$deplib $compile_deplibs"
    50736167            finalize_deplibs="$deplib $finalize_deplibs"
    50746168          else
    5075             compiler_flags="$compiler_flags $deplib"
     6169            func_append compiler_flags " $deplib"
    50766170            if test "$linkmode" = lib ; then
    50776171                case "$new_inherited_linker_flags " in
    50786172                    *" $deplib "*) ;;
    5079                     * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
     6173                    * ) func_append new_inherited_linker_flags " $deplib" ;;
    50806174                esac
    50816175            fi
     
    51626256                case "$new_inherited_linker_flags " in
    51636257                    *" $deplib "*) ;;
    5164                     * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
     6258                    * ) func_append new_inherited_linker_flags " $deplib" ;;
    51656259                esac
    51666260            fi
     
    51756269            newdependency_libs="$deplib $newdependency_libs"
    51766270            func_stripname '-L' '' "$deplib"
    5177             newlib_search_path="$newlib_search_path $func_stripname_result"
     6271            func_resolve_sysroot "$func_stripname_result"
     6272            func_append newlib_search_path " $func_resolve_sysroot_result"
    51786273            ;;
    51796274          prog)
     
    51896284            fi
    51906285            func_stripname '-L' '' "$deplib"
    5191             newlib_search_path="$newlib_search_path $func_stripname_result"
     6286            func_resolve_sysroot "$func_stripname_result"
     6287            func_append newlib_search_path " $func_resolve_sysroot_result"
    51926288            ;;
    51936289          *)
     
    52006296          if test "$pass" = link; then
    52016297            func_stripname '-R' '' "$deplib"
    5202             dir=$func_stripname_result
     6298            func_resolve_sysroot "$func_stripname_result"
     6299            dir=$func_resolve_sysroot_result
    52036300            # Make sure the xrpath contains only unique directories.
    52046301            case "$xrpath " in
    52056302            *" $dir "*) ;;
    5206             *) xrpath="$xrpath $dir" ;;
     6303            *) func_append xrpath " $dir" ;;
    52076304            esac
    52086305          fi
     
    52106307          continue
    52116308          ;;
    5212         *.la) lib="$deplib" ;;
     6309        *.la)
     6310          func_resolve_sysroot "$deplib"
     6311          lib=$func_resolve_sysroot_result
     6312          ;;
    52136313        *.$libext)
    52146314          if test "$pass" = conv; then
     
    52286328                  set dummy $deplibs_check_method; shift
    52296329                  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
    5230                   if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
     6330                  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
    52316331                    | $EGREP "$match_pattern_regex" > /dev/null; then
    52326332                    valid_a_lib=yes
     
    52386338              esac
    52396339              if test "$valid_a_lib" != yes; then
    5240                 $ECHO
     6340                echo
    52416341                $ECHO "*** Warning: Trying to link with static lib archive $deplib."
    5242                 $ECHO "*** I have the capability to make that library automatically link in when"
    5243                 $ECHO "*** you link to this library.  But I can only do this if you have a"
    5244                 $ECHO "*** shared version of the library, which you do not appear to have"
    5245                 $ECHO "*** because the file extensions .$libext of this argument makes me believe"
    5246                 $ECHO "*** that it is just a static archive that I should not use here."
     6342                echo "*** I have the capability to make that library automatically link in when"
     6343                echo "*** you link to this library.  But I can only do this if you have a"
     6344                echo "*** shared version of the library, which you do not appear to have"
     6345                echo "*** because the file extensions .$libext of this argument makes me believe"
     6346                echo "*** that it is just a static archive that I should not use here."
    52476347              else
    5248                 $ECHO
     6348                echo
    52496349                $ECHO "*** Warning: Linking the shared library $output against the"
    52506350                $ECHO "*** static library $deplib is not portable!"
     
    52736373              # If there is no dlopen support or we're linking statically,
    52746374              # we need to preload.
    5275               newdlprefiles="$newdlprefiles $deplib"
     6375              func_append newdlprefiles " $deplib"
    52766376              compile_deplibs="$deplib $compile_deplibs"
    52776377              finalize_deplibs="$deplib $finalize_deplibs"
    52786378            else
    5279               newdlfiles="$newdlfiles $deplib"
     6379              func_append newdlfiles " $deplib"
    52806380            fi
    52816381          fi
     
    53196419        # Convert "-framework foo" to "foo.ltframework"
    53206420        if test -n "$inherited_linker_flags"; then
    5321           tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
     6421          tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
    53226422          for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
    53236423            case " $new_inherited_linker_flags " in
    53246424              *" $tmp_inherited_linker_flag "*) ;;
    5325               *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
     6425              *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
    53266426            esac
    53276427          done
    53286428        fi
    5329         dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
     6429        dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
    53306430        if test "$linkmode,$pass" = "lib,link" ||
    53316431           test "$linkmode,$pass" = "prog,scan" ||
    53326432           { test "$linkmode" != prog && test "$linkmode" != lib; }; then
    5333           test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
    5334           test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
     6433          test -n "$dlopen" && func_append dlfiles " $dlopen"
     6434          test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
    53356435        fi
    53366436
     
    53436443            fi
    53446444            # It is a libtool convenience library, so add in its objects.
    5345             convenience="$convenience $ladir/$objdir/$old_library"
    5346             old_convenience="$old_convenience $ladir/$objdir/$old_library"
     6445            func_append convenience " $ladir/$objdir/$old_library"
     6446            func_append old_convenience " $ladir/$objdir/$old_library"
    53476447          elif test "$linkmode" != prog && test "$linkmode" != lib; then
    53486448            func_fatal_error "\`$lib' is not a convenience library"
     
    53516451          for deplib in $dependency_libs; do
    53526452            deplibs="$deplib $deplibs"
    5353             if $opt_duplicate_deps ; then
     6453            if $opt_preserve_dup_deps ; then
    53546454              case "$tmp_libs " in
    5355               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
     6455              *" $deplib "*) func_append specialdeplibs " $deplib" ;;
    53566456              esac
    53576457            fi
    5358             tmp_libs="$tmp_libs $deplib"
     6458            func_append tmp_libs " $deplib"
    53596459          done
    53606460          continue
     
    53646464        # Get the name of the library we link against.
    53656465        linklib=
    5366         for l in $old_library $library_names; do
    5367           linklib="$l"
    5368         done
     6466        if test -n "$old_library" &&
     6467           { test "$prefer_static_libs" = yes ||
     6468             test "$prefer_static_libs,$installed" = "built,no"; }; then
     6469          linklib=$old_library
     6470        else
     6471          for l in $old_library $library_names; do
     6472            linklib="$l"
     6473          done
     6474        fi
    53696475        if test -z "$linklib"; then
    53706476          func_fatal_error "cannot find name of link library for \`$lib'"
     
    53836489            # dependent libraries so libltdl's deplib preloader doesn't
    53846490            # bomb out in the load deplibs phase.
    5385             dlprefiles="$dlprefiles $lib $dependency_libs"
     6491            func_append dlprefiles " $lib $dependency_libs"
    53866492          else
    5387             newdlfiles="$newdlfiles $lib"
     6493            func_append newdlfiles " $lib"
    53886494          fi
    53896495          continue
     
    54076513        # Find the relevant object directory and library name.
    54086514        if test "X$installed" = Xyes; then
    5409           if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
     6515          if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
    54106516            func_warning "library \`$lib' was moved."
    54116517            dir="$ladir"
     
    54136519            libdir="$abs_ladir"
    54146520          else
    5415             dir="$libdir"
    5416             absdir="$libdir"
     6521            dir="$lt_sysroot$libdir"
     6522            absdir="$lt_sysroot$libdir"
    54176523          fi
    54186524          test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
     
    54226528            absdir="$abs_ladir"
    54236529            # Remove this search path later
    5424             notinst_path="$notinst_path $abs_ladir"
     6530            func_append notinst_path " $abs_ladir"
    54256531          else
    54266532            dir="$ladir/$objdir"
    54276533            absdir="$abs_ladir/$objdir"
    54286534            # Remove this search path later
    5429             notinst_path="$notinst_path $abs_ladir"
     6535            func_append notinst_path " $abs_ladir"
    54306536          fi
    54316537        fi # $installed = yes
     
    54386544            func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
    54396545          fi
    5440           # Prefer using a static library (so that no silly _DYNAMIC symbols
    5441           # are required to link).
    5442           if test -n "$old_library"; then
    5443             newdlprefiles="$newdlprefiles $dir/$old_library"
    5444             # Keep a list of preopened convenience libraries to check
    5445             # that they are being used correctly in the link pass.
    5446             test -z "$libdir" && \
    5447                 dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
    5448           # Otherwise, use the dlname, so that lt_dlopen finds it.
    5449           elif test -n "$dlname"; then
    5450             newdlprefiles="$newdlprefiles $dir/$dlname"
    5451           else
    5452             newdlprefiles="$newdlprefiles $dir/$linklib"
    5453           fi
     6546          case "$host" in
     6547            # special handling for platforms with PE-DLLs.
     6548            *cygwin* | *mingw* | *cegcc* )
     6549              # Linker will automatically link against shared library if both
     6550              # static and shared are present.  Therefore, ensure we extract
     6551              # symbols from the import library if a shared library is present
     6552              # (otherwise, the dlopen module name will be incorrect).  We do
     6553              # this by putting the import library name into $newdlprefiles.
     6554              # We recover the dlopen module name by 'saving' the la file
     6555              # name in a special purpose variable, and (later) extracting the
     6556              # dlname from the la file.
     6557              if test -n "$dlname"; then
     6558                func_tr_sh "$dir/$linklib"
     6559                eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
     6560                func_append newdlprefiles " $dir/$linklib"
     6561              else
     6562                func_append newdlprefiles " $dir/$old_library"
     6563                # Keep a list of preopened convenience libraries to check
     6564                # that they are being used correctly in the link pass.
     6565                test -z "$libdir" && \
     6566                  func_append dlpreconveniencelibs " $dir/$old_library"
     6567              fi
     6568            ;;
     6569            * )
     6570              # Prefer using a static library (so that no silly _DYNAMIC symbols
     6571              # are required to link).
     6572              if test -n "$old_library"; then
     6573                func_append newdlprefiles " $dir/$old_library"
     6574                # Keep a list of preopened convenience libraries to check
     6575                # that they are being used correctly in the link pass.
     6576                test -z "$libdir" && \
     6577                  func_append dlpreconveniencelibs " $dir/$old_library"
     6578              # Otherwise, use the dlname, so that lt_dlopen finds it.
     6579              elif test -n "$dlname"; then
     6580                func_append newdlprefiles " $dir/$dlname"
     6581              else
     6582                func_append newdlprefiles " $dir/$linklib"
     6583              fi
     6584            ;;
     6585          esac
    54546586        fi # $pass = dlpreopen
    54556587
     
    54696601
    54706602        if test "$linkmode" = prog && test "$pass" != link; then
    5471           newlib_search_path="$newlib_search_path $ladir"
     6603          func_append newlib_search_path " $ladir"
    54726604          deplibs="$lib $deplibs"
    54736605
     
    54826614            case $deplib in
    54836615            -L*) func_stripname '-L' '' "$deplib"
    5484                  newlib_search_path="$newlib_search_path $func_stripname_result"
     6616                 func_resolve_sysroot "$func_stripname_result"
     6617                 func_append newlib_search_path " $func_resolve_sysroot_result"
    54856618                 ;;
    54866619            esac
     
    54936626              newdependency_libs="$deplib $newdependency_libs"
    54946627            fi
    5495             if $opt_duplicate_deps ; then
     6628            if $opt_preserve_dup_deps ; then
    54966629              case "$tmp_libs " in
    5497               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
     6630              *" $deplib "*) func_append specialdeplibs " $deplib" ;;
    54986631              esac
    54996632            fi
    5500             tmp_libs="$tmp_libs $deplib"
     6633            func_append tmp_libs " $deplib"
    55016634          done # for deplib
    55026635          continue
     
    55136646              case "$temp_rpath:" in
    55146647              *"$absdir:"*) ;;
    5515               *) temp_rpath="$temp_rpath$absdir:" ;;
     6648              *) func_append temp_rpath "$absdir:" ;;
    55166649              esac
    55176650            fi
     
    55256658              case "$compile_rpath " in
    55266659              *" $absdir "*) ;;
    5527               *) compile_rpath="$compile_rpath $absdir"
     6660              *) func_append compile_rpath " $absdir" ;;
    55286661              esac
    55296662              ;;
     
    55346667              case "$finalize_rpath " in
    55356668              *" $libdir "*) ;;
    5536               *) finalize_rpath="$finalize_rpath $libdir"
     6669              *) func_append finalize_rpath " $libdir" ;;
    55376670              esac
    55386671              ;;
     
    55596692          *cygwin* | *mingw* | *cegcc*)
    55606693              # No point in relinking DLLs because paths are not encoded
    5561               notinst_deplibs="$notinst_deplibs $lib"
     6694              func_append notinst_deplibs " $lib"
    55626695              need_relink=no
    55636696            ;;
    55646697          *)
    55656698            if test "$installed" = no; then
    5566               notinst_deplibs="$notinst_deplibs $lib"
     6699              func_append notinst_deplibs " $lib"
    55676700              need_relink=yes
    55686701            fi
     
    55816714          done
    55826715          if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
    5583             $ECHO
     6716            echo
    55846717            if test "$linkmode" = prog; then
    55856718              $ECHO "*** Warning: Linking the executable $output against the loadable module"
     
    55996732              case "$compile_rpath " in
    56006733              *" $absdir "*) ;;
    5601               *) compile_rpath="$compile_rpath $absdir"
     6734              *) func_append compile_rpath " $absdir" ;;
    56026735              esac
    56036736              ;;
     
    56086741              case "$finalize_rpath " in
    56096742              *" $libdir "*) ;;
    5610               *) finalize_rpath="$finalize_rpath $libdir"
     6743              *) func_append finalize_rpath " $libdir" ;;
    56116744              esac
    56126745              ;;
     
    56626795          fi # test -n "$old_archive_from_expsyms_cmds"
    56636796
    5664           if test "$linkmode" = prog || test "$mode" != relink; then
     6797          if test "$linkmode" = prog || test "$opt_mode" != relink; then
    56656798            add_shlibpath=
    56666799            add_dir=
     
    56846817                        $ECHO "*** Warning: lib $linklib is a module, not a shared library"
    56856818                        if test -z "$old_library" ; then
    5686                           $ECHO
    5687                           $ECHO "*** And there doesn't seem to be a static archive available"
    5688                           $ECHO "*** The link will probably fail, sorry"
     6819                          echo
     6820                          echo "*** And there doesn't seem to be a static archive available"
     6821                          echo "*** The link will probably fail, sorry"
    56896822                        else
    56906823                          add="$dir/$old_library"
     
    57136846                add="$dir/$linklib"
    57146847              elif test "$hardcode_minus_L" = yes; then
    5715                 add_dir="-L$dir"
     6848                add_dir="-L$absdir"
    57166849                # Try looking first in the location we're being installed to.
    57176850                if test -n "$inst_prefix_dir"; then
    57186851                  case $libdir in
    57196852                    [\\/]*)
    5720                       add_dir="$add_dir -L$inst_prefix_dir$libdir"
     6853                      func_append add_dir " -L$inst_prefix_dir$libdir"
    57216854                      ;;
    57226855                  esac
     
    57406873              case :$compile_shlibpath: in
    57416874              *":$add_shlibpath:"*) ;;
    5742               *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
     6875              *) func_append compile_shlibpath "$add_shlibpath:" ;;
    57436876              esac
    57446877            fi
     
    57546887                case :$finalize_shlibpath: in
    57556888                *":$libdir:"*) ;;
    5756                 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
     6889                *) func_append finalize_shlibpath "$libdir:" ;;
    57576890                esac
    57586891              fi
     
    57606893          fi
    57616894
    5762           if test "$linkmode" = prog || test "$mode" = relink; then
     6895          if test "$linkmode" = prog || test "$opt_mode" = relink; then
    57636896            add_shlibpath=
    57646897            add_dir=
     
    57746907              case :$finalize_shlibpath: in
    57756908              *":$libdir:"*) ;;
    5776               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
     6909              *) func_append finalize_shlibpath "$libdir:" ;;
    57776910              esac
    57786911              add="-l$name"
     
    57916924                case $libdir in
    57926925                  [\\/]*)
    5793                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
     6926                    func_append add_dir " -L$inst_prefix_dir$libdir"
    57946927                    ;;
    57956928                esac
     
    58266959            # Just print a warning and add the library to dependency_libs so
    58276960            # that the program can be linked against the static library.
    5828             $ECHO
     6961            echo
    58296962            $ECHO "*** Warning: This system can not link to static lib archive $lib."
    5830             $ECHO "*** I have the capability to make that library automatically link in when"
    5831             $ECHO "*** you link to this library.  But I can only do this if you have a"
    5832             $ECHO "*** shared version of the library, which you do not appear to have."
     6963            echo "*** I have the capability to make that library automatically link in when"
     6964            echo "*** you link to this library.  But I can only do this if you have a"
     6965            echo "*** shared version of the library, which you do not appear to have."
    58336966            if test "$module" = yes; then
    5834               $ECHO "*** But as you try to build a module library, libtool will still create "
    5835               $ECHO "*** a static module, that should work as long as the dlopening application"
    5836               $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
     6967              echo "*** But as you try to build a module library, libtool will still create "
     6968              echo "*** a static module, that should work as long as the dlopening application"
     6969              echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
    58376970              if test -z "$global_symbol_pipe"; then
    5838                 $ECHO
    5839                 $ECHO "*** However, this would only work if libtool was able to extract symbol"
    5840                 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
    5841                 $ECHO "*** not find such a program.  So, this module is probably useless."
    5842                 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
     6971                echo
     6972                echo "*** However, this would only work if libtool was able to extract symbol"
     6973                echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
     6974                echo "*** not find such a program.  So, this module is probably useless."
     6975                echo "*** \`nm' from GNU binutils and a full rebuild may help."
    58436976              fi
    58446977              if test "$build_old_libs" = no; then
     
    58687001                   case " $xrpath " in
    58697002                   *" $temp_xrpath "*) ;;
    5870                    *) xrpath="$xrpath $temp_xrpath";;
     7003                   *) func_append xrpath " $temp_xrpath";;
    58717004                   esac;;
    5872               *) temp_deplibs="$temp_deplibs $libdir";;
     7005              *) func_append temp_deplibs " $libdir";;
    58737006              esac
    58747007            done
     
    58767009          fi
    58777010
    5878           newlib_search_path="$newlib_search_path $absdir"
     7011          func_append newlib_search_path " $absdir"
    58797012          # Link against this library
    58807013          test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
     
    58837016          for deplib in $dependency_libs; do
    58847017            newdependency_libs="$deplib $newdependency_libs"
    5885             if $opt_duplicate_deps ; then
     7018            case $deplib in
     7019              -L*) func_stripname '-L' '' "$deplib"
     7020                   func_resolve_sysroot "$func_stripname_result";;
     7021              *) func_resolve_sysroot "$deplib" ;;
     7022            esac
     7023            if $opt_preserve_dup_deps ; then
    58867024              case "$tmp_libs " in
    5887               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
     7025              *" $func_resolve_sysroot_result "*)
     7026                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
    58887027              esac
    58897028            fi
    5890             tmp_libs="$tmp_libs $deplib"
     7029            func_append tmp_libs " $func_resolve_sysroot_result"
    58917030          done
    58927031
     
    58947033            # Add the search paths of all dependency libraries
    58957034            for deplib in $dependency_libs; do
     7035              path=
    58967036              case $deplib in
    58977037              -L*) path="$deplib" ;;
    58987038              *.la)
     7039                func_resolve_sysroot "$deplib"
     7040                deplib=$func_resolve_sysroot_result
    58997041                func_dirname "$deplib" "" "."
    5900                 dir="$func_dirname_result"
     7042                dir=$func_dirname_result
    59017043                # We need an absolute path.
    59027044                case $dir in
     
    59257067                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
    59267068                      fi
    5927                       compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
    5928                       linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
     7069                      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
     7070                      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
    59297071                      path=
    59307072                    fi
     
    59597101          finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
    59607102        else
    5961           compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
     7103          compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
    59627104        fi
    59637105      fi
     
    59767118            case "$lib_search_path " in
    59777119            *" $dir "*) ;;
    5978             *) lib_search_path="$lib_search_path $dir" ;;
     7120            *) func_append lib_search_path " $dir" ;;
    59797121            esac
    59807122          done
     
    60347176              case " $tmp_libs " in
    60357177              *" $deplib "*) ;;
    6036               *) tmp_libs="$tmp_libs $deplib" ;;
     7178              *) func_append tmp_libs " $deplib" ;;
    60377179              esac
    60387180              ;;
    6039             *) tmp_libs="$tmp_libs $deplib" ;;
     7181            *) func_append tmp_libs " $deplib" ;;
    60407182            esac
    60417183          done
     
    60537195        esac
    60547196        if test -n "$i" ; then
    6055           tmp_libs="$tmp_libs $i"
     7197          func_append tmp_libs " $i"
    60567198        fi
    60577199      done
     
    60947236      build_libtool_libs=no
    60957237      oldlibs="$output"
    6096       objs="$objs$old_deplibs"
     7238      func_append objs "$old_deplibs"
    60977239      ;;
    60987240
     
    61277269          func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
    61287270        else
    6129           $ECHO
     7271          echo
    61307272          $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
    61317273          $ECHO "*** objects $objs is not portable!"
    6132           libobjs="$libobjs $objs"
     7274          func_append libobjs " $objs"
    61337275        fi
    61347276      fi
     
    61897331          #
    61907332          case $version_type in
     7333          # correct linux to gnu/linux during the next big refactor
    61917334          darwin|linux|osf|windows|none)
    61927335            func_arith $number_major + $number_minor
     
    61957338            revision="$number_revision"
    61967339            ;;
    6197           freebsd-aout|freebsd-elf|sunos)
     7340          freebsd-aout|freebsd-elf|qnx|sunos)
    61987341            current="$number_major"
    61997342            revision="$number_minor"
     
    63057448          ;;
    63067449
    6307         linux)
     7450        linux) # correct to gnu/linux during the next big refactor
    63087451          func_arith $current - $age
    63097452          major=.$func_arith_result
     
    63287471
    63297472          # Make executables depend on our current version.
    6330           verstring="$verstring:${current}.0"
     7473          func_append verstring ":${current}.0"
    63317474          ;;
    63327475
     
    63967539
    63977540      func_generate_dlsyms "$libname" "$libname" "yes"
    6398       libobjs="$libobjs $symfileobj"
     7541      func_append libobjs " $symfileobj"
    63997542      test "X$libobjs" = "X " && libobjs=
    64007543
    6401       if test "$mode" != relink; then
     7544      if test "$opt_mode" != relink; then
    64027545        # Remove our outputs, but don't remove object files since they
    64037546        # may have been created when compiling PIC objects.
     
    64157558                 fi
    64167559               fi
    6417                removelist="$removelist $p"
     7560               func_append removelist " $p"
    64187561               ;;
    64197562            *) ;;
     
    64267569      # Now set the variables for building old libraries.
    64277570      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
    6428         oldlibs="$oldlibs $output_objdir/$libname.$libext"
     7571        func_append oldlibs " $output_objdir/$libname.$libext"
    64297572
    64307573        # Transform .lo files to .o files.
    6431         oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
     7574        oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
    64327575      fi
    64337576
    64347577      # Eliminate all temporary directories.
    64357578      #for path in $notinst_path; do
    6436       # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
    6437       # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
    6438       # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
     7579      # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
     7580      # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
     7581      # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
    64397582      #done
    64407583
     
    64437586        temp_xrpath=
    64447587        for libdir in $xrpath; do
    6445           temp_xrpath="$temp_xrpath -R$libdir"
     7588          func_replace_sysroot "$libdir"
     7589          func_append temp_xrpath " -R$func_replace_sysroot_result"
    64467590          case "$finalize_rpath " in
    64477591          *" $libdir "*) ;;
    6448           *) finalize_rpath="$finalize_rpath $libdir" ;;
     7592          *) func_append finalize_rpath " $libdir" ;;
    64497593          esac
    64507594        done
     
    64607604        case " $dlprefiles $dlfiles " in
    64617605        *" $lib "*) ;;
    6462         *) dlfiles="$dlfiles $lib" ;;
     7606        *) func_append dlfiles " $lib" ;;
    64637607        esac
    64647608      done
     
    64707614        case "$dlprefiles " in
    64717615        *" $lib "*) ;;
    6472         *) dlprefiles="$dlprefiles $lib" ;;
     7616        *) func_append dlprefiles " $lib" ;;
    64737617        esac
    64747618      done
     
    64777621        if test -n "$rpath"; then
    64787622          case $host in
    6479           *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
     7623          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
    64807624            # these systems don't actually have a c library (as such)!
    64817625            ;;
    64827626          *-*-rhapsody* | *-*-darwin1.[012])
    64837627            # Rhapsody C library is in the System framework
    6484             deplibs="$deplibs System.ltframework"
     7628            func_append deplibs " System.ltframework"
    64857629            ;;
    64867630          *-*-netbsd*)
     
    64997643            # Add libc to deplibs on all other systems if necessary.
    65007644            if test "$build_libtool_need_lc" = "yes"; then
    6501               deplibs="$deplibs -lc"
     7645              func_append deplibs " -lc"
    65027646            fi
    65037647            ;;
     
    65487692                  case " $predeps $postdeps " in
    65497693                  *" $i "*)
    6550                     newdeplibs="$newdeplibs $i"
     7694                    func_append newdeplibs " $i"
    65517695                    i=""
    65527696                    ;;
     
    65597703                  deplib_match=$1
    65607704                  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
    6561                     newdeplibs="$newdeplibs $i"
     7705                    func_append newdeplibs " $i"
    65627706                  else
    65637707                    droppeddeps=yes
    6564                     $ECHO
     7708                    echo
    65657709                    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
    6566                     $ECHO "*** I have the capability to make that library automatically link in when"
    6567                     $ECHO "*** you link to this library.  But I can only do this if you have a"
    6568                     $ECHO "*** shared version of the library, which I believe you do not have"
    6569                     $ECHO "*** because a test_compile did reveal that the linker did not use it for"
    6570                     $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
     7710                    echo "*** I have the capability to make that library automatically link in when"
     7711                    echo "*** you link to this library.  But I can only do this if you have a"
     7712                    echo "*** shared version of the library, which I believe you do not have"
     7713                    echo "*** because a test_compile did reveal that the linker did not use it for"
     7714                    echo "*** its dynamic dependency list that programs get resolved with at runtime."
    65717715                  fi
    65727716                fi
    65737717                ;;
    65747718              *)
    6575                 newdeplibs="$newdeplibs $i"
     7719                func_append newdeplibs " $i"
    65767720                ;;
    65777721              esac
     
    65917735                    case " $predeps $postdeps " in
    65927736                    *" $i "*)
    6593                       newdeplibs="$newdeplibs $i"
     7737                      func_append newdeplibs " $i"
    65947738                      i=""
    65957739                      ;;
     
    66027746                    deplib_match=$1
    66037747                    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
    6604                       newdeplibs="$newdeplibs $i"
     7748                      func_append newdeplibs " $i"
    66057749                    else
    66067750                      droppeddeps=yes
    6607                       $ECHO
     7751                      echo
    66087752                      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
    6609                       $ECHO "*** I have the capability to make that library automatically link in when"
    6610                       $ECHO "*** you link to this library.  But I can only do this if you have a"
    6611                       $ECHO "*** shared version of the library, which you do not appear to have"
    6612                       $ECHO "*** because a test_compile did reveal that the linker did not use this one"
    6613                       $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
     7753                      echo "*** I have the capability to make that library automatically link in when"
     7754                      echo "*** you link to this library.  But I can only do this if you have a"
     7755                      echo "*** shared version of the library, which you do not appear to have"
     7756                      echo "*** because a test_compile did reveal that the linker did not use this one"
     7757                      echo "*** as a dynamic dependency that programs can get resolved with at runtime."
    66147758                    fi
    66157759                  fi
    66167760                else
    66177761                  droppeddeps=yes
    6618                   $ECHO
     7762                  echo
    66197763                  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
    6620                   $ECHO "*** make it link in!  You will probably need to install it or some"
    6621                   $ECHO "*** library that it depends on before this library will be fully"
    6622                   $ECHO "*** functional.  Installing it before continuing would be even better."
     7764                  echo "*** make it link in!  You will probably need to install it or some"
     7765                  echo "*** library that it depends on before this library will be fully"
     7766                  echo "*** functional.  Installing it before continuing would be even better."
    66237767                fi
    66247768                ;;
    66257769              *)
    6626                 newdeplibs="$newdeplibs $i"
     7770                func_append newdeplibs " $i"
    66277771                ;;
    66287772              esac
     
    66417785                case " $predeps $postdeps " in
    66427786                *" $a_deplib "*)
    6643                   newdeplibs="$newdeplibs $a_deplib"
     7787                  func_append newdeplibs " $a_deplib"
    66447788                  a_deplib=""
    66457789                  ;;
     
    66487792              if test -n "$a_deplib" ; then
    66497793                libname=`eval "\\$ECHO \"$libname_spec\""`
     7794                if test -n "$file_magic_glob"; then
     7795                  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
     7796                else
     7797                  libnameglob=$libname
     7798                fi
     7799                test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
    66507800                for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
    6651                   potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
     7801                  if test "$want_nocaseglob" = yes; then
     7802                    shopt -s nocaseglob
     7803                    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
     7804                    $nocaseglob
     7805                  else
     7806                    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
     7807                  fi
    66527808                  for potent_lib in $potential_libs; do
    66537809                      # Follow soft links.
     
    66667822                        case $potliblink in
    66677823                        [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
    6668                         *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
     7824                        *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
    66697825                        esac
    66707826                      done
     
    66727828                         $SED -e 10q |
    66737829                         $EGREP "$file_magic_regex" > /dev/null; then
    6674                         newdeplibs="$newdeplibs $a_deplib"
     7830                        func_append newdeplibs " $a_deplib"
    66757831                        a_deplib=""
    66767832                        break 2
     
    66817837              if test -n "$a_deplib" ; then
    66827838                droppeddeps=yes
    6683                 $ECHO
     7839                echo
    66847840                $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
    6685                 $ECHO "*** I have the capability to make that library automatically link in when"
    6686                 $ECHO "*** you link to this library.  But I can only do this if you have a"
    6687                 $ECHO "*** shared version of the library, which you do not appear to have"
    6688                 $ECHO "*** because I did check the linker path looking for a file starting"
     7841                echo "*** I have the capability to make that library automatically link in when"
     7842                echo "*** you link to this library.  But I can only do this if you have a"
     7843                echo "*** shared version of the library, which you do not appear to have"
     7844                echo "*** because I did check the linker path looking for a file starting"
    66897845                if test -z "$potlib" ; then
    66907846                  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
     
    66977853            *)
    66987854              # Add a -L argument.
    6699               newdeplibs="$newdeplibs $a_deplib"
     7855              func_append newdeplibs " $a_deplib"
    67007856              ;;
    67017857            esac
     
    67137869                case " $predeps $postdeps " in
    67147870                *" $a_deplib "*)
    6715                   newdeplibs="$newdeplibs $a_deplib"
     7871                  func_append newdeplibs " $a_deplib"
    67167872                  a_deplib=""
    67177873                  ;;
     
    67247880                  for potent_lib in $potential_libs; do
    67257881                    potlib="$potent_lib" # see symlink-check above in file_magic test
    6726                     if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
     7882                    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
    67277883                       $EGREP "$match_pattern_regex" > /dev/null; then
    6728                       newdeplibs="$newdeplibs $a_deplib"
     7884                      func_append newdeplibs " $a_deplib"
    67297885                      a_deplib=""
    67307886                      break 2
     
    67357891              if test -n "$a_deplib" ; then
    67367892                droppeddeps=yes
    6737                 $ECHO
     7893                echo
    67387894                $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
    6739                 $ECHO "*** I have the capability to make that library automatically link in when"
    6740                 $ECHO "*** you link to this library.  But I can only do this if you have a"
    6741                 $ECHO "*** shared version of the library, which you do not appear to have"
    6742                 $ECHO "*** because I did check the linker path looking for a file starting"
     7895                echo "*** I have the capability to make that library automatically link in when"
     7896                echo "*** you link to this library.  But I can only do this if you have a"
     7897                echo "*** shared version of the library, which you do not appear to have"
     7898                echo "*** because I did check the linker path looking for a file starting"
    67437899                if test -z "$potlib" ; then
    67447900                  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
     
    67517907            *)
    67527908              # Add a -L argument.
    6753               newdeplibs="$newdeplibs $a_deplib"
     7909              func_append newdeplibs " $a_deplib"
    67547910              ;;
    67557911            esac
     
    67587914        none | unknown | *)
    67597915          newdeplibs=""
    6760           tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
    6761               -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
     7916          tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
    67627917          if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
    67637918            for i in $predeps $postdeps ; do
    67647919              # can't use Xsed below, because $i might contain '/'
    6765               tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
     7920              tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
    67667921            done
    67677922          fi
    6768           if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[      ]//g' |
    6769              $GREP . >/dev/null; then
    6770             $ECHO
     7923          case $tmp_deplibs in
     7924          *[!\  \ ]*)
     7925            echo
    67717926            if test "X$deplibs_check_method" = "Xnone"; then
    6772               $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
     7927              echo "*** Warning: inter-library dependencies are not supported in this platform."
    67737928            else
    6774               $ECHO "*** Warning: inter-library dependencies are not known to be supported."
     7929              echo "*** Warning: inter-library dependencies are not known to be supported."
    67757930            fi
    6776             $ECHO "*** All declared inter-library dependencies are being dropped."
     7931            echo "*** All declared inter-library dependencies are being dropped."
    67777932            droppeddeps=yes
    6778           fi
     7933            ;;
     7934          esac
    67797935          ;;
    67807936        esac
     
    67887944        *-*-rhapsody* | *-*-darwin1.[012])
    67897945          # On Rhapsody replace the C library with the System framework
    6790           newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
     7946          newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
    67917947          ;;
    67927948        esac
     
    67947950        if test "$droppeddeps" = yes; then
    67957951          if test "$module" = yes; then
    6796             $ECHO
    6797             $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
     7952            echo
     7953            echo "*** Warning: libtool could not satisfy all declared inter-library"
    67987954            $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
    6799             $ECHO "*** a static module, that should work as long as the dlopening"
    6800             $ECHO "*** application is linked with the -dlopen flag."
     7955            echo "*** a static module, that should work as long as the dlopening"
     7956            echo "*** application is linked with the -dlopen flag."
    68017957            if test -z "$global_symbol_pipe"; then
    6802               $ECHO
    6803               $ECHO "*** However, this would only work if libtool was able to extract symbol"
    6804               $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
    6805               $ECHO "*** not find such a program.  So, this module is probably useless."
    6806               $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
     7958              echo
     7959              echo "*** However, this would only work if libtool was able to extract symbol"
     7960              echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
     7961              echo "*** not find such a program.  So, this module is probably useless."
     7962              echo "*** \`nm' from GNU binutils and a full rebuild may help."
    68077963            fi
    68087964            if test "$build_old_libs" = no; then
     
    68147970            fi
    68157971          else
    6816             $ECHO "*** The inter-library dependencies that have been dropped here will be"
    6817             $ECHO "*** automatically added whenever a program is linked with this library"
    6818             $ECHO "*** or is declared to -dlopen it."
     7972            echo "*** The inter-library dependencies that have been dropped here will be"
     7973            echo "*** automatically added whenever a program is linked with this library"
     7974            echo "*** or is declared to -dlopen it."
    68197975
    68207976            if test "$allow_undefined" = no; then
    6821               $ECHO
    6822               $ECHO "*** Since this library must not contain undefined symbols,"
    6823               $ECHO "*** because either the platform does not support them or"
    6824               $ECHO "*** it was explicitly requested with -no-undefined,"
    6825               $ECHO "*** libtool will only create a static version of it."
     7977              echo
     7978              echo "*** Since this library must not contain undefined symbols,"
     7979              echo "*** because either the platform does not support them or"
     7980              echo "*** it was explicitly requested with -no-undefined,"
     7981              echo "*** libtool will only create a static version of it."
    68267982              if test "$build_old_libs" = no; then
    68277983                oldlibs="$output_objdir/$libname.$libext"
     
    68407996      case $host in
    68417997        *-*-darwin*)
    6842           newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
    6843           new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
    6844           deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
     7998          newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
     7999          new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
     8000          deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
    68458001          ;;
    68468002      esac
     
    68558011          case " $deplibs " in
    68568012          *" -L$path/$objdir "*)
    6857             new_libs="$new_libs -L$path/$objdir" ;;
     8013            func_append new_libs " -L$path/$objdir" ;;
    68588014          esac
    68598015          ;;
     
    68658021          case " $new_libs " in
    68668022          *" $deplib "*) ;;
    6867           *) new_libs="$new_libs $deplib" ;;
     8023          *) func_append new_libs " $deplib" ;;
    68688024          esac
    68698025          ;;
    6870         *) new_libs="$new_libs $deplib" ;;
     8026        *) func_append new_libs " $deplib" ;;
    68718027        esac
    68728028      done
     
    68808036      # Test again, we may have decided not to build it any more
    68818037      if test "$build_libtool_libs" = yes; then
     8038        # Remove ${wl} instances when linking with ld.
     8039        # FIXME: should test the right _cmds variable.
     8040        case $archive_cmds in
     8041          *\$LD\ *) wl= ;;
     8042        esac
    68828043        if test "$hardcode_into_libs" = yes; then
    68838044          # Hardcode the library paths
     
    68858046          dep_rpath=
    68868047          rpath="$finalize_rpath"
    6887           test "$mode" != relink && rpath="$compile_rpath$rpath"
     8048          test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
    68888049          for libdir in $rpath; do
    68898050            if test -n "$hardcode_libdir_flag_spec"; then
    68908051              if test -n "$hardcode_libdir_separator"; then
     8052                func_replace_sysroot "$libdir"
     8053                libdir=$func_replace_sysroot_result
    68918054                if test -z "$hardcode_libdirs"; then
    68928055                  hardcode_libdirs="$libdir"
     
    68978060                    ;;
    68988061                  *)
    6899                     hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
     8062                    func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
    69008063                    ;;
    69018064                  esac
     
    69038066              else
    69048067                eval flag=\"$hardcode_libdir_flag_spec\"
    6905                 dep_rpath="$dep_rpath $flag"
     8068                func_append dep_rpath " $flag"
    69068069              fi
    69078070            elif test -n "$runpath_var"; then
    69088071              case "$perm_rpath " in
    69098072              *" $libdir "*) ;;
    6910               *) perm_rpath="$perm_rpath $libdir" ;;
     8073              *) func_append perm_rpath " $libdir" ;;
    69118074              esac
    69128075            fi
     
    69168079             test -n "$hardcode_libdirs"; then
    69178080            libdir="$hardcode_libdirs"
    6918             if test -n "$hardcode_libdir_flag_spec_ld"; then
    6919               eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
    6920             else
    6921               eval dep_rpath=\"$hardcode_libdir_flag_spec\"
    6922             fi
     8081            eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
    69238082          fi
    69248083          if test -n "$runpath_var" && test -n "$perm_rpath"; then
     
    69268085            rpath=
    69278086            for dir in $perm_rpath; do
    6928               rpath="$rpath$dir:"
     8087              func_append rpath "$dir:"
    69298088            done
    69308089            eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
     
    69348093
    69358094        shlibpath="$finalize_shlibpath"
    6936         test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
     8095        test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
    69378096        if test -n "$shlibpath"; then
    69388097          eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
     
    69608119        for link
    69618120        do
    6962           linknames="$linknames $link"
     8121          func_append linknames " $link"
    69638122        done
    69648123
    69658124        # Use standard objects if they are pic
    6966         test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
     8125        test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
    69678126        test "X$libobjs" = "X " && libobjs=
    69688127
     
    69718130          $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
    69728131          export_symbols="$output_objdir/$libname.uexp"
    6973           delfiles="$delfiles $export_symbols"
     8132          func_append delfiles " $export_symbols"
    69748133        fi
    69758134
     
    70028161            cmds=$export_symbols_cmds
    70038162            save_ifs="$IFS"; IFS='~'
    7004             for cmd in $cmds; do
     8163            for cmd1 in $cmds; do
    70058164              IFS="$save_ifs"
    7006               eval cmd=\"$cmd\"
    7007               func_len " $cmd"
    7008               len=$func_len_result
    7009               if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
     8165              # Take the normal branch if the nm_file_list_spec branch
     8166              # doesn't work or if tool conversion is not needed.
     8167              case $nm_file_list_spec~$to_tool_file_cmd in
     8168                *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
     8169                  try_normal_branch=yes
     8170                  eval cmd=\"$cmd1\"
     8171                  func_len " $cmd"
     8172                  len=$func_len_result
     8173                  ;;
     8174                *)
     8175                  try_normal_branch=no
     8176                  ;;
     8177              esac
     8178              if test "$try_normal_branch" = yes \
     8179                 && { test "$len" -lt "$max_cmd_len" \
     8180                      || test "$max_cmd_len" -le -1; }
     8181              then
    70108182                func_show_eval "$cmd" 'exit $?'
     8183                skipped_export=false
     8184              elif test -n "$nm_file_list_spec"; then
     8185                func_basename "$output"
     8186                output_la=$func_basename_result
     8187                save_libobjs=$libobjs
     8188                save_output=$output
     8189                output=${output_objdir}/${output_la}.nm
     8190                func_to_tool_file "$output"
     8191                libobjs=$nm_file_list_spec$func_to_tool_file_result
     8192                func_append delfiles " $output"
     8193                func_verbose "creating $NM input file list: $output"
     8194                for obj in $save_libobjs; do
     8195                  func_to_tool_file "$obj"
     8196                  $ECHO "$func_to_tool_file_result"
     8197                done > "$output"
     8198                eval cmd=\"$cmd1\"
     8199                func_show_eval "$cmd" 'exit $?'
     8200                output=$save_output
     8201                libobjs=$save_libobjs
    70118202                skipped_export=false
    70128203              else
     
    70308221          tmp_export_symbols="$export_symbols"
    70318222          test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
    7032           $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
     8223          $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
    70338224        fi
    70348225
     
    70428233          # isn't a blessed tool.
    70438234          $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
    7044           delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
     8235          func_append delfiles " $export_symbols $output_objdir/$libname.filter"
    70458236          export_symbols=$output_objdir/$libname.def
    70468237          $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
     
    70528243          *" $test_deplib "*) ;;
    70538244          *)
    7054             tmp_deplibs="$tmp_deplibs $test_deplib"
     8245            func_append tmp_deplibs " $test_deplib"
    70558246            ;;
    70568247          esac
     
    70728263          else
    70738264            gentop="$output_objdir/${outputname}x"
    7074             generated="$generated $gentop"
     8265            func_append generated " $gentop"
    70758266
    70768267            func_extract_archives $gentop $convenience
    7077             libobjs="$libobjs $func_extract_archives_result"
     8268            func_append libobjs " $func_extract_archives_result"
    70788269            test "X$libobjs" = "X " && libobjs=
    70798270          fi
     
    70828273        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
    70838274          eval flag=\"$thread_safe_flag_spec\"
    7084           linker_flags="$linker_flags $flag"
     8275          func_append linker_flags " $flag"
    70858276        fi
    70868277
    70878278        # Make a backup of the uninstalled library when relinking
    7088         if test "$mode" = relink; then
     8279        if test "$opt_mode" = relink; then
    70898280          $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
    70908281        fi
     
    71318322          fi
    71328323          save_output=$output
    7133           output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
     8324          func_basename "$output"
     8325          output_la=$func_basename_result
    71348326
    71358327          # Clear the reloadable object creation command queue and
     
    71448336            output=${output_objdir}/${output_la}.lnkscript
    71458337            func_verbose "creating GNU ld script: $output"
    7146             $ECHO 'INPUT (' > $output
     8338            echo 'INPUT (' > $output
    71478339            for obj in $save_libobjs
    71488340            do
    7149               $ECHO "$obj" >> $output
     8341              func_to_tool_file "$obj"
     8342              $ECHO "$func_to_tool_file_result" >> $output
    71508343            done
    7151             $ECHO ')' >> $output
    7152             delfiles="$delfiles $output"
     8344            echo ')' >> $output
     8345            func_append delfiles " $output"
     8346            func_to_tool_file "$output"
     8347            output=$func_to_tool_file_result
    71538348          elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
    71548349            output=${output_objdir}/${output_la}.lnk
     
    71648359            for obj
    71658360            do
    7166               $ECHO "$obj" >> $output
     8361              func_to_tool_file "$obj"
     8362              $ECHO "$func_to_tool_file_result" >> $output
    71678363            done
    7168             delfiles="$delfiles $output"
    7169             output=$firstobj\"$file_list_spec$output\"
     8364            func_append delfiles " $output"
     8365            func_to_tool_file "$output"
     8366            output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
    71708367          else
    71718368            if test -n "$save_libobjs"; then
     
    71918388                  if test "$k" -eq 1 ; then
    71928389                    # The first file doesn't have a previous command to add.
    7193                     eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
     8390                    reload_objs=$objlist
     8391                    eval concat_cmds=\"$reload_cmds\"
    71948392                  else
    71958393                    # All subsequent reloadable object files will link in
    71968394                    # the last one created.
    7197                     eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
     8395                    reload_objs="$objlist $last_robj"
     8396                    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
    71988397                  fi
    71998398                  last_robj=$output_objdir/$output_la-${k}.$objext
     
    72018400                  k=$func_arith_result
    72028401                  output=$output_objdir/$output_la-${k}.$objext
    7203                   objlist=$obj
     8402                  objlist=" $obj"
    72048403                  func_len " $last_robj"
    72058404                  func_arith $len0 + $func_len_result
     
    72118410              # files will link in the last one created.
    72128411              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
    7213               eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
     8412              reload_objs="$objlist $last_robj"
     8413              eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
    72148414              if test -n "$last_robj"; then
    72158415                eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
    72168416              fi
    7217               delfiles="$delfiles $output"
     8417              func_append delfiles " $output"
    72188418
    72198419            else
     
    72498449
    72508450                # Restore the uninstalled library and exit
    7251                 if test "$mode" = relink; then
     8451                if test "$opt_mode" = relink; then
    72528452                  ( cd "$output_objdir" && \
    72538453                    $RM "${realname}T" && \
     
    72708470              tmp_export_symbols="$export_symbols"
    72718471              test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
    7272               $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
     8472              $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
    72738473            fi
    72748474
     
    72828482              # isn't a blessed tool.
    72838483              $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
    7284               delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
     8484              func_append delfiles " $export_symbols $output_objdir/$libname.filter"
    72858485              export_symbols=$output_objdir/$libname.def
    72868486              $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
     
    73238523        if test -n "$dlprefiles"; then
    73248524          gentop="$output_objdir/${outputname}x"
    7325           generated="$generated $gentop"
     8525          func_append generated " $gentop"
    73268526
    73278527          func_extract_archives $gentop $dlprefiles
    7328           libobjs="$libobjs $func_extract_archives_result"
     8528          func_append libobjs " $func_extract_archives_result"
    73298529          test "X$libobjs" = "X " && libobjs=
    73308530        fi
     
    73428542
    73438543            # Restore the uninstalled library and exit
    7344             if test "$mode" = relink; then
     8544            if test "$opt_mode" = relink; then
    73458545              ( cd "$output_objdir" && \
    73468546                $RM "${realname}T" && \
     
    73548554
    73558555        # Restore the uninstalled library and exit
    7356         if test "$mode" = relink; then
     8556        if test "$opt_mode" = relink; then
    73578557          $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
    73588558
     
    74358635        if test -n "$whole_archive_flag_spec"; then
    74368636          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
    7437           reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
     8637          reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
    74388638        else
    74398639          gentop="$output_objdir/${obj}x"
    7440           generated="$generated $gentop"
     8640          func_append generated " $gentop"
    74418641
    74428642          func_extract_archives $gentop $convenience
     
    74458645      fi
    74468646
     8647      # If we're not building shared, we need to use non_pic_objs
     8648      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
     8649
    74478650      # Create the old-style object.
    7448       reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
     8651      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
    74498652
    74508653      output="$obj"
     
    75068709      *-*-rhapsody* | *-*-darwin1.[012])
    75078710        # On Rhapsody replace the C library is the System framework
    7508         compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
    7509         finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
     8711        compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
     8712        finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
    75108713        ;;
    75118714      esac
     
    75188721          case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
    75198722            10.[0123])
    7520               compile_command="$compile_command ${wl}-bind_at_load"
    7521               finalize_command="$finalize_command ${wl}-bind_at_load"
     8723              func_append compile_command " ${wl}-bind_at_load"
     8724              func_append finalize_command " ${wl}-bind_at_load"
    75228725            ;;
    75238726          esac
    75248727        fi
    75258728        # Time to change all our "foo.ltframework" stuff back to "-framework foo"
    7526         compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
    7527         finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
     8729        compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
     8730        finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
    75288731        ;;
    75298732      esac
     
    75398742          case " $compile_deplibs " in
    75408743          *" -L$path/$objdir "*)
    7541             new_libs="$new_libs -L$path/$objdir" ;;
     8744            func_append new_libs " -L$path/$objdir" ;;
    75428745          esac
    75438746          ;;
     
    75498752          case " $new_libs " in
    75508753          *" $deplib "*) ;;
    7551           *) new_libs="$new_libs $deplib" ;;
     8754          *) func_append new_libs " $deplib" ;;
    75528755          esac
    75538756          ;;
    7554         *) new_libs="$new_libs $deplib" ;;
     8757        *) func_append new_libs " $deplib" ;;
    75558758        esac
    75568759      done
     
    75588761
    75598762
    7560       compile_command="$compile_command $compile_deplibs"
    7561       finalize_command="$finalize_command $finalize_deplibs"
     8763      func_append compile_command " $compile_deplibs"
     8764      func_append finalize_command " $finalize_deplibs"
    75628765
    75638766      if test -n "$rpath$xrpath"; then
     
    75678770          case "$finalize_rpath " in
    75688771          *" $libdir "*) ;;
    7569           *) finalize_rpath="$finalize_rpath $libdir" ;;
     8772          *) func_append finalize_rpath " $libdir" ;;
    75708773          esac
    75718774        done
     
    75868789                ;;
    75878790              *)
    7588                 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
     8791                func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
    75898792                ;;
    75908793              esac
     
    75928795          else
    75938796            eval flag=\"$hardcode_libdir_flag_spec\"
    7594             rpath="$rpath $flag"
     8797            func_append rpath " $flag"
    75958798          fi
    75968799        elif test -n "$runpath_var"; then
    75978800          case "$perm_rpath " in
    75988801          *" $libdir "*) ;;
    7599           *) perm_rpath="$perm_rpath $libdir" ;;
     8802          *) func_append perm_rpath " $libdir" ;;
    76008803          esac
    76018804        fi
     
    76068809          *":$libdir:"*) ;;
    76078810          ::) dllsearchpath=$libdir;;
    7608           *) dllsearchpath="$dllsearchpath:$libdir";;
     8811          *) func_append dllsearchpath ":$libdir";;
    76098812          esac
    76108813          case :$dllsearchpath: in
    76118814          *":$testbindir:"*) ;;
    76128815          ::) dllsearchpath=$testbindir;;
    7613           *) dllsearchpath="$dllsearchpath:$testbindir";;
     8816          *) func_append dllsearchpath ":$testbindir";;
    76148817          esac
    76158818          ;;
     
    76378840                ;;
    76388841              *)
    7639                 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
     8842                func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
    76408843                ;;
    76418844              esac
     
    76438846          else
    76448847            eval flag=\"$hardcode_libdir_flag_spec\"
    7645             rpath="$rpath $flag"
     8848            func_append rpath " $flag"
    76468849          fi
    76478850        elif test -n "$runpath_var"; then
    76488851          case "$finalize_perm_rpath " in
    76498852          *" $libdir "*) ;;
    7650           *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
     8853          *) func_append finalize_perm_rpath " $libdir" ;;
    76518854          esac
    76528855        fi
     
    76628865      if test -n "$libobjs" && test "$build_old_libs" = yes; then
    76638866        # Transform all the library objects into standard objects.
    7664         compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
    7665         finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
     8867        compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
     8868        finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
    76668869      fi
    76678870
     
    76758878      wrappers_required=yes
    76768879      case $host in
     8880      *cegcc* | *mingw32ce*)
     8881        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
     8882        wrappers_required=no
     8883        ;;
    76778884      *cygwin* | *mingw* )
    76788885        if test "$build_libtool_libs" != yes; then
    76798886          wrappers_required=no
    76808887        fi
    7681         ;;
    7682       *cegcc)
    7683         # Disable wrappers for cegcc, we are cross compiling anyway.
    7684         wrappers_required=no
    76858888        ;;
    76868889      *)
     
    76928895      if test "$wrappers_required" = no; then
    76938896        # Replace the output file specification.
    7694         compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
     8897        compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
    76958898        link_command="$compile_command$compile_rpath"
    76968899
     
    76988901        exit_status=0
    76998902        func_show_eval "$link_command" 'exit_status=$?'
     8903
     8904        if test -n "$postlink_cmds"; then
     8905          func_to_tool_file "$output"
     8906          postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
     8907          func_execute_cmds "$postlink_cmds" 'exit $?'
     8908        fi
    77008909
    77018910        # Delete the generated files.
     
    77218930          rpath=
    77228931          for dir in $perm_rpath; do
    7723             rpath="$rpath$dir:"
     8932            func_append rpath "$dir:"
    77248933          done
    77258934          compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
     
    77298938          rpath=
    77308939          for dir in $finalize_perm_rpath; do
    7731             rpath="$rpath$dir:"
     8940            func_append rpath "$dir:"
    77328941          done
    77338942          finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
     
    77398948        link_command="$compile_var$compile_command$compile_rpath"
    77408949        # Replace the output file specification.
    7741         link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
     8950        link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
    77428951        # Delete the old output file.
    77438952        $opt_dry_run || $RM $output
    77448953        # Link the executable and exit
    77458954        func_show_eval "$link_command" 'exit $?'
     8955
     8956        if test -n "$postlink_cmds"; then
     8957          func_to_tool_file "$output"
     8958          postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
     8959          func_execute_cmds "$postlink_cmds" 'exit $?'
     8960        fi
     8961
    77468962        exit $EXIT_SUCCESS
    77478963      fi
     
    77588974          link_command="$finalize_var$compile_command$finalize_rpath"
    77598975          if test "$fast_install" = yes; then
    7760             relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
     8976            relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
    77618977          else
    77628978            # fast_install is set to needless
     
    77708986
    77718987      # Replace the output file specification.
    7772       link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
     8988      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
    77738989
    77748990      # Delete the old output files.
     
    77768992
    77778993      func_show_eval "$link_command" 'exit $?'
     8994
     8995      if test -n "$postlink_cmds"; then
     8996        func_to_tool_file "$output_objdir/$outputname"
     8997        postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
     8998        func_execute_cmds "$postlink_cmds" 'exit $?'
     8999      fi
    77789000
    77799001      # Now create the wrapper script.
     
    77949016        done
    77959017        relink_command="(cd `pwd`; $relink_command)"
    7796         relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
    7797       fi
    7798 
    7799       # Quote $ECHO for shipping.
    7800       if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
    7801         case $progpath in
    7802         [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
    7803         *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
    7804         esac
    7805         qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
    7806       else
    7807         qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
     9018        relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
    78089019      fi
    78099020
     
    78859096          oldobjs="$old_deplibs $non_pic_objects"
    78869097          if test "$preload" = yes && test -f "$symfileobj"; then
    7887             oldobjs="$oldobjs $symfileobj"
     9098            func_append oldobjs " $symfileobj"
    78889099          fi
    78899100        fi
     
    78939104      if test -n "$addlibs"; then
    78949105        gentop="$output_objdir/${outputname}x"
    7895         generated="$generated $gentop"
     9106        func_append generated " $gentop"
    78969107
    78979108        func_extract_archives $gentop $addlibs
    7898         oldobjs="$oldobjs $func_extract_archives_result"
     9109        func_append oldobjs " $func_extract_archives_result"
    78999110      fi
    79009111
     
    79079118        if test -n "$dlprefiles"; then
    79089119          gentop="$output_objdir/${outputname}x"
    7909           generated="$generated $gentop"
     9120          func_append generated " $gentop"
    79109121
    79119122          func_extract_archives $gentop $dlprefiles
    7912           oldobjs="$oldobjs $func_extract_archives_result"
     9123          func_append oldobjs " $func_extract_archives_result"
    79139124        fi
    79149125
     
    79269137          :
    79279138        else
    7928           $ECHO "copying selected object files to avoid basename conflicts..."
     9139          echo "copying selected object files to avoid basename conflicts..."
    79299140          gentop="$output_objdir/${outputname}x"
    7930           generated="$generated $gentop"
     9141          func_append generated " $gentop"
    79319142          func_mkdir_p "$gentop"
    79329143          save_oldobjs=$oldobjs
     
    79529163              done
    79539164              func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
    7954               oldobjs="$oldobjs $gentop/$newobj"
     9165              func_append oldobjs " $gentop/$newobj"
    79559166              ;;
    7956             *) oldobjs="$oldobjs $obj" ;;
     9167            *) func_append oldobjs " $obj" ;;
    79579168            esac
    79589169          done
    79599170        fi
     9171        func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
     9172        tool_oldlib=$func_to_tool_file_result
    79609173        eval cmds=\"$old_archive_cmds\"
    79619174
     
    79639176        len=$func_len_result
    79649177        if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
     9178          cmds=$old_archive_cmds
     9179        elif test -n "$archiver_list_spec"; then
     9180          func_verbose "using command file archive linking..."
     9181          for obj in $oldobjs
     9182          do
     9183            func_to_tool_file "$obj"
     9184            $ECHO "$func_to_tool_file_result"
     9185          done > $output_objdir/$libname.libcmd
     9186          func_to_tool_file "$output_objdir/$libname.libcmd"
     9187          oldobjs=" $archiver_list_spec$func_to_tool_file_result"
    79659188          cmds=$old_archive_cmds
    79669189        else
     
    80379260      # Quote the link command for shipping.
    80389261      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
    8039       relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
     9262      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
    80409263      if test "$hardcode_automatic" = yes ; then
    80419264        relink_command=
     
    80579280                func_basename "$deplib"
    80589281                name="$func_basename_result"
    8059                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
     9282                func_resolve_sysroot "$deplib"
     9283                eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
    80609284                test -z "$libdir" && \
    80619285                  func_fatal_error "\`$deplib' is not a valid libtool archive"
    8062                 newdependency_libs="$newdependency_libs $libdir/$name"
     9286                func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
    80639287                ;;
    8064               *) newdependency_libs="$newdependency_libs $deplib" ;;
     9288              -L*)
     9289                func_stripname -L '' "$deplib"
     9290                func_replace_sysroot "$func_stripname_result"
     9291                func_append newdependency_libs " -L$func_replace_sysroot_result"
     9292                ;;
     9293              -R*)
     9294                func_stripname -R '' "$deplib"
     9295                func_replace_sysroot "$func_stripname_result"
     9296                func_append newdependency_libs " -R$func_replace_sysroot_result"
     9297                ;;
     9298              *) func_append newdependency_libs " $deplib" ;;
    80659299              esac
    80669300            done
     
    80769310                test -z "$libdir" && \
    80779311                  func_fatal_error "\`$lib' is not a valid libtool archive"
    8078                 newdlfiles="$newdlfiles $libdir/$name"
     9312                func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
    80799313                ;;
    8080               *) newdlfiles="$newdlfiles $lib" ;;
     9314              *) func_append newdlfiles " $lib" ;;
    80819315              esac
    80829316            done
     
    80959329                test -z "$libdir" && \
    80969330                  func_fatal_error "\`$lib' is not a valid libtool archive"
    8097                 newdlprefiles="$newdlprefiles $libdir/$name"
     9331                func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
    80989332                ;;
    80999333              esac
     
    81079341                *) abs=`pwd`"/$lib" ;;
    81089342              esac
    8109               newdlfiles="$newdlfiles $abs"
     9343              func_append newdlfiles " $abs"
    81109344            done
    81119345            dlfiles="$newdlfiles"
     
    81169350                *) abs=`pwd`"/$lib" ;;
    81179351              esac
    8118               newdlprefiles="$newdlprefiles $abs"
     9352              func_append newdlprefiles " $abs"
    81199353            done
    81209354            dlprefiles="$newdlprefiles"
     
    81229356          $RM $output
    81239357          # place dlname in correct position for cygwin
     9358          # In fact, it would be nice if we could use this code for all target
     9359          # systems that can't hard-code library paths into their executables
     9360          # and that have no shared library path variable independent of PATH,
     9361          # but it turns out we can't easily determine that from inspecting
     9362          # libtool variables, so we have to hard-code the OSs to which it
     9363          # applies here; at the moment, that means platforms that use the PE
     9364          # object format with DLL files.  See the long comment at the top of
     9365          # tests/bindir.at for full details.
    81249366          tdlname=$dlname
    81259367          case $host,$output,$installed,$module,$dlname in
    8126             *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
     9368            *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
     9369              # If a -bindir argument was supplied, place the dll there.
     9370              if test "x$bindir" != x ;
     9371              then
     9372                func_relative_path "$install_libdir" "$bindir"
     9373                tdlname=$func_relative_path_result$dlname
     9374              else
     9375                # Otherwise fall back on heuristic.
     9376                tdlname=../bin/$dlname
     9377              fi
     9378              ;;
    81279379          esac
    81289380          $ECHO > $output "\
     
    81839435}
    81849436
    8185 { test "$mode" = link || test "$mode" = relink; } &&
     9437{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
    81869438    func_mode_link ${1+"$@"}
    81879439
     
    82039455    do
    82049456      case $arg in
    8205       -f) RM="$RM $arg"; rmforce=yes ;;
    8206       -*) RM="$RM $arg" ;;
    8207       *) files="$files $arg" ;;
     9457      -f) func_append RM " $arg"; rmforce=yes ;;
     9458      -*) func_append RM " $arg" ;;
     9459      *) func_append files " $arg" ;;
    82089460      esac
    82099461    done
     
    82149466    rmdirs=
    82159467
    8216     origobjdir="$objdir"
    82179468    for file in $files; do
    82189469      func_dirname "$file" "" "."
    82199470      dir="$func_dirname_result"
    82209471      if test "X$dir" = X.; then
    8221         objdir="$origobjdir"
     9472        odir="$objdir"
    82229473      else
    8223         objdir="$dir/$origobjdir"
     9474        odir="$dir/$objdir"
    82249475      fi
    82259476      func_basename "$file"
    82269477      name="$func_basename_result"
    8227       test "$mode" = uninstall && objdir="$dir"
    8228 
    8229       # Remember objdir for removal later, being careful to avoid duplicates
    8230       if test "$mode" = clean; then
     9478      test "$opt_mode" = uninstall && odir="$dir"
     9479
     9480      # Remember odir for removal later, being careful to avoid duplicates
     9481      if test "$opt_mode" = clean; then
    82319482        case " $rmdirs " in
    8232           *" $objdir "*) ;;
    8233           *) rmdirs="$rmdirs $objdir" ;;
     9483          *" $odir "*) ;;
     9484          *) func_append rmdirs " $odir" ;;
    82349485        esac
    82359486      fi
     
    82579508          # Delete the libtool libraries and symlinks.
    82589509          for n in $library_names; do
    8259             rmfiles="$rmfiles $objdir/$n"
     9510            func_append rmfiles " $odir/$n"
    82609511          done
    8261           test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
    8262 
    8263           case "$mode" in
     9512          test -n "$old_library" && func_append rmfiles " $odir/$old_library"
     9513
     9514          case "$opt_mode" in
    82649515          clean)
    8265             case "  $library_names " in
    8266             # "  " in the beginning catches empty $dlname
     9516            case " $library_names " in
    82679517            *" $dlname "*) ;;
    8268             *) rmfiles="$rmfiles $objdir/$dlname" ;;
     9518            *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
    82699519            esac
    8270             test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
     9520            test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
    82719521            ;;
    82729522          uninstall)
     
    82969546          if test -n "$pic_object" &&
    82979547             test "$pic_object" != none; then
    8298             rmfiles="$rmfiles $dir/$pic_object"
     9548            func_append rmfiles " $dir/$pic_object"
    82999549          fi
    83009550
     
    83029552          if test -n "$non_pic_object" &&
    83039553             test "$non_pic_object" != none; then
    8304             rmfiles="$rmfiles $dir/$non_pic_object"
     9554            func_append rmfiles " $dir/$non_pic_object"
    83059555          fi
    83069556        fi
     
    83089558
    83099559      *)
    8310         if test "$mode" = clean ; then
     9560        if test "$opt_mode" = clean ; then
    83119561          noexename=$name
    83129562          case $file in
     
    83189568            # $file with .exe has already been added to rmfiles,
    83199569            # add $file without .exe
    8320             rmfiles="$rmfiles $file"
     9570            func_append rmfiles " $file"
    83219571            ;;
    83229572          esac
     
    83279577              relink_command=
    83289578              func_source $func_ltwrapper_scriptname_result
    8329               rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
     9579              func_append rmfiles " $func_ltwrapper_scriptname_result"
    83309580            else
    83319581              relink_command=
     
    83359585            # note $name still contains .exe if it was in $file originally
    83369586            # as does the version of $file that was added into $rmfiles
    8337             rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
     9587            func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
    83389588            if test "$fast_install" = yes && test -n "$relink_command"; then
    8339               rmfiles="$rmfiles $objdir/lt-$name"
     9589              func_append rmfiles " $odir/lt-$name"
    83409590            fi
    83419591            if test "X$noexename" != "X$name" ; then
    8342               rmfiles="$rmfiles $objdir/lt-${noexename}.c"
     9592              func_append rmfiles " $odir/lt-${noexename}.c"
    83439593            fi
    83449594          fi
     
    83489598      func_show_eval "$RM $rmfiles" 'exit_status=1'
    83499599    done
    8350     objdir="$origobjdir"
    83519600
    83529601    # Try to remove the ${objdir}s in the directories where we deleted files
     
    83609609}
    83619610
    8362 { test "$mode" = uninstall || test "$mode" = clean; } &&
     9611{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
    83639612    func_mode_uninstall ${1+"$@"}
    83649613
    8365 test -z "$mode" && {
     9614test -z "$opt_mode" && {
    83669615  help="$generic_help"
    83679616  func_fatal_help "you must specify a MODE"
     
    83699618
    83709619test -z "$exec_cmd" && \
    8371   func_fatal_help "invalid operation mode \`$mode'"
     9620  func_fatal_help "invalid operation mode \`$opt_mode'"
    83729621
    83739622if test -n "$exec_cmd"; then
  • issm/branches/trunk-jpl-damage/m4

    • Property svn:ignore
      •  

        old new  
        1 svn-commit.tmp
         1
  • issm/branches/trunk-jpl-damage/m4/issm_options.m4

    r12946 r13101  
    1515        dnl }}}
    1616    dnl shared build {{{
    17     AC_ARG_ENABLE([shared],                                                dnl feature
    18         AS_HELP_STRING([--enable-shared], [produce libISSM.so.0]),         dnl help string
    19         [enable_shared=$enableval],                                        dnl action if given
    20         [enable_shared=no])                                                dnl action if not given
    21     AM_CONDITIONAL([SHARED], [test $enable_shared = yes])
     17    AC_ARG_ENABLE([sharedlibs],                                                dnl feature
     18        AS_HELP_STRING([--enable-sharedlibs], [produce libISSM.so.0]),         dnl help string
     19        [enable_sharedlibs=$enableval],                                        dnl action if given
     20        [enable_sharedlibs=no])                                                dnl action if not given
     21    AM_CONDITIONAL([SHAREDLIBS], [test x$enable_sharedlibs = xyes])
     22    dnl }}}
     23
     24    dnl shared build {{{
     25    AC_ARG_ENABLE([version],                                                dnl feature
     26        AS_HELP_STRING([--enable-version], [produce libISSM.so.0]),         dnl help string
     27        [enable_version=$enableval],                                        dnl action if given
     28        [enable_version=no])                                                dnl action if not given
     29    AM_CONDITIONAL([VERSION], [test x$enable_VERSION = xyes])
    2230    dnl }}}
    2331
     
    221229                MATLABWRAPPEREXT=$MEXEXT
    222230                AC_SUBST([MATLABWRAPPEREXT])
    223                 AC_SUBST([MEXLIB])
     231            AC_SUBST([MEXLIB])
    224232                AC_SUBST([MEXLINK])
    225233        fi
     
    466474        AC_MSG_RESULT($HAVE_ADOLC)
    467475        dnl }}}
     476        dnl adolc-version{{{
     477        AC_ARG_WITH([adolc-version],
     478                AS_HELP_STRING([--with-adolc-version=number], [adolc version.]),
     479                [ADOLC_VERSION=$withval],[ADOLC_VERSION=2])
     480        AC_MSG_CHECKING(for adolc-version)
     481
     482        AC_DEFINE_UNQUOTED([_ADOLC_VERSION_],$ADOLC_VERSION,[ADOLC version])
     483        AC_MSG_RESULT($ADOLC_VERSION)
     484        dnl }}}
    468485        dnl adic2{{{
    469486        AC_ARG_WITH([adic2-dir],
     
    589606                                ;;
    590607                        esac
    591        
     608
    592609                        METISINCL=-I"$METIS_ROOT/include"
    593610                        AC_DEFINE([_METIS_VERSION_],[5],[ Metis version number])
     
    606623        AC_MSG_CHECKING(for mpi)
    607624        AC_ARG_WITH([mpi-lib],
    608                 AS_HELP_STRING([--with-mpi-lib = otions],[mpi options, for ex: "-L$MPIROOT -lmpich]),
     625                AS_HELP_STRING([--with-mpi-lib = options],[mpi options, for ex: "-L$MPIROOT -lmpich]),
    609626                [MPILIB=$withval],[MPILIB=""])
    610627       
     
    620637                else
    621638                        HAVE_MPI=yes
    622                         MPIINCL=-I"$MPI_INCLUDE/"
     639                        MPIINCL=-I"$MPI_INCLUDE"
    623640                        AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
    624641                        AC_DEFINE([HAVE_MPI],[1],[Mpi Flag for Dakota (DO NOT REMOVE)])
     
    666683                        *cygwin*)
    667684                        if test "$PETSC_MAJOR" = "2" ; then
    668                                 PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetscsnes.lib libpetscts.lib libmpiuni.lib libpetsc.lib"
     685                                PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetscksp.lib  libpetscdm.lib  libpetscmat.lib  libpetscvec.lib libpetscsnes.lib libpetscts.lib libmpiuni.lib libpetsc.lib"
    669686                        else
    670                                 PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetsc.lib"
     687                                PETSCLIB="-link -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libpetsc.lib"
    671688                        fi
    672689                        ;;
    673690                        *linux*)
    674691                        if test "$PETSC_MAJOR" = "2" ; then
    675                         PETSCLIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
     692                        PETSCLIB="-L$PETSC_ROOT/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc  -lpetscsnes -lpetscts"
    676693                        else
    677                         PETSCLIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetsc -ldl"
     694                        PETSCLIB="-L$PETSC_ROOT/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetsc -ldl"
    678695                        fi
    679696                        ;;
    680697                        *darwin*)
    681698                        if test "$PETSC_MAJOR" = "2" ; then
    682                         PETSCLIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib/$PETSC_ARCH/ -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetscsnes -lpetscts -lpetsc"
     699                        PETSCLIB="-L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH/ -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetscsnes -lpetscts -lpetsc"
    683700                        else
    684                         PETSCLIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib/$PETSC_ARCH/ -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetsc"
     701                        PETSCLIB="-L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH/ -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lpetsc"
    685702                        fi
    686703                        ;;
  • issm/branches/trunk-jpl-damage/scripts/automakererun.sh

    r12878 r13101  
    99
    1010cd $ISSM_DIR
    11 autoreconf -iv -I m4
     11autoreconf -iv -I externalpackages/libtool/install/share/aclocal
  • issm/branches/trunk-jpl-damage/scripts/historyISSM.m

    r11577 r13101  
    33md.mesh.numberofelements
    44md=mesh(md,'DomainOutline.exp',5000);
    5 md=setmask(md,'','');
    65md=setflowequation(md,'macayeal','all');
    7 md=setflowequation(md,'pattyn','all','stokes','all');
    86md=solve(md,TransientSolutionEnum);
    9 md=solve(md,BalancedthicknessSolutionEnum);
    107md=solve(md,DiagnosticSolutionEnum);
    118md=loadresultsfromcluster(md);
  • issm/branches/trunk-jpl-damage/src/Makefile.am

    r12878 r13101  
    1 EXTRA_DIST =  perl  pro py
     1EXTRA_DIST =  perl pro py
    22SUBDIRS = c modules m
  • issm/branches/trunk-jpl-damage/src/ad/todo

    r12878 r13101  
    4343
    4444Replace memcpy, realloc with x layers.  Replace all calls to malloc and free in the code.
     45
     46
     47
     48Questions:
     49set of active IssmDouble variables different from set of independent variables activated with <<=?
     50same thing dependent variables?
  • issm/branches/trunk-jpl-damage/src/c/Container/DataSet.cpp

    r12878 r13101  
    133133        vector<Object*>::iterator object;
    134134
    135         if(this==NULL)_error2_("trying to echo a NULL dataset");
     135        if(this==NULL)_error_("trying to echo a NULL dataset");
    136136
    137137        _pprintLine_("DataSet echo: " << objects.size() << " objects");
     
    150150        vector<Object*>::iterator object;
    151151
    152         if(this==NULL)_error2_("trying to echo a NULL dataset");
     152        if(this==NULL)_error_("trying to echo a NULL dataset");
    153153
    154154        _pprintLine_("DataSet echo: " << objects.size() << " objects");
     
    194194
    195195        _assert_(this);
    196         if(!sorted)_error2_("trying to binary search on a non-sorted dataset!");
     196        if(!sorted)_error_("trying to binary search on a non-sorted dataset!");
    197197
    198198        /*Carry out a binary search on the sorted_ids: */
    199199        if(!binary_search(&id_offset,eid, sorted_ids,objects.size())){
    200                 _error2_("could not find object with id " << eid << " in DataSet " << EnumToStringx(enum_type));
     200                _error_("could not find object with id " << eid << " in DataSet " << EnumToStringx(enum_type));
    201201        }
    202202
     
    259259        /*Only sort if we are not already sorted: */
    260260        if(!sorted){
    261                 _error2_("not implemented yet!");
    262         }
    263 }
    264 /*}}}*/
     261                _error_("not implemented yet!");
     262        }
     263}
     264/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/Container/Elements.cpp

    r12878 r13101  
    203203                /*see what the first element of this partition has in stock (this is common to all partitions)*/
    204204                if(my_rank==minrank){
    205                         if(this->Size()==0) _error2_("Cannot write results because there is no element??");
     205                        if(this->Size()==0) _error_("Cannot write results because there is no element??");
    206206                        Element* element=(Element*)this->GetObjectByOffset(0);
    207207                        element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults);
     
    232232                        if(resultssizes[i]==P1Enum)      vectorsize=numberofvertices;
    233233                        else if(resultssizes[i]==P0Enum) vectorsize=numberofelements;
    234                         else _error2_("Unkown result size: " << EnumToStringx(resultssizes[i]));
     234                        else _error_("Unkown result size: " << EnumToStringx(resultssizes[i]));
    235235                        vector=new Vector(vectorsize);
    236236
  • issm/branches/trunk-jpl-damage/src/c/Container/Inputs.cpp

    r12878 r13101  
    5757                /*we could not find an input with the correct enum type. No defaults values were provided,
    5858                 * error out: */
    59                 _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
     59                _error_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    6060        }
    6161
     
    8585                /*we could not find an input with the correct enum type. No defaults values were provided,
    8686                 * error out: */
    87                 _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
     87                _error_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    8888        }
    8989
     
    113113                /*we could not find an input with the correct enum type. No defaults values were provided,
    114114                 * error out: */
    115                 _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
     115                _error_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    116116        }
    117117
     
    141141                /*we could not find an input with the correct enum type. No defaults values were provided,
    142142                 * error out: */
    143                 _error2_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
     143                _error_("could not find input with enum type " << enum_type << " (" << EnumToStringx(enum_type) << ")");
    144144        }
    145145
     
    213213
    214214        /*some checks: */
    215         if(!constrain_input) _error2_("input " << EnumToStringx(constrain_enum) << " could not be found!");
     215        if(!constrain_input) _error_("input " << EnumToStringx(constrain_enum) << " could not be found!");
    216216
    217217        /*Apply ContrainMin: */
     
    254254        }
    255255        else{
    256                 _error2_("Input " << EnumToStringx(enumtype) << " not found");
     256                _error_("Input " << EnumToStringx(enumtype) << " not found");
    257257        }
    258258
     
    275275        }
    276276        else{
    277                 _error2_("Input " << EnumToStringx(enumtype) << " not found");
     277                _error_("Input " << EnumToStringx(enumtype) << " not found");
    278278        }
    279279
     
    296296        }
    297297        else{
    298                 _error2_("Input " << EnumToStringx(enumtype) << " not found");
     298                _error_("Input " << EnumToStringx(enumtype) << " not found");
    299299        }
    300300
     
    317317        }
    318318        else{
    319                 _error2_("Input " << EnumToStringx(enumtype) << " not found");
     319                _error_("Input " << EnumToStringx(enumtype) << " not found");
    320320        }
    321321
     
    369369        /*Make a copy of the original input: */
    370370        original=(Input*)this->GetInput(original_enum);
    371         if(!original)_error2_("could not find input with enum: " << EnumToStringx(original_enum));
     371        if(!original)_error_("could not find input with enum: " << EnumToStringx(original_enum));
    372372        copy=(Input*)original->copy();
    373373
     
    416416
    417417        /*some checks: */
    418         if(!xinput) _error2_("input " << EnumToStringx(MeshXEnum) << " could not be found!");
    419         if(!yinput) _error2_("input " << EnumToStringx(MeshYEnum) << " could not be found!");
     418        if(!xinput) _error_("input " << EnumToStringx(MeshXEnum) << " could not be found!");
     419        if(!yinput) _error_("input " << EnumToStringx(MeshYEnum) << " could not be found!");
    420420
    421421        /*Apply AXPY: */
  • issm/branches/trunk-jpl-damage/src/c/Container/Observations.cpp

    r12946 r13101  
    5858        options->Get(&maxtrimming,"maxtrimming",+1.e+21);
    5959        options->Get(&minspacing,"minspacing",0.01);
    60         if(minspacing<=0) _error2_("minspacing must > 0");
     60        if(minspacing<=0) _error_("minspacing must > 0");
    6161
    6262        /*Get Minimum box size*/
    6363        if(options->GetOption("boxlength")){
    6464                options->Get(&minlength,"boxlength");
    65                 if(minlength<=0)_error2_("boxlength should be a positive number");
    66                 maxdepth=int(log(max(xmax-xmin,ymax-ymin)/minlength +1)/log(2.0));
     65                if(minlength<=0)_error_("boxlength should be a positive number");
     66                maxdepth=reCast<int,IssmDouble>(log(max(xmax-xmin,ymax-ymin)/minlength +1)/log(2.0));
    6767        }
    6868        else{
     
    383383        SolverxSeq(&GinvZ, Gamma,obs,n_obs);    // Gamma^-1 Z
    384384#else
    385         _error2_("GSL is required");
     385        _error_("GSL is required");
    386386#endif
    387387
  • issm/branches/trunk-jpl-damage/src/c/Container/Options.cpp

    r12878 r13101  
    4747
    4848        /*Also, check the option name*/
    49         if(!in_option->name) _error2_("input option has an empty name");
    50         if(strchr(in_option->name,'.')) _error2_("Option \"" << in_option->name << "\" has a protected character \".\"");
    51         if(strchr(in_option->name,'[')) _error2_("Option \"" << in_option->name << "\" has a protected character \"[\"");
    52         if(strchr(in_option->name,']')) _error2_("Option \"" << in_option->name << "\" has a protected character \"]\"");
     49        if(!in_option->name) _error_("input option has an empty name");
     50        if(strchr(in_option->name,'.')) _error_("Option \"" << in_option->name << "\" has a protected character \".\"");
     51        if(strchr(in_option->name,'[')) _error_("Option \"" << in_option->name << "\" has a protected character \"[\"");
     52        if(strchr(in_option->name,']')) _error_("Option \"" << in_option->name << "\" has a protected character \"]\"");
    5353
    5454        /*Finally, check that no option of the same name already exists in the dataset*/
     
    5757                option=(Option*)(*object);
    5858                if (!strcmp(option->name,in_option->name)){
    59                         _error2_("Options \"" << in_option->name << "\" found multiple times");
     59                        _error_("Options \"" << in_option->name << "\" found multiple times");
    6060                        break;
    6161                }
     
    8383        /*Else, the Option does not exist, no default provided*/
    8484        else{
    85                 _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
     85                _error_("option of name \"" << name << "\" not found, and no default value has been provided");
    8686        }
    8787}
     
    121121        /*Else, the Option does not exist, no default provided*/
    122122        else{
    123                 _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
     123                _error_("option of name \"" << name << "\" not found, and no default value has been provided");
    124124        }
    125125}
     
    159159        /*Else, the Option does not exist, no default provided*/
    160160        else{
    161                 _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
     161                _error_("option of name \"" << name << "\" not found, and no default value has been provided");
    162162        }
    163163}
     
    199199        /*Else, the Option does not exist, no default provided*/
    200200        else{
    201                 _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
     201                _error_("option of name \"" << name << "\" not found, and no default value has been provided");
    202202        }
    203203
     
    264264                /*Else: not supported*/
    265265                else{
    266                         _error2_("Cannot recover field \"" << name << "\" for an option of type " << EnumToStringx(option->ObjectEnum()));
     266                        _error_("Cannot recover field \"" << name << "\" for an option of type " << EnumToStringx(option->ObjectEnum()));
    267267                }
    268268        }
     
    290290        /*Else, the Option does not exist, no default provided*/
    291291        else{
    292                 _error2_("option of name \"" << name << "\" not found, and no default value has been provided");
     292                _error_("option of name \"" << name << "\" not found, and no default value has been provided");
    293293        }
    294294}
     
    324324                                /*Else: not supported*/
    325325                                else{
    326                                         _error2_("Cannot recover field \"" << name << "\" for an option of type " << EnumToStringx(option->ObjectEnum()));
     326                                        _error_("Cannot recover field \"" << name << "\" for an option of type " << EnumToStringx(option->ObjectEnum()));
    327327                                }
    328328                        }
  • issm/branches/trunk-jpl-damage/src/c/Container/Parameters.cpp

    r12878 r13101  
    6565                }
    6666        }
    67         _error2_("could not find parameter " << EnumToStringx(enum_type));
     67        _error_("could not find parameter " << EnumToStringx(enum_type));
    6868}
    6969/*}}}*/
     
    8282                }
    8383        }
    84         _error2_("could not find parameter " << EnumToStringx(enum_type));
     84        _error_("could not find parameter " << EnumToStringx(enum_type));
    8585}
    8686/*}}}*/
     
    9999                }
    100100        }
    101         _error2_("could not find parameter " << EnumToStringx(enum_type));
     101        _error_("could not find parameter " << EnumToStringx(enum_type));
    102102}
    103103/*}}}*/
     
    116116                }
    117117        }
    118         _error2_("could not find parameter " << EnumToStringx(enum_type));
     118        _error_("could not find parameter " << EnumToStringx(enum_type));
    119119}
    120120/*}}}*/
     
    133133                }
    134134        }
    135         _error2_("could not find parameter " << EnumToStringx(enum_type));
     135        _error_("could not find parameter " << EnumToStringx(enum_type));
    136136
    137137}
     
    151151                }
    152152        }
    153         _error2_("could not find parameter " << EnumToStringx(enum_type));
     153        _error_("could not find parameter " << EnumToStringx(enum_type));
    154154
    155155}
     
    169169                }
    170170        }
    171         _error2_("could not find parameter " << EnumToStringx(enum_type));
     171        _error_("could not find parameter " << EnumToStringx(enum_type));
    172172
    173173}
     
    187187                }
    188188        }
    189         _error2_("could not find parameter " << EnumToStringx(enum_type));
     189        _error_("could not find parameter " << EnumToStringx(enum_type));
    190190
    191191}
     
    205205                }
    206206        }
    207         _error2_("could not find parameter " << EnumToStringx(enum_type));
     207        _error_("could not find parameter " << EnumToStringx(enum_type));
    208208
    209209}
     
    223223                }
    224224        }
    225         _error2_("could not find parameter " << EnumToStringx(enum_type));
     225        _error_("could not find parameter " << EnumToStringx(enum_type));
    226226
    227227}
     
    241241                }
    242242        }
    243         _error2_("could not find parameter " << EnumToStringx(enum_type));
     243        _error_("could not find parameter " << EnumToStringx(enum_type));
    244244}
    245245/*}}}*/
     
    258258                }
    259259        }
    260         _error2_("could not find parameter " << EnumToStringx(enum_type));
     260        _error_("could not find parameter " << EnumToStringx(enum_type));
    261261
    262262}
     
    276276                }
    277277        }
    278         _error2_("could not find parameter " << EnumToStringx(enum_type));
     278        _error_("could not find parameter " << EnumToStringx(enum_type));
    279279
    280280}
     
    294294                }
    295295        }
    296         _error2_("could not find parameter " << EnumToStringx(enum_type));
     296        _error_("could not find parameter " << EnumToStringx(enum_type));
    297297}
    298298/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/EnumDefinitions.h

    r12946 r13101  
    1212enum definitions{
    1313        /*Model fields {{{1*/
    14         AutodiffForwardEnum,
    1514        AutodiffIsautodiffEnum,
    16         AutodiffReverseEnum,
    1715        BalancethicknessSpcthicknessEnum,
    1816        BalancethicknessStabilizationEnum,
     
    5048        FlowequationElementEquationEnum,
    5149        FlowequationIshutterEnum,
     50        FlowequationIsl1l2Enum,
    5251        FlowequationIsmacayealpattynEnum,
    5352        FlowequationIsstokesEnum,
     
    238237        /*Approximations {{{1*/
    239238        ApproximationEnum,
     239        NoneApproximationEnum,
    240240        HutterApproximationEnum,
    241241        MacAyealApproximationEnum,
    242242        MacAyealPattynApproximationEnum,
    243243        MacAyealStokesApproximationEnum,
    244         NoneApproximationEnum,
     244        L1L2ApproximationEnum,
    245245        PattynApproximationEnum,
    246246        PattynStokesApproximationEnum,
     
    286286        NumericalfluxEnum,
    287287        ParamEnum,
     288        L1L2IceFrontEnum,
    288289        PattynIceFrontEnum,
    289290        PengridEnum,
     
    385386        EnthalpyPicardEnum,
    386387        ThicknessAbsGradientEnum,
     388        ThicknessAlongGradientEnum,
     389        ThicknessAcrossGradientEnum,
    387390        StepResponsesEnum,
    388391        IntMatParamEnum,
     
    405408        StressTensoryzEnum,
    406409        StressTensorzzEnum,
    407         IceVolumeEnum, //FIXME reposition
    408         TotalSmbEnum,  //FIXME reposition
    409         ThicknessAlongGradientEnum,
    410         ThicknessAcrossGradientEnum,
    411410        /*}}}*/
    412411        /*Element Interpolations{{{1*/
     
    448447        MaxVzEnum,
    449448        MaxAbsVzEnum,
     449        IceVolumeEnum,
     450        TotalSmbEnum,
    450451        /*}}}*/
    451452        /*Convergence{{{1*/
  • issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/Synchronize.sh

    r12878 r13101  
    9898cat <<END >> $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp
    9999        /*If we reach this point, the string provided has not been found*/
    100         _error2_("Enum " << name << " not found");
     100        _error_("Enum " << name << " not found");
    101101}
    102102END
     
    107107#Add header to pythonenum file{{{
    108108cat <<END > $ISSM_DIR/src/m/enum/EnumDefinitions.py
     109from StringToEnum import StringToEnum
     110
    109111"""
    110112
     
    166168        """
    167169
    168         return StringToEnum('$NAME')
     170        return StringToEnum('$NAME')[0]
    169171
    170172END
  • issm/branches/trunk-jpl-damage/src/c/Makefile.am

    r12946 r13101  
    1 INCLUDES = @DAKOTAINCL@ @SHAPELIBINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@ @METISINCL@ @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@ @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@ @TRIANGLEINCL@ @SPAIINCL@ @HYPREINCL@ @PROMETHEUSINCL@ @SUPERLUINCL@ @SPOOLESINCL@ @PASTIXINCL@ @MLINCL@ @TAOINCL@ @ADIC2INCL@ @ADOLCINCL@ @GSLINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
     1AM_CPPFLAGS = @DAKOTAINCL@ @SHAPELIBINCL@ @PETSCINCL@ @SLEPCINCL@ @MPIINCL@ @MATLABINCL@ @METISINCL@ @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@ @BLASLAPACKINCL@ @MKLINCL@ @MUMPSINCL@ @TRIANGLEINCL@ @SPAIINCL@ @HYPREINCL@ @PROMETHEUSINCL@ @SUPERLUINCL@ @SPOOLESINCL@ @PASTIXINCL@ @MLINCL@ @TAOINCL@ @ADIC2INCL@ @ADOLCINCL@ @GSLINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
    22
    33EXEEXT=$(ISSMEXT)
     
    66lib_LIBRARIES = libISSMCore.a libISSMOverload.a
    77
    8 #if SHARED
    9 #lib_LTLIBRARIES = libISSMCore.la libISSMOverload.la libISSM.la
    10 #endif
     8if SHAREDLIBS
     9lib_LTLIBRARIES = libISSMCore.la libISSMOverload.la libISSM.la
     10endif
    1111if PYTHON
    1212lib_LIBRARIES += libISSMPython.a
    1313endif
    1414if MATLAB
     15if SHAREDLIBS
     16lib_LTLIBRARIES += libISSMMatlab.la
     17endif
    1518lib_LIBRARIES += libISSMMatlab.a
    1619endif
    1720if MODULES
     21if SHAREDLIBS
     22lib_LTLIBRARIES += libISSMModules.la
     23endif
    1824lib_LIBRARIES += libISSMModules.a
    1925endif
     
    197203                                        ./shared/Numerics/isnan.h\
    198204                                        ./shared/Numerics/isnan.cpp\
     205                                        ./shared/Numerics/cubic.cpp\
    199206                                        ./shared/Numerics/extrema.cpp\
    200207                                        ./shared/Numerics/XZvectorsToCoordinateSystem.cpp\
     
    384391                                          ./modules/Dakotax/SpawnCore.cpp\
    385392                                          ./modules/Dakotax/DescriptorIndex.cpp\
    386                                           ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
    387393                                          ./modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp\
    388                                           ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
    389394                                          ./modules/Dakotax/SpawnCoreParallel.cpp
    390395#}}}
     
    10061011libISSMCore_a_CXXFLAGS = $(ALLCXXFLAGS)
    10071012
    1008 #if SHARED
    1009 #libISSM_la_SOURCES = solutions/issm.cpp
    1010 #libISSM_la_LIBADD = libISSMCore.la libISSMOverload.la
    1011 #
    1012 #libISSMCore_la_SOURCES  = $(issm_sources)
    1013 #libISSMCore_la_LIBADD = $(PETSCLIB) $(TAOLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB)
    1014 #
    1015 #libISSMOverload_la_SOURCES = ./shared/String/stricmp.c
    1016 #endif
     1013if SHAREDLIBS
     1014libISSM_la_SOURCES = solutions/issm.cpp
     1015libISSM_la_LIBADD = libISSMCore.la libISSMOverload.la
     1016
     1017libISSMCore_la_SOURCES  = $(issm_sources)
     1018libISSMCore_la_LIBADD = $(PETSCLIB) $(TAOLIB) $(PLAPACKLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPOOLESLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB) $(ADOLCLIB)
     1019
     1020libISSMOverload_la_SOURCES = ./shared/String/stricmp.c
     1021endif
    10171022
    10181023if MODULES
     
    10221027libISSMModules_a_SOURCES += $(kml_sources)
    10231028libISSMModules_a_CXXFLAGS = $(ALLCXXFLAGS)
     1029libISSMModules_a_LIBADD = ./libISSMCore.a
     1030if SHAREDLIBS
     1031libISSMModules_la_SOURCES = $(libISSMModules_a_SOURCES)
     1032endif
    10241033endif
    10251034
     
    10321041libISSMMatlab_a_SOURCES = $(matlab_sources)
    10331042libISSMMatlab_a_CXXFLAGS= $(ALLCXXFLAGS)
    1034 endif
    1035 
     1043if SHAREDLIBS
     1044libISSMMatlab_la_SOURCES = $(libISSMMatlab_a_SOURCES)
     1045endif
     1046endif
     1047
     1048if VERSION
     1049AM_LDFLAGS =
     1050else
     1051AM_LDFLAGS = -avoid-version
     1052endif
    10361053#}}}
    10371054#Overload library, to overload any non-standard symbols. {{{
  • issm/branches/trunk-jpl-damage/src/c/classes/DofIndexing.cpp

    r12832 r13101  
    143143                else this->sdoflist=NULL;
    144144        }
    145         else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     145        else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    146146}
    147147/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/FemModel.cpp

    r12832 r13101  
    129129        }
    130130        if(found!=-1) analysis_counter=found;
    131         else _error2_("Could not find alias for analysis_type " << EnumToStringx(configuration_type) << " in list of FemModel analyses");
     131        else _error_("Could not find alias for analysis_type " << EnumToStringx(configuration_type) << " in list of FemModel analyses");
    132132
    133133        /*Now, plug analysis_counter and analysis_type inside the parameters: */
  • issm/branches/trunk-jpl-damage/src/c/classes/Hook.cpp

    r12832 r13101  
    185185                        this->objects[i]=(Object*)dataset->GetObjectById(this->offsets+i,this->ids[i]); //remember the offset for later on.
    186186                        /*check the id is correct!: */
    187                         if (this->objects[i]->Id()!=this->ids[i]) _error2_("wrong id: " << this->objects[i]->Id() << " vs " << this->ids[i] << "  in resolved pointer!");
     187                        if (this->objects[i]->Id()!=this->ids[i]) _error_("wrong id: " << this->objects[i]->Id() << " vs " << this->ids[i] << "  in resolved pointer!");
    188188                }
    189189        }
     
    194194       
    195195        /*first, check that we only have one T object in our object list: */
    196         if (this->num!=1) _error2_("trying to delivery a single hook object when hook holds " << this->num << " objects" << "\n");
     196        if (this->num!=1) _error_("trying to delivery a single hook object when hook holds " << this->num << " objects" << "\n");
    197197
    198198        /*check NULL: */
    199         if (this->objects==NULL) _error2_("hook is not pointing to any object, objects pointer is NULL");
     199        if (this->objects==NULL) _error_("hook is not pointing to any object, objects pointer is NULL");
    200200
    201201        return *objects;
     
    246246
    247247        /*Else, check that we are requesting a half of num*/
    248         if (numindices>this->num) _error2_("Cannot spawn hook with " << numindices << " objects from a Hook of " << this->num << " objects");
     248        if (numindices>this->num) _error_("Cannot spawn hook with " << numindices << " objects from a Hook of " << this->num << " objects");
    249249
    250250        /*go pickup the correct objects, ids and offsets :*/
    251251        output->num=numindices;
    252         if(output->num<1) _error2_("Trying to spawn an empty ElementProperties!");
     252        if(output->num<1) _error_("Trying to spawn an empty ElementProperties!");
    253253
    254254        output->objects=xNew<Object*>(output->num);
  • issm/branches/trunk-jpl-damage/src/c/classes/IoModel.cpp

    r12832 r13101  
    110110                /*Get first Enum*/
    111111                if(fread(&record_enum,sizeof(int),1,this->fid)==0){
    112                         _error2_("Marshalled file is empty");
     112                        _error_("Marshalled file is empty");
    113113                }
    114114                else{
     
    128128                                _printLine_("=========================================================================");
    129129                                _printLine_("");
    130                                 _error2_("Enums not consistent (See error message above)");
     130                                _error_("Enums not consistent (See error message above)");
    131131                        }
    132132                }
     
    177177        /*Find constant*/
    178178        Param* param=(Param*)this->constants->FindParamObject(constant_enum);
    179         if(!param) _error2_("Constant " << EnumToStringx(constant_enum) << " not found in iomodel");
     179        if(!param) _error_("Constant " << EnumToStringx(constant_enum) << " not found in iomodel");
    180180
    181181        return (Param*)param->copy();
     
    266266                                        case 1:
    267267                                                /*Read the boolean and broadcast it to other cpus:*/
    268                                                 if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error2_("could not read boolean ");
     268                                                if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error_("could not read boolean ");
    269269                                                #ifdef _HAVE_MPI_
    270270                                                MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD);
     
    277277                                        case 2:
    278278                                                /*Read the integer and broadcast it to other cpus:*/
    279                                                 if(fread(&integer,sizeof(int),1,this->fid)!=1) _error2_("could not read integer ");
     279                                                if(fread(&integer,sizeof(int),1,this->fid)!=1) _error_("could not read integer ");
    280280                                                #ifdef _HAVE_MPI_
    281281                                                MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD);
     
    288288                                        case 3:
    289289                                                /*Read the scalar and broadcast it to other cpus:*/
    290                                                 if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error2_("could not read scalar ");
     290                                                if(fread(&scalar,sizeof(IssmPDouble),1,this->fid)!=1) _error_("could not read scalar ");
    291291                                                #ifdef _HAVE_MPI_
    292292                                                MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
     
    299299                                        case 4:
    300300                                                /*We have to read a string from disk. First read the dimensions of the string, then the string: */
    301                                                 if(fread(&string_size,sizeof(int),1,this->fid)!=1) _error2_("could not read length of string ");
     301                                                if(fread(&string_size,sizeof(int),1,this->fid)!=1) _error_("could not read length of string ");
    302302                                                #ifdef _HAVE_MPI_
    303303                                                MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD);
     
    309309
    310310                                                        /*Read string, then broadcast: */
    311                                                         if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error2_(" could not read string ");
     311                                                        if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error_(" could not read string ");
    312312                                                        #ifdef _HAVE_MPI_
    313313                                                        MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD);
     
    360360
    361361                                        default:
    362                                                 _error2_("unknown record type:" << record_code);
     362                                                _error_("unknown record type:" << record_code);
    363363                                                break;;
    364364                                }
     
    428428
    429429                                default:
    430                                         _error2_("unknown record type:" << record_code);
     430                                        _error_("unknown record type:" << record_code);
    431431                                        break;;
    432432                                }
     
    453453        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    454454
    455         if(code!=1)_error2_("expecting a boolean for enum " << EnumToStringx(data_enum));
     455        if(code!=1)_error_("expecting a boolean for enum " << EnumToStringx(data_enum));
    456456       
    457457        /*We have to read a boolean from disk. */
    458458        if(my_rank==0){ 
    459                 if(fread(&booleanint,sizeof(int),1,fid)!=1) _error2_("could not read boolean ");
     459                if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_("could not read boolean ");
    460460        }
    461461        #ifdef _HAVE_MPI_
     
    482482        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    483483       
    484         if(code!=2)_error2_("expecting an integer for enum " << EnumToStringx(data_enum));
     484        if(code!=2)_error_("expecting an integer for enum " << EnumToStringx(data_enum));
    485485       
    486486        /*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
    487487        if(my_rank==0){ 
    488                 if(fread(&integer,sizeof(int),1,fid)!=1) _error2_("could not read integer ");
     488                if(fread(&integer,sizeof(int),1,fid)!=1) _error_("could not read integer ");
    489489        }
    490490
     
    512512        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    513513       
    514         if(code!=3)_error2_("expecting a IssmDouble for enum " << EnumToStringx(data_enum));
     514        if(code!=3)_error_("expecting a IssmDouble for enum " << EnumToStringx(data_enum));
    515515       
    516516        /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
    517517        if(my_rank==0){
    518                 if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error2_("could not read scalar ");
     518                if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error_("could not read scalar ");
    519519        }
    520520        #ifdef _HAVE_MPI_
     
    542542        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    543543       
    544         if(code!=4)_error2_("expecting a string for enum " << EnumToStringx(data_enum));
     544        if(code!=4)_error_("expecting a string for enum " << EnumToStringx(data_enum));
    545545       
    546546        /*Now fetch: */
     
    548548        /*We have to read a string from disk. First read the dimensions of the string, then the string: */
    549549        if(my_rank==0){ 
    550                 if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_("could not read length of string ");
     550                if(fread(&string_size,sizeof(int),1,fid)!=1) _error_("could not read length of string ");
    551551        }
    552552
     
    562562                /*Read string on node 0, then broadcast: */
    563563                if(my_rank==0){ 
    564                         if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_(" could not read string ");
     564                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string ");
    565565                }
    566566                #ifdef _HAVE_MPI_
     
    596596        fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
    597597
    598         if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
     598        if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
    599599       
    600600        /*Now fetch: */
     
    603603        /*numberofelements: */
    604604        if(my_rank==0){ 
    605                 if(fread(&M,sizeof(int),1,fid)!=1) _error2_("could not read number of rows for matrix ");
     605                if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
    606606        }
    607607
     
    611611
    612612        if(my_rank==0){ 
    613                 if(fread(&N,sizeof(int),1,fid)!=1) _error2_("could not read number of columns for matrix ");
     613                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
    614614        }
    615615        #ifdef _HAVE_MPI_
     
    623623                /*Read matrix on node 0, then broadcast: */
    624624                if(my_rank==0){ 
    625                         if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
     625                        if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
    626626                }
    627627               
     
    667667        /*Set file pointer to beginning of the data: */
    668668        fid=this->SetFilePointerToData(&code,&vector_type,data_enum);
    669         if((code!=5) && (code!=6) && (code!=7))_error2_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
     669        if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
    670670       
    671671        /*Now fetch: */
     
    674674        /*numberofelements: */
    675675        if(my_rank==0){ 
    676                 if(fread(&M,sizeof(int),1,fid)!=1) _error2_("could not read number of rows for matrix ");
     676                if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
    677677        }
    678678        #ifdef _HAVE_MPI_
     
    681681
    682682        if(my_rank==0){ 
    683                 if(fread(&N,sizeof(int),1,fid)!=1) _error2_("could not read number of columns for matrix ");
     683                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
    684684        }
    685685        #ifdef _HAVE_MPI_
     
    693693                /*Read matrix on node 0, then broadcast: */
    694694                if(my_rank==0){ 
    695                         if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
     695                        if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
    696696                }
    697697                #ifdef _HAVE_MPI_
     
    729729        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    730730       
    731         if(code!=9)_error2_("expecting a string array for enum " << EnumToStringx(data_enum));
     731        if(code!=9)_error_("expecting a string array for enum " << EnumToStringx(data_enum));
    732732       
    733733        /*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */
    734734        if(my_rank==0){ 
    735                 if(fread(&numstrings,sizeof(int),1,fid)!=1) _error2_("could not read length of string array");
     735                if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_("could not read length of string array");
    736736        }
    737737        #ifdef _HAVE_MPI_
     
    748748                       
    749749                        if(my_rank==0){ 
    750                                 if(fread(&string_size,sizeof(int),1,fid)!=1) _error2_("could not read length of string ");
     750                                if(fread(&string_size,sizeof(int),1,fid)!=1) _error_("could not read length of string ");
    751751                        }
    752752                        #ifdef _HAVE_MPI_
     
    759759                                /*Read string on node 0, then broadcast: */
    760760                                if(my_rank==0){ 
    761                                         if(fread(string,string_size*sizeof(char),1,fid)!=1)_error2_(" could not read string ");
     761                                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string ");
    762762                                }
    763763                                #ifdef _HAVE_MPI_
     
    800800        /*Set file pointer to beginning of the data: */
    801801        fid=this->SetFilePointerToData(&code,NULL,data_enum);
    802         if(code!=8)_error2_("expecting a IssmDouble mat array for enum " << EnumToStringx(data_enum));
     802        if(code!=8)_error_("expecting a IssmDouble mat array for enum " << EnumToStringx(data_enum));
    803803       
    804804        /*Now fetch: */
    805805        if(my_rank==0){ 
    806                 if(fread(&numrecords,sizeof(int),1,fid)!=1) _error2_("could not read number of records in matrix array ");
     806                if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array ");
    807807        }
    808808        #ifdef _HAVE_MPI_
     
    827827
    828828                        if(my_rank==0){ 
    829                                 if(fread(&M,sizeof(int),1,fid)!=1) _error2_("could not read number of rows in " << i << "th matrix of matrix array");
     829                                if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows in " << i << "th matrix of matrix array");
    830830                        }
    831831                        #ifdef _HAVE_MPI_
     
    834834
    835835                        if(my_rank==0){ 
    836                                 if(fread(&N,sizeof(int),1,fid)!=1) _error2_("could not read number of columns in " << i << "th matrix of matrix array");
     836                                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns in " << i << "th matrix of matrix array");
    837837                        }
    838838                        #ifdef _HAVE_MPI_
     
    846846                                /*Read matrix on node 0, then broadcast: */
    847847                                if(my_rank==0){ 
    848                                         if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error2_("could not read matrix ");
     848                                        if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
    849849                                }
    850850
     
    912912                          }
    913913                default:
    914                           _error2_("Option of format " << code << " not supported yet");
     914                          _error_("Option of format " << code << " not supported yet");
    915915        }
    916916
     
    941941                _assert_(dataenum<MaximumNumberOfEnums);
    942942                if(this->data[dataenum]){
    943                         _error2_("Info: trying to fetch " << EnumToStringx(dataenum) << " but previous pointer has not been freed (DeleteData has not been called)");
     943                        _error_("Info: trying to fetch " << EnumToStringx(dataenum) << " but previous pointer has not been freed (DeleteData has not been called)");
    944944                }
    945945                #endif
     
    11411141                        break; /*}}}*/
    11421142                default: /*{{{*/
    1143                         _error2_("data code " << code << " not supported yet!");
     1143                        _error_("data code " << code << " not supported yet!");
    11441144                        break;
    11451145                        /*}}}*/
     
    12321232#ifdef _HAVE_MPI_
    12331233        MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD);
    1234         if(!found)_error2_("could not find data with name" << " " << EnumToStringx(data_enum) << " ");
     1234        if(!found)_error_("could not find data with name" << " " << EnumToStringx(data_enum) << " ");
    12351235#endif
    12361236
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/BamgOpts.cpp

    r12821 r13101  
    6060        int i;
    6161
    62         if (this->anisomax<1) _error2_("'anisomax' option should be >=1");
    63         if (this->coeff==0) _error2_("'coeff' should be positive");
    64         if (this->errg<0) _error2_("'errg' option should be >0");
    65         if (this->gradation<1) _error2_("'gradation' option should be >=1");
    66         if (this->Hessiantype!=0  && this->Hessiantype!=1) _error2_("'Hessiantype' supported options are 0 and 1");
    67         if (this->maxnbv<3) _error2_("'maxnbv' option should be >3");
    68         if (this->maxsubdiv<=1) _error2_("'maxsubdiv' should be >1");
    69         if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) _error2_("'Metrictype' supported options are 0, 1 and 2");
    70         if (this->nbjacobi<=0) _error2_("'nbjacobi' option should be >0");
    71         if (this->nbsmooth<=0) _error2_("'nbsmooth' option should be >0");
     62        if (this->anisomax<1) _error_("'anisomax' option should be >=1");
     63        if (this->coeff==0) _error_("'coeff' should be positive");
     64        if (this->errg<0) _error_("'errg' option should be >0");
     65        if (this->gradation<1) _error_("'gradation' option should be >=1");
     66        if (this->Hessiantype!=0  && this->Hessiantype!=1) _error_("'Hessiantype' supported options are 0 and 1");
     67        if (this->maxnbv<3) _error_("'maxnbv' option should be >3");
     68        if (this->maxsubdiv<=1) _error_("'maxsubdiv' should be >1");
     69        if (this->Metrictype!=0   && this->Metrictype!=1 && this->Metrictype!=2) _error_("'Metrictype' supported options are 0, 1 and 2");
     70        if (this->nbjacobi<=0) _error_("'nbjacobi' option should be >0");
     71        if (this->nbsmooth<=0) _error_("'nbsmooth' option should be >0");
    7272
    73         if (this->Crack!=0  && this->Crack!=1) _error2_("'Crack' supported options are 0 and 1");
    74         if (this->KeepVertices!=0 && this->KeepVertices!=1) _error2_("'KeepVertices' supported options are 0 and 1");
    75         if (this->geometricalmetric!=0  && this->geometricalmetric!=1) _error2_("'geometricalmetric' supported options are 0 and 1");
     73        if (this->Crack!=0  && this->Crack!=1) _error_("'Crack' supported options are 0 and 1");
     74        if (this->KeepVertices!=0 && this->KeepVertices!=1) _error_("'KeepVertices' supported options are 0 and 1");
     75        if (this->geometricalmetric!=0  && this->geometricalmetric!=1) _error_("'geometricalmetric' supported options are 0 and 1");
    7676
    77         if (this->hmin<=0) _error2_("'hmin' option should be >0");
    78         if (this->hmax<=0 || this->hmax<this->hmin) _error2_("'hmax' option should be between 0 and hmin=" << this->hmin);
    79         if (this->hminVertices && this->hminVerticesSize[1]!=1) _error2_("'hminVertices' should be a column");
    80         if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error2_("'hmaxVertices' should be a column");
    81         if (this->hVertices && this->hVerticesSize[1]!=1) _error2_("'hVertices' should be a column");
    82         if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error2_("'metric' should have either 1 (iso) or 3 (aniso) columns.");
     77        if (this->hmin<=0) _error_("'hmin' option should be >0");
     78        if (this->hmax<=0 || this->hmax<this->hmin) _error_("'hmax' option should be between 0 and hmin=" << this->hmin);
     79        if (this->hminVertices && this->hminVerticesSize[1]!=1) _error_("'hminVertices' should be a column");
     80        if (this->hmaxVertices && this->hmaxVerticesSize[1]!=1) _error_("'hmaxVertices' should be a column");
     81        if (this->hVertices && this->hVerticesSize[1]!=1) _error_("'hVertices' should be a column");
     82        if (this->metric && (this->metricSize[1]!=1 && this->metricSize[1]!=3)) _error_("'metric' should have either 1 (iso) or 3 (aniso) columns.");
    8383        if (this->field){
    84                 if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error2_("'err' should be of size " << 1 << " x " << this->fieldSize[1]);
    85                 for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error2_("'err' option should be >0");};
     84                if (this->errSize[0]!=1 || this->errSize[1]!=this->fieldSize[1]) _error_("'err' should be of size " << 1 << " x " << this->fieldSize[1]);
     85                for (i=0;i<this->fieldSize[1];i++) {if (this->err[i]<=0) _error_("'err' option should be >0");};
    8686        }
    8787
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/BamgQuadtree.h

    r12835 r13101  
    3131                                        };
    3232                                        /*Object functions*/
    33                                         void    Echo()       {_error2_("not implemented yet"); };
    34                                         void    DeepEcho()   {_error2_("not implemented yet"); };
    35                                         int     Id()         {_error2_("not implemented yet"); };
    36                                         int     MyRank()     {_error2_("not implemented yet"); };
    37                                         int     ObjectEnum() {_error2_("not implemented yet"); };
    38                                         Object *copy()       {_error2_("not implemented yet"); };
     33                                        void    Echo()       {_error_("not implemented yet"); };
     34                                        void    DeepEcho()   {_error_("not implemented yet"); };
     35                                        int     Id()         {_error_("not implemented yet"); };
     36                                        int     MyRank()     {_error_("not implemented yet"); };
     37                                        int     ObjectEnum() {_error_("not implemented yet"); };
     38                                        Object *copy()       {_error_("not implemented yet"); };
    3939                        };
    4040
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/BamgVertex.cpp

    r12821 r13101  
    7676                }
    7777                else{
    78                         _error2_("Metrictype " << Metrictype << " not supported yet (use 0,1 or 2(default))");
     78                        _error_("Metrictype " << Metrictype << " not supported yet (use 0,1 or 2(default))");
    7979                }
    8080
     
    146146                        j = NextEdge[jc];
    147147                        if (k>=2000){
    148                                 _error2_("k>=2000 (Maximum number of iterations reached)");
     148                                _error_("k>=2000 (Maximum number of iterations reached)");
    149149                        }
    150150                } while ( tbegin != tria);
     
    213213                                j = NextEdge[jc];
    214214                                if (k>=2000){
    215                                         _error2_("k>=2000");
     215                                        _error_("k>=2000");
    216216                                }
    217217                        }while ( tbegin != tria);
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/Edge.cpp

    r12821 r13101  
    4545
    4646                /*some shecks*/
    47                 if (!(adj[0]==&e || adj[1]==&e)){ _error2_("Intersection bug"); }
     47                if (!(adj[0]==&e || adj[1]==&e)){ _error_("Intersection bug"); }
    4848                _assert_(adj[0]==&e || adj[1]==&e);
    4949
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/Geometry.cpp

    r12821 r13101  
    7676
    7777                //some checks
    78                 if (bamggeom->Vertices==NULL) _error2_("the domain provided does not contain any vertex");
    79                 if (bamggeom->Edges==NULL) _error2_("the domain provided does not contain any edge");
     78                if (bamggeom->Vertices==NULL) _error_("the domain provided does not contain any vertex");
     79                if (bamggeom->Edges==NULL) _error_("the domain provided does not contain any edge");
    8080
    8181                //Vertices
    8282                if (bamggeom->Vertices){
    8383                        if(verbose>5) _printLine_("      processing Vertices");
    84                         if (bamggeom->VerticesSize[1]!=3) _error2_("Vertices should have 3 columns");
     84                        if (bamggeom->VerticesSize[1]!=3) _error_("Vertices should have 3 columns");
    8585                        vertices = new GeomVertex[nbv];
    8686                        for (i=0;i<nbv;i++) {
     
    115115                         */
    116116                        coefIcoor=(MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
    117                         if(coefIcoor<=0) _error2_("coefIcoor should be positive");
     117                        if(coefIcoor<=0) _error_("coefIcoor should be positive");
    118118                }
    119119                else{
    120                         _error2_("No BamgVertex provided");
     120                        _error_("No BamgVertex provided");
    121121                }
    122122
     
    127127
    128128                        if(verbose>5) _printLine_("      processing Edges");
    129                         if (bamggeom->EdgesSize[1]!=3) _error2_("Edges should have 3 columns");
     129                        if (bamggeom->EdgesSize[1]!=3) _error_("Edges should have 3 columns");
    130130                        edges = new GeomEdge[nbe];
    131131
     
    176176                }
    177177                else{
    178                         _error2_("No edges provided");
     178                        _error_("No edges provided");
    179179                }
    180180
     
    206206                if (bamggeom->TangentAtEdges){
    207207                        if(verbose>5) _printString_("      processing TangentAtEdges");
    208                         if (bamggeom->TangentAtEdgesSize[1]!=4) _error2_("TangentAtEdges should have 4 columns");
     208                        if (bamggeom->TangentAtEdgesSize[1]!=4) _error_("TangentAtEdges should have 4 columns");
    209209                        int n,i,j,k;
    210210                        R2 tg;
     
    216216                                tg.x=bamggeom->TangentAtEdges[k*4+2];
    217217                                tg.y=bamggeom->TangentAtEdges[k*4+3];
    218                                 if (i<0 || i>=nbe) _error2_("TangentAtEdges first index exceeds matrix dimension");
    219                                 if (j!=0 && j!=1)  _error2_("TangentAtEdges second index should be 1 or 2 only");
     218                                if (i<0 || i>=nbe) _error_("TangentAtEdges first index exceeds matrix dimension");
     219                                if (j!=0 && j!=1)  _error_("TangentAtEdges second index should be 1 or 2 only");
    220220                                edges[i].tg[j] = tg;
    221221                        }
     
    225225                if(bamggeom->Corners){
    226226                        if(verbose>5) _printString_("      processing Corners");
    227                         if (bamggeom->CornersSize[1]!=1) _error2_("Corners should have 1 column");
     227                        if (bamggeom->CornersSize[1]!=1) _error_("Corners should have 1 column");
    228228                        n=bamggeom->CornersSize[0];
    229229                        for (i=0;i<n;i++) {     
    230230                                j=(int)bamggeom->Corners[i]-1; //for C indexing
    231                                 if (j>nbv-1 || j<0) _error2_("Bad corner definition: should in [0 " << nbv << "]");
     231                                if (j>nbv-1 || j<0) _error_("Bad corner definition: should in [0 " << nbv << "]");
    232232                                /*Required => at the same time SetRequired and SetCorner*/
    233233                                vertices[j].SetCorner();
     
    239239                if(bamggeom->RequiredVertices){
    240240                        if(verbose>5) _printLine_("      processing RequiredVertices");
    241                         if (bamggeom->RequiredVerticesSize[1]!=1) _error2_("RequiredVertices should have 1 column");
     241                        if (bamggeom->RequiredVerticesSize[1]!=1) _error_("RequiredVertices should have 1 column");
    242242                        n=bamggeom->RequiredVerticesSize[0];
    243243                        for (i=0;i<n;i++) {     
    244244                                j=(int)bamggeom->RequiredVertices[i]-1; //for C indexing
    245                                 if (j>nbv-1 || j<0) _error2_("Bad RequiredVerticess  definition: should in [0 " << nbv << "]");
     245                                if (j>nbv-1 || j<0) _error_("Bad RequiredVerticess  definition: should in [0 " << nbv << "]");
    246246                                vertices[j].SetRequired();
    247247                        }
     
    251251                if(bamggeom->RequiredEdges){
    252252                        if(verbose>5) _printLine_("      processing RequiredEdges");
    253                         if (bamggeom->RequiredEdgesSize[1]!=1) _error2_("RequiredEdges should have 1 column");
     253                        if (bamggeom->RequiredEdgesSize[1]!=1) _error_("RequiredEdges should have 1 column");
    254254                        n=bamggeom->RequiredEdgesSize[0];
    255255                        for (i=0;i<n;i++) {     
    256256                                j=(int)bamggeom->RequiredEdges[i]-1; //for C indexing
    257                                 if (j>nbe-1 || j<0) _error2_("Bad RequiredEdges definition: should in [0 " << nbe << "]");
     257                                if (j>nbe-1 || j<0) _error_("Bad RequiredEdges definition: should in [0 " << nbe << "]");
    258258                                edges[j].SetRequired(); 
    259259                        }
     
    263263                if(bamggeom->SubDomains){
    264264                        if(verbose>5) _printLine_("      processing SubDomains");
    265                         if (bamggeom->SubDomainsSize[1]!=4) _error2_("SubDomains should have 4 columns");
     265                        if (bamggeom->SubDomainsSize[1]!=4) _error_("SubDomains should have 4 columns");
    266266                        nbsubdomains=bamggeom->SubDomainsSize[0];
    267267                        subdomains = new GeomSubDomain[nbsubdomains];
     
    271271                                i2=(int)bamggeom->SubDomains[i*4+2];
    272272                                i3=(int)bamggeom->SubDomains[i*4+3];
    273                                 if (i0!=2) _error2_("Bad Subdomain definition: first number should be 2 (for Edges)");
    274                                 if (i1>nbe || i1<=0) _error2_("Bad Subdomain definition: second number should in [1 " << nbe << "] (edge number)");
     273                                if (i0!=2) _error_("Bad Subdomain definition: first number should be 2 (for Edges)");
     274                                if (i1>nbe || i1<=0) _error_("Bad Subdomain definition: second number should in [1 " << nbe << "] (edge number)");
    275275                                subdomains[i].edge=edges + (i1-1);
    276276                                subdomains[i].direction = (int) i2;
     
    532532                                delete [] head_v;
    533533                                delete [] eangle;
    534                                 _error2_("two points of the geometry are very closed to each other (see reference numbers above)");
     534                                _error_("two points of the geometry are very closed to each other (see reference numbers above)");
    535535                        }
    536536
     
    610610                                delete [] head_v;
    611611                                delete [] eangle;
    612                                 _error2_("Length of edge " << i << " is 0");
     612                                _error_("Length of edge " << i << " is 0");
    613613                        }
    614614                        //compute angle in [-Pi Pi]
     
    704704                                long i1 = n1/2 ,j1=n1%2;
    705705
    706                                 if( edges[i1].v[j1] != edges[i].v[j]) _error2_("Problem while processing edges: check the edge list");
     706                                if( edges[i1].v[j1] != edges[i].v[j]) _error_("Problem while processing edges: check the edge list");
    707707
    708708                                edges[i1].Adj[j1] = edges + i;
     
    831831                GeomEdge* on=e.GeomEdgeHook;
    832832                if (!on){
    833                         _error2_("ProjectOnCurve error message: edge provided should be on geometry");
     833                        _error_("ProjectOnCurve error message: edge provided should be on geometry");
    834834                }
    835835                if (!e[0].GeomEdgeHook ||  !e[1].GeomEdgeHook){
    836                         _error2_("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
     836                        _error_("ProjectOnCurve error message: at least one of the vertex of the edge provided is not on geometry");
    837837                }
    838838
     
    875875                                        _printLine_(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before");
    876876                                        _printLine_("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)");
    877                                         _error2_("see above");
     877                                        _error_("see above");
    878878                                }
    879879                                NbTry++;
     
    895895                                _printLine_(" 2)  code bug : be sure that we call   Mesh::SetVertexFieldOn() before");
    896896                                _printLine_("To solve the problem do a coarsening of the geometrical mesh or change the constant value of mxe (dangerous)");
    897                                 _error2_("see above");
     897                                _error_("see above");
    898898                        }
    899899                        GeomEdge* tmpge = eg1;
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/ListofIntersectionTriangles.cpp

    r12821 r13101  
    3838                // check Size
    3939                if (Size<=0){
    40                         _error2_("Size<=0");
     40                        _error_("Size<=0");
    4141                }
    4242
     
    268268                                k=(*t)(0) ?  ((  (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1  )) : 0;
    269269                                if (k<0){
    270                                         _error2_("k<0");
     270                                        _error_("k<0");
    271271                                }
    272272                                ocut = OppositeEdge[k];
     
    312312                                double dij = detj-deti;
    313313                                if (i+j+k != 0 + 1 +2){
    314                                         _error2_("i+j+k != 0 + 1 +2");
     314                                        _error_("i+j+k != 0 + 1 +2");
    315315                                }
    316316                                ba[j] =  detj/dij;
     
    384384                                        }
    385385                                        else {
    386                                                 _error2_("Bug Split Edge");
     386                                                _error_("Bug Split Edge");
    387387                                        }
    388388                                }
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/ListofIntersectionTriangles.h

    r12821 r13101  
    3434                                        double c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01;
    3535                                        if (lBegin>s || s>lEnd){
    36                                                 _error2_("lBegin>s || s>lEnd");
     36                                                _error_("lBegin>s || s>lEnd");
    3737                                        }
    3838                                        return e->F(sBegin*c0+sEnd*c1);
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/Mesh.cpp

    r12946 r13101  
    117117                          delete [] kk;
    118118                          delete [] refv;
    119                           _error2_("imaxnbv != nbv");
     119                          _error_("imaxnbv != nbv");
    120120                  }
    121121                  for (i=0;i<Tho.nbt;i++)
     
    128128                                if (i0<0 || i1<0 || i2<0){
    129129                                        delete [] refv;
    130                                         _error2_("i0<0 || i1<0 || i2< 0");
     130                                        _error_("i0<0 || i1<0 || i2< 0");
    131131                                }
    132132                                if (i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv){
    133                                         _error2_("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");
     133                                        _error_("i0>=Tho.nbv || i1>=Tho.nbv || i2>=Tho.nbv");
    134134                                }
    135135                                triangles[nbt] = Triangle(this,kk[i0],kk[i1],kk[i2]);
     
    138138                          }
    139139                  if (kt!=nbt){
    140                           _error2_("kt!=nbt");
     140                          _error_("kt!=nbt");
    141141                  }
    142142                  if (nbt==0 && nbv==0) {
    143                           _error2_("All triangles have been removed");
     143                          _error_("All triangles have been removed");
    144144                  }
    145145                  delete [] kk;
     
    153153
    154154                  if (!nbsubdomains){
    155                           _error2_("nbsubdomains==0");
     155                          _error_("nbsubdomains==0");
    156156                  }
    157157                  if (!subdomains[0].head || !subdomains[0].head->link){
    158                           _error2_("!subdomains[0].head || !subdomains[0].head->link");
     158                          _error_("!subdomains[0].head || !subdomains[0].head->link");
    159159                  }
    160160
     
    323323                        }
    324324                }
    325                 if(isorphan) _error2_("Orphan found in mesh, see ids above");
     325                if(isorphan) _error_("Orphan found in mesh, see ids above");
    326326
    327327                /*Clean up*/
     
    362362                }
    363363                else{
    364                         if(verbose>5) _error2_("no Vertices found in the initial mesh");
     364                        if(verbose>5) _error_("no Vertices found in the initial mesh");
    365365                }
    366366
     
    380380                }
    381381                else{
    382                         if(verbose>5) _error2_("no Triangles found in the initial mesh");
     382                        if(verbose>5) _error_("no Triangles found in the initial mesh");
    383383                }
    384384
     
    506506                                //Check value
    507507                                if(!(i>=0 && j>=0 && i<nbe && j<Gh.nbe)) {
    508                                         _error2_("ReadMesh error: EdgesOnGeomEdge edge provided (line " << i1+1 << ": [" << i+1 << " " << j+1 << "]) is incorrect (must be positive, [0<i<nbe=" << nbe << " 0<j<Gh.nbe=" << Gh.nbe << "]");
     508                                        _error_("ReadMesh error: EdgesOnGeomEdge edge provided (line " << i1+1 << ": [" << i+1 << " " << j+1 << "]) is incorrect (must be positive, [0<i<nbe=" << nbe << " 0<j<Gh.nbe=" << Gh.nbe << "]");
    509509                                }
    510510                                edges[i].GeomEdgeHook=Gh.edges+j;
     
    522522                                head=(int)bamgmesh->SubDomains[i*3+1]-1;//C indexing
    523523                                direction=(int)bamgmesh->SubDomains[i*3+2];
    524                                 if (i3!=23) _error2_("Bad Subdomain definition: first number should be 3");
    525                                 if (head<0 || head>=nbt) _error2_("Bad Subdomain definition: head should in [1 " << nbt << "] (triangle number)");
     524                                if (i3!=23) _error_("Bad Subdomain definition: first number should be 3");
     525                                if (head<0 || head>=nbt) _error_("Bad Subdomain definition: head should in [1 " << nbt << "] (triangle number)");
    526526                                subdomains[i].head = triangles+head;
    527527                        }
     
    567567                                for (j=0;j<3;j++){
    568568                                        int v=GetId(triangles[i][j]); //jth vertex of the ith triangle
    569                                         if (k>3*nbt-1 || k<0) _error2_("k = " << k << ", nbt = " << nbt);
     569                                        if (k>3*nbt-1 || k<0) _error_("k = " << k << ", nbt = " << nbt);
    570570                                        next_1[k]=head_1[v];
    571                                         if (v>nbv-1 || v<0)   _error2_("v = " << v << ", nbv = " << nbv);
     571                                        if (v>nbv-1 || v<0)   _error_("v = " << v << ", nbv = " << nbv);
    572572                                        head_1[v]=k++;
    573573                                        connectivitysize_1[v]+=1;
     
    707707                                }
    708708                                if (!stop){
    709                                         _error2_("Element holding segment [" << i1+1 << " " << i2+1 << "] not found...");
     709                                        _error_("Element holding segment [" << i1+1 << " " << i2+1 << "] not found...");
    710710                                }
    711711                        }
     
    805805                                const VertexOnGeom &v=VerticesOnGeomEdge[i];
    806806                                if (!v.OnGeomEdge()){
    807                                         _error2_("A vertices supposed to be OnGeomEdge is actually not");
     807                                        _error_("A vertices supposed to be OnGeomEdge is actually not");
    808808                                }
    809809                                bamgmesh->VerticesOnGeomEdge[i*3+0]=GetId((BamgVertex*)v)+1; //back to Matlab indexing
     
    888888                        for (j=0;j<2;j++){
    889889                                int v=(int)bamgmesh->IssmEdges[i*i2+j]-1; //back to C indexing
    890                                 if (k>2*i1-1 || k<0) _error2_("Index exceed matrix dimensions (k=" << k << " not in [0 " << 2*i1-1 << "]");
     890                                if (k>2*i1-1 || k<0) _error_("Index exceed matrix dimensions (k=" << k << " not in [0 " << 2*i1-1 << "]");
    891891                                next_2[k]=head_2[v];
    892                                 if (v>nbv-1 || v<0)   _error2_("Index exceed matrix dimensions (v=" << v << " not in [0 " << nbv-1 << "])");
     892                                if (v>nbv-1 || v<0)   _error_("Index exceed matrix dimensions (v=" << v << " not in [0 " << nbv-1 << "])");
    893893                                head_2[v]=k++;
    894894                                connectivitysize_2[v]+=1;
     
    10611061                //check that hmax is positive
    10621062                if (hmax<=0){
    1063                         _error2_("hmax<=0");
     1063                        _error_("hmax<=0");
    10641064                }
    10651065
     
    10901090
    10911091                                if (ht<=0 || hn<=0){
    1092                                         _error2_("ht<=0 || hn<=0");
     1092                                        _error_("ht<=0 || hn<=0");
    10931093                                }
    10941094                                EigenMetric Vp(1/(ht*ht),1/(hn*hn),tg);
     
    11151115                }
    11161116                else{
    1117                         _error2_("Hessiantype " << Hessiantype << " not supported yet (1->use Green formula, 0-> double P2 projection)");
     1117                        _error_("Hessiantype " << Hessiantype << " not supported yet (1->use Green formula, 0-> double P2 projection)");
    11181118                }
    11191119        }
     
    11591159                //some checks
    11601160                if (( infvertexindex <0 ) && (detOld <0) ||  ( infvertexindex >=0  ) && (detOld >0) ){
    1161                         _error2_("inconsistent configuration (Contact ISSM developers)");
     1161                        _error_("inconsistent configuration (Contact ISSM developers)");
    11621162                }
    11631163
     
    12011201                        }
    12021202                        else{
    1203                                 _error2_("Cannot add a vertex more than once. Check duplicates");
     1203                                _error_("Cannot add a vertex more than once. Check duplicates");
    12041204                        }
    12051205                }
     
    12141214                tt[2]= &triangles[nbt++];
    12151215
    1216                 if (nbt>maxnbt) _error2_("Not enough triangles");
     1216                if (nbt>maxnbt) _error_("Not enough triangles");
    12171217
    12181218                *tt[1]=*tt[2]=*t;
     
    12511251
    12521252                        if (!rswap) {
    1253                                 _error2_("swap the point s is on a edge");
     1253                                _error_("swap the point s is on a edge");
    12541254                        }
    12551255                }
     
    13181318                //check that the mesh is not empty
    13191319                if (nbt<=0 || nbv <=0 ) {
    1320                         _error2_("nbt or nbv is negative (Mesh empty?)");
     1320                        _error_("nbt or nbv is negative (Mesh empty?)");
    13211321                }
    13221322
     
    13401340                if (nbe !=  edge4->nb()){
    13411341                        delete [] st;
    1342                         _error2_("Some Double edge in the mesh, the number is " << nbe << ", nbe4=" << edge4->nb());
     1342                        _error_("Some Double edge in the mesh, the number is " << nbe << ", nbe4=" << edge4->nb());
    13431343                }
    13441344                //keep nbe in nbeold
     
    13601360                                        //check that it is not an edge on boundary (should not already exist)
    13611361                                        if (triangles[i].TriangleAdj(j) || triangles[st[k]/3].TriangleAdj((int) (st[k]%3))){
    1362                                                 _error2_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");
     1362                                                _error_("problem in Geometry reconstruction: an edge on boundary is duplicated (double element?)");
    13631363                                        }
    13641364                                        //OK, the element is not on boundary, is belongs to 2 triangles -> build Adjacent triangles list
     
    13781378                                        _printLine_("Edge " << (-st[k]+2)%3 << " of triangle " << (-st[k]+2)/3);
    13791379                                        _printLine_("Edge " << triangles[(-st[k]+2)/3].NuEdgeTriangleAdj((int)((-st[k]+2)%3)) << " of triangle " << GetId(triangles[(-st[k]+2)/3].TriangleAdj((int)((-st[k]+2)%3))));
    1380                                         _error2_("An edge belongs to more than 2 triangles");
     1380                                        _error_("An edge belongs to more than 2 triangles");
    13811381                                }       
    13821382                        }
     
    14601460                        //check that we have been through all edges
    14611461                        if (k!=nbe){
    1462                                 _error2_("problem in edge construction process: k!=nbe (should not happen)");
     1462                                _error_("problem in edge construction process: k!=nbe (should not happen)");
    14631463                        }
    14641464                        //delete edgessave
     
    15051505                                        //check that we have the correct vertex
    15061506                                        if (v!=edges[i0 ].v[j0]){
    1507                                                 _error2_("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");
     1507                                                _error_("v!=edges[i0 ].v[j0]: this should not happen as the vertex belongs to this edge");
    15081508                                        }
    15091509
     
    15221522                //check that nbsubdomains is empty
    15231523                if (nbsubdomains){
    1524                         _error2_("nbsubdomains should be 0");
     1524                        _error_("nbsubdomains should be 0");
    15251525                }
    15261526                nbsubdomains=0;
     
    15911591                if (k!= nbsubdomains){
    15921592                        delete [] colorT;
    1593                         _error2_("k!= nbsubdomains");
     1593                        _error_("k!= nbsubdomains");
    15941594                }
    15951595                //delete colorT and st
     
    16521652                if (Gh.coefIcoor<=0){
    16531653                        delete [] colorV;
    1654                         _error2_("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");
     1654                        _error_("Gh.coefIcoor<=0 in infered Geometry (this should not happen)");
    16551655                }
    16561656
     
    17051705                                delete [] len;
    17061706                                delete [] colorV;
    1707                                 _error2_("problem in Edge4 construction: k != i");
     1707                                _error_("problem in Edge4 construction: k != i");
    17081708                        }
    17091709                }
     
    17341734                        }
    17351735                        else
    1736                          _error2_("%i should be >=0");
     1736                         _error_("%i should be >=0");
    17371737                  }
    17381738
     
    17681768
    17691769                /*Check size*/
    1770                 if (bamgopts->fieldSize[0] != nbv) _error2_("'field' should have " << nbv << " rows");
     1770                if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have " << nbv << " rows");
    17711771
    17721772                //initialization of some variables
     
    19731973
    19741974                /*Check size*/
    1975                 if (bamgopts->fieldSize[0] != nbv) _error2_("'field' should have " << nbv << " rows");
     1975                if (bamgopts->fieldSize[0] != nbv) _error_("'field' should have " << nbv << " rows");
    19761976
    19771977                //initialization of some variables
     
    22982298                                if (splitvertex[i1]==3 || splitvertex[i2]==3){
    22992299                                        delete [] splitvertex;
    2300                                         _error2_("Crossing rifts not supported yet");
     2300                                        _error_("Crossing rifts not supported yet");
    23012301                                }
    23022302                        }
     
    23762376                                //_printLine_(element_renu[GetId(ta.t)] << " -> " << GetId((*ta.t)[0])+1 << " " << GetId((*ta.t)[1])+1 << " " << GetId((*ta.t)[2])+1 << ", edge [" << i1 << "->" << j1 << " " << i2 << "->" << j2 << "]");
    23772377                                ta = Next(ta).Adj();
    2378                                 if (count++>50) _error2_("Maximum number of iteration exceeded");
     2378                                if (count++>50) _error_("Maximum number of iteration exceeded");
    23792379                        }while ((tbegin != ta));
    23802380                }
     
    23832383                for(i=0;i<NbCrackedEdges;i++){
    23842384                        if (Edgeflags[i]!=2){
    2385                                 _error2_("A problem occured: at least one crack edge (number " << i+1 << ") does not belong to 2 elements");
     2385                                _error_("A problem occured: at least one crack edge (number " << i+1 << ") does not belong to 2 elements");
    23862386                        }
    23872387                }
     
    24332433                        }
    24342434                        if (k!=0) {
    2435                                 _error2_("there is " << k << " triangles of mes = 0");
     2435                                _error_("there is " << k << " triangles of mes = 0");
    24362436                        }
    24372437
     
    24472447                                if (nbswp) nbfe++;
    24482448                                if ( nbswp < 0 && k < 5){
    2449                                         _error2_("Missing Edge " << i << ", v0=" << GetId(edges[i][0]) << ",v1=" << GetId(edges[i][1]));
     2449                                        _error_("Missing Edge " << i << ", v0=" << GetId(edges[i][0]) << ",v1=" << GetId(edges[i][1]));
    24502450                                }
    24512451                        }
    24522452
    24532453                        if (k!=0) {
    2454                                 _error2_("There are " << k << " lost edges, the boundary might be crossing");
     2454                                _error_("There are " << k << " lost edges, the boundary might be crossing");
    24552455                        }
    24562456                        for (int j=0;j<nbv;j++){
     
    25342534                        if (nbt == nbtout ||  !NbSubDomTot) {
    25352535                                delete [] HeapArete;
    2536                                 _error2_("The boundary is not close: all triangles are outside");
     2536                                _error_("The boundary is not close: all triangles are outside");
    25372537                        }
    25382538
     
    25722572                                                if (k!=nbsubdomains){
    25732573                                                        delete [] mark;
    2574                                                         _error2_("k!=nbsubdomains");
     2574                                                        _error_("k!=nbsubdomains");
    25752575                                                }
    25762576                                                if(OutSide)
     
    26622662                                                         subdomains[i].head=t=ta;
    26632663                                                        if(t<triangles || t >= triangles+nbt || t->det < 0 || t->link == 0) {
    2664                                                                 _error2_("bad definition of SubSomain " << i);
     2664                                                                _error_("bad definition of SubSomain " << i);
    26652665                                                        }
    26662666                                                        long it = GetId(t);
     
    26772677                                                                kkk++;
    26782678                                                                if (mark[GetId(tt)]>=0){
    2679                                                                         _error2_("mark[GetId(tt)]>=0");
     2679                                                                        _error_("mark[GetId(tt)]>=0");
    26802680                                                                }
    26812681                                                                mark[GetId(tt)]=i;
     
    26862686                                                ta = Previous(Adj(ta));         
    26872687                                                if(t == (Triangle *) ta) {
    2688                                                         _error2_("bad definition of SubSomain " << i);
     2688                                                        _error_("bad definition of SubSomain " << i);
    26892689                                                }
    26902690                                        }
     
    28482848                        //if i is higher than nbv, it means that all the determinants are 0,
    28492849                        //all vertices are aligned!
    2850                         if  (++i>=nbv) _error2_("all the vertices are aligned");
     2850                        if  (++i>=nbv) _error_("all the vertices are aligned");
    28512851                }
    28522852                // exchange i et 2 in "orderedvertices" so that
     
    29842984                                long  j=vj.ReferenceNumber;
    29852985                                if (&vj!=orderedvertices[j]){
    2986                                         _error2_("&vj!= orderedvertices[j]");
     2986                                        _error_("&vj!= orderedvertices[j]");
    29872987                                }
    29882988                                if(i!=j){
     
    29942994                                if (tcvj && !tcvj->link){
    29952995                                        tcvj->Echo();
    2996                                         _error2_("problem inserting point in InsertNewPoints (tcvj=" << tcvj << " and tcvj->link=" << tcvj->link << ")");
     2996                                        _error_("problem inserting point in InsertNewPoints (tcvj=" << tcvj << " and tcvj->link=" << tcvj->link << ")");
    29972997                                }
    29982998                                quadtree->Add(vj);
     
    30263026
    30273027                if (!Gh.nbe){
    3028                         _error2_("!Gh.nbe");
     3028                        _error_("!Gh.nbe");
    30293029                }
    30303030                Edge **e= new (Edge* [Gh.nbe]);
     
    30593059                        }
    30603060                }
    3061                 if(kk) _error2_("See above");
     3061                if(kk) _error_("See above");
    30623062
    30633063                return e;
     
    32583258                                //check i
    32593259                                if (i<0 || i>=nbt ){
    3260                                         _error2_("Index problem in NewPoints (i=" << i << " not in [0 " << nbt-1 << "])");
     3260                                        _error_("Index problem in NewPoints (i=" << i << " not in [0 " << nbt-1 << "])");
    32613261                                }
    32623262                                //change first_np_or_next_t[i]
     
    33093309                                        }
    33103310                                        if (ta.EdgeVertex(0)!=s){
    3311                                                 _error2_("ta.EdgeVertex(0)!=s");
     3311                                                _error_("ta.EdgeVertex(0)!=s");
    33123312                                        }
    33133313                                        ta = Next(Adj(ta));
     
    33443344                }
    33453345                else {
    3346                         _error2_("ProjectOnCurve On BamgVertex " << BTh.GetId(vA) << " forget call to SetVertexFieldOnBTh");
     3346                        _error_("ProjectOnCurve On BamgVertex " << BTh.GetId(vA) << " forget call to SetVertexFieldOnBTh");
    33473347                }
    33483348
     
    33553355                }
    33563356                else {
    3357                         _error2_("ProjectOnCurve On BamgVertex " << BTh.GetId(vB) << " forget call to SetVertexFieldOnBTh");
     3357                        _error_("ProjectOnCurve On BamgVertex " << BTh.GetId(vB) << " forget call to SetVertexFieldOnBTh");
    33583358                }
    33593359                Edge * e = &BhAB;
    33603360                if (!pA || !pB || !e){
    3361                         _error2_("!pA || !pB || !e");
     3361                        _error_("!pA || !pB || !e");
    33623362                }
    33633363                // be carefull the back ground edge e is on same geom edge
     
    33653365                //check Is a background Mesh;   
    33663366                if (e<BTh.edges || e>=BTh.edges+BTh.nbe){
    3367                         _error2_("e<BTh.edges || e>=BTh.edges+BTh.nbe");
     3367                        _error_("e<BTh.edges || e>=BTh.edges+BTh.nbe");
    33683368                }
    33693369                // walk on BTh edge
     
    33883388                  }
    33893389                else{ // do the search by walking
    3390                         _error2_("case not supported yet");
     3390                        _error_("case not supported yet");
    33913391                  }
    33923392
     
    34523452
    34533453                  }
    3454                 _error2_("Big bug...");
     3454                _error_("Big bug...");
    34553455                return 0; // just for the compiler
    34563456        }                 
     
    34933493        }
    34943494        if (kk != nbe){
    3495                 _error2_("There are " << kk-nbe << " double edges in the mesh");
     3495                _error_("There are " << kk-nbe << " double edges in the mesh");
    34963496        }
    34973497
     
    35253525                        //An edge belongs to 2 triangles
    35263526                        else {
    3527                                 _error2_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << " , " << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles");
     3527                                _error_("The edge (" << GetId(triangles[i][VerticesOfTriangularEdge[j][0]]) << " , " << GetId(triangles[i][VerticesOfTriangularEdge[j][1]]) << ") belongs to more than 2 triangles");
    35283528                        }
    35293529                }
     
    35633563        }
    35643564        if(k) {
    3565                 _error2_(k << " boundary edges (from the geometry) are not defined as mesh edges");
     3565                _error_(k << " boundary edges (from the geometry) are not defined as mesh edges");
    35663566        }
    35673567
     
    35903590        for (i=2;det(orderedvertices[0]->i,orderedvertices[1]->i,orderedvertices[i]->i)==0;)
    35913591         if  (++i>=nbvb) {
    3592                  _error2_("ReconstructExistingMesh: All the vertices are aligned");
     3592                 _error_("ReconstructExistingMesh: All the vertices are aligned");
    35933593         }
    35943594        //Move this vertex (i) to the 2d position in orderedvertices
     
    36503650        }
    36513651        if(nbloss) {
    3652                 _error2_("we lost " << nbloss << " existing edges other " << knbe);
     3652                _error_("we lost " << nbloss << " existing edges other " << knbe);
    36533653        }
    36543654
     
    37253725        subdomains = savesubdomains;
    37263726        if (k) {
    3727                 _error2_("number of triangles edges alone = " << k);
     3727                _error_("number of triangles edges alone = " << k);
    37283728        }
    37293729        FindSubDomain();
     
    37553755
    37563756                                                _printLine_("This edge is on geometry and has no adjacent edge (open curve) and one of the tip is not required");
    3757                                                 _error2_("See above (might be cryptic...)");
     3757                                                _error_("See above (might be cryptic...)");
    37583758                                        }
    37593759                                }
     
    37783778                        t=t0=subdomains[i].head;
    37793779                        if (!t0){ // not empty sub domain
    3780                                 _error2_("!t0");
     3780                                _error_("!t0");
    37813781                        }
    37823782                        do {
    37833783                                long kt = GetId(t);
    37843784                                if (kt<0 || kt >= nbt ){
    3785                                         _error2_("kt<0 || kt >= nbt");
     3785                                        _error_("kt<0 || kt >= nbt");
    37863786                                }
    37873787                                if (renu[kt]!=-1){
    3788                                         _error2_("renu[kt]!=-1");
     3788                                        _error_("renu[kt]!=-1");
    37893789                                }
    37903790                                renu[kt]=k++;
     
    38033803                }
    38043804                if (k != nbt){
    3805                         _error2_("k != nbt");
     3805                        _error_("k != nbt");
    38063806                }
    38073807                // do the change on all the pointeur
     
    39293929        coefIcoor= (MaxICoor)/(Max(pmax.x-pmin.x,pmax.y-pmin.y));
    39303930        if (coefIcoor<=0){
    3931                 _error2_("coefIcoor should be positive, a problem in the geometry is likely");
     3931                _error_("coefIcoor should be positive, a problem in the geometry is likely");
    39323932        }
    39333933
     
    39653965        }
    39663966
    3967         if (number_of_errors) _error2_("Fatal error: some triangles have negative areas, see above");
     3967        if (number_of_errors) _error_("Fatal error: some triangles have negative areas, see above");
    39683968}
    39693969/*}}}*/
     
    41464146                        register Triangle* t= vertices[i].t;
    41474147                        if (!t){
    4148                                 _error2_("!t");
     4148                                _error_("!t");
    41494149                        }
    41504150                        BamgVertex & vi = vertices[i];
     
    41544154                                ta=Previous(Adj(ta));
    41554155                                if (vertices+i != ta.EdgeVertex(1)){
    4156                                         _error2_("vertices+i != ta.EdgeVertex(1)");
     4156                                        _error_("vertices+i != ta.EdgeVertex(1)");
    41574157                                }
    41584158                                BamgVertex & vj = *(ta.EdgeVertex(0));
     
    41604160                                        j= &vj-vertices;
    41614161                                        if (j<0 || j >= nbv){
    4162                                                 _error2_("j<0 || j >= nbv");
     4162                                                _error_("j<0 || j >= nbv");
    41634163                                        }
    41644164                                        R2 Aij = (R2) vj - (R2) vi;
     
    42844284                                        // the first PB is to now a background edge between the 2 vertices
    42854285                                        if (!edgesGtoB){
    4286                                                 _error2_("!edgesGtoB");
     4286                                                _error_("!edgesGtoB");
    42874287                                        }
    42884288                                        ong= ProjectOnCurve(*edgesGtoB[Gh.GetId(edges[i].GeomEdgeHook)],
     
    43564356                        Triangle & t = triangles[i];
    43574357                        if (!t.link){
    4358                                 _error2_("!t.link");
     4358                                _error_("!t.link");
    43594359                        }
    43604360                        for(int j=0;j<3;j++)
     
    43834383                                                                                ||   (cc=Area2( t[0].r , t[1].r , A.r    )) < 0.0)){
    43844384                                                        _printLine_(ke + nbvold << " not in triangle " << i << " In= " << !!t.link << " " << aa << " " << bb << " " << cc << " " << dd);
    4385                                                         _error2_("Number of triangles with P2 interpolation Problem");
     4385                                                        _error_("Number of triangles with P2 interpolation Problem");
    43864386                                                }
    43874387                                        }
     
    43914391                                                                                ||   (cc=Area2( tt[0].r , tt[1].r , A.r     )) < 0)){
    43924392                                                        _printLine_(ke + nbvold << " not in triangle " << ii << " In= " << !!tt.link << " " << aa << " " << bb << " " << cc << " " << dd);
    4393                                                         _error2_("Number of triangles with P2 interpolation Problem");
     4393                                                        _error_("Number of triangles with P2 interpolation Problem");
    43944394                                                }
    43954395                                        }
     
    44394439                                                  } // tt
    44404440                                                else
    4441                                                  _error2_("Bug...");
     4441                                                 _error_("Bug...");
    44424442                                          } // ke<0           
    44434443                                        else
     
    44524452                          }
    44534453                        if (nbinvisible>=2){
    4454                                 _error2_("nbinvisible>=2");
     4454                                _error_("nbinvisible>=2");
    44554455                        }
    44564456                        switch (nbsplitedge) {
     
    44644464                        }
    44654465                        if (ksplit[i]<40){
    4466                                 _error2_("ksplit[i]<40");
     4466                                _error_("ksplit[i]<40");
    44674467                        }
    44684468                  }
     
    44814481                        int  ke=(int) (ksplit[i]%10);
    44824482                        if (kk>=7 || kk<=0){
    4483                                 _error2_("kk>=7 || kk<=0");
     4483                                _error_("kk>=7 || kk<=0");
    44844484                        }
    44854485
     
    44984498
    44994499                        if (nbmkadj>=10){
    4500                                 _error2_("nbmkadj>=10");
     4500                                _error_("nbmkadj>=10");
    45014501                        }
    45024502                        // --------------------------
     
    45164516                                                        t1=t0;
    45174517                                                        if (kedge[3*i+i0]<0){
    4518                                                                 _error2_("kedge[3*i+i0]<0");
     4518                                                                _error_("kedge[3*i+i0]<0");
    45194519                                                        }
    45204520                                                        BamgVertex * v3 = vertices + kedge[3*i+k0];
     
    45324532                                                        t2=t1=t0;
    45334533                                                        if (kedge[3*i+k1]<0){
    4534                                                                 _error2_("kedge[3*i+k1]<0");
     4534                                                                _error_("kedge[3*i+k1]<0");
    45354535                                                        }
    45364536                                                        if (kedge[3*i+k2]<0){
    4537                                                                 _error2_("kedge[3*i+k2]<0");
     4537                                                                _error_("kedge[3*i+k2]<0");
    45384538                                                        }
    45394539
     
    45594559                                                        t3=t2=t1=t0;
    45604560                                                        if (kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0){
    4561                                                                 _error2_("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");
     4561                                                                _error_("kedge[3*i+k0] <0 || kedge[3*i+k1]<0 || kedge[3*i+k2]<0");
    45624562                                                        }
    45634563                                                        BamgVertex * v12 = vertices + kedge[3*i+k0];
     
    46334633                                }
    46344634                        if (nbmkadj>13){// 13 = 6 + 4 +
    4635                                 _error2_("nbmkadj>13");
     4635                                _error_("nbmkadj>13");
    46364636                        }
    46374637
     
    47594759                        quadtree->Add(vi);
    47604760                        if (!tcvi || tcvi->det<0){// internal
    4761                                 _error2_("!tcvi || tcvi->det < 0");
     4761                                _error_("!tcvi || tcvi->det < 0");
    47624762                        }
    47634763                        AddVertex(vi,tcvi,det3);
     
    48024802
    48034803                /*Check that the quadtree does exist*/
    4804                 if (!quadtree) _error2_("no starting triangle provided and no quadtree available");
     4804                if (!quadtree) _error_("no starting triangle provided and no quadtree available");
    48054805
    48064806                /*Call NearestVertex*/
     
    48084808
    48094809                /*Check output (Vertex a)*/
    4810                 if (!a)    _error2_("problem while trying to find nearest vertex from a given point. No output found");
    4811                 if (!a->t) _error2_("no triangle is associated to vertex number " << GetId(a)+1 << " (orphan?)");
     4810                if (!a)    _error_("problem while trying to find nearest vertex from a given point. No output found");
     4811                if (!a->t) _error_("no triangle is associated to vertex number " << GetId(a)+1 << " (orphan?)");
    48124812                _assert_(a>=vertices && a<vertices+nbv);
    48134813
     
    48444844
    48454845                /*Increase counter*/
    4846                 if (++counter>=10000) _error2_("Maximum number of iteration reached (threshold = " << counter << ").");
     4846                if (++counter>=10000) _error_("Maximum number of iteration reached (threshold = " << counter << ").");
    48474847
    48484848                j= OppositeVertex[jj];
     
    49084908
    49094909                //check that the subdomain is not empty
    4910                 if (!t0){ _error2_("At least one subdomain is empty");}
     4910                if (!t0){ _error_("At least one subdomain is empty");}
    49114911
    49124912                //loop
     
    49914991                //allocate
    49924992                VerticesOnGeomVertex = new VertexOnGeom[NbVerticesOnGeomVertex]; 
    4993                 if(NbVerticesOnGeomVertex >= maxnbv) _error2_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
     4993                if(NbVerticesOnGeomVertex >= maxnbv) _error_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
    49944994                _assert_(nbv==0);
    49954995                //Build VerticesOnGeomVertex
     
    50805080                                                                NbNewPoints=0;
    50815081                                                                NbEdgeCurve=0;
    5082                                                                 if (nbvend>=maxnbv) _error2_("maximum number of vertices too low! Check the domain outline or increase maxnbv");
     5082                                                                if (nbvend>=maxnbv) _error_("maximum number of vertices too low! Check the domain outline or increase maxnbv");
    50835083                                                                lcurve =0;
    50845084                                                                s = lstep; //-1 initially, then length of each sub edge
     
    53225322                printf("\n");
    53235323                if(NbVerticesOnGeomVertex >= maxnbv){
    5324                         _error2_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
     5324                        _error_("too many vertices on geometry: " << NbVerticesOnGeomVertex << " >= " << maxnbv);
    53255325                }
    53265326
     
    53935393                if (bfind!=Gh.nbcurves){
    53945394                        delete [] bcurve;
    5395                         _error2_("problem generating number of curves (" << Gh.nbcurves << " found in the geometry but " << bfind << " curve found in the mesh)");
     5395                        _error_("problem generating number of curves (" << Gh.nbcurves << " found in the geometry but " << bfind << " curve found in the mesh)");
    53965396                }
    53975397
     
    54925492                                                                        double se= (sNew-L0)/LAB;
    54935493                                                                        if (se<0 || se>=1.000000001){
    5494                                                                                 _error2_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
     5494                                                                                _error_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
    54955495                                                                        }
    54965496                                                                        se = abscisseInterpole(v0.m,v1.m,AB,se,1);
    54975497                                                                        if (se<0 || se>1){
    5498                                                                                 _error2_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
     5498                                                                                _error_("Problem creating point on a boundary: se=" << se << " should be in [0 1]");
    54995499                                                                        }
    55005500                                                                        se = k1         ? se : 1. - se;
     
    55285528                                                        }
    55295529                                                        if (!ee.adj[k1]) {
    5530                                                                 _error2_("adj edge " << BTh.GetId(ee) << ", nbe=" << nbe << ", Gh.vertices=" << Gh.vertices);
     5530                                                                _error_("adj edge " << BTh.GetId(ee) << ", nbe=" << nbe << ", Gh.vertices=" << Gh.vertices);
    55315531                                                        }
    55325532                                                        pe = ee.adj[k1]; // next edge
     
    55665566                        if(step==0){
    55675567                                if(nbv+NbOfNewPoints > maxnbv) {
    5568                                         _error2_("too many vertices on geometry: " << nbv+NbOfNewPoints << " >= " << maxnbv);
     5568                                        _error_("too many vertices on geometry: " << nbv+NbOfNewPoints << " >= " << maxnbv);
    55695569                                }
    55705570                                edges = new Edge[NbOfNewEdge];
     
    56115611                int dir=0;
    56125612                if (k<0){
    5613                         _error2_("k<0");
     5613                        _error_("k<0");
    56145614                }
    56155615                int kkk=0; 
     
    56195619                        kkk++;
    56205620                        if (kkk>=1000){
    5621                                 _error2_("kkk>=1000");
     5621                                _error_("kkk>=1000");
    56225622                        }
    56235623                        BamgVertex  &vI =  *edge.EdgeVertex(0);
     
    56365636                                                        double IJ2 = IJ_IA + IJ_AJ;
    56375637                                                        if (IJ2==0){
    5638                                                                 _error2_("IJ2==0");
     5638                                                                _error_("IJ2==0");
    56395639                                                        }
    56405640                                                        a= IJ_AJ/IJ2;
     
    56505650        int NbSwap =0;
    56515651        if (!a.t || !b.t){ // the 2 vertex is in a mesh
    5652                 _error2_("!a.t || !b.t");
     5652                _error_("!a.t || !b.t");
    56535653        }
    56545654        int k=0;
     
    56675667                vbegin =v2;
    56685668                if (!v2){
    5669                         _error2_("!v2");
     5669                        _error_("!v2");
    56705670                }
    56715671                det2 = det(*v2,a,b);
     
    56845684                        tc = Previous(tc);
    56855685                        if (!v1 || !v2){
    5686                                 _error2_("!v1 || !v2");
     5686                                _error_("!v1 || !v2");
    56875687                        }
    56885688                        Icoor2 detss = 0,l=0,ks;
    56895689                        while ((ks=SwapForForcingEdge(  va,  vb, tc, detss, det1,det2,NbSwap)))
    56905690                         if(l++ > 10000000) {
    5691                                  _error2_("Loop in forcing Egde, nb de swap=" << NbSwap << ", nb of try swap (" << l << ") too big");
     5691                                 _error_("Loop in forcing Egde, nb de swap=" << NbSwap << ", nb of try swap (" << l << ") too big");
    56925692                         }
    56935693                        BamgVertex *aa = tc.EdgeVertex(0), *bb = tc.EdgeVertex(1);
     
    57085708                k++;
    57095709                if (k>=2000){
    5710                         _error2_("k>=2000");
     5710                        _error_("k>=2000");
    57115711                }
    57125712                if ( vbegin == v2 ) return -1;// error
     
    57805780                short a1=tt1,a2=tt2;// les 2 numero de l arete dans les 2 triangles
    57815781                if ( a1<0 || a1>=3 ){
    5782                         _error2_("a1<0 || a1>=3");
     5782                        _error_("a1<0 || a1>=3");
    57835783                }
    57845784
     
    57925792                Icoor2 detT = det1+det2;
    57935793                if ((det1<=0 ) || (det2<=0)){
    5794                         _error2_("(det1<=0 ) || (det2<=0)");
     5794                        _error_("(det1<=0 ) || (det2<=0)");
    57955795                }
    57965796                if ( (detsa>=0) || (detsb<=0) ){ // [a,b] cut infinite line va,bb
    5797                         _error2_("(detsa>=0) || (detsb<=0)");
     5797                        _error_("(detsa>=0) || (detsb<=0)");
    57985798                }
    57995799                Icoor2 ndet1 = bamg::det(s1,sa,s2);
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/Metric.cpp

    r12821 r13101  
    197197                // warning for optimisation S is in [0:0.5] not in [0:1]
    198198                if (i>=512){
    199                         _error2_("i>=512");
     199                        _error_("i>=512");
    200200                }
    201201                LastMetricInterpole.lab=l;
     
    345345                }
    346346                if (r>1 || r<0){
    347                         _error2_("r>1 || r<0");
     347                        _error_("r>1 || r<0");
    348348                }
    349349                return r ;
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/SetOfE4.cpp

    r12821 r13101  
    5050                //check that nbax <=NbOfEdges
    5151                if (nbax <=NbOfEdges ) {
    52                         _error2_("SetOfEdges4::add overflow: NbOfEdges=" << NbOfEdges << " > nbax=" << nbax);
     52                        _error_("SetOfEdges4::add overflow: NbOfEdges=" << NbOfEdges << " > nbax=" << nbax);
    5353                }
    5454
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/SubDomain.cpp

    r12821 r13101  
    1616                *this = Th.subdomains[i];
    1717                if ( head-Th.triangles<0 || head-Th.triangles>=Th.nbt){
    18                         _error2_("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");
     18                        _error_("head-Th.triangles<0 || head-Th.triangles>=Th.nbt");
    1919                }
    2020                head = ThNew.triangles + Th.GetId(head) ;
    2121                if (edge-Th.edges<0 || edge-Th.edges>=Th.nbe);{
    22                         _error2_("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");
     22                        _error_("edge-Th.edges<0 || edge-Th.edges>=Th.nbe");
    2323                }
    2424                edge = ThNew.edges+ Th.GetId(edge);
  • issm/branches/trunk-jpl-damage/src/c/classes/bamg/Triangle.cpp

    r12821 r13101  
    1919                long nbv = Th->nbv;
    2020                if (i<0 || j<0 || k<0){
    21                         _error2_("i<0 || j<0 || k<0");
     21                        _error_("i<0 || j<0 || k<0");
    2222                }
    2323                if (i>=nbv || j>=nbv || k>=nbv){
    24                         _error2_("i>=nbv || j>=nbv || k>=nbv");
     24                        _error_("i>=nbv || j>=nbv || k>=nbv");
    2525                }
    2626                vertices[0]=v+i;
     
    173173                        //check number of iterations
    174174                        if (k>=2000){
    175                                 _error2_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");
     175                                _error_("too many iteration in Triangle::FindBoundaryEdge (k>=2000)");
    176176                        }
    177177                } while (this!= t);
     
    213213                do {
    214214                        while (t->swap(j,koption)){
    215                                 if (k>=20000) _error2_("k>=20000");
     215                                if (k>=20000) _error_("k>=20000");
    216216                                NbSwap++;
    217217                                k++;
  • issm/branches/trunk-jpl-damage/src/c/classes/gauss/GaussPenta.cpp

    r12832 r13101  
    119119        }
    120120        else{
    121                 _error2_("Penta not supported yet");
     121                _error_("Penta not supported yet");
    122122        }
    123123
     
    159159        }
    160160        else{
    161                 _error2_("Tria not supported yet");
     161                _error_("Tria not supported yet");
    162162        }
    163163
     
    221221        }
    222222        else{
    223                 _error2_("Tria not supported yet (user provided indices " << index1 << " " << index2 << " " << index3 << " " << index4 << ")");
     223                _error_("Tria not supported yet (user provided indices " << index1 << " " << index2 << " " << index3 << " " << index4 << ")");
    224224        }
    225225
     
    340340                        break;
    341341                default:
    342                         _error2_("vertex index should be in [0 5]");
     342                        _error_("vertex index should be in [0 5]");
    343343
    344344        }
     
    359359        }
    360360        else{
    361                 _error2_("Tria not supported yet");
     361                _error_("Tria not supported yet");
    362362        }
    363363
  • issm/branches/trunk-jpl-damage/src/c/classes/gauss/GaussTria.cpp

    r12832 r13101  
    8080        }
    8181        else
    82          _error2_("The 2 indices provided are not supported yet (user provided " << index1 << " and " << index2 << ")");
     82         _error_("The 2 indices provided are not supported yet (user provided " << index1 << " and " << index2 << ")");
    8383
    8484        /*Initialize static fields as undefined*/
     
    178178        }
    179179        else
    180          _error2_("The 2 indices provided are not supported yet (user provided " << index1 << " and " << index2 << ")");
     180         _error_("The 2 indices provided are not supported yet (user provided " << index1 << " and " << index2 << ")");
    181181
    182182}
     
    197197/*}}}*/
    198198/*FUNCTION GaussTria::GaussFromCoords{{{*/
    199 void GaussTria::GaussFromCoords(IssmPDouble x,IssmPDouble y,IssmPDouble* xyz_list){
     199void GaussTria::GaussFromCoords(IssmDouble x,IssmDouble y,IssmDouble* xyz_list){
    200200
    201201        /*Intermediaries*/
    202         IssmPDouble    area = 0;
    203         IssmPDouble    x1,y1,x2,y2,x3,y3;
     202        IssmDouble    area = 0;
     203        IssmDouble    x1,y1,x2,y2,x3,y3;
    204204
    205205        /*in debugging mode: check that the default constructor has been called*/
     
    241241                        break;
    242242                default:
    243                         _error2_("vertex index should be in [0 2]");
     243                        _error_("vertex index should be in [0 2]");
    244244
    245245        }
  • issm/branches/trunk-jpl-damage/src/c/classes/gauss/GaussTria.h

    r12822 r13101  
    2222        public:
    2323                IssmPDouble weight;
    24                 IssmPDouble coord1;
    25                 IssmPDouble coord2;
    26                 IssmPDouble coord3;
     24                IssmDouble coord1;
     25                IssmDouble coord2;
     26                IssmDouble coord3;
    2727               
    2828        public:
     
    3838                int  end(void);
    3939                void Echo(void);
    40                 void GaussFromCoords(IssmPDouble x1,IssmPDouble y1,IssmPDouble* xyz_list);
     40                void GaussFromCoords(IssmDouble x1,IssmDouble y1,IssmDouble* xyz_list);
    4141                void GaussPoint(int ig);
    4242                void GaussVertex(int iv);
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/ExponentialVariogram.cpp

    r12821 r13101  
    3939
    4040        /*Checks*/
    41         if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
     41        if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
    4242}
    4343/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/ExponentialVariogram.h

    r12821 r13101  
    2323                /*Object virtual functions definitions*/
    2424                void  Echo();
    25                 void  DeepEcho(){_error2_("Not implemented yet");};
    26                 int   Id(){_error2_("Not implemented yet");};
    27                 int   MyRank(){_error2_("Not implemented yet");};
    28                 int   ObjectEnum(){_error2_("Not implemented yet");};
    29                 Object* copy(){_error2_("Not implemented yet");};
     25                void  DeepEcho(){_error_("Not implemented yet");};
     26                int   Id(){_error_("Not implemented yet");};
     27                int   MyRank(){_error_("Not implemented yet");};
     28                int   ObjectEnum(){_error_("Not implemented yet");};
     29                Object* copy(){_error_("Not implemented yet");};
    3030
    3131                /*Variogram functions*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/GaussianVariogram.cpp

    r12821 r13101  
    3939
    4040        /*Checks*/
    41         if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
     41        if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
    4242}
    4343/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/GaussianVariogram.h

    r12832 r13101  
    2424                /*Object virtual functions definitions*/
    2525                void  Echo();
    26                 void  DeepEcho(){_error2_("Not implemented yet");};
    27                 int   Id(){_error2_("Not implemented yet");};
    28                 int   MyRank(){_error2_("Not implemented yet");};
    29                 int   ObjectEnum(){_error2_("Not implemented yet");};
    30                 Object* copy(){_error2_("Not implemented yet");};
     26                void  DeepEcho(){_error_("Not implemented yet");};
     27                int   Id(){_error_("Not implemented yet");};
     28                int   MyRank(){_error_("Not implemented yet");};
     29                int   ObjectEnum(){_error_("Not implemented yet");};
     30                Object* copy(){_error_("Not implemented yet");};
    3131
    3232                /*Variogram functions*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/Observation.h

    r12832 r13101  
    2424                /*Object virtual functions definitions*/
    2525                void    Echo();
    26                 void    DeepEcho()  {_error2_("Not implemented yet"); };
    27                 int     Id()        {_error2_("Not implemented yet"); };
    28                 int     MyRank()    {_error2_("Not implemented yet"); };
    29                 int     ObjectEnum(){_error2_("Not implemented yet"); };
    30                 Object *copy()      {_error2_("Not implemented yet"); };
     26                void    DeepEcho()  {_error_("Not implemented yet"); };
     27                int     Id()        {_error_("Not implemented yet"); };
     28                int     MyRank()    {_error_("Not implemented yet"); };
     29                int     ObjectEnum(){_error_("Not implemented yet"); };
     30                Object *copy()      {_error_("Not implemented yet"); };
    3131
    3232                /*Management*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/PowerVariogram.cpp

    r12821 r13101  
    3939
    4040        /*Checks*/
    41         if(power<=0 || power>=2) _error2_("power must be betwwen 0 and 2 (0 < power < 2)");
    42         if(slope<=0) _error2_("slope must be positive");
     41        if(power<=0 || power>=2) _error_("power must be betwwen 0 and 2 (0 < power < 2)");
     42        if(slope<=0) _error_("slope must be positive");
    4343}
    4444/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/PowerVariogram.h

    r12821 r13101  
    2323                /*Object virtual functions definitions*/
    2424                void  Echo();
    25                 void  DeepEcho(){_error2_("Not implemented yet");};
    26                 int   Id(){_error2_("Not implemented yet");};
    27                 int   MyRank(){_error2_("Not implemented yet");};
    28                 int   ObjectEnum(){_error2_("Not implemented yet");};
    29                 Object* copy(){_error2_("Not implemented yet");};
     25                void  DeepEcho(){_error_("Not implemented yet");};
     26                int   Id(){_error_("Not implemented yet");};
     27                int   MyRank(){_error_("Not implemented yet");};
     28                int   ObjectEnum(){_error_("Not implemented yet");};
     29                Object* copy(){_error_("Not implemented yet");};
    3030
    3131                /*Variogram functions*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/Quadtree.cpp

    r12821 r13101  
    8383/*FUNCTION Quadtree::Quadtree(){{{*/
    8484Quadtree::Quadtree(){
    85         _error2_("Constructor not supported");
     85        _error_("Constructor not supported");
    8686
    8787}
     
    248248        }
    249249        else{
    250                 _error2_("Box is not full");
     250                _error_("Box is not full");
    251251        }
    252252}/*}}}*/
     
    397397                        break;
    398398                default:
    399                         _error2_("Case " << index << " not supported");
     399                        _error_("Case " << index << " not supported");
    400400        }
    401401        newbox->length=master->length/2;
     
    574574                        break;
    575575                default:
    576                         _error2_("Case " << this->IsWithinRange(x,y,range) << " not supported");
     576                        _error_("Case " << this->IsWithinRange(x,y,range) << " not supported");
    577577        }
    578578
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/Quadtree.h

    r12821 r13101  
    2727                                /*Object functions (Needed because the Quadtree uses a Container*/
    2828                                void    Echo();
    29                                 void    DeepEcho()  {_error2_("not implemented yet"); };
    30                                 int     Id()        {_error2_("not implemented yet"); };
    31                                 int     MyRank()    {_error2_("not implemented yet"); };
    32                                 int     ObjectEnum(){_error2_("not implemented yet"); };
    33                                 Object *copy()      {_error2_("not implemented yet"); };
     29                                void    DeepEcho()  {_error_("not implemented yet"); };
     30                                int     Id()        {_error_("not implemented yet"); };
     31                                int     MyRank()    {_error_("not implemented yet"); };
     32                                int     ObjectEnum(){_error_("not implemented yet"); };
     33                                Object *copy()      {_error_("not implemented yet"); };
    3434
    3535                                /*Methods*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/SphericalVariogram.cpp

    r12821 r13101  
    3939
    4040        /*Checks*/
    41         if(nugget==sill) _error2_("nugget and sill cannot be equal (constant semivariogram not allowed)");
     41        if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
    4242}
    4343/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/kriging/SphericalVariogram.h

    r12821 r13101  
    2323                /*Object virtual functions definitions*/
    2424                void  Echo();
    25                 void  DeepEcho(){_error2_("Not implemented yet");};
    26                 int   Id(){_error2_("Not implemented yet");};
    27                 int   MyRank(){_error2_("Not implemented yet");};
    28                 int   ObjectEnum(){_error2_("Not implemented yet");};
    29                 Object* copy(){_error2_("Not implemented yet");};
     25                void  DeepEcho(){_error_("Not implemented yet");};
     26                int   Id(){_error_("Not implemented yet");};
     27                int   MyRank(){_error_("Not implemented yet");};
     28                int   ObjectEnum(){_error_("Not implemented yet");};
     29                Object* copy(){_error_("Not implemented yet");};
    3030
    3131                /*Variogram functions*/
  • issm/branches/trunk-jpl-damage/src/c/classes/matrix/ElementMatrix.cpp

    r12832 r13101  
    4747ElementMatrix::ElementMatrix(ElementMatrix* Ke){
    4848
    49         if(!Ke) _error2_("Input Element Matrix is a NULL pointer");
     49        if(!Ke) _error_("Input Element Matrix is a NULL pointer");
    5050        this->Init(Ke);
    5151        return;
     
    6363        /*If one of the two matrix is NULL, we copy the other one*/
    6464        if(!Ke1 && !Ke2){
    65                 _error2_("Two input element matrices are NULL");
     65                _error_("Two input element matrices are NULL");
    6666        }
    6767        else if(!Ke1){
     
    7575
    7676        /*General Case: Ke1 and Ke2 are not empty*/
    77         if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error2_("merging 2 non dofsymmetrical matrices not implemented yet");
     77        if(!Ke1->dofsymmetrical || !Ke2->dofsymmetrical) _error_("merging 2 non dofsymmetrical matrices not implemented yet");
    7878
    7979        /*Initialize itransformation matrix Ke[P[i]] = Ke2[i]*/
     
    295295        }
    296296        else{
    297                 _error2_("non dofsymmetrical matrix AddToGlobal routine not support yet!");
     297                _error_("non dofsymmetrical matrix AddToGlobal routine not support yet!");
    298298        }
    299299
     
    332332        }
    333333        else{
    334                 _error2_("non dofsymmetrical matrix AddToGlobal routine not support yet!");
     334                _error_("non dofsymmetrical matrix AddToGlobal routine not support yet!");
    335335        }
    336336
     
    343343        for (int i=0;i<this->nrows;i++){
    344344                for(int j=0;j<this->ncols;j++){
    345                         if (xIsNan<IssmDouble>(this->values[i*this->ncols+j])) _error2_("NaN found in Element Matrix");
    346                         if (fabs(this->values[i*this->ncols+j])>1.e+50) _error2_("Element Matrix values exceeds 1.e+50");
     345                        if (xIsNan<IssmDouble>(this->values[i*this->ncols+j])) _error_("NaN found in Element Matrix");
     346                        if (fabs(this->values[i*this->ncols+j])>1.e+50) _error_("Element Matrix values exceeds 1.e+50");
    347347                }
    348348        }
     
    365365        /*Transpose indices*/
    366366        if(!dofsymmetrical){
    367                 _error2_("not supported yet");
     367                _error_("not supported yet");
    368368        }
    369369
     
    378378        int i,j;
    379379        _printLine_("Element Matrix echo:");
    380         _printLine_("   nrows: " << nrows);
    381         _printLine_("   ncols: " << nrows);
     380        _printLine_("   nrows: " << this->nrows);
     381        _printLine_("   ncols: " << this->ncols);
    382382        _printLine_("   dofsymmetrical: " << (dofsymmetrical?"true":"false"));
    383383
     
    488488        int i;
    489489
    490         if(this->nrows!=this->ncols)_error2_("need square matrix in input!");
     490        if(this->nrows!=this->ncols)_error_("need square matrix in input!");
    491491
    492492        for(i=0;i<this->nrows;i++){
  • issm/branches/trunk-jpl-damage/src/c/classes/matrix/ElementVector.cpp

    r12832 r13101  
    4242        /*If one of the two matrix is NULL, we copy the other one*/
    4343        if(!pe1 && !pe2){
    44                 _error2_("Two input element matrices are NULL");
     44                _error_("Two input element matrices are NULL");
    4545        }
    4646        else if(!pe1){
     
    210210#ifdef _ISSM_DEBUG_
    211211        for (int i=0;i<this->nrows;i++){
    212                 if (xIsNan<IssmDouble>(this->values[i])) _error2_("NaN found in Element Vector");
    213                 if (fabs( this->values[i])>1.e+50) _error2_("Element Vector values exceeds 1.e+50");
     212                if (xIsNan<IssmDouble>(this->values[i])) _error_("NaN found in Element Vector");
     213                if (fabs( this->values[i])>1.e+50) _error_("Element Vector values exceeds 1.e+50");
    214214        }
    215215#endif
  • issm/branches/trunk-jpl-damage/src/c/classes/matrix/Matrix.cpp

    r12946 r13101  
    5151                this->pmatrix=new PetscMat(M,N);
    5252                #else
    53                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     53                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    5454                #endif
    5555        }
     
    5757                this->smatrix=new SeqMat(M,N);
    5858        }
    59         else _error2_("Matrix type: " << type << " not supported yet!");
     59        else _error_("Matrix type: " << type << " not supported yet!");
    6060
    6161}
     
    7474                this->pmatrix=new PetscMat(M,N,sparsity);
    7575                #else
    76                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     76                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    7777                #endif
    7878        }
     
    8080                this->smatrix=new SeqMat(M,N,sparsity);
    8181        }
    82         else _error2_("Matrix type: " << type << " not supported yet!");
     82        else _error_("Matrix type: " << type << " not supported yet!");
    8383}
    8484/*}}}*/
     
    9696                this->pmatrix=new PetscMat(serial_mat,M,N,sparsity);
    9797                #else
    98                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     98                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    9999                #endif
    100100        }
     
    102102                this->smatrix=new SeqMat(serial_mat,M,N,sparsity);
    103103        }
    104         else _error2_("Matrix type: " << type << " not supported yet!");
     104        else _error_("Matrix type: " << type << " not supported yet!");
    105105       
    106106}
     
    119119                this->pmatrix=new PetscMat(M,N,connectivity,numberofdofspernode);
    120120                #else
    121                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     121                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    122122                #endif
    123123        }
     
    125125                this->smatrix=new SeqMat(M,N,connectivity,numberofdofspernode);
    126126        }
    127         else _error2_("Matrix type: " << type << " not supported yet!");
     127        else _error_("Matrix type: " << type << " not supported yet!");
    128128       
    129129}
     
    136136                delete this->pmatrix;
    137137                #else
    138                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     138                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    139139                #endif
    140140        }
     
    142142                delete this->smatrix;
    143143        }
    144         else _error2_("Matrix type: " << type << " not supported yet!");
     144        else _error_("Matrix type: " << type << " not supported yet!");
    145145
    146146}
     
    150150/*FUNCTION Matrix::Echo{{{*/
    151151void Matrix::Echo(void){
     152        _assert_(this);
    152153
    153154        if(type==PetscMatType){
    154155                #ifdef _HAVE_PETSC_
    155156                this->pmatrix->Echo();
    156                 #else
    157                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    158157                #endif
    159158        }
     
    161160                this->smatrix->Echo();
    162161        }
    163         else _error2_("Matrix type: " << type << " not supported yet!");
     162        else _error_("Matrix type: " << type << " not supported yet!");
    164163
    165164}
     
    171170                #ifdef _HAVE_PETSC_
    172171                this->pmatrix->Assemble();
    173                 #else
    174                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    175172                #endif
    176173        }
     
    179176        }
    180177        else{
    181                 _error2_("Matrix type: " << type << " not supported yet!");
     178                _error_("Matrix type: " << type << " not supported yet!");
    182179        }
    183180}
     
    191188                #ifdef _HAVE_PETSC_
    192189                norm=this->pmatrix->Norm(norm_type);
    193                 #else
    194                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    195190                #endif
    196191        }
     
    198193                norm=this->smatrix->Norm(norm_type);
    199194        }
    200         else _error2_("Matrix type: " << type << " not supported yet!");
     195        else _error_("Matrix type: " << type << " not supported yet!");
    201196
    202197        return norm;
     
    209204                #ifdef _HAVE_PETSC_
    210205                this->pmatrix->GetSize(pM,pN);
    211                 #else
    212                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    213206                #endif
    214207        }
     
    216209                this->smatrix->GetSize(pM,pN);
    217210        }
    218         else _error2_("Matrix type: " << type << " not supported yet!");
     211        else _error_("Matrix type: " << type << " not supported yet!");
    219212       
    220213}
     
    226219                #ifdef _HAVE_PETSC_
    227220                this->pmatrix->GetLocalSize(pM,pN);
    228                 #else
    229                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    230221                #endif
    231222        }
     
    233224                this->smatrix->GetLocalSize(pM,pN);
    234225        }
    235         else _error2_("Matrix type: " << type << " not supported yet!");
     226        else _error_("Matrix type: " << type << " not supported yet!");
    236227
    237228}
     
    243234                #ifdef _HAVE_PETSC_
    244235                this->pmatrix->MatMult(X->pvector,AX->pvector);
    245                 #else
    246                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    247236                #endif
    248237        }
     
    250239                this->smatrix->MatMult(X->svector,AX->svector);
    251240        }
    252         else _error2_("Matrix type: " << type << " not supported yet!");
     241        else _error_("Matrix type: " << type << " not supported yet!");
    253242
    254243}
     
    264253                #ifdef _HAVE_PETSC_
    265254                output->pmatrix=this->pmatrix->Duplicate();
    266                 #else
    267                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    268255                #endif
    269256        }
     
    271258                output->smatrix=this->smatrix->Duplicate();
    272259        }
    273         else _error2_("Matrix type: " << type << " not supported yet!");
     260        else _error_("Matrix type: " << type << " not supported yet!");
    274261       
    275262        return output;
     
    284271                #ifdef _HAVE_PETSC_
    285272                output=this->pmatrix->ToSerial();
    286                 #else
    287                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    288273                #endif
    289274        }
     
    291276                output=this->smatrix->ToSerial();
    292277        }
    293         else _error2_("Matrix type: " << type << " not supported yet!");
     278        else _error_("Matrix type: " << type << " not supported yet!");
    294279
    295280
     
    303288                #ifdef _HAVE_PETSC_
    304289                this->pmatrix->SetValues(m,idxm,n,idxn,values,mode);
    305                 #else
    306                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    307290                #endif
    308291        }
     
    310293                this->smatrix->SetValues(m,idxm,n,idxn,values,mode);
    311294        }
    312         else _error2_("Matrix type: " << type << " not supported yet!");
     295        else _error_("Matrix type: " << type << " not supported yet!");
    313296}
    314297/*}}}*/
     
    319302                #ifdef _HAVE_PETSC_
    320303                this->pmatrix->Convert(newtype);
    321                 #else
    322                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
    323304                #endif
    324305        }
     
    327308        }
    328309        else{
    329                 _error2_("Matrix type: " << type << " not supported yet!");
    330         }
    331 
    332 }
    333 /*}}}*/
     310                _error_("Matrix type: " << type << " not supported yet!");
     311        }
     312
     313}
     314/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/matrix/Matrix.h

    r12860 r13101  
    3232                /*Matrix constructors, destructors {{{*/
    3333                Matrix();
     34                #ifdef _HAVE_PETSC_
    3435                Matrix(int M,int N,int type=PetscMatType);
    3536                Matrix(int M,int N,IssmDouble sparsity,int type=PetscMatType);
    3637                Matrix(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity,int type=PetscMatType);
    3738                Matrix(int M,int N,int connectivity,int numberofdofspernode,int type=PetscMatType);
     39                #else
     40                Matrix(int M,int N,int type=SeqMatType);
     41                Matrix(int M,int N,IssmDouble sparsity,int type=SeqMatType);
     42                Matrix(IssmDouble* serial_mat,int M,int N,IssmDouble sparsity,int type=SeqMatType);
     43                Matrix(int M,int N,int connectivity,int numberofdofspernode,int type=SeqMatType);
     44                #endif
    3845                ~Matrix();
    3946                /*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/matrix/Vector.cpp

    r12946 r13101  
    5151                this->pvector=new PetscVec(M,fromlocalsize);
    5252                #else
    53                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     53                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    5454                #endif
    5555        }
     
    5757                this->svector=new SeqVec(M,fromlocalsize);
    5858        }
    59         else _error2_("Vector type: " << type << " not supported yet!");
     59        else _error_("Vector type: " << type << " not supported yet!");
    6060
    6161}
     
    8686                this->pvector=new PetscVec(serial_vec,M);
    8787                #else
    88                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     88                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    8989                #endif
    9090        }
     
    9292                this->svector=new SeqVec(serial_vec,M);
    9393        }
    94         else _error2_("Vector type: " << type << " not supported yet!");
     94        else _error_("Vector type: " << type << " not supported yet!");
    9595
    9696}
     
    103103                delete this->pvector;
    104104                #else
    105                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     105                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    106106                #endif
    107107        }
     
    109109                delete this->svector;
    110110        }
    111         else _error2_("Vector type: " << type << " not supported yet!");
     111        else _error_("Vector type: " << type << " not supported yet!");
    112112}
    113113/*}}}*/
     
    121121                this->pvector->Echo();
    122122                #else
    123                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     123                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    124124                #endif
    125125        }
     
    127127                this->svector->Echo();
    128128        }
    129         else _error2_("Vector type: " << type << " not supported yet!");
     129        else _error_("Vector type: " << type << " not supported yet!");
    130130
    131131}
     
    138138                this->pvector->Assemble();
    139139                #else
    140                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     140                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    141141                #endif
    142142        }
     
    144144                this->svector->Assemble();
    145145        }
    146         else _error2_("Vector type: " << type << " not supported yet!");
     146        else _error_("Vector type: " << type << " not supported yet!");
    147147
    148148}
     
    156156                this->pvector->SetValues(ssize,list,values,mode);
    157157                #else
    158                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     158                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    159159                #endif
    160160        }
     
    162162                this->svector->SetValues(ssize,list,values,mode);
    163163        }
    164         else _error2_("Vector type: " << type << " not supported yet!");
     164        else _error_("Vector type: " << type << " not supported yet!");
    165165
    166166               
     
    175175                this->pvector->SetValue(dof,value,mode);
    176176                #else
    177                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     177                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    178178                #endif
    179179        }
     
    181181                this->svector->SetValue(dof,value,mode);
    182182        }
    183         else _error2_("Vector type: " << type << " not supported yet!");
     183        else _error_("Vector type: " << type << " not supported yet!");
    184184
    185185}
     
    193193                this->pvector->GetValue(pvalue,dof);
    194194                #else
    195                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     195                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    196196                #endif
    197197        }
     
    199199                this->svector->GetValue(pvalue,dof);
    200200        }
    201         else _error2_("Vector type: " << type << " not supported yet!");
     201        else _error_("Vector type: " << type << " not supported yet!");
    202202
    203203}
     
    210210                this->pvector->GetSize(pM);
    211211                #else
    212                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     212                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    213213                #endif
    214214        }
     
    216216                this->svector->GetSize(pM);
    217217        }
    218         else _error2_("Vector type: " << type << " not supported yet!");
     218        else _error_("Vector type: " << type << " not supported yet!");
    219219
    220220}
     
    241241                this->pvector->GetLocalSize(pM);
    242242                #else
    243                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     243                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    244244                #endif
    245245        }
     
    247247                this->svector->GetLocalSize(pM);
    248248        }
    249         else _error2_("Vector type: " << type << " not supported yet!");
     249        else _error_("Vector type: " << type << " not supported yet!");
    250250
    251251}
     
    262262                output->pvector=this->pvector->Duplicate();
    263263                #else
    264                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     264                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    265265                #endif
    266266        }
     
    269269                output->svector=this->svector->Duplicate();
    270270        }
    271         else _error2_("Vector type: " << type << " not supported yet!");
     271        else _error_("Vector type: " << type << " not supported yet!");
    272272
    273273        return output;
     
    283283                this->pvector->Set(value);
    284284                #else
    285                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     285                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    286286                #endif
    287287        }
     
    289289                this->svector->Set(value);
    290290        }
    291         else _error2_("Vector type: " << type << " not supported yet!");
     291        else _error_("Vector type: " << type << " not supported yet!");
    292292
    293293}
     
    301301                this->pvector->AXPY(X->pvector,a);
    302302                #else
    303                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     303                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    304304                #endif
    305305        }
     
    307307                this->svector->AXPY(X->svector,a);
    308308        }
    309         else _error2_("Vector type: " << type << " not supported yet!");
     309        else _error_("Vector type: " << type << " not supported yet!");
    310310
    311311}
     
    319319                this->pvector->AYPX(X->pvector,a);
    320320                #else
    321                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     321                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    322322                #endif
    323323        }
     
    325325                this->svector->AYPX(X->svector,a);
    326326        }
    327         else _error2_("Vector type: " << type << " not supported yet!");
     327        else _error_("Vector type: " << type << " not supported yet!");
    328328
    329329
     
    339339                vec_serial=this->pvector->ToMPISerial();
    340340                #else
    341                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     341                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    342342                #endif
    343343        }
     
    345345                vec_serial=this->svector->ToMPISerial();
    346346        }
    347         else _error2_("Vector type: " << type << " not supported yet!");
     347        else _error_("Vector type: " << type << " not supported yet!");
    348348
    349349        return vec_serial;
     
    359359                this->pvector->Copy(to->pvector);
    360360                #else
    361                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     361                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    362362                #endif
    363363        }
     
    365365                this->svector->Copy(to->svector);
    366366        }
    367         else _error2_("Vector type: " << type << " not supported yet!");
     367        else _error_("Vector type: " << type << " not supported yet!");
    368368
    369369
     
    379379                norm=this->pvector->Norm(norm_type);
    380380                #else
    381                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     381                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    382382                #endif
    383383        }
     
    385385                norm=this->svector->Norm(norm_type);
    386386        }
    387         else _error2_("Vector type: " << type << " not supported yet!");
     387        else _error_("Vector type: " << type << " not supported yet!");
    388388
    389389        return norm;
     
    398398                this->pvector->Scale(scale_factor);
    399399                #else
    400                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     400                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    401401                #endif
    402402        }
     
    404404                this->svector->Scale(scale_factor);
    405405        }
    406         else _error2_("Vector type: " << type << " not supported yet!");
     406        else _error_("Vector type: " << type << " not supported yet!");
    407407
    408408}
     
    417417                dot=this->pvector->Dot(vector->pvector);
    418418                #else
    419                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     419                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    420420                #endif
    421421        }
     
    423423                dot=this->svector->Dot(vector->svector);
    424424        }
    425         else _error2_("Vector type: " << type << " not supported yet!");
     425        else _error_("Vector type: " << type << " not supported yet!");
    426426
    427427        return dot;
     
    436436                this->pvector->PointwiseDivide(x->pvector,y->pvector);
    437437                #else
    438                 _error2_("Petsc matrix format not usable, as Petsc has not been compiled!");
     438                _error_("Petsc matrix format not usable, as Petsc has not been compiled!");
    439439                #endif
    440440        }
     
    442442                this->svector->PointwiseDivide(x->svector,y->svector);
    443443        }
    444         else _error2_("Vector type: " << type << " not supported yet!");
    445 
    446 }
    447 /*}}}*/
     444        else _error_("Vector type: " << type << " not supported yet!");
     445
     446}
     447/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/matrix/Vector.h

    r12946 r13101  
    3434                /*Vector constructors, destructors {{{*/
    3535                Vector();
     36                #ifdef _HAVE_PETSC_
     37                Vector(Vec petsc_vector);
    3638                Vector(int M,bool fromlocalsize=false,int type=PetscVecType);
    3739                Vector(IssmDouble* serial_vec,int pM,int type=PetscVecType);
    38                 #ifdef _HAVE_PETSC_
    39                 Vector(Vec petsc_vector);
     40                #else
     41                Vector(int M,bool fromlocalsize=false,int type=SeqVecType);
     42                Vector(IssmDouble* serial_vec,int pM,int type=SeqVecType);
    4043                #endif
     44
    4145                ~Vector();
    4246                /*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Constraints/SpcTransient.cpp

    r12832 r13101  
    146146                }
    147147
    148                 if(!found)_error2_("could not find time segment for constraint");
     148                if(!found)_error_("could not find time segment for constraint");
    149149
    150150                /*Apply or relax constraint: */
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/ElementResults/BoolElementResult.cpp

    r12832 r13101  
    128128void BoolElementResult::GetVectorFromResults(Vector* vector,int* doflist,int* connectivitylist,int numdofs){
    129129
    130         _error2_("cannot return vector on vertices");
     130        _error_("cannot return vector on vertices");
    131131} /*}}}*/
    132132/*FUNCTION BoolElementResult::GetElementVectorFromResults{{{*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/ElementResults/PentaP1ElementResult.cpp

    r12832 r13101  
    142142        IssmDouble data[6];
    143143
    144         if(numdofs!=6)_error2_("Result " << EnumToStringx(this->enum_type) << " is a PentaP1ElementResult and cannot write vector of " << numdofs << " dofs");
     144        if(numdofs!=6)_error_("Result " << EnumToStringx(this->enum_type) << " is a PentaP1ElementResult and cannot write vector of " << numdofs << " dofs");
    145145        for(int i=0;i<6;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
    146146        vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
     
    150150void PentaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){
    151151
    152         _error2_("Result " << EnumToStringx(enum_type) << " is a PentaP1ElementResult and should not write vector of size numberofelemenrs");
     152        _error_("Result " << EnumToStringx(enum_type) << " is a PentaP1ElementResult and should not write vector of size numberofelemenrs");
    153153} /*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/ElementResults/TriaP1ElementResult.cpp

    r12832 r13101  
    130130        IssmDouble data[3];
    131131
    132         if(numdofs!=3)_error2_("Result " << EnumToStringx(this->enum_type) << " is a TriaP1ElementResult and cannot write vector of " << numdofs << " dofs");
     132        if(numdofs!=3)_error_("Result " << EnumToStringx(this->enum_type) << " is a TriaP1ElementResult and cannot write vector of " << numdofs << " dofs");
    133133        for(int i=0;i<3;i++) data[i]=this->values[i]/(IssmDouble)connectivitylist[i];
    134134        vector->SetValues(numdofs,doflist,&data[0],ADD_VAL);
     
    137137/*FUNCTION TriaP1ElementResult::GetElementVectorFromResults{{{*/
    138138void TriaP1ElementResult::GetElementVectorFromResults(Vector* vector,int dof){
    139         _error2_("Result " << EnumToStringx(enum_type) << " is a TriaP1ElementResult and should not write vector of size numberofelemenrs");
     139        _error_("Result " << EnumToStringx(enum_type) << " is a TriaP1ElementResult and should not write vector of size numberofelemenrs");
    140140} /*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/Penta.cpp

    r12946 r13101  
    6767        /*Build neighbors list*/
    6868        if (xIsNan<IssmDouble>(iomodel->Data(MeshUpperelementsEnum)[index])) penta_elements_ids[1]=this->id; //upper penta is the same penta
    69         else                                    penta_elements_ids[1]=(int)(iomodel->Data(MeshUpperelementsEnum)[index]);
     69        else                                    penta_elements_ids[1]=reCast<int,IssmDouble>((iomodel->Data(MeshUpperelementsEnum)[index]));
    7070        if (xIsNan<IssmDouble>(iomodel->Data(MeshLowerelementsEnum)[index])) penta_elements_ids[0]=this->id; //lower penta is the same penta
    71         else                                    penta_elements_ids[0]=(int)(iomodel->Data(MeshLowerelementsEnum)[index]);
     71        else                                    penta_elements_ids[0]=reCast<int,IssmDouble>((iomodel->Data(MeshLowerelementsEnum)[index]));
    7272        this->InitHookNeighbors(penta_elements_ids);
    7373
    7474        /*Build horizontalneighborsids list: */
    7575        _assert_(iomodel->Data(MeshElementconnectivityEnum));
    76         for(i=0;i<3;i++) this->horizontalneighborsids[i]=(int)iomodel->Data(MeshElementconnectivityEnum)[3*index+i]-1;
     76        for(i=0;i<3;i++) this->horizontalneighborsids[i]=reCast<int,IssmDouble>(iomodel->Data(MeshElementconnectivityEnum)[3*index+i])-1;
    7777
    7878        //this->parameters: we still can't point to it, it may not even exist. Configure will handle this.
     
    146146/*FUNCTION Penta::AverageOntoPartition {{{*/
    147147void  Penta::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){
    148         _error2_("Not supported yet!");
     148        _error_("Not supported yet!");
    149149}
    150150/*}}}*/
     
    252252
    253253        /*Check analysis_types*/
    254         if (analysis_type!=DiagnosticHorizAnalysisEnum) _error2_("Not supported yet!");
    255         if (approximation!=StokesApproximationEnum) _error2_("Not supported yet!");
     254        if (analysis_type!=DiagnosticHorizAnalysisEnum) _error_("Not supported yet!");
     255        if (approximation!=StokesApproximationEnum) _error_("Not supported yet!");
    256256
    257257        /*retrieve some parameters: */
     
    318318void  Penta::ComputeStrainRate(Vector* eps){
    319319
    320         _error2_("Not implemented yet");
     320        _error_("Not implemented yet");
    321321
    322322}
     
    442442                #endif
    443443                case BedSlopeXAnalysisEnum: case SurfaceSlopeXAnalysisEnum: case BedSlopeYAnalysisEnum: case SurfaceSlopeYAnalysisEnum:
    444                         Ke=CreateKMatrixSlope();
     444                        Ke=CreateBasalMassMatrix();
    445445                        break;
    446446                case PrognosticAnalysisEnum:
     
    464464                #endif
    465465                default:
    466                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     466                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    467467        }
    468468
     
    500500}
    501501/*}}}*/
    502 /*FUNCTION Penta::CreateKMatrixSlope {{{*/
    503 ElementMatrix* Penta::CreateKMatrixSlope(void){
     502/*FUNCTION Penta::CreateBasalMassMatrix{{{*/
     503ElementMatrix* Penta::CreateBasalMassMatrix(void){
    504504
    505505        if (!IsOnBed()) return NULL;
    506506
    507507        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
    508         ElementMatrix* Ke=tria->CreateKMatrixSlope();
     508        ElementMatrix* Ke=tria->CreateMassMatrix();
    509509        delete tria->matice; delete tria;
    510510
     
    569569                #endif
    570570                default:
    571                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     571                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    572572        }
    573573
     
    638638#endif
    639639                default:
    640                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     640                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    641641        }
    642642
     
    888888                 return i;
    889889        }
    890         _error2_("Node provided not found among element nodes");
     890        _error_("Node provided not found among element nodes");
    891891
    892892}
     
    901901        /*Recover input*/
    902902        Input* input=inputs->GetInput(enumtype);
    903         if (!input) _error2_("Input " << EnumToStringx(enumtype) << " not found in element");
     903        if (!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
    904904
    905905        /*Checks in debugging mode*/
     
    950950
    951951        Input* input=inputs->GetInput(enumtype);
    952         if(!input) _error2_("No input of type " << EnumToStringx(enumtype) << " found in tria");
     952        if(!input) _error_("No input of type " << EnumToStringx(enumtype) << " found in tria");
    953953
    954954        GaussPenta* gauss=new GaussPenta();
     
    10451045        #endif
    10461046        default:
    1047                 _error2_("analysis: " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     1047                _error_("analysis: " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    10481048        }
    10491049}
     
    10851085        /*Check that both inputs have been found*/
    10861086        if (!vx_input || !vy_input){
    1087                 _error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");
     1087                _error_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");
    10881088        }
    10891089
     
    11101110        /*Check that both inputs have been found*/
    11111111        if (!vx_input || !vy_input || !vz_input){
    1112                 _error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << ", vz: " << vz_input << "\n");
     1112                _error_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << ", vz: " << vz_input << "\n");
    11131113        }
    11141114
     
    11451145        /*Get input (either in element or material)*/
    11461146        Input* input=inputs->GetInput(input_enum);
    1147         if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in element");
     1147        if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in element");
    11481148
    11491149        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
     
    11571157        ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(offset);
    11581158        if(elementresult->InstanceEnum()!=enum_in){
    1159                 _error_("Results of offset %i is %s, when %s was expected",offset,EnumToStringx(elementresult->InstanceEnum()),EnumToStringx(enum_in));
     1159                _error_("Results of offset "<<offset<<" is "<<EnumToStringx(elementresult->InstanceEnum())<<" when "<<EnumToStringx(enum_in)<<" was expected");
    11601160        } 
    11611161        if(interp==P1Enum){
     
    12081208        /*Make a copy of the original input: */
    12091209        input=(Input*)this->inputs->GetInput(enum_type);
    1210         if(!input)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
     1210        if(!input)_error_("could not find old input with enum: " << EnumToStringx(enum_type));
    12111211
    12121212        /*ArtificialNoise: */
     
    12281228                new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
    12291229                old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
    1230                 if(!new_inputs[i])_error2_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
    1231                 if(!old_inputs[i])_error2_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
     1230                if(!new_inputs[i])_error_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
     1231                if(!old_inputs[i])_error_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
    12321232        }
    12331233
     
    12531253       
    12541254        if ((code==5) || (code==1)){ //boolean
    1255                 this->inputs->AddInput(new BoolInput(name,(bool)scalar));
     1255                this->inputs->AddInput(new BoolInput(name,reCast<bool,IssmDouble>(scalar)));
    12561256        }
    12571257        else if ((code==6) || (code==2)){ //integer
    1258                 this->inputs->AddInput(new IntInput(name,(int)scalar));
     1258                this->inputs->AddInput(new IntInput(name,reCast<int,IssmDouble>(scalar)));
    12591259        }
    12601260        else if ((code==7) || (code==3)){ //IssmDouble
    1261                 this->inputs->AddInput(new DoubleInput(name,(IssmDouble)scalar));
    1262         }
    1263         else _error2_("could not recognize nature of vector from code " << code);
     1261                this->inputs->AddInput(new DoubleInput(name,scalar));
     1262        }
     1263        else _error_("could not recognize nature of vector from code " << code);
    12641264
    12651265}
     
    12911291                for(i=0;i<6;i++){
    12921292                        _assert_(iomodel->Data(MeshElementsEnum));
    1293                         penta_vertex_ids[i]=(int)iomodel->Data(MeshElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
     1293                        penta_vertex_ids[i]=reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[6*index+i]); //ids for vertices are in the elements array from Matlab
    12941294                }
    12951295
     
    13271327                        this->inputs->AddInput(transientinput);
    13281328                }
    1329                 else _error2_("nodal vector is either numberofnodes (" << numberofvertices << "), or numberofnodes+1 long. Field provided is " << M << " long. Enum " << EnumToStringx(vector_enum));
     1329                else _error_("nodal vector is either numberofnodes (" << numberofvertices << "), or numberofnodes+1 long. Field provided is " << M << " long. Enum " << EnumToStringx(vector_enum));
    13301330        }
    13311331        else if(vector_type==2){ //element vector
     
    13361336
    13371337                        if (code==5){ //boolean
    1338                                 this->inputs->AddInput(new BoolInput(vector_enum,(bool)vector[index]));
     1338                                this->inputs->AddInput(new BoolInput(vector_enum,reCast<bool,IssmDouble>(vector[index])));
    13391339                        }
    13401340                        else if (code==6){ //integer
    1341                                 this->inputs->AddInput(new IntInput(vector_enum,(int)vector[index]));
     1341                                this->inputs->AddInput(new IntInput(vector_enum,reCast<int,IssmDouble>(vector[index])));
    13421342                        }
    13431343                        else if (code==7){ //IssmDouble
    1344                                 this->inputs->AddInput(new DoubleInput(vector_enum,(IssmDouble)vector[index]));
     1344                                this->inputs->AddInput(new DoubleInput(vector_enum,vector[index]));
    13451345                        }
    1346                         else _error2_("could not recognize nature of vector from code " << code);
     1346                        else _error_("could not recognize nature of vector from code " << code);
    13471347                }
    13481348                else {
    1349                         _error2_("transient elementary inputs not supported yet!");
     1349                        _error_("transient elementary inputs not supported yet!");
    13501350                }
    13511351        }
    13521352        else{
    1353                 _error2_("Cannot add input for vector type " << vector_type << " (not supported)");
     1353                _error_("Cannot add input for vector type " << vector_type << " (not supported)");
    13541354        }
    13551355
     
    13901390                 original_input=(Input*)penta->matice->inputs->GetInput(enum_type);
    13911391                else
    1392                  _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
    1393                 if(!original_input) _error2_("could not find input with enum " << EnumToStringx(enum_type));
     1392                 _error_("object " << EnumToStringx(object_enum) << " not supported yet");
     1393                if(!original_input) _error_("could not find input with enum " << EnumToStringx(enum_type));
    13941394
    13951395                /*If first time, initialize total_integrated_input*/
     
    14021402                         total_integrated_input=new DoubleInput(average_enum_type,0.0);
    14031403                        else
    1404                          _error2_("object " << EnumToStringx(original_input->ObjectEnum()) << " not supported yet");
     1404                         _error_("object " << EnumToStringx(original_input->ObjectEnum()) << " not supported yet");
    14051405                }
    14061406
     
    14501450         this->matice->inputs->AddInput((Input*)depth_averaged_input);
    14511451        else
    1452          _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
     1452         _error_("object " << EnumToStringx(object_enum) << " not supported yet");
    14531453}
    14541454/*}}}*/
     
    14911491        }
    14921492        else{
    1493                 _error2_("object of type " << EnumToStringx(object_type) << " not supported yet");
     1493                _error_("object of type " << EnumToStringx(object_type) << " not supported yet");
    14941494        }
    14951495        for(i=0;i<num_inputs;i++){
    1496                 if(!base_inputs[i]) _error2_("could not find input with enum " << EnumToStringx(enum_type) << " in object " << EnumToStringx(object_type));
     1496                if(!base_inputs[i]) _error_("could not find input with enum " << EnumToStringx(enum_type) << " in object " << EnumToStringx(object_type));
    14971497                base_inputs[i]->Extrude();
    14981498        }
     
    15211521                        }
    15221522                        else{
    1523                                 _error2_("object of type " << EnumToStringx(object_type) << " not supported yet");
     1523                                _error_("object of type " << EnumToStringx(object_type) << " not supported yet");
    15241524                        }
    15251525                }
     
    15401540        /*Make a copy of the original input: */
    15411541        input=(Input*)this->inputs->GetInput(enum_type);
    1542         if(!input)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
     1542        if(!input)_error_("could not find old input with enum: " << EnumToStringx(enum_type));
    15431543
    15441544        /*Scale: */
     
    15561556        if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(MaterialsRheologyBEnum);
    15571557        else input=this->inputs->GetInput(enum_type);
    1558         //if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found in penta->inputs"); why error out? if the requested input does not exist, we should still
     1558        //if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found in penta->inputs"); why error out? if the requested input does not exist, we should still
    15591559        //try and output whatever we can instead of just failing.
    15601560        if(!input)return;
     
    16261626        /*Recover vertices ids needed to initialize inputs*/
    16271627        for(i=0;i<6;i++){
    1628                 penta_vertex_ids[i]=(int)iomodel->Data(MeshElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
     1628                penta_vertex_ids[i]=reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[6*index+i]); //ids for vertices are in the elements array from Matlab
    16291629        }
    16301630
     
    16331633        if (control_analysis && iomodel->Data(InversionControlParametersEnum)){
    16341634                for(i=0;i<num_control_type;i++){
    1635                         switch((int)iomodel->Data(InversionControlParametersEnum)[i]){
     1635                        switch(reCast<int,IssmDouble>(iomodel->Data(InversionControlParametersEnum)[i])){
    16361636                                case BalancethicknessThickeningRateEnum:
    16371637                                        if (iomodel->Data(BalancethicknessThickeningRateEnum)){
     
    16691669                                        /*Matice will take care of it*/ break;
    16701670                                default:
    1671                                         _error2_("Control " << EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]) << " not implemented yet");
     1671                                        _error_("Control " << EnumToStringx(reCast<int,IssmDouble>(iomodel->Data(InversionControlParametersEnum)[i])) << " not implemented yet");
    16721672                        }
    16731673                }
     
    16771677        //Need to know the type of approximation for this element
    16781678        if(iomodel->Data(FlowequationElementEquationEnum)){
    1679                 if (*(iomodel->Data(FlowequationElementEquationEnum)+index)==MacAyealApproximationEnum){
     1679                if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealApproximationEnum){
    16801680                        this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealApproximationEnum));
    16811681                }
    1682                 else if (*(iomodel->Data(FlowequationElementEquationEnum)+index)==PattynApproximationEnum){
     1682                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==PattynApproximationEnum){
    16831683                        this->inputs->AddInput(new IntInput(ApproximationEnum,PattynApproximationEnum));
    16841684                }
    1685                 else if (*(iomodel->Data(FlowequationElementEquationEnum)+index)==MacAyealPattynApproximationEnum){
     1685                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealPattynApproximationEnum){
    16861686                        this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealPattynApproximationEnum));
    16871687                }
    1688                 else if (*(iomodel->Data(FlowequationElementEquationEnum)+index)==HutterApproximationEnum){
     1688                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==HutterApproximationEnum){
    16891689                        this->inputs->AddInput(new IntInput(ApproximationEnum,HutterApproximationEnum));
    16901690                }
    1691                 else if (*(iomodel->Data(FlowequationElementEquationEnum)+index)==StokesApproximationEnum){
     1691                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==L1L2ApproximationEnum){
     1692                        this->inputs->AddInput(new IntInput(ApproximationEnum,L1L2ApproximationEnum));
     1693                }
     1694                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==StokesApproximationEnum){
    16921695                        this->inputs->AddInput(new IntInput(ApproximationEnum,StokesApproximationEnum));
    16931696                }
    1694                 else if (*(iomodel->Data(FlowequationElementEquationEnum)+index)==MacAyealStokesApproximationEnum){
     1697                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==MacAyealStokesApproximationEnum){
    16951698                        this->inputs->AddInput(new IntInput(ApproximationEnum,MacAyealStokesApproximationEnum));
    16961699                }
    1697                 else if (*(iomodel->Data(FlowequationElementEquationEnum)+index)==PattynStokesApproximationEnum){
     1700                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==PattynStokesApproximationEnum){
    16981701                        this->inputs->AddInput(new IntInput(ApproximationEnum,PattynStokesApproximationEnum));
    16991702                }
    1700                 else if (*(iomodel->Data(FlowequationElementEquationEnum)+index)==NoneApproximationEnum){
     1703                else if (iomodel->Data(FlowequationElementEquationEnum)[index]==NoneApproximationEnum){
    17011704                        this->inputs->AddInput(new IntInput(ApproximationEnum,NoneApproximationEnum));
    17021705                }
    17031706                else{
    1704                         _error2_("Approximation type " << EnumToStringx((int)*(iomodel->Data(FlowequationElementEquationEnum)+index)) << " not supported yet");
     1707                        _error_("Approximation type " << EnumToStringx(reCast<int,IssmDouble>(iomodel->Data(FlowequationElementEquationEnum)[index])) << " not supported yet");
    17051708                }
    17061709        }
     
    17861789        #endif
    17871790        default:
    1788                 _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     1791                _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    17891792        }
    17901793}
     
    18171820        for(i=0;i<numdof2d;i++){
    18181821                newthickness[i]=solution[doflist[i]];
    1819                 if(xIsNan<IssmDouble>(newthickness[i])) _error2_("NaN found in solution vector");
     1822                if(xIsNan<IssmDouble>(newthickness[i])) _error_("NaN found in solution vector");
    18201823                /*Constrain thickness to be at least 1m*/
    18211824                if(newthickness[i]<minthickness) newthickness[i]=minthickness;
     
    18501853                                newbed[i]=oldbed[i]-rho_ice/rho_water*(newthickness[i]-oldthickness[i]); //bed = oldbed + di * dH
    18511854                        }
    1852                         else _error2_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet");
     1855                        else _error_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet");
    18531856                }
    18541857        }
     
    18871890        for(int i=0;i<numdof;i++){
    18881891                values[i]=solution[doflist[i]];
    1889                 if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
     1892                if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
    18901893        }
    18911894
     
    19171920                values[i]         =solution[doflist[i]];
    19181921                values[i+numdof2d]=values[i];
    1919                 if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
     1922                if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
    19201923        }
    19211924
     
    19481951
    19491952                case VertexEnum:
    1950 
    1951                         /*New PentaVertexInpu*/
    1952                         IssmDouble values[6];
    1953 
    1954                         /*Get values on the 6 vertices*/
    1955                         for (int i=0;i<6;i++){
    1956                                 values[i]=vector[this->nodes[i]->GetVertexDof()];
     1953                        {
     1954
     1955                                /*New PentaVertexInpu*/
     1956                                IssmDouble values[6];
     1957
     1958                                /*Get values on the 6 vertices*/
     1959                                for (int i=0;i<6;i++){
     1960                                        values[i]=vector[this->nodes[i]->GetVertexDof()];
     1961                                }
     1962
     1963                                /*update input*/
     1964                                this->inputs->AddInput(new PentaP1Input(name,values));
     1965                                return;
     1966                                break;
    19571967                        }
    19581968
    1959                         /*update input*/
    1960                         this->inputs->AddInput(new PentaP1Input(name,values));
    1961                         return;
    1962 
    19631969                default:
    19641970
    1965                         _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     1971                        _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    19661972        }
    19671973}
     
    19691975/*FUNCTION Penta::InputUpdateFromVector(int* vector, int name, int type);{{{*/
    19701976void  Penta::InputUpdateFromVector(int* vector, int name, int type){
    1971         _error2_("not supported yet!");
     1977        _error_("not supported yet!");
    19721978}
    19731979/*}}}*/
    19741980/*FUNCTION Penta::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
    19751981void  Penta::InputUpdateFromVector(bool* vector, int name, int type){
    1976         _error2_("not supported yet!");
     1982        _error_("not supported yet!");
    19771983}
    19781984/*}}}*/
     
    20602066
    20612067        for(i=0;i<NUMVERTICES;i++){
    2062                 if (flags[nodes[i]->Sid()]){
     2068                if (reCast<bool,IssmDouble>(flags[nodes[i]->Sid()])){
    20632069                        shelf=true;
    20642070                        break;
     
    21612167        for(i=0;i<NUMVERTICES;i++){
    21622168                /*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
    2163                 if(old_floating_ice[nodes[i]->Sid()]){
     2169                if(reCast<bool,IssmDouble>(old_floating_ice[nodes[i]->Sid()])){
    21642170                        if(b[i]<=ba[i]){
    21652171                                b[i]=ba[i];
     
    21812187                                        nodes[i]->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,false));
    21822188                                }
    2183                                 else if(migration_style==SoftMigrationEnum && sheet_ungrounding[nodes[i]->Sid()]){
     2189                                else if(migration_style==SoftMigrationEnum && reCast<int,IssmDouble>(sheet_ungrounding[nodes[i]->Sid()])){
    21842190                                        s[i]=(1-density)*h[i];
    21852191                                        b[i]=-density*h[i];
     
    25752581void  Penta::SetClone(int* minranks){
    25762582
    2577         _error2_("not implemented yet");
     2583        _error_("not implemented yet");
    25782584}
    25792585/*}}}*/
     
    28012807
    28022808        /*Intermediaries*/
    2803         IssmInt i,j;
    2804         int     penta_type;
    2805         int     penta_node_ids[6];
    2806         int     penta_vertex_ids[6];
    2807         IssmDouble  nodeinputs[6];
    2808         IssmDouble  yts;
    2809         int     stabilization;
    2810         bool    dakota_analysis;
    2811         bool    isstokes;
    2812         IssmDouble  beta,heatcapacity,referencetemperature,meltingpoint,latentheat;
     2809        IssmInt    i,j;
     2810        int        penta_type;
     2811        int        penta_node_ids[6];
     2812        int        penta_vertex_ids[6];
     2813        IssmDouble nodeinputs[6];
     2814        IssmDouble yts;
     2815        int        stabilization;
     2816        bool       dakota_analysis;
     2817        bool       isstokes;
     2818        IssmDouble beta,heatcapacity,referencetemperature,meltingpoint,latentheat;
    28132819
    28142820        /*Fetch parameters: */
     
    28402846
    28412847        /*Recover vertices ids needed to initialize inputs*/
    2842         for(i=0;i<6;i++) penta_vertex_ids[i]=(int)iomodel->Data(MeshElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
     2848        for(i=0;i<6;i++) penta_vertex_ids[i]=reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[6*index+i]); //ids for vertices are in the elements array from Matlab
    28432849
    28442850        /*Recover nodes ids needed to initialize the node hook.*/
     
    28462852                //go recover node ids, needed to initialize the node hook.
    28472853                //WARNING: We assume P1 elements here!!!!!
    2848                 penta_node_ids[i]=iomodel->nodecounter+(int)iomodel->Data(MeshElementsEnum)[6*index+i]; //ids for vertices are in the elements array from Matlab
     2854                penta_node_ids[i]=iomodel->nodecounter+reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[6*index+i]); //ids for vertices are in the elements array from Matlab
    28492855        }
    28502856
     
    29422948                                this->inputs->AddInput(new PentaP1Input(EnthalpyEnum,nodeinputs));
    29432949                        }
    2944                         else _error2_("temperature and waterfraction required for the enthalpy solution");
     2950                        else _error_("temperature and waterfraction required for the enthalpy solution");
    29452951                        break;
    29462952
     
    29592965        /*Go through nodes, and whoever is on the potential_sheet_ungrounding, ends up in nodes_on_iceshelf: */
    29602966        for(i=0;i<NUMVERTICES;i++){
    2961                 if (vertices_potentially_ungrounding[nodes[i]->Sid()]){
     2967                if (reCast<bool,IssmDouble>(vertices_potentially_ungrounding[nodes[i]->Sid()])){
    29622968                        vec_nodes_on_iceshelf->SetValue(nodes[i]->Sid(),1,INS_VAL);
    29632969               
     
    30213027/*FUNCTION Penta::SmearFunction {{{*/
    30223028void  Penta::SmearFunction(Vector* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){
    3023         _error2_("not implemented yet");
     3029        _error_("not implemented yet");
    30243030}
    30253031/*}}}*/
     
    32253231                        break;
    32263232                case VelEnum:
    3227 
    3228                         /*Get input:*/
    3229                         IssmDouble vel;
    3230                         Input* vel_input;
    3231 
    3232                         vel_input=this->inputs->GetInput(VelEnum); _assert_(vel_input);
    3233                         vel_input->GetInputAverage(&vel);
    3234 
    3235                         /*process units if requested: */
    3236                         if(process_units) vel=UnitConversion(vel,IuToExtEnum,VelEnum);
    3237 
    3238                         /*Assign output pointers:*/
    3239                         *presponse=vel;
     3233                        {
     3234
     3235                                /*Get input:*/
     3236                                IssmDouble vel;
     3237                                Input* vel_input;
     3238
     3239                                vel_input=this->inputs->GetInput(VelEnum); _assert_(vel_input);
     3240                                vel_input->GetInputAverage(&vel);
     3241
     3242                                /*process units if requested: */
     3243                                if(process_units) vel=UnitConversion(vel,IuToExtEnum,VelEnum);
     3244
     3245                                /*Assign output pointers:*/
     3246                                *presponse=vel;
     3247                        }
     3248                        break;
    32403249                default: 
    3241                         _error2_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
     3250                        _error_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
    32423251        }
    32433252
     
    33623371                kappa=matpar->GetEnthalpyDiffusionParameter(enthalpy,pressure);
    33633372                D_scalar_conduct=gauss->weight*Jdet*kappa;
    3364                 if(dt) D_scalar_conduct=D_scalar_conduct*dt;
     3373                if(reCast<bool,IssmDouble>(dt)) D_scalar_conduct=D_scalar_conduct*dt;
    33653374
    33663375                D[0][0]=D_scalar_conduct; D[0][1]=0; D[0][2]=0;
     
    33823391
    33833392                D_scalar_advec=gauss->weight*Jdet;
    3384                 if(dt) D_scalar_advec=D_scalar_advec*dt;
     3393                if(reCast<bool,IssmDouble>(dt)) D_scalar_advec=D_scalar_advec*dt;
    33853394
    33863395                D[0][0]=D_scalar_advec*vx;D[0][1]=0;                D[0][2]=0;
     
    33943403
    33953404                /*Transient: */
    3396                 if(dt){
     3405                if(reCast<bool,IssmDouble>(dt)){
    33973406                        GetNodalFunctionsP1(&L[0], gauss);
    33983407                        D_scalar_trans=gauss->weight*Jdet;
     
    34153424                        K[2][0]=h/(2*vel)*vz*vx;  K[2][1]=h/(2*vel)*vz*vy; K[2][2]=h/(2*vel)*vz*vz;
    34163425                        D_scalar_stab=gauss->weight*Jdet;
    3417                         if(dt) D_scalar_stab=D_scalar_stab*dt;
     3426                        if(reCast<bool,IssmDouble>(dt)) D_scalar_stab=D_scalar_stab*dt;
    34183427                        for(i=0;i<3;i++) for(j=0;j<3;j++) K[i][j] = D_scalar_stab*K[i][j];
    34193428
     
    34353444                                }
    34363445                        }
    3437                         if(dt){
     3446                        if(reCast<bool,IssmDouble>(dt)){
    34383447                                for(i=0;i<numdof;i++){
    34393448                                        for(j=0;j<numdof;j++){
     
    34913500                               
    34923501                D_scalar=gauss->weight*Jdet2d*rho_water*mixed_layer_capacity*thermal_exchange_velocity/(rho_ice*heatcapacity);
    3493                 if(dt) D_scalar=dt*D_scalar;
     3502                if(reCast<bool,IssmDouble>(dt)) D_scalar=dt*D_scalar;
    34943503
    34953504                TripleMultiply(&basis[0],numdof,1,0,
     
    35913600
    35923601                D_scalar_conduct=gauss->weight*Jdet*kappa;
    3593                 if(dt) D_scalar_conduct=D_scalar_conduct*dt;
     3602                if(reCast<bool,IssmDouble>(dt)) D_scalar_conduct=D_scalar_conduct*dt;
    35943603
    35953604                D[0][0]=D_scalar_conduct; D[0][1]=0; D[0][2]=0;
     
    36123621
    36133622                D_scalar_advec=gauss->weight*Jdet;
    3614                 if(dt) D_scalar_advec=D_scalar_advec*dt;
     3623                if(reCast<bool,IssmDouble>(dt)) D_scalar_advec=D_scalar_advec*dt;
    36153624
    36163625                D[0][0]=D_scalar_advec*vx;    D[0][1]=0;                    D[0][2]=0;
     
    36243633
    36253634                /*Transient: */
    3626                 if(dt){
     3635                if(reCast<bool,IssmDouble>(dt)){
    36273636                        GetNodalFunctionsP1(&L[0], gauss);
    36283637                        D_scalar_trans=gauss->weight*Jdet;
     
    36473656
    36483657                        D_scalar_stab=gauss->weight*Jdet;
    3649                         if(dt) D_scalar_stab=D_scalar_stab*dt;
     3658                        if(reCast<bool,IssmDouble>(dt)) D_scalar_stab=D_scalar_stab*dt;
    36503659                        for(i=0;i<3;i++) for(j=0;j<3;j++) K[i][j] = D_scalar_stab*K[i][j];
    36513660
     
    36673676                                }
    36683677                        }
    3669                         if(dt){
     3678                        if(reCast<bool,IssmDouble>(dt)){
    36703679                                for(i=0;i<numdof;i++){
    36713680                                        for(j=0;j<numdof;j++){
     
    37243733                               
    37253734                D_scalar=gauss->weight*Jdet2d*rho_water*mixed_layer_capacity*thermal_exchange_velocity/(heatcapacity*rho_ice);
    3726                 if(dt) D_scalar=dt*D_scalar;
     3735                if(reCast<bool,IssmDouble>(dt)) D_scalar=dt*D_scalar;
    37273736
    37283737                TripleMultiply(&basis[0],numdof,1,0,
     
    37933802        Input* enthalpy_input=NULL;
    37943803        Input* enthalpypicard_input=NULL;
    3795         if(dt){
     3804        if(reCast<bool,IssmDouble>(dt)){
    37963805                enthalpy_input=inputs->GetInput(EnthalpyEnum); _assert_(enthalpy_input);
    37973806        }
     
    38153824
    38163825                scalar_def=phi/rho_ice*Jdet*gauss->weight;
    3817                 if(dt) scalar_def=scalar_def*dt;
     3826                if(reCast<bool,IssmDouble>(dt)) scalar_def=scalar_def*dt;
    38183827
    38193828                for(i=0;i<NUMVERTICES;i++)  pe->values[i]+=scalar_def*L[i];
    38203829
    38213830                /* Build transient now */
    3822                 if(dt){
     3831                if(reCast<bool,IssmDouble>(dt)){
    38233832                        enthalpy_input->GetInputValue(&enthalpy, gauss);
    38243833                        scalar_transient=enthalpy*Jdet*gauss->weight;
     
    38383847
    38393848                        for(i=0;i<NUMVERTICES;i++)  pe->values[i]+=tau_parameter*scalar_def*(u*dbasis[0][i]+v*dbasis[1][i]+w*dbasis[2][i]);
    3840                         if(dt){
     3849                        if(reCast<bool,IssmDouble>(dt)){
    38413850                                for(i=0;i<NUMVERTICES;i++)  pe->values[i]+=tau_parameter*scalar_transient*(u*dbasis[0][i]+v*dbasis[1][i]+w*dbasis[2][i]);
    38423851                        }
     
    38963905
    38973906                scalar_ocean=gauss->weight*Jdet2d*rho_water*mixed_layer_capacity*thermal_exchange_velocity*(h_pmp)/(rho_ice*heatcapacity);
    3898                 if(dt) scalar_ocean=dt*scalar_ocean;
     3907                if(reCast<bool,IssmDouble>(dt)) scalar_ocean=dt*scalar_ocean;
    38993908
    39003909                for(i=0;i<numdof;i++) pe->values[i]+=scalar_ocean*basis[i];
     
    39823991
    39833992                        scalar=gauss->weight*Jdet2d*(basalfriction+geothermalflux_value)/(rho_ice);
    3984                         if(dt) scalar=dt*scalar;
     3993                        if(reCast<bool,IssmDouble>(dt)) scalar=dt*scalar;
    39853994
    39863995                        for(i=0;i<numdof;i++) pe->values[i]+=scalar*basis[i];
     
    40544063        Input* vz_input=inputs->GetInput(VzEnum); _assert_(vz_input);
    40554064        Input* temperature_input=NULL;
    4056         if (dt) temperature_input=inputs->GetInput(TemperatureEnum); _assert_(inputs);
     4065        if (reCast<bool,IssmDouble>(dt)) temperature_input=inputs->GetInput(TemperatureEnum); _assert_(inputs);
    40574066        if (stabilization==2) diameter=MinEdgeLength(xyz_list);
    40584067
     
    40714080
    40724081                scalar_def=phi/(rho_ice*heatcapacity)*Jdet*gauss->weight;
    4073                 if(dt) scalar_def=scalar_def*dt;
     4082                if(reCast<bool,IssmDouble>(dt)) scalar_def=scalar_def*dt;
    40744083
    40754084                for(i=0;i<NUMVERTICES;i++)  pe->values[i]+=scalar_def*L[i];
    40764085
    40774086                /* Build transient now */
    4078                 if(dt){
     4087                if(reCast<bool,IssmDouble>(dt)){
    40794088                        temperature_input->GetInputValue(&temperature, gauss);
    40804089                        scalar_transient=temperature*Jdet*gauss->weight;
     
    40924101
    40934102                        for(i=0;i<NUMVERTICES;i++)  pe->values[i]+=tau_parameter*scalar_def*(u*dbasis[0][i]+v*dbasis[1][i]+w*dbasis[2][i]);
    4094                         if(dt){
     4103                        if(reCast<bool,IssmDouble>(dt)){
    40954104                                for(i=0;i<NUMVERTICES;i++)  pe->values[i]+=tau_parameter*scalar_transient*(u*dbasis[0][i]+v*dbasis[1][i]+w*dbasis[2][i]);
    40964105                        }
     
    41504159
    41514160                scalar_ocean=gauss->weight*Jdet2d*rho_water*mixed_layer_capacity*thermal_exchange_velocity*(t_pmp)/(heatcapacity*rho_ice);
    4152                 if(dt) scalar_ocean=dt*scalar_ocean;
     4161                if(reCast<bool,IssmDouble>(dt)) scalar_ocean=dt*scalar_ocean;
    41534162
    41544163                for(i=0;i<numdof;i++) pe->values[i]+=scalar_ocean*basis[i];
     
    42164225
    42174226                        scalar=gauss->weight*Jdet2d*(basalfriction+geothermalflux_value)/(heatcapacity*rho_ice);
    4218                         if(dt) scalar=dt*scalar;
     4227                        if(reCast<bool,IssmDouble>(dt)) scalar=dt*scalar;
    42194228
    42204229                        for(i=0;i<numdof;i++) pe->values[i]+=scalar*basis[i];
     
    42324241        const int    numdof=NDOF1*NUMVERTICES;
    42334242
    4234         int          i;
    4235         int*         doflist=NULL;
    4236         IssmDouble       values[numdof];
    4237         IssmDouble       temp;
    4238         GaussPenta   *gauss=NULL;
     4243        int         i;
     4244        int        *doflist = NULL;
     4245        IssmDouble  values[numdof];
     4246        IssmDouble  temp;
     4247        GaussPenta *gauss = NULL;
    42394248
    42404249        /*Get dof list: */
     
    43144323
    43154324                /*Check solution*/
    4316                 if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
     4325                if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
    43174326                //if(values[i]<0)      _printLine_("temperature < 0°K found in solution vector");
    43184327                //if(values[i]>275)    _printLine_("temperature > 275°K found in solution vector (Paterson's rheology associated is negative)");
     
    43484357                                break;
    43494358                        default:
    4350                                 _error2_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
     4359                                _error_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
    43514360
    43524361                }
     
    43844393
    43854394                /*Check solution*/
    4386                 if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
     4395                if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
    43874396        }
    43884397
     
    43974406                for(i=0;i<numdof;i++){
    43984407                        matpar->EnthalpyToThermal(&temperatures[i],&waterfraction[i],values[i],pressure[i]);
    4399                         if(waterfraction[i]<0) _error2_("Negative water fraction found in solution vector");
    4400                         //if(waterfraction[i]>1) _error2_("Water fraction >1 found in solution vector");
     4408                        if(waterfraction[i]<0) _error_("Negative water fraction found in solution vector");
     4409                        //if(waterfraction[i]>1) _error_("Water fraction >1 found in solution vector");
    44014410                }
    44024411                       
     
    44264435                                break;
    44274436                        default:
    4428                                 _error2_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
     4437                                _error_("Rheology law " << EnumToStringx(rheology_law) << " not supported yet");
    44294438
    44304439                }
     
    44544463                input=inputs->GetInput(enum_type);
    44554464        }
    4456         if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
    4457         if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
     4465        if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found");
     4466        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    44584467
    44594468        GradientIndexing(&doflist1[0],control_index);
     
    44724481                input=inputs->GetInput(enum_type);
    44734482        }
    4474         if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
    4475         if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
     4483        if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found");
     4484        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    44764485
    44774486        ((ControlInput*)input)->ScaleGradient(scale);
     
    44914500                input=inputs->GetInput(enum_type);
    44924501        }
    4493         if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
    4494         if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
     4502        if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found");
     4503        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    44954504
    44964505        GradientIndexing(&doflist1[0],control_index);
     
    45164525                        return NULL;
    45174526                default:
    4518                         _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
     4527                        _error_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    45194528        }
    45204529}
     
    47064715                        return CreatePVectorAdjointStokes();
    47074716                default:
    4708                         _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
     4717                        _error_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    47094718        }
    47104719}
     
    47954804                                        break;
    47964805                                default:
    4797                                         _error2_("approximation " << EnumToStringx(approximation) << " not supported yet");
     4806                                        _error_("approximation " << EnumToStringx(approximation) << " not supported yet");
    47984807                        }
    47994808                        break;
     
    48154824                                        break;
    48164825                                default:
    4817                                         _error2_("approximation " << EnumToStringx(approximation) << " not supported yet");
     4826                                        _error_("approximation " << EnumToStringx(approximation) << " not supported yet");
    48184827                        }
    48194828                        break;
    48204829
    48214830                default:
    4822                         _error2_("control type " << EnumToStringx(control_type) << " not supported yet: ");
     4831                        _error_("control type " << EnumToStringx(control_type) << " not supported yet: ");
    48234832        }
    48244833
     
    48524861                        break;
    48534862                default:
    4854                         _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
     4863                        _error_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    48554864        }
    48564865        xDelete<int>(responses);
     
    51065115                }
    51075116
    5108                 if (input->ObjectEnum()!=ControlInputEnum) _error2_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput");
     5117                if (input->ObjectEnum()!=ControlInputEnum) _error_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput");
    51095118
    51105119                ((ControlInput*)input)->UpdateValue(scalar);
     
    51495158
    51505159                /*Check solution*/
    5151                 if(xIsNan<IssmDouble>(lambdax[i])) _error2_("NaN found in solution vector");
    5152                 if(xIsNan<IssmDouble>(lambday[i])) _error2_("NaN found in solution vector");
    5153                 if(xIsNan<IssmDouble>(lambdaz[i])) _error2_("NaN found in solution vector");
    5154                 if(xIsNan<IssmDouble>(lambdap[i])) _error2_("NaN found in solution vector");
     5160                if(xIsNan<IssmDouble>(lambdax[i])) _error_("NaN found in solution vector");
     5161                if(xIsNan<IssmDouble>(lambday[i])) _error_("NaN found in solution vector");
     5162                if(xIsNan<IssmDouble>(lambdaz[i])) _error_("NaN found in solution vector");
     5163                if(xIsNan<IssmDouble>(lambdap[i])) _error_("NaN found in solution vector");
    51555164        }
    51565165
     
    51885197
    51895198                /*Check solution*/
    5190                 if(xIsNan<IssmDouble>(lambdax[i]))       _error2_("NaN found in solution vector");
    5191                 if(xIsNan<IssmDouble>(lambday[i]))       _error2_("NaN found in solution vector");
     5199                if(xIsNan<IssmDouble>(lambdax[i]))       _error_("NaN found in solution vector");
     5200                if(xIsNan<IssmDouble>(lambday[i]))       _error_("NaN found in solution vector");
    51925201        }
    51935202
     
    53905399IssmDouble Penta::ThicknessAbsGradient(bool process_units,int weight_index){
    53915400
    5392         _error2_("Not implemented yet");
     5401        _error_("Not implemented yet");
    53935402}
    53945403/*}}}*/
     
    54055414        /*If on water, return 0: */
    54065415        if(IsOnWater())return 0;
    5407         _error2_("Not implemented yet");
     5416        _error_("Not implemented yet");
    54085417
    54095418        tria=(Tria*)SpawnTria(0,1,2);
     
    54565465        /*Get input (either in element or material)*/
    54575466        Input* input=inputs->GetInput(control_enum);
    5458         if(!input) _error2_("Input " << EnumToStringx(control_enum) << " not found in element");
     5467        if(!input) _error_("Input " << EnumToStringx(control_enum) << " not found in element");
    54595468
    54605469        /*Check that it is a ControlInput*/
    54615470        if (input->ObjectEnum()!=ControlInputEnum){
    5462                 _error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
     5471                _error_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    54635472        }
    54645473
     
    54955504
    54965505        if (input->ObjectEnum()!=ControlInputEnum){
    5497                 _error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
     5506                _error_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    54985507        }
    54995508
     
    56015610
    56025611                default:
    5603                         _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     5612                        _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    56045613        }
    56055614
     
    56085617/*FUNCTION Penta::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
    56095618void  Penta::InputUpdateFromVectorDakota(int* vector, int name, int type){
    5610         _error2_("not supported yet!");
     5619        _error_("not supported yet!");
    56115620}
    56125621/*}}}*/
    56135622/*FUNCTION Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
    56145623void  Penta::InputUpdateFromVectorDakota(bool* vector, int name, int type){
    5615         _error2_("not supported yet!");
     5624        _error_("not supported yet!");
    56165625}
    56175626/*}}}*/
     
    56565665
    56575666                default:
    5658                         _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     5667                        _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    56595668        }
    56605669
     
    62006209                case MacAyealApproximationEnum:
    62016210                        return CreateKMatrixDiagnosticMacAyeal2d();
     6211                case L1L2ApproximationEnum:
     6212                        return CreateKMatrixDiagnosticL1L2();
    62026213                case PattynApproximationEnum:
    62036214                        return CreateKMatrixDiagnosticPattyn();
     
    62156226                        return CreateKMatrixDiagnosticPattynStokes();
    62166227                default:
    6217                         _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
     6228                        _error_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    62186229        }
    62196230}
     
    62266237
    62276238        /*Intermediaries*/
    6228         int       connectivity[2];
    6229         int       i,i0,i1,j0,j1;
    6230         IssmDouble    one0,one1;
     6239        int         connectivity[2];
     6240        int         i,i0,i1,j0,j1;
     6241        IssmDouble  one0,one1;
    62316242
    62326243        /*Initialize Element matrix*/
     
    63276338        /*Intermediaries */
    63286339        int         i,j,ig,approximation;
    6329         IssmDouble      Jdet;
    6330         IssmDouble      viscosity, oldviscosity, newviscosity, viscosity_overshoot;
    6331         IssmDouble      epsilon[5],oldepsilon[5]; /* epsilon=[exx,eyy,exy,exz,eyz];*/
    6332         IssmDouble      epsilons[6]; //6 for stokes
    6333         IssmDouble      xyz_list[NUMVERTICES][3];
    6334         IssmDouble      B[3][numdof2d];
    6335         IssmDouble      Bprime[3][numdof2d];
    6336         IssmDouble      D[3][3]={0.0};            // material matrix, simple scalar matrix.
    6337         IssmDouble      D_scalar;
    6338         IssmDouble      Ke_gg_gaussian[numdof2d][numdof2d]; //stiffness matrix evaluated at the gaussian point.
    6339         Tria*       tria=NULL;
    6340         Penta*      pentabase=NULL;
    6341         GaussPenta *gauss=NULL;
    6342         GaussTria  *gauss_tria=NULL;
     6340        IssmDouble  Jdet;
     6341        IssmDouble  viscosity , oldviscosity, newviscosity, viscosity_overshoot;
     6342        IssmDouble  epsilon[5],oldepsilon[5];      /* epsilon=[exx,eyy,exy,exz,eyz];*/
     6343        IssmDouble  epsilons[6];                    //6 for stokes
     6344        IssmDouble  xyz_list[NUMVERTICES][3];
     6345        IssmDouble  B[3][numdof2d];
     6346        IssmDouble  Bprime[3][numdof2d];
     6347        IssmDouble  D[3][3]= {0.0};                 // material matrix, simple scalar matrix.
     6348        IssmDouble  D_scalar;
     6349        IssmDouble  Ke_gg_gaussian[numdof2d][numdof2d];
     6350        Tria       *tria       = NULL;
     6351        Penta      *pentabase  = NULL;
     6352        GaussPenta *gauss      = NULL;
     6353        GaussTria  *gauss_tria = NULL;
    63436354
    63446355        /*Find penta on bed as this is a macayeal elements: */
     
    63836394                        matice->GetViscosity3dStokes(&newviscosity,&epsilons[0]);
    63846395                }
    6385                 else _error2_("approximation " << approximation << " (" << EnumToStringx(approximation) << ") not supported yet");
     6396                else _error_("approximation " << approximation << " (" << EnumToStringx(approximation) << ") not supported yet");
    63866397
    63876398                D_scalar=2*newviscosity*gauss->weight*Jdet;
     
    64536464        delete Ke2;
    64546465        delete Ke3;
     6466        return Ke;
     6467}
     6468/*}}}*/
     6469/*FUNCTION Penta::CreateKMatrixDiagnosticL1L2{{{*/
     6470ElementMatrix* Penta::CreateKMatrixDiagnosticL1L2(void){
     6471
     6472        /*compute all stiffness matrices for this element*/
     6473        ElementMatrix* Ke1=CreateKMatrixDiagnosticL1L2Viscous();
     6474        ElementMatrix* Ke2=CreateKMatrixDiagnosticL1L2Friction();
     6475        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
     6476
     6477        /*clean-up and return*/
     6478        delete Ke1;
     6479        delete Ke2;
     6480        return Ke;
     6481}
     6482/*}}}*/
     6483/*FUNCTION Penta::CreateKMatrixDiagnosticL1L2Viscous{{{*/
     6484ElementMatrix* Penta::CreateKMatrixDiagnosticL1L2Viscous(void){
     6485
     6486        /*Constants*/
     6487        const int    numdof2d=2*NUMVERTICES2D;
     6488
     6489        /*Intermediaries */
     6490        int         i,j;
     6491        IssmDouble  Jdet,viscosity;
     6492        IssmDouble  epsilon[5];       /* epsilon=[exx,eyy,exy,exz,eyz];*/
     6493        IssmDouble  xyz_list[NUMVERTICES][3];
     6494        IssmDouble  B[3][numdof2d];
     6495        IssmDouble  Bprime[3][numdof2d];
     6496        IssmDouble  Ke_gg_gaussian[numdof2d][numdof2d];
     6497        IssmDouble  D[3][3]= {0.0};                 // material matrix, simple scalar matrix.
     6498        Tria       *tria       = NULL;
     6499        Penta      *pentabase  = NULL;
     6500        GaussPenta *gauss      = NULL;
     6501        GaussTria  *gauss_tria = NULL;
     6502
     6503        /*Find penta on bed as this is a macayeal elements: */
     6504        pentabase=GetBasalElement();
     6505        tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
     6506
     6507        /*Initialize Element matrix*/
     6508        ElementMatrix* Ke=new ElementMatrix(tria->nodes,NUMVERTICES2D,this->parameters,L1L2ApproximationEnum);
     6509
     6510        /*Retrieve all inputs and parameters*/
     6511        GetVerticesCoordinates(&xyz_list[0][0], nodes,NUMVERTICES);
     6512        Input* vx_input=inputs->GetInput(VxEnum);        _assert_(vx_input);
     6513        Input* vy_input=inputs->GetInput(VyEnum);        _assert_(vy_input);
     6514        Input* surf_input=inputs->GetInput(SurfaceEnum); _assert_(surf_input);
     6515
     6516        /* Start  looping on the number of gaussian points: */
     6517        gauss=new GaussPenta(5,5);
     6518        gauss_tria=new GaussTria();
     6519        for(int ig=gauss->begin();ig<gauss->end();ig++){
     6520
     6521                gauss->GaussPoint(ig);
     6522                gauss->SynchronizeGaussTria(gauss_tria);
     6523
     6524                GetJacobianDeterminant(&Jdet, &xyz_list[0][0],gauss);
     6525                tria->GetBMacAyeal(&B[0][0], &xyz_list[0][0], gauss_tria);
     6526                tria->GetBprimeMacAyeal(&Bprime[0][0], &xyz_list[0][0], gauss_tria);
     6527
     6528                /*Get viscosity for L1L2 model*/
     6529                GetL1L2Viscosity(&viscosity,&xyz_list[0][0],gauss,vx_input,vy_input,surf_input);
     6530
     6531                for(i=0;i<3;i++) D[i][i]=2*viscosity*gauss->weight*Jdet;
     6532
     6533                TripleMultiply( &B[0][0],3,numdof2d,1,
     6534                                        &D[0][0],3,3,0,
     6535                                        &Bprime[0][0],3,numdof2d,0,
     6536                                        &Ke_gg_gaussian[0][0],0);
     6537                for(i=0;i<numdof2d;i++) for(j=0;j<numdof2d;j++) Ke->values[i*numdof2d+j]+=Ke_gg_gaussian[i][j];
     6538        }
     6539
     6540        /*Transform Coordinate System*/
     6541        TransformStiffnessMatrixCoord(Ke,tria->nodes,NUMVERTICES2D,XYEnum);
     6542
     6543        /*Clean up and return*/
     6544        delete tria->matice;
     6545        delete tria;
     6546        delete gauss_tria;
     6547        delete gauss;
     6548        return Ke;
     6549}
     6550/*}}}*/
     6551/*FUNCTION Penta::CreateKMatrixDiagnosticL1L2Friction{{{*/
     6552ElementMatrix* Penta::CreateKMatrixDiagnosticL1L2Friction(void){
     6553
     6554        /*Initialize Element matrix and return if necessary*/
     6555        if(IsFloating() || !IsOnBed()) return NULL;
     6556
     6557        /*Build a tria element using the 3 nodes of the base of the penta. Then use
     6558         * the tria functionality to build a friction stiffness matrix on these 3
     6559         * nodes: */
     6560        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
     6561        ElementMatrix* Ke=tria->CreateKMatrixDiagnosticMacAyealFriction();
     6562        delete tria->matice; delete tria;
     6563
     6564        /*clean-up and return*/
    64556565        return Ke;
    64566566}
     
    71937303                case PattynApproximationEnum:
    71947304                        return CreatePVectorDiagnosticPattyn();
     7305                case L1L2ApproximationEnum:
     7306                        return CreatePVectorDiagnosticL1L2();
    71957307                case HutterApproximationEnum:
    71967308                        return NULL;
     
    72067318                        return CreatePVectorDiagnosticPattynStokes();
    72077319                default:
    7208                         _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
     7320                        _error_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    72097321        }
    72107322}
     
    73467458/*FUNCTION Penta::CreatePVectorDiagnosticMacAyeal{{{*/
    73477459ElementVector* Penta::CreatePVectorDiagnosticMacAyeal(void){
     7460
     7461        if (!IsOnBed()) return NULL;
     7462
     7463        /*Call Tria function*/
     7464        Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
     7465        ElementVector* pe=tria->CreatePVectorDiagnosticMacAyeal();
     7466        delete tria->matice; delete tria;
     7467
     7468        /*Clean up and return*/
     7469        return pe;
     7470}
     7471/*}}}*/
     7472/*FUNCTION Penta::CreatePVectorDiagnosticL1L2{{{*/
     7473ElementVector* Penta::CreatePVectorDiagnosticL1L2(void){
    73487474
    73497475        if (!IsOnBed()) return NULL;
     
    77197845                        return NULL;
    77207846                default:
    7721                         _error2_("Approximation " << EnumToStringx(approximation) << " not supported yet");
     7847                        _error_("Approximation " << EnumToStringx(approximation) << " not supported yet");
    77227848        }
    77237849}
     
    78928018        const int    numdof=NDOF2*NUMVERTICES;
    78938019
    7894         int          i;
    7895         int          approximation;
    7896         int*         doflist=NULL;
    7897         IssmDouble       vx,vy;
    7898         IssmDouble       values[numdof];
    7899         GaussPentagauss;
     8020        int         i;
     8021        int         approximation;
     8022        int        *doflist        = NULL;
     8023        IssmDouble  vx,vy;
     8024        IssmDouble  values[numdof];
     8025        GaussPenta *gauss;
    79008026
    79018027        /*Get approximation enum and dof list: */
     
    80438169}
    80448170/*}}}*/
     8171/*FUNCTION Penta::GetL1L2Viscosity{{{*/
     8172void Penta::GetL1L2Viscosity(IssmDouble* pviscosity,IssmDouble* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input,Input* surface_input){
     8173        /*Compute the L1L2 viscosity
     8174         *
     8175         *      1
     8176         * mu = - A^-1 (sigma'_e)^(1-n)
     8177         *      2
     8178         *
     8179         * sigma'_e^2 = |sigma'_//|^2 + |sigma'_perp|^2 (see Perego 2012 eq. 17,18)
     8180         *
     8181         * L1L2 assumptions:
     8182         *
     8183         * (1) |eps_b|_// = A (|sigma'_//|^2 + |sigma'_perp|^2)^((n-1)/2) |sigma'_//|
     8184         * (2) |sigma'_perp|^2 = |rho g (s-z) grad(s)|^2
     8185         *
     8186         * Assuming that n = 3, we have a polynom of degree 3 to solve (the only unkown is X=|sigma'_//|)
     8187         *
     8188         * A X^3 + A |rho g (s-z) grad(s)|^2 X - |eps_b|_// = 0     */
     8189
     8190        int        i;
     8191        IssmDouble z,s,viscosity,p,q,delta;
     8192        IssmDouble tau_perp,tau_par,eps_b,A;
     8193        IssmDouble epsilonvx[5]; /*exx eyy exy exz eyz*/
     8194        IssmDouble epsilonvy[5]; /*exx eyy exy exz eyz*/
     8195        IssmDouble epsilon[5];   /*exx eyy exy exz eyz*/
     8196        IssmDouble z_list[NUMVERTICES];
     8197        IssmDouble slope[3];
     8198
     8199        /*Check that both inputs have been found*/
     8200        if (!vx_input || !vy_input || !surface_input) _error_("Input missing");
     8201
     8202        /*Get tau_perp*/
     8203        for(i=0;i<NUMVERTICES;i++) z_list[i]=xyz_list[3*i+2];
     8204        surface_input->GetInputValue(&s,gauss);
     8205        surface_input->GetInputDerivativeValue(&slope[0],xyz_list,gauss);
     8206        PentaRef::GetInputValue(&z,&z_list[0],gauss);
     8207        tau_perp = matpar->GetRhoIce() * matpar->GetG() * fabs(s-z)*sqrt(slope[0]*slope[0]+slope[1]*slope[1]);
     8208
     8209        /* Get eps_b*/
     8210        vx_input->GetVxStrainRate3dPattyn(epsilonvx,xyz_list,gauss);
     8211        vy_input->GetVyStrainRate3dPattyn(epsilonvy,xyz_list,gauss);
     8212        for(i=0;i<5;i++) epsilon[i]=epsilonvx[i]+epsilonvy[i];
     8213        eps_b = sqrt(epsilon[0]*epsilon[0] + epsilon[1]*epsilon[1] + epsilon[0]*epsilon[1] + epsilon[2]*epsilon[2]);
     8214        if(eps_b==0.){
     8215                *pviscosity = 2.5e+17;
     8216                return;
     8217        }
     8218
     8219        /*Get A*/
     8220        _assert_(matice->GetN()==3.0);
     8221        A=matice->GetA();
     8222
     8223        /*Solve for tau_perp (http://fr.wikipedia.org/wiki/Méthode_de_Cardan)*/
     8224        p     = tau_perp *tau_perp;
     8225        q     = - eps_b/A;
     8226        delta = q *q + p*p*p*4./27.;
     8227        _assert_(delta>0);
     8228        tau_par = pow(0.5*(-q+sqrt(delta)),1./3.) - pow(0.5*(q+sqrt(delta)),1./3.);
     8229
     8230        /*Viscosity*/
     8231        viscosity = 1./(2.*A*(tau_par*tau_par + tau_perp*tau_perp));
     8232        _assert_(!isnan(viscosity));
     8233        _assert_(viscosity > 0.);
     8234
     8235        /*Assign output pointer*/
     8236        *pviscosity = viscosity;
     8237        return;
     8238}
     8239/*}}}*/
    80458240/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticHoriz {{{*/
    80468241void  Penta::InputUpdateFromSolutionDiagnosticHoriz(IssmDouble* solution){
     
    80618256                        return;
    80628257                }
     8258        }
     8259        if (approximation==L1L2ApproximationEnum){
     8260                if (!IsOnBed()) return;
     8261                InputUpdateFromSolutionDiagnosticL1L2(solution);
     8262                return;
    80638263        }
    80648264        else if (approximation==PattynApproximationEnum){
     
    81148314
    81158315                /*Check solution*/
    8116                 if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
    8117                 if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
     8316                if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector");
     8317                if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector");
    81188318        }
    81198319
     
    82128412
    82138413                /*Check solution*/
    8214                 if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
    8215                 if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
     8414                if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector");
     8415                if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector");
    82168416        }
    82178417
     
    83008500
    83018501                /*Check solution*/
    8302                 if(xIsNan<IssmDouble>(vx[i]))       _error2_("NaN found in solution vector");
    8303                 if(xIsNan<IssmDouble>(vy[i]))       _error2_("NaN found in solution vector");
    8304                 if(xIsNan<IssmDouble>(vzstokes[i])) _error2_("NaN found in solution vector");
    8305                 if(xIsNan<IssmDouble>(pressure[i])) _error2_("NaN found in solution vector");
     8502                if(xIsNan<IssmDouble>(vx[i]))       _error_("NaN found in solution vector");
     8503                if(xIsNan<IssmDouble>(vy[i]))       _error_("NaN found in solution vector");
     8504                if(xIsNan<IssmDouble>(vzstokes[i])) _error_("NaN found in solution vector");
     8505                if(xIsNan<IssmDouble>(pressure[i])) _error_("NaN found in solution vector");
    83068506        }
    83078507
     
    83108510        if (vzmacayeal_input){
    83118511                if (vzmacayeal_input->ObjectEnum()!=PentaP1InputEnum){
    8312                         _error2_("Cannot compute Vel as VzMacAyeal is of type " << EnumToStringx(vzmacayeal_input->ObjectEnum()));
     8512                        _error_("Cannot compute Vel as VzMacAyeal is of type " << EnumToStringx(vzmacayeal_input->ObjectEnum()));
    83138513                }
    83148514                GetInputListOnVertices(&vzmacayeal[0],VzMacAyealEnum);
    83158515        }
    83168516        else{
    8317                 _error2_("Cannot update solution as VzMacAyeal is not present");
     8517                _error_("Cannot update solution as VzMacAyeal is not present");
    83188518        }
    83198519
     
    83428542        xDelete<int>(doflistm);
    83438543        xDelete<int>(doflists);
     8544}
     8545/*}}}*/
     8546/*FUNCTION Penta::InputUpdateFromSolutionDiagnosticL1L2 {{{*/
     8547void  Penta::InputUpdateFromSolutionDiagnosticL1L2(IssmDouble* solution){
     8548
     8549        const int    numdof=NDOF2*NUMVERTICES;
     8550
     8551        int     i;
     8552        IssmDouble  rho_ice,g;
     8553        IssmDouble  values[numdof];
     8554        IssmDouble  vx[NUMVERTICES];
     8555        IssmDouble  vy[NUMVERTICES];
     8556        IssmDouble  vz[NUMVERTICES];
     8557        IssmDouble  vel[NUMVERTICES];
     8558        IssmDouble  pressure[NUMVERTICES];
     8559        IssmDouble  surface[NUMVERTICES];
     8560        IssmDouble  xyz_list[NUMVERTICES][3];
     8561        int    *doflist = NULL;
     8562        Penta  *penta   = NULL;
     8563
     8564        /*Get dof list: */
     8565        GetDofList(&doflist,L1L2ApproximationEnum,GsetEnum);
     8566
     8567        /*Use the dof list to index into the solution vector: */
     8568        for(i=0;i<numdof;i++) values[i]=solution[doflist[i]];
     8569
     8570        /*Transform solution in Cartesian Space*/
     8571        TransformSolutionCoord(&values[0],nodes,NUMVERTICES2D,XYEnum); /*2D: only the first 3 nodes are taken*/
     8572
     8573        /*Ok, we have vx and vy in values, fill in vx and vy arrays and extrude */
     8574        for(i=0;i<3;i++){
     8575                vx[i]  =values[i*NDOF2+0];
     8576                vy[i]  =values[i*NDOF2+1];
     8577                vx[i+3]=vx[i];
     8578                vy[i+3]=vy[i];
     8579
     8580                /*Check solution*/
     8581                if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector");
     8582                if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector");
     8583        }
     8584
     8585        /*Get parameters fro pressure computation*/
     8586        rho_ice=matpar->GetRhoIce();
     8587        g=matpar->GetG();
     8588
     8589        /*Start looping over all elements above current element and update all inputs*/
     8590        penta=this;
     8591        for(;;){
     8592
     8593                /*Get node data: */
     8594                GetVerticesCoordinates(&xyz_list[0][0],penta->nodes,NUMVERTICES);
     8595
     8596                /*Now Compute vel*/
     8597                GetInputListOnVertices(&vz[0],VzEnum,0.0); //default is 0
     8598                for(i=0;i<NUMVERTICES;i++) vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5);
     8599
     8600                /*Now compute pressure*/
     8601                GetInputListOnVertices(&surface[0],SurfaceEnum);
     8602                for(i=0;i<NUMVERTICES;i++) pressure[i]=rho_ice*g*(surface[i]-xyz_list[i][2]);
     8603
     8604                /*Now, we have to move the previous Vx and Vy inputs  to old
     8605                 * status, otherwise, we'll wipe them off: */
     8606                penta->inputs->ChangeEnum(VxEnum,VxPicardEnum);
     8607                penta->inputs->ChangeEnum(VyEnum,VyPicardEnum);
     8608                penta->inputs->ChangeEnum(PressureEnum,PressurePicardEnum);
     8609
     8610                /*Add vx and vy as inputs to the tria element: */
     8611                penta->inputs->AddInput(new PentaP1Input(VxEnum,vx));
     8612                penta->inputs->AddInput(new PentaP1Input(VyEnum,vy));
     8613                penta->inputs->AddInput(new PentaP1Input(VelEnum,vel));
     8614                penta->inputs->AddInput(new PentaP1Input(PressureEnum,pressure));
     8615
     8616                /*Stop if we have reached the surface*/
     8617                if (penta->IsOnSurface()) break;
     8618
     8619                /* get upper Penta*/
     8620                penta=penta->GetUpperElement(); _assert_(penta->Id()!=this->id);
     8621        }
     8622
     8623        /*Free ressources:*/
     8624        xDelete<int>(doflist);
    83448625}
    83458626/*}}}*/
     
    83798660
    83808661                /*Check solution*/
    8381                 if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
    8382                 if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
     8662                if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector");
     8663                if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector");
    83838664        }
    83848665
     
    84688749
    84698750                /*Check solution*/
    8470                 if(xIsNan<IssmDouble>(vx[i]))       _error2_("NaN found in solution vector");
    8471                 if(xIsNan<IssmDouble>(vy[i]))       _error2_("NaN found in solution vector");
    8472                 if(xIsNan<IssmDouble>(vzstokes[i])) _error2_("NaN found in solution vector");
    8473                 if(xIsNan<IssmDouble>(pressure[i])) _error2_("NaN found in solution vector");
     8751                if(xIsNan<IssmDouble>(vx[i]))       _error_("NaN found in solution vector");
     8752                if(xIsNan<IssmDouble>(vy[i]))       _error_("NaN found in solution vector");
     8753                if(xIsNan<IssmDouble>(vzstokes[i])) _error_("NaN found in solution vector");
     8754                if(xIsNan<IssmDouble>(pressure[i])) _error_("NaN found in solution vector");
    84748755        }
    84758756
     
    84788759        if (vzpattyn_input){
    84798760                if (vzpattyn_input->ObjectEnum()!=PentaP1InputEnum){
    8480                         _error2_("Cannot compute Vel as VzPattyn is of type " << EnumToStringx(vzpattyn_input->ObjectEnum()));
     8761                        _error_("Cannot compute Vel as VzPattyn is of type " << EnumToStringx(vzpattyn_input->ObjectEnum()));
    84818762                }
    84828763                GetInputListOnVertices(&vzpattyn[0],VzPattynEnum);
    84838764        }
    84848765        else{
    8485                 _error2_("Cannot update solution as VzPattyn is not present");
     8766                _error_("Cannot update solution as VzPattyn is not present");
    84868767        }
    84878768
     
    85448825
    85458826                /*Check solution*/
    8546                 if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
    8547                 if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
     8827                if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector");
     8828                if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector");
    85488829        }
    85498830
     
    86138894
    86148895                /*Check solution*/
    8615                 if(xIsNan<IssmDouble>(vz[i])) _error2_("NaN found in solution vector");
     8896                if(xIsNan<IssmDouble>(vz[i])) _error_("NaN found in solution vector");
    86168897        }
    86178898
     
    86248905                Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
    86258906                if (vzstokes_input){
    8626                         if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error2_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
     8907                        if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
    86278908                        GetInputListOnVertices(&vzstokes[0],VzStokesEnum);
    86288909                }
    8629                 else _error2_("Cannot compute Vz as VzStokes in not present in PattynStokes element");
     8910                else _error_("Cannot compute Vz as VzStokes in not present in PattynStokes element");
    86308911                for(i=0;i<NUMVERTICES;i++){
    86318912                        vzpattyn[i]=vz[i];
     
    86368917                Input* vzstokes_input=inputs->GetInput(VzStokesEnum);
    86378918                if (vzstokes_input){
    8638                         if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error2_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
     8919                        if (vzstokes_input->ObjectEnum()!=PentaP1InputEnum) _error_("Cannot compute Vel as VzStokes is of type " << EnumToStringx(vzstokes_input->ObjectEnum()));
    86398920                        GetInputListOnVertices(&vzstokes[0],VzStokesEnum);
    86408921                }
    8641                 else _error2_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
     8922                else _error_("Cannot compute Vz as VzStokes in not present in MacAyealStokes element");
    86428923                for(i=0;i<NUMVERTICES;i++){
    86438924                        vzmacayeal[i]=vz[i];
     
    87118992
    87128993                /*Check solution*/
    8713                 if(xIsNan<IssmDouble>(vx[i]))       _error2_("NaN found in solution vector");
    8714                 if(xIsNan<IssmDouble>(vy[i]))       _error2_("NaN found in solution vector");
    8715                 if(xIsNan<IssmDouble>(vz[i]))       _error2_("NaN found in solution vector");
    8716                 if(xIsNan<IssmDouble>(pressure[i])) _error2_("NaN found in solution vector");
     8994                if(xIsNan<IssmDouble>(vx[i]))       _error_("NaN found in solution vector");
     8995                if(xIsNan<IssmDouble>(vy[i]))       _error_("NaN found in solution vector");
     8996                if(xIsNan<IssmDouble>(vz[i]))       _error_("NaN found in solution vector");
     8997                if(xIsNan<IssmDouble>(pressure[i])) _error_("NaN found in solution vector");
    87178998        }
    87188999
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/Penta.h

    r12946 r13101  
    162162                IssmDouble SurfaceAverageVelMisfit(bool process_units,int weight_index);
    163163                IssmDouble ThicknessAbsGradient(bool process_units,int weight_index);
    164                 IssmDouble ThicknessAlongGradient( bool process_units,int weight_index){_error2_("not supported");};
    165                 IssmDouble ThicknessAcrossGradient(bool process_units,int weight_index){_error2_("not supported");};
     164                IssmDouble ThicknessAlongGradient( bool process_units,int weight_index){_error_("not supported");};
     165                IssmDouble ThicknessAcrossGradient(bool process_units,int weight_index){_error_("not supported");};
    166166                void   InputControlUpdate(IssmDouble scalar,bool save_parameter);
    167167                #endif
     
    169169                /*Penta specific routines:{{{*/
    170170                void      BedNormal(IssmDouble* bed_normal, IssmDouble xyz_list[3][3]);
     171                ElementMatrix* CreateBasalMassMatrix(void);
    171172                ElementMatrix* CreateKMatrixPrognostic(void);
    172                 ElementMatrix* CreateKMatrixSlope(void);
    173173                ElementVector* CreatePVectorPrognostic(void);
    174174                ElementVector* CreatePVectorSlope(void);
     
    227227                ElementMatrix* CreateKMatrixDiagnosticMacAyealPattyn(void);
    228228                ElementMatrix* CreateKMatrixDiagnosticMacAyealStokes(void);
     229                ElementMatrix* CreateKMatrixDiagnosticL1L2(void);
     230                ElementMatrix* CreateKMatrixDiagnosticL1L2Viscous(void);
     231                ElementMatrix* CreateKMatrixDiagnosticL1L2Friction(void);
    229232                ElementMatrix* CreateKMatrixDiagnosticPattyn(void);
    230233                ElementMatrix* CreateKMatrixDiagnosticPattynViscous(void);
     
    245248                void           InputUpdateFromSolutionDiagnosticMacAyealPattyn( IssmDouble* solutiong);
    246249                void           InputUpdateFromSolutionDiagnosticMacAyealStokes( IssmDouble* solutiong);
     250                void           InputUpdateFromSolutionDiagnosticL1L2( IssmDouble* solutiong);
    247251                void           InputUpdateFromSolutionDiagnosticPattyn( IssmDouble* solutiong);
    248252                void           InputUpdateFromSolutionDiagnosticPattynStokes( IssmDouble* solutiong);
     
    265269                ElementVector* CreatePVectorDiagnosticMacAyealPattyn(void);
    266270                ElementVector* CreatePVectorDiagnosticMacAyealStokes(void);
     271                ElementVector* CreatePVectorDiagnosticL1L2(void);
    267272                ElementVector* CreatePVectorDiagnosticPattyn(void);
    268273                ElementVector* CreatePVectorDiagnosticPattynStokes(void);
     
    273278                ElementVector* CreatePVectorDiagnosticVertVolume(void);
    274279                ElementVector* CreatePVectorDiagnosticVertBase(void);
     280                void GetL1L2Viscosity(IssmDouble*, IssmDouble*, GaussPenta*, Input*, Input*, Input*);
    275281                #endif
    276282
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/PentaRef.cpp

    r12832 r13101  
    949949        /*Get Determinant*/
    950950        Matrix3x3Determinant(Jdet,&J[0][0]);
    951         if(*Jdet<0) _error2_("negative jacobian determinant!");
     951        if(*Jdet<0) _error_("negative jacobian determinant!");
    952952
    953953}
     
    972972        /*Jdet = norm( AB ^ AC ) / (2 * area of the reference triangle), with areaRef=sqrt(3) */
    973973        *Jdet=SQRT3/6.0*pow(pow(((y2-y1)*(z3-z1)-(z2-z1)*(y3-y1)),2.0)+pow(((z2-z1)*(x3-x1)-(x2-x1)*(z3-z1)),2.0)+pow(((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)),2.0),0.5);
    974         if(*Jdet<0) _error2_("negative jacobian determinant!");
     974        if(*Jdet<0) _error_("negative jacobian determinant!");
    975975}
    976976/*}}}*/
     
    990990
    991991        *Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.) + pow(z2-z1,2.));
    992         if(*Jdet<0) _error2_("negative jacobian determinant!");
     992        if(*Jdet<0) _error_("negative jacobian determinant!");
    993993
    994994}
     
    12261226        /*Area of a trabezoid = altitude * (base1 + base2)/2 */
    12271227        *Jdet= pow(pow(x2-x1,2.) + pow(y2-y1,2.),0.5) * (z4-z1 + z3-z2)/8;
    1228         if(*Jdet<0) _error2_("negative jacobian determinant!");
     1228        if(*Jdet<0) _error_("negative jacobian determinant!");
    12291229
    12301230}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/PentaRef.h

    r12494 r13101  
    5656                void GetLprimeStokesMacAyeal(IssmDouble* LprimeStokesMacAyeal, IssmDouble* xyz_list, GaussPenta* gauss);
    5757                void GetInputValue(IssmDouble* pvalue,IssmDouble* plist, GaussPenta* gauss);
    58                 void GetInputValue(IssmDouble* pvalue,IssmDouble* plist,GaussTria* gauss){_error2_("only PentaGauss are supported");};
     58                void GetInputValue(IssmDouble* pvalue,IssmDouble* plist,GaussTria* gauss){_error_("only PentaGauss are supported");};
    5959                void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussPenta* gauss);
    60                 void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussTria* gauss){_error2_("only PentaGauss are supported");};
     60                void GetInputDerivativeValue(IssmDouble* pvalues, IssmDouble* plist,IssmDouble* xyz_list, GaussTria* gauss){_error_("only PentaGauss are supported");};
    6161
    6262};
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/Tria.cpp

    r12946 r13101  
    193193                 #endif
    194194                case BedSlopeXAnalysisEnum: case SurfaceSlopeXAnalysisEnum: case BedSlopeYAnalysisEnum: case SurfaceSlopeYAnalysisEnum:
    195                         Ke=CreateKMatrixSlope();
     195                        Ke=CreateMassMatrix();
    196196                        break;
    197197                case PrognosticAnalysisEnum:
     
    214214                #endif
    215215                default:
    216                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     216                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    217217        }
    218218
     
    232232        /*Intermediaries */
    233233        int        i,j,ig;
    234         IssmDouble     heatcapacity,latentheat;
    235         IssmDouble     Jdet,D_scalar;
    236         IssmDouble     xyz_list[NUMVERTICES][3];
    237         IssmDouble     L[3];
     234        IssmDouble heatcapacity,latentheat;
     235        IssmDouble Jdet,D_scalar;
     236        IssmDouble xyz_list[NUMVERTICES][3];
     237        IssmDouble L[3];
    238238        GaussTria *gauss=NULL;
    239239
     
    277277                        return CreateKMatrixPrognostic_DG();
    278278                default:
    279                         _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
     279                        _error_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    280280        }
    281281
     
    370370                if(stabilization==2){
    371371                        /*Streamline upwinding*/
    372                         vel=sqrt(pow(vx,2.)+pow(vy,2.))+1.e-8;
     372                        vel=sqrt(vx*vx+vy*vy)+1.e-8;
    373373                        K[0][0]=h/(2*vel)*vx*vx;
    374374                        K[1][0]=h/(2*vel)*vy*vx;
     
    477477}
    478478/*}}}*/
    479 /*FUNCTION Tria::CreateKMatrixSlope {{{*/
    480 ElementMatrix* Tria::CreateKMatrixSlope(void){
     479/*FUNCTION Tria::CreateMassMatrix {{{*/
     480ElementMatrix* Tria::CreateMassMatrix(void){
    481481
    482482        /*constants: */
     
    484484
    485485        /* Intermediaries */
    486         int        i,j,ig;
    487         IssmDouble     DL_scalar,Jdet;
    488         IssmDouble     xyz_list[NUMVERTICES][3];
    489         IssmDouble     L[1][3];
    490         GaussTria *gauss = NULL;
     486        IssmDouble  D,Jdet;
     487        IssmDouble  xyz_list[NUMVERTICES][3];
     488        IssmDouble  L[1][3];
     489        GaussTria  *gauss = NULL;
    491490
    492491        /*Initialize Element matrix*/
     
    497496        /* Start looping on the number of gaussian points: */
    498497        gauss=new GaussTria(2);
    499         for (ig=gauss->begin();ig<gauss->end();ig++){
     498        for(int ig=gauss->begin();ig<gauss->end();ig++){
    500499
    501500                gauss->GaussPoint(ig);
    502501               
    503502                GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss);
    504                 DL_scalar=gauss->weight*Jdet;
     503                D=gauss->weight*Jdet;
    505504
    506505                GetL(&L[0][0], &xyz_list[0][0], gauss,NDOF1);
    507506
    508507                TripleMultiply(&L[0][0],1,3,1,
    509                                         &DL_scalar,1,1,0,
     508                                        &D,1,1,0,
    510509                                        &L[0][0],1,3,0,
    511510                                        &Ke->values[0],1);
     
    568567                #endif
    569568                default:
    570                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     569                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    571570        }
    572571
     
    587586                        return CreatePVectorPrognostic_DG();
    588587                default:
    589                         _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
     588                        _error_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    590589        }
    591590}
     
    763762#endif
    764763                default:
    765                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     764                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    766765        }
    767766
     
    775774/*FUNCTION Tria::ComputeBasalStress {{{*/
    776775void  Tria::ComputeBasalStress(Vector* eps){
    777         _error2_("Not Implemented yet");
     776        _error_("Not Implemented yet");
    778777}
    779778/*}}}*/
    780779/*FUNCTION Tria::ComputeStrainRate {{{*/
    781780void  Tria::ComputeStrainRate(Vector* eps){
    782         _error2_("Not Implemented yet");
     781        _error_("Not Implemented yet");
    783782}
    784783/*}}}*/
     
    10881087                 return i;
    10891088        }
    1090         _error2_("Node provided not found among element nodes");
     1089        _error_("Node provided not found among element nodes");
    10911090}
    10921091/*}}}*/
     
    11001099        /*Recover input*/
    11011100        Input* input=inputs->GetInput(enumtype);
    1102         if (!input) _error2_("Input " << EnumToStringx(enumtype) << " not found in element");
     1101        if (!input) _error_("Input " << EnumToStringx(enumtype) << " not found in element");
    11031102
    11041103        /*Checks in debugging mode*/
     
    11721171
    11731172        Input* input=inputs->GetInput(enumtype);
    1174         if(!input) _error2_("No input of type " << EnumToStringx(enumtype) << " found in tria");
     1173        if(!input) _error_("No input of type " << EnumToStringx(enumtype) << " found in tria");
    11751174
    11761175        GaussTria* gauss=new GaussTria();
     
    12141213        #endif
    12151214        default:
    1216                 _error2_("analysis: " << EnumToStringx(analysis_type) << " not supported yet");
     1215                _error_("analysis: " << EnumToStringx(analysis_type) << " not supported yet");
    12171216        }
    12181217
     
    12301229        /*Check that both inputs have been found*/
    12311230        if (!vx_input || !vy_input){
    1232                 _error2_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");
     1231                _error_("Input missing. Here are the input pointers we have for vx: " << vx_input << ", vy: " << vy_input << "\n");
    12331232        }
    12341233
     
    12541253        /*Get input (either in element or material)*/
    12551254        Input* input=inputs->GetInput(input_enum);
    1256         if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in element");
     1255        if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in element");
    12571256
    12581257        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
     
    12661265        ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(offset);
    12671266        if(elementresult->InstanceEnum()!=enum_in){
    1268                 _error_("Results of offset %i is %s, when %s was expected",offset,EnumToStringx(elementresult->InstanceEnum()),EnumToStringx(enum_in));
     1267                _error_("Results of offset "<<offset<<" is "<<EnumToStringx(elementresult->InstanceEnum())<<" when "<<EnumToStringx(enum_in)<<" was expected");
    12691268        }
    12701269        if(interp==P1Enum){
     
    13041303        /*Make a copy of the original input: */
    13051304        input=(Input*)this->inputs->GetInput(enum_type);
    1306         if(!input)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
     1305        if(!input)_error_("could not find old input with enum: " << EnumToStringx(enum_type));
    13071306
    13081307        /*ArtificialNoise: */
     
    13241323                new_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+0]);
    13251324                old_inputs[i]=(Input*)this->inputs->GetInput(enums[2*i+1]);
    1326                 if(!new_inputs[i])_error2_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
    1327                 if(!old_inputs[i])_error2_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
     1325                if(!new_inputs[i])_error_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
     1326                if(!old_inputs[i])_error_("could not find input with enum " << EnumToStringx(enums[2*i+0]));
    13281327        }
    13291328
     
    13531352         oldinput=(Input*)this->matice->inputs->GetInput(enum_type);
    13541353        else
    1355          _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
    1356         if(!oldinput)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
     1354         _error_("object " << EnumToStringx(object_enum) << " not supported yet");
     1355        if(!oldinput)_error_("could not find old input with enum: " << EnumToStringx(enum_type));
    13571356        newinput=(Input*)oldinput->copy();
    13581357
     
    13661365         this->matice->inputs->AddInput((Input*)newinput);
    13671366        else
    1368          _error2_("object " << EnumToStringx(object_enum) << " not supported yet");
     1367         _error_("object " << EnumToStringx(object_enum) << " not supported yet");
    13691368}
    13701369/*}}}*/
     
    13841383        /*Make a copy of the original input: */
    13851384        input=(Input*)this->inputs->GetInput(enum_type);
    1386         if(!input)_error2_("could not find old input with enum: " << EnumToStringx(enum_type));
     1385        if(!input)_error_("could not find old input with enum: " << EnumToStringx(enum_type));
    13871386
    13881387        /*Scale: */
     
    13991398        if (enum_type==MaterialsRheologyBbarEnum || enum_type==MaterialsRheologyZbarEnum) input=this->matice->inputs->GetInput(enum_type);
    14001399        else input=this->inputs->GetInput(enum_type);
    1401         //if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found in tria->inputs");
     1400        //if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found in tria->inputs");
    14021401        if(!input)return;
    14031402
     
    14441443
    14451444        /*Intermediaries*/
    1446         int    i,j;
    1447         int    tria_vertex_ids[3];
     1445        int        i,j;
     1446        int        tria_vertex_ids[3];
    14481447        IssmDouble nodeinputs[3];
    14491448        IssmDouble cmmininputs[3];
    14501449        IssmDouble cmmaxinputs[3];
    1451         bool   control_analysis=false;
    1452         int    num_control_type;
     1450        bool       control_analysis   = false;
     1451        int        num_control_type;
    14531452        IssmDouble yts;
    1454         int    num_cm_responses;
     1453        int        num_cm_responses;
    14551454   
    14561455        /*Get parameters: */
     
    14691468        if (control_analysis && iomodel->Data(InversionControlParametersEnum)){
    14701469                for(i=0;i<num_control_type;i++){
    1471                         switch((int)iomodel->Data(InversionControlParametersEnum)[i]){
     1470                        switch(reCast<int>(iomodel->Data(InversionControlParametersEnum)[i])){
    14721471                                case BalancethicknessThickeningRateEnum:
    14731472                                        if (iomodel->Data(BalancethicknessThickeningRateEnum)){
     
    15061505                                        /*Matice will take care of it*/ break;
    15071506                                default:
    1508                                         _error2_("Control " << EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]) << " not implemented yet");
     1507                                        _error_("Control " << EnumToStringx(reCast<int,IssmDouble>(iomodel->Data(InversionControlParametersEnum)[i])) << " not implemented yet");
    15091508                        }
    15101509                }
     
    15781577                        break;
    15791578                default:
    1580                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     1579                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    15811580        }
    15821581}
     
    15961595        for(int i=0;i<numdof;i++){
    15971596                values[i]=solution[doflist[i]];
    1598                 if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
     1597                if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
    15991598        }
    16001599
     
    16291628        for(i=0;i<numdof;i++){
    16301629                newthickness[i]=solution[doflist[i]];
    1631                 if(xIsNan<IssmDouble>(newthickness[i])) _error2_("NaN found in solution vector");
     1630                if(xIsNan<IssmDouble>(newthickness[i])) _error_("NaN found in solution vector");
    16321631                /*Constrain thickness to be at least 1m*/
    16331632                if(newthickness[i]<minthickness) newthickness[i]=minthickness;
     
    16601659                                newbed[i]=oldbed[i]-rho_ice/rho_water*(newthickness[i]-oldthickness[i]); //bed = oldbed + di * dH
    16611660                        }
    1662                         else _error2_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet");
     1661                        else _error_("Hydrostatic adjustment " << hydroadjustment << " (" << EnumToStringx(hydroadjustment) << ") not supported yet");
    16631662                }
    16641663        }
     
    17011700                }
    17021701                default:
    1703                         _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     1702                        _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    17041703        }
    17051704}
     
    17071706/*FUNCTION Tria::InputUpdateFromVector(int* vector, int name, int type);{{{*/
    17081707void  Tria::InputUpdateFromVector(int* vector, int name, int type){
    1709         _error2_("not supported yet!");
     1708        _error_("not supported yet!");
    17101709}
    17111710/*}}}*/
    17121711/*FUNCTION Tria::InputUpdateFromVector(bool* vector, int name, int type);{{{*/
    17131712void  Tria::InputUpdateFromVector(bool* vector, int name, int type){
    1714         _error2_("not supported yet!");
     1713        _error_("not supported yet!");
    17151714}
    17161715/*}}}*/
     
    17301729                this->inputs->AddInput(new DoubleInput(name,reCast<int>(scalar)));
    17311730        }
    1732         else _error2_("could not recognize nature of vector from code " << code);
     1731        else _error_("could not recognize nature of vector from code " << code);
    17331732
    17341733}
     
    17961795                        this->inputs->AddInput(transientinput);
    17971796                }
    1798                 else _error2_("nodal vector is either numberofnodes or numberofnodes+1 long. Field provided (" << EnumToStringx(vector_enum) << ") is " << M << " long");
     1797                else _error_("nodal vector is either numberofnodes or numberofnodes+1 long. Field provided (" << EnumToStringx(vector_enum) << ") is " << M << " long");
    17991798        }
    18001799        else if(vector_type==2){ //element vector
     
    18131812                                this->inputs->AddInput(new DoubleInput(vector_enum,vector[index]));
    18141813                        }
    1815                         else _error2_("could not recognize nature of vector from code " << code);
     1814                        else _error_("could not recognize nature of vector from code " << code);
    18161815                }
    18171816                else {
    1818                         _error2_("transient elementary inputs not supported yet!");
     1817                        _error_("transient elementary inputs not supported yet!");
    18191818                }
    18201819        }
    18211820        else{
    1822                 _error2_("Cannot add input for vector type " << vector_type << " (not supported)");
     1821                _error_("Cannot add input for vector type " << vector_type << " (not supported)");
    18231822        }
    18241823
     
    22482247void  Tria::SetClone(int* minranks){
    22492248
    2250         _error2_("not implemented yet");
     2249        _error_("not implemented yet");
    22512250}
    22522251/*}}}*/
    22532252/*FUNCTION Tria::SmearFunction {{{*/
    22542253void  Tria::SmearFunction(Vector*  smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius){
    2255         _error2_("not implemented yet");
     2254        _error_("not implemented yet");
    22562255
    22572256}
     
    23302329IssmDouble Tria::SurfaceArea(void){
    23312330
    2332         int    i;
    23332331        IssmDouble S;
    23342332        IssmDouble normal[3];
     
    23412339        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    23422340
    2343         for (i=0;i<3;i++){
     2341        for(int i=0;i<3;i++){
    23442342                v13[i]=xyz_list[0][i]-xyz_list[2][i];
    23452343                v23[i]=xyz_list[1][i]-xyz_list[2][i];
     
    23502348        normal[2]=v13[0]*v23[1]-v13[1]*v23[0];
    23512349
    2352         S = 0.5 * sqrt(pow(normal[0],(IssmDouble)2)+pow(normal[1],(IssmDouble)2)+pow(normal[2],(IssmDouble)2));
     2350        S = 0.5 * sqrt(normal[0]*normal[0] + normal[1]*normal[1] + normal[2]*normal[2]);
    23532351
    23542352        /*Return: */
     
    23592357void Tria::SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]){
    23602358
    2361         int i;
    23622359        IssmDouble v13[3],v23[3];
    23632360        IssmDouble normal[3];
    23642361        IssmDouble normal_norm;
    23652362
    2366         for (i=0;i<3;i++){
     2363        for(int i=0;i<3;i++){
    23672364                v13[i]=xyz_list[0][i]-xyz_list[2][i];
    23682365                v23[i]=xyz_list[1][i]-xyz_list[2][i];
     
    23732370        normal[2]=v13[0]*v23[1]-v13[1]*v23[0];
    23742371
    2375         normal_norm=sqrt( pow(normal[0],(IssmDouble)2)+pow(normal[1],(IssmDouble)2)+pow(normal[2],(IssmDouble)2) );
    2376 
    2377         *(surface_normal)=normal[0]/normal_norm;
    2378         *(surface_normal+1)=normal[1]/normal_norm;
    2379         *(surface_normal+2)=normal[2]/normal_norm;
     2372        normal_norm=sqrt( normal[0]*normal[0] + normal[1]*normal[1] + normal[2]*normal[2]);
     2373
     2374        *(surface_normal+0) = normal[0]/normal_norm;
     2375        *(surface_normal+1) = normal[1]/normal_norm;
     2376        *(surface_normal+2) = normal[2]/normal_norm;
    23802377}
    23812378/*}}}*/
     
    24002397        this->MaxAbsVy(&maxabsvy,false);
    24012398        #else
    2402                 _error2_("ISSM was not compiled with responses compiled in, exiting!");
     2399                _error_("ISSM was not compiled with responses compiled in, exiting!");
    24032400        #endif
    24042401
     
    25932590
    25942591        /*First off, check that this segment belongs to this element: */
    2595         if ((int)*(segment+4)!=this->id)_error2_("error message: segment with id " << (int)*(segment+4) << " does not belong to element with id:" << this->id);
     2592        if (reCast<int>(*(segment+4))!=this->id)_error_("error message: segment with id " << reCast<int>(*(segment+4)) << " does not belong to element with id:" << this->id);
    25962593
    25972594        /*Recover segment node locations: */
     
    26102607        normal[1]=sin(atan2(x1-x2,y2-y1));
    26112608
    2612         length=sqrt(pow(x2-x1,2.0)+pow(y2-y1,2));
     2609        length=sqrt(pow(x2-x1,2)+pow(y2-y1,2));
    26132610
    26142611        Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
     
    28002797                        *presponse=this->matice->GetZbar();
    28012798                        break;
    2802                 case VelEnum:
     2799                case VelEnum:{
    28032800
    28042801                        /*Get input:*/
     
    28132810
    28142811                        /*Assign output pointers:*/
    2815                         *presponse=vel;
     2812                        *presponse=vel;}
     2813                        break;
    28162814                default: 
    2817                         _error2_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
     2815                        _error_("Response type " << EnumToStringx(response_enum) << " not supported yet!");
    28182816        }
    28192817
     
    29782976                //velocity should be = 0. To achieve this result, we set alpha2_list to a very high value: */
    29792977                surface_input->GetInputDerivativeValue(&slope[0],&xyz_list[0][0],gauss);
    2980                 slope_magnitude=sqrt(pow(slope[0],2)+pow(slope[1],2));
     2978                slope_magnitude=sqrt(slope[0]*slope[0]+slope[1]*slope[1]);
    29812979                if(slope_magnitude>MAXSLOPE) alpha2=pow((IssmDouble)10,MOUNTAINKEXPONENT);
    29822980                else friction->GetAlpha2(&alpha2, gauss,VxEnum,VyEnum,VzEnum);
     
    33023300
    33033301                /*Check solution*/
    3304                 if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
    3305                 if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
     3302                if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector");
     3303                if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector");
    33063304        }
    33073305
    33083306        /*Get Vz and compute vel*/
    33093307        GetInputListOnVertices(&vz[0],VzEnum,0);
    3310         for(i=0;i<NUMVERTICES;i++) vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5);
     3308        for(i=0;i<NUMVERTICES;i++) vel[i]=sqrt(vx[i]*vx[i] + vy[i]*vy[i] + vz[i]*vz[i]);
    33113309
    33123310        /*For pressure: we have not computed pressure in this analysis, for this element. We are in 2D,
     
    33623360
    33633361                /*Check solution*/
    3364                 if(xIsNan<IssmDouble>(vx[i])) _error2_("NaN found in solution vector");
    3365                 if(xIsNan<IssmDouble>(vy[i])) _error2_("NaN found in solution vector");
     3362                if(xIsNan<IssmDouble>(vx[i])) _error_("NaN found in solution vector");
     3363                if(xIsNan<IssmDouble>(vy[i])) _error_("NaN found in solution vector");
    33663364        }
    33673365
    33683366        /*Now Compute vel*/
    33693367        GetInputListOnVertices(&vz[0],VzEnum,0.0); //default is 0
    3370         for(i=0;i<NUMVERTICES;i++) vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5);
     3368        for(i=0;i<NUMVERTICES;i++) vel[i]=sqrt(vx[i]*vx[i] + vy[i]*vy[i] + vz[i]*vz[i]);
    33713369
    33723370        /*For pressure: we have not computed pressure in this analysis, for this element. We are in 2D,
     
    34183416
    34193417                if (input->ObjectEnum()!=ControlInputEnum){
    3420                         _error2_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput");
     3418                        _error_("input " << EnumToStringx(control_type[i]) << " is not a ControlInput");
    34213419                }
    34223420
     
    34433441                input=inputs->GetInput(enum_type);
    34443442        }
    3445         if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
    3446         if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
     3443        if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found");
     3444        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    34473445
    34483446        GradientIndexing(&doflist1[0],control_index);
     
    34613459                input=inputs->GetInput(enum_type);
    34623460        }
    3463         if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
    3464         if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
     3461        if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found");
     3462        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    34653463
    34663464        ((ControlInput*)input)->ScaleGradient(scale);
     
    34803478                input=inputs->GetInput(enum_type);
    34813479        }
    3482         if (!input) _error2_("Input " << EnumToStringx(enum_type) << " not found");
    3483         if (input->ObjectEnum()!=ControlInputEnum) _error2_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
     3480        if (!input) _error_("Input " << EnumToStringx(enum_type) << " not found");
     3481        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    34843482
    34853483        GradientIndexing(&doflist1[0],control_index);
     
    35183516                        break;
    35193517                default:
    3520                         _error2_("control type not supported yet: " << control_type);
     3518                        _error_("control type not supported yet: " << control_type);
    35213519        }
    35223520
     
    35483546                        break;
    35493547                default:
    3550                         _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
     3548                        _error_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    35513549        }
    35523550
     
    40874085                 *      S                obs            obs
    40884086                 */
    4089                 misfit=1/S*pow( pow(vx-vxobs,2.) + pow(vy-vyobs,2.) ,0.5);
     4087                misfit=1/S*sqrt( pow(vx-vxobs,2) + pow(vy-vyobs,2));
    40904088
    40914089                if(process_units)UnitConversion(misfit,IuToExtEnum,SurfaceAverageVelMisfitEnum);
     
    41504148                 *                            obs
    41514149                 */
    4152                 velocity_mag    =sqrt(pow(vx,   2.)+pow(vy,   2.))+epsvel;
    4153                 obs_velocity_mag=sqrt(pow(vxobs,2.)+pow(vyobs,2.))+epsvel;
    4154                 misfit=4*pow(meanvel,2.)*pow(log(velocity_mag/obs_velocity_mag),2.);
     4150                velocity_mag    =sqrt(pow(vx,   2)+pow(vy,   2))+epsvel;
     4151                obs_velocity_mag=sqrt(pow(vxobs,2)+pow(vyobs,2))+epsvel;
     4152                misfit=4*pow(meanvel,2)*pow(log(velocity_mag/obs_velocity_mag),2);
    41554153
    41564154                if(process_units)UnitConversion(misfit,IuToExtEnum,SurfaceLogVelMisfitEnum);
     
    42164214                 *                              obs                       obs
    42174215                 */
    4218                 misfit=0.5*pow(meanvel,2.)*(
    4219                                         pow(log((fabs(vx)+epsvel)/(fabs(vxobs)+epsvel)),2.) +
    4220                                         pow(log((fabs(vy)+epsvel)/(fabs(vyobs)+epsvel)),2.) );
     4216                misfit=0.5*pow(meanvel,2)*(
     4217                                        pow(log((fabs(vx)+epsvel)/(fabs(vxobs)+epsvel)),2) +
     4218                                        pow(log((fabs(vy)+epsvel)/(fabs(vyobs)+epsvel)),2) );
    42214219
    42224220                if(process_units)UnitConversion(misfit,IuToExtEnum,SurfaceLogVxVyMisfitEnum);
     
    42794277                 *
    42804278                 */
    4281                 misfit=0.5*( pow(vx-vxobs,2.) + pow(vy-vyobs,2.) );
     4279                misfit=0.5*( pow(vx-vxobs,2) + pow(vy-vyobs,2) );
    42824280
    42834281                if(process_units)UnitConversion(misfit,IuToExtEnum,SurfaceAverageVelMisfitEnum);
     
    43424340                 *              obs                        obs                     
    43434341                 */
    4344                 scalex=pow(meanvel/(vxobs+epsvel),2.); if(vxobs==0)scalex=0;
    4345                 scaley=pow(meanvel/(vyobs+epsvel),2.); if(vyobs==0)scaley=0;
    4346                 misfit=0.5*(scalex*pow((vx-vxobs),2.)+scaley*pow((vy-vyobs),2.));
     4342                scalex=pow(meanvel/(vxobs+epsvel),2); if(vxobs==0)scalex=0;
     4343                scaley=pow(meanvel/(vyobs+epsvel),2); if(vyobs==0)scaley=0;
     4344                misfit=0.5*(scalex*pow((vx-vxobs),2)+scaley*pow((vy-vyobs),2));
    43474345                if(process_units)UnitConversion(misfit,IuToExtEnum,SurfaceRelVelMisfitEnum);
    43484346
     
    43924390
    43934391                /*Tikhonov regularization: J = 1/2 ((dp/dx)^2 + (dp/dy)^2) */
    4394                 Jelem+=weight*1/2*(pow(dp[0],2.)+pow(dp[1],2.))*Jdet*gauss->weight;
     4392                Jelem+=weight*1/2*(dp[0]*dp[0]+dp[1]*dp[1])*Jdet*gauss->weight;
    43954393        }
    43964394
     
    44104408        IssmDouble  xyz_list[NUMVERTICES][3];
    44114409        IssmDouble  dp[NDOF2];
    4412         IssmDouble  vx,vy;
     4410        IssmDouble  vx,vy,vel;
    44134411        GaussTria  *gauss                    = NULL;
    44144412
     
    44394437                vx_input->GetInputValue(&vx,gauss);
    44404438                vy_input->GetInputValue(&vy,gauss);
     4439                vel = sqrt(vx*vx+vy*vy);
     4440                vx  = vx/(vel+1.e-9);
     4441                vy  = vy/(vel+1.e-9);
    44414442
    44424443                /*J = 1/2 ( vx*dH/dx + vy*dH/dy )^2 */
     
    44594460        IssmDouble  xyz_list[NUMVERTICES][3];
    44604461        IssmDouble  dp[NDOF2];
    4461         IssmDouble  vx,vy;
     4462        IssmDouble  vx,vy,vel;
    44624463        GaussTria  *gauss                    = NULL;
    44634464
     
    44884489                vx_input->GetInputValue(&vx,gauss);
    44894490                vy_input->GetInputValue(&vy,gauss);
     4491                vel = sqrt(vx*vx+vy*vy);
     4492                vx  = vx/(vel+1.e-9);
     4493                vy  = vy/(vel+1.e-9);
    44904494
    44914495                /*J = 1/2 ( -vy*dH/dx + vx*dH/dy )^2 */
     
    45354539
    45364540                /*compute ThicknessAbsMisfit*/
    4537                 Jelem+=0.5*pow(thickness-thicknessobs,2.0)*weight*Jdet*gauss->weight;
     4541                Jelem+=0.5*(thickness-thicknessobs)*(thickness-thicknessobs)*weight*Jdet*gauss->weight;
    45384542        }
    45394543
     
    45584562        IssmDouble  dbasis[NDOF2][NUMVERTICES];
    45594563        IssmDouble  dH[2];
    4560         IssmDouble  v[2];
     4564        IssmDouble  vx,vy,vel;
    45614565        GaussTria *gauss     = NULL;
    45624566        int       *responses = NULL;
     
    46034607                        case ThicknessAlongGradientEnum:
    46044608                                weights_input->GetInputValue(&weight, gauss,resp);
    4605                                 vx_input->GetInputValue(&v[0],gauss);
    4606                                 vy_input->GetInputValue(&v[1],gauss);
    4607                                 for(i=0;i<numdof;i++) pe->values[i]+= - weight*(dH[0]*v[0]+dH[1]*v[1])*(dbasis[0][i]*v[0]+dbasis[1][i]*v[1])*Jdet*gauss->weight;
     4609                                vx_input->GetInputValue(&vx,gauss);
     4610                                vy_input->GetInputValue(&vy,gauss);
     4611                                vel = sqrt(vx*vx+vy*vy);
     4612                                vx  = vx/(vel+1.e-9);
     4613                                vy  = vy/(vel+1.e-9);
     4614                                for(i=0;i<numdof;i++) pe->values[i]+= - weight*(dH[0]*vx+dH[1]*vy)*(dbasis[0][i]*vx+dbasis[1][i]*vy)*Jdet*gauss->weight;
    46084615                                break;
    46094616                        case ThicknessAcrossGradientEnum:
    46104617                                weights_input->GetInputValue(&weight, gauss,resp);
    4611                                 vx_input->GetInputValue(&v[0],gauss);
    4612                                 vy_input->GetInputValue(&v[1],gauss);
    4613                                 for(i=0;i<numdof;i++) pe->values[i]+= - weight*(dH[0]*(-v[1])+dH[1]*v[0])*(dbasis[0][i]*(-v[1])+dbasis[1][i]*v[0])*Jdet*gauss->weight;
     4618                                vx_input->GetInputValue(&vx,gauss);
     4619                                vy_input->GetInputValue(&vy,gauss);
     4620                                vel = sqrt(vx*vx+vy*vy);
     4621                                vx  = vx/(vel+1.e-9);
     4622                                vy  = vy/(vel+1.e-9);
     4623                                for(i=0;i<numdof;i++) pe->values[i]+= - weight*(dH[0]*(-vy)+dH[1]*vx)*(dbasis[0][i]*(-vy)+dbasis[1][i]*vx)*Jdet*gauss->weight;
    46144624                                break;
    46154625                        default:
    4616                                 _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
     4626                                _error_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    46174627                }
    46184628        }
     
    47174727                                         */
    47184728                                        for (i=0;i<NUMVERTICES;i++){
    4719                                                 scalex=pow(meanvel/(vxobs+epsvel),2.); if(vxobs==0)scalex=0;
    4720                                                 scaley=pow(meanvel/(vyobs+epsvel),2.); if(vyobs==0)scaley=0;
     4729                                                scalex=pow(meanvel/(vxobs+epsvel),2); if(vxobs==0)scalex=0;
     4730                                                scaley=pow(meanvel/(vyobs+epsvel),2); if(vyobs==0)scaley=0;
    47214731                                                dux=scalex*(vxobs-vx);
    47224732                                                duy=scaley*(vyobs-vy);
     
    47384748                                         */
    47394749                                        for (i=0;i<NUMVERTICES;i++){
    4740                                                 velocity_mag    =sqrt(pow(vx,   2.)+pow(vy,   2.))+epsvel;
    4741                                                 obs_velocity_mag=sqrt(pow(vxobs,2.)+pow(vyobs,2.))+epsvel;
    4742                                                 scale=-8*pow(meanvel,2.)/pow(velocity_mag,2.)*log(velocity_mag/obs_velocity_mag);
     4750                                                velocity_mag    =sqrt(pow(vx,   2)+pow(vy,   2))+epsvel;
     4751                                                obs_velocity_mag=sqrt(pow(vxobs,2)+pow(vyobs,2))+epsvel;
     4752                                                scale=-8*pow(meanvel,2)/pow(velocity_mag,2)*log(velocity_mag/obs_velocity_mag);
    47434753                                                dux=scale*vx;
    47444754                                                duy=scale*vy;
     
    47584768                                         */
    47594769                                        for (i=0;i<NUMVERTICES;i++){
    4760                                                 scale=1./(S*2*sqrt(pow(vx-vxobs,2.)+pow(vy-vyobs,2.))+epsvel);
     4770                                                scale=1./(S*2*sqrt(pow(vx-vxobs,2)+pow(vy-vyobs,2))+epsvel);
    47614771                                                dux=scale*(vxobs-vx);
    47624772                                                duy=scale*(vyobs-vy);
     
    47764786                                         */
    47774787                                        for (i=0;i<NUMVERTICES;i++){
    4778                                                 dux = - pow(meanvel,2.) * log((fabs(vx)+epsvel)/(fabs(vxobs)+epsvel)) / (vx+epsvel);
    4779                                                 duy = - pow(meanvel,2.) * log((fabs(vy)+epsvel)/(fabs(vyobs)+epsvel)) / (vy+epsvel);
     4788                                                dux = - meanvel*meanvel * log((fabs(vx)+epsvel)/(fabs(vxobs)+epsvel)) / (vx+epsvel);
     4789                                                duy = - meanvel*meanvel * log((fabs(vy)+epsvel)/(fabs(vyobs)+epsvel)) / (vy+epsvel);
    47804790                                                pe->values[i*NDOF2+0]+=dux*weight*Jdet*gauss->weight*basis[i];
    47814791                                                pe->values[i*NDOF2+1]+=duy*weight*Jdet*gauss->weight*basis[i];
     
    47984808                                        break;
    47994809                                default:
    4800                                         _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
     4810                                        _error_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    48014811                        }
    48024812                }
     
    49004910                                         */
    49014911                                        for (i=0;i<NUMVERTICES;i++){
    4902                                                 scalex=pow(meanvel/(vxobs+epsvel),2.); if(vxobs==0)scalex=0;
    4903                                                 scaley=pow(meanvel/(vyobs+epsvel),2.); if(vyobs==0)scaley=0;
     4912                                                scalex=pow(meanvel/(vxobs+epsvel),2); if(vxobs==0)scalex=0;
     4913                                                scaley=pow(meanvel/(vyobs+epsvel),2); if(vyobs==0)scaley=0;
    49044914                                                dux=scalex*(vxobs-vx);
    49054915                                                duy=scaley*(vyobs-vy);
     
    49214931                                         */
    49224932                                        for (i=0;i<NUMVERTICES;i++){
    4923                                                 velocity_mag    =sqrt(pow(vx,   2.)+pow(vy,   2.))+epsvel;
    4924                                                 obs_velocity_mag=sqrt(pow(vxobs,2.)+pow(vyobs,2.))+epsvel;
    4925                                                 scale=-8*pow(meanvel,2.)/pow(velocity_mag,2.)*log(velocity_mag/obs_velocity_mag);
     4933                                                velocity_mag    =sqrt(pow(vx,   2)+pow(vy,   2))+epsvel;
     4934                                                obs_velocity_mag=sqrt(pow(vxobs,2)+pow(vyobs,2))+epsvel;
     4935                                                scale=-8*pow(meanvel,2)/pow(velocity_mag,2)*log(velocity_mag/obs_velocity_mag);
    49264936                                                dux=scale*vx;
    49274937                                                duy=scale*vy;
     
    49414951                                         */
    49424952                                        for (i=0;i<NUMVERTICES;i++){
    4943                                                 scale=1./(S*2*sqrt(pow(vx-vxobs,2.)+pow(vy-vyobs,2.))+epsvel);
     4953                                                scale=1./(S*2*sqrt(pow(vx-vxobs,2)+pow(vy-vyobs,2))+epsvel);
    49444954                                                dux=scale*(vxobs-vx);
    49454955                                                duy=scale*(vyobs-vy);
     
    49594969                                         */
    49604970                                        for (i=0;i<NUMVERTICES;i++){
    4961                                                 dux = - pow(meanvel,2.) * log((fabs(vx)+epsvel)/(fabs(vxobs)+epsvel)) / (vx+epsvel);
    4962                                                 duy = - pow(meanvel,2.) * log((fabs(vy)+epsvel)/(fabs(vyobs)+epsvel)) / (vy+epsvel);
     4971                                                dux = - meanvel*meanvel * log((fabs(vx)+epsvel)/(fabs(vxobs)+epsvel)) / (vx+epsvel);
     4972                                                duy = - meanvel*meanvel * log((fabs(vy)+epsvel)/(fabs(vyobs)+epsvel)) / (vy+epsvel);
    49634973                                                pe->values[i*NDOF4+0]+=dux*weight*Jdet*gauss->weight*basis[i];
    49644974                                                pe->values[i*NDOF4+1]+=duy*weight*Jdet*gauss->weight*basis[i];
     
    49814991                                        break;
    49824992                                default:
    4983                                         _error2_("response " << EnumToStringx(responses[resp]) << " not supported yet");
     4993                                        _error_("response " << EnumToStringx(responses[resp]) << " not supported yet");
    49844994                        }
    49854995                }
     
    50285038
    50295039                /*Tikhonov regularization: J = 1/2 ((dp/dx)^2 + (dp/dy)^2) */
    5030                 Jelem+=weight*1/2*(pow(dp[0],2.)+pow(dp[1],2.))*Jdet*gauss->weight;
     5040                Jelem+=weight*1/2*(dp[0]*dp[0]+dp[1]*dp[1])*Jdet*gauss->weight;
    50315041        }
    50325042
     
    50505060                        break;
    50515061                default:
    5052                         _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
     5062                        _error_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    50535063        }
    50545064
     
    51515161
    51525162                /*Check solution*/
    5153                 if(xIsNan<IssmDouble>(lambdax[i])) _error2_("NaN found in solution vector");
    5154                 if(xIsNan<IssmDouble>(lambday[i])) _error2_("NaN found in solution vector");
     5163                if(xIsNan<IssmDouble>(lambdax[i])) _error_("NaN found in solution vector");
     5164                if(xIsNan<IssmDouble>(lambday[i])) _error_("NaN found in solution vector");
    51555165        }
    51565166
     
    51825192        for(i=0;i<numdof;i++){
    51835193                lambda[i]=values[i];
    5184                 if(xIsNan<IssmDouble>(lambda[i])) _error2_("NaN found in solution vector");
     5194                if(xIsNan<IssmDouble>(lambda[i])) _error_("NaN found in solution vector");
    51855195        }
    51865196
     
    52055215
    52065216        /*Get input (either in element or material)*/
    5207         if(control_enum==MaterialsRheologyBbarEnum){
     5217        if(control_enum==MaterialsRheologyBbarEnum || control_enum==MaterialsRheologyZbarEnum){
    52085218                input=(Input*)matice->inputs->GetInput(control_enum); _assert_(input);
    52095219        }
     
    52145224        /*Check that it is a ControlInput*/
    52155225        if (input->ObjectEnum()!=ControlInputEnum){
    5216                 _error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
     5226                _error_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    52175227        }
    52185228
     
    52405250        new_input = new TriaP1Input(control_enum,values);
    52415251
    5242         if(control_enum==MaterialsRheologyBbarEnum){
     5252        if(control_enum==MaterialsRheologyBbarEnum || control_enum==MaterialsRheologyZbarEnum){
    52435253                input=(Input*)matice->inputs->GetInput(control_enum); _assert_(input);
    52445254        }
     
    52485258
    52495259        if (input->ObjectEnum()!=ControlInputEnum){
    5250                 _error2_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
     5260                _error_("input " << EnumToStringx(control_enum) << " is not a ControlInput");
    52515261        }
    52525262
     
    52855295
    52865296        /* compute VelocityFactor */
    5287         VelocityFactor= n_man*pow(CR,2)*rho_water*g/mu_water;
     5297        VelocityFactor= n_man*CR*CR*rho_water*g/mu_water;
    52885298       
    52895299        gauss=new GaussTria();
     
    52975307
    52985308                /* Water velocity x and y components */
    5299         //      vx[iv]= - pow(w,2)/(12 * mu_water)*(rho_ice*g*dsdx+(rho_water-rho_ice)*g*dbdx);
    5300         //      vy[iv]= - pow(w,2)/(12 * mu_water)*(rho_ice*g*dsdy+(rho_water-rho_ice)*g*dbdy);
    5301        
    5302                 vx[iv]= - pow(w,2)/(VelocityFactor* mu_water)*(rho_ice*g*dsdx+(rho_water-rho_ice)*g*dbdx);
    5303                 vy[iv]= - pow(w,2)/(VelocityFactor* mu_water)*(rho_ice*g*dsdy+(rho_water-rho_ice)*g*dbdy);
     5309        //      vx[iv]= - w*w/(12 * mu_water)*(rho_ice*g*dsdx+(rho_water-rho_ice)*g*dbdx);
     5310        //      vy[iv]= - w*w/(12 * mu_water)*(rho_ice*g*dsdy+(rho_water-rho_ice)*g*dbdy);
     5311                vx[iv]= - w*w/(VelocityFactor* mu_water)*(rho_ice*g*dsdx+(rho_water-rho_ice)*g*dbdx);
     5312                vy[iv]= - w*w/(VelocityFactor* mu_water)*(rho_ice*g*dsdy+(rho_water-rho_ice)*g*dbdy);
    53045313        }
    53055314
     
    53965405
    53975406                /*Artificial diffusivity*/
    5398                 vel=sqrt(pow(vx,2.)+pow(vy,2.));
     5407                vel=sqrt(vx*vx+vy*vy);
    53995408                K[0][0]=diffusivity*h/(2*vel)*vx*vx;
    54005409                K[1][0]=diffusivity*h/(2*vel)*vy*vx;
     
    54575466                old_watercolumn_input->GetInputValue(&old_watercolumn_g,gauss);
    54585467
    5459                 if(dt)for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*(old_watercolumn_g+dt*basal_melting_g)*basis[i];
     5468                if(reCast<int,IssmDouble>(dt))for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*(old_watercolumn_g+dt*basal_melting_g)*basis[i];
    54605469                else  for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*basal_melting_g*basis[i];
    54615470        }
     
    55065515
    55075516        /*Intermediaries*/
    5508         const int numdof = NDOF1*NUMVERTICES;
    5509 
    5510         int       i;
    5511         int*      doflist=NULL;
    5512         IssmDouble    values[numdof];
     5517        const int   numdof         = NDOF1 *NUMVERTICES;
     5518        int        *doflist        = NULL;
     5519        IssmDouble  values[numdof];
    55135520
    55145521        /*Get dof list: */
     
    55165523
    55175524        /*Use the dof list to index into the solution vector: */
    5518         for(i=0;i<numdof;i++){
     5525        for(int i=0;i<numdof;i++){
    55195526                values[i]=solution[doflist[i]];
    5520                 if(xIsNan<IssmDouble>(values[i])) _error2_("NaN found in solution vector");
    5521                 if (values[i]<pow((IssmDouble)10,(IssmDouble)-10))values[i]=pow((IssmDouble)10,(IssmDouble)-10); //correcting the water column to positive values
    5522  
     5527                if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
     5528                if (values[i]<10e-10) values[i]=10e-10; //correcting the water column to positive values
    55235529        }
    55245530
     
    56175623
    56185624                default:
    5619                         _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     5625                        _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    56205626        }
    56215627
     
    56245630/*FUNCTION Tria::InputUpdateFromVectorDakota(int* vector, int name, int type);{{{*/
    56255631void  Tria::InputUpdateFromVectorDakota(int* vector, int name, int type){
    5626         _error2_("not supported yet!");
     5632        _error_("not supported yet!");
    56275633}
    56285634/*}}}*/
    56295635/*FUNCTION Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type);{{{*/
    56305636void  Tria::InputUpdateFromVectorDakota(bool* vector, int name, int type){
    5631         _error2_("not supported yet!");
     5637        _error_("not supported yet!");
    56325638}
    56335639/*}}}*/
     
    56715677
    56725678                default:
    5673                         _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     5679                        _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    56745680        }
    56755681
     
    56885694                        return CreateKMatrixBalancethickness_DG();
    56895695                default:
    5690                         _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
     5696                        _error_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    56915697        }
    56925698
     
    57715777                if(stabilization==1){
    57725778                        /*Streamline upwinding*/
    5773                         vel=sqrt(pow(vx,2.)+pow(vy,2.));
     5779                        vel=sqrt(vx*vx+vy*vy);
    57745780                        K[0][0]=h/(2*vel)*vx*vx;
    57755781                        K[1][0]=h/(2*vel)*vy*vx;
     
    58675873                        return CreatePVectorBalancethickness_DG();
    58685874                default:
    5869                         _error2_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
     5875                        _error_("Element type " << EnumToStringx(GetElementType()) << " not supported yet");
    58705876        }
    58715877}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/Tria.h

    r12946 r13101  
    100100                void   InputToResult(int enum_type,int step,IssmDouble time);
    101101                void   DeleteResults(void);
    102                 void   MaterialUpdateFromTemperature(void){_error2_("not implemented yet");};
     102                void   MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
    103103                void   MigrateGroundingLine(IssmDouble* oldfloating,IssmDouble* sheet_ungrounding);
    104104                int    NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units);
     
    110110                void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);
    111111                void   ProcessResultsUnits(void);
    112                 void   ResetCoordinateSystem(void){_error2_("not implemented yet");};
     112                void   ResetCoordinateSystem(void){_error_("not implemented yet");};
    113113                void     SmbGradients();
    114114                IssmDouble SurfaceArea(void);
     
    179179                ElementMatrix* CreateKMatrixPrognostic_CG(void);
    180180                ElementMatrix* CreateKMatrixPrognostic_DG(void);
    181                 ElementMatrix* CreateKMatrixSlope(void);
     181                ElementMatrix* CreateMassMatrix(void);
    182182                ElementVector* CreatePVectorBalancethickness(void);
    183183                ElementVector* CreatePVectorBalancethickness_DG(void);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Elements/TriaRef.cpp

    r12832 r13101  
    338338
    339339        *Jdet=1.0/2.0*sqrt(pow(x2-x1,2.) + pow(y2-y1,2.));
    340         if(*Jdet<0) _error2_("negative jacobian determinant!");
     340        if(*Jdet<0) _error_("negative jacobian determinant!");
    341341
    342342}
     
    353353        /*Get Determinant*/
    354354        Matrix2x2Determinant(Jdet,&J[0][0]);
    355         if(*Jdet<0) _error2_("negative jacobian determinant!");
     355        if(*Jdet<0) _error_("negative jacobian determinant!");
    356356
    357357}
     
    375375
    376376        *Jdet=SQRT3/6.0*pow(pow(((y2-y1)*(z3-z1)-(z2-z1)*(y3-y1)),2.0)+pow(((z2-z1)*(x3-x1)-(x2-x1)*(z3-z1)),2.0)+pow(((x2-x1)*(y3-y1)-(y2-y1)*(x3-x1)),2.0),0.5);
    377         if(*Jdet<0) _error2_("negative jacobian determinant!");
     377        if(*Jdet<0) _error_("negative jacobian determinant!");
    378378
    379379}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/BoolInput.cpp

    r12832 r13101  
    112112/*}}}*/
    113113/*FUNCTION BoolInput::GetInputValue(int* pvalue){{{*/
    114 void BoolInput::GetInputValue(int* pvalue){_error2_("not supported yet!");}
     114void BoolInput::GetInputValue(int* pvalue){_error_("not supported yet!");}
    115115/*}}}*/
    116116/*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue){{{*/
    117 void BoolInput::GetInputValue(IssmDouble* pvalue){_error2_("not supported yet!");}
     117void BoolInput::GetInputValue(IssmDouble* pvalue){_error_("not supported yet!");}
    118118/*}}}*/
    119119/*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/
    120 void BoolInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error2_("not supported yet!");}
     120void BoolInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not supported yet!");}
    121121/*}}}*/
    122122/*FUNCTION BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
    123 void BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
     123void BoolInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not supported yet!");}
    124124/*}}}*/
    125125/*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/
    126 void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
     126void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error_("not supported yet!");}
    127127/*}}}*/
    128128/*FUNCTION BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){{{*/
    129 void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
     129void BoolInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not supported yet!");}
    130130/*}}}*/
    131131/*FUNCTION BoolInput::ChangeEnum{{{*/
     
    161161
    162162                default:
    163                         _error2_("not implemented yet");
     163                        _error_("not implemented yet");
    164164        }
    165165
     
    176176void BoolInput::GetVectorFromInputs(Vector* vector,int* doflist){
    177177
    178         _error2_("not supporte yet!");
     178        _error_("not supporte yet!");
    179179
    180180}
     
    183183void BoolInput::GetValuesPtr(IssmDouble** pvalues,int* pnum_values){
    184184
    185         _error2_("not supported yet!");
     185        _error_("not supported yet!");
    186186
    187187}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/BoolInput.h

    r12832 r13101  
    3737                int   InstanceEnum();
    3838                Input* SpawnTriaInput(int* indices);
    39                 Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
    40                 Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
    41                 Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
     39                Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
     40                Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
     41                Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
    4242                ElementResult* SpawnResult(int step, IssmDouble time);
    4343                void Configure(Parameters* parameters);
    44                 void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
     44                void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error_("not supported yet");};
    4545                /*}}}*/
    4646                /*numerics: {{{*/
     
    5050                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
    5151                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
    52                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
    53                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error2_("not implemented yet");};
    54                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
    55                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
     52                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");};
     53                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");};
     54                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
     55                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
    5656                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
    5757                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
    58                 void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
    59                 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    60                 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    61                 void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    62                 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    63                 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    64                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    65                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
     58                void GetInputAverage(IssmDouble* pvalue){_error_("not implemented yet");};
     59                void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     60                void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     61                void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     62                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     63                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     64                void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     65                void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6666                void ChangeEnum(int newenumtype);
    6767                void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
    68                 void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
    69                 IssmDouble InfinityNorm(void){_error2_("InfinityNorm not implemented for booleans");};
    70                 IssmDouble Max(void){_error2_("Max not implemented for booleans");};
    71                 IssmDouble MaxAbs(void){_error2_("Max not implemented for booleans");};
    72                 IssmDouble Min(void){_error2_("Min not implemented for booleans");};
    73                 IssmDouble MinAbs(void){_error2_("Min not implemented for booleans");};
     68                void ConstrainMin(IssmDouble minimum){_error_("not implemented yet");};
     69                IssmDouble InfinityNorm(void){_error_("InfinityNorm not implemented for booleans");};
     70                IssmDouble Max(void){_error_("Max not implemented for booleans");};
     71                IssmDouble MaxAbs(void){_error_("Max not implemented for booleans");};
     72                IssmDouble Min(void){_error_("Min not implemented for booleans");};
     73                IssmDouble MinAbs(void){_error_("Min not implemented for booleans");};
    7474                void Scale(IssmDouble scale_factor);
    75                 void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
     75                void ArtificialNoise(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
    7676                void AXPY(Input* xinput,IssmDouble scalar);
    77                 void Constrain(IssmDouble cm_min, IssmDouble cm_max){_error2_("Constrain not implemented for booleans");};
     77                void Constrain(IssmDouble cm_min, IssmDouble cm_max){_error_("Constrain not implemented for booleans");};
    7878                void Extrude(void);
    79                 void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
     79                void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
    8080                void GetVectorFromInputs(Vector* vector,int* doflist);
    8181                void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/ControlInput.cpp

    r12832 r13101  
    4848                        break;
    4949                default:
    50                         _error2_("Input of Enum " << EnumToStringx(enum_input) << " not supported yet by ControlInput");
     50                        _error_("Input of Enum " << EnumToStringx(enum_input) << " not supported yet by ControlInput");
    5151        }
    5252        gradient   =NULL;
     
    152152/*FUNCTION ControlInput::ScaleGradient{{{*/
    153153void ControlInput::ScaleGradient(IssmDouble scaling_factor){
    154         if(!gradient) _error2_("Gradient of ControlInput " << EnumToStringx(enum_type) << " not found");
     154        if(!gradient) _error_("Gradient of ControlInput " << EnumToStringx(enum_type) << " not found");
    155155        gradient->Scale(scaling_factor);
    156156}/*}}}*/
     
    170170                        break;
    171171                default:
    172                         _error2_("more than 3 controls not implemented yet (Gradient " << this->control_id << " was requested). EnumDefinitions.h needs to be updated.");
     172                        _error_("more than 3 controls not implemented yet (Gradient " << this->control_id << " was requested). EnumDefinitions.h needs to be updated.");
    173173        }
    174174
     
    221221         }
    222222         else{
    223                  _error2_("Data " << data << " not supported yet");
     223                 _error_("Data " << data << " not supported yet");
    224224         }
    225225}/*}}}*/
     
    258258/*FUNCTION ControlInput::SaveValue{{{*/
    259259void ControlInput::SaveValue(void){
    260         if(!values) _error2_("Values of " << EnumToStringx(this->enum_type) << " not found");
     260        if(!values) _error_("Values of " << EnumToStringx(this->enum_type) << " not found");
    261261
    262262        if(savedvalues) delete this->savedvalues;
     
    265265/*FUNCTION ControlInput::UpdateValue{{{*/
    266266void ControlInput::UpdateValue(IssmDouble scalar){
    267         if(!gradient)    _error2_("Gradient of " << EnumToStringx(this->enum_type) << " not found");
    268         if(!savedvalues) _error2_("Values of " << EnumToStringx(this->enum_type) << " not found");
     267        if(!gradient)    _error_("Gradient of " << EnumToStringx(this->enum_type) << " not found");
     268        if(!savedvalues) _error_("Values of " << EnumToStringx(this->enum_type) << " not found");
    269269
    270270        if(values) delete this->values;
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/ControlInput.h

    r12832 r13101  
    4141                int    InstanceEnum();
    4242                Input* SpawnTriaInput(int* indices);
    43                 Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
    44                 Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
    45                 Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
     43                Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
     44                Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
     45                Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
    4646                ElementResult* SpawnResult(int step, IssmDouble time);
    47                 void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
     47                void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error_("not supported yet");};
    4848                void Configure(Parameters* parameters);
    4949                /*}}}*/
     
    5555                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
    5656                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
    57                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
    58                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error2_("not implemented yet");};
    59                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
    60                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
     57                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");};
     58                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");};
     59                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
     60                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
    6161                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
    6262                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
    6363                void GetInputAverage(IssmDouble* pvalue);
    64                 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    65                 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    66                 void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    67                 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    68                 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    69                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    70                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    71                 void ChangeEnum(int newenumtype){_error2_("not implemented yet");};
    72                 void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
    73                 void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
    74                 void Scale(IssmDouble scale_factor){_error2_("not implemented yet");};
    75                 void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
    76                 void AXPY(Input* xinput,IssmDouble scalar){_error2_("not implemented yet");};
     64                void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     65                void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     66                void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     67                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     68                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     69                void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     70                void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     71                void ChangeEnum(int newenumtype){_error_("not implemented yet");};
     72                void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
     73                void ConstrainMin(IssmDouble minimum){_error_("not implemented yet");};
     74                void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
     75                void ArtificialNoise(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
     76                void AXPY(Input* xinput,IssmDouble scalar){_error_("not implemented yet");};
    7777                void Constrain(void);
    7878                void Constrain(IssmDouble min,IssmDouble max);
    79                 IssmDouble InfinityNorm(void){_error2_("not implemented yet");};
    80                 IssmDouble Max(void){_error2_("not implemented yet");};
    81                 IssmDouble MaxAbs(void){_error2_("not implemented yet");};
    82                 IssmDouble Min(void){_error2_("not implemented yet");};
    83                 IssmDouble MinAbs(void){_error2_("not implemented yet");};
     79                IssmDouble InfinityNorm(void){_error_("not implemented yet");};
     80                IssmDouble Max(void){_error_("not implemented yet");};
     81                IssmDouble MaxAbs(void){_error_("not implemented yet");};
     82                IssmDouble Min(void){_error_("not implemented yet");};
     83                IssmDouble MinAbs(void){_error_("not implemented yet");};
    8484                void Extrude(void);
    8585                void VerticallyIntegrate(Input* thickness_input);
    8686                void GetVectorFromInputs(Vector* vector,int* doflist,const char* data);
    8787                void GetVectorFromInputs(Vector* vector,int* doflist);
    88                 void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error2_("not implemented yet");};
     88                void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error_("not implemented yet");};
    8989                ElementResult* SpawnGradient(int step, IssmDouble time);
    9090                void GetGradient(Vector* gradient_vec,int* doflist);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/DatasetInput.cpp

    r12832 r13101  
    115115
    116116        /*Get requested input within dataset*/
    117         if(index<0 || index > inputs->Size()-1) _error2_("index requested (" << index << ") exceeds dataset size (" << inputs->Size() << ")");
     117        if(index<0 || index > inputs->Size()-1) _error_("index requested (" << index << ") exceeds dataset size (" << inputs->Size() << ")");
    118118        Input* input=(Input*)this->inputs->GetObjectByOffset(index);
    119119       
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/DatasetInput.h

    r12832 r13101  
    3737                int    InstanceEnum();
    3838                Input* SpawnTriaInput(int* indices);
    39                 Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
    40                 Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
    41                 Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
    42                 ElementResult* SpawnResult(int step, IssmDouble time){_error2_("not implemented yet");};
    43                 void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
     39                Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
     40                Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
     41                Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
     42                ElementResult* SpawnResult(int step, IssmDouble time){_error_("not implemented yet");};
     43                void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error_("not supported yet");};
    4444                void Configure(Parameters* parameters);
    4545                /*}}}*/
    4646                /*numerics: {{{*/
    47                 void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
    48                 void GetInputValue(int* pvalue){_error2_("not implemented yet");};
    49                 void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");};
    50                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error2_("not implemented yet");};
    51                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
    52                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
    53                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error2_("not implemented yet");};
     47                void GetInputValue(bool* pvalue){_error_("not implemented yet");};
     48                void GetInputValue(int* pvalue){_error_("not implemented yet");};
     49                void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");};
     50                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");};
     51                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
     52                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");};
     53                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");};
    5454                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index);
    55                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
    56                 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    57                 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    58                 void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
    59                 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    60                 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    61                 void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    62                 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    63                 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    64                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    65                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    66                 void ChangeEnum(int newenumtype){_error2_("not implemented yet");};
    67                 void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){_error2_("not implemented yet");};
    68                 void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
    69                 void Scale(IssmDouble scale_factor){_error2_("not implemented yet");};
    70                 void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
    71                 void AXPY(Input* xinput,IssmDouble scalar){_error2_("not implemented yet");};
    72                 void Constrain(void){_error2_("not implemented yet");};
    73                 void Constrain(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
    74                 IssmDouble InfinityNorm(void){_error2_("not implemented yet");};
    75                 IssmDouble Max(void){_error2_("not implemented yet");};
    76                 IssmDouble MaxAbs(void){_error2_("not implemented yet");};
    77                 IssmDouble Min(void){_error2_("not implemented yet");};
    78                 IssmDouble MinAbs(void){_error2_("not implemented yet");};
    79                 void Extrude(void){_error2_("not implemented yet");};
    80                 void VerticallyIntegrate(Input* thickness_input){_error2_("not implemented yet");};
    81                 void GetVectorFromInputs(Vector* vector,int* doflist){_error2_("not implemented yet");};
    82                 void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error2_("not implemented yet");};
    83                 ElementResult* SpawnGradient(int step, IssmDouble time){_error2_("not implemented yet");};
    84                 void GetGradient(Vector* gradient_vec,int* doflist){_error2_("not implemented yet");};
    85                 void ScaleGradient(IssmDouble scale){_error2_("not implemented yet");};
    86                 void SetGradient(Input* gradient_in){_error2_("not implemented yet");};
    87                 void UpdateValue(IssmDouble scalar){_error2_("not implemented yet");};
    88                 void SaveValue(void){_error2_("not implemented yet");};
     55                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
     56                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     57                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     58                void GetInputAverage(IssmDouble* pvalue){_error_("not implemented yet");};
     59                void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     60                void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     61                void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     62                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     63                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     64                void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     65                void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     66                void ChangeEnum(int newenumtype){_error_("not implemented yet");};
     67                void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
     68                void ConstrainMin(IssmDouble minimum){_error_("not implemented yet");};
     69                void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
     70                void ArtificialNoise(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
     71                void AXPY(Input* xinput,IssmDouble scalar){_error_("not implemented yet");};
     72                void Constrain(void){_error_("not implemented yet");};
     73                void Constrain(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
     74                IssmDouble InfinityNorm(void){_error_("not implemented yet");};
     75                IssmDouble Max(void){_error_("not implemented yet");};
     76                IssmDouble MaxAbs(void){_error_("not implemented yet");};
     77                IssmDouble Min(void){_error_("not implemented yet");};
     78                IssmDouble MinAbs(void){_error_("not implemented yet");};
     79                void Extrude(void){_error_("not implemented yet");};
     80                void VerticallyIntegrate(Input* thickness_input){_error_("not implemented yet");};
     81                void GetVectorFromInputs(Vector* vector,int* doflist){_error_("not implemented yet");};
     82                void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error_("not implemented yet");};
     83                ElementResult* SpawnGradient(int step, IssmDouble time){_error_("not implemented yet");};
     84                void GetGradient(Vector* gradient_vec,int* doflist){_error_("not implemented yet");};
     85                void ScaleGradient(IssmDouble scale){_error_("not implemented yet");};
     86                void SetGradient(Input* gradient_in){_error_("not implemented yet");};
     87                void UpdateValue(IssmDouble scalar){_error_("not implemented yet");};
     88                void SaveValue(void){_error_("not implemented yet");};
    8989                /*}}}*/
    9090
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/DoubleInput.cpp

    r12832 r13101  
    108108/*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{*/
    109109void DoubleInput::GetInputValue(bool* pvalue){
    110         _error2_("Double input of enum " << EnumToStringx(enum_type) << " cannot return a boolean");
     110        _error_("Double input of enum " << EnumToStringx(enum_type) << " cannot return a boolean");
    111111
    112112}
     
    114114/*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{*/
    115115void DoubleInput::GetInputValue(int* pvalue){
    116         _error2_("Double input of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
     116        _error_("Double input of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
    117117
    118118}
     
    132132/*}}}*/
    133133/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/
    134 void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
     134void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error_("not supported yet!");}
    135135/*}}}*/
    136136/*FUNCTION DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){{{*/
    137 void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
     137void DoubleInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not supported yet!");}
    138138/*}}}*/
    139139/*FUNCTION DoubleInput::GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){{{*/
     
    217217
    218218                default:
    219                         _error2_("not implemented yet");
     219                        _error_("not implemented yet");
    220220        }
    221221
     
    253253void DoubleInput::GetVectorFromInputs(Vector* vector,int* doflist){
    254254
    255         _error2_("not supporte yet!");
     255        _error_("not supporte yet!");
    256256
    257257}
     
    260260void DoubleInput::GetValuesPtr(IssmDouble** pvalues,int* pnum_values){
    261261
    262         _error2_("not supported yet!");
     262        _error_("not supported yet!");
    263263
    264264}
     
    276276
    277277        /*Check that input provided is a thickness*/
    278         if (thickness_input->InstanceEnum()!=ThicknessEnum) _error2_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
     278        if (thickness_input->InstanceEnum()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
    279279
    280280        /*vertically integrate depending on type:*/
     
    287287
    288288                default:
    289                         _error2_("not implemented yet");
     289                        _error_("not implemented yet");
    290290        }
    291291}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/DoubleInput.h

    r12832 r13101  
    4040                Input* PointwiseMax(Input* inputB);
    4141                ElementResult* SpawnResult(int step, IssmDouble time);
    42                 void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
     42                void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error_("not supported yet");};
    4343                void Configure(Parameters* parameters);
    4444                /*}}}*/
     
    4949                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
    5050                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
    51                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
    52                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error2_("not implemented yet");};
    53                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
    54                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
     51                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");};
     52                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");};
     53                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
     54                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
    5555                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
    5656                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
     
    6767                void ConstrainMin(IssmDouble minimum);
    6868                void Scale(IssmDouble scale_factor);
    69                 void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
     69                void ArtificialNoise(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
    7070                void AXPY(Input* xinput,IssmDouble scalar);
    7171                void Constrain(IssmDouble cm_min, IssmDouble cm_max);
    72                 IssmDouble InfinityNorm(void){_error2_("not implemented yet");};
     72                IssmDouble InfinityNorm(void){_error_("not implemented yet");};
    7373                IssmDouble Max(void);
    7474                IssmDouble MaxAbs(void);
    7575                IssmDouble Min(void);
    7676                IssmDouble MinAbs(void);
    77                 void Extrude(void){_error2_("not supported yet");};
     77                void Extrude(void){_error_("not supported yet");};
    7878                void VerticallyIntegrate(Input* thickness_input);
    7979                void GetVectorFromInputs(Vector* vector,int* doflist);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/IntInput.cpp

    r12832 r13101  
    9999ElementResult* IntInput::SpawnResult(int step, IssmDouble time){
    100100       
    101         _error2_("not supported yet!");
     101        _error_("not supported yet!");
    102102
    103103}
     
    106106/*Object functions*/
    107107/*FUNCTION IntInput::GetInputValue(bool* pvalue) {{{*/
    108 void IntInput::GetInputValue(bool* pvalue){_error2_("not supported yet!");}
     108void IntInput::GetInputValue(bool* pvalue){_error_("not supported yet!");}
    109109/*}}}*/
    110110/*FUNCTION IntInput::GetInputValue(int* pvalue){{{*/
     
    115115/*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue){{{*/
    116116void IntInput::GetInputValue(IssmDouble* pvalue){
    117         _error2_("IntInput cannot return a IssmDouble in parallel");
     117        _error_("IntInput cannot return a IssmDouble in parallel");
    118118}
    119119/*}}}*/
    120120/*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){{{*/
    121 void IntInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error2_("not supported yet!");}
     121void IntInput::GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not supported yet!");}
    122122/*}}}*/
    123123/*FUNCTION IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){{{*/
    124 void IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not supported yet!");}
     124void IntInput::GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not supported yet!");}
    125125/*}}}*/
    126126/*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){{{*/
    127 void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not supported yet!");}
     127void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error_("not supported yet!");}
    128128/*}}}*/
    129129/*FUNCTION IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){{{*/
    130 void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not supported yet!");}
     130void IntInput::GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not supported yet!");}
    131131/*}}}*/
    132132/*FUNCTION IntInput::ChangeEnum{{{*/
     
    166166
    167167                default:
    168                         _error2_("not implemented yet");
     168                        _error_("not implemented yet");
    169169        }
    170170
     
    182182void IntInput::GetVectorFromInputs(Vector* vector,int* doflist){
    183183
    184         _error2_("not supporte yet!");
     184        _error_("not supporte yet!");
    185185
    186186}
     
    189189void IntInput::GetValuesPtr(IssmDouble** pvalues,int* pnum_values){
    190190
    191         _error2_("not supported yet!");
     191        _error_("not supported yet!");
    192192
    193193}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/IntInput.h

    r12832 r13101  
    3737                int   InstanceEnum();
    3838                Input* SpawnTriaInput(int* indices);
    39                 Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
    40                 Input* PointwiseMin(Input* inputB){_error2_("not implemented yet");};
    41                 Input* PointwiseMax(Input* inputB){_error2_("not implemented yet");};
     39                Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
     40                Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
     41                Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
    4242                ElementResult* SpawnResult(int step, IssmDouble time);
    43                 void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
     43                void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error_("not supported yet");};
    4444                void Configure(Parameters* parameters);
    4545                /*}}}*/
     
    5050                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
    5151                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
    52                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
    53                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error2_("not implemented yet");};
    54                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
    55                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
     52                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");};
     53                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");};
     54                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
     55                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
    5656                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
    5757                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
    58                 void GetInputAverage(IssmDouble* pvalue){_error2_("not implemented yet");};
    59                 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    60                 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    61                 void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    62                 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    63                 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    64                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    65                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
     58                void GetInputAverage(IssmDouble* pvalue){_error_("not implemented yet");};
     59                void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     60                void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     61                void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     62                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     63                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     64                void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     65                void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6666                void ChangeEnum(int newenumtype);
    6767                void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
    68                 void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
     68                void ConstrainMin(IssmDouble minimum){_error_("not implemented yet");};
    6969                void Scale(IssmDouble scale_factor);
    70                 void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
     70                void ArtificialNoise(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
    7171                void AXPY(Input* xinput,IssmDouble scalar);
    7272                void Constrain(IssmDouble cm_min, IssmDouble cm_max);
    73                 IssmDouble InfinityNorm(void){_error2_("InfinityNorm not implemented for integers");};
    74                 IssmDouble Max(void){_error2_("Max not implemented for integers");};
    75                 IssmDouble MaxAbs(void){_error2_("Max not implemented for integers");};
    76                 IssmDouble Min(void){_error2_("Min not implemented for integers");};
    77                 IssmDouble MinAbs(void){_error2_("Min not implemented for integers");};
    78                 void Extrude(void){_error2_("not supported yet");};
    79                 void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
     73                IssmDouble InfinityNorm(void){_error_("InfinityNorm not implemented for integers");};
     74                IssmDouble Max(void){_error_("Max not implemented for integers");};
     75                IssmDouble MaxAbs(void){_error_("Max not implemented for integers");};
     76                IssmDouble Min(void){_error_("Min not implemented for integers");};
     77                IssmDouble MinAbs(void){_error_("Min not implemented for integers");};
     78                void Extrude(void){_error_("not supported yet");};
     79                void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
    8080                void GetVectorFromInputs(Vector* vector,int* doflist);
    8181                void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/PentaP1Input.cpp

    r12832 r13101  
    455455                case ControlInputEnum:{
    456456                        ControlInput* cont_input=(ControlInput*)xinput;
    457                         if(cont_input->values->ObjectEnum()!=PentaP1InputEnum) _error2_("not supported yet");
     457                        if(cont_input->values->ObjectEnum()!=PentaP1InputEnum) _error_("not supported yet");
    458458                        PentaP1Input* cast_input=(PentaP1Input*)cont_input->values;
    459459                        for(i=0;i<numnodes;i++)this->values[i]=this->values[i]+scalar*(cast_input->values[i]);}
    460460                        return;
    461461                default:
    462                         _error2_("not implemented yet");
     462                        _error_("not implemented yet");
    463463        }
    464464
     
    495495
    496496        /*Check that input provided is a thickness*/
    497         if (thickness_input->InstanceEnum()!=ThicknessEnum) _error2_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
     497        if (thickness_input->InstanceEnum()!=ThicknessEnum) _error_("Input provided is not a Thickness (enum_type is " << EnumToStringx(thickness_input->InstanceEnum()) << ")");
    498498
    499499        /*Get Thickness value pointer*/
     
    511511
    512512                default:
    513                         _error2_("not implemented yet");
     513                        _error_("not implemented yet");
    514514        }
    515515}
     
    529529
    530530        /*Check that inputB is of the same type*/
    531         if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
     531        if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    532532        xinputB=(PentaP1Input*)inputB;
    533533
     
    560560
    561561        /*Check that inputB is of the same type*/
    562         if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
     562        if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    563563        xinputB=(PentaP1Input*)inputB;
    564564
     
    591591
    592592        /*Check that inputB is of the same type*/
    593         if (inputB->ObjectEnum()!=PentaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
     593        if (inputB->ObjectEnum()!=PentaP1InputEnum) _error_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    594594        xinputB=(PentaP1Input*)inputB;
    595595
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/PentaP1Input.h

    r12704 r13101  
    4141                Input* PointwiseMax(Input* inputB);
    4242                ElementResult* SpawnResult(int step, IssmDouble time);
    43                 void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
     43                void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error_("not supported yet");};
    4444                void Configure(Parameters* parameters);
    4545                /*}}}*/
    4646                /*numerics: {{{*/
    47                 void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
    48                 void GetInputValue(int* pvalue){_error2_("not implemented yet");};
    49                 void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");};
    50                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error2_("not implemented yet");};
     47                void GetInputValue(bool* pvalue){_error_("not implemented yet");};
     48                void GetInputValue(int* pvalue){_error_("not implemented yet");};
     49                void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");};
     50                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss){_error_("not implemented yet");};
    5151                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
    52                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
    53                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error2_("not implemented yet");};
    54                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
    55                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
    56                 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
     52                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");};
     53                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");};
     54                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
     55                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
     56                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
    5757                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss);
    5858                void GetInputAverage(IssmDouble* pvalue);
    59                 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    60                 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
     59                void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     60                void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
    6161                void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss);
    6262                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss);
     
    6969                void ConstrainMin(IssmDouble minimum);
    7070                void Scale(IssmDouble scale_factor);
    71                 void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
     71                void ArtificialNoise(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
    7272                void AXPY(Input* xinput,IssmDouble scalar);
    7373                void Constrain(IssmDouble cm_min, IssmDouble cm_max);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/TransientInput.cpp

    r12946 r13101  
    482482                }
    483483        }
    484         if(!found)_error2_("did not find time interval on which to interpolate forcing values!");
     484        if(!found)_error_("did not find time interval on which to interpolate forcing values!");
    485485
    486486        /*Assign output pointer*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/TransientInput.h

    r12946 r13101  
    4040                int    InstanceEnum();
    4141                Input* SpawnTriaInput(int* indices);
    42                 Input* PointwiseDivide(Input* forcingB){_error2_("not implemented yet");};
    43                 Input* PointwiseMin(Input* forcingB){_error2_("not implemented yet");};
    44                 Input* PointwiseMax(Input* forcingB){_error2_("not implemented yet");};
     42                Input* PointwiseDivide(Input* forcingB){_error_("not implemented yet");};
     43                Input* PointwiseMin(Input* forcingB){_error_("not implemented yet");};
     44                Input* PointwiseMax(Input* forcingB){_error_("not implemented yet");};
    4545                ElementResult* SpawnResult(int step, IssmDouble time);
    4646                void Configure(Parameters* parameters);
    4747                /*}}}*/
    4848                /*numerics: {{{*/
    49                 void GetInputValue(bool* pvalue){_error2_("not implemented yet");};
    50                 void GetInputValue(int* pvalue){_error2_("not implemented yet");};
    51                 void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");};
     49                void GetInputValue(bool* pvalue){_error_("not implemented yet");};
     50                void GetInputValue(int* pvalue){_error_("not implemented yet");};
     51                void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");};
    5252                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
    5353                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss);
    5454                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time);
    5555                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time);
    56                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
    57                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error2_("not implemented yet");};
     56                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
     57                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
    5858                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
    59                 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
     59                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6060                void GetInputAverage(IssmDouble* pvalue);
    61                 void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    62                 void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error2_("not implemented yet");};
    63                 void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    64                 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    65                 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    66                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    67                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
     61                void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     62                void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
     63                void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     64                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     65                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     66                void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     67                void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6868                void ChangeEnum(int newenumtype);
    6969
    7070                void SquareMin(IssmDouble* psquaremin, bool process_units,Parameters* parameters);
    71                 void ConstrainMin(IssmDouble minimum){_error2_("not implemented yet");};
    72                 void Scale(IssmDouble scale_factor){_error2_("not implemented yet");};
    73                 void ArtificialNoise(IssmDouble min,IssmDouble max){_error2_("not implemented yet");};
    74                 void AXPY(Input* xforcing,IssmDouble scalar){_error2_("not implemented yet");};
    75                 void Constrain(IssmDouble cm_min, IssmDouble cm_max){_error2_("not implemented yet");};
     71                void ConstrainMin(IssmDouble minimum){_error_("not implemented yet");};
     72                void Scale(IssmDouble scale_factor){_error_("not implemented yet");};
     73                void ArtificialNoise(IssmDouble min,IssmDouble max){_error_("not implemented yet");};
     74                void AXPY(Input* xforcing,IssmDouble scalar){_error_("not implemented yet");};
     75                void Constrain(IssmDouble cm_min, IssmDouble cm_max){_error_("not implemented yet");};
    7676                IssmDouble InfinityNorm(void);
    7777                IssmDouble Max(void);
     
    8080                IssmDouble MinAbs(void);
    8181                void Extrude(void);
    82                 void VerticallyIntegrate(Input* thickness_forcing){_error2_("not supported yet");};
     82                void VerticallyIntegrate(Input* thickness_forcing){_error_("not supported yet");};
    8383                void GetVectorFromInputs(Vector* vector,int* doflist);
    84                 void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error2_("not supported yet");};
    85       void GetTimeValues(IssmDouble* values,IssmDouble time){_error2_("not implemented yet");};
     84                void GetValuesPtr(IssmDouble** pvalues,int* pnum_values){_error_("not supported yet");};
     85      void GetTimeValues(IssmDouble* values,IssmDouble time){_error_("not implemented yet");};
    8686                Input* GetTimeInput(IssmDouble time);
    8787                /*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/TriaP1Input.cpp

    r12832 r13101  
    323323
    324324                default :
    325                         _error2_("not implemented yet");
     325                        _error_("not implemented yet");
    326326        }
    327327
     
    368368
    369369        /*Check that inputB is of the same type*/
    370         if (inputB->ObjectEnum()!=TriaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
     370        if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    371371        xinputB=(TriaP1Input*)inputB;
    372372
     
    399399
    400400        /*Check that inputB is of the same type*/
    401         if (inputB->ObjectEnum()!=TriaP1InputEnum) _error2_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
     401        if (inputB->ObjectEnum()!=TriaP1InputEnum) _error_("Operation not permitted because inputB is of type " << EnumToStringx(inputB->ObjectEnum()));
    402402        xinputB=(TriaP1Input*)inputB;
    403403
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Inputs/TriaP1Input.h

    r12704 r13101  
    3737                int   InstanceEnum();
    3838                Input* SpawnTriaInput(int* indices);
    39                 Input* PointwiseDivide(Input* inputB){_error2_("not implemented yet");};
     39                Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
    4040                Input* PointwiseMin(Input* inputB);
    4141                Input* PointwiseMax(Input* inputB);
    4242                ElementResult* SpawnResult(int step, IssmDouble time);
    43                 void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error2_("not supported yet");};
     43                void AddTimeValues(IssmDouble* values,int step,IssmDouble time){_error_("not supported yet");};
    4444                void Configure(Parameters* parameters);
    4545                /*}}}*/
    4646                /*numerics: {{{*/
    47                 void GetInputValue(bool* pvalue){_error2_("not implemented yet");}
    48                 void GetInputValue(int* pvalue){_error2_("not implemented yet");}
    49                 void GetInputValue(IssmDouble* pvalue){_error2_("not implemented yet");}
     47                void GetInputValue(bool* pvalue){_error_("not implemented yet");}
     48                void GetInputValue(int* pvalue){_error_("not implemented yet");}
     49                void GetInputValue(IssmDouble* pvalue){_error_("not implemented yet");}
    5050                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss);
    51                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error2_("not implemented yet");};
    52                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error2_("not implemented yet");};
    53                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error2_("not implemented yet");};
    54                 void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error2_("not implemented yet");};
    55                 void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index){_error2_("not implemented yet");};
     51                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
     52                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss,IssmDouble time){_error_("not implemented yet");};
     53                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,IssmDouble time){_error_("not implemented yet");};
     54                void GetInputValue(IssmDouble* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
     55                void GetInputValue(IssmDouble* pvalue,GaussPenta* gauss,int index){_error_("not implemented yet");};
    5656                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussTria* gauss);
    57                 void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
     57                void GetInputDerivativeValue(IssmDouble* derivativevalues, IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    5858                void GetInputAverage(IssmDouble* pvalue);
    5959                void GetVxStrainRate2d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussTria* gauss);
    6060                void GetVyStrainRate2d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussTria* gauss);
    61                 void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    62                 void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    63                 void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    64                 void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
    65                 void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error2_("not implemented yet");};
     61                void GetVxStrainRate3d(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     62                void GetVyStrainRate3d(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     63                void GetVzStrainRate3d(IssmDouble* epsilonvz,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     64                void GetVxStrainRate3dPattyn(IssmDouble* epsilonvx,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
     65                void GetVyStrainRate3dPattyn(IssmDouble* epsilonvy,IssmDouble* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
    6666                void ChangeEnum(int newenumtype);
    6767
     
    7777                IssmDouble Min(void);
    7878                IssmDouble MinAbs(void);
    79                 void Extrude(void){_error2_("not supported yet");};
    80                 void VerticallyIntegrate(Input* thickness_input){_error2_("not supported yet");};
     79                void Extrude(void){_error_("not supported yet");};
     80                void VerticallyIntegrate(Input* thickness_input){_error_("not supported yet");};
    8181                void GetVectorFromInputs(Vector* vector,int* doflist);
    8282                void GetValuesPtr(IssmDouble** pvalues,int* pnum_values);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KMLFileReadUtils.cpp

    r12946 r13101  
    259259
    260260        if (strncmp(&ktag[0],"<"        ,1) || strncmp(&ktag[strlen(ktag)-1],">",1))
    261                 _error2_("KMLFileTagName -- Missing tag delimiters in " << ktag << ".\n");
     261                _error_("KMLFileTagName -- Missing tag delimiters in " << ktag << ".\n");
    262262
    263263/*  strtok modifies ktag, so work on copy  */
     
    355355                                                        NULL,NULL)) ||
    356356                (kstr[0] == '<'))
    357                 _error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");
     357                _error_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");
    358358
    359359        sscanf(kstr,"%d",pival);
     
    368368                        (kstr[1] != '/') ||
    369369                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    370                   {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
     370                  {_error_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    371371                else
    372372                        xDelete<char>(kstr);
     
    388388                                                        NULL,NULL)) ||
    389389                (kstr[0] == '<'))
    390           {_error2_("KMLFileTokenParse -- Missing bool field for " << ktag << ".\n");}
     390          {_error_("KMLFileTokenParse -- Missing bool field for " << ktag << ".\n");}
    391391
    392392        sscanf(kstr,"%d",&ival);
     
    402402                        (kstr[1] != '/') ||
    403403                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    404                   {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
     404                  {_error_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    405405                else
    406406                        xDelete<char>(kstr);
     
    433433                                                        NULL,NULL)) ||
    434434                (kstr[0] == '<'))
    435                 _error2_("KMLFileTokenParse -- Missing string field for " << ktag << ".\n");
     435                _error_("KMLFileTokenParse -- Missing string field for " << ktag << ".\n");
    436436
    437437        if (!pstr) {
     
    463463                        (kstr[1] != '/') ||
    464464                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    465                   {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
     465                  {_error_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    466466                else
    467467                        xDelete<char>(kstr);
     
    484484                                                        NULL,NULL)) ||
    485485                (kstr[0] == '<'))
    486           {_error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");}
     486          {_error_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");}
    487487
    488488        sscanf(kstr,"%g",pfval);
     
    497497                        (kstr[1] != '/') ||
    498498                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    499                   {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
     499                  {_error_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    500500                else
    501501                        xDelete<char>(kstr);
     
    518518                                                        NULL,NULL)) ||
    519519                (kstr[0] == '<'))
    520                 _error2_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");
     520                _error_("KMLFileTokenParse -- Missing integer field for " << ktag << ".\n");
    521521
    522522        sscanf(kstr,"%lg",pdval);
     
    531531                        (kstr[1] != '/') ||
    532532                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    533                   {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
     533                  {_error_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    534534                else
    535535                        xDelete<char>(kstr);
     
    556556                                                        NULL,NULL)) ||
    557557                (kstr[0] == '<'))
    558                 _error2_("KMLFileTokenParse -- Missing double [m] field for " << ktag << ".\n");
     558                _error_("KMLFileTokenParse -- Missing double [m] field for " << ktag << ".\n");
    559559
    560560        if (!*pdval)
     
    570570                i++;
    571571                if (maxlen && (maxlen < i+1))
    572                         _error2_("KMLFileTokenParse -- Double [m] field too short for " << ktag << ".\n");
     572                        _error_("KMLFileTokenParse -- Double [m] field too short for " << ktag << ".\n");
    573573                sscanf(ktok,"%lg",&((*pdval)[i]));
    574574                ktok=strtok(NULL,delim);
     
    595595                        (kstr[1] != '/') ||
    596596                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    597                   {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
     597                  {_error_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    598598                else
    599599                        xDelete<char>(kstr);
     
    622622                                                        NULL,NULL)) ||
    623623                (kstr[0] == '<'))
    624                 _error2_("KMLFileTokenParse -- Missing double [m x n] field for " << ktag << ".\n");
     624                _error_("KMLFileTokenParse -- Missing double [m x n] field for " << ktag << ".\n");
    625625
    626626        if (!*pdval)
     
    636636                i++;
    637637                if (maxlen && (maxlen*n < i+1))
    638                         _error2_("KMLFileTokenParse -- Double [m x n] field too short for " << ktag << ".\n");
     638                        _error_("KMLFileTokenParse -- Double [m x n] field too short for " << ktag << ".\n");
    639639                j=(j+1) % n;
    640640                sscanf(ktok,"%lg",&((*pdval)[i]));
     
    665665                        (kstr[1] != '/') ||
    666666                        (strncmp(&(kstr[2]),&(ktag[1]),strlen(ktag)-1)))
    667                   {_error2_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
     667                  {_error_("KMLFileTokenParse -- Missing closing tag for " << ktag << ".\n");}
    668668                else
    669669                        xDelete<char>(kstr);
     
    712712                else if ((kstr[0] == '<') &&
    713713                                 (kstr[1] == '/')) {
    714                         _error2_("KMLFileTagSkip -- Unexpected closing tag " << kstr << ".\n");
     714                        _error_("KMLFileTagSkip -- Unexpected closing tag " << kstr << ".\n");
    715715                }
    716716
     
    718718        }
    719719
    720         _error2_("KMLFileTokenParse -- Corresponding closing tag for " << ktag << " not found.\n");
     720        _error_("KMLFileTokenParse -- Corresponding closing tag for " << ktag << " not found.\n");
    721721
    722722        return(0);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Attribute.h

    r12832 r13101  
    3030                virtual void  DeepEcho();
    3131                virtual void  DeepEcho(const char* indent);
    32                 int   Id(){_error2_("Not implemented yet.");};
    33                 int   MyRank(){_error2_("Not implemented yet.");};
    34                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    35                 int   MarshallSize(){_error2_("Not implemented yet.");};
    36                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    37                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    38                 Object* copy(){_error2_("Not implemented yet.");};
     32                int   Id(){_error_("Not implemented yet.");};
     33                int   MyRank(){_error_("Not implemented yet.");};
     34                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     35                int   MarshallSize(){_error_("Not implemented yet.");};
     36                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     37                int   ObjectEnum(){_error_("Not implemented yet.");};
     38                Object* copy(){_error_("Not implemented yet.");};
    3939                /*}}}*/
    4040
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_ColorStyle.cpp

    r12835 r13101  
    9393                return;
    9494        else if (!strncmp(kstr,"</",2))
    95           {_error2_("KML_ColorStyle::Read -- Unexpected closing tag " << kstr);}
     95          {_error_("KML_ColorStyle::Read -- Unexpected closing tag " << kstr);}
    9696        else if (strncmp(kstr,"<",1))
    97           {_error2_("KML_ColorStyle::Read -- Unexpected field \"" << kstr << "\"");}
     97          {_error_("KML_ColorStyle::Read -- Unexpected field \"" << kstr << "\"");}
    9898
    9999        else if (!strcmp(kstr,"<color>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_ColorStyle.h

    r12832 r13101  
    3535                void  Write(FILE* fid,const char* indent);
    3636                void  Read(FILE* fid,char* kstr);
    37                 int   Id(){_error2_("Not implemented yet.");};
    38                 int   MyRank(){_error2_("Not implemented yet.");};
    39                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    40                 int   MarshallSize(){_error2_("Not implemented yet.");};
    41                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    42                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    43                 Object* copy(){_error2_("Not implemented yet.");};
     37                int   Id(){_error_("Not implemented yet.");};
     38                int   MyRank(){_error_("Not implemented yet.");};
     39                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     40                int   MarshallSize(){_error_("Not implemented yet.");};
     41                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     42                int   ObjectEnum(){_error_("Not implemented yet.");};
     43                Object* copy(){_error_("Not implemented yet.");};
    4444                /*}}}*/
    4545
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Comment.h

    r12832 r13101  
    3030                virtual void  DeepEcho();
    3131                virtual void  DeepEcho(const char* indent);
    32                 int   Id(){_error2_("Not implemented yet.");};
    33                 int   MyRank(){_error2_("Not implemented yet.");};
    34                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    35                 int   MarshallSize(){_error2_("Not implemented yet.");};
    36                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    37                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    38                 Object* copy(){_error2_("Not implemented yet.");};
     32                int   Id(){_error_("Not implemented yet.");};
     33                int   MyRank(){_error_("Not implemented yet.");};
     34                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     35                int   MarshallSize(){_error_("Not implemented yet.");};
     36                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     37                int   ObjectEnum(){_error_("Not implemented yet.");};
     38                Object* copy(){_error_("Not implemented yet.");};
    3939                /*}}}*/
    4040
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Container.cpp

    r12946 r13101  
    120120        }
    121121        else if (!strncmp(kstr,"</",2))
    122           {_error2_("KML_Container::Read -- Unexpected closing tag " << kstr );}
     122          {_error_("KML_Container::Read -- Unexpected closing tag " << kstr );}
    123123        else if (strncmp(kstr,"<",1))
    124           {_error2_("KML_Container::Read -- Unexpected field \"" << kstr << "\"");}
     124          {_error_("KML_Container::Read -- Unexpected field \"" << kstr << "\"");}
    125125
    126126        else if (!strncmp(kstr,"<Placemark",10)) {
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Container.h

    r12832 r13101  
    3333                void  Read(FILE* fid,char* kstr);
    3434                void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
    35                 int   Id(){_error2_("Not implemented yet.");};
    36                 int   MyRank(){_error2_("Not implemented yet.");};
    37                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    38                 int   MarshallSize(){_error2_("Not implemented yet.");};
    39                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    40                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    41                 Object* copy(){_error2_("Not implemented yet.");};
     35                int   Id(){_error_("Not implemented yet.");};
     36                int   MyRank(){_error_("Not implemented yet.");};
     37                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     38                int   MarshallSize(){_error_("Not implemented yet.");};
     39                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     40                int   ObjectEnum(){_error_("Not implemented yet.");};
     41                Object* copy(){_error_("Not implemented yet.");};
    4242                /*}}}*/
    4343
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Document.cpp

    r12946 r13101  
    106106                }
    107107                else if (!strncmp(kstri,"</",2))
    108                   {_error2_("KML_Document::Read -- Unexpected closing tag " << kstri << ".\n");}
     108                  {_error_("KML_Document::Read -- Unexpected closing tag " << kstri << ".\n");}
    109109                else if (strncmp(kstri,"<",1))
    110                   {_error2_("KML_Document::Read -- Unexpected field \"" << kstri << "\".\n");}
     110                  {_error_("KML_Document::Read -- Unexpected field \"" << kstri << "\".\n");}
    111111
    112112                else if (!strncmp(kstri,"<",1))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Document.h

    r12832 r13101  
    3030                void  Write(FILE* fid,const char* indent);
    3131                void  Read(FILE* fid,char* kstr);
    32                 int   Id(){_error2_("Not implemented yet.");};
    33                 int   MyRank(){_error2_("Not implemented yet.");};
    34                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    35                 int   MarshallSize(){_error2_("Not implemented yet.");};
    36                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    37                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    38                 Object* copy(){_error2_("Not implemented yet.");};
     32                int   Id(){_error_("Not implemented yet.");};
     33                int   MyRank(){_error_("Not implemented yet.");};
     34                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     35                int   MarshallSize(){_error_("Not implemented yet.");};
     36                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     37                int   ObjectEnum(){_error_("Not implemented yet.");};
     38                Object* copy(){_error_("Not implemented yet.");};
    3939                /*}}}*/
    4040
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Feature.cpp

    r12835 r13101  
    149149                return;
    150150        else if (!strncmp(kstr,"</",2))
    151           {_error2_("KML_Feature::Read -- Unexpected closing tag " << kstr);}
     151          {_error_("KML_Feature::Read -- Unexpected closing tag " << kstr);}
    152152        else if (strncmp(kstr,"<",1))
    153           {_error2_("KML_Feature::Read -- Unexpected field \"" << kstr << "\"");}
     153          {_error_("KML_Feature::Read -- Unexpected field \"" << kstr << "\"");}
    154154
    155155        else if (!strncmp(kstr,"<Style", 6)) {
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Feature.h

    r12832 r13101  
    4444                void  Write(FILE* fid,const char* indent);
    4545                void  Read(FILE* fid,char* kstr);
    46                 int   Id(){_error2_("Not implemented yet.");};
    47                 int   MyRank(){_error2_("Not implemented yet.");};
    48                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    49                 int   MarshallSize(){_error2_("Not implemented yet.");};
    50                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    51                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    52                 Object* copy(){_error2_("Not implemented yet.");};
     46                int   Id(){_error_("Not implemented yet.");};
     47                int   MyRank(){_error_("Not implemented yet.");};
     48                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     49                int   MarshallSize(){_error_("Not implemented yet.");};
     50                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     51                int   ObjectEnum(){_error_("Not implemented yet.");};
     52                Object* copy(){_error_("Not implemented yet.");};
    5353                /*}}}*/
    5454
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_File.cpp

    r12946 r13101  
    107107                }
    108108                else if (!strncmp(kstri,"</",2))
    109                   {_error2_("KML_File::Read -- Unexpected closing tag " << kstri << ".");}
     109                  {_error_("KML_File::Read -- Unexpected closing tag " << kstri << ".");}
    110110                else if (strncmp(kstri,"<",1))
    111                   {_error2_("KML_File::Read -- Unexpected field \"" << kstri << "\"");}
     111                  {_error_("KML_File::Read -- Unexpected field \"" << kstri << "\"");}
    112112
    113113                else if (!strncmp(kstri,"<",1))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_File.h

    r12832 r13101  
    3131                void  Read(FILE* fid,char* kstr);
    3232                void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
    33                 int   Id(){_error2_("Not implemented yet.");};
    34                 int   MyRank(){_error2_("Not implemented yet.");};
    35                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    36                 int   MarshallSize(){_error2_("Not implemented yet.");};
    37                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    38                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    39                 Object* copy(){_error2_("Not implemented yet.");};
     33                int   Id(){_error_("Not implemented yet.");};
     34                int   MyRank(){_error_("Not implemented yet.");};
     35                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     36                int   MarshallSize(){_error_("Not implemented yet.");};
     37                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     38                int   ObjectEnum(){_error_("Not implemented yet.");};
     39                Object* copy(){_error_("Not implemented yet.");};
    4040                /*}}}*/
    4141
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Folder.cpp

    r12946 r13101  
    106106                }
    107107                else if (!strncmp(kstri,"</",2))
    108                   {_error2_("KML_Folder::Read -- Unexpected closing tag " << kstri << ".\n");}
     108                  {_error_("KML_Folder::Read -- Unexpected closing tag " << kstri << ".\n");}
    109109                else if (strncmp(kstri,"<",1))
    110                   {_error2_("KML_Folder::Read -- Unexpected field \"" << kstri << "\".\n");}
     110                  {_error_("KML_Folder::Read -- Unexpected field \"" << kstri << "\".\n");}
    111111
    112112                else if (!strncmp(kstri,"<",1))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Folder.h

    r12832 r13101  
    3030                void  Write(FILE* fid,const char* indent);
    3131                void  Read(FILE* fid,char* kstr);
    32                 int   Id(){_error2_("Not implemented yet.");};
    33                 int   MyRank(){_error2_("Not implemented yet.");};
    34                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    35                 int   MarshallSize(){_error2_("Not implemented yet.");};
    36                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    37                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    38                 Object* copy(){_error2_("Not implemented yet.");};
     32                int   Id(){_error_("Not implemented yet.");};
     33                int   MyRank(){_error_("Not implemented yet.");};
     34                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     35                int   MarshallSize(){_error_("Not implemented yet.");};
     36                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     37                int   ObjectEnum(){_error_("Not implemented yet.");};
     38                Object* copy(){_error_("Not implemented yet.");};
    3939                /*}}}*/
    4040
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Geometry.cpp

    r12835 r13101  
    7979                return;
    8080        else if (!strncmp(kstr,"</",2))
    81           {_error2_("KML_Geometry::Read -- Unexpected closing tag " << kstr << ".\n");}
     81          {_error_("KML_Geometry::Read -- Unexpected closing tag " << kstr << ".\n");}
    8282        else if (strncmp(kstr,"<",1))
    83           {_error2_("KML_Geometry::Read -- Unexpected field \"" << kstr << "\".\n");}
     83          {_error_("KML_Geometry::Read -- Unexpected field \"" << kstr << "\".\n");}
    8484
    8585        else if (!strncmp(kstr,"<",1))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Geometry.h

    r12832 r13101  
    2929                void  Write(FILE* fid,const char* indent);
    3030                void  Read(FILE* fid,char* kstr);
    31                 int   Id(){_error2_("Not implemented yet.");};
    32                 int   MyRank(){_error2_("Not implemented yet.");};
    33                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    34                 int   MarshallSize(){_error2_("Not implemented yet.");};
    35                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    36                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    37                 Object* copy(){_error2_("Not implemented yet.");};
     31                int   Id(){_error_("Not implemented yet.");};
     32                int   MyRank(){_error_("Not implemented yet.");};
     33                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     34                int   MarshallSize(){_error_("Not implemented yet.");};
     35                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     36                int   ObjectEnum(){_error_("Not implemented yet.");};
     37                Object* copy(){_error_("Not implemented yet.");};
    3838                /*}}}*/
    3939
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_GroundOverlay.cpp

    r12946 r13101  
    131131                }
    132132                else if (!strncmp(kstri,"</",2))
    133                   {_error2_("KML_GroundOverlay::Read -- Unexpected closing tag " << kstri << ".\n");}
     133                  {_error_("KML_GroundOverlay::Read -- Unexpected closing tag " << kstri << ".\n");}
    134134                else if (strncmp(kstri,"<",1))
    135                   {_error2_("KML_GroundOverlay::Read -- Unexpected field \"" << kstri << "\".\n");}
     135                  {_error_("KML_GroundOverlay::Read -- Unexpected field \"" << kstri << "\".\n");}
    136136
    137137                else if (!strcmp(kstri,"<altitude>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_GroundOverlay.h

    r12832 r13101  
    3636                void  Write(FILE* fid,const char* indent);
    3737                void  Read(FILE* fid,char* kstr);
    38                 int   Id(){_error2_("Not implemented yet.");};
    39                 int   MyRank(){_error2_("Not implemented yet.");};
    40                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    41                 int   MarshallSize(){_error2_("Not implemented yet.");};
    42                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    43                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    44                 Object* copy(){_error2_("Not implemented yet.");};
     38                int   Id(){_error_("Not implemented yet.");};
     39                int   MyRank(){_error_("Not implemented yet.");};
     40                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     41                int   MarshallSize(){_error_("Not implemented yet.");};
     42                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     43                int   ObjectEnum(){_error_("Not implemented yet.");};
     44                Object* copy(){_error_("Not implemented yet.");};
    4545                /*}}}*/
    4646
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Icon.cpp

    r12946 r13101  
    145145                }
    146146                else if (!strncmp(kstri,"</",2))
    147                   {_error2_("KML_Icon::Read -- Unexpected closing tag " << kstri << ".\n");}
     147                  {_error_("KML_Icon::Read -- Unexpected closing tag " << kstri << ".\n");}
    148148                else if (strncmp(kstri,"<",1))
    149                   {_error2_("KML_Icon::Read -- Unexpected field \"" << kstri << "\".\n");}
     149                  {_error_("KML_Icon::Read -- Unexpected field \"" << kstri << "\".\n");}
    150150
    151151                else if (!strcmp(kstri,"<href>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Icon.h

    r12832 r13101  
    4444                void  Write(FILE* fid,const char* indent);
    4545                void  Read(FILE* fid,char* kstr);
    46                 int   Id(){_error2_("Not implemented yet.");};
    47                 int   MyRank(){_error2_("Not implemented yet.");};
    48                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    49                 int   MarshallSize(){_error2_("Not implemented yet.");};
    50                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    51                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    52                 Object* copy(){_error2_("Not implemented yet.");};
     46                int   Id(){_error_("Not implemented yet.");};
     47                int   MyRank(){_error_("Not implemented yet.");};
     48                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     49                int   MarshallSize(){_error_("Not implemented yet.");};
     50                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     51                int   ObjectEnum(){_error_("Not implemented yet.");};
     52                Object* copy(){_error_("Not implemented yet.");};
    5353                /*}}}*/
    5454
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_LatLonBox.cpp

    r12946 r13101  
    121121                }
    122122                else if (!strncmp(kstri,"</",2))
    123                   {_error2_("KML_LatLonBox::Read -- Unexpected closing tag " << kstri << ".\n");}
     123                  {_error_("KML_LatLonBox::Read -- Unexpected closing tag " << kstri << ".\n");}
    124124                else if (strncmp(kstri,"<",1))
    125                   {_error2_("KML_LatLonBox::Read -- Unexpected field \"" << kstri << "\".\n");}
     125                  {_error_("KML_LatLonBox::Read -- Unexpected field \"" << kstri << "\".\n");}
    126126
    127127                else if (!strcmp(kstri,"<north>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_LatLonBox.h

    r12832 r13101  
    3535                void  Write(FILE* fid,const char* indent);
    3636                void  Read(FILE* fid,char* kstr);
    37                 int   Id(){_error2_("Not implemented yet.");};
    38                 int   MyRank(){_error2_("Not implemented yet.");};
    39                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    40                 int   MarshallSize(){_error2_("Not implemented yet.");};
    41                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    42                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    43                 Object* copy(){_error2_("Not implemented yet.");};
     37                int   Id(){_error_("Not implemented yet.");};
     38                int   MyRank(){_error_("Not implemented yet.");};
     39                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     40                int   MarshallSize(){_error_("Not implemented yet.");};
     41                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     42                int   ObjectEnum(){_error_("Not implemented yet.");};
     43                Object* copy(){_error_("Not implemented yet.");};
    4444                /*}}}*/
    4545
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_LineString.cpp

    r12946 r13101  
    141141                }
    142142                else if (!strncmp(kstri,"</",2))
    143                   {_error2_("KML_LineString::Read -- Unexpected closing tag " << kstri << ".\n");}
     143                  {_error_("KML_LineString::Read -- Unexpected closing tag " << kstri << ".\n");}
    144144                else if (strncmp(kstri,"<",1))
    145                   {_error2_("KML_LineString::Read -- Unexpected field \"" << kstri << "\".\n");}
     145                  {_error_("KML_LineString::Read -- Unexpected field \"" << kstri << "\".\n");}
    146146
    147147                else if (!strcmp(kstri,"<extrude>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_LineString.h

    r12832 r13101  
    3838                void  Read(FILE* fid,char* kstr);
    3939                void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
    40                 int   Id(){_error2_("Not implemented yet.");};
    41                 int   MyRank(){_error2_("Not implemented yet.");};
    42                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    43                 int   MarshallSize(){_error2_("Not implemented yet.");};
    44                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    45                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    46                 Object* copy(){_error2_("Not implemented yet.");};
     40                int   Id(){_error_("Not implemented yet.");};
     41                int   MyRank(){_error_("Not implemented yet.");};
     42                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     43                int   MarshallSize(){_error_("Not implemented yet.");};
     44                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     45                int   ObjectEnum(){_error_("Not implemented yet.");};
     46                Object* copy(){_error_("Not implemented yet.");};
    4747                /*}}}*/
    4848
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_LineStyle.cpp

    r12946 r13101  
    113113                }
    114114                else if (!strncmp(kstri,"</",2))
    115                   {_error2_("KML_LineStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
     115                  {_error_("KML_LineStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
    116116                else if (strncmp(kstri,"<",1))
    117                   {_error2_("KML_LineStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
     117                  {_error_("KML_LineStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
    118118
    119119                else if (!strcmp(kstri,"<width>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_LineStyle.h

    r12832 r13101  
    3131                void  Write(FILE* fid,const char* indent);
    3232                void  Read(FILE* fid,char* kstr);
    33                 int   Id(){_error2_("Not implemented yet.");};
    34                 int   MyRank(){_error2_("Not implemented yet.");};
    35                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    36                 int   MarshallSize(){_error2_("Not implemented yet.");};
    37                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    38                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    39                 Object* copy(){_error2_("Not implemented yet.");};
     33                int   Id(){_error_("Not implemented yet.");};
     34                int   MyRank(){_error_("Not implemented yet.");};
     35                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     36                int   MarshallSize(){_error_("Not implemented yet.");};
     37                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     38                int   ObjectEnum(){_error_("Not implemented yet.");};
     39                Object* copy(){_error_("Not implemented yet.");};
    4040                /*}}}*/
    4141
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_LinearRing.cpp

    r12946 r13101  
    139139                }
    140140                else if (!strncmp(kstri,"</",2))
    141                   {_error2_("KML_LinearRing::Read -- Unexpected closing tag " << kstri << ".\n");}
     141                  {_error_("KML_LinearRing::Read -- Unexpected closing tag " << kstri << ".\n");}
    142142                else if (strncmp(kstri,"<",1))
    143                   {_error2_("KML_LinearRing::Read -- Unexpected field \"" << kstri << "\".\n");}
     143                  {_error_("KML_LinearRing::Read -- Unexpected field \"" << kstri << "\".\n");}
    144144
    145145                else if (!strcmp(kstri,"<extrude>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_LinearRing.h

    r12832 r13101  
    3838                void  Read(FILE* fid,char* kstr);
    3939                void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
    40                 int   Id(){_error2_("Not implemented yet.");};
    41                 int   MyRank(){_error2_("Not implemented yet.");};
    42                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    43                 int   MarshallSize(){_error2_("Not implemented yet.");};
    44                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    45                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    46                 Object* copy(){_error2_("Not implemented yet.");};
     40                int   Id(){_error_("Not implemented yet.");};
     41                int   MyRank(){_error_("Not implemented yet.");};
     42                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     43                int   MarshallSize(){_error_("Not implemented yet.");};
     44                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     45                int   ObjectEnum(){_error_("Not implemented yet.");};
     46                Object* copy(){_error_("Not implemented yet.");};
    4747                /*}}}*/
    4848
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_MultiGeometry.cpp

    r12946 r13101  
    140140                }
    141141                else if (!strncmp(kstri,"</",2))
    142                   {_error2_("KML_MultiGeometry::Read -- Unexpected closing tag " << kstri << ".\n");}
     142                  {_error_("KML_MultiGeometry::Read -- Unexpected closing tag " << kstri << ".\n");}
    143143                else if (strncmp(kstri,"<",1))
    144                   {_error2_("KML_MultiGeometry::Read -- Unexpected field \"" << kstri << "\".\n");}
     144                  {_error_("KML_MultiGeometry::Read -- Unexpected field \"" << kstri << "\".\n");}
    145145
    146146                else if (!strncmp(kstri,"<Point", 6)) {
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_MultiGeometry.h

    r12832 r13101  
    3434                void  Read(FILE* fid,char* kstr);
    3535                void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
    36                 int   Id(){_error2_("Not implemented yet.");};
    37                 int   MyRank(){_error2_("Not implemented yet.");};
    38                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    39                 int   MarshallSize(){_error2_("Not implemented yet.");};
    40                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    41                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    42                 Object* copy(){_error2_("Not implemented yet.");};
     36                int   Id(){_error_("Not implemented yet.");};
     37                int   MyRank(){_error_("Not implemented yet.");};
     38                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     39                int   MarshallSize(){_error_("Not implemented yet.");};
     40                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     41                int   ObjectEnum(){_error_("Not implemented yet.");};
     42                Object* copy(){_error_("Not implemented yet.");};
    4343                /*}}}*/
    4444
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Object.cpp

    r12946 r13101  
    146146                return;
    147147        else if (!strncmp(kstr,"</",2))
    148           {_error2_("KML_Object::Read -- Unexpected closing tag " << kstr << ".\n");}
     148          {_error_("KML_Object::Read -- Unexpected closing tag " << kstr << ".\n");}
    149149        else if (strncmp(kstr,"<",1))
    150           {_error2_("KML_Object::Read -- Unexpected field \"" << kstr << "\".\n");}
     150          {_error_("KML_Object::Read -- Unexpected field \"" << kstr << "\".\n");}
    151151
    152152        else if (!strncmp(kstr,"<Placemark",10)) {
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Object.h

    r12832 r13101  
    3131                virtual void  DeepEcho();
    3232                virtual void  DeepEcho(const char* indent);
    33                 int   Id(){_error2_("Not implemented yet.");};
    34                 int   MyRank(){_error2_("Not implemented yet.");};
    35                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    36                 int   MarshallSize(){_error2_("Not implemented yet.");};
    37                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    38                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    39                 Object* copy(){_error2_("Not implemented yet.");};
     33                int   Id(){_error_("Not implemented yet.");};
     34                int   MyRank(){_error_("Not implemented yet.");};
     35                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     36                int   MarshallSize(){_error_("Not implemented yet.");};
     37                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     38                int   ObjectEnum(){_error_("Not implemented yet.");};
     39                Object* copy(){_error_("Not implemented yet.");};
    4040                /*}}}*/
    4141
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Overlay.cpp

    r12946 r13101  
    110110        }
    111111        else if (!strncmp(kstr,"</",2))
    112           {_error2_("KML_Overlay::Read -- Unexpected closing tag " << kstr << ".\n");}
     112          {_error_("KML_Overlay::Read -- Unexpected closing tag " << kstr << ".\n");}
    113113        else if (strncmp(kstr,"<",1))
    114           {_error2_("KML_Overlay::Read -- Unexpected field \"" << kstr << "\".\n");}
     114          {_error_("KML_Overlay::Read -- Unexpected field \"" << kstr << "\".\n");}
    115115
    116116        else if (!strcmp(kstr,"<color>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Overlay.h

    r12832 r13101  
    3636                void  Write(FILE* fid,const char* indent);
    3737                void  Read(FILE* fid,char* kstr);
    38                 int   Id(){_error2_("Not implemented yet.");};
    39                 int   MyRank(){_error2_("Not implemented yet.");};
    40                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    41                 int   MarshallSize(){_error2_("Not implemented yet.");};
    42                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    43                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    44                 Object* copy(){_error2_("Not implemented yet.");};
     38                int   Id(){_error_("Not implemented yet.");};
     39                int   MyRank(){_error_("Not implemented yet.");};
     40                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     41                int   MarshallSize(){_error_("Not implemented yet.");};
     42                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     43                int   ObjectEnum(){_error_("Not implemented yet.");};
     44                Object* copy(){_error_("Not implemented yet.");};
    4545                /*}}}*/
    4646
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Placemark.cpp

    r12946 r13101  
    140140                }
    141141                else if (!strncmp(kstri,"</",2))
    142                   {_error2_("KML_Placemark::Read -- Unexpected closing tag " << kstri << ".\n");}
     142                  {_error_("KML_Placemark::Read -- Unexpected closing tag " << kstri << ".\n");}
    143143                else if (strncmp(kstri,"<",1))
    144                   {_error2_("KML_Placemark::Read -- Unexpected field \"" << kstri << "\".\n");}
     144                  {_error_("KML_Placemark::Read -- Unexpected field \"" << kstri << "\".\n");}
    145145
    146146                else if (!strncmp(kstri,"<Point", 6)) {
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Placemark.h

    r12832 r13101  
    3434                void  Read(FILE* fid,char* kstr);
    3535                void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
    36                 int   Id(){_error2_("Not implemented yet.");};
    37                 int   MyRank(){_error2_("Not implemented yet.");};
    38                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    39                 int   MarshallSize(){_error2_("Not implemented yet.");};
    40                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    41                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    42                 Object* copy(){_error2_("Not implemented yet.");};
     36                int   Id(){_error_("Not implemented yet.");};
     37                int   MyRank(){_error_("Not implemented yet.");};
     38                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     39                int   MarshallSize(){_error_("Not implemented yet.");};
     40                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     41                int   ObjectEnum(){_error_("Not implemented yet.");};
     42                Object* copy(){_error_("Not implemented yet.");};
    4343                /*}}}*/
    4444
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Point.cpp

    r12946 r13101  
    126126                }
    127127                else if (!strncmp(kstri,"</",2))
    128                   {_error2_("KML_Point::Read -- Unexpected closing tag " << kstri << ".\n");}
     128                  {_error_("KML_Point::Read -- Unexpected closing tag " << kstri << ".\n");}
    129129                else if (strncmp(kstri,"<",1))
    130                   {_error2_("KML_Point::Read -- Unexpected field \"" << kstri << "\".\n");}
     130                  {_error_("KML_Point::Read -- Unexpected field \"" << kstri << "\".\n");}
    131131
    132132                else if (!strcmp(kstri,"<extrude>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Point.h

    r12832 r13101  
    3636                void  Read(FILE* fid,char* kstr);
    3737                void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
    38                 int   Id(){_error2_("Not implemented yet.");};
    39                 int   MyRank(){_error2_("Not implemented yet.");};
    40                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    41                 int   MarshallSize(){_error2_("Not implemented yet.");};
    42                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    43                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    44                 Object* copy(){_error2_("Not implemented yet.");};
     38                int   Id(){_error_("Not implemented yet.");};
     39                int   MyRank(){_error_("Not implemented yet.");};
     40                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     41                int   MarshallSize(){_error_("Not implemented yet.");};
     42                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     43                int   ObjectEnum(){_error_("Not implemented yet.");};
     44                Object* copy(){_error_("Not implemented yet.");};
    4545                /*}}}*/
    4646
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_PolyStyle.cpp

    r12946 r13101  
    117117                }
    118118                else if (!strncmp(kstri,"</",2))
    119                   {_error2_("KML_PolyStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
     119                  {_error_("KML_PolyStyle::Read -- Unexpected closing tag " << kstri << ".\n");}
    120120                else if (strncmp(kstri,"<",1))
    121                   {_error2_("KML_PolyStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
     121                  {_error_("KML_PolyStyle::Read -- Unexpected field \"" << kstri << "\".\n");}
    122122
    123123                else if (!strcmp(kstri,"<fill>"))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_PolyStyle.h

    r12832 r13101  
    3232                void  Write(FILE* fid,const char* indent);
    3333                void  Read(FILE* fid,char* kstr);
    34                 int   Id(){_error2_("Not implemented yet.");};
    35                 int   MyRank(){_error2_("Not implemented yet.");};
    36                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    37                 int   MarshallSize(){_error2_("Not implemented yet.");};
    38                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    39                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    40                 Object* copy(){_error2_("Not implemented yet.");};
     34                int   Id(){_error_("Not implemented yet.");};
     35                int   MyRank(){_error_("Not implemented yet.");};
     36                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     37                int   MarshallSize(){_error_("Not implemented yet.");};
     38                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     39                int   ObjectEnum(){_error_("Not implemented yet.");};
     40                Object* copy(){_error_("Not implemented yet.");};
    4141                /*}}}*/
    4242
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Polygon.cpp

    r12946 r13101  
    179179                }
    180180                else if (!strncmp(kstri,"</",2))
    181                   {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstri << ".\n");}
     181                  {_error_("KML_Polygon::Read -- Unexpected closing tag " << kstri << ".\n");}
    182182                else if (strncmp(kstri,"<",1))
    183                   {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstri << "\".\n");}
     183                  {_error_("KML_Polygon::Read -- Unexpected field \"" << kstri << "\".\n");}
    184184
    185185                else if (!strcmp(kstri,"<extrude>"))
     
    207207                                }
    208208                                else if (!strncmp(kstrj,"</",2))
    209                                   {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstrj << ".\n");}
     209                                  {_error_("KML_Polygon::Read -- Unexpected closing tag " << kstrj << ".\n");}
    210210                                else if (strncmp(kstrj,"<",1))
    211                                   {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");}
     211                                  {_error_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");}
    212212
    213213                                else if (!strncmp(kstrj,"<LinearRing",11)) {
     
    234234                                }
    235235                                else if (!strncmp(kstrj,"</",2))
    236                                   {_error2_("KML_Polygon::Read -- Unexpected closing tag " << kstrj << ".\n");}
     236                                  {_error_("KML_Polygon::Read -- Unexpected closing tag " << kstrj << ".\n");}
    237237                                else if (strncmp(kstrj,"<",1))
    238                                   {_error2_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");}
     238                                  {_error_("KML_Polygon::Read -- Unexpected field \"" << kstrj << "\".\n");}
    239239
    240240                                else if (!strncmp(kstrj,"<LinearRing",11)) {
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Polygon.h

    r12832 r13101  
    4040                void  Read(FILE* fid,char* kstr);
    4141                void  WriteExp(FILE* fid,const char* nstr,int sgn,double cm,double sp);
    42                 int   Id(){_error2_("Not implemented yet.");};
    43                 int   MyRank(){_error2_("Not implemented yet.");};
    44                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    45                 int   MarshallSize(){_error2_("Not implemented yet.");};
    46                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    47                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    48                 Object* copy(){_error2_("Not implemented yet.");};
     42                int   Id(){_error_("Not implemented yet.");};
     43                int   MyRank(){_error_("Not implemented yet.");};
     44                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     45                int   MarshallSize(){_error_("Not implemented yet.");};
     46                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     47                int   ObjectEnum(){_error_("Not implemented yet.");};
     48                Object* copy(){_error_("Not implemented yet.");};
    4949                /*}}}*/
    5050
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Style.cpp

    r12946 r13101  
    189189                }
    190190                else if (!strncmp(kstri,"</",2))
    191                   {_error2_("KML_Style::Read -- Unexpected closing tag " << kstri << ".\n");}
     191                  {_error_("KML_Style::Read -- Unexpected closing tag " << kstri << ".\n");}
    192192                else if (strncmp(kstri,"<",1))
    193                   {_error2_("KML_Style::Read -- Unexpected field \"" << kstri << "\".\n");}
     193                  {_error_("KML_Style::Read -- Unexpected field \"" << kstri << "\".\n");}
    194194
    195195//              else if (!strncmp(kstri,"<IconStyle",10)) {
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Style.h

    r12832 r13101  
    3838                void  Write(FILE* fid,const char* indent);
    3939                void  Read(FILE* fid,char* kstr);
    40                 int   Id(){_error2_("Not implemented yet.");};
    41                 int   MyRank(){_error2_("Not implemented yet.");};
    42                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    43                 int   MarshallSize(){_error2_("Not implemented yet.");};
    44                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    45                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    46                 Object* copy(){_error2_("Not implemented yet.");};
     40                int   Id(){_error_("Not implemented yet.");};
     41                int   MyRank(){_error_("Not implemented yet.");};
     42                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     43                int   MarshallSize(){_error_("Not implemented yet.");};
     44                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     45                int   ObjectEnum(){_error_("Not implemented yet.");};
     46                Object* copy(){_error_("Not implemented yet.");};
    4747                /*}}}*/
    4848
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_StyleSelector.cpp

    r12835 r13101  
    8383                return;
    8484        else if (!strncmp(kstr,"</",2))
    85           {_error2_("KML_StyleSelector::Read -- Unexpected closing tag " << kstr << ".\n");}
     85          {_error_("KML_StyleSelector::Read -- Unexpected closing tag " << kstr << ".\n");}
    8686        else if (strncmp(kstr,"<",1))
    87           {_error2_("KML_StyleSelector::Read -- Unexpected field \"" << kstr << "\".\n");}
     87          {_error_("KML_StyleSelector::Read -- Unexpected field \"" << kstr << "\".\n");}
    8888
    8989        else if (!strncmp(kstr,"<",1))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_StyleSelector.h

    r12832 r13101  
    2929                void  Write(FILE* fid,const char* indent);
    3030                void  Read(FILE* fid,char* kstr);
    31                 int   Id(){_error2_("Not implemented yet.");};
    32                 int   MyRank(){_error2_("Not implemented yet.");};
    33                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    34                 int   MarshallSize(){_error2_("Not implemented yet.");};
    35                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    36                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    37                 Object* copy(){_error2_("Not implemented yet.");};
     31                int   Id(){_error_("Not implemented yet.");};
     32                int   MyRank(){_error_("Not implemented yet.");};
     33                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     34                int   MarshallSize(){_error_("Not implemented yet.");};
     35                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     36                int   ObjectEnum(){_error_("Not implemented yet.");};
     37                Object* copy(){_error_("Not implemented yet.");};
    3838                /*}}}*/
    3939
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_SubStyle.cpp

    r12835 r13101  
    8383                return;
    8484        else if (!strncmp(kstr,"</",2))
    85           {_error2_("KML_SubStyle::Read -- Unexpected closing tag " << kstr << ".\n");}
     85          {_error_("KML_SubStyle::Read -- Unexpected closing tag " << kstr << ".\n");}
    8686        else if (strncmp(kstr,"<",1))
    87           {_error2_("KML_SubStyle::Read -- Unexpected field \"" << kstr << "\".\n");}
     87          {_error_("KML_SubStyle::Read -- Unexpected field \"" << kstr << "\".\n");}
    8888
    8989        else if (!strncmp(kstr,"<",1))
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_SubStyle.h

    r12832 r13101  
    2929                void  Write(FILE* fid,const char* indent);
    3030                void  Read(FILE* fid,char* kstr);
    31                 int   Id(){_error2_("Not implemented yet.");};
    32                 int   MyRank(){_error2_("Not implemented yet.");};
    33                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    34                 int   MarshallSize(){_error2_("Not implemented yet.");};
    35                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    36                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    37                 Object* copy(){_error2_("Not implemented yet.");};
     31                int   Id(){_error_("Not implemented yet.");};
     32                int   MyRank(){_error_("Not implemented yet.");};
     33                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     34                int   MarshallSize(){_error_("Not implemented yet.");};
     35                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     36                int   ObjectEnum(){_error_("Not implemented yet.");};
     37                Object* copy(){_error_("Not implemented yet.");};
    3838                /*}}}*/
    3939
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Unknown.cpp

    r12946 r13101  
    160160                }
    161161                else if (!strncmp(kstri,"</",2))
    162                   {_error2_("KML_Unknown::Read -- Unexpected closing tag " << kstri << ".\n");}
     162                  {_error_("KML_Unknown::Read -- Unexpected closing tag " << kstri << ".\n");}
    163163
    164164                else if (strncmp(kstri,"<",1)) {
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/KML/KML_Unknown.h

    r12832 r13101  
    3232                void  Write(FILE* fid,const char* indent);
    3333                void  Read(FILE* fid,char* kstr);
    34                 int   Id(){_error2_("Not implemented yet.");};
    35                 int   MyRank(){_error2_("Not implemented yet.");};
    36                 void  Marshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    37                 int   MarshallSize(){_error2_("Not implemented yet.");};
    38                 void  Demarshall(char** pmarshalled_dataset){_error2_("Not implemented yet.");};
    39                 int   ObjectEnum(){_error2_("Not implemented yet.");};
    40                 Object* copy(){_error2_("Not implemented yet.");};
     34                int   Id(){_error_("Not implemented yet.");};
     35                int   MyRank(){_error_("Not implemented yet.");};
     36                void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     37                int   MarshallSize(){_error_("Not implemented yet.");};
     38                void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet.");};
     39                int   ObjectEnum(){_error_("Not implemented yet.");};
     40                Object* copy(){_error_("Not implemented yet.");};
    4141                /*}}}*/
    4242
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Friction.cpp

    r12832 r13101  
    107107                vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
    108108        }
    109         else _error2_("element_type "<< element_type << " not supported yet");
     109        else _error_("element_type "<< element_type << " not supported yet");
    110110
    111111        /*Checks that s-1>0 if v=0*/
    112         if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
     112        if(vmag==0 && (s-1)<0) _error_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
    113113
    114114        alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
     
    171171                vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
    172172        }
    173         else _error2_("element_type "<< element_type << " not supported yet");
     173        else _error_("element_type "<< element_type << " not supported yet");
    174174
    175175        /*Checks that s-1>0 if v=0*/
    176         if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
     176        if(vmag==0 && (s-1)<0) _error_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
    177177
    178178        alpha2=pow(drag_coefficient,2)*pow(Neff,r)*pow(vmag,(s-1));
     
    238238                vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
    239239        }
    240         else _error2_("element_type "<< element_type << " not supported yet");
     240        else _error_("element_type "<< element_type << " not supported yet");
    241241
    242242        /*Checks that s-1>0 if v=0*/
    243         if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
     243        if(vmag==0 && (s-1)<0) _error_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
    244244
    245245        alpha_complement=pow(Neff,r)*pow(vmag,(s-1));            _assert_(!xIsNan<IssmDouble>(alpha_complement));
     
    304304                vmag=sqrt(pow(vx,2)+pow(vy,2)+pow(vz,2));
    305305        }
    306         else _error2_("element_type "<< element_type << " not supported yet");
     306        else _error_("element_type "<< element_type << " not supported yet");
    307307
    308308        /*Checks that s-1>0 if v=0*/
    309         if(vmag==0 && (s-1)<0) _error2_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
     309        if(vmag==0 && (s-1)<0) _error_("velocity is 0 and (s-1)=" << (s-1) << "<0, alpha_complement is Inf");
    310310
    311311        alpha_complement=pow(Neff,r)*pow(vmag,(s-1));            _assert_(!xIsNan<IssmDouble>(alpha_complement));
     
    319319
    320320        Input* input=inputs->GetInput(enum_type);
    321         if(!input) _error2_("input " << EnumToStringx(enum_type) << " not found");
     321        if(!input) _error_("input " << EnumToStringx(enum_type) << " not found");
    322322        input->GetInputValue(pvalue,gauss);
    323323
     
    328328
    329329        Input* input=inputs->GetInput(enum_type);
    330         if(!input) _error2_("input " << EnumToStringx(enum_type) << " not found");
     330        if(!input) _error_("input " << EnumToStringx(enum_type) << " not found");
    331331        input->GetInputValue(pvalue,gauss);
    332332
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Icefront.cpp

    r12832 r13101  
    8181                icefront_node_ids[3]=iomodel->nodecounter+reCast<int>(*(iomodel->Data(DiagnosticIcefrontEnum)+segment_width*i+3));
    8282        }
    83         else _error2_("in_icefront_type " << EnumToStringx(in_icefront_type) << " not supported yet!");
     83        else _error_("in_icefront_type " << EnumToStringx(in_icefront_type) << " not supported yet!");
    8484
    8585        if (in_icefront_type==PattynIceFrontEnum || in_icefront_type==StokesIceFrontEnum)
     
    263263                #endif
    264264                default:
    265                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     265                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    266266        }
    267267
     
    379379            #endif
    380380                default:
    381                         _error2_("Icefront type " << EnumToStringx(type) << " not supported yet");
     381                        _error_("Icefront type " << EnumToStringx(type) << " not supported yet");
    382382        }
    383383}
     
    441441                                break;
    442442                        default:
    443                                 _error2_("fill type " << EnumToStringx(fill) << " not supported yet");
     443                                _error_("fill type " << EnumToStringx(fill) << " not supported yet");
    444444                }
    445445                ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2);
     
    564564                                break;
    565565                        default:
    566                                 _error2_("fill type " << EnumToStringx(fill) << " not supported yet");
     566                                _error_("fill type " << EnumToStringx(fill) << " not supported yet");
    567567                }
    568568                ice_pressure=rho_ice*gravity*(surface-z_g);
     
    638638                                break;
    639639                        default:
    640                                 _error2_("fill type " << EnumToStringx(fill) << " not supported yet");
     640                                _error_("fill type " << EnumToStringx(fill) << " not supported yet");
    641641                }
    642642                air_pressure=0;
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Icefront.h

    r12494 r13101  
    6464                void  InputUpdateFromConstant(bool constant, int name);
    6565                void  InputUpdateFromSolution(IssmDouble* solution);
    66                 void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
     66                void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
    6767                /*}}}*/
    6868                /*Load virtual functions definitions: {{{*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Numericalflux.cpp

    r12832 r13101  
    270270                        break;
    271271                default:
    272                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     272                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    273273        }
    274274
     
    300300                        break;
    301301                default:
    302                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     302                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    303303        }
    304304
     
    347347                        return CreateKMatrixPrognosticBoundary();
    348348                default:
    349                         _error2_("type not supported yet");
     349                        _error_("type not supported yet");
    350350        }
    351351}
     
    500500                        return CreateKMatrixBalancethicknessBoundary();
    501501                default:
    502                         _error2_("type not supported yet");
     502                        _error_("type not supported yet");
    503503        }
    504504}
     
    651651                        return CreateKMatrixAdjointBalancethicknessBoundary();
    652652                default:
    653                         _error2_("type not supported yet");
     653                        _error_("type not supported yet");
    654654        }
    655655}
     
    683683                        return CreatePVectorPrognosticBoundary();
    684684                default:
    685                         _error2_("type not supported yet");
     685                        _error_("type not supported yet");
    686686        }
    687687}
     
    751751                vyaverage_input->GetInputValue(&vy,gauss);
    752752                spcthickness_input->GetInputValue(&thickness,gauss);
    753                 if(xIsNan<IssmDouble>(thickness)) _error2_("Cannot weakly apply constraint because NaN was provided");
     753                if(xIsNan<IssmDouble>(thickness)) _error_("Cannot weakly apply constraint because NaN was provided");
    754754
    755755                UdotN=vx*normal[0]+vy*normal[1];
     
    777777                        return CreatePVectorBalancethicknessBoundary();
    778778                default:
    779                         _error2_("type not supported yet");
     779                        _error_("type not supported yet");
    780780        }
    781781}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Numericalflux.h

    r12494 r13101  
    5050                /*Update virtual functions resolution: {{{*/
    5151                void    InputUpdateFromVector(IssmDouble* vector, int name, int type){/*Do nothing*/}
    52                 void    InputUpdateFromVector(int* vector, int name, int type){_error2_("Not implemented yet!");}
    53                 void    InputUpdateFromVector(bool* vector, int name, int type){_error2_("Not implemented yet!");}
     52                void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
     53                void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
    5454                void    InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){/*Do nothing*/}
    5555                void    InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){/*Do nothing*/}
    56                 void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error2_("Not implemented yet!");}
    57                 void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error2_("Not implemented yet!");}
     56                void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
     57                void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
    5858                void    InputUpdateFromConstant(IssmDouble constant, int name){/*Do nothing*/};
    5959                void    InputUpdateFromConstant(int constant, int name){/*Do nothing*/};
    60                 void    InputUpdateFromConstant(bool constant, int name){_error2_("Not implemented yet!");}
    61                 void    InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
    62                 void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
     60                void    InputUpdateFromConstant(bool constant, int name){_error_("Not implemented yet!");}
     61                void    InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
     62                void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
    6363                /*}}}*/
    6464                /*Load virtual functions definitions: {{{*/
     
    6767                void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
    6868                void  CreatePVector(Vector* pf);
    69                 void  CreateJacobianMatrix(Matrix* Jff){_error2_("Not implemented yet");};
    70                 void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error2_("Not implemented yet");};
     69                void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
     70                void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
    7171                void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
    7272                void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Pengrid.cpp

    r12832 r13101  
    239239                #endif
    240240                default:
    241                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     241                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    242242        }
    243243
     
    271271                #endif
    272272                default:
    273                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     273                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    274274        }
    275275
     
    379379        }
    380380        else{
    381                 _error2_("analysis: " << EnumToStringx(analysis_type) << " not supported yet");
     381                _error_("analysis: " << EnumToStringx(analysis_type) << " not supported yet");
    382382        }
    383383
     
    572572        }
    573573        else{
    574                 if (dt) pe->values[0]=melting_offset*pow((IssmDouble)10,penalty_factor)*(temperature-t_pmp)/dt;
     574                if (reCast<bool>(dt)) pe->values[0]=melting_offset*pow((IssmDouble)10,penalty_factor)*(temperature-t_pmp)/dt;
    575575                else    pe->values[0]=melting_offset*pow((IssmDouble)10,penalty_factor)*(temperature-t_pmp);
    576576        }
     
    616616/*FUNCTION Pengrid::UpdateInputs {{{*/
    617617void  Pengrid::UpdateInputs(IssmDouble* solution){
    618         _error2_("not supported yet!");
    619 }
    620 /*}}}*/
     618        _error_("not supported yet!");
     619}
     620/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Pengrid.h

    r12494 r13101  
    6565                void  InputUpdateFromConstant(bool constant, int name);
    6666                void  InputUpdateFromSolution(IssmDouble* solution);
    67                 void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
     67                void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
    6868                /*}}}*/
    6969                /*Load virtual functions definitions: {{{*/
     
    7272                void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
    7373                void  CreatePVector(Vector* pf);
    74                 void  CreateJacobianMatrix(Matrix* Jff){_error2_("Not implemented yet");};
    75                 void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error2_("Not implemented yet");};
     74                void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
     75                void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
    7676                void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
    7777                void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Penpair.cpp

    r12832 r13101  
    172172                        break;
    173173                default:
    174                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     174                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    175175        }
    176176
     
    244244                                case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    245245                                case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    246                                 default: _error2_("not supported yet");
     246                                default: _error_("not supported yet");
    247247                        }
    248248                case PattynApproximationEnum:
     
    250250                                case MacAyealApproximationEnum: return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    251251                                case PattynApproximationEnum:   return PenaltyCreateKMatrixDiagnosticMacAyealPattyn(kmax);
    252                                 default: _error2_("not supported yet");
     252                                default: _error_("not supported yet");
    253253                        }
    254254                case StokesApproximationEnum:
     
    256256                                case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax);
    257257                                case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax);
    258                                 default: _error2_("not supported yet");
     258                                default: _error_("not supported yet");
    259259                        }
    260260                case NoneApproximationEnum:
     
    262262                                case StokesApproximationEnum: return PenaltyCreateKMatrixDiagnosticStokes(kmax);
    263263                                case NoneApproximationEnum: return   PenaltyCreateKMatrixDiagnosticStokes(kmax);
    264                                 default: _error2_("not supported yet");
     264                                default: _error_("not supported yet");
    265265                        }
    266                 default: _error2_("not supported yet");
     266                default: _error_("not supported yet");
    267267        }
    268268}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Penpair.h

    r12494 r13101  
    4444                void  InputUpdateFromVector(int* vector, int name, int type);
    4545                void  InputUpdateFromVector(bool* vector, int name, int type);
    46                 void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols,int name, int type){_error2_("Not implemented yet!");}
    47                 void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error2_("Not implemented yet!");}
    48                 void  InputUpdateFromVectorDakota(int* vector, int name, int type){_error2_("Not implemented yet!");}
    49                 void  InputUpdateFromVectorDakota(bool* vector, int name, int type){_error2_("Not implemented yet!");}
     46                void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrow, int ncols,int name, int type){_error_("Not implemented yet!");}
     47                void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("Not implemented yet!");}
     48                void  InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
     49                void  InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
    5050                void  InputUpdateFromConstant(IssmDouble constant, int name);
    5151                void  InputUpdateFromConstant(int constant, int name);
    5252                void  InputUpdateFromConstant(bool constant, int name);
    53                 void  InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
    54                 void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
     53                void  InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
     54                void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
    5555                /*}}}*/
    5656                        /*Load virtual functions definitions: {{{*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Riftfront.cpp

    r12832 r13101  
    6060
    6161        /*Ok, retrieve all the data needed to add a penalty between the two nodes: */
    62         el1=(int)*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+2);
    63         el2=(int)*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+3);
    64 
    65         node1=(int)*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+0);
    66         node2=(int)*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+1);
     62        el1=reCast<int,IssmDouble>(*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+2));
     63        el2=reCast<int,IssmDouble>(*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+3)) ;
     64
     65        node1=reCast<int,IssmDouble>(*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+0));
     66        node2=reCast<int,IssmDouble>(*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+1));
    6767
    6868        /*id: */
     
    9393        this->length=*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+6);
    9494        this->fraction=*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+9);
    95         this->state=(int)*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+11);
     95        this->state=reCast<int,IssmDouble>(*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+11));
    9696
    9797        //intialize inputs, and add as many inputs per element as requested:
     
    9999               
    100100        riftfront_type=SegmentRiftfrontEnum;
    101         riftfront_fill = (int)*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+7);
     101        riftfront_fill = reCast<int,IssmDouble>(*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+7));
    102102        riftfront_friction=*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+8);
    103103        riftfront_fractionincrement=*(iomodel->Data(RiftsRiftstructEnum)+RIFTINFOSIZE*i+10);
    104         riftfront_shelf=(bool)iomodel->Data(MaskVertexonfloatingiceEnum)[node1-1];
     104        riftfront_shelf=reCast<bool,IssmDouble>(iomodel->Data(MaskVertexonfloatingiceEnum)[node1-1]);
    105105
    106106        this->inputs->AddInput(new IntInput(TypeEnum,riftfront_type));
     
    276276
    277277        /*update input*/
    278         _error2_("not implemented yet");
     278        _error_("not implemented yet");
    279279        //this->inputs->AddInput(new DoubleInput(name,constant));
    280280
     
    324324                        break;
    325325                default:
    326                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     326                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    327327        }
    328328
     
    350350                        break;
    351351                default:
    352                         _error2_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
     352                        _error_("analysis " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not supported yet");
    353353        }
    354354
     
    397397
    398398        /*enum of element? */
    399         if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
     399        if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");
    400400        tria1=(Tria*)elements[0];
    401401        tria2=(Tria*)elements[1];
     
    410410        tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum);
    411411        tria2->GetInputValue(&h[1],nodes[1],ThicknessEnum);
    412         if (h[0]!=h[1])_error2_("different thicknesses not supported for rift fronts");
     412        if (h[0]!=h[1])_error_("different thicknesses not supported for rift fronts");
    413413        thickness=h[0];
    414414
     
    488488
    489489        /*enum of element? */
    490         if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
     490        if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");
    491491        tria1=(Tria*)elements[0];
    492492        tria2=(Tria*)elements[1];
     
    504504        tria1->GetInputValue(&h[0],nodes[0],ThicknessEnum);
    505505        tria2->GetInputValue(&h[1],nodes[1],ThicknessEnum);
    506         if (h[0]!=h[1])_error2_("different thicknesses not supported for rift fronts");
     506        if (h[0]!=h[1])_error_("different thicknesses not supported for rift fronts");
    507507        thickness=h[0];
    508508        tria1->GetInputValue(&b[0],nodes[0],BedEnum);
    509509        tria2->GetInputValue(&b[1],nodes[1],BedEnum);
    510         if (b[0]!=b[1])_error2_("different beds not supported for rift fronts");
     510        if (b[0]!=b[1])_error_("different beds not supported for rift fronts");
    511511        bed=b[0];
    512512
     
    536536        else if(fill==MelangeEnum){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)
    537537
    538                 if(!shelf) _error2_("fill type " << fill << " not supported on ice sheets yet.");
     538                if(!shelf) _error_("fill type " << fill << " not supported on ice sheets yet.");
    539539
    540540                pressure_litho=rho_ice*gravity*pow(thickness,(IssmDouble)2)/(IssmDouble)2;
     
    546546        }
    547547        else{
    548                 _error2_("fill type " << fill << " not supported yet.");
     548                _error_("fill type " << fill << " not supported yet.");
    549549        }
    550550
     
    585585
    586586        /*enum of element? */
    587         if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
     587        if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");
    588588
    589589        /*recover elements on both side of rift: */
     
    679679        this->inputs->GetInputValue(&converged,ConvergedEnum);
    680680
    681         if(converged){
     681        if(reCast<int,IssmDouble>(converged)){
    682682                /*ok, material non-linearity has converged. If that was already the case, we keep
    683683                 * constraining the rift front. If it was not, and this is the first time the material
     
    706706
    707707        /*enum of element? */
    708         if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
     708        if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");
    709709
    710710        /*recover elements on both side of rift: */
     
    751751
    752752        /*enum of element? */
    753         if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
     753        if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");
    754754
    755755        /*recover elements on both side of rift: */
     
    794794
    795795        /*enum of element? */
    796         if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
     796        if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");
    797797
    798798        /*recover elements on both side of rift: */
     
    844844
    845845        /*enum of element? */
    846         if(elements[0]->ObjectEnum()!=TriaEnum)_error2_("only Tria element allowed for Riftfront load!");
     846        if(elements[0]->ObjectEnum()!=TriaEnum)_error_("only Tria element allowed for Riftfront load!");
    847847
    848848        /*recover elements on both side of rift: */
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Loads/Riftfront.h

    r12494 r13101  
    6262                /*Update virtual functions resolution: {{{*/
    6363                void    InputUpdateFromVector(IssmDouble* vector, int name, int type);
    64                 void    InputUpdateFromVector(int* vector, int name, int type){_error2_("Not implemented yet!");}
    65                 void    InputUpdateFromVector(bool* vector, int name, int type){_error2_("Not implemented yet!");}
    66                 void    InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows,int ncols, int name, int type){_error2_("Not implemented yet!");}
    67                 void    InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error2_("Not implemented yet!");}
    68                 void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error2_("Not implemented yet!");}
    69                 void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error2_("Not implemented yet!");}
     64                void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
     65                void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
     66                void    InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows,int ncols, int name, int type){_error_("Not implemented yet!");}
     67                void    InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("Not implemented yet!");}
     68                void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
     69                void    InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
    7070                void    InputUpdateFromConstant(IssmDouble constant, int name);
    71                 void    InputUpdateFromConstant(int constant, int name){_error2_("Not implemented yet!");}
     71                void    InputUpdateFromConstant(int constant, int name){_error_("Not implemented yet!");}
    7272                void    InputUpdateFromConstant(bool constant, int name);
    73                 void    InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
    74                 void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
     73                void    InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
     74                void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
    7575                /*}}}*/
    7676                /*Load virtual functions definitions: {{{*/
     
    7979                void  CreateKMatrix(Matrix* Kff, Matrix* Kfs);
    8080                void  CreatePVector(Vector* pf);
    81                 void  CreateJacobianMatrix(Matrix* Jff){_error2_("Not implemented yet");};
    82                 void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error2_("Not implemented yet");};
     81                void  CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
     82                void  PenaltyCreateJacobianMatrix(Matrix* Jff,IssmDouble kmax){_error_("Not implemented yet");};
    8383                void  PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, IssmDouble kmax);
    8484                void  PenaltyCreatePVector(Vector* pf, IssmDouble kmax);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Materials/Matice.cpp

    r12897 r13101  
    128128}
    129129/*}}}*/
     130/*FUNCTION Matice::GetA {{{*/
     131IssmDouble Matice::GetA(){
     132        /*
     133         * A = 1/B^n
     134         */
     135
     136        IssmDouble B,n;
     137
     138        inputs->GetInputAverage(&B,MaterialsRheologyBEnum);
     139        n=this->GetN();
     140
     141        return pow(B,-n);
     142}
     143/*}}}*/
    130144/*FUNCTION Matice::GetB {{{*/
    131145IssmDouble Matice::GetB(){
     
    200214                        /*Get input (either in element or material)*/
    201215                        Input* input=inputs->GetInput(input_enum);
    202                         if(!input) _error2_("Input " << EnumToStringx(input_enum) << " not found in material");
     216                        if(!input) _error_("Input " << EnumToStringx(input_enum) << " not found in material");
    203217
    204218                        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
     
    206220                        break;
    207221
    208                 default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
     222                default: _error_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
    209223        }
    210224}
     
    258272                        if(A==0){
    259273                                /*Maxiviscositym viscosity for 0 shear areas: */
    260                                 viscosity=2.5*pow((IssmDouble)10,(IssmDouble)17);
     274                                viscosity=2.5*pow(10.,17.);
    261275                        }
    262276                        else{
     
    268282
    269283        /*Checks in debugging mode*/
    270         if(viscosity<=0) _error2_("Negative viscosity");
     284        if(viscosity<=0) _error_("Negative viscosity");
    271285        _assert_(B>0);
    272286        _assert_(n>0);
     
    339353
    340354        /*Checks in debugging mode*/
    341         if(viscosity3d<=0) _error2_("Negative viscosity");
     355        if(viscosity3d<=0) _error_("Negative viscosity");
    342356        _assert_(B>0);
    343357        _assert_(n>0);
     
    411425
    412426        /*Checks in debugging mode*/
    413         if(viscosity3d<=0) _error2_("Negative viscosity");
     427        if(viscosity3d<=0) _error_("Negative viscosity");
    414428        _assert_(B>0);
    415429        _assert_(n>0);
     
    628642                                        return;
    629643                                }
    630                                 default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
    631                         }
    632                 default: _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     644                                default: _error_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
     645                        }
     646                default: _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    633647        }
    634648}
     
    686700                                        return;
    687701                                }
    688                                 default: _error2_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
    689                         }
    690                 default: _error2_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     702                                default: _error_("element " << EnumToStringx(element->ObjectEnum()) << " not implemented yet");
     703                        }
     704                default: _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    691705        }
    692706
     
    775789                if (control_analysis && iomodel->Data(InversionControlParametersEnum)){
    776790                        for(i=0;i<num_control_type;i++){
    777                                 switch((int)iomodel->Data(InversionControlParametersEnum)[i]){
     791                                switch(reCast<int>(iomodel->Data(InversionControlParametersEnum)[i])){
    778792                                        case MaterialsRheologyBbarEnum:
    779793                                                if (iomodel->Data(MaterialsRheologyBEnum)){
    780794                                                        _assert_(iomodel->Data(MaterialsRheologyBEnum));_assert_(iomodel->Data(InversionMinParametersEnum)); _assert_(iomodel->Data(InversionMaxParametersEnum));
    781                                                         for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(MaterialsRheologyBEnum)[int(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)];
    782                                                         for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->Data(InversionMinParametersEnum)[int(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
    783                                                         for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->Data(InversionMaxParametersEnum)[int(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
     795                                                        for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(MaterialsRheologyBEnum)[reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)];
     796                                                        for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->Data(InversionMinParametersEnum)[reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
     797                                                        for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->Data(InversionMaxParametersEnum)[reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
    784798                                                        this->inputs->AddInput(new ControlInput(MaterialsRheologyBbarEnum,TriaP1InputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
    785799                                                }
     
    813827                /*Get B*/
    814828                if (iomodel->Data(MaterialsRheologyBEnum)) {
    815                         for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(MaterialsRheologyBEnum)[int(iomodel->Data(MeshElementsEnum)[num_vertices*index+i]-1)];
     829                        for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(MaterialsRheologyBEnum)[reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[num_vertices*index+i]-1)];
    816830                        this->inputs->AddInput(new PentaP1Input(MaterialsRheologyBEnum,nodeinputs));
    817831                }
     
    833847                if (control_analysis && iomodel->Data(InversionControlParametersEnum)){
    834848                        for(i=0;i<num_control_type;i++){
    835                                 switch((int)iomodel->Data(InversionControlParametersEnum)[i]){
     849                                switch(reCast<int>(iomodel->Data(InversionControlParametersEnum)[i])){
    836850                                        case MaterialsRheologyBbarEnum:
    837851                                                if (iomodel->Data(MaterialsRheologyBEnum)){
    838852                                                        _assert_(iomodel->Data(MaterialsRheologyBEnum));_assert_(iomodel->Data(InversionMinParametersEnum)); _assert_(iomodel->Data(InversionMaxParametersEnum));
    839                                                         for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(MaterialsRheologyBEnum)[int(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)];
    840                                                         for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->Data(InversionMinParametersEnum)[int(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
    841                                                         for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->Data(InversionMaxParametersEnum)[int(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
     853                                                        for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(MaterialsRheologyBEnum)[reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)];
     854                                                        for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->Data(InversionMinParametersEnum)[reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
     855                                                        for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->Data(InversionMaxParametersEnum)[reCast<int,IssmDouble>(iomodel->Data(MeshElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
    842856                                                        this->inputs->AddInput(new ControlInput(MaterialsRheologyBEnum,PentaP1InputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
    843857                                                }
     
    859873        #endif
    860874        else{
    861                 _error2_("Mesh type not supported yet!");
     875                _error_("Mesh type not supported yet!");
    862876        }
    863877
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Materials/Matice.h

    r12897 r13101  
    6666                void   GetViscosityDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* pepsilon);
    6767                void   GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* pepsilon);
     68                IssmDouble GetA();
    6869                IssmDouble GetB();
    6970                IssmDouble GetBbar();
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Materials/Matpar.h

    r12494 r13101  
    6262                void   InputUpdateFromConstant(bool constant, int name);
    6363                void   InputUpdateFromSolution(IssmDouble* solution);
    64                 void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("not implemented yet");};
     64                void   InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
    6565                /*}}}*/
    6666                /*Material virtual functions resolution: {{{*/
    67                 void   InputDuplicate(int original_enum,int new_enum){_error2_("not implemented yet");};
     67                void   InputDuplicate(int original_enum,int new_enum){_error_("not implemented yet");};
    6868                void   Configure(Elements* elements);
    6969                void   GetVectorFromInputs(Vector* vector,int input_enum){return;}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Node.cpp

    r12832 r13101  
    7070
    7171        /*spc all nodes on water*/
    72         if (!iomodel->Data(MaskVertexonwaterEnum)) _error2_("iomodel->nodeonwater is NULL");
     72        if (!iomodel->Data(MaskVertexonwaterEnum)) _error_("iomodel->nodeonwater is NULL");
    7373        if (reCast<IssmBool>(iomodel->Data(MaskVertexonwaterEnum)[io_index])){
    7474                for(k=1;k<=gsize;k++){
     
    8989                        _assert_(iomodel->Data(MeshVertexonbedEnum));
    9090                        _assert_(iomodel->Data(FlowequationVertexEquationEnum));
    91                         if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealApproximationEnum && !iomodel->Data(MeshVertexonbedEnum)[io_index]){
     91                        if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealApproximationEnum && !reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
    9292                                for(k=1;k<=gsize;k++) this->FreezeDof(k);
    9393                        }
    94                         if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealPattynApproximationEnum && iomodel->Data(FlowequationBordermacayealEnum)[io_index]){
    95                                 if(!iomodel->Data(MeshVertexonbedEnum)[io_index]){
     94                        if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==L1L2ApproximationEnum && !reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
     95                                for(k=1;k<=gsize;k++) this->FreezeDof(k);
     96                        }
     97                        if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealPattynApproximationEnum && reCast<int>(iomodel->Data(FlowequationBordermacayealEnum)[io_index])){
     98                                if(!reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
    9699                                        for(k=1;k<=gsize;k++) this->FreezeDof(k);
    97100                                }
    98101                        }
    99                         if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealStokesApproximationEnum && iomodel->Data(FlowequationBordermacayealEnum)[io_index]){
    100                                 if(!iomodel->Data(MeshVertexonbedEnum)[io_index]){
     102                        if (iomodel->Data(FlowequationVertexEquationEnum)[io_index]==MacAyealStokesApproximationEnum && reCast<int>(iomodel->Data(FlowequationBordermacayealEnum)[io_index])){
     103                                if(!reCast<int>(iomodel->Data(MeshVertexonbedEnum)[io_index])){
    101104                                        for(k=1;k<=2;k++) this->FreezeDof(k);
    102105                                }
     
    114117        /*Diagnostic Hutter*/
    115118        if (analysis_type==DiagnosticHutterAnalysisEnum){
    116                 if (!iomodel->Data(FlowequationVertexEquationEnum)) _error2_("iomodel->vertices_type is NULL");
     119                _assert_(iomodel->Data(FlowequationVertexEquationEnum));
    117120                /*Constrain all nodes that are not Hutter*/
    118121                if (reCast<int>(iomodel->Data(FlowequationVertexEquationEnum)[io_index])!=HutterApproximationEnum){
     
    230233                return indexing.sdoflist[dofindex];
    231234        }
    232         else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     235        else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    233236
    234237}
     
    302305                        else for(i=0;i<this->indexing.ssize;i++) outdoflist[i]=indexing.sdoflist[i];
    303306                }
    304                 else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     307                else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    305308        }
    306309}
     
    342345                        }
    343346                }
    344                 else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     347                else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    345348        }
    346349        else{
     
    411414                        }
    412415                }
    413                 else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     416                else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    414417        }
    415418}
     
    597600                else if (setenum==FsetEnum) numdofs=this->indexing.fsize;
    598601                else if (setenum==SsetEnum) numdofs=this->indexing.ssize;
    599                 else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     602                else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    600603        }
    601604        else{
     
    627630                        else numdofs=this->indexing.ssize;
    628631                }
    629                 else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     632                else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    630633        }
    631634        return numdofs;
     
    834837                }
    835838        }
    836         else _error2_("VecMerge can only merge from the s or f-set onto the g-set!");
     839        else _error_("VecMerge can only merge from the s or f-set onto the g-set!");
    837840
    838841        /*Free ressources:*/
     
    880883                }
    881884        }
    882         else _error2_("VecReduce can only merge from the s or f-set onto the g-set!");
     885        else _error_("VecReduce can only merge from the s or f-set onto the g-set!");
    883886
    884887        /*Free ressources:*/
     
    927930                dofcount+=this->indexing.ssize;
    928931        }
    929         else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     932        else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    930933
    931934
     
    956959                for(i=0;i<this->indexing.ssize;i++) indexing.sdoflist[i]+=dofcount;
    957960        }
    958         else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     961        else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    959962}
    960963/*}}}*/
     
    972975        else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++)  *(truedofs+ncols*sid+j)=indexing.fdoflist[j];
    973976        else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++)  *(truedofs+ncols*sid+j)=indexing.sdoflist[j];
    974         else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     977        else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    975978
    976979}
     
    991994        else if(setenum==FsetEnum)for(j=0;j<this->indexing.fsize;j++) indexing.fdoflist[j]=*(alltruedofs+ncols*sid+j);
    992995        else if(setenum==SsetEnum)for(j=0;j<this->indexing.ssize;j++) indexing.sdoflist[j]=*(alltruedofs+ncols*sid+j);
    993         else _error2_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
     996        else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    994997
    995998}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Node.h

    r12832 r13101  
    4545                int   MyRank();
    4646                int   ObjectEnum();
    47                 Object* copy(){_error2_("Not implemented yet (similar to Elements)");};
     47                Object* copy(){_error_("Not implemented yet (similar to Elements)");};
    4848                /*}}}*/
    4949                /*Update virtual functions definitions: {{{*/
     
    5959                void  InputUpdateFromConstant(int constant, int name);
    6060                void  InputUpdateFromConstant(bool constant, int name);
    61                 void  InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
    62                 void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("Not implemented yet!");}
     61                void  InputUpdateFromSolution(IssmDouble* solution){_error_("Not implemented yet!");}
     62                void  InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("Not implemented yet!");}
    6363                /*}}}*/
    6464                /*Node numerical routines {{{*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/Option.h

    r12832 r13101  
    3131                virtual void  DeepEcho();
    3232                virtual void  DeepEcho(char* indent);
    33                 int   Id(){_error2_("Not implemented yet");};
    34                 int   MyRank(){_error2_("Not implemented yet");};
     33                int   Id(){_error_("Not implemented yet");};
     34                int   MyRank(){_error_("Not implemented yet");};
    3535                int   ObjectEnum(){return OptionEnum;};
    36                 Object* copy(){_error2_("Not implemented yet");};
     36                Object* copy(){_error_("Not implemented yet");};
    3737                /*}}}*/
    3838
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionCell.h

    r12832 r13101  
    2828                void  DeepEcho();
    2929                void  DeepEcho(char* indent);
    30                 int   Id(){_error2_("Not implemented yet");};
    31                 int   MyRank(){_error2_("Not implemented yet");};
     30                int   Id(){_error_("Not implemented yet");};
     31                int   MyRank(){_error_("Not implemented yet");};
    3232                int   ObjectEnum(){return OptionCellEnum;};
    33                 Object* copy(){_error2_("Not implemented yet");};
     33                Object* copy(){_error_("Not implemented yet");};
    3434                /*}}}*/
    3535
     
    3939                int   NDims();
    4040                int*  Size();
    41                 void  Get(int* pvalue){_error2_("An OptionCell object cannot return a int");};
    42                 void  Get(IssmDouble* pvalue){_error2_("An OptionCell object cannot return a IssmDouble");};
    43                 void  Get(bool* pvalue){  _error2_("An OptionCell object cannot return a bool");};
    44                 void  Get(char** pvalue){ _error2_("An OptionCell object cannot return a string");};
    45                 void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionCell object cannot return a string vec");};
    46                 void  Get(IssmDouble** pvalue,int *pnumel){ _error2_("An OptionCell object cannot return a IssmDouble vec");};
     41                void  Get(int* pvalue){_error_("An OptionCell object cannot return a int");};
     42                void  Get(IssmDouble* pvalue){_error_("An OptionCell object cannot return a IssmDouble");};
     43                void  Get(bool* pvalue){  _error_("An OptionCell object cannot return a bool");};
     44                void  Get(char** pvalue){ _error_("An OptionCell object cannot return a string");};
     45                void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionCell object cannot return a string vec");};
     46                void  Get(IssmDouble** pvalue,int *pnumel){ _error_("An OptionCell object cannot return a IssmDouble vec");};
    4747                void  Get(Options** pvalue);
    48                 void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionCell object cannot return an Options DataSet vec");};
     48                void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionCell object cannot return an Options DataSet vec");};
    4949
    5050};
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionChar.cpp

    r12832 r13101  
    153153        /*We should first check that the size is at least one*/
    154154        if(this->NumEl()<=0){
    155                 _error2_("option \"" << this->name << "\" is empty and cannot return a string vector");
     155                _error_("option \"" << this->name << "\" is empty and cannot return a string vector");
    156156        }
    157157
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionChar.h

    r12832 r13101  
    2828                void  DeepEcho();
    2929                void  DeepEcho(char* indent);
    30                 int   Id(){_error2_("Not implemented yet");};
    31                 int   MyRank(){_error2_("Not implemented yet");};
     30                int   Id(){_error_("Not implemented yet");};
     31                int   MyRank(){_error_("Not implemented yet");};
    3232                int   ObjectEnum(){return OptionCharEnum;};
    33                 Object* copy(){_error2_("Not implemented yet");};
     33                Object* copy(){_error_("Not implemented yet");};
    3434                /*}}}*/
    3535
     
    3939                int   NDims();
    4040                int*  Size();
    41                 void  Get(int* pvalue){_error2_("An OptionChar object cannot return a int");};
    42                 void  Get(IssmDouble* pvalue){_error2_("An OptionChar object cannot return a IssmDouble");};
    43                 void  Get(bool* pvalue){  _error2_("An OptionChar object cannot return a bool");};
     41                void  Get(int* pvalue){_error_("An OptionChar object cannot return a int");};
     42                void  Get(IssmDouble* pvalue){_error_("An OptionChar object cannot return a IssmDouble");};
     43                void  Get(bool* pvalue){  _error_("An OptionChar object cannot return a bool");};
    4444                void  Get(char** pvalue);
    4545                void  Get(char*** ppvalue,int *pnumel);
    46                 void  Get(IssmDouble** pvalue,int *pnumel){ _error2_("An OptionChar object cannot return a IssmDouble vec");};
    47                 void  Get(Options** pvalue){ _error2_("An OptionChar object cannot return an Options DataSet");};
    48                 void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionChar object cannot return an Options DataSet vec");};
     46                void  Get(IssmDouble** pvalue,int *pnumel){ _error_("An OptionChar object cannot return a IssmDouble vec");};
     47                void  Get(Options** pvalue){ _error_("An OptionChar object cannot return an Options DataSet");};
     48                void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionChar object cannot return an Options DataSet vec");};
    4949
    5050};
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionDouble.cpp

    r12832 r13101  
    125125        /*We should first check that the size is one*/
    126126        if(this->NumEl()!=1){
    127                 _error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single int");
     127                _error_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single int");
    128128        }
    129129
     
    137137        /*We should first check that the size is one*/
    138138        if(this->NumEl()!=1){
    139                 _error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single IssmDouble");
     139                _error_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single IssmDouble");
    140140        }
    141141
     
    149149        /*We should first check that the size is at least one*/
    150150        if(this->NumEl()<=0){
    151                 _error2_("option \"" << this->name << "\" is empty and cannot return a IssmDouble vector");
     151                _error_("option \"" << this->name << "\" is empty and cannot return a IssmDouble vector");
    152152        }
    153153
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionDouble.h

    r12832 r13101  
    2828                void  DeepEcho();
    2929                void  DeepEcho(char* indent);
    30                 int   Id(){_error2_("Not implemented yet");};
    31                 int   MyRank(){_error2_("Not implemented yet");};
     30                int   Id(){_error_("Not implemented yet");};
     31                int   MyRank(){_error_("Not implemented yet");};
    3232                int   ObjectEnum(){return OptionDoubleEnum;};
    33                 Object* copy(){_error2_("Not implemented yet");};
     33                Object* copy(){_error_("Not implemented yet");};
    3434                /*}}}*/
    3535
     
    4141                void  Get(int* pvalue);
    4242                void  Get(IssmDouble* pvalue);
    43                 void  Get(bool* pvalue){  _error2_("An OptionDouble object cannot return a bool");};
    44                 void  Get(char** pvalue){ _error2_("An OptionDouble object cannot return a string");};
    45                 void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionDouble object cannot return a string vec");};
     43                void  Get(bool* pvalue){  _error_("An OptionDouble object cannot return a bool");};
     44                void  Get(char** pvalue){ _error_("An OptionDouble object cannot return a string");};
     45                void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionDouble object cannot return a string vec");};
    4646                void  Get(IssmDouble** pvalue,int* pnumel);
    47                 void  Get(Options** pvalue){ _error2_("An OptionDouble object cannot return an Options DataSet");};
    48                 void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionDouble object cannot return an Options DataSet vec");};
     47                void  Get(Options** pvalue){ _error_("An OptionDouble object cannot return an Options DataSet");};
     48                void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionDouble object cannot return an Options DataSet vec");};
    4949
    5050};
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionLogical.cpp

    r12832 r13101  
    125125        /*We should first check that the size is one*/
    126126        if(this->NumEl()!=1){
    127                 _error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single bool");
     127                _error_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single bool");
    128128        }
    129129
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionLogical.h

    r12832 r13101  
    2828                void  DeepEcho();
    2929                void  DeepEcho(char* indent);
    30                 int   Id(){_error2_("Not implemented yet");};
    31                 int   MyRank(){_error2_("Not implemented yet");};
     30                int   Id(){_error_("Not implemented yet");};
     31                int   MyRank(){_error_("Not implemented yet");};
    3232                int   ObjectEnum(){return OptionLogicalEnum;};
    33                 Object* copy(){_error2_("Not implemented yet");};
     33                Object* copy(){_error_("Not implemented yet");};
    3434                /*}}}*/
    3535
     
    3939                int   NDims();
    4040                int*  Size();
    41                 void  Get(int* pvalue){_error2_("An OptionLogical object cannot return a int");};
    42                 void  Get(IssmDouble* pvalue){_error2_("An OptionLogical object cannot return a IssmDouble");};
     41                void  Get(int* pvalue){_error_("An OptionLogical object cannot return a int");};
     42                void  Get(IssmDouble* pvalue){_error_("An OptionLogical object cannot return a IssmDouble");};
    4343                void  Get(bool* pvalue);
    44                 void  Get(char** pvalue){ _error2_("An OptionLogical object cannot return a string");};
    45                 void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionLogical object cannot return a string vec");};
    46                 void  Get(IssmDouble** pvalue,int *pnumel){ _error2_("An OptionLogical object cannot return a IssmDouble vec");};
    47                 void  Get(Options** pvalue){ _error2_("An OptionLogical object cannot return an Options DataSet");};
    48                 void  Get(Options*** ppvalue,int *pnumel){ _error2_("An OptionLogical object cannot return an Options DataSet vec");};
     44                void  Get(char** pvalue){ _error_("An OptionLogical object cannot return a string");};
     45                void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionLogical object cannot return a string vec");};
     46                void  Get(IssmDouble** pvalue,int *pnumel){ _error_("An OptionLogical object cannot return a IssmDouble vec");};
     47                void  Get(Options** pvalue){ _error_("An OptionLogical object cannot return an Options DataSet");};
     48                void  Get(Options*** ppvalue,int *pnumel){ _error_("An OptionLogical object cannot return an Options DataSet vec");};
    4949
    5050};
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionStruct.cpp

    r12832 r13101  
    132132        /*We should first check that the size is one*/
    133133        if(this->NumEl()!=1){
    134                 _error2_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single options dataset");
     134                _error_("option \"" << this->name << "\" has " << this->NumEl() << " elements and cannot return a single options dataset");
    135135        }
    136136
     
    144144        /*We should first check that the size is at least one*/
    145145        if(this->NumEl()<=0){
    146                 _error2_("option \"" << this->name << "\" is empty and cannot return an options dataset vector");
     146                _error_("option \"" << this->name << "\" is empty and cannot return an options dataset vector");
    147147        }
    148148
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionStruct.h

    r12832 r13101  
    2828                void  DeepEcho();
    2929                void  DeepEcho(char* indent);
    30                 int   Id(){_error2_("Not implemented yet");};
    31                 int   MyRank(){_error2_("Not implemented yet");};
     30                int   Id(){_error_("Not implemented yet");};
     31                int   MyRank(){_error_("Not implemented yet");};
    3232                int   ObjectEnum(){return OptionStructEnum;};
    33                 Object* copy(){_error2_("Not implemented yet");};
     33                Object* copy(){_error_("Not implemented yet");};
    3434                /*}}}*/
    3535
     
    3939                int   NDims();
    4040                int*  Size();
    41                 void  Get(int* pvalue){_error2_("An OptionStruct object cannot return a int");};
    42                 void  Get(IssmDouble* pvalue){_error2_("An OptionStruct object cannot return a IssmDouble");};
    43                 void  Get(bool* pvalue){  _error2_("An OptionStruct object cannot return a bool");};
    44                 void  Get(char** pvalue){ _error2_("An OptionStruct object cannot return a string");};
    45                 void  Get(char*** ppvalue,int *pnumel){ _error2_("An OptionStruct object cannot return a string vec");};
    46                 void  Get(IssmDouble** pvalue,int *pnumel){ _error2_("An OptionStruct object cannot return a IssmDouble vec");};
     41                void  Get(int* pvalue){_error_("An OptionStruct object cannot return a int");};
     42                void  Get(IssmDouble* pvalue){_error_("An OptionStruct object cannot return a IssmDouble");};
     43                void  Get(bool* pvalue){  _error_("An OptionStruct object cannot return a bool");};
     44                void  Get(char** pvalue){ _error_("An OptionStruct object cannot return a string");};
     45                void  Get(char*** ppvalue,int *pnumel){ _error_("An OptionStruct object cannot return a string vec");};
     46                void  Get(IssmDouble** pvalue,int *pnumel){ _error_("An OptionStruct object cannot return a IssmDouble vec");};
    4747                void  Get(Options** pvalue);
    4848                void  Get(Options*** ppvalue,int *pnumel);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Options/OptionUtilities.cpp

    r12832 r13101  
    2727        /*check for index too large  */
    2828        for (i=0;i<ndims;i++) aprod*=size[i];
    29         if (index >= aprod) _error2_("Index " << index << " exceeds number of elements " << aprod << ".");
     29        if (index >= aprod) _error_("Index " << index << " exceeds number of elements " << aprod << ".");
    3030
    3131        /*calculate the dimensions (being careful of integer division)  */
     
    4646        /*check for any dimension too large  */
    4747        for (i=0;i<ndims;i++){
    48                 if (dims[i] >= size[i]) _error2_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
     48                if (dims[i] >= size[i]) _error_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
    4949        }
    5050
     
    6565        /*check for index too large  */
    6666        for (i=0; i<ndims; i++) aprod*=size[i];
    67         if (index >= aprod) _error2_("Index " << index << " exceeds number of elements " << aprod << ".");
     67        if (index >= aprod) _error_("Index " << index << " exceeds number of elements " << aprod << ".");
    6868
    6969        /*calculate the dimensions (being careful of integer division)  */
     
    8484        /*check for any dimension too large  */
    8585        for (i=0; i<ndims; i++){
    86                 if (dims[i] >= size[i]) _error2_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
     86                if (dims[i] >= size[i]) _error_("Dimension " << i << " of " << dims[i] << " exceeds size of " << size[i] << ".");
    8787        }
    8888
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/BoolParam.h

    r12832 r13101  
    4343                int   InstanceEnum(){return enum_type;}
    4444                void  GetParameterValue(bool* pbool){*pbool=value;}
    45                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return an integer");}
    46                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return an array of integers");}
    47                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return an array of integers");}
    48                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
    49                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    50                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a string");}
    51                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a string array");}
    52                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
    53                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
    54                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a matrix array");}
    55                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a Vec");}
    56                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a Mat");}
    57                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot return a FILE");}
     45                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return an integer");}
     46                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return an array of integers");}
     47                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return an array of integers");}
     48                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a IssmDouble");}
     49                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     50                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a string");}
     51                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a string array");}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a IssmDouble array");}
     54                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a matrix array");}
     55                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a Vec");}
     56                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a Mat");}
     57                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << ") cannot return a FILE");}
    5858
    5959                void  SetValue(bool boolean){this->value=boolean;}
    60                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold an int");}
    61                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold an IssmPDouble");}
    62                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a string");}
    63                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a string array");}
    64                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
    65                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
    66                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a int array");}
    67                 void  SetValue(int* pintarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a int array");}
    68                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a Vec");}
    69                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a Mat");}
    70                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold a FILE");}
    71                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
     60                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold an int");}
     61                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold an IssmPDouble");}
     62                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a string");}
     63                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a string array");}
     64                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
     65                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
     66                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a int array");}
     67                void  SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a int array");}
     68                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a Vec");}
     69                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a Mat");}
     70                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold a FILE");}
     71                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
    7272                void  UnitConversion(int direction_enum);
    7373               
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/DoubleMatArrayParam.h

    r12832 r13101  
    4545                /*Param vritual function definitions: {{{*/
    4646                int   InstanceEnum(){return enum_type;}
    47                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a bool");}
    48                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return an integer");}
    49                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return an array of integers");}
    50                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return an array of integers");}
    51                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a IssmDouble");}
    52                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    53                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a string");}
    54                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a string array");}
    55                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a IssmDouble array");}
    56                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a IssmDouble array");}
     47                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a bool");}
     48                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << "cannot return an integer");}
     49                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << "cannot return an array of integers");}
     50                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << "cannot return an array of integers");}
     51                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a IssmDouble");}
     52                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     53                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a string");}
     54                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a string array");}
     55                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a IssmDouble array");}
     56                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a IssmDouble array");}
    5757                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims);
    58                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a Vec");}
    59                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a Mat");}
    60                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << "cannot return a FILE");}
     58                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a Vec");}
     59                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a Mat");}
     60                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << "cannot return a FILE");}
    6161
    62                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a boolean");}
    63                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold an integer");}
    64                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a scalar");}
    65                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a string");}
    66                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a string array");}
    67                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a IssmDouble vec array");}
    68                 void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a IssmDouble mat array");}
    69                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a int vec array");}
    70                 void  SetValue(int* intarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a int mat array");}
    71                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a Vec");}
    72                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << "cannot hold a Mat");}
    73                 void  SetValue(FILE* fid){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
     62                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a boolean");}
     63                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold an integer");}
     64                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a scalar");}
     65                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a string");}
     66                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a string array");}
     67                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a IssmDouble vec array");}
     68                void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a IssmDouble mat array");}
     69                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a int vec array");}
     70                void  SetValue(int* intarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a int mat array");}
     71                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a Vec");}
     72                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << "cannot hold a Mat");}
     73                void  SetValue(FILE* fid){_error_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
    7474                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array);
    7575                void  UnitConversion(int direction_enum);
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/DoubleMatParam.cpp

    r12832 r13101  
    109109/*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
    110110void  DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){
    111         _error2_("DoubleMat of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int");
     111        _error_("DoubleMat of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int");
    112112}
    113113/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/DoubleMatParam.h

    r12832 r13101  
    4444                /*Param vritual function definitions: {{{*/
    4545                int   InstanceEnum(){return enum_type;}
    46                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    47                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
    48                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     46                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     47                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
     48                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    4949                void  GetParameterValue(int** pintarray,int* pM,int* pN);
    50                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    51                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    52                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    53                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    54                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     50                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     51                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     52                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     53                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    5555                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN);
    56                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    57                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    58                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    59                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
     56                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     57                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     58                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     59                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
    6060
    61                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
    62                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
    63                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
    64                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    65                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    66                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");}
     61                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
     62                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
     63                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
     64                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     65                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");}
    6767                void  SetValue(IssmDouble* IssmDoublearray,int M,int N);
    68                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int vec array");}
    69                 void  SetValue(int* intarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int mat array");};
    70                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    71                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    72                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    73                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     68                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int vec array");}
     69                void  SetValue(int* intarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int mat array");};
     70                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     71                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     72                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     73                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7474                void  UnitConversion(int direction_enum);
    7575
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/DoubleParam.cpp

    r12832 r13101  
    8282/*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{*/
    8383void DoubleParam::GetParameterValue(int* pinteger){
    84         _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
     84        _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an integer");
    8585}
    8686/*}}}*/
    8787/*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{*/
    8888void DoubleParam::GetParameterValue(bool* pbool){
    89         _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an bool");
     89        _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an bool");
    9090}
    9191/*}}}*/
    9292/*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{*/
    9393void DoubleParam::GetParameterValue(int** pintarray,int* pM){
    94         _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
     94        _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
    9595}
    9696/*}}}*/
    9797/*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{*/
    9898void DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){
    99         _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
     99        _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of integers");
    100100}
    101101/*}}}*/
    102102/*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){{{*/
    103103void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){
    104         _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
     104        _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
    105105}
    106106/*}}}*/
    107107/*FUNCTION DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){{{*/
    108108void DoubleParam::GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){
    109         _error2_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
     109        _error_("Double param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of IssmDouble");
    110110}
    111111/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/DoubleParam.h

    r12832 r13101  
    4848                void  GetParameterValue(int** pintarray,int* pM,int* pN);
    4949                void  GetParameterValue(IssmDouble* pIssmDouble){*pIssmDouble=value;}
    50                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    51                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    52                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     50                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     51                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     52                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    5353                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM);
    5454                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN);
    55                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    56                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    57                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    58                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     56                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     57                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     58                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
    5959
    6060                void  SetValue(bool boolean){this->value=(IssmDouble)boolean;}
    6161                void  SetValue(int integer){this->value=(IssmDouble)integer;}
    6262                void  SetValue(IssmDouble scalar){this->value=(IssmDouble)scalar;}
    63                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    64                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    65                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    66                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    67                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    68                 void  SetValue(int* pintarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    69                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    70                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    71                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    72                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     63                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     64                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     65                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     66                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     67                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     68                void  SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     69                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     70                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     71                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7373                void  UnitConversion(int direction_enum);
    7474
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/DoubleVecParam.cpp

    r12832 r13101  
    124124/*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{*/
    125125void  DoubleVecParam::GetParameterValue(int** pintarray,int* pM){
    126         _error2_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int");
     126        _error_("DoubleVec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return an array of int");
    127127}
    128128/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/DoubleVecParam.h

    r12832 r13101  
    4343                /*Param virtual functions definitions: {{{*/
    4444                int   InstanceEnum(){return enum_type;}
    45                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    46                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
     45                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     46                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
    4747                void  GetParameterValue(int** pintarray,int* pM);
    48                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");};
    49                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    50                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    51                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    52                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     48                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");};
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     50                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     51                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     52                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    5353                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM);
    5454                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN);
    55                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    56                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    57                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    58                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     56                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     57                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     58                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
    5959
    60                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
    61                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
    62                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
    63                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    64                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     60                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
     61                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
     62                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
     63                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     64                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    6565                void  SetValue(IssmDouble* IssmDoublearray,int M);
    66                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble mat array");}
    67                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int mat array");};
    68                 void  SetValue(int* pintarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int mat array");}
    69                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    70                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    71                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    72                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     66                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble mat array");}
     67                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int mat array");};
     68                void  SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int mat array");}
     69                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     70                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     71                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7373                void  UnitConversion(int direction_enum);
    7474               
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/FileParam.h

    r12832 r13101  
    4242                /*Param vritual function definitions: {{{*/
    4343                int   InstanceEnum(){return enum_type;}
    44                 void  GetParameterValue(bool* pbool){  _error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    45                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    46                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    47                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    48                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    49                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    50                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    51                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    52                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    53                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    54                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
    55                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    56                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     44                void  GetParameterValue(bool* pbool){  _error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     45                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     46                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     47                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     48                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     49                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     50                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     51                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     52                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     54                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
     55                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     56                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    5757                void  GetParameterValue(FILE** pfid){*pfid=value;};
    5858
    59                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    60                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    61                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    62                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    63                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    64                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    65                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    66                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    67                 void  SetValue(int* pintarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    68                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    69                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    70                 void  SetValue(FILE* fid){_error2_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
    71                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
     59                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     60                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     61                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     62                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     63                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     64                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     65                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     66                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     67                void  SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     68                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     69                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     70                void  SetValue(FILE* fid){_error_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
     71                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("File param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an array of matrices");}
    7272                void  UnitConversion(int direction_enum);
    7373
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/IntMatParam.h

    r12832 r13101  
    4444                /*Param vritual function definitions: {{{*/
    4545                int   InstanceEnum(){return enum_type;}
    46                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    47                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
    48                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     46                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     47                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
     48                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    4949                void  GetParameterValue(int** pintarray,int* pM,int* pN);
    50                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    51                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    52                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    53                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    54                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    55                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");};
    56                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    57                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    58                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    59                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
     50                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     51                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     52                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     53                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     55                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");};
     56                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     57                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     58                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     59                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
    6060
    61                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
    62                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
    63                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
    64                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    65                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    66                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");}
    67                 void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");};
    68                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int vec array");};
     61                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
     62                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
     63                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
     64                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     65                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");}
     67                void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");};
     68                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int vec array");};
    6969                void  SetValue(int* intarray,int M,int N);
    70                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    71                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    72                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    73                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     70                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     71                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     72                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     73                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7474                void  UnitConversion(int direction_enum);
    7575
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/IntParam.h

    r12832 r13101  
    4343                /*Param vritual function definitions: {{{*/
    4444                int   InstanceEnum(){return enum_type;}
    45                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     45                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    4646                void  GetParameterValue(int* pinteger){*pinteger=value;}
    47                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    48                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    49                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    50                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    51                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    52                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    53                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    54                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    55                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    56                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    57                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    58                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
     47                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     48                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     50                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     51                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     52                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     56                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     57                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     58                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
    5959
    60                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a bool");}
     60                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a bool");}
    6161                void  SetValue(int integer){this->value=integer;}
    62                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an int array");}
    63                 void  SetValue(int* intarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an int array");}
    64                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an IssmDouble");}
    65                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    66                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    67                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    68                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    69                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    70                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    71                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    72                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     62                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an int array");}
     63                void  SetValue(int* intarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an int array");}
     64                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an IssmDouble");}
     65                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     66                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     67                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     68                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     69                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     70                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     71                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7373                void  UnitConversion(int direction_enum);
    7474
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/IntVecParam.h

    r12832 r13101  
    4444                /*Param virtual functions definitions: {{{*/
    4545                int   InstanceEnum(){return enum_type;}
    46                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    47                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
     46                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     47                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
    4848                void  GetParameterValue(int** pintarray,int* pM);
    49                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix");}
    50                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    51                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    52                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    53                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    54                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array (maybe in serial?)");}
    55                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    56                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    57                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    58                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    59                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
     49                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix");}
     50                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     51                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     52                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     53                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array (maybe in serial?)");}
     55                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     56                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     57                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     58                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     59                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
    6060
    61                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
    62                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
    63                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
    64                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    65                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    66                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble mat array");}
    67                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble mat array");}
     61                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
     62                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
     63                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
     64                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     65                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble mat array");}
     67                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble mat array");}
    6868                void  SetValue(int* intarray,int M);
    69                 void  SetValue(int* pintarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int mat array");}
    70                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    71                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    72                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    73                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     69                void  SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int mat array");}
     70                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     71                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     72                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     73                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7474                void  UnitConversion(int direction_enum);
    7575               
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/MatrixParam.h

    r12832 r13101  
    4343                /*Param vritual function definitions: {{{*/
    4444                int   InstanceEnum(){return enum_type;}
    45                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    46                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
    47                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    48                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    49                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    50                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    51                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    52                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    53                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    54                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    55                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    56                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a vec");}
     45                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     46                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
     47                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     48                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     50                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     51                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     52                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     56                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a vec");}
    5757                void  GetParameterValue(Matrix** poutput);
    58                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
     58                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
    5959
    60                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
    61                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
    62                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
    63                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    64                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    65                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    66                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    67                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    68                 void  SetValue(int* pintarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    69                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     60                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
     61                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
     62                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
     63                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     64                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     65                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     66                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     67                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     68                void  SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     69                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    7070                void  SetValue(Matrix* mat);
    71                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    72                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     71                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7373                void  UnitConversion(int direction_enum);
    7474
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/StringArrayParam.h

    r12832 r13101  
    4545                /*Param vritual function definitions: {{{*/
    4646                int   InstanceEnum(){return enum_type;}
    47                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    48                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
    49                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    50                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    51                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    52                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    53                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     47                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     48                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
     49                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     50                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     51                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     52                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     53                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    5454                void  GetParameterValue(char*** pstringarray,int* pM);
    55                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    56                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    57                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Vec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
    58                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    59                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    60                 void  GetParameterValue(FILE** pfid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
     55                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     56                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     57                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Vec param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a matrix array");}
     58                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     59                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     60                void  GetParameterValue(FILE** pfid){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a FILE");}
    6161
    62                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
    63                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
    64                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
    65                 void  SetValue(char* string){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
     62                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
     63                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
     64                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
     65                void  SetValue(char* string){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string");}
    6666                void  SetValue(char** stringarray,int M);
    67                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    68                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    69                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    70                 void  SetValue(int* pintarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    71                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    72                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    73                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    74                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     67                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     68                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     69                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     70                void  SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     71                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     72                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     73                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     74                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7575                void  UnitConversion(int direction_enum);
    7676
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/StringParam.h

    r12832 r13101  
    4343                /*Param vritual function definitions: {{{*/
    4444                int   InstanceEnum(){return enum_type;}
    45                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    46                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
    47                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    48                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    49                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    50                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     45                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     46                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
     47                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     48                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     50                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    5151                void  GetParameterValue(char** pstring);
    52                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    53                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    54                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    55                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    56                 void  GetParameterValue(Vector** pvec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
    57                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    58                 void  GetParameterValue(FILE** pfid){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
     52                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     56                void  GetParameterValue(Vector** pvec){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Vec");}
     57                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     58                void  GetParameterValue(FILE** pfid){_error_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
    5959
    60                 void  SetValue(bool boolean){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
    61                 void  SetValue(int integer){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
    62                 void  SetValue(IssmDouble scalar){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
     60                void  SetValue(bool boolean){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a boolean");}
     61                void  SetValue(int integer){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an integer");}
     62                void  SetValue(IssmDouble scalar){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a scalar");}
    6363                void  SetValue(char* string);
    64                 void  SetValue(char** stringarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
    65                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    66                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    67                 void  SetValue(int* intarray,int M){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    68                 void  SetValue(int* pintarray,int M,int N){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
    69                 void  SetValue(Vector* vec){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
    70                 void  SetValue(Matrix* mat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
    71                 void  SetValue(FILE* fid){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
    72                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     64                void  SetValue(char** stringarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a string array");}
     65                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     66                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     67                void  SetValue(int* intarray,int M){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     68                void  SetValue(int* pintarray,int M,int N){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a int array");}
     69                void  SetValue(Vector* vec){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Vec");}
     70                void  SetValue(Matrix* mat){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a Mat");}
     71                void  SetValue(FILE* fid){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold a FILE");}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7373                void  UnitConversion(int direction_enum);
    7474
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/TransientParam.cpp

    r12832 r13101  
    9999void  TransientParam::GetParameterValue(IssmDouble* pdouble,IssmDouble time){
    100100
    101         double output;
     101        IssmDouble output;
    102102        bool   found;
    103103
     
    136136                }
    137137        }
    138         if(!found)_error2_("did not find time interval on which to interpolate values");
     138        if(!found)_error_("did not find time interval on which to interpolate values");
    139139        *pdouble=output;
    140140}
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/TransientParam.h

    r12832 r13101  
    4444                /*Param vritual function definitions: {{{*/
    4545                int   InstanceEnum(){return enum_type;}
    46                 void  GetParameterValue(bool* pbool){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a bool");}
    47                 void  GetParameterValue(int* pinteger){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return an integer");}
    48                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return an array of integers");}
    49                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a array of integers");}
    50                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     46                void  GetParameterValue(bool* pbool){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a bool");}
     47                void  GetParameterValue(int* pinteger){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return an integer");}
     48                void  GetParameterValue(int** pintarray,int* pM){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return an array of integers");}
     49                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a array of integers");}
     50                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    5151                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time);
    52                 void  GetParameterValue(char** pstring){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a string");}
    53                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a string array");}
    54                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    55                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    56                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a matrix array");}
    57                 void  GetParameterValue(Vector** pvec){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a Vec");}
    58                 void  GetParameterValue(Matrix** pmat){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a Mat");}
    59                 void  GetParameterValue(FILE** pfid){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot return a FILE");}
     52                void  GetParameterValue(char** pstring){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a string");}
     53                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a string array");}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     55                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM,int* pN){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     56                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a matrix array");}
     57                void  GetParameterValue(Vector** pvec){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a Vec");}
     58                void  GetParameterValue(Matrix** pmat){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a Mat");}
     59                void  GetParameterValue(FILE** pfid){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot return a FILE");}
    6060
    61                 void  SetValue(bool boolean){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a boolean");}
    62                 void  SetValue(int integer){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold an integer");}
    63                 void  SetValue(IssmDouble scalar){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a scalar");}
    64                 void  SetValue(char* string){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a string");}
    65                 void  SetValue(char** stringarray,int M){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a string array");}
    66                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");}
    67                 void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
    68                 void  SetValue(int* intarray,int M){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a int vec array");}
    69                 void  SetValue(int* intarray,int M,int N){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a int mat array");};
    70                 void  SetValue(Vector* vec){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a Vec");}
    71                 void  SetValue(Matrix* mat){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a Mat");}
    72                 void  SetValue(FILE* fid){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a FILE");}
    73                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Parameter " <<EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     61                void  SetValue(bool boolean){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a boolean");}
     62                void  SetValue(int integer){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold an integer");}
     63                void  SetValue(IssmDouble scalar){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a scalar");}
     64                void  SetValue(char* string){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a string");}
     65                void  SetValue(char** stringarray,int M){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a string array");}
     66                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a IssmDouble vec array");}
     67                void  SetValue(IssmDouble* IssmDoublearray,int M,int N){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a IssmDouble array");}
     68                void  SetValue(int* intarray,int M){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a int vec array");}
     69                void  SetValue(int* intarray,int M,int N){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a int mat array");};
     70                void  SetValue(Vector* vec){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a Vec");}
     71                void  SetValue(Matrix* mat){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a Mat");}
     72                void  SetValue(FILE* fid){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold a FILE");}
     73                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Parameter " <<EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7474                void  UnitConversion(int direction_enum);
    7575
  • issm/branches/trunk-jpl-damage/src/c/classes/objects/Params/VectorParam.h

    r12832 r13101  
    4343                /*Param vritual function definitions: {{{*/
    4444                int   InstanceEnum(){return enum_type;}
    45                 void  GetParameterValue(bool* pbool){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
    46                 void  GetParameterValue(int* pinteger){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
    47                 void  GetParameterValue(int** pintarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    48                 void  GetParameterValue(int** pintarray,int* pM,int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
    49                 void  GetParameterValue(IssmDouble* pIssmDouble){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
    50                 void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
    51                 void  GetParameterValue(char** pstring){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
    52                 void  GetParameterValue(char*** pstringarray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
    53                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    54                 void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
    55                 void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
    56                 void  GetParameterValue(Matrix** pmat){_error2_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
     45                void  GetParameterValue(bool* pbool){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a bool");}
     46                void  GetParameterValue(int* pinteger){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an integer");}
     47                void  GetParameterValue(int** pintarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     48                void  GetParameterValue(int** pintarray,int* pM,int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return an array of integers");}
     49                void  GetParameterValue(IssmDouble* pIssmDouble){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble");}
     50                void  GetParameterValue(IssmDouble* pdouble,IssmDouble time){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble for a given time");}
     51                void  GetParameterValue(char** pstring){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string");}
     52                void  GetParameterValue(char*** pstringarray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a string array");}
     53                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     54                void  GetParameterValue(IssmDouble** pIssmDoublearray,int* pM, int* pN){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a IssmDouble array");}
     55                void  GetParameterValue(IssmDouble*** parray, int* pM,int** pmdims, int** pndims){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a matrix array");}
     56                void  GetParameterValue(Matrix** pmat){_error_("Param "<< EnumToStringx(enum_type) << " cannot return a Mat");}
    5757                void  GetParameterValue(Vector** poutput);
    58                 void  GetParameterValue(FILE** pfid){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
     58                void  GetParameterValue(FILE** pfid){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
    5959
    60                 void  SetValue(bool boolean){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
    61                 void  SetValue(int integer){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
    62                 void  SetValue(IssmDouble scalar){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
    63                 void  SetValue(char* string){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
    64                 void  SetValue(char** stringarray,int M){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
    65                 void  SetValue(IssmDouble* IssmDoublearray,int M){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
    66                 void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
    67                 void  SetValue(int* intarray,int M){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
    68                 void  SetValue(int* pintarray,int M,int N){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
     60                void  SetValue(bool boolean){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a boolean");}
     61                void  SetValue(int integer){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an integer");}
     62                void  SetValue(IssmDouble scalar){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a scalar");}
     63                void  SetValue(char* string){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
     64                void  SetValue(char** stringarray,int M){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
     65                void  SetValue(IssmDouble* IssmDoublearray,int M){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
     66                void  SetValue(IssmDouble* pIssmDoublearray,int M,int N){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a IssmDouble array");}
     67                void  SetValue(int* intarray,int M){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
     68                void  SetValue(int* pintarray,int M,int N){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a int array");}
    6969                void  SetValue(Vector* vec);
    70                 void  SetValue(Matrix* mat){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
    71                 void  SetValue(FILE* fid){_error2_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
    72                 void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error2_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
     70                void  SetValue(Matrix* mat){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a Mat");}
     71                void  SetValue(FILE* fid){_error_("Vector of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a FILE");}
     72                void  SetValue(IssmDouble** array, int M, int* mdim_array, int* ndim_array){_error_("Param "<< EnumToStringx(enum_type) << " cannot hold an array of matrices");}
    7373                void  UnitConversion(int direction_enum);
    7474
  • issm/branches/trunk-jpl-damage/src/c/include/macros.h

    r12878 r13101  
    2323#define _printf_(flag,...) do{if(flag) PrintfFunction(__VA_ARGS__);}while(0)
    2424/*}}}*/
    25 /* _error_ {{{*/
    26 /*Error exception macro*/
    27 #ifdef _INTEL_WIN_
    28 #define _error_(...)\
    29   throw ErrorException(exprintf(__VA_ARGS__))
    30 #else
    31 #define _error_(...)\
    32   throw ErrorException(__FILE__,__func__,__LINE__,exprintf(__VA_ARGS__))
    33 #endif
    34 /*}}}*/
    3525/* _error2_ {{{*/
    3626/*new Error exception macro*/
    3727#ifdef _INTEL_WIN_
    38 #define _error2_(StreamArgs)\
     28#define _error_(StreamArgs)\
    3929   do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
    4030   aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
    4131   throw ErrorException(aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}while(0)
    4232#else
    43 #define _error2_(StreamArgs)\
     33#define _error_(StreamArgs)\
    4434        do{std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
    4535   aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
     
    7565#ifdef _ISSM_DEBUG_
    7666#define _assert_(statement)\
    77   if (!(statement)) _error_("Assertion \"%s\" failed, please report bug to %s",#statement,PACKAGE_BUGREPORT)
     67  if (!(statement)) _error_("Assertion \""<<#statement<<"\" failed, please report bug to "<<PACKAGE_BUGREPORT)
    7868#else
    7969#define _assert_(ignore)\
  • issm/branches/trunk-jpl-damage/src/c/io/Disk/pfclose.cpp

    r12878 r13101  
    1818        extern int my_rank;
    1919        _assert_(fid);
    20         if(fclose(fid)!=0)_error2_("could not close file " << filename);
     20        if(fclose(fid)!=0)_error_("could not close file " << filename);
    2121}
  • issm/branches/trunk-jpl-damage/src/c/io/Disk/pfopen.cpp

    r12878 r13101  
    2020        /*Open handle to data on disk: */
    2121        fid=fopen(filename,format);
    22         if(fid==NULL) _error2_("could not open file " << filename << " for binary reading or writing");
     22        if(fid==NULL) _error_("could not open file " << filename << " for binary reading or writing");
    2323
    2424        return fid;
  • issm/branches/trunk-jpl-damage/src/c/matlab/io/CheckNumMatlabArguments.cpp

    r12878 r13101  
    2222                /* special case: */
    2323                function();
    24                 _error2_("usage: see above");
     24                _error_("usage: see above");
    2525        }
    2626        else if (nlhs!=NLHS || nrhs!=NRHS ) {
    2727                function();
    28                 _error2_("usage error.");
     28                _error_("usage error.");
    2929        }
    3030        return 1;
  • issm/branches/trunk-jpl-damage/src/c/matlab/io/FetchMatlabData.cpp

    r12878 r13101  
    4848        else{
    4949                /*This is an error: we don't have the correct input!: */
    50                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     50                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    5151        }
    5252                       
     
    8989        else{
    9090                /*This is an error: we don't have the correct input!: */
    91                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     91                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    9292        }
    9393                       
     
    134134        else{
    135135                /*This is an error: we don't have the correct input!: */
    136                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     136                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    137137        }
    138138
     
    176176        else{
    177177                /*This is an error: we don't have the correct input!: */
    178                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     178                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    179179        }
    180180
     
    238238        else{
    239239                /*This is an error: we don't have the correct input!: */
    240                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     240                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    241241        }
    242242                       
     
    269269        else{
    270270                /*This is an error: we don't have the correct input!: */
    271                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     271                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    272272        }
    273273
     
    301301        else{
    302302                /*This is an error: we don't have the correct input!: */
    303                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     303                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    304304        }
    305305
     
    333333        else{
    334334                /*This is an error: we don't have the correct input!: */
    335                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     335                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    336336        }
    337337
     
    365365        else{
    366366                /*This is an error: we don't have the correct input!: */
    367                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     367                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    368368        }
    369369
     
    381381        /*Ok, the string should be coming directly from the matlab workspace: */
    382382        if (!mxIsClass(dataref,"char")){
    383                 _error2_("input data_type is not a string!");
     383                _error_("input data_type is not a string!");
    384384        }
    385385        else{
     
    416416        else{
    417417                /*This is an error: we don't have the correct input!: */
    418                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     418                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    419419        }
    420420                       
     
    434434
    435435        if (!mxIsClass(dataref,"double")){
    436                 _error2_("input data_type is not a double!");
     436                _error_("input data_type is not a double!");
    437437        }
    438438        else{
     
    451451
    452452        if (!mxIsClass(dataref,"double")){
    453                 _error2_("input data_type is not a scalar!");
     453                _error_("input data_type is not a scalar!");
    454454        }
    455455        else{
     
    468468
    469469        if (mxIsClass(dataref,"logical")){
    470                 if(mxGetM(dataref)!=1) _error2_("input data is not of size 1x1");
    471                 if(mxGetN(dataref)!=1) _error2_("input data is not of size 1x1");
     470                if(mxGetM(dataref)!=1) _error_("input data is not of size 1x1");
     471                if(mxGetN(dataref)!=1) _error_("input data is not of size 1x1");
    472472                mxbool_ptr=mxGetLogicals(dataref);
    473473        }
    474474        else{
    475                 _error2_("input data_type is not a bool!");
     475                _error_("input data_type is not a bool!");
    476476        }
    477477
     
    495495        else{
    496496                /*This is an error: we don't have the correct input!: */
    497                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     497                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    498498        }
    499499
     
    519519        else{
    520520                /*This is an error: we don't have the correct input!: */
    521                 _error2_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
     521                _error_("Input parameter of class " << mxGetClassName(dataref) << " not supported yet");
    522522        }
    523523
     
    620620        /*Fetch all options*/
    621621        for (int i=istart; i<nrhs; i=i+2){
    622                 if (!mxIsClass(pdataref[i],"char")) _error2_("Argument " << i+1 << " must be name of option");
     622                if (!mxIsClass(pdataref[i],"char")) _error_("Argument " << i+1 << " must be name of option");
    623623
    624624                FetchData(&name,pdataref[i]);
    625                 if(i+1 == nrhs) _error2_("Argument " << i+2 << " must exist and be value of option \"" << name << "\".");
     625                if(i+1 == nrhs) _error_("Argument " << i+2 << " must exist and be value of option \"" << name << "\".");
    626626
    627627                option=(Option*)OptionParse(name,&pdataref[i+1]);
  • issm/branches/trunk-jpl-damage/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp

    r12878 r13101  
    119119        }
    120120        else{
    121                 _error2_("Matlab matrix type Not implemented yet");
     121                _error_("Matlab matrix type Not implemented yet");
    122122        }
    123123
  • issm/branches/trunk-jpl-damage/src/c/matlab/io/MatlabVectorToDoubleVector.cpp

    r12878 r13101  
    4646               
    4747                /*Check that input is actualy a vector*/
    48                 if (cols!=1) _error2_("input vector of size " << rows << "x" << cols << " should have only one column");
     48                if (cols!=1) _error_("input vector of size " << rows << "x" << cols << " should have only one column");
    4949
    5050                nz=(int)((double)nnz/(double)rows);
     
    7777
    7878                /*Check that input is actualy a vector*/
    79                 if (cols!=1) _error2_("input vector of size " << rows << "x" << cols << " should have only one column");
     79                if (cols!=1) _error_("input vector of size " << rows << "x" << cols << " should have only one column");
    8080
    8181                /*allocate and memcpy*/
  • issm/branches/trunk-jpl-damage/src/c/matlab/io/OptionParse.cpp

    r12878 r13101  
    2727        /*check and parse the value  */
    2828        if (!mxIsClass(prhs[0],"double")){
    29                 _error2_("Value of option \"" << odouble->name  << "\" must be class \"double\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
     29                _error_("Value of option \"" << odouble->name  << "\" must be class \"double\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    3030        }
    3131        FetchData(&odouble->values,&odouble->numel,&odouble->ndims,&odouble->size,prhs[0]);
     
    4545        /*check and parse the value  */
    4646        if (!mxIsClass(prhs[0],"logical")){
    47                 _error2_("Value of option \"" << ological->name  << "\" must be class \"logical\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
     47                _error_("Value of option \"" << ological->name  << "\" must be class \"logical\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    4848        }
    4949        FetchData(&ological->values,&ological->numel,&ological->ndims,&ological->size,prhs[0]);
     
    6363        /*check and parse the value  */
    6464        if (!mxIsClass(prhs[0],"char")){
    65                 _error2_("Value of option \"" << ochar->name  << "\" must be class \"char\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
     65                _error_("Value of option \"" << ochar->name  << "\" must be class \"char\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    6666        }
    6767        FetchData(&ochar->values,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
     
    8787        /*check and parse the value  */
    8888        if (!mxIsClass(prhs[0],"struct")){
    89                 _error2_("Value of option \"" << ostruct->name  << "\" must be class \"struct\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
     89                _error_("Value of option \"" << ostruct->name  << "\" must be class \"struct\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    9090        }
    9191        ostruct->numel=mxGetNumberOfElements(prhs[0]);
     
    133133        /*check and parse the value  */
    134134        if (!mxIsClass(prhs[0],"cell")){
    135                 _error2_("Value of option \"" << ocell->name  << "\" must be class \"cell\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
     135                _error_("Value of option \"" << ocell->name  << "\" must be class \"cell\", not class \"" << mxGetClassName(prhs[0]) <<"\".");
    136136        }
    137137
     
    181181                        mxDestroyArray(lhs[0]);
    182182                }
    183                 else _error2_("Second argument value of option \""<< name <<"\" is of unrecognized class \""<< mxGetClassName(prhs[0]) <<"\".");
     183                else _error_("Second argument value of option \""<< name <<"\" is of unrecognized class \""<< mxGetClassName(prhs[0]) <<"\".");
    184184        }
    185185
  • issm/branches/trunk-jpl-damage/src/c/modules/ControlInputScaleGradientx/ControlInputScaleGradientx.cpp

    r12878 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void ControlInputScaleGradientx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* norm_list,int step){
     11void ControlInputScaleGradientx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* norm_list,int step){
    1212
    1313        /*Intermediaries*/
    1414        int     i,j,num_controls;
    1515        int    *control_type = NULL;
    16         double *scalar_list = NULL;
    17         double  scalar;
     16        IssmDouble *scalar_list = NULL;
     17        IssmDouble  scalar;
    1818
    1919
     
    3838        /*Clean up and return*/
    3939        xDelete<int>(control_type);
    40         xDelete<double>(scalar_list);
     40        xDelete<IssmDouble>(scalar_list);
    4141}
  • issm/branches/trunk-jpl-damage/src/c/modules/ControlInputScaleGradientx/ControlInputScaleGradientx.h

    r12878 r13101  
    88#include "../../Container/Container.h"
    99
    10 void    ControlInputScaleGradientx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,double* norm_list,int step);
     10void    ControlInputScaleGradientx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,IssmDouble* norm_list,int step);
    1111
    1212#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/ControlInputSetGradientx/ControlInputSetGradientx.cpp

    r12878 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void ControlInputSetGradientx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* gradient){
     11void ControlInputSetGradientx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* gradient){
    1212
    1313        /*Intermediaries*/
     
    3333
    3434        /*Serialize gradient*/
    35         double* serial_gradient=NULL;
     35        IssmDouble* serial_gradient=NULL;
    3636        serial_gradient=gradient->ToMPISerial();
    3737
     
    3939
    4040        /*Clean up and return*/
    41         xDelete<double>(serial_gradient);
     41        xDelete<IssmDouble>(serial_gradient);
    4242}
  • issm/branches/trunk-jpl-damage/src/c/modules/CostFunctionx/CostFunctionx.cpp

    r12878 r13101  
    1111#include "../Responsex/Responsex.h"
    1212
    13 void CostFunctionx(double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters){
     13void CostFunctionx(IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters){
    1414
    1515        /*Intermediary*/
    1616        int      i;
    1717        int      num_responses;
    18         double   S;
    1918        Element *element       = NULL;
    2019        int     *responses     = NULL;
    2120
    2221        /*output: */
    23         double J,Jplus;
     22        IssmDouble J,Jplus;
    2423       
    2524        /*Recover parameters*/
  • issm/branches/trunk-jpl-damage/src/c/modules/CostFunctionx/CostFunctionx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void CostFunctionx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters);
     12void CostFunctionx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/DakotaResponsesx/DakotaResponsesx.cpp

    r12878 r13101  
    8686                }
    8787                else if (flag==NodalEnum){
    88                         _error2_("nodal response functions not supported yet!");
     88                        _error_("nodal response functions not supported yet!");
    8989
    9090                        /*increment response_pointer :*/
     
    104104                        }
    105105                }
    106                 else _error2_("flag type " << flag << " not supported yet for response analysis");
     106                else _error_("flag type " << flag << " not supported yet for response analysis");
    107107        }
    108108
  • issm/branches/trunk-jpl-damage/src/c/modules/Dakotax/DescriptorIndex.cpp

    r12878 r13101  
    2323        /*retrieve first token, separated by underscore: */
    2424        pch = strtok (descriptor,"_");
    25         if(!pch)_error2_("descriptor " << descriptor << " is not correctly formatted!");
     25        if(!pch)_error_("descriptor " << descriptor << " is not correctly formatted!");
    2626
    2727        if (strncmp(pch,"scaled",6)==0){
    2828                /*we have a scaled variable. recover the root: */
    2929                pch = strtok (NULL, "_");
    30                 if(!pch)_error2_("scaled descriptor " << descriptor << " is not correctly formatted!");
     30                if(!pch)_error_("scaled descriptor " << descriptor << " is not correctly formatted!");
    3131                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    3232
     
    4444                /*we have an indexed variable. recover the root: */
    4545                pch = strtok (NULL, "_");
    46                 if(!pch)_error2_("indexed descriptor " << descriptor << " is not correctly formatted!");
     46                if(!pch)_error_("indexed descriptor " << descriptor << " is not correctly formatted!");
    4747                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    4848                /*now recover  the index: */
    4949                pch = strtok (NULL, "_");
    50                 if(!pch)_error2_("indexed descriptor " << descriptor << " is not correctly formatted!");
     50                if(!pch)_error_("indexed descriptor " << descriptor << " is not correctly formatted!");
    5151                sscanf(pch,"%i",pindex);
    5252                return IndexedEnum;
     
    5555                /*we have an indexed variable. recover the root: */
    5656                pch = strtok (NULL, "_");
    57                 if(!pch)_error2_("nodal descriptor " << descriptor << " is not correctly formatted!");
     57                if(!pch)_error_("nodal descriptor " << descriptor << " is not correctly formatted!");
    5858                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    5959                /*now recover  the index: */
    6060                pch = strtok (NULL, "_");
    61                 if(!pch)_error2_("nodal descriptor " << descriptor << " is not correctly formatted!");
     61                if(!pch)_error_("nodal descriptor " << descriptor << " is not correctly formatted!");
    6262                sscanf(pch,"%i",pindex);
    6363                return NodalEnum;
  • issm/branches/trunk-jpl-damage/src/c/modules/Dakotax/SpawnCoreParallel.cpp

    r12878 r13101  
    7272        if(control_analysis)solutioncore=&control_core;
    7373        #else
    74         _error2_("ISSM was not compiled with control capabilities, exiting!");
     74        _error_("ISSM was not compiled with control capabilities, exiting!");
    7575        #endif
    7676
  • issm/branches/trunk-jpl-damage/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void DragCoefficientAbsGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
     12void DragCoefficientAbsGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void DragCoefficientAbsGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void DragCoefficientAbsGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/ElementResponsex/ElementResponsex.cpp

    r12878 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void ElementResponsex( double* presponse, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,int response_enum,bool process_units){
     12void ElementResponsex( IssmDouble* presponse, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,int response_enum,bool process_units){
    1313       
    1414
     
    2020        int cpu_found=-1;
    2121        int index;
    22         double response;
     22        IssmDouble response;
    2323        Element* element=NULL;
    2424
     
    3939        #ifdef _HAVE_MPI_
    4040        MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
    41         if(!sumfound)_error2_("could not find material with id" << index << " to compute ElementResponse");
     41        if(!sumfound)_error_("could not find material with id" << index << " to compute ElementResponse");
    4242        #endif
    4343
  • issm/branches/trunk-jpl-damage/src/c/modules/ElementResponsex/ElementResponsex.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void ElementResponsex( double* presponse, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,int response_enum,bool process_units);
     12void ElementResponsex( IssmDouble* presponse, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,int response_enum,bool process_units);
    1313
    1414#endif  /* _ELEMENTRESPONSEX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/EnumToStringx/EnumToStringx.cpp

    r12946 r13101  
    1717        switch(en){
    1818
    19                 case AutodiffForwardEnum : return "AutodiffForward";
    2019                case AutodiffIsautodiffEnum : return "AutodiffIsautodiff";
    21                 case AutodiffReverseEnum : return "AutodiffReverse";
    2220                case BalancethicknessSpcthicknessEnum : return "BalancethicknessSpcthickness";
    2321                case BalancethicknessStabilizationEnum : return "BalancethicknessStabilization";
     
    5553                case FlowequationElementEquationEnum : return "FlowequationElementEquation";
    5654                case FlowequationIshutterEnum : return "FlowequationIshutter";
     55                case FlowequationIsl1l2Enum : return "FlowequationIsl1l2";
    5756                case FlowequationIsmacayealpattynEnum : return "FlowequationIsmacayealpattyn";
    5857                case FlowequationIsstokesEnum : return "FlowequationIsstokes";
     
    239238                case TransientSolutionEnum : return "TransientSolution";
    240239                case ApproximationEnum : return "Approximation";
     240                case NoneApproximationEnum : return "NoneApproximation";
    241241                case HutterApproximationEnum : return "HutterApproximation";
    242242                case MacAyealApproximationEnum : return "MacAyealApproximation";
    243243                case MacAyealPattynApproximationEnum : return "MacAyealPattynApproximation";
    244244                case MacAyealStokesApproximationEnum : return "MacAyealStokesApproximation";
    245                 case NoneApproximationEnum : return "NoneApproximation";
     245                case L1L2ApproximationEnum : return "L1L2Approximation";
    246246                case PattynApproximationEnum : return "PattynApproximation";
    247247                case PattynStokesApproximationEnum : return "PattynStokesApproximation";
     
    283283                case NumericalfluxEnum : return "Numericalflux";
    284284                case ParamEnum : return "Param";
     285                case L1L2IceFrontEnum : return "L1L2IceFront";
    285286                case PattynIceFrontEnum : return "PattynIceFront";
    286287                case PengridEnum : return "Pengrid";
     
    376377                case EnthalpyPicardEnum : return "EnthalpyPicard";
    377378                case ThicknessAbsGradientEnum : return "ThicknessAbsGradient";
     379                case ThicknessAlongGradientEnum : return "ThicknessAlongGradient";
     380                case ThicknessAcrossGradientEnum : return "ThicknessAcrossGradient";
    378381                case StepResponsesEnum : return "StepResponses";
    379382                case IntMatParamEnum : return "IntMatParam";
     
    396399                case StressTensoryzEnum : return "StressTensoryz";
    397400                case StressTensorzzEnum : return "StressTensorzz";
    398                 case IceVolumeEnum : return "IceVolume";
    399                 case TotalSmbEnum : return "TotalSmb";
    400                 case ThicknessAlongGradientEnum : return "ThicknessAlongGradient";
    401                 case ThicknessAcrossGradientEnum : return "ThicknessAcrossGradient";
    402401                case P0Enum : return "P0";
    403402                case P1Enum : return "P1";
     
    433432                case MaxVzEnum : return "MaxVz";
    434433                case MaxAbsVzEnum : return "MaxAbsVz";
     434                case IceVolumeEnum : return "IceVolume";
     435                case TotalSmbEnum : return "TotalSmb";
    435436                case RelativeEnum : return "Relative";
    436437                case AbsoluteEnum : return "Absolute";
  • issm/branches/trunk-jpl-damage/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp

    r12878 r13101  
    5555
    5656        if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
    57                 _error2_("Error reading exp file.");
     57                _error_("Error reading exp file.");
    5858        _pprintLine_("Exp2Kmlx -- Reading " << nprof << " exp profiles from file \"" << filexp << "\".");
    5959//      for (i=0; i<nprof; i++)
  • issm/branches/trunk-jpl-damage/src/c/modules/GetSolutionFromInputsx/GetSolutionFromInputsx.cpp

    r12878 r13101  
    2626        /*Get size of vector: */
    2727        gsize=nodes->NumberOfDofs(configuration_type,GsetEnum);
    28         if (gsize==0) _error2_("Allocating a Vec of size 0 as gsize=0 for configuration: " << EnumToStringx(configuration_type));
     28        if (gsize==0) _error_("Allocating a Vec of size 0 as gsize=0 for configuration: " << EnumToStringx(configuration_type));
    2929       
    3030        /*Initialize solution: */
  • issm/branches/trunk-jpl-damage/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.cpp

    r12878 r13101  
    3636}
    3737
    38 void GetVectorFromControlInputsx( double** pvector, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, const char* data){
     38void GetVectorFromControlInputsx( IssmDouble** pvector, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, const char* data){
    3939       
    4040        /*output: */
    41         double* vector=NULL;
     41        IssmDouble* vector=NULL;
    4242       
    4343        /*intermediary: */
  • issm/branches/trunk-jpl-damage/src/c/modules/GetVectorFromControlInputsx/GetVectorFromControlInputsx.h

    r12878 r13101  
    1010/* local prototypes: */
    1111void    GetVectorFromControlInputsx( Vector** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,const char* data="value");
    12 void    GetVectorFromControlInputsx( double** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,const char* data="value");
     12void    GetVectorFromControlInputsx( IssmDouble** pvector, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,const char* data="value");
    1313
    1414#endif  /* _GETVECTORFROMCONTROLINPUTSXX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp

    r12878 r13101  
    3232        }
    3333        else{
    34                 _error2_("vector type: " << EnumToStringx(type) << " not supported yet!");
     34                _error_("vector type: " << EnumToStringx(type) << " not supported yet!");
    3535        }
    3636
  • issm/branches/trunk-jpl-damage/src/c/modules/Gradjx/Gradjx.cpp

    r12878 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void Gradjx(Vector** pgradient,double** pnorm_list, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters){
     12void Gradjx(Vector** pgradient,IssmDouble** pnorm_list, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters){
    1313
    1414        int     i,j,numberofvertices;
    1515        int     num_controls;
    16         double   norm_inf;
    17         double  *norm_list     = NULL;
     16        IssmDouble   norm_inf;
     17        IssmDouble  *norm_list     = NULL;
    1818        int     *control_type  = NULL;
    1919        Vector  *gradient      = NULL;
     
    2727        /*Allocate gradient_list */
    2828        gradient_list = xNew<Vector*>(num_controls);
    29         norm_list = xNew<double>(num_controls);
     29        norm_list = xNew<IssmDouble>(num_controls);
    3030        for(i=0;i<num_controls;i++){
    3131                gradient_list[i]=new Vector(num_controls*numberofvertices);
     
    5454        /*Check that gradient is clean*/
    5555        norm_inf=gradient->Norm(NORM_INF);
    56         if(norm_inf<=0)    _error2_("||∂J/∂α||∞ = 0    gradient norm is zero");
    57         if(xIsNan<IssmDouble>(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
     56        if(norm_inf<=0)    _error_("||∂J/∂α||∞ = 0    gradient norm is zero");
     57        if(xIsNan<IssmDouble>(norm_inf))_error_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
    5858
    5959        /*Clean-up and assign output pointer*/
     
    6262        }
    6363        else{
    64                 xDelete<double>(norm_list);
     64                xDelete<IssmDouble>(norm_list);
    6565        }
    6666        if(pgradient)  *pgradient=gradient;
  • issm/branches/trunk-jpl-damage/src/c/modules/Gradjx/Gradjx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void Gradjx(Vector** pgrad_g,double** pgrad_norm,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters);
     12void Gradjx(Vector** pgrad_g,IssmDouble** pgrad_norm,Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters);
    1313
    1414#endif  /* _GRADJX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp

    r12878 r13101  
    1414
    1515        int      i, migration_style,analysis_type;
    16         double*  vertices_potentially_ungrounding = NULL;
    17         double*  vertices_ungrounding             = NULL;
    18         double*  old_floatingice                  = NULL;
     16        IssmDouble*  vertices_potentially_ungrounding = NULL;
     17        IssmDouble*  vertices_ungrounding             = NULL;
     18        IssmDouble*  old_floatingice                  = NULL;
    1919        Vector*      vec_old_floatingice              = NULL;
    2020        Element* element                          = NULL;
     
    2727
    2828        if(migration_style==NoneEnum) return;
    29         if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error2_(EnumToStringx(migration_style) << " not supported yet!");
     29        if(migration_style!=AgressiveMigrationEnum && migration_style!=SoftMigrationEnum) _error_(EnumToStringx(migration_style) << " not supported yet!");
    3030
    3131        if(migration_style==SoftMigrationEnum){
     
    4949        /*free ressouces: */
    5050        xdelete(&vec_old_floatingice);
    51         xDelete<double>(vertices_potentially_ungrounding);
    52         xDelete<double>(vertices_ungrounding);
    53         xDelete<double>(old_floatingice);
     51        xDelete<IssmDouble>(vertices_potentially_ungrounding);
     52        xDelete<IssmDouble>(vertices_ungrounding);
     53        xDelete<IssmDouble>(old_floatingice);
    5454}
    5555
     
    8282/*%}}}*/
    8383/*FUNCTION PotentialSheetUngrounding {{{*/
    84 double*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){
     84IssmDouble*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){
    8585
    8686        int      i,numberofvertices;
    87         double*  vertices_potentially_ungrounding      = NULL;
     87        IssmDouble*  vertices_potentially_ungrounding      = NULL;
    8888        Vector*      vec_vertices_potentially_ungrounding  = NULL;
    8989        Element* element                               = NULL;
     
    109109/*}}}*/
    110110/*FUNCTION PropagateFloatingiceToGroundedNeighbors {{{*/
    111 double*    PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,double* vertices_potentially_ungrounding){
     111IssmDouble*    PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,IssmDouble* vertices_potentially_ungrounding){
    112112
    113113        int      i,analysis_type;
    114114        int      numberofvertices;
    115115        int      nflipped,local_nflipped;
    116         double*  nodes_on_floatingice                  = NULL;
    117         double*  elements_neighboring_floatingce      = NULL;
     116        IssmDouble*  nodes_on_floatingice                  = NULL;
     117        IssmDouble*  elements_neighboring_floatingce      = NULL;
    118118        Vector*      vec_elements_neighboring_floatingice = NULL;
    119119        Vector*      vec_nodes_on_floatingice              = NULL;
     
    150150                for(i=0;i<elements->Size();i++){
    151151                        element=(Element*)elements->GetObjectByOffset(i);
    152                         if(elements_neighboring_floatingce[element->Sid()]){
     152                        if(reCast<int,IssmDouble>(elements_neighboring_floatingce[element->Sid()])){
    153153                                local_nflipped+=element->UpdatePotentialSheetUngrounding(vertices_potentially_ungrounding,vec_nodes_on_floatingice,nodes_on_floatingice);
    154154                        }
     
    164164
    165165                /*Avoid leaks: */
    166                 xDelete<double>(elements_neighboring_floatingce);
    167                 xDelete<double>(nodes_on_floatingice);
     166                xDelete<IssmDouble>(elements_neighboring_floatingce);
     167                xDelete<IssmDouble>(nodes_on_floatingice);
    168168
    169169                /*Assemble and serialize:*/
     
    174174        /*Free ressources:*/
    175175        xdelete(&vec_nodes_on_floatingice);
    176         xDelete<double>(elements_neighboring_floatingce);
     176        xDelete<IssmDouble>(elements_neighboring_floatingce);
    177177
    178178        return nodes_on_floatingice;
  • issm/branches/trunk-jpl-damage/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.h

    r11708 r13101  
    1515
    1616Vector*        CreateNodesOnFloatingIce(Nodes* nodes,int configuration_type);
    17 double*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters);
    18 double*    PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,double* vertices_potentially_ungrounding);
     17IssmDouble*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters);
     18IssmDouble*    PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,IssmDouble* vertices_potentially_ungrounding);
    1919#endif  /* _GROUNDINGLINEMIGRATIONX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/IceVolumex/IceVolumex.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void IceVolumex(double* pV, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     12void IceVolumex(IssmDouble* pV, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1313
    14         double local_ice_volume = 0;
    15         double total_ice_volume;
     14        IssmDouble local_ice_volume = 0;
     15        IssmDouble total_ice_volume;
    1616
    1717        for(int i=0;i<elements->Size();i++){
  • issm/branches/trunk-jpl-damage/src/c/modules/IceVolumex/IceVolumex.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void IceVolumex(double* pV, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void IceVolumex(IssmDouble* pV, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/InputControlUpdatex/InputControlUpdatex.cpp

    r4967 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void InputControlUpdatex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,double scalar,bool save_parameter){
     11void InputControlUpdatex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters,IssmDouble scalar,bool save_parameter){
    1212
    1313        /*Go through elemnets, and ask to carry out the operation on inputs: */
  • issm/branches/trunk-jpl-damage/src/c/modules/InputControlUpdatex/InputControlUpdatex.h

    r4967 r13101  
    99
    1010/* local prototypes: */
    11 void InputControlUpdatex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters, double scalar,bool save_parameter);
     11void InputControlUpdatex(Elements* elements,Nodes* nodes,Vertices* vertices,Loads* loads,Materials* materials,Parameters* parameters, IssmDouble scalar,bool save_parameter);
    1212
    1313#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/InputUpdateFromDakotax/InputUpdateFromDakotax.cpp

    r12878 r13101  
    9595                }
    9696                else if (strncmp(descriptor,"indexed_",8)==0){
    97                         _error2_("indexed variables not supported yet!");
     97                        _error_("indexed variables not supported yet!");
    9898                }
    9999                else if (strncmp(descriptor,"nodal_",8)==0){
    100                         _error2_("nodal variables not supported yet!");
     100                        _error_("nodal variables not supported yet!");
    101101                }
    102102                else{
  • issm/branches/trunk-jpl-damage/src/c/modules/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp

    r12878 r13101  
    3737        /*Some checks on arguments: */
    3838        if ((M<2) || (N<2) || (nods<=0)){
    39                 _error2_("nothing to be done according to the dimensions of input matrices and vectors.");
     39                _error_("nothing to be done according to the dimensions of input matrices and vectors.");
    4040        }
    4141        if (x_in[1]-x_in[0]<0){
    42                 _error2_("x coordinate vector should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
     42                _error_("x coordinate vector should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
    4343        }
    4444        if (y_in[1]-y_in[0]<0){
    45                 _error2_("y coordinate vector should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
     45                _error_("y coordinate vector should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
    4646        }
    4747
     
    6969        }
    7070        else{
    71                 _error2_("x and y vectors length should be 1 or 0 more than data number of rows.");
     71                _error_("x and y vectors length should be 1 or 0 more than data number of rows.");
    7272        }
    7373
  • issm/branches/trunk-jpl-damage/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp

    r12878 r13101  
    4040        /*some checks*/
    4141        if (nels_data<1 || nods_data<3 || nods_prime==0){
    42                 _error2_("nothing to be done according to the mesh given in input");
     42                _error_("nothing to be done according to the mesh given in input");
    4343        }
    4444
     
    5454        }
    5555        else{
    56                 _error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
     56                _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
    5757        }
    5858
    5959        if((numcontours) && (interpolation_type==2)){
    60                 _error2_("element interpolation_type with contours not supported yet!");
     60                _error_("element interpolation_type with contours not supported yet!");
    6161        }
    6262
  • issm/branches/trunk-jpl-damage/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp

    r12878 r13101  
    3030        /*some checks*/
    3131        if (nels<1 || nods<3 || nlines<1 || ncols<1 || xposting==0 || yposting==0){
    32                 _error2_("nothing to be done according to the mesh given in input");
     32                _error_("nothing to be done according to the mesh given in input");
    3333        }
    3434
     
    4141        }
    4242        else{
    43                 _error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
     43                _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
    4444        }
    4545
  • issm/branches/trunk-jpl-damage/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp

    r12878 r13101  
    3535        /*Checks*/
    3636        if (M_data!=nods_data && M_data!=nels_data){
    37                 _error2_("data provided should have either " << nods_data << " or " << nels_data << " lines (not " << M_data << ")");
     37                _error_("data provided should have either " << nods_data << " or " << nels_data << " lines (not " << M_data << ")");
    3838        }
    3939
     
    138138                        for (j=0;j<N_data;j++){
    139139                                if (it<0 || it>=nels_data){
    140                                         _error2_("Triangle number " << it << " not in [0 " << nels_data << "], report bug to developers");
     140                                        _error_("Triangle number " << it << " not in [0 " << nels_data << "], report bug to developers");
    141141                                }
    142142                                data_interp[i*N_data+j]=data[N_data*it+j];
  • issm/branches/trunk-jpl-damage/src/c/modules/InterpFromMeshToMesh3dx/InterpFromMeshToMesh3dx.cpp

    r12878 r13101  
    2727        /*some checks*/
    2828        if (nels_data<1 || nods_data<6 || nods_prime==0){
    29                 _error2_("nothing to be done according to the mesh given in input");
     29                _error_("nothing to be done according to the mesh given in input");
    3030        }
    3131
     
    4141        }
    4242        else{
    43                 _error2_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
     43                _error_("length of vector data not supported yet. It should be of length (number of nodes) or (number of elements)!");
    4444        }
    4545
  • issm/branches/trunk-jpl-damage/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp

    r12878 r13101  
    3838        fid=iomodel->SetFilePointerToData(&code, &vector_layout,vector_enum);
    3939
    40         if(code!=7)_error2_("expecting a IssmDouble vector for constraints with enum " << EnumToStringx(vector_enum));
    41         if(vector_layout!=1)_error2_("expecting a nodal vector for constraints with enum " << EnumToStringx(vector_enum));
     40        if(code!=7)_error_("expecting a IssmDouble vector for constraints with enum " << EnumToStringx(vector_enum));
     41        if(vector_layout!=1)_error_("expecting a nodal vector for constraints with enum " << EnumToStringx(vector_enum));
    4242
    4343        /*Fetch vector:*/
     
    9999        }
    100100        else{
    101                 _error2_("Size of field " << EnumToStringx(vector_enum) << " not supported");
     101                _error_("Size of field " << EnumToStringx(vector_enum) << " not supported");
    102102        }
    103103
  • issm/branches/trunk-jpl-damage/src/c/modules/KMLMeshWritex/KMLMeshWritex.cpp

    r12878 r13101  
    133133                                        }
    134134                                        else
    135                                                 _error2_("Nodal connectivity table needs more than specified " << mxepg << " columns.\n");
     135                                                _error_("Nodal connectivity table needs more than specified " << mxepg << " columns.\n");
    136136                                }
    137137                                jpt++;
     
    173173
    174174                else
    175                         _error2_("Data matrix has incorrect number of " << mdata << " rows.\n");
     175                        _error_("Data matrix has incorrect number of " << mdata << " rows.\n");
    176176        }
    177177
  • issm/branches/trunk-jpl-damage/src/c/modules/Kml2Expx/Kml2Expx.cpp

    r12878 r13101  
    4444        fidi=fopen(filkml,"r");
    4545        if (!(kobj=KMLFileReadx(fidi)))
    46                 _error2_("Error reading kml file.");
     46                _error_("Error reading kml file.");
    4747        fclose(fidi);
    4848
  • issm/branches/trunk-jpl-damage/src/c/modules/Krigingx/Krigingx.cpp

    r12878 r13101  
    138138        }
    139139        else{
    140                 _error2_("output '" << output << "' not supported yet");
     140                _error_("output '" << output << "' not supported yet");
    141141        }
    142142
     
    305305                else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
    306306                else if(strcmp(model,"power")==0)       variogram = new PowerVariogram(options);
    307                 else _error2_("variogram " << model << " not supported yet (list of supported variogram: gaussian, exponential, spherical and power)");
     307                else _error_("variogram " << model << " not supported yet (list of supported variogram: gaussian, exponential, spherical and power)");
    308308        }
    309309        else variogram = new GaussianVariogram(options);
  • issm/branches/trunk-jpl-damage/src/c/modules/Krigingx/pKrigingx.cpp

    r12878 r13101  
    103103        }
    104104        else{
    105                 _error2_("output '" << output << "' not supported yet");
     105                _error_("output '" << output << "' not supported yet");
    106106        }
    107107
     
    126126                else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
    127127                else if(strcmp(model,"power")==0)       variogram = new PowerVariogram(options);
    128                 else _error2_("variogram " << model << " not supported yet (list of supported variogram: gaussian, exponential, spherical and power)");
     128                else _error_("variogram " << model << " not supported yet (list of supported variogram: gaussian, exponential, spherical and power)");
    129129        }
    130130        else variogram = new GaussianVariogram(options);
  • issm/branches/trunk-jpl-damage/src/c/modules/Ll2xyx/Ll2xyx.cpp

    r12878 r13101  
    5252        double  T,rho,sl,tc,mc;
    5353
    54         if((sgn!=1) && (sgn!=-1)) _error2_("Sign should be either +1 or -1.\n");
     54        if((sgn!=1) && (sgn!=-1)) _error_("Sign should be either +1 or -1.\n");
    5555
    5656        delta = central_meridian;
     
    123123                if(flag) _pprintLine_("Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).");
    124124        }
    125         else _error2_("Sign should be either +1 or -1.\n");
     125        else _error_("Sign should be either +1 or -1.\n");
    126126
    127127        return;
  • issm/branches/trunk-jpl-damage/src/c/modules/MassFluxx/MassFluxx.cpp

    r12878 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void MassFluxx(double* pmass_flux, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,bool process_units){
     12void MassFluxx(IssmDouble* pmass_flux, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,bool process_units){
    1313
    1414        int i,j;
     
    2020       
    2121        /*output: */
    22         double mass_flux=0;
    23         double all_mass_flux=0;
     22        IssmDouble mass_flux=0;
     23        IssmDouble all_mass_flux=0;
    2424
    2525        int  counter;
    2626
    2727        /*all segments: */
    28         double** array=NULL;
     28        IssmDouble** array=NULL;
    2929        int      M;
    3030        int*     mdims_array=NULL;
     
    3232
    3333        /*our segments of interest: */
    34         double*  segments=NULL;
     34        IssmDouble*  segments=NULL;
    3535        int      num_segments;
    3636
     
    4848         * When we find one, use the element to compute the mass flux on the segment: */
    4949        for(i=0;i<num_segments;i++){
    50                 element_id=(int)*(segments+5*i+4);
     50                element_id=reCast<int,IssmDouble>(*(segments+5*i+4));
    5151                for(j=0;j<elements->Size();j++){
    5252                        element=(Element*)elements->GetObjectByOffset(j);
     
    6666        /*Free ressources:*/
    6767        for(j=0;j<M;j++){
    68                 double* matrix=array[j];
    69                 xDelete<double>(matrix);
     68                IssmDouble* matrix=array[j];
     69                xDelete<IssmDouble>(matrix);
    7070        }
    7171        xDelete<int>(mdims_array);
    7272        xDelete<int>(ndims_array);
    73         xDelete<double*>(array);
     73        xDelete<IssmDouble*>(array);
    7474       
    7575        /*Assign output pointers: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MassFluxx/MassFluxx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MassFluxx(double* pmass_flux, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,bool process_units);
     12void MassFluxx(IssmDouble* pmass_flux, Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp

    r12168 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void MaxAbsVxx( double* pmaxabsvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     11void MaxAbsVxx( IssmDouble* pmaxabsvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1212       
    1313        int i;
    14         double maxabsvx;
    15         double node_maxabsvx;
    16         double element_maxabsvx;
     14        IssmDouble maxabsvx;
     15        IssmDouble node_maxabsvx;
     16        IssmDouble element_maxabsvx;
    1717
    1818        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVxx/MaxAbsVxx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MaxAbsVxx( double* pmaxabsvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MaxAbsVxx( IssmDouble* pmaxabsvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MAXABSVXX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp

    r12168 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void MaxAbsVyx( double* pmaxabsvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     11void MaxAbsVyx( IssmDouble* pmaxabsvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1212       
    1313        int i;
    14         double maxabsvy;
    15         double node_maxabsvy;
    16         double element_maxabsvy;
     14        IssmDouble maxabsvy;
     15        IssmDouble node_maxabsvy;
     16        IssmDouble element_maxabsvy;
    1717
    1818
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVyx/MaxAbsVyx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MaxAbsVyx( double* pmaxabsvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MaxAbsVyx( IssmDouble* pmaxabsvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MAXABSVYX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp

    r12168 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void MaxAbsVzx( double* pmaxabsvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     11void MaxAbsVzx( IssmDouble* pmaxabsvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1212       
    1313        int i;
    14         double maxabsvz;
    15         double node_maxabsvz;
    16         double element_maxabsvz;
     14        IssmDouble maxabsvz;
     15        IssmDouble node_maxabsvz;
     16        IssmDouble element_maxabsvz;
    1717
    1818        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVzx/MaxAbsVzx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MaxAbsVzx( double* pmaxabsvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MaxAbsVzx( IssmDouble* pmaxabsvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MAXABSVZX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxVelx/MaxVelx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void MaxVelx( double* pmaxvel, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     12void MaxVelx( IssmDouble* pmaxvel, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1313       
    1414        int i;
    15         double maxvel;
    16         double node_maxvel;
    17         double element_maxvel;
     15        IssmDouble maxvel;
     16        IssmDouble node_maxvel;
     17        IssmDouble element_maxvel;
    1818
    1919        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxVelx/MaxVelx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MaxVelx( double* pmaxvel, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MaxVelx( IssmDouble* pmaxvel, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MAXVELX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxVxx/MaxVxx.cpp

    r12168 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void MaxVxx( double* pmaxvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     11void MaxVxx( IssmDouble* pmaxvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1212       
    1313        int i;
    14         double maxvx;
    15         double node_maxvx;
    16         double element_maxvx;
     14        IssmDouble maxvx;
     15        IssmDouble node_maxvx;
     16        IssmDouble element_maxvx;
    1717
    1818        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxVxx/MaxVxx.h

    r12878 r13101  
    99
    1010/* local prototypes: */
    11 void MaxVxx( double* pmaxvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     11void MaxVxx( IssmDouble* pmaxvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1212
    1313#endif  /* _MAXVXX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxVyx/MaxVyx.cpp

    r12168 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void MaxVyx( double* pmaxvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     11void MaxVyx( IssmDouble* pmaxvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1212
    1313        int i;
    14         double maxvy;
    15         double node_maxvy;
    16         double element_maxvy;
     14        IssmDouble maxvy;
     15        IssmDouble node_maxvy;
     16        IssmDouble element_maxvy;
    1717
    1818        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxVyx/MaxVyx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MaxVyx( double* pmaxvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MaxVyx( IssmDouble* pmaxvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MAXVYX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxVzx/MaxVzx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void MaxVzx( double* pmaxvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     12void MaxVzx( IssmDouble* pmaxvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1313       
    1414        int i;
    15         double maxvz;
    16         double node_maxvz;
    17         double element_maxvz;
     15        IssmDouble maxvz;
     16        IssmDouble node_maxvz;
     17        IssmDouble element_maxvz;
    1818
    1919        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MaxVzx/MaxVzx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MaxVzx( double* pmaxvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MaxVzx( IssmDouble* pmaxvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MAXVZX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MeshPartitionx/MeshPartitionx.cpp

    r12878 r13101  
    5151                        for (i=0;i<numberofnodes;i++)    npart[i]=0;
    5252                }
    53                 else _error2_("At least one processor is required");
     53                else _error_("At least one processor is required");
    5454        }
    5555        else{
     
    7878                        for (i=0;i<numberofnodes2d;i++)    npart2d[i]=0;
    7979                }
    80                 else _error2_("At least one processor is required");
     80                else _error_("At least one processor is required");
    8181
    8282                /*Extrude epart2d to epart, using numlayers: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp

    r12878 r13101  
    3838        if(    (edge1==IntersectEnum) && (edge2==IntersectEnum) && (edge3==IntersectEnum)   ){
    3939                /*This case is impossible: */
    40                 _error2_("error: a line cannot go through 3 different vertices!");
     40                _error_("error: a line cannot go through 3 different vertices!");
    4141        }
    4242        else if(    ((edge1==IntersectEnum) && (edge2==IntersectEnum)) || ((edge2==IntersectEnum) && (edge3==IntersectEnum)) || ((edge3==IntersectEnum) && (edge1==IntersectEnum))   ){
  • issm/branches/trunk-jpl-damage/src/c/modules/MinVelx/MinVelx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void MinVelx( double* pminvel, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     12void MinVelx( IssmDouble* pminvel, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1313       
    1414        int i;
    15         double minvel;
    16         double node_minvel;
    17         double element_minvel;
     15        IssmDouble minvel;
     16        IssmDouble node_minvel;
     17        IssmDouble element_minvel;
    1818
    1919        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MinVelx/MinVelx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MinVelx( double* pminvel, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MinVelx( IssmDouble* pminvel, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MINVELX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MinVxx/MinVxx.cpp

    r12168 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void MinVxx( double* pminvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     11void MinVxx( IssmDouble* pminvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1212       
    1313        int i;
    14         double minvx;
    15         double node_minvx;
    16         double element_minvx;
     14        IssmDouble minvx;
     15        IssmDouble node_minvx;
     16        IssmDouble element_minvx;
    1717
    1818        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MinVxx/MinVxx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MinVxx( double* pminvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MinVxx( IssmDouble* pminvx, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MINVX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MinVyx/MinVyx.cpp

    r12168 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void MinVyx( double* pminvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     11void MinVyx( IssmDouble* pminvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1212       
    1313        int i;
    14         double minvy;
    15         double node_minvy;
    16         double element_minvy;
     14        IssmDouble minvy;
     15        IssmDouble node_minvy;
     16        IssmDouble element_minvy;
    1717
    1818        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MinVyx/MinVyx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MinVyx( double* pminvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MinVyx( IssmDouble* pminvy, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MINVYX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/MinVzx/MinVzx.cpp

    r12168 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void MinVzx( double* pminvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     11void MinVzx( IssmDouble* pminvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1212       
    1313        int i;
    14         double minvz;
    15         double node_minvz;
    16         double element_minvz;
     14        IssmDouble minvz;
     15        IssmDouble node_minvz;
     16        IssmDouble element_minvz;
    1717
    1818        /*Go through elements, and request velocity: */
  • issm/branches/trunk-jpl-damage/src/c/modules/MinVzx/MinVzx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void MinVzx( double* pminvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void MinVzx( IssmDouble* pminvz, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif  /* _MINVZX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp

    r12878 r13101  
    4242
    4343                        /*Get left and right elements*/
    44                         element=(int)iomodel->Data(MeshEdgesEnum)[4*i+2]-1; //edges are [node1 node2 elem1 elem2]
     44                        element=reCast<int,IssmDouble>(iomodel->Data(MeshEdgesEnum)[4*i+2])-1; //edges are [node1 node2 elem1 elem2]
    4545
    4646                        /*Now, if this element is not in the partition, pass: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp

    r12878 r13101  
    4646
    4747        /*Check in 3d*/
    48         if(stabilization==3 && dim==3) _error2_("DG 3d not implemented yet");
     48        if(stabilization==3 && dim==3) _error_("DG 3d not implemented yet");
    4949
    5050        /*First fetch data: */
     
    7272
    7373                                        //Get index of the vertex on which the current node is located
    74                                         vertex_id=(int)*(iomodel->Data(MeshElementsEnum)+3*i+j); //(Matlab indexing)
     74                                        vertex_id=reCast<int,IssmDouble>(*(iomodel->Data(MeshElementsEnum)+3*i+j)); //(Matlab indexing)
    7575                                        io_index=vertex_id-1;                      //(C indexing)
    7676                                        _assert_(vertex_id>0 && vertex_id<=numberofvertices);
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp

    r12878 r13101  
    2121        int         num_cm_responses;
    2222        int        *control_type     = NULL;
    23         double     *cm_responses     = NULL;
    24         double     *cm_jump          = NULL;
    25         double     *optscal          = NULL;
    26         double     *maxiter          = NULL;
     23        IssmDouble     *cm_responses     = NULL;
     24        IssmDouble     *cm_jump          = NULL;
     25        IssmDouble     *optscal          = NULL;
     26        IssmDouble     *maxiter          = NULL;
    2727
    2828        /*Get parameters: */
     
    6464
    6565                xDelete<int>(control_type);
    66                 xDelete<double>(cm_responses);
    67                 xDelete<double>(cm_jump);
    68                 xDelete<double>(optscal);
    69                 xDelete<double>(maxiter);
     66                xDelete<IssmDouble>(cm_responses);
     67                xDelete<IssmDouble>(cm_jump);
     68                xDelete<IssmDouble>(optscal);
     69                xDelete<IssmDouble>(maxiter);
    7070        }
    7171
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp

    r12878 r13101  
    4242        iomodel->FetchData(4,InversionControlParametersEnum,InversionCostFunctionsCoefficientsEnum,InversionMinParametersEnum,InversionMaxParametersEnum);
    4343        for(i=0;i<num_control_type;i++){
    44                 switch((int)iomodel->Data(InversionControlParametersEnum)[i]){
     44                switch(reCast<int,IssmDouble>(iomodel->Data(InversionControlParametersEnum)[i])){
    4545                        case BalancethicknessThickeningRateEnum: iomodel->FetchData(1,BalancethicknessThickeningRateEnum); break;
    4646                        case VxEnum:   iomodel->FetchData(1,VxEnum); break;
     
    4949                        case MaterialsRheologyBbarEnum:    iomodel->FetchData(1,MaterialsRheologyBEnum); break;
    5050                        case MaterialsRheologyZbarEnum:    iomodel->FetchData(1,MaterialsRheologyZEnum); break;
    51                         default: _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(InversionControlParametersEnum)[i]));
     51                        default: _error_("Control " << EnumToStringx(reCast<int,IssmDouble>(iomodel->Data(InversionControlParametersEnum)[i])) << " not implemented yet");
    5252                }
    5353        }
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/CreateDataSets.cpp

    r12878 r13101  
    124124
    125125                default:
    126                         _error2_("analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!");
     126                        _error_("analysis_type: " << EnumToStringx(analysis_type) << " not supported yet!");
    127127        }
    128128
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r12878 r13101  
    3636        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIshutterEnum));
    3737        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsmacayealpattynEnum));
     38        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsl1l2Enum));
    3839        parameters->AddObject(iomodel->CopyConstantObject(FlowequationIsstokesEnum));
    3940        parameters->AddObject(iomodel->CopyConstantObject(SettingsOutputFrequencyEnum));
     
    8586        parameters->AddObject(iomodel->CopyConstantObject(MaterialsRheologyLawEnum));
    8687        parameters->AddObject(iomodel->CopyConstantObject(AutodiffIsautodiffEnum));
    87         parameters->AddObject(iomodel->CopyConstantObject(AutodiffForwardEnum));
    88         parameters->AddObject(iomodel->CopyConstantObject(AutodiffReverseEnum));
    8988        parameters->AddObject(iomodel->CopyConstantObject(QmuIsdakotaEnum));
    9089        parameters->AddObject(iomodel->CopyConstantObject(InversionIscontrolEnum));
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp

    r12878 r13101  
    153153                        /*Fetch the mass flux segments necessary to compute the mass fluxes.  Build a DoubleMatArrayParam object out of them: */
    154154                        iomodel->FetchData(&array,&mdims_array,&ndims_array,&qmu_mass_flux_num_profiles,QmuMassFluxSegmentsEnum);
    155                         if(qmu_mass_flux_num_profiles==0)_error2_("qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
     155                        if(qmu_mass_flux_num_profiles==0)_error_("qmu_mass_flux_num_profiles is 0, when MassFlux computations were requested!");
    156156
    157157                        /*Go through segments, and extract those that belong to this cpu: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r12878 r13101  
    1616        int     i,j;
    1717        int     count;
    18         double  yts;
    19         double  g;
    20         double  rho_ice;
    21         double  stokesreconditioning;
    22         bool    isstokes,ismacayealpattyn;
     18        IssmDouble  yts;
     19        IssmDouble  g;
     20        IssmDouble  rho_ice;
     21        IssmDouble  stokesreconditioning;
     22        bool    isstokes,isl1l2,ismacayealpattyn;
    2323   bool    spcpresent=false;
    2424        int Mx,Nx;
    2525        int My,Ny;
    2626        int Mz,Nz;
    27         double *spcvx          = NULL;
    28         double *spcvy          = NULL;
    29         double *spcvz          = NULL;
    30         double *nodeonmacayeal = NULL;
    31         double *nodeonpattyn   = NULL;
    32         double *nodeonstokes   = NULL;
    33         double *nodeonbed      = NULL;
    34         double *nodeonicesheet = NULL;
    35         double *vertices_type  = NULL;
    36         double *surface        = NULL;
    37         double *z              = NULL;
    38         double *timesx=NULL;
    39         double *timesy=NULL;
    40         double *timesz=NULL;
    41    double* values=NULL;
     27        IssmDouble *spcvx          = NULL;
     28        IssmDouble *spcvy          = NULL;
     29        IssmDouble *spcvz          = NULL;
     30        IssmDouble *nodeonmacayeal = NULL;
     31        IssmDouble *nodeonpattyn   = NULL;
     32        IssmDouble *nodeonstokes   = NULL;
     33        IssmDouble *nodeonbed      = NULL;
     34        IssmDouble *nodeonicesheet = NULL;
     35        IssmDouble *vertices_type  = NULL;
     36        IssmDouble *surface        = NULL;
     37        IssmDouble *z              = NULL;
     38        IssmDouble *timesx=NULL;
     39        IssmDouble *timesy=NULL;
     40        IssmDouble *timesz=NULL;
     41   IssmDouble* values=NULL;
    4242
    4343        /*Output*/
     
    5656        iomodel->Constant(&stokesreconditioning,DiagnosticStokesreconditioningEnum);
    5757        iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
     58        iomodel->Constant(&isl1l2,FlowequationIsl1l2Enum);
    5859        iomodel->Constant(&ismacayealpattyn,FlowequationIsmacayealpattynEnum);
    5960
     
    6566       
    6667        /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    67         if (!ismacayealpattyn & !isstokes){
     68        if(!ismacayealpattyn & !isstokes & !isl1l2){
    6869                *pconstraints=constraints;
    6970                return;
     
    8788
    8889        /*figure out times: */
    89         timesx=xNew<double>(Nx);
     90        timesx=xNew<IssmDouble>(Nx);
    9091        for(j=0;j<Nx;j++){
    9192                timesx[j]=spcvx[(Mx-1)*Nx+j];
     
    9495        UnitConversion(timesx,Nx,ExtToIuEnum,TimeEnum);
    9596        /*figure out times: */
    96         timesy=xNew<double>(Ny);
     97        timesy=xNew<IssmDouble>(Ny);
    9798        for(j=0;j<Ny;j++){
    9899                timesy[j]=spcvy[(My-1)*Ny+j];
     
    101102        UnitConversion(timesy,Ny,ExtToIuEnum,TimeEnum);
    102103        /*figure out times: */
    103         timesz=xNew<double>(Nz);
     104        timesz=xNew<IssmDouble>(Nz);
    104105        for(j=0;j<Nz;j++){
    105106                timesz[j]=spcvz[(Mz-1)*Nz+j];
     
    113114
    114115                        /*Start with adding spcs of coupling: zero at the border macayeal/pattyn for the appropriate dofs*/
    115                         if ((int)vertices_type[i]==MacAyealPattynApproximationEnum){
     116                        if (reCast<int,IssmDouble>(vertices_type[i]==MacAyealPattynApproximationEnum)){
    116117                                /*If grionmacayeal, spc pattyn dofs: 3 & 4*/
    117                                         if ((int)nodeonpattyn[i]){
     118                                        if (reCast<int,IssmDouble>(nodeonpattyn[i])){
    118119                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    119120                                                count++;
     
    130131
    131132                                        }
    132                                         else if ((int)nodeonmacayeal[i]){
     133                                        else if (reCast<int,IssmDouble>(nodeonmacayeal[i])){
    133134                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    134135                                                count++;
     
    145146
    146147                                        }
    147                                         else _error2_("if vertices_type is MacAyealPattyn, you shoud have nodeonpattyn or nodeonmacayeal");
     148                                        else _error_("if vertices_type is MacAyealPattyn, you shoud have nodeonpattyn or nodeonmacayeal");
    148149                        }
    149150                        /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
    150                         else if ((int)vertices_type[i]==PattynStokesApproximationEnum){
     151                        else if (reCast<int,IssmDouble>(vertices_type[i])==PattynStokesApproximationEnum){
    151152                                /*If grion,pattyn spc stokes dofs: 3 4 & 5*/
    152                                         if ((int)nodeonpattyn[i]){
     153                                        if (reCast<int,IssmDouble>(nodeonpattyn[i])){
    153154                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    154155                                                count++;
     
    167168
    168169                                        }
    169                                         else if ((int)nodeonstokes[i]){ //spc pattyn nodes: 1 & 2
     170                                        else if (reCast<int,IssmDouble>(nodeonstokes[i])){ //spc pattyn nodes: 1 & 2
    170171                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    171172                                                count++;
     
    185186                                                }
    186187                                        }
    187                                         else _error2_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");
     188                                        else _error_("if vertices_type is PattynStokes, you shoud have nodeonpattyn or nodeonstokes");
    188189                        }
    189190                        /*Also add spcs of coupling: zero at the border pattyn/stokes for the appropriate dofs*/
    190                         else if ((int)vertices_type[i]==MacAyealStokesApproximationEnum){
     191                        else if (reCast<int,IssmDouble>(vertices_type[i])==MacAyealStokesApproximationEnum){
    191192                                /*If grion,pattyn spc stokes dofs: 3 4 & 5*/
    192                                         if ((int)nodeonmacayeal[i]){
     193                                        if (reCast<int,IssmDouble>(nodeonmacayeal[i])){
    193194                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    194195                                                count++;
     
    207208
    208209                                        }
    209                                         else if ((int)nodeonstokes[i]){ //spc macayeal nodes: 1 & 2
     210                                        else if (reCast<int,IssmDouble>(nodeonstokes[i])){ //spc macayeal nodes: 1 & 2
    210211                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 1 to vx.
    211212                                                count++;
     
    225226                                                }
    226227                                        }
    227                                         else _error2_("if vertices_type is MacAyealStokes, you shoud have nodeonmacayeal or nodeonstokes");
     228                                        else _error_("if vertices_type is MacAyealStokes, you shoud have nodeonmacayeal or nodeonstokes");
    228229                        }
    229230                        /*Now add the regular spcs*/
     
    235236                                else if (Mx==numberofvertices+1) {
    236237                                        /*figure out times and values: */
    237                                         values=xNew<double>(Nx);
     238                                        values=xNew<IssmDouble>(Nx);
    238239                                        spcpresent=false;
    239240                                        for(j=0;j<Nx;j++){
     
    246247                                                count++;
    247248                                        }
    248                                         xDelete<double>(values);
     249                                        xDelete<IssmDouble>(values);
    249250                                }
    250251                                else if (vertices_type[i]==HutterApproximationEnum){
     
    259260                                else if (My==numberofvertices+1){
    260261                                        /*figure out times and values: */
    261                                         values=xNew<double>(Ny);
     262                                        values=xNew<IssmDouble>(Ny);
    262263                                        spcpresent=false;
    263264                                        for(j=0;j<Ny;j++){
     
    269270                                                count++;
    270271                                        }
    271                                         xDelete<double>(values);
     272                                        xDelete<IssmDouble>(values);
    272273                                }
    273274                                else if (vertices_type[i]==HutterApproximationEnum){
     
    276277                                }
    277278
    278                                 if ((int)vertices_type[i]==StokesApproximationEnum ||  ((int)vertices_type[i]==NoneApproximationEnum)){
     279                                if (reCast<int,IssmDouble>(vertices_type[i])==StokesApproximationEnum ||  (reCast<int,IssmDouble>(vertices_type[i])==NoneApproximationEnum)){
    279280                                        if (Mz==numberofvertices && !xIsNan<IssmDouble>(spcvz[i])){
    280281                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,3,spcvz[i]/yts,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
     
    283284                                        else if (Mz==numberofvertices+1){
    284285                                                /*figure out times and values: */
    285                                                 values=xNew<double>(Nz);
     286                                                values=xNew<IssmDouble>(Nz);
    286287                                                spcpresent=false;
    287288                                                for(j=0;j<Nz;j++){
     
    293294                                                        count++;
    294295                                                }
    295                                                 xDelete<double>(values);
    296                                         }
    297 
    298                                 }
    299                                 if ((int)vertices_type[i]==NoneApproximationEnum){
     296                                                xDelete<IssmDouble>(values);
     297                                        }
     298
     299                                }
     300                                if (reCast<int,IssmDouble>(vertices_type[i])==NoneApproximationEnum){
    300301                                        constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,4,g*rho_ice*(surface[i]-z[i])/stokesreconditioning,DiagnosticHorizAnalysisEnum)); //add count'th spc, on node i+1, setting dof 2 to vy
    301302                                        count++;
     
    304305
    305306                        /*Constraint at the bedrock interface (v.n = vz = 0) (Coordinates will be updated according to the bed slope)*/
    306                         if (dim==3) if(nodeonbed[i] && nodeonicesheet[i] && nodeonstokes[i]){
    307                                  switch((int)vertices_type[i]){
     307                        if (dim==3) if(reCast<int,IssmDouble>(nodeonbed[i]) && reCast<int,IssmDouble>(nodeonicesheet[i]) && reCast<int,IssmDouble>(nodeonstokes[i])){
     308                                 switch(reCast<int,IssmDouble>(vertices_type[i])){
    308309                                        case MacAyealStokesApproximationEnum:
    309310                                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,5,0.,DiagnosticHorizAnalysisEnum));
     
    318319                                                count++;
    319320                                                break;
    320                                         default: _error2_("Vertex approximation " << EnumToStringx((int)vertices_type[i]) << " not supported");
     321                                        default: _error_("Vertex approximation " << EnumToStringx(reCast<int,IssmDouble>(vertices_type[i])) << " not supported");
    321322                                }
    322323                        }
     
    325326         
    326327        /*Free data: */
    327         xDelete<double>(spcvx);
    328         xDelete<double>(spcvy);
    329         xDelete<double>(spcvz);
    330         xDelete<double>(nodeonmacayeal);
    331         xDelete<double>(nodeonpattyn);
    332         xDelete<double>(nodeonstokes);
    333         xDelete<double>(nodeonicesheet);
    334         xDelete<double>(nodeonbed);
    335         xDelete<double>(vertices_type);
    336         xDelete<double>(surface);
    337         xDelete<double>(z);
     328        xDelete<IssmDouble>(spcvx);
     329        xDelete<IssmDouble>(spcvy);
     330        xDelete<IssmDouble>(spcvz);
     331        xDelete<IssmDouble>(nodeonmacayeal);
     332        xDelete<IssmDouble>(nodeonpattyn);
     333        xDelete<IssmDouble>(nodeonstokes);
     334        xDelete<IssmDouble>(nodeonicesheet);
     335        xDelete<IssmDouble>(nodeonbed);
     336        xDelete<IssmDouble>(vertices_type);
     337        xDelete<IssmDouble>(surface);
     338        xDelete<IssmDouble>(z);
    338339
    339340        /*Free resources:*/
    340         xDelete<double>(timesx);
    341         xDelete<double>(timesy);
    342         xDelete<double>(timesz);
    343         xDelete<double>(values);
     341        xDelete<IssmDouble>(timesx);
     342        xDelete<IssmDouble>(timesy);
     343        xDelete<IssmDouble>(timesz);
     344        xDelete<IssmDouble>(values);
    344345
    345346        /*Assign output pointer: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r12878 r13101  
    2727        int dim;
    2828        int numberofvertices;
    29         bool ismacayealpattyn,isstokes;
     29        bool ismacayealpattyn,isstokes,isl1l2;
    3030        int  numpenalties,numberofpressureloads,numrifts,numriftsegments;
    31         double *pressureload   = NULL;
    32         double *elements_type  = NULL;
    33         double *nodeoniceshelf = NULL;
    34         double *riftinfo       = NULL;
    35         double *nodeonbed      = NULL;
    36         double *nodeonstokes   = NULL;
    37         double *nodeonicesheet = NULL;
    38         double *vertices_type  = NULL;
    39         double *penalties      = NULL;
     31        IssmDouble *pressureload   = NULL;
     32        IssmDouble *elements_type  = NULL;
     33        IssmDouble *nodeoniceshelf = NULL;
     34        IssmDouble *riftinfo       = NULL;
     35        IssmDouble *nodeonbed      = NULL;
     36        IssmDouble *nodeonstokes   = NULL;
     37        IssmDouble *nodeonicesheet = NULL;
     38        IssmDouble *vertices_type  = NULL;
     39        IssmDouble *penalties      = NULL;
    4040
    4141        /*Fetch parameters: */
    4242        iomodel->Constant(&dim,MeshDimensionEnum);
    4343        iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
     44        iomodel->Constant(&isl1l2,FlowequationIsl1l2Enum);
    4445        iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
    4546        iomodel->Constant(&ismacayealpattyn,FlowequationIsmacayealpattynEnum);
     
    5354
    5455        /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    55         if (!ismacayealpattyn & !isstokes){
     56        if(!ismacayealpattyn & !isstokes & !isl1l2){
    5657                *ploads=loads;
    5758                return;
     
    7374                if (dim==2) segment_width=4;
    7475                else segment_width=6;
    75                 element=(int)(*(pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill)
     76                element=reCast<int,IssmDouble>(*(pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (node1 node2 ... elem fill)
    7677
    7778                /*Now, if this element is not in the partition, pass: */
     
    7980               
    8081                /*Do not create ice front if Hutter or Stokes elements*/
    81                 if ((int)*(elements_type+element)==HutterApproximationEnum) continue;
     82                if (reCast<int,IssmDouble>(*(elements_type+element))==HutterApproximationEnum) continue;
    8283
    8384                /*Create and  add load: */
    84                 if ((int)*(elements_type+element)==(MacAyealApproximationEnum) && dim==2){
     85                if (reCast<int,IssmDouble>(*(elements_type+element))==(MacAyealApproximationEnum) && dim==2){
    8586                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,MacAyeal2dIceFrontEnum,DiagnosticHorizAnalysisEnum));
    8687                        count++;
    8788                }
    88                 else if ((int)*(elements_type+element)==(MacAyealApproximationEnum) && dim==3){
     89                else if (reCast<int,IssmDouble>(*(elements_type+element))==(MacAyealApproximationEnum) && dim==3){
    8990                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,MacAyeal3dIceFrontEnum,DiagnosticHorizAnalysisEnum));
    9091                        count++;
    9192                }
    92                 else if ((int)*(elements_type+element)==(PattynApproximationEnum)){
     93                else if (reCast<int,IssmDouble>(*(elements_type+element))==(L1L2ApproximationEnum)){
     94                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,MacAyeal3dIceFrontEnum,DiagnosticHorizAnalysisEnum));
     95                        count++;
     96                }
     97                else if (reCast<int,IssmDouble>(*(elements_type+element))==(PattynApproximationEnum)){
    9398                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,PattynIceFrontEnum,DiagnosticHorizAnalysisEnum));
    9499                        count++;
    95100                }
    96                 else if ((int)*(elements_type+element)==(StokesApproximationEnum)){
     101                else if (reCast<int,IssmDouble>(*(elements_type+element))==(L1L2ApproximationEnum)){
     102                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,L1L2IceFrontEnum,DiagnosticHorizAnalysisEnum));
     103                        count++;
     104                }
     105                else if (reCast<int,IssmDouble>(*(elements_type+element))==(StokesApproximationEnum)){
    97106                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,StokesIceFrontEnum,DiagnosticHorizAnalysisEnum));
    98107                        count++;
    99108                }
    100                 else if ((int)*(elements_type+element)==(MacAyealPattynApproximationEnum)){
     109                else if (reCast<int,IssmDouble>(*(elements_type+element))==(MacAyealPattynApproximationEnum)){
    101110                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,MacAyeal3dIceFrontEnum,DiagnosticHorizAnalysisEnum));
    102111                        count++;
     
    104113                        count++;
    105114                }
    106                 else if ((int)*(elements_type+element)==(PattynStokesApproximationEnum)){
     115                else if (reCast<int,IssmDouble>(*(elements_type+element))==(PattynStokesApproximationEnum)){
    107116                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,PattynIceFrontEnum,DiagnosticHorizAnalysisEnum));
    108117                        count++;
     
    110119                        count++;
    111120                }
    112                 else if ((int)*(elements_type+element)==(MacAyealStokesApproximationEnum)){
     121                else if (reCast<int,IssmDouble>(*(elements_type+element))==(MacAyealStokesApproximationEnum)){
    113122                        loads->AddObject(new Icefront(iomodel->loadcounter+count+1,i,iomodel,MacAyeal3dIceFrontEnum,DiagnosticHorizAnalysisEnum));
    114123                        count++;
     
    120129        /*Free data: */
    121130        iomodel->DeleteData(3,DiagnosticIcefrontEnum,ThicknessEnum,BedEnum);
    122         xDelete<double>(elements_type);
    123         xDelete<double>(pressureload);
     131        xDelete<IssmDouble>(elements_type);
     132        xDelete<IssmDouble>(pressureload);
    124133
    125134        /*Create Penpair for penalties: */
     
    128137        for(i=0;i<numpenalties;i++){
    129138
    130                 if(iomodel->my_vertices[(int)penalties[2*i+0]-1]){
     139                if(iomodel->my_vertices[reCast<int,IssmDouble>(penalties[2*i+0]-1)]){
    131140
    132141                        /*In debugging mode, check that the second node is in the same cpu*/
     
    134143
    135144                        /*Get node ids*/
    136                         penpair_ids[0]=iomodel->nodecounter+(int)penalties[2*i+0];
    137                         penpair_ids[1]=iomodel->nodecounter+(int)penalties[2*i+1];
     145                        penpair_ids[0]=iomodel->nodecounter+reCast<int,IssmDouble>(penalties[2*i+0]);
     146                        penpair_ids[1]=iomodel->nodecounter+reCast<int,IssmDouble>(penalties[2*i+1]);
    138147
    139148                        /*Create Load*/
     
    144153
    145154        /*free ressources: */
    146         xDelete<double>(penalties);
     155        xDelete<IssmDouble>(penalties);
    147156
    148157        /*Create Riffront loads for rifts: */
     
    151160                iomodel->FetchData(5,RiftsRiftstructEnum,ThicknessEnum,BedEnum,SurfaceEnum,MaskVertexonfloatingiceEnum);
    152161                for(i=0;i<numriftsegments;i++){
    153                         if(iomodel->my_elements[(int)*(riftinfo+RIFTINFOSIZE*i+2)-1]){
     162                        if(iomodel->my_elements[reCast<int,IssmDouble>(*(riftinfo+RIFTINFOSIZE*i+2))-1]){
    154163                                loads->AddObject(new Riftfront(iomodel->loadcounter+count+1,i,iomodel,DiagnosticHorizAnalysisEnum));
    155164                                count++;
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp

    r12878 r13101  
    1919        bool   continuous_galerkin=true;
    2020        int    numberofvertices;
    21         bool   isstokes,ismacayealpattyn;
     21        bool   isstokes,isl1l2,ismacayealpattyn;
    2222
    2323        /*DataSets: */
     
    2727        iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
    2828        iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
     29        iomodel->Constant(&isl1l2,FlowequationIsl1l2Enum);
    2930        iomodel->Constant(&ismacayealpattyn,FlowequationIsmacayealpattynEnum);
    3031
     
    3637       
    3738        /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    38         if(!ismacayealpattyn & !isstokes){
     39        if(!ismacayealpattyn & !isstokes & !isl1l2){
    3940                *pnodes=nodes;
    4041                return;
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp

    r12878 r13101  
    1919        int    numberofelements;
    2020        bool   ismacayealpattyn;
     21        bool   isl1l2;
    2122        bool   isstokes;
    2223        bool   control_analysis;
     
    2526        /*Fetch constants needed: */
    2627        iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
     28        iomodel->Constant(&isl1l2,FlowequationIsl1l2Enum);
    2729        iomodel->Constant(&ismacayealpattyn,FlowequationIsmacayealpattynEnum);
    2830        iomodel->Constant(&dim,MeshDimensionEnum);
     
    3234
    3335        /*Now, is the flag macayaealpattyn on? otherwise, do nothing: */
    34         if(!ismacayealpattyn & !isstokes) return;
     36        if(!ismacayealpattyn & !isstokes &!isl1l2) return;
    3537
    3638        /*Fetch data needed: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp

    r12878 r13101  
    1616        int i;
    1717        int count;
    18         double yts;
     18        IssmDouble yts;
    1919        int    numberofvertices;
    2020        bool   ishutter;
     
    5151                /*keep only this partition's nodes:*/
    5252                if((iomodel->my_vertices[i])){
    53                         if (!(int)iomodel->Data(FlowequationVertexEquationEnum)[i]==HutterApproximationEnum){
     53                        if (!reCast<int,IssmDouble>(iomodel->Data(FlowequationVertexEquationEnum)[i])==HutterApproximationEnum){
    5454
    5555                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticHutterAnalysisEnum));
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp

    r12878 r13101  
    1717        int dim;
    1818        int count;
    19         double yts;
     19        IssmDouble yts;
    2020        int    numberofvertices;
    2121
     
    5252                if(iomodel->my_vertices[i]){
    5353
    54                         if ((int)iomodel->Data(FlowequationBorderstokesEnum)[i]){
     54                        if (reCast<int,IssmDouble>(iomodel->Data(FlowequationBorderstokesEnum)[i])){
    5555                                constraints->AddObject(new SpcStatic(iomodel->constraintcounter+count+1,iomodel->nodecounter+i+1,1,0,DiagnosticVertAnalysisEnum)); //spc to zero as vertical velocity is done in Horiz for Stokes
    5656                                count++;
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp

    r12878 r13101  
    1919        if (analysis_type==DiagnosticHorizAnalysisEnum){
    2020                if (vertices_type[0]==MacAyealApproximationEnum){
     21                        numdofs=2;
     22                }
     23                else if (vertices_type[0]==L1L2ApproximationEnum){
    2124                        numdofs=2;
    2225                }
     
    6164                        doftype[5]=StokesApproximationEnum;
    6265                }
    63                 else _error2_("Approximationtype " << reCast<int>(*vertices_type) << " (" << EnumToStringx(reCast<int>(*vertices_type)) << ") not implemented yet for DiagnosticHoriz");
     66                else _error_("Approximationtype " << reCast<int>(*vertices_type) << " (" << EnumToStringx(reCast<int>(*vertices_type)) << ") not implemented yet for DiagnosticHoriz");
    6467        }
    6568        else if (analysis_type==DiagnosticVertAnalysisEnum){
     
    9093                numdofs=1;
    9194        }
    92         else _error2_("analysis type: " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not implemented yet");
     95        else _error_("analysis type: " << analysis_type << " (" << EnumToStringx(analysis_type) << ") not implemented yet");
    9396
    9497        /*Now initialize the index*/
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp

    r12878 r13101  
    2121        int    numberofvertices;
    2222        bool   spcpresent=false;
    23         double heatcapacity;
    24         double referencetemperature;
     23        IssmDouble heatcapacity;
     24        IssmDouble referencetemperature;
    2525       
    2626        /*Output*/
     
    106106        }
    107107        else{
    108                 _error2_("Size of field " << EnumToStringx(ThermalSpctemperatureEnum) << " not supported");
     108                _error_("Size of field " << EnumToStringx(ThermalSpctemperatureEnum) << " not supported");
    109109        }
    110110
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r12878 r13101  
    2626
    2727        /*if 2d: Error*/
    28         if (dim==2) _error2_("2d meshes not supported yet");
     28        if (dim==2) _error_("2d meshes not supported yet");
    2929
    3030        /*Recover pointer: */
     
    4040        for (i=0;i<numberofvertices;i++){
    4141                if((iomodel->my_vertices[i]==1)){
    42                         if (iomodel->Data(MeshVertexonbedEnum)[i]){
     42                        if (reCast<int>(iomodel->Data(MeshVertexonbedEnum)[i])){
    4343                                loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,MeltingAnalysisEnum));
    4444                        }
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/NodesPartitioning.cpp

    r12878 r13101  
    103103        }
    104104        else{
    105                 _error2_("not implemented yet");
     105                _error_("not implemented yet");
    106106        }
    107107
     
    111111        iomodel->FetchData(&edges,&numberofedges,&cols,MeshEdgesEnum);
    112112        iomodel->FetchData(&elements,NULL,NULL,MeshElementsEnum);
    113         if (cols!=4) _error2_("field edges should have 4 columns");
     113        if (cols!=4) _error_("field edges should have 4 columns");
    114114
    115115        /*!All elements have been partitioned above, only create elements for this CPU: */
     
    152152                        }
    153153                        else{
    154                                 _error2_("Problem in edges creation");
     154                                _error_("Problem in edges creation");
    155155                        }
    156156                }
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp

    r12878 r13101  
    4646
    4747        /*Check in 3d*/
    48         if(stabilization==3 && dim==3) _error2_("DG 3d not implemented yet");
     48        if(stabilization==3 && dim==3) _error_("DG 3d not implemented yet");
    4949
    5050        /*First fetch data: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp

    r12878 r13101  
    2323        bool   ispdd;
    2424        bool   isdelta18o;
    25         IssmDouble *size, Delta18oTimeSerie,Delta18oSurfaceTimeSerie ;
    2625
    2726        /*Fetch data needed: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r12878 r13101  
    3333
    3434        /*return if 2d mesh*/
    35         if (dim==2) _error2_("2d meshes not supported yet");
     35        if (dim==2) _error_("2d meshes not supported yet");
    3636
    3737        //create penalties for nodes: no node can have a temperature over the melting point
  • issm/branches/trunk-jpl-damage/src/c/modules/NodalValuex/NodalValuex.cpp

    r12878 r13101  
    3838        #ifdef _HAVE_MPI_
    3939        MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
    40         if(!sumfound)_error2_("could not find element with vertex with id" << index << " to compute nodal value " << EnumToStringx(natureofdataenum));
     40        if(!sumfound)_error_("could not find element with vertex with id" << index << " to compute nodal value " << EnumToStringx(natureofdataenum));
    4141        #endif
    4242
  • issm/branches/trunk-jpl-damage/src/c/modules/NodeConnectivityx/NodeConnectivityx.cpp

    r12878 r13101  
    7171         * warn the user to increase the connectivity width: */
    7272        for(i=0;i<nods;i++){
    73                 if (*(connectivity+width*i+maxels)>maxels)_error2_("max connectivity width reached (" << *(connectivity+width*i+maxels) << ")! increase width of connectivity table");
     73                if (*(connectivity+width*i+maxels)>maxels)_error_("max connectivity width reached (" << *(connectivity+width*i+maxels) << ")! increase width of connectivity table");
    7474        }
    7575
  • issm/branches/trunk-jpl-damage/src/c/modules/Orthx/Orthx.cpp

    r11708 r13101  
    1111
    1212        /*intermediary:*/
    13         double norm_new,norm_old,dot_product;;
     13        IssmDouble norm_new,norm_old,dot_product;;
    1414
    1515        /*Initialize output*/
  • issm/branches/trunk-jpl-damage/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp

    r12878 r13101  
    106106                char* string=strings[i];
    107107                if(my_rank==0){
    108                         if(string==NULL) _error2_("PETSc options for analysis " << EnumToStringx(reCast<int>(analyses[i])) << " have been declared but were not found");
     108                        if(string==NULL) _error_("PETSc options for analysis " << EnumToStringx(reCast<int>(analyses[i])) << " have been declared but were not found");
    109109                }
    110110                if(my_rank==0)stringlength=(strlen(string)+1)*sizeof(char);
  • issm/branches/trunk-jpl-damage/src/c/modules/ResetConstraintsx/ResetConstraintsx.cpp

    r12878 r13101  
    3030         * management routine, otherwise, skip : */
    3131        if (RiftIsPresent(loads,analysis_type)){
    32                 _error2_("rift constraints reset not supported yet!");
     32                _error_("rift constraints reset not supported yet!");
    3333        }
    3434        else if(ThermalIsPresent(loads,analysis_type)){
  • issm/branches/trunk-jpl-damage/src/c/modules/Responsex/Responsex.cpp

    r12946 r13101  
    4949                case VelEnum:ElementResponsex(responses, elements,nodes, vertices, loads, materials, parameters,VelEnum,process_units); break;
    5050                case FrictionCoefficientEnum:NodalValuex(responses, FrictionCoefficientEnum,elements,nodes, vertices, loads, materials, parameters,process_units); break;
    51                 default: _error2_("response descriptor \"" << response_descriptor << "\" not supported yet!"); break;
     51                default: _error_("response descriptor \"" << response_descriptor << "\" not supported yet!"); break;
    5252                #else
    53                 default: _error2_("ISSM was not compiled with responses capabilities, exiting!");
     53                default: _error_("ISSM was not compiled with responses capabilities, exiting!");
    5454                #endif
    5555        }
  • issm/branches/trunk-jpl-damage/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void RheologyBbarAbsGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
     12void RheologyBbarAbsGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void RheologyBbarAbsGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void RheologyBbarAbsGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp

    r12878 r13101  
    99#include "../../EnumDefinitions/EnumDefinitions.h"
    1010
    11 void SetControlInputsFromVectorx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vector){
     11void SetControlInputsFromVectorx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,IssmDouble* vector){
    1212
    1313        int  num_controls;
     
    3030void SetControlInputsFromVectorx(Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Vector* vector){
    3131       
    32         double* serial_vector=NULL;
     32        IssmDouble* serial_vector=NULL;
    3333
    3434        serial_vector=vector->ToMPISerial();
     
    3737
    3838        /*Free ressources:*/
    39         xDelete<double>(serial_vector);
     39        xDelete<IssmDouble>(serial_vector);
    4040}
  • issm/branches/trunk-jpl-damage/src/c/modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.h

    r12878 r13101  
    1010/* local prototypes: */
    1111void SetControlInputsFromVectorx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,Vector* vector);
    12 void SetControlInputsFromVectorx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,double* vector);
     12void SetControlInputsFromVectorx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads, Materials* materials,  Parameters* parameters,IssmDouble* vector);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/Shp2Kmlx/Shp2Kmlx.cpp

    r12878 r13101  
    7575
    7676        hSHP = SHPOpen( filshp, "rb" );
    77         if (!hSHP) _error2_("Error opening shp/shx files.");
     77        if (!hSHP) _error_("Error opening shp/shx files.");
    7878
    7979/*  read header and print out file bounds  */
  • issm/branches/trunk-jpl-damage/src/c/modules/Solverx/Solverx.cpp

    r12946 r13101  
    4444                        break;}
    4545                default:
    46                           _error2_("Matrix type: " << Kff->type << " not supported yet!");
     46                          _error_("Matrix type: " << Kff->type << " not supported yet!");
    4747        }
    4848
  • issm/branches/trunk-jpl-damage/src/c/modules/Solverx/Solverx.h

    r12878 r13101  
    2525void SolverxSeq(SeqVec** puf,SeqMat* Kff, SeqVec* pf);
    2626void SolverxSeq(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n);
     27void SolverxSeq(double** pX,double* A,double* B,int n);
    2728
    2829#endif  /* _SOLVERX_H */
  • issm/branches/trunk-jpl-damage/src/c/modules/Solverx/SolverxPetsc.cpp

    r12878 r13101  
    9696                #if _PETSC_MAJOR_ >=3
    9797                        #ifndef _HAVE_MUMPS_
    98                         _error2_("requested MUMPS solver, which was not compiled into ISSM!\n");
     98                        _error_("requested MUMPS solver, which was not compiled into ISSM!\n");
    9999                        #endif
    100100                #endif
     
    120120        if (solver_type==StokesSolverEnum){
    121121                /*Make indices out of doftypes: */
    122                 if(!df)_error2_("need doftypes for Stokes solver!\n");
     122                if(!df)_error_("need doftypes for Stokes solver!\n");
    123123                DofTypesToIndexSet(&isv,&isp,df,StokesSolverEnum);
    124124
     
    151151        /*Check convergence*/
    152152        KSPGetIterationNumber(ksp,&iteration_number);
    153         if (iteration_number<0) _error2_("Solver diverged at iteration number: " << -iteration_number);
     153        if (iteration_number<0) _error_("Solver diverged at iteration number: " << -iteration_number);
    154154
    155155        /*Free resources:*/
  • issm/branches/trunk-jpl-damage/src/c/modules/Solverx/SolverxSeq.cpp

    r12878 r13101  
    3030        pf->GetSize(&N2);
    3131
    32         if(N!=N2)_error2_("Right hand side vector of size " << N2 << ", when matrix is of size " << M << "-" << N << " !");
    33         if(M!=N)_error2_("Stiffness matrix should be square!");
     32        if(N!=N2)_error_("Right hand side vector of size " << N2 << ", when matrix is of size " << M << "-" << N << " !");
     33        if(M!=N)_error_("Stiffness matrix should be square!");
    3434
    3535        SolverxSeq(&x,Kff->matrix,pf->vector,N);
     
    4040
    4141        #else
    42                 _error2_("GSL support not compiled in!");
     42                _error_("GSL support not compiled in!");
    4343        #endif
    4444
    4545}/*}}}*/
    46 void SolverxSeq(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n){/*{{{*/
     46#ifdef _HAVE_ADOLC_
     47void SolverxSeq(IssmDouble** pX,IssmDouble* A,IssmDouble* B,int n){//{{{
     48        /* if we use Adol-C then the IssmDouble will be an adouble
     49           and the calls to gsl_... will not work.
     50           We therefore call a wrapped solver instead.
     51        */
    4752
     53        /*Output: */
     54        IssmDouble* X=NULL;
     55
     56        /*Intermediary: */
     57        int     i;
     58        IssmPDouble* pdoubleA=NULL;
     59        IssmPDouble* pdoubleB=NULL;
     60        IssmPDouble* pdoubleX=NULL;
     61
     62        /*First, transfer from IssmDouble to double all our matrices and vectors: */
     63        pdoubleA=xNew<double>(n*n);
     64        pdoubleB=xNew<double>(n);
     65        for(i=0;i<n*n;i++)pdoubleA[i]=reCast<IssmPDouble>(A[i]);
     66        for(i=0;i<n;i++)pdoubleB[i]=reCast<IssmPDouble>(B[i]);
     67       
     68        /*Call wrapped solver: */
     69        SolverxSeq(&pdoubleX,pdoubleA, pdoubleB, n);
     70
     71        /*Transfer solution vector from double to IssmDouble: */
     72        X = xNew<IssmDouble>(n);
     73        for(i=0;i<n;i++)X[i]=reCast<IssmDouble>(pdoubleX[i]);
     74
     75        /*Free ressources:*/
     76        xDelete<IssmPDouble>(pdoubleA);
     77        xDelete<IssmPDouble>(pdoubleB);
     78
     79        /*Assign output pointers: */
     80        *pX=X;
     81}
     82/*}}}*/
     83#endif
     84void SolverxSeq(IssmPDouble** pX,IssmPDouble* A,IssmPDouble* B,int n){ //{{{
    4885        #ifdef _HAVE_GSL_
    49                 /*GSL Matrices and vectors: */
    50                 int              s;
    51                 gsl_matrix_view  a;
    52                 gsl_vector_view  b;
    53                 gsl_vector      *x = NULL;
    54                 gsl_permutation *p = NULL;
    55                 #ifdef _HAVE_ADOLC_
    56                         // if we use Adol-C then the IssmDouble will be an adouble
    57                         // and the calls to gsl_... will not work
    58                         // and we should call  a suitable wrapped solve instead
    59                         _error2_("SolverxSeq: should not be here with Adol-C");
    60                 #else
    61                         /*A will be modified by LU decomposition. Use copy*/
    62                         IssmDouble* Acopy = xNew<IssmDouble>(n*n);
    63                         xMemCpy<IssmDouble>(Acopy,A,n*n);
     86        /*GSL Matrices and vectors: */
     87        int              s;
     88        gsl_matrix_view  a;
     89        gsl_vector_view  b;
     90        gsl_vector      *x = NULL;
     91        gsl_permutation *p = NULL;
     92        /*A will be modified by LU decomposition. Use copy*/
     93        double* Acopy = xNew<double>(n*n);
     94        xMemCpy<double>(Acopy,A,n*n);
    6495
    65                         /*Initialize gsl matrices and vectors: */
    66                         a = gsl_matrix_view_array (Acopy,n,n);
    67                         b = gsl_vector_view_array (B,n);
    68                         x = gsl_vector_alloc (n);
     96        /*Initialize gsl matrices and vectors: */
     97        a = gsl_matrix_view_array (Acopy,n,n);
     98        b = gsl_vector_view_array (B,n);
     99        x = gsl_vector_alloc (n);
    69100
    70                         /*Run LU and solve: */
    71                         p = gsl_permutation_alloc (n);
    72                         gsl_linalg_LU_decomp (&a.matrix, p, &s);
    73                         gsl_linalg_LU_solve (&a.matrix, p, &b.vector, x);
     101        /*Run LU and solve: */
     102        p = gsl_permutation_alloc (n);
     103        gsl_linalg_LU_decomp (&a.matrix, p, &s);
     104        gsl_linalg_LU_solve (&a.matrix, p, &b.vector, x);
    74105
    75                         //printf ("x = \n");
    76                         //gsl_vector_fprintf (stdout, x, "%g");
     106        //printf ("x = \n");
     107        //gsl_vector_fprintf (stdout, x, "%g");
    77108
    78                         /*Copy result*/
    79                         IssmDouble* X = xNew<IssmDouble>(n);
    80                         memcpy(X,gsl_vector_ptr(x,0),n*sizeof(IssmDouble));
     109        /*Copy result*/
     110        double* X = xNew<double>(n);
     111        memcpy(X,gsl_vector_ptr(x,0),n*sizeof(double));
    81112
    82                         /*Clean up and assign output pointer*/
    83                         xDelete<IssmDouble>(Acopy);
    84                         gsl_permutation_free(p);
    85                         gsl_vector_free(x);
    86                         *pX=X;
    87                 #endif
     113        /*Clean up and assign output pointer*/
     114        xDelete<double>(Acopy);
     115        gsl_permutation_free(p);
     116        gsl_vector_free(x);
     117        *pX=X;
    88118        #endif
    89 }/*}}}*/
     119}
     120/*}}}*/
  • issm/branches/trunk-jpl-damage/src/c/modules/StringToEnumx/StringToEnumx.cpp

    r12946 r13101  
    1818
    1919   if(stage==1){
    20               if (strcmp(name,"AutodiffForward")==0) return AutodiffForwardEnum;
    21               else if (strcmp(name,"AutodiffIsautodiff")==0) return AutodiffIsautodiffEnum;
    22               else if (strcmp(name,"AutodiffReverse")==0) return AutodiffReverseEnum;
     20              if (strcmp(name,"AutodiffIsautodiff")==0) return AutodiffIsautodiffEnum;
    2321              else if (strcmp(name,"BalancethicknessSpcthickness")==0) return BalancethicknessSpcthicknessEnum;
    2422              else if (strcmp(name,"BalancethicknessStabilization")==0) return BalancethicknessStabilizationEnum;
     
    5654              else if (strcmp(name,"FlowequationElementEquation")==0) return FlowequationElementEquationEnum;
    5755              else if (strcmp(name,"FlowequationIshutter")==0) return FlowequationIshutterEnum;
     56              else if (strcmp(name,"FlowequationIsl1l2")==0) return FlowequationIsl1l2Enum;
    5857              else if (strcmp(name,"FlowequationIsmacayealpattyn")==0) return FlowequationIsmacayealpattynEnum;
    5958              else if (strcmp(name,"FlowequationIsstokes")==0) return FlowequationIsstokesEnum;
     
    138137              else if (strcmp(name,"MiscellaneousName")==0) return MiscellaneousNameEnum;
    139138              else if (strcmp(name,"PrognosticHydrostaticAdjustment")==0) return PrognosticHydrostaticAdjustmentEnum;
     139              else if (strcmp(name,"PrognosticMinThickness")==0) return PrognosticMinThicknessEnum;
    140140         else stage=2;
    141141   }
    142142   if(stage==2){
    143               if (strcmp(name,"PrognosticMinThickness")==0) return PrognosticMinThicknessEnum;
    144               else if (strcmp(name,"PrognosticPenaltyFactor")==0) return PrognosticPenaltyFactorEnum;
     143              if (strcmp(name,"PrognosticPenaltyFactor")==0) return PrognosticPenaltyFactorEnum;
    145144              else if (strcmp(name,"PrognosticSpcthickness")==0) return PrognosticSpcthicknessEnum;
    146145              else if (strcmp(name,"PrognosticStabilization")==0) return PrognosticStabilizationEnum;
     
    243242              else if (strcmp(name,"TransientSolution")==0) return TransientSolutionEnum;
    244243              else if (strcmp(name,"Approximation")==0) return ApproximationEnum;
     244              else if (strcmp(name,"NoneApproximation")==0) return NoneApproximationEnum;
    245245              else if (strcmp(name,"HutterApproximation")==0) return HutterApproximationEnum;
    246246              else if (strcmp(name,"MacAyealApproximation")==0) return MacAyealApproximationEnum;
    247247              else if (strcmp(name,"MacAyealPattynApproximation")==0) return MacAyealPattynApproximationEnum;
    248248              else if (strcmp(name,"MacAyealStokesApproximation")==0) return MacAyealStokesApproximationEnum;
    249               else if (strcmp(name,"NoneApproximation")==0) return NoneApproximationEnum;
     249              else if (strcmp(name,"L1L2Approximation")==0) return L1L2ApproximationEnum;
    250250              else if (strcmp(name,"PattynApproximation")==0) return PattynApproximationEnum;
    251251              else if (strcmp(name,"PattynStokesApproximation")==0) return PattynStokesApproximationEnum;
     
    290290              else if (strcmp(name,"Numericalflux")==0) return NumericalfluxEnum;
    291291              else if (strcmp(name,"Param")==0) return ParamEnum;
     292              else if (strcmp(name,"L1L2IceFront")==0) return L1L2IceFrontEnum;
    292293              else if (strcmp(name,"PattynIceFront")==0) return PattynIceFrontEnum;
    293294              else if (strcmp(name,"Pengrid")==0) return PengridEnum;
     
    383384              else if (strcmp(name,"EnthalpyPicard")==0) return EnthalpyPicardEnum;
    384385              else if (strcmp(name,"ThicknessAbsGradient")==0) return ThicknessAbsGradientEnum;
    385               else if (strcmp(name,"StepResponses")==0) return StepResponsesEnum;
    386386         else stage=4;
    387387   }
    388388   if(stage==4){
    389               if (strcmp(name,"IntMatParam")==0) return IntMatParamEnum;
     389              if (strcmp(name,"ThicknessAlongGradient")==0) return ThicknessAlongGradientEnum;
     390              else if (strcmp(name,"ThicknessAcrossGradient")==0) return ThicknessAcrossGradientEnum;
     391              else if (strcmp(name,"StepResponses")==0) return StepResponsesEnum;
     392              else if (strcmp(name,"IntMatParam")==0) return IntMatParamEnum;
    390393              else if (strcmp(name,"RheologyBbarAbsGradient")==0) return RheologyBbarAbsGradientEnum;
    391394              else if (strcmp(name,"DragCoefficientAbsGradient")==0) return DragCoefficientAbsGradientEnum;
     
    406409              else if (strcmp(name,"StressTensoryz")==0) return StressTensoryzEnum;
    407410              else if (strcmp(name,"StressTensorzz")==0) return StressTensorzzEnum;
    408               else if (strcmp(name,"IceVolume")==0) return IceVolumeEnum;
    409               else if (strcmp(name,"TotalSmb")==0) return TotalSmbEnum;
    410               else if (strcmp(name,"ThicknessAlongGradient")==0) return ThicknessAlongGradientEnum;
    411               else if (strcmp(name,"ThicknessAcrossGradient")==0) return ThicknessAcrossGradientEnum;
    412411              else if (strcmp(name,"P0")==0) return P0Enum;
    413412              else if (strcmp(name,"P1")==0) return P1Enum;
     
    443442              else if (strcmp(name,"MaxVz")==0) return MaxVzEnum;
    444443              else if (strcmp(name,"MaxAbsVz")==0) return MaxAbsVzEnum;
     444              else if (strcmp(name,"IceVolume")==0) return IceVolumeEnum;
     445              else if (strcmp(name,"TotalSmb")==0) return TotalSmbEnum;
    445446              else if (strcmp(name,"Relative")==0) return RelativeEnum;
    446447              else if (strcmp(name,"Absolute")==0) return AbsoluteEnum;
     
    492493   }
    493494        /*If we reach this point, the string provided has not been found*/
    494         _error2_("Enum " << name << " not found");
     495        _error_("Enum " << name << " not found");
    495496}
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void SurfaceAbsVelMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
     12void SurfaceAbsVelMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void SurfaceAbsVelMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void SurfaceAbsVelMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp

    r12168 r13101  
    1111#include "../SurfaceAreax/SurfaceAreax.h"
    1212
    13 void SurfaceAverageVelMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
     13void SurfaceAverageVelMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
    1414
    1515        /*Intermediary*/
     
    1818
    1919        /*output: */
    20         double J=0;
    21         double J_sum;
     20        IssmDouble J=0;
     21        IssmDouble J_sum;
    2222
    2323        /*Compute surface area and add to elements inputs */
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void SurfaceAverageVelMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void SurfaceAverageVelMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void SurfaceLogVelMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
     12void SurfaceLogVelMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void SurfaceLogVelMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void SurfaceLogVelMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void SurfaceLogVxVyMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
     12void SurfaceLogVxVyMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void SurfaceLogVxVyMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void SurfaceLogVxVyMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void SurfaceRelVelMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
     12void SurfaceRelVelMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units,int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void SurfaceRelVelMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void SurfaceRelVelMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAbsGradientx/ThicknessAbsGradientx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void ThicknessAbsGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
     12void ThicknessAbsGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAbsGradientx/ThicknessAbsGradientx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void ThicknessAbsGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void ThicknessAbsGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp

    r12168 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void ThicknessAbsMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
     12void ThicknessAbsMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.h

    r12878 r13101  
    1010
    1111/* local prototypes: */
    12 void ThicknessAbsMisfitx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void ThicknessAbsMisfitx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAcrossGradientx/ThicknessAcrossGradientx.cpp

    r12927 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void ThicknessAcrossGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
     12void ThicknessAcrossGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAcrossGradientx/ThicknessAcrossGradientx.h

    r12927 r13101  
    1010
    1111/* local prototypes: */
    12 void ThicknessAcrossGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void ThicknessAcrossGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAlongGradientx/ThicknessAlongGradientx.cpp

    r12927 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void ThicknessAlongGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
     12void ThicknessAlongGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units, int weight_index){
    1313
    1414        /*Intermediary*/
     
    1717
    1818        /*output: */
    19         double J=0;
    20         double J_sum;
     19        IssmDouble J=0;
     20        IssmDouble J_sum;
    2121
    2222        /*Compute Misfit: */
  • issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAlongGradientx/ThicknessAlongGradientx.h

    r12927 r13101  
    1010
    1111/* local prototypes: */
    12 void ThicknessAlongGradientx( double* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
     12void ThicknessAlongGradientx( IssmDouble* pJ, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units,int weight_index);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/TotalSmbx/TotalSmbx.cpp

    r12773 r13101  
    1010#include "../../EnumDefinitions/EnumDefinitions.h"
    1111
    12 void TotalSmbx(double* pSmb, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
     12void TotalSmbx(IssmDouble* pSmb, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials,Parameters* parameters,bool process_units){
    1313
    14         double local_smb = 0;
    15         double total_smb;
     14        IssmDouble local_smb = 0;
     15        IssmDouble total_smb;
    1616
    1717        for(int i=0;i<elements->Size();i++){
  • issm/branches/trunk-jpl-damage/src/c/modules/TotalSmbx/TotalSmbx.h

    r12832 r13101  
    1010
    1111/* local prototypes: */
    12 void TotalSmbx(double* pSmb, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
     12void TotalSmbx(IssmDouble* pSmb, Elements* elements,Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,bool process_units);
    1313
    1414#endif
  • issm/branches/trunk-jpl-damage/src/c/modules/Xy2llx/Xy2llx.cpp

    r12878 r13101  
    5353        double  sl,rho,cm,T,chi;
    5454
    55         if((sgn!=1) && (sgn!=-1)) _error2_("Sign should be either +1 or -1.\n");
     55        if((sgn!=1) && (sgn!=-1)) _error_("Sign should be either +1 or -1.\n");
    5656
    5757        delta = central_meridian;
     
    131131                if(flag) _pprintLine_("Warning: expecting coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).");
    132132        }
    133         else _error2_("Sign should be either +1 or -1.\n");
     133        else _error_("Sign should be either +1 or -1.\n");
    134134
    135135        return;
  • issm/branches/trunk-jpl-damage/src/c/python/io/CheckNumPythonArguments.cpp

    r12878 r13101  
    2727        if (size==0){
    2828                function();
    29                 _error2_("usage: see above");
     29                _error_("usage: see above");
    3030        }
    3131        else if (size!=NRHS ) {
    3232                function();
    33                 _error2_("usage error.");
     33                _error_("usage error.");
    3434        }
    3535        return 1;
  • issm/branches/trunk-jpl-damage/src/c/python/io/FetchPythonData.cpp

    r12878 r13101  
    4848       
    4949        /*check this is indeed a subtype of long type: */
    50         if(!PyBool_Check(py_boolean))_error2_("expecting a boolean in input!");
     50        if(!PyBool_Check(py_boolean))_error_("expecting a boolean in input!");
    5151
    5252        /*extract boolean: */
     
    6969        /*retrive dimensions: */
    7070        ndim=PyArray_NDIM((const PyArrayObject*)py_matrix);
    71         if(ndim!=2)_error2_("expecting an MxN matrix in input!");
     71        if(ndim!=2)_error_("expecting an MxN matrix in input!");
    7272        dims=PyArray_DIMS((PyArrayObject*)py_matrix);
    7373        M=dims[0]; N=dims[1];
     
    9797        /*retrive dimensions: */
    9898        ndim=PyArray_NDIM((const PyArrayObject*)py_matrix);
    99         if(ndim!=2)_error2_("expecting an MxN matrix in input!");
     99        if(ndim!=2)_error_("expecting an MxN matrix in input!");
    100100        dims=PyArray_DIMS((PyArrayObject*)py_matrix);
    101101        M=dims[0]; N=dims[1];
     
    125125        /*retrive dimensions: */
    126126        ndim=PyArray_NDIM((const PyArrayObject*)py_vector);
    127         if(ndim!=1)_error2_("expecting an Mx1 vector in input!");
     127        if(ndim!=1)_error_("expecting an Mx1 vector in input!");
    128128        dims=PyArray_DIMS((PyArrayObject*)py_vector);
    129129        M=dims[0];
  • issm/branches/trunk-jpl-damage/src/c/python/io/WritePythonData.cpp

    r12878 r13101  
    2121
    2222
     23/*FUNCTION WriteData(PyObject* py_tuple,int index,int integer){{{*/
     24void WriteData(PyObject* py_tuple, int index, int integer){
     25       
     26        PyTuple_SetItem(py_tuple, index, PyInt_FromSsize_t(integer));
     27
     28}/*}}}*/
    2329/*FUNCTION WriteData(PyObject* py_tuple,int index,char* string){{{*/
    2430void WriteData(PyObject* py_tuple, int index, char* string){
  • issm/branches/trunk-jpl-damage/src/c/python/io/pythonio.h

    r12878 r13101  
    2828//void WriteData(DataHandle* py_tuple,Parameters* parameters);
    2929void WriteData(PyObject* py_tuple, int index, double* matrix, int M,int N);
     30void WriteData(PyObject* py_tuple, int index, int integer);
    3031void WriteData(PyObject* py_tuple, int index, char* string);
    3132void WriteData(PyObject* py_tuple, int index, Matrix* matrix);
  • issm/branches/trunk-jpl-damage/src/c/shared/Alloc/alloc.cpp

    r12878 r13101  
    3131        void* memptr=NULL;
    3232
    33         if(!size)_error2_("attempting to 0 size allocation!");
     33        if(!size)_error_("attempting to 0 size allocation!");
    3434
    3535        /* Use the c library to do the allocation: */
    3636        memptr=malloc(size);
    37         if(!memptr) _error2_("memory allocation failed!");
     37        if(!memptr) _error_("memory allocation failed!");
    3838
    3939        return memptr;
     
    4444        void* memptr=NULL;
    4545       
    46         if(!size)_error2_("attempting to 0 size allocation!");
     46        if(!size)_error_("attempting to 0 size allocation!");
    4747
    4848        /* Use the c library to do the allocation: */
    4949        memptr=calloc(n,size);
    50         if(!memptr) _error2_("memory allocation failed!");
     50        if(!memptr) _error_("memory allocation failed!");
    5151
    5252        return memptr;
     
    8888        register void* value=NULL;
    8989       
    90         if(!size)_error2_("attempting to realloc to zero");
     90        if(!size)_error_("attempting to realloc to zero");
    9191        value = (void*)realloc(pv,size);
    9292
    9393        if (value == NULL) {
    94                 _error2_("virtual memory exhausted");
     94                _error_("virtual memory exhausted");
    9595        }
    9696        return value;
  • issm/branches/trunk-jpl-damage/src/c/shared/Elements/CoordinateSystemTransform.cpp

    r12878 r13101  
    2222                        case XYEnum:   numdofs+=2; break;
    2323                        case XYZPEnum: numdofs+=4; break;
    24                         default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
     24                        default: _error_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    2525                }
    2626        }
     
    6767                                break;
    6868                        default:
    69                                 _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
     69                                _error_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    7070                }
    7171        }
  • issm/branches/trunk-jpl-damage/src/c/shared/Elements/PddSurfaceMassBalance.cpp

    r12878 r13101  
    8080      if (tstar < PDup){
    8181        pd = 1.;
    82         if (tstar >= -siglimc){ pd = pds[int(tstar/DT + siglim0c)];}}
     82        if (tstar >= -siglimc){ pd = pds[reCast<int,IssmDouble>(tstar/DT + siglim0c)];}}
    8383      else {
    8484        pd = 0.;}
     
    100100      if (tstar >= siglim) {pdd = pdd + tstar*deltm;}
    101101      else if (tstar> -siglim){
    102         pddsig=pdds[int(tstar/DT + siglim0)];
     102        pddsig=pdds[reCast<int,IssmDouble>(tstar/DT + siglim0)];
    103103        pdd = pdd + pddsig*deltm;
    104104        frzndd = frzndd - (tstar-pddsig)*deltm;}
  • issm/branches/trunk-jpl-damage/src/c/shared/Elements/TransformInvStiffnessMatrixCoord.cpp

    r12878 r13101  
    3131                        case XYEnum:   numdofs+=2; break;
    3232                        case XYZPEnum: numdofs+=4; break;
    33                         default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
     33                        default: _error_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    3434                }
    3535        }
  • issm/branches/trunk-jpl-damage/src/c/shared/Elements/TransformLoadVectorCoord.cpp

    r12878 r13101  
    3030                        case XYEnum:   numdofs+=2; break;
    3131                        case XYZPEnum: numdofs+=4; break;
    32                         default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
     32                        default: _error_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    3333                }
    3434        }
  • issm/branches/trunk-jpl-damage/src/c/shared/Elements/TransformSolutionCoord.cpp

    r12878 r13101  
    3131                        case XYEnum:   numdofs+=2; break;
    3232                        case XYZPEnum: numdofs+=4; break;
    33                         default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
     33                        default: _error_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    3434                }
    3535        }
  • issm/branches/trunk-jpl-damage/src/c/shared/Elements/TransformStiffnessMatrixCoord.cpp

    r12878 r13101  
    3131                        case XYEnum:   numdofs+=2; break;
    3232                        case XYZPEnum: numdofs+=4; break;
    33                         default: _error2_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
     33                        default: _error_("Coordinate system " << EnumToStringx(cs_array[i]) << " not supported yet");
    3434                }
    3535        }
  • issm/branches/trunk-jpl-damage/src/c/shared/Exp/DomainOutlineRead.cpp

    r12878 r13101  
    3939        /*open domain outline file for reading: */
    4040        if ((fid=fopen(domainname,"r"))==NULL){
    41                 _error2_("could not find domain file " << domainname);
     41                _error_("could not find domain file " << domainname);
    4242        }
    4343
  • issm/branches/trunk-jpl-damage/src/c/shared/Exp/DomainOutlineWrite.cpp

    r12878 r13101  
    2323        /*open domain outline file for writing: */
    2424        if ((fid=fopen(domainname,"w"))==NULL){
    25                 _error2_("could not open domain file " << domainname);
     25                _error_("could not open domain file " << domainname);
    2626                noerr=0; goto cleanupandreturn;
    2727        }
  • issm/branches/trunk-jpl-damage/src/c/shared/Matrix/MatrixUtils.cpp

    r12878 r13101  
    3636        if (!itrnb) {
    3737                if (nrowb != idimb) {
    38                         _error2_("Matrix A and B inner vectors not equal size.");
     38                        _error_("Matrix A and B inner vectors not equal size.");
    3939                }
    4040                idimc=ncolb;
     
    4242        else {
    4343                if (ncolb != idimb) {
    44                         _error2_("Matrix A and B inner vectors not equal size.");
     44                        _error_("Matrix A and B inner vectors not equal size.");
    4545                }
    4646                idimc=nrowb;
     
    4949        if (!itrnc) {
    5050                if (nrowc != idimc) {
    51                         _error2_("Matrix B and C inner vectors not equal size.");
     51                        _error_("Matrix B and C inner vectors not equal size.");
    5252                }
    5353                idimd=ncolc;
     
    5555        else {
    5656                if (ncolc != idimc) {
    57                         _error2_("Matrix B and C inner vectors not equal size.");
     57                        _error_("Matrix B and C inner vectors not equal size.");
    5858                }
    5959                idimd=nrowc;
     
    124124
    125125        if (ntrma != ntrmb) {
    126                 _error2_("Matrix A and B inner vectors not equal size");
     126                _error_("Matrix A and B inner vectors not equal size");
    127127            noerr=0;   
    128128                return noerr;
     
    175175
    176176        if (!b && nvec) {
    177                 _error2_("No right-hand side for nvec=" << nvec << ".");
     177                _error_("No right-hand side for nvec=" << nvec << ".");
    178178                noerr=0;
    179179                return noerr;
     
    214214                        xDelete<int>(pivrc2);
    215215                        xDelete<int>(pindx);
    216                         _error2_("Pivot " << pivot << " less than machine epsilon");
     216                        _error_("Pivot " << pivot << " less than machine epsilon");
    217217                        noerr=0;
    218218                        return noerr;
     
    349349        /*Compute determinant*/
    350350        Matrix2x2Determinant(&det,A);
    351         if (fabs(det) < DBL_EPSILON) _error2_("Determinant smaller that machine epsilon");
     351        if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon");
    352352
    353353        /*Compute invert*/
     
    374374        /*Compute determinant*/
    375375        Matrix3x3Determinant(&det,A);
    376         if (fabs(det) < DBL_EPSILON) _error2_("Determinant smaller that machine epsilon");
     376        if (fabs(det) < DBL_EPSILON) _error_("Determinant smaller that machine epsilon");
    377377
    378378        /*Compute invert*/
  • issm/branches/trunk-jpl-damage/src/c/shared/Numerics/BrentSearch.cpp

    r12878 r13101  
    4444        iter=0;
    4545        fxmin = (*f)(xmin,optargs);
    46         if (xIsNan<IssmDouble>(fxmin)) _error2_("Function evaluation returned NaN");
     46        if (xIsNan<IssmDouble>(fxmin)) _error_("Function evaluation returned NaN");
    4747        cout<<setprecision(5);
    4848        if(VerboseControl()) _pprintLine_("");
     
    5151        if(VerboseControl()) _pprintLine_("           N/A    "<<setw(12)<<xmin<<"  "<<setw(12)<<fxmin<<"           N/A         boundary");
    5252        fxmax = (*f)(xmax,optargs);
    53         if (xIsNan<IssmDouble>(fxmax)) _error2_("Function evaluation returned NaN");
     53        if (xIsNan<IssmDouble>(fxmax)) _error_("Function evaluation returned NaN");
    5454        if(VerboseControl()) _pprintLine_("           N/A    "<<setw(12)<<xmax<<"  "<<setw(12)<<fxmax<<"           N/A         boundary");
    5555
     
    7575        /*2: call the function to be evaluated*/
    7676        fxbest = (*f)(x,optargs);
    77         if(xIsNan<IssmDouble>(fxbest)) _error2_("Function evaluation returned NaN");
     77        if(xIsNan<IssmDouble>(fxbest)) _error_("Function evaluation returned NaN");
    7878        iter=iter+1;
    7979
     
    159159                //evaluate function on x
    160160                fx = (*f)(x,optargs);
    161                 if(xIsNan<IssmDouble>(fx)) _error2_("Function evaluation returned NaN");
     161                if(xIsNan<IssmDouble>(fx)) _error_("Function evaluation returned NaN");
    162162                iter=iter+1;
    163163
  • issm/branches/trunk-jpl-damage/src/c/shared/Numerics/GaussPoints.cpp

    r12878 r13101  
    16701670                if (iter >= MAX_GAUS_ITER) {
    16711671                        xDelete<IssmPDouble>(work);
    1672                         _error2_("Max iterations exceeded for l=" << MAX_GAUS_ITER);
     1672                        _error_("Max iterations exceeded for l=" << MAX_GAUS_ITER);
    16731673                }
    16741674        }
  • issm/branches/trunk-jpl-damage/src/c/shared/Numerics/IsInputConverged.cpp

    r12878 r13101  
    5353                else eps=0;
    5454        }
    55         else _error2_("convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
     55        else _error_("convergence criterion " << EnumToStringx(criterion_enum) << " not supported yet!");
    5656
    5757        /*Assign output pointers:*/
  • issm/branches/trunk-jpl-damage/src/c/shared/Numerics/OptimalSearch.cpp

    r12878 r13101  
    4141        //get the value of the function at the first boundary
    4242        fx1= (*f)(x1,optargs);
    43         if (xIsNan<IssmDouble>(fx1)) _error2_("Function evaluation returned NaN");
     43        if (xIsNan<IssmDouble>(fx1)) _error_("Function evaluation returned NaN");
    4444        cout<<setprecision(5);
    4545        if(VerboseControl()) _pprintLine_("");
     
    5757                iter++;
    5858                fx2 = (*f)(x2,optargs);
    59                 if (xIsNan<IssmDouble>(fx2)) _error2_("Function evaluation returned NaN");
     59                if (xIsNan<IssmDouble>(fx2)) _error_("Function evaluation returned NaN");
    6060                if(VerboseControl())
    6161                 _pprintLine_("         "<<setw(5)<<iter<<"    "<<setw(12)<<x2<<"  "<<setw(12)<<fx2<<"  "<<(fabs(x2-x1)>fabs(fx2-fx1)?fabs(fx2-fx1):fabs(x2-x1)));
  • issm/branches/trunk-jpl-damage/src/c/shared/Numerics/OptionsFromAnalysis.cpp

    r12878 r13101  
    5757        if (found==-1){
    5858                /*ok, we did not find anything, this is not good! error out: */
    59                 _error2_("could find neither a default analysis  nor analysis " << EnumToStringx(analysis_type));
     59                _error_("could find neither a default analysis  nor analysis " << EnumToStringx(analysis_type));
    6060        }
    6161
  • issm/branches/trunk-jpl-damage/src/c/shared/Numerics/UnitConversion.cpp

    r12946 r13101  
    2929        if(direction_enum==IuToExtEnum) for(i=0;i<numvalues;i++)values[i]=values[i]*scale;
    3030        else if(direction_enum==ExtToIuEnum) for(i=0;i<numvalues;i++)values[i]=values[i]/scale;
    31         else _error2_("wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
     31        else _error_("wrong direction for unit conversion, either IuToExtEnum or ExtToIuEnum. ");
    3232
    3333}
  • issm/branches/trunk-jpl-damage/src/c/shared/Numerics/Verbosity.cpp

    r12878 r13101  
    3434void SetVerbosityLevel(int level){
    3535
    36         if(level<0) _error2_("vebosity level should be a positive integer (user provided " << level << ")");
     36        if(level<0) _error_("vebosity level should be a positive integer (user provided " << level << ")");
    3737
    3838        verbositylevel = level;
  • issm/branches/trunk-jpl-damage/src/c/shared/Numerics/numerics.h

    r12878 r13101  
    1717struct OptPars;
    1818
    19 IssmDouble min(IssmDouble a,IssmDouble b);
    20 IssmDouble max(IssmDouble a,IssmDouble b);
    21 int    min(int a,int b);
    22 int    max(int a,int b);
    23 IssmDouble OptFunc(IssmDouble scalar, OptArgs* optargs);
    24 void   BrentSearch(IssmDouble* psearch_scalar,IssmDouble* pJ,OptPars* optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs* optargs);
    25 void   OptimalSearch(IssmDouble* psearch_scalar,IssmDouble* pJ,OptPars* optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs* optargs);
    26 void   cross(IssmDouble* result,IssmDouble* vector1,IssmDouble* vector2);
    27 void   IsInputConverged(IssmDouble* peps, Input** new_inputs,Input** old_inputs,int num_inputs,int criterion_enum);
    28 void   UnitConversion(IssmDouble* values, int numvalues,int direction_enum, int type_enum);
    29 IssmDouble UnitConversion(IssmDouble value, int direction_enum, int type_enum);
    30 char*  OptionsFromAnalysis(Parameters* parameters,int analysis_type);
    31 void   XZvectorsToCoordinateSystem(IssmDouble* T,IssmDouble* xzvectors);
     19IssmDouble  min(IssmDouble a,IssmDouble b);
     20IssmDouble  max(IssmDouble a,IssmDouble b);
     21int         min(int a,int b);
     22int         max(int a,int b);
     23IssmDouble  OptFunc(IssmDouble scalar, OptArgs *optargs);
     24void        BrentSearch(IssmDouble *psearch_scalar,IssmDouble*pJ,OptPars*optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs*optargs);
     25void        OptimalSearch(IssmDouble *psearch_scalar,IssmDouble*pJ,OptPars*optpars,IssmDouble (*f)(IssmDouble,OptArgs*), OptArgs*optargs);
     26void        cross(IssmDouble *result,IssmDouble*vector1,IssmDouble*vector2);
     27void        IsInputConverged(IssmDouble *peps, Input**new_inputs,Input**old_inputs,int num_inputs,int criterion_enum);
     28void        UnitConversion(IssmDouble *values, int numvalues,int direction_enum, int type_enum);
     29IssmDouble  UnitConversion(IssmDouble value, int direction_enum, int type_enum);
     30char       *OptionsFromAnalysis(Parameters *parameters,int analysis_type);
     31void        XZvectorsToCoordinateSystem(IssmDouble *T,IssmDouble*xzvectors);
     32int         cubic(IssmDouble a, IssmDouble b, IssmDouble c, IssmDouble d, double X[3], int *num);
    3233#ifdef _HAVE_PETSC_
    3334void   PetscOptionsFromAnalysis(Parameters* parameters,int analysis_type);
  • issm/branches/trunk-jpl-damage/src/c/shared/String/DescriptorIndex.cpp

    r12878 r13101  
    2323        /*retrieve first token, separated by underscore: */
    2424        pch = strtok (descriptor,"_");
    25         if(!pch)_error2_("descriptor " << descriptor << " is not correctly formatted!");
     25        if(!pch)_error_("descriptor " << descriptor << " is not correctly formatted!");
    2626
    2727        if (strncmp(pch,"scaled",6)==0){
    2828                /*we have a scaled variable. recover the root: */
    2929                pch = strtok (NULL, "_");
    30                 if(!pch)_error2_("scaled descriptor " << descriptor << " is not correctly formatted!");
     30                if(!pch)_error_("scaled descriptor " << descriptor << " is not correctly formatted!");
    3131                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    3232
     
    4444                /*we have an indexed variable. recover the root: */
    4545                pch = strtok (NULL, "_");
    46                 if(!pch)_error2_("indexed descriptor " << descriptor << " is not correctly formatted!");
     46                if(!pch)_error_("indexed descriptor " << descriptor << " is not correctly formatted!");
    4747                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    4848                /*now recover  the index: */
    4949                pch = strtok (NULL, "_");
    50                 if(!pch)_error2_("indexed descriptor " << descriptor << " is not correctly formatted!");
     50                if(!pch)_error_("indexed descriptor " << descriptor << " is not correctly formatted!");
    5151                sscanf(pch,"%i",pindex);
    5252                return IndexedEnum;
     
    5555                /*we have an indexed variable. recover the root: */
    5656                pch = strtok (NULL, "_");
    57                 if(!pch)_error2_("nodal descriptor " << descriptor << " is not correctly formatted!");
     57                if(!pch)_error_("nodal descriptor " << descriptor << " is not correctly formatted!");
    5858                memcpy(root,pch,(strlen(pch)+1)*sizeof(char));
    5959                /*now recover  the index: */
    6060                pch = strtok (NULL, "_");
    61                 if(!pch)_error2_("nodal descriptor " << descriptor << " is not correctly formatted!");
     61                if(!pch)_error_("nodal descriptor " << descriptor << " is not correctly formatted!");
    6262                sscanf(pch,"%i",pindex);
    6363                return NodalEnum;
  • issm/branches/trunk-jpl-damage/src/c/shared/Threads/LaunchThread.cpp

    r12878 r13101  
    4444
    4545                if(pthread_create(threads+i,NULL,function,(void*)(handles+i))){
    46                         _error2_("pthread_create error");
     46                        _error_("pthread_create error");
    4747                }
    4848        }
    4949        for(i=0;i<num_threads;i++){
    5050                if(pthread_join(threads[i],(void**)&status)){
    51                         _error2_("pthread_join error");
     51                        _error_("pthread_join error");
    5252                }
    5353        }
  • issm/branches/trunk-jpl-damage/src/c/solutions/AdjointCorePointerFromSolutionEnum.cpp

    r12878 r13101  
    3535                        break;
    3636                default:
    37                         _error2_("No adjoint has been implemented for solution " << EnumToStringx(solutiontype) << " yet");
     37                        _error_("No adjoint has been implemented for solution " << EnumToStringx(solutiontype) << " yet");
    3838                        break;
    3939        }
  • issm/branches/trunk-jpl-damage/src/c/solutions/AnalysisConfiguration.cpp

    r12878 r13101  
    110110               
    111111                default:
    112                         _error2_("solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
     112                        _error_("solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
    113113                        break;
    114114        }
  • issm/branches/trunk-jpl-damage/src/c/solutions/CorePointerFromSolutionEnum.cpp

    r12878 r13101  
    2929                        solutioncore=&diagnostic_core;
    3030                        #else
    31                         _error2_("ISSM was not compiled with diagnostic capabilities. Exiting");
     31                        _error_("ISSM was not compiled with diagnostic capabilities. Exiting");
    3232                        #endif
    3333                        break;
     
    3636                        solutioncore=&steadystate_core;
    3737                        #else
    38                         _error2_("ISSM was not compiled with steady state capabilities. Exiting");
     38                        _error_("ISSM was not compiled with steady state capabilities. Exiting");
    3939                        #endif
    4040                        break;
     
    4343                        solutioncore=&thermal_core;
    4444                        #else
    45                         _error2_("ISSM was not compiled with thermal capabilities. Exiting");
     45                        _error_("ISSM was not compiled with thermal capabilities. Exiting");
    4646                        #endif
    4747                        break;
     
    5050                        solutioncore=&enthalpy_core;
    5151                        #else
    52                         _error2_("ISSM was not compiled with thermal capabilities. Exiting");
     52                        _error_("ISSM was not compiled with thermal capabilities. Exiting");
    5353                        #endif
    5454                        break;
     
    5757                        solutioncore=&balancethickness_core;
    5858                        #else
    59                         _error2_("ISSM was not compiled with balanced capabilities. Exiting");
     59                        _error_("ISSM was not compiled with balanced capabilities. Exiting");
    6060                        #endif
    6161                        break;
     
    6464                        solutioncore=&hydrology_core;
    6565                        #else
    66                         _error2_("ISSM was not compiled with hydrology capabilities. Exiting");
     66                        _error_("ISSM was not compiled with hydrology capabilities. Exiting");
    6767                        #endif
    6868                        break;
     
    7171                        solutioncore=&surfaceslope_core;
    7272                        #else
    73                         _error2_("ISSM was not compiled with slope capabilities. Exiting");
     73                        _error_("ISSM was not compiled with slope capabilities. Exiting");
    7474                        #endif
    7575                        break;
     
    7878                        solutioncore=&bedslope_core;
    7979                        #else
    80                         _error2_("ISSM was not compiled with slope capabilities. Exiting");
     80                        _error_("ISSM was not compiled with slope capabilities. Exiting");
    8181                        #endif
    8282                        break;
     
    8585                        solutioncore=&transient_core;
    8686                        #else
    87                         _error2_("ISSM was not compiled with transient capabilities. Exiting");
     87                        _error_("ISSM was not compiled with transient capabilities. Exiting");
    8888                        #endif
    8989                        break;
     
    9292                        solutioncore=&prognostic_core;
    9393                        #else
    94                         _error2_("ISSM was not compiled with prognostic capabilities. Exiting");
     94                        _error_("ISSM was not compiled with prognostic capabilities. Exiting");
    9595                        #endif
    9696                        break;
    9797                default:
    98                         _error2_("solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
     98                        _error_("solution type: " << EnumToStringx(solutiontype) << " not supported yet!");
    9999                        break;
    100100        }
  • issm/branches/trunk-jpl-damage/src/c/solutions/ProcessArguments.cpp

    r12878 r13101  
    1717        char *lockfilename   = NULL;
    1818
    19         if(argc<2)_error2_("Usage error: no solution requested");
     19        if(argc<2)_error_("Usage error: no solution requested");
    2020        *solution_type=StringToEnumx(argv[1]);
    21         if(argc<3)_error2_("Usage error: missing model name");
     21        if(argc<3)_error_("Usage error: missing model name");
    2222        modelname=argv[3];
    2323        binfilename    = xNew<char>(strlen(modelname)+strlen(".bin")   +1); sprintf(binfilename,   "%s%s",modelname,".bin");
  • issm/branches/trunk-jpl-damage/src/c/solutions/WriteLockFile.cpp

    r12878 r13101  
    1717        if(my_rank==0){
    1818                fid=fopen(filename,"w");
    19                 if(fid==NULL) _error2_("error message: could not open lock file " << filename);
     19                if(fid==NULL) _error_("error message: could not open lock file " << filename);
    2020
    2121                /*Close file: */
    22                 if(fclose(fid)!=0) _error2_("could not close lock file " << filename);
     22                if(fclose(fid)!=0) _error_("could not close lock file " << filename);
    2323        }
    2424
  • issm/branches/trunk-jpl-damage/src/c/solutions/control_core.cpp

    r12878 r13101  
    8282                /*Display info*/
    8383                if(VerboseControl()) _pprintLine_("\n" << "   control method step " << n+1 << "/" << nsteps);
    84                 for(i=0;i<num_responses;i++) step_responses[i]=(int)responses[n*num_responses+i];
     84                for(i=0;i<num_responses;i++) step_responses[i]=reCast<int,IssmDouble>(responses[n*num_responses+i]);
    8585                femmodel->parameters->SetParam(step_responses,1,num_responses,StepResponsesEnum);
    8686               
     
    9999
    100100                if(VerboseControl()) _pprintLine_("   optimizing along gradient direction");
    101                 optpars.maxiter=(int)maxiter[n]; optpars.cm_jump=cm_jump[n];
     101                optpars.maxiter=reCast<int,IssmDouble>(maxiter[n]); optpars.cm_jump=cm_jump[n];
    102102                BrentSearch(&search_scalar,J+n,&optpars,&objectivefunction,&optargs);
    103103
  • issm/branches/trunk-jpl-damage/src/c/solutions/controltao_core.cpp

    r12946 r13101  
    1313#include "../solvers/solvers.h"
    1414
    15 #if defined (_HAVE_TAO_) && defined (_HAVE_PETSC_) && (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ == 2)
     15#if defined (_HAVE_TAO_) && defined (_HAVE_PETSC_) && (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ > 1)
    1616#include <tao.h>
    1717
     
    4242        PetscGetArgs(&argc,&args);
    4343        ierr = TaoInitialize(&argc,&args,(char*)0,"");
    44         if(ierr) _error2_("Could not initialize Tao");
     44        if(ierr) _error_("Could not initialize Tao");
    4545
    4646        /*Recover some parameters*/
     
    7575        xdelete(&XU);
    7676
    77         user.J=(double*)xcalloc((maxiter+5),sizeof(double));
     77        user.J=xNewZeroInit<double>(maxiter+5);
    7878        user.femmodel=femmodel;
    7979        TaoSetObjectiveAndGradientRoutine(tao,FormFunctionGradient,(void*)&user);
     
    185185#else
    186186void controltao_core(FemModel* femmodel){
    187         _error2_("TAO not installed or PETSc version not supported");
     187        _error_("TAO not installed or PETSc version not supported");
    188188}
    189189#endif //_HAVE_TAO_
  • issm/branches/trunk-jpl-damage/src/c/solutions/convergence.cpp

    r12878 r13101  
    7272        if (xIsNan<IssmDouble>(res)){
    7373                _pprintLine_("norm nf = " << nF << "f and norm kuold = " << nKUoldF << "f");
    74                 _error2_("mechanical equilibrium convergence criterion is NaN!");
     74                _error_("mechanical equilibrium convergence criterion is NaN!");
    7575        }
    7676
     
    8181        //print
    8282        if(res<eps_res){
    83                 if(VerboseConvergence()) _pprintLine_(setw(50) << left << "   mechanical equilibrium convergence criterion" << res*100 << " < " << eps_res*100 << " %");
     83                if(VerboseConvergence()) _pprintLine_(setw(50)<<left<<"   mechanical equilibrium convergence criterion"<<res*100<< " < "<<eps_res*100<<" %");
    8484                converged=true;
    8585        }
    8686        else{
    87                 if(VerboseConvergence()) _pprintLine_(setw(50) << left << "   mechanical equilibrium convergence criterion" << res*100 << " > " << eps_res*100 << " %");
     87                if(VerboseConvergence()) _pprintLine_(setw(50)<<left<<"   mechanical equilibrium convergence criterion"<<res*100<<" > "<<eps_res*100<<" %");
    8888                converged=false;
    8989        }
     
    9696                ndu=duf->Norm(NORM_TWO); nu=old_uf->Norm(NORM_TWO);
    9797
    98                 if (xIsNan<IssmDouble>(ndu) || xIsNan<IssmDouble>(nu)) _error2_("convergence criterion is NaN!");
     98                if (xIsNan<IssmDouble>(ndu) || xIsNan<IssmDouble>(nu)) _error_("convergence criterion is NaN!");
    9999
    100100                //clean up
     
    121121                duf=old_uf->Duplicate(); old_uf->Copy(duf); duf->AYPX(uf,-1.0);
    122122                ndu=duf->Norm(NORM_TWO); nduinf=duf->Norm(NORM_INF);
    123                 if (xIsNan<IssmDouble>(ndu) || xIsNan<IssmDouble>(nu)) _error2_("convergence criterion is NaN!");
     123                if (xIsNan<IssmDouble>(ndu) || xIsNan<IssmDouble>(nu)) _error_("convergence criterion is NaN!");
    124124
    125125                //clean up
  • issm/branches/trunk-jpl-damage/src/c/solutions/diagnostic_core.cpp

    r12878 r13101  
    2020        bool  ishutter          = false;
    2121        bool  ismacayealpattyn  = false;
     22        bool  isl1l2            = false;
    2223        bool  isstokes          = false;
    2324        bool  isnewton          = false;
     
    3334        femmodel->parameters->FindParam(&ishutter,FlowequationIshutterEnum);
    3435        femmodel->parameters->FindParam(&ismacayealpattyn,FlowequationIsmacayealpattynEnum);
     36        femmodel->parameters->FindParam(&isl1l2,FlowequationIsl1l2Enum);
    3537        femmodel->parameters->FindParam(&isstokes,FlowequationIsstokesEnum);
    3638        femmodel->parameters->FindParam(&isnewton,DiagnosticIsnewtonEnum);
     
    7072        }
    7173
    72         if (ismacayealpattyn ^ isstokes){ // ^ = xor
     74        if ((ismacayealpattyn || isl1l2) ^ isstokes){ // ^ = xor
    7375               
    7476                if(VerboseSolution()) _pprintLine_("   computing velocities");
  • issm/branches/trunk-jpl-damage/src/c/solutions/gradient_core.cpp

    r12878 r13101  
    3737        /*Check that gradient is clean*/
    3838        norm_inf=new_gradient->Norm(NORM_INF);
    39         if(norm_inf<=0)    _error2_("||∂J/∂α||∞ = 0    gradient norm is zero");
    40         if(xIsNan<IssmDouble>(norm_inf))_error2_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
     39        if(norm_inf<=0)    _error_("||∂J/∂α||∞ = 0    gradient norm is zero");
     40        if(xIsNan<IssmDouble>(norm_inf))_error_("||∂J/∂α||∞ = NaN  gradient norm is NaN");
    4141
    4242        /*plug back into inputs: */
  • issm/branches/trunk-jpl-damage/src/c/solutions/hydrology_core.cpp

    r12878 r13101  
    3939                nsteps=1;
    4040        }
    41         else nsteps=(int)((final_time-starttime)/dt);
     41        else nsteps=reCast<int,IssmDouble>((final_time-starttime)/dt);
    4242        time=starttime;
    4343
  • issm/branches/trunk-jpl-damage/src/c/solutions/issm.cpp

    r12878 r13101  
    1414        bool  dakota_analysis,control_analysis,tao_analysis;
    1515
     16        /*AD: */
     17        bool autodiff=false;
     18        #if _ADOLC_VERSION_ == 2
     19        int      tape_stats[11];
     20        #else
     21        size_t   tape_stats[11];
     22        #endif
     23
    1624        /*FemModel: */
    1725        FemModel *femmodel = NULL;
     
    4250        ISSMBOOT();
    4351
     52       
    4453        /*Initialize environments: Petsc, MPI, etc...: */
    4554        #ifdef _HAVE_PETSC_
    4655        ierr=PetscInitialize(&argc,&argv,(char*)0,""); 
    47         if(ierr) _error2_("Could not initialize Petsc");
     56        if(ierr) _error_("Could not initialize Petsc");
    4857        #else
    4958        #ifdef _HAVE_MPI_
     
    100109        femmodel->parameters->FindParam(&tao_analysis,InversionTaoEnum);
    101110        femmodel->parameters->FindParam(&profiling,DebugProfilingEnum);
     111        femmodel->parameters->FindParam(&autodiff,AutodiffIsautodiffEnum);
    102112
    103113        #ifdef _HAVE_MPI_
     
    105115        #else
    106116        finish_init=(IssmPDouble)clock();
     117        #endif
     118       
     119        /*If running AD, then initialize the tape: */
     120        #ifdef _HAVE_ADOLC_
     121        if(autodiff) trace_on(1);
    107122        #endif
    108123
     
    120135                Dakotax(femmodel);
    121136                #else
    122                 _error2_("ISSM was not compiled with dakota support, cannot carry out dakota analysis!");
     137                _error_("ISSM was not compiled with dakota support, cannot carry out dakota analysis!");
    123138                #endif
    124139        }
     
    130145                 control_core(femmodel);
    131146                #else
    132                 _error2_("ISSM was not compiled with control support, cannot carry out dakota analysis!");
     147                _error_("ISSM was not compiled with control support, cannot carry out dakota analysis!");
    133148                #endif
    134149        }
     
    153168        _pprintLine_("write results to disk:");
    154169        OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
     170       
     171        /*If running AD, close our tape, print statistics: {{{*/
     172        #ifdef _HAVE_ADOLC_
     173        if(autodiff){
     174                trace_off();
     175                tapestats(1,tape_stats); //reading of tape statistics
     176                _pprintLine_("   ADOLC statistics: ");
     177                _pprintLine_("   "<<setw(45)<<left<<"Number of independents: " <<tape_stats[0]);
     178                _pprintLine_("   "<<setw(45)<<left<<"Number of dependents: " <<tape_stats[1]);
     179                _pprintLine_("   "<<setw(45)<<left<<"Maximal number of live active variables: " <<tape_stats[2]);
     180                _pprintLine_("   "<<setw(45)<<left<<"Size of value stack (number of overwrites): " <<tape_stats[3]);
     181                _pprintLine_("   "<<setw(45)<<left<<"Buffer size (a multiple of eight): " <<tape_stats[4]);
     182                _pprintLine_("   "<<setw(45)<<left<<"Total number of operations recorded: " <<tape_stats[5]);
     183        }
     184        #endif  /*}}}*/
    155185
    156186        /*Close output and petsc options file and write lock file if requested*/
     
    200230        #endif
    201231        #endif
     232
    202233       
    203234        /*end module: */
  • issm/branches/trunk-jpl-damage/src/c/solutions/kriging.cpp

    r12878 r13101  
    4040#ifdef _HAVE_PETSC_
    4141        int ierr=PetscInitialize(&argc,&argv,(char*)0,""); 
    42         if(ierr) _error2_("Could not initialize Petsc");
     42        if(ierr) _error_("Could not initialize Petsc");
    4343#else
    4444#ifdef _HAVE_MPI_
     
    122122        char *lockfilename   = NULL;
    123123
    124         if(argc<2)_error2_("Usage error: missing model name");
     124        if(argc<2)_error_("Usage error: missing model name");
    125125        modelname=argv[2];
    126126        binfilename    = xNew<char>((strlen(modelname)+strlen(".bin")   +1)); sprintf(binfilename,   "%s%s",modelname,".bin");
  • issm/branches/trunk-jpl-damage/src/c/solutions/objectivefunction.cpp

    r12878 r13101  
    4949        }
    5050        else{
    51                 _error2_("Solution " << EnumToStringx(solution_type) << " not implemented yet");
     51                _error_("Solution " << EnumToStringx(solution_type) << " not implemented yet");
    5252        }
    5353
     
    6666        }
    6767        else{
    68                 _error2_("Solution " << EnumToStringx(solution_type) << " not implemented yet");
     68                _error_("Solution " << EnumToStringx(solution_type) << " not implemented yet");
    6969        }
    7070
  • issm/branches/trunk-jpl-damage/src/c/solutions/steadystate_core.cpp

    r12878 r13101  
    5252                }
    5353                #else
    54                 _error2_("ISSM was not compiled with thermal capabilities. Exiting");
     54                _error_("ISSM was not compiled with thermal capabilities. Exiting");
    5555                #endif
    5656
  • issm/branches/trunk-jpl-damage/src/c/solutions/transient_core.cpp

    r12946 r13101  
    104104                        }
    105105                        #else
    106                         _error2_("ISSM was not compiled with thermal capabilities. Exiting");
     106                        _error_("ISSM was not compiled with thermal capabilities. Exiting");
    107107                        #endif
    108108                }
     
    113113                        diagnostic_core(femmodel);
    114114                        #else
    115                         _error2_("ISSM was not compiled with diagnostic capabilities. Exiting");
     115                        _error_("ISSM was not compiled with diagnostic capabilities. Exiting");
    116116                        #endif
    117117                }
     
    129129                        GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
    130130                        #else
    131                         _error2_("ISSM was not compiled with grounding line migration capabilities. Exiting");
     131                        _error_("ISSM was not compiled with grounding line migration capabilities. Exiting");
    132132                        #endif
    133133                }
  • issm/branches/trunk-jpl-damage/src/c/toolkits/issm/SeqMat.cpp

    r12878 r13101  
    119119                        break;
    120120                default:
    121                         _error2_("unknown norm !");
     121                        _error_("unknown norm !");
    122122                        break;
    123123        }
     
    150150        AX->GetSize(&AXM);
    151151
    152         if(M!=AXM)_error2_("A and AX should have the same number of rows!");
    153         if(N!=XM)_error2_("A and X should have the same number of columns!");
     152        if(M!=AXM)_error_("A and AX should have the same number of rows!");
     153        if(N!=XM)_error_("A and X should have the same number of columns!");
    154154
    155155        for(i=0;i<M;i++){
     
    197197                        break;
    198198                default:
    199                         _error2_("unknown insert mode!");
     199                        _error_("unknown insert mode!");
    200200                        break;
    201201        }
  • issm/branches/trunk-jpl-damage/src/c/toolkits/issm/SeqVec.cpp

    r12878 r13101  
    8585                        break;
    8686                default:
    87                         _error2_("unknown insert mode!");
     87                        _error_("unknown insert mode!");
    8888                        break;
    8989        }
     
    102102                        break;
    103103                default:
    104                         _error2_("unknown insert mode!");
     104                        _error_("unknown insert mode!");
    105105                        break;
    106106        }
     
    204204                        break;
    205205                default:
    206                         _error2_("unknown norm !");
     206                        _error_("unknown norm !");
    207207                        break;
    208208        }
  • issm/branches/trunk-jpl-damage/src/c/toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp

    r12878 r13101  
    6060
    6161        #else
    62         _error2_("METIS version not supported yet");
     62        _error_("METIS version not supported yet");
    6363        #endif
    6464}
  • issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/ISSMToPetscInsertMode.cpp

    r12878 r13101  
    3030                        break;
    3131                default:
    32                         _error2_("unknown insert mode!");
     32                        _error_("unknown insert mode!");
    3333                        break;
    3434        }
  • issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/ISSMToPetscMatrixType.cpp

    r12878 r13101  
    3030                        break;
    3131                default:
    32                         _error2_("unknown matrix type !");
     32                        _error_("unknown matrix type !");
    3333                        break;
    3434        }
  • issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/ISSMToPetscNormMode.cpp

    r12878 r13101  
    3030                        break;
    3131                default:
    32                         _error2_("unknown norm !");
     32                        _error_("unknown norm !");
    3333                        break;
    3434        }
  • issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/MatInvert.cpp

    r12878 r13101  
    2929        /*Some checks: */
    3030        MatGetSize(matrix,&M,&N);
    31         if(M!=N) _error2_("trying to invert a non square matrix!");
     31        if(M!=N) _error_("trying to invert a non square matrix!");
    3232
    3333        /*Create identitiy matrix: */
  • issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/MatPartition.cpp

    r12878 r13101  
    6262                }
    6363                else{
    64                         _error2_("MatType " << type << " not supported yet");
     64                        _error_("MatType " << type << " not supported yet");
    6565                }
    6666                /*Assemble*/
  • issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp

    r12878 r13101  
    5555                        if(first[0]!='-'){
    5656                                /*This is not good, the option does not have '-'! Get out*/
    57                                 _error2_("Option " << first << " should be preceded by '-'!");
     57                                _error_("Option " << first << " should be preceded by '-'!");
    5858                        }
    5959                        /*Reduce first to bare option value*/
  • issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/VecMerge.cpp

    r12878 r13101  
    3535        /*If the dimension of the partitioning vector is not the same as that of vector B, we have a problem: */
    3636        if ( (row_partition_size !=MB) ){
    37                 _error2_("Dimensions of partitioning vector incompatible with dimensions of input vector\n");
     37                _error_("Dimensions of partitioning vector incompatible with dimensions of input vector\n");
    3838        }
    3939
  • issm/branches/trunk-jpl-damage/src/c/toolkits/plapack/patches/PlapackInvertMatrix.cpp

    r12878 r13101  
    5151
    5252        /*Some dimensions checks: */
    53         if (mA!=nA) _error2_("trying to take the invert of a non-square matrix!");
     53        if (mA!=nA) _error_("trying to take the invert of a non-square matrix!");
    5454
    5555        /* Set default Plapack parameters */
  • issm/branches/trunk-jpl-damage/src/m/Makefile.am

    r12946 r13101  
    1 bin_SCRIPTS=./classes/*.m \
    2                                 ./classes/model/*.m \
    3                                 ./classes/clusters/*.m \
    4                                 ./enum/*.m \
    5                                 ./kml/*.m \
    6                                 ./model/*.m \
    7                                 ./model/plot/*.m \
    8                                 ./model/mesh/*.m \
    9                                 ./model/display/*.m \
    10                                 ./model/parameterization/*.m \
    11                                 ./model/partition/*.m \
    12                                 ./model/solvers/*.m \
    13                                 ./qmu/*.m \
    14                                 ./utils/*.m \
    15                                 ./utils/Array/*.m \
    16                                 ./utils/BC/*.m \
    17                                 ./utils/Basins/*.m \
    18                                 ./utils/Cluster/*.m \
    19                                 ./utils/DataProcessing/*.m \
    20                                 ./utils/Ecco3/*.m \
    21                                 ./utils/Exp/*.m \
    22                                 ./utils/Exp/manipulation/*.m \
    23                                 ./utils/Exp/readwrite/*.m \
    24                                 ./utils/Geometry/*.m \
    25                                 ./utils/ImageProcessing/*.m \
    26                                 ./utils/Interp/*.m \
    27                                 ./utils/Kml/*.m \
    28                                 ./utils/LatLong/*.m \
    29                                 ./utils/Math/*.m \
    30                                 ./utils/Meca/*.m \
    31                                 ./utils/Mesh/*.m \
    32                                 ./utils/Miscellaneous/*.m \
    33                                 ./utils/Model/*.m \
    34                                 ./utils/Numerics/*.m \
    35                                 ./utils/OS/*.m \
    36                                 ./utils/Plot/*.m \
    37                                 ./utils/Shell/*.m \
    38                                 ./utils/String/*.m \
    39                                 ./utils/consistency/*.m \
    40                                 ./utils/qmu/*.m
     1#To generate list of directories
     2#
     3#find . -type d -exec ls -d {} \;
     4
     5bin_SCRIPTS= ./qmu/*.m \
     6                                 ./qmu/setupdesign/*.m \
     7                                 ./qmu/plot/*.m \
     8                                 ./qmu/examples/*.m \
     9                                 ./kml/*.m \
     10                                 ./enum/*.m \
     11                                 ./classes/*.m \
     12                                 ./classes/qmu/*.m \
     13                                 ./classes/qmu/@dakota_method/*.m \
     14                                 ./classes/clusters/*.m \
     15                                 ./classes/model/*.m \
     16                                 ./consistency/*.m \
     17                                 ./array/*.m \
     18                                 ./boundaryconditions/*.m \
     19                                 ./exp/*.m \
     20                                 ./exp/manipulation/*.m \
     21                                 ./geometry/*.m \
     22                                 ./interp/*.m \
     23                                 ./latlong/*.m \
     24                                 ./meca/*.m \
     25                                 ./mesh/*.m \
     26                                 ./mesh/planet/*.m \
     27                                 ./mesh/rifts/*.m \
     28                                 ./miscellaneous/*.m \
     29                                 ./os/*.m \
     30                                 ./plot/*.m \
     31                                 ./plot/colormaps/*.m \
     32                                 ./string/*.m \
     33                                 ./contrib/massbalance/*.m \
     34                                 ./contrib/ecco/*.m \
     35                                 ./contrib/hydrology/*.m \
     36                                 ./contrib/hack/*.m \
     37                                 ./contrib/gslib/*.m \
     38                                 ./contrib/uci/*.m \
     39                                 ./contrib/oasis/*.m \
     40                                 ./contrib/bamg/*.m \
     41                                 ./extrusion/*.m \
     42                                 ./inversions/*.m \
     43                                 ./io/*.m \
     44                                 ./parameterization/*.m \
     45                                 ./partition/*.m \
     46                                 ./print/*.m \
     47                                 ./regional/*.m \
     48                                 ./solve/*.m \
     49                                 ./solvers/*.m \
     50                                 ./materials/*.m
  • issm/branches/trunk-jpl-damage/src/m/classes/autodiff.m

    r12878 r13101  
    77        properties (SetAccess=public)
    88                isautodiff = false;
    9                 forward    = true;
    10                 reverse    = false;
    119        end
    1210        methods
     
    2927
    3028                        fielddisplay(obj,'isautodiff','indicates if the automatic differentiation is activated');
    31                         fielddisplay(obj,'forward','forward differentiation');
    32                         fielddisplay(obj,'reverse','backward differentiation');
    3329
    3430                end % }}}
    3531                function marshall(obj,fid) % {{{
    3632                        WriteData(fid,'object',obj,'fieldname','isautodiff','format','Boolean');
    37                         WriteData(fid,'object',obj,'fieldname','forward','format','Boolean');
    38                         WriteData(fid,'object',obj,'fieldname','reverse','format','Boolean');
    3933                end % }}}
    4034        end
  • issm/branches/trunk-jpl-damage/src/m/classes/autodiff.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class autodiff:
     7class autodiff(object):
     8        """
     9        AUTODIFF class definition
     10
     11           Usage:
     12              autodiff=autodiff();
     13        """
     14
    515        #properties
    616        def __init__(self):
    717                # {{{ Properties
    818                self.isautodiff = False
    9                 self.forward    = True
    10                 self.reverse    = False
    1119
    1220                #set defaults
     
    1422
    1523                #}}}
    16         def __repr__(obj):
     24        def __repr__(self):
    1725                # {{{ Display
    1826                string='   automatic differentiation parameters:'
    19                 string="%s\n%s"%(string,fielddisplay(obj,'isautodiff','indicates if the automatic differentiation is activated'))
    20                 string="%s\n%s"%(string,fielddisplay(obj,'forward','forward differentiation'))
    21                 string="%s\n%s"%(string,fielddisplay(obj,'reverse','backward differentiation'))
     27                string="%s\n%s"%(string,fielddisplay(self,'isautodiff','indicates if the automatic differentiation is activated'))
    2228                return string
    2329                #}}}
    24         def setdefaultparameters(obj):
     30        def setdefaultparameters(self):
    2531                # {{{setdefaultparameters
    26                 return obj
     32                return self
    2733        #}}}
    2834
     35        def checkconsistency(self,md,solution,analyses):    # {{{
     36                return md
     37        # }}}
     38
     39        def marshall(self,fid):    # {{{
     40                WriteData(fid,'object',self,'fieldname','isautodiff','format','Boolean')
     41        # }}}
     42
  • issm/branches/trunk-jpl-damage/src/m/classes/balancethickness.m

    r12878 r13101  
    2727                function md = checkconsistency(obj,md,solution,analyses) % {{{
    2828                        %Early return
    29                         if solution~=BalancethicknessSolutionEnum, return; end
     29                        if solution~=BalancethicknessSolutionEnum(), return; end
    3030
    3131                        md = checkfield(md,'balancethickness.spcthickness','forcing',1);
  • issm/branches/trunk-jpl-damage/src/m/classes/balancethickness.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
    3 class balancethickness:
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
     6
     7class balancethickness(object):
     8        """
     9        BALANCETHICKNESS class definition
     10
     11           Usage:
     12              balancethickness=balancethickness();
     13        """
     14
    415        #properties
    516        def __init__(self):
    617                # {{{ Properties
    7                 self.spcthickness = float('NaN')
    8                 self.thickening_rate           = float('NaN')
    9                 self.stabilization           = 0
     18                self.spcthickness      = float('NaN')
     19                self.thickening_rate   = float('NaN')
     20                self.stabilization     = 0
    1021
    1122                #set defaults
     
    1324
    1425                #}}}
    15         def __repr__(obj):
     26        def __repr__(self):
    1627                # {{{ Display
    1728               
    1829                string='   balance thickness solution parameters:'
    1930               
    20                 string="%s\n\n%s"%(string,fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint)'))
    21                 string="%s\n%s"%(string,fielddisplay(obj,'thickening_rate','ice thickening rate used in the mass conservation (dh/dt)'))
    22                 string="%s\n%s"%(string,fielddisplay(obj,'stabilization','0: None, 1: SU, 2: MacAyeal''s artificial diffusivity, 3:DG'))
     31                string="%s\n\n%s"%(string,fielddisplay(self,'spcthickness','thickness constraints (NaN means no constraint)'))
     32                string="%s\n%s"%(string,fielddisplay(self,'thickening_rate','ice thickening rate used in the mass conservation (dh/dt)'))
     33                string="%s\n%s"%(string,fielddisplay(self,'stabilization',"0: None, 1: SU, 2: MacAyeal's artificial diffusivity, 3:DG"))
    2334                return string
    2435                #}}}
    25         def setdefaultparameters(obj):
     36        def setdefaultparameters(self):
    2637                # {{{setdefaultparameters
    2738               
    2839                #Type of stabilization used
    29                 obj.stabilization=1
     40                self.stabilization=1
    3041
    31                 return obj
     42                return self
    3243        #}}}
    3344
     45        def checkconsistency(self,md,solution,analyses):    # {{{
     46                #Early return
     47                if not solution==BalancethicknessSolutionEnum():
     48                        return md
     49
     50                md = checkfield(md,'balancethickness.spcthickness','forcing',1)
     51                md = checkfield(md,'balancethickness.thickening_rate','size',[md.mesh.numberofvertices],'NaN',1)
     52                md = checkfield(md,'balancethickness.stabilization','size',[1],'values',[0,1,2,3])
     53
     54                return md
     55        # }}}
     56
     57        def marshall(self,fid):    # {{{
     58                WriteData(fid,'object',self,'fieldname','spcthickness','format','DoubleMat','mattype',1)
     59                WriteData(fid,'object',self,'fieldname','thickening_rate','format','DoubleMat','mattype',1)
     60                WriteData(fid,'object',self,'fieldname','stabilization','format','Integer')
     61        # }}}
     62
  • issm/branches/trunk-jpl-damage/src/m/classes/basalforcings.m

    r12878 r13101  
    2424                function md = checkconsistency(obj,md,solution,analyses) % {{{
    2525
    26                         if ismember(PrognosticAnalysisEnum,analyses) & ~(solution==TransientSolutionEnum & md.transient.isprognostic==0),
     26                        if ismember(PrognosticAnalysisEnum(),analyses) & ~(solution==TransientSolutionEnum() & md.transient.isprognostic==0),
    2727                                md = checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1);
    2828                        end
    29                         if ismember(BalancethicknessAnalysisEnum,analyses),
     29                        if ismember(BalancethicknessAnalysisEnum(),analyses),
    3030                                md = checkfield(md,'basalforcings.melting_rate','NaN',1,'size',[md.mesh.numberofvertices 1]);
    3131                        end
    32                         if ismember(ThermalAnalysisEnum,analyses) & ~(solution==TransientSolutionEnum & md.transient.isthermal==0),
     32                        if ismember(ThermalAnalysisEnum(),analyses) & ~(solution==TransientSolutionEnum() & md.transient.isthermal==0),
    3333                                md = checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1);
    3434                                md = checkfield(md,'basalforcings.geothermalflux','NaN',1,'forcing',1,'>=',0);
  • issm/branches/trunk-jpl-damage/src/m/classes/basalforcings.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class basalforcings:
     7class basalforcings(object):
     8        """
     9        BASAL FORCINGS class definition
     10
     11           Usage:
     12              basalforcings=basalforcings();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1424
    1525                #}}}
    16         def __repr__(obj):
     26        def __repr__(self):
    1727                # {{{ Display
    1828                string="   basal forcings parameters:"
    1929
    20                 string="%s\n\n%s"%(string,fielddisplay(obj,"melting_rate","basal melting rate (positive if melting)"))
    21                 string="%s\n%s"%(string,fielddisplay(obj,"melting_rate_correction","additional melting applied when the grounding line retreats"))
    22                 string="%s\n%s"%(string,fielddisplay(obj,"geothermalflux","geothermal heat flux [W/m^2]"))
     30                string="%s\n\n%s"%(string,fielddisplay(self,"melting_rate","basal melting rate (positive if melting)"))
     31                string="%s\n%s"%(string,fielddisplay(self,"melting_rate_correction","additional melting applied when the grounding line retreats"))
     32                string="%s\n%s"%(string,fielddisplay(self,"geothermalflux","geothermal heat flux [W/m^2]"))
    2333                return string
    2434                #}}}
    25         def setdefaultparameters(obj):
     35        def setdefaultparameters(self):
    2636                # {{{setdefaultparameters
    27                 return obj
     37                return self
    2838        #}}}
    2939
     40        def checkconsistency(self,md,solution,analyses):    # {{{
     41
     42                if PrognosticAnalysisEnum() in analyses and not (solution==TransientSolutionEnum() and not md.transient.isprognostic):
     43                        md = checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1)
     44
     45                if BalancethicknessAnalysisEnum() in analyses:
     46                        md = checkfield(md,'basalforcings.melting_rate','NaN',1,'size',[md.mesh.numberofvertices])
     47
     48                if ThermalAnalysisEnum() in analyses and not (solution==TransientSolutionEnum() and not md.transient.isthermal):
     49                        md = checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1)
     50                        md = checkfield(md,'basalforcings.geothermalflux','NaN',1,'forcing',1,'>=',0)
     51
     52                return md
     53        # }}}
     54
     55        def marshall(self,fid):    # {{{
     56                WriteData(fid,'object',self,'fieldname','melting_rate','format','DoubleMat','mattype',1)
     57                WriteData(fid,'object',self,'fieldname','melting_rate_correction','format','DoubleMat','mattype',1)
     58                WriteData(fid,'object',self,'fieldname','geothermalflux','format','DoubleMat','mattype',1)
     59        # }}}
     60
  • issm/branches/trunk-jpl-damage/src/m/classes/clusters/generic.m

    r12878 r13101  
    7777                                        %Add --gen-suppressions=all to get suppression lines
    7878                                        fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib);
    79                                         fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
     79                                        if ismac,
     80                                                fprintf(fid,'mpiexec -np %i %s --leak-check=full --dsymutil=yes --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
    8081                                                cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     82                                        else
     83                                                fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
     84                                                cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     85                                        end
    8186                                end
    8287                                if ~io_gather, %concatenate the output files:
  • issm/branches/trunk-jpl-damage/src/m/classes/clusters/generic.py

    r12946 r13101  
    44import platform
    55import subprocess
     6from EnumToString import EnumToString
    67from issmdir import *
    78from pairoptions import *
     
    7374
    7475                #write queuing script
    75                 if not 'Windows' in platform.system():
     76                if 'Windows' not in platform.system():
    7677
    7778                        fid=open(modelname+'.queue','w')
     
    7980                        if not isvalgrind:
    8081                                if self.interactive:
    81                                         fid.write('mpiexec -np %i %s/issm.exe %s %s %s ' % (self.np,self.codepath,EnumToString(solution),self.executionpath,modelname))
     82                                        fid.write('mpiexec -np %i %s/issm.exe %s %s %s ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,modelname))
    8283                                else:
    83                                         fid.write('mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ' % (self.np,self.codepath,EnumToString(solution),self.executionpath,modelname,modelname,modelname))
     84                                        fid.write('mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ' % (self.np,self.codepath,EnumToString(solution)[0],self.executionpath,modelname,modelname,modelname))
    8485                        elif isgprof:
    8586                                fid.write('\n gprof %s/issm.exe gmon.out > %s.performance' % (self.codepath,modelname))
     
    8889                                fid.write('LD_PRELOAD=%s \\\n' % self.valgrindlib)
    8990                                fid.write('mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ' % \
    90                                         (self.np,self.valgrind,self.valgrindsup,self.codepath,EnumToString(solution),self.executionpath,modelname,modelname,modelname))
     91                                        (self.np,self.valgrind,self.valgrindsup,self.codepath,EnumToString(solution)[0],self.executionpath,modelname,modelname,modelname))
    9192                        if not io_gather:    #concatenate the output files:
    9293                                fid.write('\ncat %s.outbin.* > %s.outbin' % (modelname,modelname))
     
    9899                        fid.write('@echo off\n')
    99100                        if self.interactive:
    100                                 fid.write('"%s/issm.exe" %s "%s" %s ' % (self.codepath,EnumToString(solution),self.executionpath,modelname))
     101                                fid.write('"%s/issm.exe" %s "%s" %s ' % (self.codepath,EnumToString(solution)[0],self.executionpath,modelname))
    101102                        else:
    102103                                fid.write('"%s/issm.exe" %s "%s" %s 2> %s.errlog >%s.outlog' % \
    103                                         (self.codepath,EnumToString(solution),self.executionpath,modelname,modelname,modelname))
     104                                        (self.codepath,EnumToString(solution)[0],self.executionpath,modelname,modelname,modelname))
    104105                        fid.close()
    105106
     
    115116
    116117                #write queuing script
    117                 if not 'Windows' in platform.system():
     118                if 'Windows' not in platform.system():
    118119
    119120                        fid=open(modelname+'.queue','w')
     
    140141                        fid.write('@echo off\n')
    141142                        if self.interactive:
    142                                 fid.write('"%s/issm.exe" %s "%s" %s ' % (self.codepath,EnumToString(solution),self.executionpath,modelname))
     143                                fid.write('"%s/issm.exe" %s "%s" %s ' % (self.codepath,EnumToString(solution)[0],self.executionpath,modelname))
    143144                        else:
    144145                                fid.write('"%s/issm.exe" %s "%s" %s 2> %s.errlog >%s.outlog' % \
    145                                         (self.codepath,EnumToString(solution),self.executionpath,modelname,modelname,modelname))
     146                                        (self.codepath,EnumToString(solution)[0],self.executionpath,modelname,modelname,modelname))
    146147                        fid.close()
    147148
  • issm/branches/trunk-jpl-damage/src/m/classes/constants.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class constants:
     7class constants(object):
     8        """
     9        CONSTANTS class definition
     10
     11           Usage:
     12              constants=constants();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1424
    1525                #}}}
    16         def __repr__(obj):
     26        def __repr__(self):
    1727                # {{{ Display
    1828                string="   constants parameters:"
    19                 string="%s\n\n%s"%(string,fielddisplay(obj,"g","gravitational acceleration"))
    20                 string="%s\n%s"%(string,fielddisplay(obj,"yts","number of seconds in a year"))
    21                 string="%s\n%s"%(string,fielddisplay(obj,"referencetemperature","reference temperature used in the enthalpy model"))
     29                string="%s\n\n%s"%(string,fielddisplay(self,"g","gravitational acceleration"))
     30                string="%s\n%s"%(string,fielddisplay(self,"yts","number of seconds in a year"))
     31                string="%s\n%s"%(string,fielddisplay(self,"referencetemperature","reference temperature used in the enthalpy model"))
    2232
    2333
     
    2535                #}}}
    2636               
    27         def setdefaultparameters(obj):
     37        def setdefaultparameters(self):
    2838                # {{{setdefaultparameters
    2939               
    3040                #acceleration due to gravity (m/s^2)
    31                 obj.g=9.81
     41                self.g=9.81
    3242
    3343                #converstion from year to seconds
    34                 obj.yts=365*24*3600
     44                self.yts=365*24*3600
    3545
    3646                #the reference temperature for enthalpy model (cf Aschwanden)
    37                 obj.referencetemperature=223.15
     47                self.referencetemperature=223.15
    3848
    39                 return obj
     49                return self
    4050        #}}}
    4151
     52        def checkconsistency(self,md,solution,analyses):    # {{{
     53
     54                md = checkfield(md,'constants.g','>',0,'size',[1])
     55                md = checkfield(md,'constants.yts','>',0,'size',[1])
     56                md = checkfield(md,'constants.referencetemperature','size',[1])
     57
     58                return md
     59        # }}}
     60
     61        def marshall(self,fid):    # {{{
     62                WriteData(fid,'object',self,'fieldname','g','format','Double')
     63                WriteData(fid,'object',self,'fieldname','yts','format','Double')
     64                WriteData(fid,'object',self,'fieldname','referencetemperature','format','Double')
     65        # }}}
     66
  • issm/branches/trunk-jpl-damage/src/m/classes/debug.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from WriteData import *
    34
    4 class debug:
     5class debug(object):
     6        """
     7        DEBUG class definition
     8
     9           Usage:
     10              debug=debug();
     11        """
     12
    513        #properties
    614        def __init__(self):
    715                # {{{ Properties
    8                 self.valgrind=False
    9                 self.gprof   = False
     16                self.valgrind  = False
     17                self.gprof     = False
     18                self.profiling = False
    1019               
    1120                #set defaults
     
    1322
    1423                #}}}
    15         def __repr__(obj):
     24        def __repr__(self):
    1625                # {{{ Display
    1726                string="   debug parameters:"
    1827
    19                 string="%s\n\n%s"%(string,fielddisplay(obj,"valgrind","use Valgrind to debug (0 or 1)"))
    20                 string="%s\n%s"%(string,fielddisplay(obj,"gprof","use gnu-profiler to find out where the time is spent"))
     28                string="%s\n\n%s"%(string,fielddisplay(self,"valgrind","use Valgrind to debug (0 or 1)"))
     29                string="%s\n%s"%(string,fielddisplay(self,"gprof","use gnu-profiler to find out where the time is spent"))
     30                string="%s\n%s"%(string,fielddisplay(self,'profiling','enables profiling (memory, flops, time)'))
    2131                return string
    2232                #}}}
    2333               
    24         def setdefaultparameters(obj):
     34        def setdefaultparameters(self):
    2535                # {{{setdefaultparameters
    26                 return obj
     36                return self
    2737        #}}}
    2838
     39        def marshall(self,fid):    # {{{
     40                WriteData(fid,'object',self,'fieldname','profiling','format','Boolean')
     41        # }}}
     42
  • issm/branches/trunk-jpl-damage/src/m/classes/diagnostic.m

    r12946 r13101  
    6767
    6868                        %Early return
    69                         if ~ismember(DiagnosticHorizAnalysisEnum,analyses), return; end
    70                         %if ~ismember(DiagnosticHorizAnalysisEnum,analyses) |  (solution==TransientSolutionEnum & md.transient.isdiagnostic==0), return; end
     69                        if ~ismember(DiagnosticHorizAnalysisEnum(),analyses), return; end
     70                        %if ~ismember(DiagnosticHorizAnalysisEnum(),analyses) |  (solution==TransientSolutionEnum() & md.transient.isdiagnostic==0), return; end
    7171
    7272                        md = checkfield(md,'diagnostic.spcvx','forcing',1);
     
    7676                        md = checkfield(md,'diagnostic.reltol','size',[1 1]);
    7777                        md = checkfield(md,'diagnostic.abstol','size',[1 1]);
    78                         md = checkfield(md,'diagnostic.isnewton','numel',1,'values',[0 1]);
     78                        md = checkfield(md,'diagnostic.isnewton','numel',[1],'values',[0 1]);
    7979                        md = checkfield(md,'diagnostic.stokesreconditioning','size',[1 1],'NaN',1);
    8080                        md = checkfield(md,'diagnostic.viscosity_overshoot','size',[1 1],'NaN',1);
     
    102102                        if any(sum(isnan(md.diagnostic.referential),2)==0),
    103103                                pos=find(sum(isnan(md.diagnostic.referential),2)==0);
    104                                 if any(abs(dot(md.diagnostic.referential(pos,1:3)',md.diagnostic.referential(pos,4:6)'))>eps),
    105                                         md = checkmessage(md,['Vectors in diagnostic.referential (colums 1 to 3 and 4 to 6) must be orthogonal']);
     104                                if any(abs(dot(md.diagnostic.referential(pos,1:3),md.diagnostic.referential(pos,4:6),2))>eps),
     105                                        md = checkmessage(md,['Vectors in diagnostic.referential (columns 1 to 3 and 4 to 6) must be orthogonal']);
    106106                                end
    107107                        end
     
    168168                        %marshall ice front
    169169                        data=obj.icefront;
    170                         pos=find(data(:,end)==0); data(pos,end)=AirEnum;
    171                         pos=find(data(:,end)==1); data(pos,end)=WaterEnum;
    172                         pos=find(data(:,end)==2); data(pos,end)=IceEnum;
    173                         WriteData(fid,'data',data,'enum',DiagnosticIcefrontEnum,'format','DoubleMat','mattype',3);
     170                        pos=find(data(:,end)==0); data(pos,end)=AirEnum();
     171                        pos=find(data(:,end)==1); data(pos,end)=WaterEnum();
     172                        pos=find(data(:,end)==2); data(pos,end)=IceEnum();
     173                        WriteData(fid,'data',data,'enum',DiagnosticIcefrontEnum(),'format','DoubleMat','mattype',3);
    174174                end % }}}
    175175        end
  • issm/branches/trunk-jpl-damage/src/m/classes/diagnostic.py

    r12168 r13101  
    11#module imports
     2import numpy
     3import sys
    24from fielddisplay import fielddisplay
     5from EnumDefinitions import *
     6from checkfield import *
     7from WriteData import *
    38
    4 class diagnostic:
     9class diagnostic(object):
     10        """
     11        DIAGNOSTIC class definition
     12
     13           Usage:
     14              diagnostic=diagnostic();
     15        """
     16
    517        #properties
    618        def __init__(self):
     
    2941
    3042                #}}}
    31         def __repr__(obj):
     43        def __repr__(self):
    3244                # {{{ Display
    33                
    3445               
    3546                string='\n   Diagnostic solution parameters:'
    3647                string="%s\n\n%s"%(string,'      Convergence criteria:')
    3748                       
    38                 string="%s\n%s"%(string,fielddisplay(obj,'restol','mechanical equilibrium residual convergence criterion'))
    39                 string="%s\n%s"%(string,fielddisplay(obj,'reltol','velocity relative convergence criterion, NaN -> not applied'))
    40                 string="%s\n%s"%(string,fielddisplay(obj,'abstol','velocity absolute convergence criterion, NaN -> not applied'))
    41                 string="%s\n%s"%(string,fielddisplay(obj,'isnewton','Apply Newton''s method instead of a Picard fixed point method'))
    42                 string="%s\n%s"%(string,fielddisplay(obj,'maxiter','maximum number of nonlinear iterations'))
    43                 string="%s\n%s"%(string,fielddisplay(obj,'viscosity_overshoot','over-shooting constant new=new+C*(new-old)'))
     49                string="%s\n%s"%(string,fielddisplay(self,'restol','mechanical equilibrium residual convergence criterion'))
     50                string="%s\n%s"%(string,fielddisplay(self,'reltol','velocity relative convergence criterion, NaN -> not applied'))
     51                string="%s\n%s"%(string,fielddisplay(self,'abstol','velocity absolute convergence criterion, NaN -> not applied'))
     52                string="%s\n%s"%(string,fielddisplay(self,'isnewton',"Apply Newton's method instead of a Picard fixed point method"))
     53                string="%s\n%s"%(string,fielddisplay(self,'maxiter','maximum number of nonlinear iterations'))
     54                string="%s\n%s"%(string,fielddisplay(self,'viscosity_overshoot','over-shooting constant new=new+C*(new-old)'))
    4455
    4556                string="%s\n%s"%(string,'      boundary conditions:')
    4657
    47                 string="%s\n%s"%(string,fielddisplay(obj,'spcvx','x-axis velocity constraint (NaN means no constraint)'))
    48                 string="%s\n%s"%(string,fielddisplay(obj,'spcvy','y-axis velocity constraint (NaN means no constraint)'))
    49                 string="%s\n%s"%(string,fielddisplay(obj,'spcvz','z-axis velocity constraint (NaN means no constraint)'))
    50                 string="%s\n%s"%(string,fielddisplay(obj,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice'))
     58                string="%s\n%s"%(string,fielddisplay(self,'spcvx','x-axis velocity constraint (NaN means no constraint)'))
     59                string="%s\n%s"%(string,fielddisplay(self,'spcvy','y-axis velocity constraint (NaN means no constraint)'))
     60                string="%s\n%s"%(string,fielddisplay(self,'spcvz','z-axis velocity constraint (NaN means no constraint)'))
     61                string="%s\n%s"%(string,fielddisplay(self,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice'))
    5162
    5263                string="%s\n%s"%(string,'      Rift options:')
    53                 string="%s\n%s"%(string,fielddisplay(obj,'rift_penalty_threshold','threshold for instability of mechanical constraints'))
    54                 string="%s\n%s"%(string,fielddisplay(obj,'rift_penalty_lock','number of iterations before rift penalties are locked'))
     64                string="%s\n%s"%(string,fielddisplay(self,'rift_penalty_threshold','threshold for instability of mechanical constraints'))
     65                string="%s\n%s"%(string,fielddisplay(self,'rift_penalty_lock','number of iterations before rift penalties are locked'))
    5566
    5667                string="%s\n%s"%(string,'      Penalty options:')
    57                 string="%s\n%s"%(string,fielddisplay(obj,'penalty_factor','offset used by penalties: penalty = Kmax*10^offset'))
    58                 string="%s\n%s"%(string,fielddisplay(obj,'vertex_pairing','pairs of vertices that are penalized'))
     68                string="%s\n%s"%(string,fielddisplay(self,'penalty_factor','offset used by penalties: penalty = Kmax*10^offset'))
     69                string="%s\n%s"%(string,fielddisplay(self,'vertex_pairing','pairs of vertices that are penalized'))
    5970
    6071                string="%s\n%s"%(string,'      Other:')
    61                 string="%s\n%s"%(string,fielddisplay(obj,'shelf_dampening','use dampening for floating ice ? Only for Stokes model'))
    62                 string="%s\n%s"%(string,fielddisplay(obj,'stokesreconditioning','multiplier for incompressibility equation. Only for Stokes model'))
    63                 string="%s\n%s"%(string,fielddisplay(obj,'referential','local referential'))
    64                 string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','additional outputs requested'))
     72                string="%s\n%s"%(string,fielddisplay(self,'shelf_dampening','use dampening for floating ice ? Only for Stokes model'))
     73                string="%s\n%s"%(string,fielddisplay(self,'stokesreconditioning','multiplier for incompressibility equation. Only for Stokes model'))
     74                string="%s\n%s"%(string,fielddisplay(self,'referential','local referential'))
     75                string="%s\n%s"%(string,fielddisplay(self,'requested_outputs','additional outputs requested'))
    6576
    6677                return string
    6778                #}}}
    6879               
    69         def setdefaultparameters(obj):
     80        def setdefaultparameters(self):
    7081                # {{{setdefaultparameters
    7182                #maximum of non-linear iterations.
    72                 obj.maxiter=100
     83                self.maxiter=100
    7384
    7485                #Convergence criterion: absolute, relative and residual
    75                 obj.restol=10**-4;
    76                 obj.reltol=0.01
    77                 obj.abstol=10
     86                self.restol=10**-4
     87                self.reltol=0.01
     88                self.abstol=10
    7889
    79                 obj.stokesreconditioning=10**13
    80                 obj.shelf_dampening=0
     90                self.stokesreconditioning=10**13
     91                self.shelf_dampening=0
    8192
    8293                #Penalty factor applied kappa=max(stiffness matrix)*10^penalty_factor
    83                 obj.penalty_factor=3
     94                self.penalty_factor=3
    8495
    8596                #coefficient to update the viscosity between each iteration of
    8697                #a diagnostic according to the following formula
    8798                #viscosity(n)=viscosity(n)+viscosity_overshoot(viscosity(n)-viscosity(n-1))
    88                 obj.viscosity_overshoot=0
     99                self.viscosity_overshoot=0
    89100
    90101                #Stop the iterations of rift if below a threshold
    91                 obj.rift_penalty_threshold=0
     102                self.rift_penalty_threshold=0
    92103
    93104                #in some solutions, it might be needed to stop a run when only
    94105                #a few constraints remain unstable. For thermal computation, this
    95106                #parameter is often used.
    96                 obj.rift_penalty_lock=10
     107                self.rift_penalty_lock=10
    97108
    98                 return obj
     109                return self
    99110        #}}}
     111
     112        def checkconsistency(self,md,solution,analyses):    # {{{
     113
     114                #Early return
     115                if DiagnosticHorizAnalysisEnum() not in analyses:
     116                        return md
     117                #if (DiagnosticHorizAnalysisEnum() not in analyses) | (solution==TransientSolutionEnum() and not md.transient.isdiagnostic):
     118                #       return md
     119
     120                md = checkfield(md,'diagnostic.spcvx','forcing',1)
     121                md = checkfield(md,'diagnostic.spcvy','forcing',1)
     122                if md.mesh.dimension==3:
     123                        md = checkfield(md,'diagnostic.spcvz','forcing',1)
     124                md = checkfield(md,'diagnostic.restol','size',[1],'>',0)
     125                md = checkfield(md,'diagnostic.reltol','size',[1])
     126                md = checkfield(md,'diagnostic.abstol','size',[1])
     127                md = checkfield(md,'diagnostic.isnewton','numel',[1],'values',[0,1])
     128                md = checkfield(md,'diagnostic.stokesreconditioning','size',[1],'NaN',1)
     129                md = checkfield(md,'diagnostic.viscosity_overshoot','size',[1],'NaN',1)
     130                if md.mesh.dimension==2:
     131                        md = checkfield(md,'diagnostic.icefront','size',[float('NaN'),4],'NaN',1)
     132                else:
     133                        md = checkfield(md,'diagnostic.icefront','size',[float('NaN'),6],'NaN',1)
     134                md = checkfield(md,'diagnostic.icefront[:,-1]','values',[0,1,2])
     135                md = checkfield(md,'diagnostic.maxiter','size',[1],'>=',1)
     136                md = checkfield(md,'diagnostic.referential','size',[md.mesh.numberofvertices,6])
     137                if not md.diagnostic.requested_outputs:
     138                        md = checkfield(md,'diagnostic.requested_outputs','size',[float('NaN'),1])
     139
     140                #singular solution
     141#               if ~any((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy))==2),
     142                if not numpy.any(numpy.logical_and(numpy.logical_not(numpy.isnan(md.diagnostic.spcvx)),numpy.logical_not(numpy.isnan(md.diagnostic.spcvy)))):
     143                        md.checkmessage("model is not well posed (singular). You need at least one node with fixed velocity!")
     144                #CHECK THAT EACH LINES CONTAINS ONLY NAN VALUES OR NO NAN VALUES
     145#               if any(sum(isnan(md.diagnostic.referential),2)~=0 & sum(isnan(md.diagnostic.referential),2)~=6),
     146                if numpy.any(numpy.logical_and(numpy.sum(numpy.isnan(md.diagnostic.referential),axis=1)!=0,numpy.sum(numpy.isnan(md.diagnostic.referential),axis=1)!=6)):
     147                        md.checkmessage("Each line of diagnostic.referential should contain either only NaN values or no NaN values")
     148                #CHECK THAT THE TWO VECTORS PROVIDED ARE ORTHOGONAL
     149#               if any(sum(isnan(md.diagnostic.referential),2)==0),
     150                if numpy.any(numpy.sum(numpy.isnan(md.diagnostic.referential),axis=1)==0):
     151                        pos=[i for i,item in enumerate(numpy.sum(numpy.isnan(md.diagnostic.referential),axis=1)) if item==0]
     152#                       numpy.inner (and numpy.dot) calculate all the dot product permutations, resulting in a full matrix multiply
     153#                       if numpy.any(numpy.abs(numpy.inner(md.diagnostic.referential[pos,0:2],md.diagnostic.referential[pos,3:5]).diagonal())>sys.float_info.epsilon):
     154#                               md.checkmessage("Vectors in diagnostic.referential (columns 1 to 3 and 4 to 6) must be orthogonal")
     155                        for item in md.diagnostic.referential[pos,:]:
     156                                if numpy.abs(numpy.inner(item[0:2],item[3:5]))>sys.float_info.epsilon:
     157                                        md.checkmessage("Vectors in diagnostic.referential (columns 1 to 3 and 4 to 6) must be orthogonal")
     158                #CHECK THAT NO rotation specified for FS Grounded ice at base
     159#               if md.mesh.dimension==3 & md.flowequation.isstokes,
     160                if md.mesh.dimension==3 and md.flowequation.isstokes:
     161                        pos=numpy.nonzero(numpy.logical_and(md.mask.vertexongroundedice,md.mesh.vertexonbed))
     162                        if numpy.any(numpy.logical_not(numpy.isnan(md.diagnostic.referential[pos,:]))):
     163                                md.checkmessage("no referential should be specified for basal vertices of grounded ice")
     164
     165                return md
     166        # }}}
     167
     168        def marshall(self,fid):    # {{{
     169                WriteData(fid,'object',self,'fieldname','spcvx','format','DoubleMat','mattype',1)
     170                WriteData(fid,'object',self,'fieldname','spcvy','format','DoubleMat','mattype',1)
     171                WriteData(fid,'object',self,'fieldname','spcvz','format','DoubleMat','mattype',1)
     172                WriteData(fid,'object',self,'fieldname','restol','format','Double')
     173                WriteData(fid,'object',self,'fieldname','reltol','format','Double')
     174                WriteData(fid,'object',self,'fieldname','abstol','format','Double')
     175                WriteData(fid,'object',self,'fieldname','isnewton','format','Boolean')
     176                WriteData(fid,'object',self,'fieldname','stokesreconditioning','format','Double')
     177                WriteData(fid,'object',self,'fieldname','viscosity_overshoot','format','Double')
     178                WriteData(fid,'object',self,'fieldname','maxiter','format','Integer')
     179                WriteData(fid,'object',self,'fieldname','shelf_dampening','format','Integer')
     180                WriteData(fid,'object',self,'fieldname','vertex_pairing','format','DoubleMat','mattype',3)
     181                WriteData(fid,'object',self,'fieldname','penalty_factor','format','Double')
     182                WriteData(fid,'object',self,'fieldname','rift_penalty_lock','format','Integer')
     183                WriteData(fid,'object',self,'fieldname','rift_penalty_threshold','format','Integer')
     184                WriteData(fid,'object',self,'fieldname','referential','format','DoubleMat','mattype',1)
     185                WriteData(fid,'object',self,'fieldname','requested_outputs','format','DoubleMat','mattype',3)
     186
     187                #marshall ice front
     188                data=self.icefront
     189                data[[i for i,item in enumerate(data[:,-1]) if item==0],-1]=AirEnum()
     190                data[[i for i,item in enumerate(data[:,-1]) if item==1],-1]=WaterEnum()
     191                data[[i for i,item in enumerate(data[:,-1]) if item==2],-1]=IceEnum()
     192                WriteData(fid,'data',data,'enum',DiagnosticIcefrontEnum(),'format','DoubleMat','mattype',3)
     193        # }}}
     194
  • issm/branches/trunk-jpl-damage/src/m/classes/flaim.m

    r12878 r13101  
    3535
    3636                        %Early return
    37                         if solution~=FlaimSolutionEnum, return; end
     37                        if solution~=FlaimSolutionEnum(), return; end
    3838
    3939                        md = checkfield(md,'flaim.tracks','file',1);
  • issm/branches/trunk-jpl-damage/src/m/classes/flaim.py

    r12168 r13101  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
     4from EnumDefinitions import *
     5from checkfield import *
     6from WriteData import *
    37
    4 class flaim:
     8class flaim(object):
     9        """
     10        FLAIM class definition
     11
     12           Usage:
     13              flaim=flaim();
     14        """
     15
    516        #properties
    617        def __init__(self):
     
    2031                self.opt_niter          = 30000
    2132                #}}}
    22         def __repr__(obj):
     33        def __repr__(self):
    2334                # {{{ Displa
    2435                string='   FLAIM - Flight Line Adaptation using Ice sheet Modeling:'
    2536
    2637                string="%s\n\n%s"%(string,'      Input:')
    27                 string="%s\n%s"%(string,fielddisplay(obj,'targets'            ,'name of kml output targets file '))
    28                 string="%s\n%s"%(string,fielddisplay(obj,'tracks'             ,'name of kml input tracks file '))
    29                 string="%s\n%s"%(string,fielddisplay(obj,'flightreqs'         ,'structure of kml flight requirements (not used yet)'))
    30                 string="%s\n%s"%(string,fielddisplay(obj,'criterion'          ,'element or nodal criterion for flight path evaluation (metric)'))
     38                string="%s\n%s"%(string,fielddisplay(self,'targets'            ,'name of kml output targets file '))
     39                string="%s\n%s"%(string,fielddisplay(self,'tracks'             ,'name of kml input tracks file '))
     40                string="%s\n%s"%(string,fielddisplay(self,'flightreqs'         ,'structure of kml flight requirements (not used yet)'))
     41                string="%s\n%s"%(string,fielddisplay(self,'criterion'          ,'element or nodal criterion for flight path evaluation (metric)'))
    3142
    3243                string="%s\n\n%s"%(string,'      Arguments:')
    33                 string="%s\n%s"%(string,fielddisplay(obj,'gridsatequator'     ,'number of grids at equator (determines resolution)'))
    34                 string="%s\n%s"%(string,fielddisplay(obj,'usevalueordering'   ,'flag to consider target values for flight path evaluation'))
    35                 string="%s\n%s"%(string,fielddisplay(obj,'split_antimeridian' ,'flag to split polygons on the antimeridian'))
     44                string="%s\n%s"%(string,fielddisplay(self,'gridsatequator'     ,'number of grids at equator (determines resolution)'))
     45                string="%s\n%s"%(string,fielddisplay(self,'usevalueordering'   ,'flag to consider target values for flight path evaluation'))
     46                string="%s\n%s"%(string,fielddisplay(self,'split_antimeridian' ,'flag to split polygons on the antimeridian'))
    3647               
    3748                string="%s\n\n%s"%(string,'      Optimization:')
    38                 string="%s\n%s"%(string,fielddisplay(obj,'path_optimize'     ,'optimize? (default false)'))
    39                 string="%s\n%s"%(string,fielddisplay(obj,'opt_ndir'     ,['number of directions to test when moving a point.  If this value = 1, a random direction is tested.',\
     49                string="%s\n%s"%(string,fielddisplay(self,'path_optimize'     ,'optimize? (default false)'))
     50                string="%s\n%s"%(string,fielddisplay(self,'opt_ndir'     ,['number of directions to test when moving a point.  If this value = 1, a random direction is tested.',\
    4051                                                                                  'A value > 1 results in directions equally spaced from [0, 2*PI] being tested.',\
    4152                                                                                  'For example, 4 would result in directions [0, PI/2, PI, 3PI/2].']))
    42                 string="%s\n%s"%(string,fielddisplay(obj,'opt_dist'     ,'specifies the distance in km (default 25) to move a randomly selected path point on each iteration'))
    43                 string="%s\n%s"%(string,fielddisplay(obj,'opt_niter'     ,['number of iterations (default 30,000) to run for flightplan optimization',\
     53                string="%s\n%s"%(string,fielddisplay(self,'opt_dist'     ,'specifies the distance in km (default 25) to move a randomly selected path point on each iteration'))
     54                string="%s\n%s"%(string,fielddisplay(self,'opt_niter'     ,['number of iterations (default 30,000) to run for flightplan optimization',\
    4455                                                                                   'i.e. the number of times to randomly select a point and move it.']))
    4556
    4657                string="%s\n\n%s"%(string,'      Output:')
    47                 string="%s\n%s"%(string,fielddisplay(obj,'solution'           ,'name of kml solution file'))
    48                 string="%s\n%s"%(string,fielddisplay(obj,'quality'            ,'quality of kml solution'))
     58                string="%s\n%s"%(string,fielddisplay(self,'solution'           ,'name of kml solution file'))
     59                string="%s\n%s"%(string,fielddisplay(self,'quality'            ,'quality of kml solution'))
    4960                return string
    5061                #}}}
     62
     63        def checkconsistency(self,md,solution,analyses):    # {{{
     64
     65                #Early return
     66                if not solution==FlaimSolutionEnum():
     67                        return md
     68
     69                md = checkfield(md,'flaim.tracks','file',1)
     70                if numpy.any(numpy.isnan(md.flaim.criterion)) or not md.flaim.criterion:
     71                        md = checkfield(md,'flaim.targets','file',1)
     72                else:
     73                        md = checkfield(md,'flaim.criterion','numel',[md.mesh.numberofvertices,md.mesh.numberofelements])
     74
     75                return md
     76        # }}}
     77
  • issm/branches/trunk-jpl-damage/src/m/classes/flowequation.m

    r12878 r13101  
    88                ismacayealpattyn     = 0;
    99                ishutter             = 0;
     10                isl1l2               = 0;
    1011                isstokes             = 0;
    1112                vertex_equation      = NaN;
     
    2930                function md = checkconsistency(obj,md,solution,analyses) % {{{
    3031
    31                         if ismember(DiagnosticHorizAnalysisEnum,analyses),
     32                        if ismember(DiagnosticHorizAnalysisEnum(),analyses),
    3233
    33                                 md = checkfield(md,'flowequation.ismacayealpattyn','numel',1,'values',[0 1]);
    34                                 md = checkfield(md,'flowequation.ishutter','numel',1,'values',[0 1]);
    35                                 md = checkfield(md,'flowequation.isstokes','numel',1,'values',[0 1]);
     34                                md = checkfield(md,'flowequation.ismacayealpattyn','numel',[1],'values',[0 1]);
     35                                md = checkfield(md,'flowequation.ishutter','numel',[1],'values',[0 1]);
     36                                md = checkfield(md,'flowequation.isl1l2','numel',[1],'values',[0 1]);
     37                                md = checkfield(md,'flowequation.isstokes','numel',[1],'values',[0 1]);
    3638                                md = checkfield(md,'flowequation.bordermacayeal','size',[md.mesh.numberofvertices 1],'values',[0 1]);
    3739                                md = checkfield(md,'flowequation.borderpattyn','size',[md.mesh.numberofvertices 1],'values',[0 1]);
     
    4143                                        md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[1:2]);
    4244                                else
    43                                         md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices 1],'values',[0:7]);
    44                                         md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[0:7]);
     45                                        md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices 1],'values',[0:8]);
     46                                        md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements 1],'values',[0:8]);
    4547                                end
    46                                 if (md.flowequation.ismacayealpattyn==0 && md.flowequation.ishutter==0 && md.flowequation.isstokes==0),
     48                                if ~(obj.ismacayealpattyn || obj.ishutter || obj.isstokes || obj.isl1l2),
    4749                                        md = checkmessage(md,['no element types set for this model. At least one of ismacayealpattyn, ishutter or isstokes need to be =1']);
    4850                                end
    4951                        end
    50                         if ismember(DiagnosticHutterAnalysisEnum,analyses),
    51                                 if any(md.flowequation.element_equation==1),
    52                                         if(md.flowequation.element_equation & md.mask.elementonfloatingice),
     52                        if ismember(DiagnosticHutterAnalysisEnum(),analyses),
     53                                if any(obj.element_equation==1),
     54                                        if(obj.element_equation & md.mask.elementonfloatingice),
    5355                                                disp(sprintf('\n !!! Warning: Hutter''s model is not consistent on ice shelves !!!\n'));
    5456                                        end
     
    6264                        fielddisplay(obj,'ismacayealpattyn','is the macayeal or pattyn approximation used ?');
    6365                        fielddisplay(obj,'ishutter','is the shallow ice approximation used ?');
     66                        fielddisplay(obj,'isl1l2','is the l1l2 approximation used ?');
    6467                        fielddisplay(obj,'isstokes','are the Full-Stokes equations used ?');
    6568                        fielddisplay(obj,'vertex_equation','flow equation for each vertex');
     
    7376                        WriteData(fid,'object',obj,'fieldname','ismacayealpattyn','format','Boolean');
    7477                        WriteData(fid,'object',obj,'fieldname','ishutter','format','Boolean');
     78                        WriteData(fid,'object',obj,'fieldname','isl1l2','format','Boolean');
    7579                        WriteData(fid,'object',obj,'fieldname','isstokes','format','Boolean');
    7680                        WriteData(fid,'object',obj,'fieldname','bordermacayeal','format','DoubleMat','mattype',1);
     
    7983                        %convert approximations to enums
    8084                        data=obj.vertex_equation;
    81                         pos=find(data==0); data(pos,end)=NoneApproximationEnum;
    82                         pos=find(data==1); data(pos,end)=HutterApproximationEnum;
    83                         pos=find(data==2); data(pos,end)=MacAyealApproximationEnum;
    84                         pos=find(data==3); data(pos,end)=PattynApproximationEnum;
    85                         pos=find(data==4); data(pos,end)=StokesApproximationEnum;
    86                         pos=find(data==5); data(pos,end)=MacAyealPattynApproximationEnum;
    87                         pos=find(data==6); data(pos,end)=MacAyealStokesApproximationEnum;
    88                         pos=find(data==7); data(pos,end)=PattynStokesApproximationEnum;
    89                         WriteData(fid,'data',data,'enum',FlowequationVertexEquationEnum,'format','DoubleMat','mattype',1);
     85                        pos=find(data==0); data(pos,end)=NoneApproximationEnum();
     86                        pos=find(data==1); data(pos,end)=HutterApproximationEnum();
     87                        pos=find(data==2); data(pos,end)=MacAyealApproximationEnum();
     88                        pos=find(data==3); data(pos,end)=PattynApproximationEnum();
     89                        pos=find(data==4); data(pos,end)=StokesApproximationEnum();
     90                        pos=find(data==5); data(pos,end)=MacAyealPattynApproximationEnum();
     91                        pos=find(data==6); data(pos,end)=MacAyealStokesApproximationEnum();
     92                        pos=find(data==7); data(pos,end)=PattynStokesApproximationEnum();
     93                        pos=find(data==8); data(pos,end)=L1L2ApproximationEnum();
     94                        WriteData(fid,'data',data,'enum',FlowequationVertexEquationEnum(),'format','DoubleMat','mattype',1);
    9095                        data=obj.element_equation;
    91                         pos=find(data==0); data(pos,end)=NoneApproximationEnum;
    92                         pos=find(data==1); data(pos,end)=HutterApproximationEnum;
    93                         pos=find(data==2); data(pos,end)=MacAyealApproximationEnum;
    94                         pos=find(data==3); data(pos,end)=PattynApproximationEnum;
    95                         pos=find(data==4); data(pos,end)=StokesApproximationEnum;
    96                         pos=find(data==5); data(pos,end)=MacAyealPattynApproximationEnum;
    97                         pos=find(data==6); data(pos,end)=MacAyealStokesApproximationEnum;
    98                         pos=find(data==7); data(pos,end)=PattynStokesApproximationEnum;
    99                         WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum,'format','DoubleMat','mattype',2);
     96                        pos=find(data==0); data(pos,end)=NoneApproximationEnum();
     97                        pos=find(data==1); data(pos,end)=HutterApproximationEnum();
     98                        pos=find(data==2); data(pos,end)=MacAyealApproximationEnum();
     99                        pos=find(data==3); data(pos,end)=PattynApproximationEnum();
     100                        pos=find(data==4); data(pos,end)=StokesApproximationEnum();
     101                        pos=find(data==5); data(pos,end)=MacAyealPattynApproximationEnum();
     102                        pos=find(data==6); data(pos,end)=MacAyealStokesApproximationEnum();
     103                        pos=find(data==7); data(pos,end)=PattynStokesApproximationEnum();
     104                        pos=find(data==8); data(pos,end)=L1L2ApproximationEnum();
     105                        WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum(),'format','DoubleMat','mattype',2);
    100106                end % }}}
    101107        end
  • issm/branches/trunk-jpl-damage/src/m/classes/flowequation.py

    r12168 r13101  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
     4from EnumDefinitions import *
     5from checkfield import *
     6from WriteData import *
    37
    4 class flowequation:
     8class flowequation(object):
     9        """
     10        FLOWEQUATION class definition
     11
     12           Usage:
     13              flowequation=flowequation();
     14        """
     15
    516        #properties
    617        def __init__(self):
     
    920                self.ismacayealpattyn     = 0;
    1021                self.ishutter             = 0;
     22                self.isl1l2             = 0;
    1123                self.isstokes             = 0;
    1224                self.vertex_equation      = float('NaN')
     
    2032
    2133                #}}}
    22         def __repr__(obj):
     34        def __repr__(self):
    2335                # {{{ Display
    2436                string='   flow equation parameters:'
    2537
    26                 string="%s\n\n%s"%(string,fielddisplay(obj,'ismacayealpattyn','is the macayeal or pattyn approximation used ?'))
    27                 string="%s\n%s"%(string,fielddisplay(obj,'ishutter','is the shallow ice approximation used ?'))
    28                 string="%s\n%s"%(string,fielddisplay(obj,'isstokes','are the Full-Stokes equations used ?'))
    29                 string="%s\n%s"%(string,fielddisplay(obj,'vertex_equation','flow equation for each vertex'))
    30                 string="%s\n%s"%(string,fielddisplay(obj,'element_equation','flow equation for each element'))
    31                 string="%s\n%s"%(string,fielddisplay(obj,'bordermacayeal','vertices on MacAyeal''s border (for tiling)'))
    32                 string="%s\n%s"%(string,fielddisplay(obj,'borderpattyn','vertices on Pattyn''s border (for tiling)'))
    33                 string="%s\n%s"%(string,fielddisplay(obj,'borderstokes','vertices on Stokes'' border (for tiling)'))
     38                string="%s\n\n%s"%(string,fielddisplay(self,'ismacayealpattyn','is the macayeal or pattyn approximation used ?'))
     39                string="%s\n%s"%(string,fielddisplay(self,'ishutter','is the shallow ice approximation used ?'))
     40                string="%s\n%s"%(string,fielddisplay(self,'isl1l2','are l1l2 equations used ?'))
     41                string="%s\n%s"%(string,fielddisplay(self,'isstokes','are the Full-Stokes equations used ?'))
     42                string="%s\n%s"%(string,fielddisplay(self,'vertex_equation','flow equation for each vertex'))
     43                string="%s\n%s"%(string,fielddisplay(self,'element_equation','flow equation for each element'))
     44                string="%s\n%s"%(string,fielddisplay(self,'bordermacayeal','vertices on MacAyeal''s border (for tiling)'))
     45                string="%s\n%s"%(string,fielddisplay(self,'borderpattyn','vertices on Pattyn''s border (for tiling)'))
     46                string="%s\n%s"%(string,fielddisplay(self,'borderstokes','vertices on Stokes'' border (for tiling)'))
    3447                return string
    3548                #}}}
    3649               
    37         def setdefaultparameters(obj):
     50        def setdefaultparameters(self):
    3851                # {{{setdefaultparameters
    39                 return obj
     52                return self
    4053        #}}}
    4154
     55        def checkconsistency(self,md,solution,analyses):    # {{{
     56
     57                if DiagnosticHorizAnalysisEnum() in analyses:
     58                        md = checkfield(md,'flowequation.ismacayealpattyn','numel',[1],'values',[0,1])
     59                        md = checkfield(md,'flowequation.ishutter','numel',[1],'values',[0,1])
     60                        md = checkfield(md,'flowequation.isl1l2','numel',[1],'values',[0,1])
     61                        md = checkfield(md,'flowequation.isstokes','numel',[1],'values',[0,1])
     62                        md = checkfield(md,'flowequation.bordermacayeal','size',[md.mesh.numberofvertices],'values',[0,1])
     63                        md = checkfield(md,'flowequation.borderpattyn','size',[md.mesh.numberofvertices],'values',[0,1])
     64                        md = checkfield(md,'flowequation.borderstokes','size',[md.mesh.numberofvertices],'values',[0,1])
     65                        if md.mesh.dimension==2:
     66                                md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',[1,2])
     67                                md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements],'values',[1,2])
     68                        else:
     69                                md = checkfield(md,'flowequation.vertex_equation','size',[md.mesh.numberofvertices],'values',range(0,7+1))
     70                                md = checkfield(md,'flowequation.element_equation','size',[md.mesh.numberofelements],'values',range(0,7+1))
     71                        if not (self.ismacayealpattyn or self.ishutter or self.isstokes or self.isl1l2):
     72                                md.checkmessage("no element types set for this model. At least one of ismacayealpattyn, ishutter or isstokes need to be =1")
     73
     74                if DiagnosticHutterAnalysisEnum() in analyses:
     75                        if any(self.element_equation==1):
     76                                if numpy.any(numpy.logical_and(self.element_equation,md.mask.elementonfloatingice)):
     77                                        print "\n !!! Warning: Hutter's model is not consistent on ice shelves !!!\n"
     78
     79                return md
     80        # }}}
     81
     82        def marshall(self,fid):    # {{{
     83                WriteData(fid,'object',self,'fieldname','ismacayealpattyn','format','Boolean')
     84                WriteData(fid,'object',self,'fieldname','ishutter','format','Boolean')
     85                WriteData(fid,'object',self,'fieldname','isl1l2','format','Boolean')
     86                WriteData(fid,'object',self,'fieldname','isstokes','format','Boolean')
     87                WriteData(fid,'object',self,'fieldname','bordermacayeal','format','DoubleMat','mattype',1)
     88                WriteData(fid,'object',self,'fieldname','borderpattyn','format','DoubleMat','mattype',1)
     89                WriteData(fid,'object',self,'fieldname','borderstokes','format','DoubleMat','mattype',1)
     90                #convert approximations to enums
     91                data=self.vertex_equation
     92                data[[i for i,item in enumerate(data) if item==0]]=NoneApproximationEnum()
     93                data[[i for i,item in enumerate(data) if item==1]]=HutterApproximationEnum()
     94                data[[i for i,item in enumerate(data) if item==2]]=MacAyealApproximationEnum()
     95                data[[i for i,item in enumerate(data) if item==3]]=PattynApproximationEnum()
     96                data[[i for i,item in enumerate(data) if item==4]]=StokesApproximationEnum()
     97                data[[i for i,item in enumerate(data) if item==5]]=MacAyealPattynApproximationEnum()
     98                data[[i for i,item in enumerate(data) if item==6]]=MacAyealStokesApproximationEnum()
     99                data[[i for i,item in enumerate(data) if item==7]]=PattynStokesApproximationEnum()
     100                data[[i for i,item in enumerate(data) if item==8]]=L1L2ApproximationEnum()
     101                WriteData(fid,'data',data,'enum',FlowequationVertexEquationEnum(),'format','DoubleMat','mattype',1)
     102                data=self.element_equation
     103                data[[i for i,item in enumerate(data) if item==0]]=NoneApproximationEnum()
     104                data[[i for i,item in enumerate(data) if item==1]]=HutterApproximationEnum()
     105                data[[i for i,item in enumerate(data) if item==2]]=MacAyealApproximationEnum()
     106                data[[i for i,item in enumerate(data) if item==3]]=PattynApproximationEnum()
     107                data[[i for i,item in enumerate(data) if item==4]]=StokesApproximationEnum()
     108                data[[i for i,item in enumerate(data) if item==5]]=MacAyealPattynApproximationEnum()
     109                data[[i for i,item in enumerate(data) if item==6]]=MacAyealStokesApproximationEnum()
     110                data[[i for i,item in enumerate(data) if item==7]]=PattynStokesApproximationEnum()
     111                data[[i for i,item in enumerate(data) if item==8]]=L1L2ApproximationEnum()
     112                WriteData(fid,'data',data,'enum',FlowequationElementEquationEnum(),'format','DoubleMat','mattype',2)
     113        # }}}
     114
  • issm/branches/trunk-jpl-damage/src/m/classes/friction.m

    r12878 r13101  
    2525
    2626                        %Early return
    27                         if ~ismember(DiagnosticHorizAnalysisEnum,analyses) & ~ismember(ThermalAnalysisEnum,analyses), return; end
     27                        if ~ismember(DiagnosticHorizAnalysisEnum(),analyses) & ~ismember(ThermalAnalysisEnum(),analyses), return; end
    2828
    2929                        md = checkfield(md,'friction.coefficient','NaN',1,'size',[md.mesh.numberofvertices 1]);
  • issm/branches/trunk-jpl-damage/src/m/classes/friction.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class friction:
     7class friction(object):
     8        """
     9        FRICTION class definition
     10
     11           Usage:
     12              friction=friction();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1424
    1525                #}}}
    16         def __repr__(obj):
     26        def __repr__(self):
    1727                # {{{ Display
    1828                string="Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_water*g*bed, r=q/p and s=1/p"
    19                 string="%s\n\n%s"%(string,fielddisplay(obj,"coefficient","friction coefficient [SI]"))
    20                 string="%s\n%s"%(string,fielddisplay(obj,"p","p exponent"))
    21                 string="%s\n%s"%(string,fielddisplay(obj,"q","q exponent"))
     29                string="%s\n\n%s"%(string,fielddisplay(self,"coefficient","friction coefficient [SI]"))
     30                string="%s\n%s"%(string,fielddisplay(self,"p","p exponent"))
     31                string="%s\n%s"%(string,fielddisplay(self,"q","q exponent"))
    2232                return string
    2333                #}}}
    2434
    25         def setdefaultparameters(obj):
     35        def setdefaultparameters(self):
    2636                # {{{setdefaultparameters
    27                 return obj
     37                return self
    2838        #}}}
    2939
     40        def checkconsistency(self,md,solution,analyses):    # {{{
     41
     42                #Early return
     43                if DiagnosticHorizAnalysisEnum() not in analyses and ThermalAnalysisEnum() not in analyses:
     44                        return md
     45
     46                md = checkfield(md,'friction.coefficient','NaN',1,'size',[md.mesh.numberofvertices])
     47                md = checkfield(md,'friction.q','NaN',1,'size',[md.mesh.numberofelements])
     48                md = checkfield(md,'friction.p','NaN',1,'size',[md.mesh.numberofelements])
     49
     50                return md
     51        # }}}
     52
     53        def marshall(self,fid):    # {{{
     54                WriteData(fid,'object',self,'fieldname','coefficient','format','DoubleMat','mattype',1)
     55                WriteData(fid,'object',self,'fieldname','p','format','DoubleMat','mattype',2)
     56                WriteData(fid,'object',self,'fieldname','q','format','DoubleMat','mattype',2)
     57        # }}}
     58
  • issm/branches/trunk-jpl-damage/src/m/classes/geometry.m

    r12878 r13101  
    3232                                md = checkmessage(md,['equality thickness=surface-bed violated']);
    3333                        end
    34                         if solution==TransientSolutionEnum & md.transient.isgroundingline,
     34                        if solution==TransientSolutionEnum() & md.transient.isgroundingline,
    3535                                md = checkfield(md,'geometry.bathymetry','NaN',1,'size',[md.mesh.numberofvertices 1]);
    3636                        end
     
    4747                end % }}}
    4848                function marshall(obj,fid) % {{{
    49                         WriteData(fid,'data',obj.surface,'format','DoubleMat','mattype',1,'enum',SurfaceEnum);
    50                         WriteData(fid,'data',obj.thickness,'format','DoubleMat','mattype',1,'enum',ThicknessEnum);
    51                         WriteData(fid,'data',obj.bed,'format','DoubleMat','mattype',1,'enum',BedEnum);
    52                         WriteData(fid,'data',obj.bathymetry,'format','DoubleMat','mattype',1,'enum',BathymetryEnum);
     49                        WriteData(fid,'data',obj.surface,'format','DoubleMat','mattype',1,'enum',SurfaceEnum());
     50                        WriteData(fid,'data',obj.thickness,'format','DoubleMat','mattype',1,'enum',ThicknessEnum());
     51                        WriteData(fid,'data',obj.bed,'format','DoubleMat','mattype',1,'enum',BedEnum());
     52                        WriteData(fid,'data',obj.bathymetry,'format','DoubleMat','mattype',1,'enum',BathymetryEnum());
    5353                        WriteData(fid,'object',obj,'fieldname','hydrostatic_ratio','format','DoubleMat','mattype',1);
    5454                end % }}}
  • issm/branches/trunk-jpl-damage/src/m/classes/geometry.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class geometry:
     7class geometry(object):
     8        """
     9        GEOMETRY class definition
     10
     11           Usage:
     12              geometry=geometry();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1626
    1727                #}}}
    18         def __repr__(obj):
     28        def __repr__(self):
    1929                # {{{ Display
    2030
    2131                string="   geometry parameters:"
    2232
    23                 string="%s\n\n%s"%(string,fielddisplay(obj,'surface','surface elevation'))
    24                 string="%s\n%s"%(string,fielddisplay(obj,'thickness','ice thickness'))
    25                 string="%s\n%s"%(string,fielddisplay(obj,'bed','bed elevation'))
    26                 string="%s\n%s"%(string,fielddisplay(obj,'bathymetry','bathymetry elevation'))
    27                 string="%s\n%s"%(string,fielddisplay(obj,'hydrostatic_ratio','coefficient for ice shelves'' thickness correction: hydrostatic_ratio H_obs+ (1-hydrostatic_ratio) H_hydro'))
     33                string="%s\n\n%s"%(string,fielddisplay(self,'surface','surface elevation'))
     34                string="%s\n%s"%(string,fielddisplay(self,'thickness','ice thickness'))
     35                string="%s\n%s"%(string,fielddisplay(self,'bed','bed elevation'))
     36                string="%s\n%s"%(string,fielddisplay(self,'bathymetry','bathymetry elevation'))
     37                string="%s\n%s"%(string,fielddisplay(self,'hydrostatic_ratio','coefficient for ice shelves'' thickness correction: hydrostatic_ratio H_obs+ (1-hydrostatic_ratio) H_hydro'))
    2838                return string
    2939                #}}}
    3040               
    31         def setdefaultparameters(obj):
     41        def setdefaultparameters(self):
    3242                # {{{setdefaultparameters
    33                 return obj
     43                return self
    3444        #}}}
    3545
     46        def checkconsistency(self,md,solution,analyses):    # {{{
     47
     48                md = checkfield(md,'geometry.surface'  ,'NaN',1,'size',[md.mesh.numberofvertices])
     49                md = checkfield(md,'geometry.bed'      ,'NaN',1,'size',[md.mesh.numberofvertices])
     50                md = checkfield(md,'geometry.thickness','NaN',1,'size',[md.mesh.numberofvertices],'>',0)
     51                if any((self.thickness-self.surface+self.bed)>10**-9):
     52                        md.checkmessage("equality thickness=surface-bed violated")
     53                if solution==TransientSolutionEnum() and md.transient.isgroundingline:
     54                        md = checkfield(md,'geometry.bathymetry','NaN',1,'size',[md.mesh.numberofvertices])
     55
     56                return md
     57        # }}}
     58
     59        def marshall(self,fid):    # {{{
     60                WriteData(fid,'data',self.surface,'format','DoubleMat','mattype',1,'enum',SurfaceEnum())
     61                WriteData(fid,'data',self.thickness,'format','DoubleMat','mattype',1,'enum',ThicknessEnum())
     62                WriteData(fid,'data',self.bed,'format','DoubleMat','mattype',1,'enum',BedEnum())
     63                WriteData(fid,'data',self.bathymetry,'format','DoubleMat','mattype',1,'enum',BathymetryEnum())
     64                WriteData(fid,'object',self,'fieldname','hydrostatic_ratio','format','DoubleMat','mattype',1)
     65        # }}}
     66
  • issm/branches/trunk-jpl-damage/src/m/classes/groundingline.m

    r12878 r13101  
    3636                                        md = checkmessage(md,['requesting grounding line migration, but bathymetry is absent!']);
    3737                                end
    38                                 pos=find(md.mask.vertexongroundedice); 
     38                                pos=find(md.mask.vertexongroundedice);
    3939                                if any(abs(md.geometry.bed(pos)-md.geometry.bathymetry(pos))>10^-10),
    40                                         md = checkmessage(md,['bathymetry not equal to bed on grounded ice !']);
     40                                        md = checkmessage(md,['bathymetry not equal to bed on grounded ice!']);
    4141                                end
    42                                 pos=find(md.mask.vertexonfloatingice); 
     42                                pos=find(md.mask.vertexonfloatingice);
    4343                                if any(md.geometry.bathymetry(pos)-md.geometry.bed(pos)>10^-9),
    44                                         md = checkmessage(md,['bathymetry superior to bed on floating ice !']);
     44                                        md = checkmessage(md,['bathymetry superior to bed on floating ice!']);
    4545                                end
    4646                        end
     
    5555                end % }}}
    5656                function marshall(obj,fid) % {{{
    57                         WriteData(fid,'data',StringToEnum(obj.migration),'enum',GroundinglineMigrationEnum,'format','Integer');
     57                        WriteData(fid,'data',StringToEnum(obj.migration),'enum',GroundinglineMigrationEnum(),'format','Integer');
    5858                        WriteData(fid,'object',obj,'fieldname','melting_rate','format','Double');
    5959                end % }}}
  • issm/branches/trunk-jpl-damage/src/m/classes/groundingline.py

    r12168 r13101  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
     4from EnumDefinitions import *
     5from StringToEnum import StringToEnum
     6from checkfield import *
     7from WriteData import *
     8from MatlabFuncs import *
    39
    4 class groundingline:
     10class groundingline(object):
     11        """
     12        CONSTANTS class definition
     13
     14           Usage:
     15              groundingline=groundingline();
     16        """
     17
    518        #properties
    619        def __init__(self):
     
    1326
    1427                #}}}
    15         def __repr__(obj):
     28        def __repr__(self):
    1629                # {{{ Display
    1730                string='   grounding line solution parameters:'
    1831
    19                 string="%s\n\n%s"%(string,fielddisplay(obj,'migration','type of grounding line migration: ''SoftMigration'',''AgressiveMigration'' or ''None'''))
    20                 string="%s\n%s"%(string,fielddisplay(obj,'melting_rate','melting rate applied when previously grounded parts start floating'))
     32                string="%s\n\n%s"%(string,fielddisplay(self,'migration','type of grounding line migration: ''SoftMigration'',''AgressiveMigration'' or ''None'''))
     33                string="%s\n%s"%(string,fielddisplay(self,'melting_rate','melting rate applied when previously grounded parts start floating'))
    2134                return string
    2235                #}}}   
    23         def setdefaultparameters(obj):
     36        def setdefaultparameters(self):
    2437                # {{{setdefaultparameters
    2538
    2639                #Type of migration
    27                 obj.migration='None'
     40                self.migration='None'
    2841
    2942                #basal melting rate correction:
    30                 obj.melting_rate=0;
     43                self.melting_rate=0;
    3144
    32                 return obj
     45                return self
    3346        #}}}
    3447
     48        def checkconsistency(self,md,solution,analyses):    # {{{
     49
     50                md = checkfield(md,'groundingline.migration','values',['None','AgressiveMigration','SoftMigration'])
     51
     52                if not strcmp(self.migration,'None'):
     53                        if numpy.any(numpy.isnan(md.geometry.bathymetry)):
     54                                md.checkmessage("requesting grounding line migration, but bathymetry is absent!")
     55                        pos=numpy.nonzero(md.mask.vertexongroundedice)
     56                        if any(numpy.abs(md.geometry.bed[pos]-md.geometry.bathymetry[pos])>10**-10):
     57                                md.checkmessage("bathymetry not equal to bed on grounded ice!")
     58                        pos=numpy.nonzero(md.mask.vertexonfloatingice)
     59                        if any(md.geometry.bathymetry[pos]-md.geometry.bed[pos]>10**-9):
     60                                md.checkmessage("bathymetry superior to bed on floating ice!")
     61
     62                return md
     63        # }}}
     64
     65        def marshall(self,fid):    # {{{
     66                WriteData(fid,'data',StringToEnum(self.migration)[0],'enum',GroundinglineMigrationEnum(),'format','Integer')
     67                WriteData(fid,'object',self,'fieldname','melting_rate','format','Double')
     68        # }}}
     69
  • issm/branches/trunk-jpl-damage/src/m/classes/hydrology.m

    r12878 r13101  
    3838
    3939                        %Early return
    40                         if ~ismember(HydrologyAnalysisEnum,analyses), return; end
     40                        if ~ismember(HydrologyAnalysisEnum(),analyses), return; end
    4141
    4242                        md = checkfield(md,'hydrology.spcwatercolumn','forcing',1);
     
    5757                function marshall(obj,fid) % {{{
    5858                        WriteData(fid,'object',obj,'fieldname','spcwatercolumn','format','DoubleMat','mattype',1);
    59                         WriteData(fid,'object',obj,'fieldname','n','format','Double'); 
     59                        WriteData(fid,'object',obj,'fieldname','n','format','Double');
    6060                        WriteData(fid,'object',obj,'fieldname','CR','format','Double');
    6161                        WriteData(fid,'object',obj,'fieldname','p','format','Double');
  • issm/branches/trunk-jpl-damage/src/m/classes/hydrology.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class hydrology:
     7class hydrology(object):
     8        """
     9        HYDROLOGY class definition
     10
     11           Usage:
     12              hydrology=hydrology();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1727                self.setdefaultparameters()
    1828
    19        
    2029                #}}}
    21         def __repr__(obj):
     30        def __repr__(self):
    2231                # {{{ Display
    2332               
    2433                string='   hydrology solution parameters:'
    25                 string="%s\n\n%s"%(string,fielddisplay(obj,'spcwatercolumn','water thickness constraints (NaN means no constraint)'))
    26                 string="%s\n%s"%(string,fielddisplay(obj,'n','Manning roughness coefficient'))
    27                 string="%s\n%s"%(string,fielddisplay(obj,'CR','tortuosity parameter'))
    28                 string="%s\n%s"%(string,fielddisplay(obj,'p','dimensionless exponent in Manning velocity formula'))
    29                 string="%s\n%s"%(string,fielddisplay(obj,'q','dimensionless exponent in Manning velocity formula'))
    30                 string="%s\n%s"%(string,fielddisplay(obj,'kn','parameter in effective pressure formula'))
    31                 string="%s\n%s"%(string,fielddisplay(obj,'stabilization','artificial diffusivity (default is 1). can be more than 1 to increase diffusivity.'))
     34                string="%s\n\n%s"%(string,fielddisplay(self,'spcwatercolumn','water thickness constraints (NaN means no constraint)'))
     35                string="%s\n%s"%(string,fielddisplay(self,'n','Manning roughness coefficient'))
     36                string="%s\n%s"%(string,fielddisplay(self,'CR','tortuosity parameter'))
     37                string="%s\n%s"%(string,fielddisplay(self,'p','dimensionless exponent in Manning velocity formula'))
     38                string="%s\n%s"%(string,fielddisplay(self,'q','dimensionless exponent in Manning velocity formula'))
     39                string="%s\n%s"%(string,fielddisplay(self,'kn','parameter in effective pressure formula'))
     40                string="%s\n%s"%(string,fielddisplay(self,'stabilization','artificial diffusivity (default is 1). can be more than 1 to increase diffusivity.'))
    3241                return string
    3342                #}}}
    3443               
    35         def setdefaultparameters(obj):
     44        def setdefaultparameters(self):
    3645                # {{{setdefaultparameters
    3746               
    3847                #Parameters from Johnson's 2002 thesis, section 3.5.4                   
    39                 obj.n=.02                       
    40                 obj.CR=.01
    41                 obj.p=2
    42                 obj.q=1
    43                 obj.kn=0
     48                self.n=.02                     
     49                self.CR=.01
     50                self.p=2
     51                self.q=1
     52                self.kn=0
    4453
    4554                #Type of stabilization to use 0:nothing 1:artificial_diffusivity
    46                 obj.stabilization=1
     55                self.stabilization=1
    4756
    48                 return obj
     57                return self
    4958        #}}}
    5059
     60        def checkconsistency(self,md,solution,analyses):    # {{{
     61
     62                #Early return
     63                if HydrologyAnalysisEnum() not in analyses:
     64                        return md
     65
     66                md = checkfield(md,'hydrology.spcwatercolumn','forcing',1)
     67                md = checkfield(md,'hydrology.stabilization','>=',0)
     68
     69                return md
     70        # }}}
     71
     72        def marshall(self,fid):    # {{{
     73                WriteData(fid,'object',self,'fieldname','spcwatercolumn','format','DoubleMat','mattype',1)
     74                WriteData(fid,'object',self,'fieldname','n','format','Double')
     75                WriteData(fid,'object',self,'fieldname','CR','format','Double')
     76                WriteData(fid,'object',self,'fieldname','p','format','Double')
     77                WriteData(fid,'object',self,'fieldname','q','format','Double')
     78                WriteData(fid,'object',self,'fieldname','kn','format','Double')
     79                WriteData(fid,'object',self,'fieldname','stabilization','format','Double')
     80        # }}}
     81
  • issm/branches/trunk-jpl-damage/src/m/classes/initialization.m

    r12917 r13101  
    3030                end % }}}
    3131                function md = checkconsistency(obj,md,solution,analyses) % {{{
    32                         if ismember(DiagnosticHorizAnalysisEnum,analyses)
    33                                 if ~isnan(md.initialization.vx) & ~isnan(md.initialization.vy),
     32                        if ismember(DiagnosticHorizAnalysisEnum(),analyses)
     33                                if ~(isnan(md.initialization.vx) | isnan(md.initialization.vy)),
    3434                                        md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
    3535                                        md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
    3636                                end
    3737                        end
    38                         if ismember(PrognosticAnalysisEnum,analyses),
     38                        if ismember(PrognosticAnalysisEnum(),analyses),
    3939                                md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
    4040                                md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
    4141                        end
    42                         if ismember(HydrologyAnalysisEnum,analyses),
     42                        if ismember(HydrologyAnalysisEnum(),analyses),
    4343                                md = checkfield(md,'initialization.watercolumn','NaN',1,'size',[md.mesh.numberofvertices 1]);
    4444                        end
    45                         if ismember(BalancethicknessAnalysisEnum,analyses),
     45                        if ismember(BalancethicknessAnalysisEnum(),analyses),
    4646                                md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
    4747                                md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
     
    5151                                end
    5252                        end
    53                         if ismember(ThermalAnalysisEnum,analyses),
     53                        if ismember(ThermalAnalysisEnum(),analyses),
    5454                                md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices 1]);
    5555                                md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices 1]);
     
    5757                                md = checkfield(md,'initialization.pressure','NaN',1,'size',[md.mesh.numberofvertices 1]);
    5858                        end
    59                         if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy) | solution==EnthalpySolutionEnum,
     59                        if (ismember(EnthalpyAnalysisEnum(),analyses) & md.thermal.isenthalpy) | solution==EnthalpySolutionEnum(),
    6060                                md = checkfield(md,'initialization.waterfraction','>=',0,'size',[md.mesh.numberofvertices 1]);
    6161                        end
  • issm/branches/trunk-jpl-damage/src/m/classes/initialization.py

    r12168 r13101  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
     4from EnumDefinitions import *
     5from checkfield import *
     6from WriteData import *
    37
    4 class initialization:
     8class initialization(object):
     9        """
     10        INITIALIZATION class definition
     11
     12           Usage:
     13              initialization=initialization();
     14        """
     15
    516        #properties
    617        def __init__(self):
     
    2031
    2132                #}}}
    22         def __repr__(obj):
     33        def __repr__(self):
    2334                # {{{ Display
    2435                string='   initial field values:'
    2536
    26                 string="%s\n%s"%(string,fielddisplay(obj,'vx','x component of velocity'))
    27                 string="%s\n%s"%(string,fielddisplay(obj,'vy','y component of velocity'))
    28                 string="%s\n%s"%(string,fielddisplay(obj,'vz','z component of velocity'))
    29                 string="%s\n%s"%(string,fielddisplay(obj,'vel','velocity norm'))
    30                 string="%s\n%s"%(string,fielddisplay(obj,'pressure','pressure field'))
    31                 string="%s\n%s"%(string,fielddisplay(obj,'temperature','temperature in Kelvins'))
    32                 string="%s\n%s"%(string,fielddisplay(obj,'watercolumn','thickness of subglacial water'))
    33                 string="%s\n%s"%(string,fielddisplay(obj,'waterfraction','fraction of water in the ice'))
     37                string="%s\n%s"%(string,fielddisplay(self,'vx','x component of velocity'))
     38                string="%s\n%s"%(string,fielddisplay(self,'vy','y component of velocity'))
     39                string="%s\n%s"%(string,fielddisplay(self,'vz','z component of velocity'))
     40                string="%s\n%s"%(string,fielddisplay(self,'vel','velocity norm'))
     41                string="%s\n%s"%(string,fielddisplay(self,'pressure','pressure field'))
     42                string="%s\n%s"%(string,fielddisplay(self,'temperature','temperature in Kelvins'))
     43                string="%s\n%s"%(string,fielddisplay(self,'watercolumn','thickness of subglacial water'))
     44                string="%s\n%s"%(string,fielddisplay(self,'waterfraction','fraction of water in the ice'))
    3445
    3546                return string
    3647                #}}}
    3748               
    38         def setdefaultparameters(obj):
     49        def setdefaultparameters(self):
    3950                # {{{setdefaultparameters
    40                 return obj
     51                return self
    4152        #}}}
    4253
     54        def checkconsistency(self,md,solution,analyses):    # {{{
     55                if DiagnosticHorizAnalysisEnum() in analyses:
     56                        if not numpy.any(numpy.logical_or(numpy.isnan(md.initialization.vx),numpy.isnan(md.initialization.vy))):
     57                                md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices])
     58                                md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices])
     59                if PrognosticAnalysisEnum() in analyses:
     60                        md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices])
     61                        md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices])
     62                if HydrologyAnalysisEnum() in analyses:
     63                        md = checkfield(md,'initialization.watercolumn','NaN',1,'size',[md.mesh.numberofvertices])
     64                if BalancethicknessAnalysisEnum() in analyses:
     65                        md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices])
     66                        md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices])
     67                        #Triangle with zero velocity
     68                        if numpy.any(numpy.logical_and(numpy.sum(numpy.abs(md.initialization.vx[md.mesh.elements.astype(int)-1]),axis=1)==0,\
     69                                                       numpy.sum(numpy.abs(md.initialization.vy[md.mesh.elements.astype(int)-1]),axis=1)==0)):
     70                                md.checkmessage("at least one triangle has all its vertices with a zero velocity")
     71                if ThermalAnalysisEnum() in analyses:
     72                        md = checkfield(md,'initialization.vx','NaN',1,'size',[md.mesh.numberofvertices])
     73                        md = checkfield(md,'initialization.vy','NaN',1,'size',[md.mesh.numberofvertices])
     74                        md = checkfield(md,'initialization.vz','NaN',1,'size',[md.mesh.numberofvertices])
     75                        md = checkfield(md,'initialization.pressure','NaN',1,'size',[md.mesh.numberofvertices])
     76                if (EnthalpyAnalysisEnum() in analyses and md.thermal.isenthalpy) or solution==EnthalpySolutionEnum():
     77                        md = checkfield(md,'initialization.waterfraction','>=',0,'size',[md.mesh.numberofvertices])
     78
     79                return md
     80        # }}}
     81
     82        def marshall(self,fid):    # {{{
     83                WriteData(fid,'data',self.vx,'format','DoubleMat','mattype',1,'enum',VxEnum())
     84                WriteData(fid,'data',self.vy,'format','DoubleMat','mattype',1,'enum',VyEnum())
     85                WriteData(fid,'data',self.vz,'format','DoubleMat','mattype',1,'enum',VzEnum())
     86                WriteData(fid,'data',self.pressure,'format','DoubleMat','mattype',1,'enum',PressureEnum())
     87                WriteData(fid,'data',self.temperature,'format','DoubleMat','mattype',1,'enum',TemperatureEnum())
     88                WriteData(fid,'data',self.watercolumn,'format','DoubleMat','mattype',1,'enum',WatercolumnEnum())
     89                WriteData(fid,'data',self.waterfraction,'format','DoubleMat','mattype',1,'enum',WaterfractionEnum())
     90        # }}}
     91
  • issm/branches/trunk-jpl-damage/src/m/classes/inversion.m

    r12878 r13101  
    1 %CONSTANTS class definition
     1%INVERSION class definition
    22%
    33%   Usage:
     
    9797                        checkfield(md,'inversion.max_parameters','size',[md.mesh.numberofvertices num_controls]);
    9898
    99                         if solution==BalancethicknessSolutionEnum
     99                        if solution==BalancethicknessSolutionEnum()
    100100                                md = checkfield(md,'inversion.thickness_obs','size',[md.mesh.numberofvertices 1],'NaN',1);
    101101                        else
     
    159159                                data(i)=StringToEnum(obj.control_parameters{i});
    160160                        end
    161                         WriteData(fid,'data',data,'enum',InversionControlParametersEnum,'format','DoubleMat','mattype',3);
    162                         WriteData(fid,'data',num_control_parameters,'enum',InversionNumControlParametersEnum,'format','Integer');
     161                        WriteData(fid,'data',data,'enum',InversionControlParametersEnum(),'format','DoubleMat','mattype',3);
     162                        WriteData(fid,'data',num_control_parameters,'enum',InversionNumControlParametersEnum(),'format','Integer');
    163163
    164164                        %process cost functions
    165165                        num_cost_functions=size(obj.cost_functions,2);
    166166                        data=obj.cost_functions;
    167                         pos=find(data==101); data(pos)=SurfaceAbsVelMisfitEnum;
    168                         pos=find(data==102); data(pos)=SurfaceRelVelMisfitEnum;
    169                         pos=find(data==103); data(pos)=SurfaceLogVelMisfitEnum;
    170                         pos=find(data==104); data(pos)=SurfaceLogVxVyMisfitEnum;
    171                         pos=find(data==105); data(pos)=SurfaceAverageVelMisfitEnum;
    172                         pos=find(data==201); data(pos)=ThicknessAbsMisfitEnum;
    173                         pos=find(data==501); data(pos)=DragCoefficientAbsGradientEnum;
    174                         pos=find(data==502); data(pos)=RheologyBbarAbsGradientEnum;
    175                         pos=find(data==503); data(pos)=ThicknessAbsGradientEnum;
    176                         WriteData(fid,'data',data,'enum',InversionCostFunctionsEnum,'format','DoubleMat','mattype',3);
    177                         WriteData(fid,'data',num_cost_functions,'enum',InversionNumCostFunctionsEnum,'format','Integer');
     167                        pos=find(data==101); data(pos)=SurfaceAbsVelMisfitEnum();
     168                        pos=find(data==102); data(pos)=SurfaceRelVelMisfitEnum();
     169                        pos=find(data==103); data(pos)=SurfaceLogVelMisfitEnum();
     170                        pos=find(data==104); data(pos)=SurfaceLogVxVyMisfitEnum();
     171                        pos=find(data==105); data(pos)=SurfaceAverageVelMisfitEnum();
     172                        pos=find(data==201); data(pos)=ThicknessAbsMisfitEnum();
     173                        pos=find(data==501); data(pos)=DragCoefficientAbsGradientEnum();
     174                        pos=find(data==502); data(pos)=RheologyBbarAbsGradientEnum();
     175                        pos=find(data==503); data(pos)=ThicknessAbsGradientEnum();
     176                        pos=find(data==504); data(pos)=ThicknessAlongGradientEnum();
     177                        pos=find(data==505); data(pos)=ThicknessAcrossGradientEnum();
     178                        WriteData(fid,'data',data,'enum',InversionCostFunctionsEnum(),'format','DoubleMat','mattype',3);
     179                        WriteData(fid,'data',num_cost_functions,'enum',InversionNumCostFunctionsEnum(),'format','Integer');
    178180                end % }}}
    179181        end
  • issm/branches/trunk-jpl-damage/src/m/classes/inversion.py

    r12168 r13101  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
     4from EnumDefinitions import *
     5from StringToEnum import StringToEnum
     6from checkfield import *
     7from WriteData import *
    38
    4 class inversion:
     9class inversion(object):
     10        """
     11        INVERSION class definition
     12
     13           Usage:
     14              inversion=inversion();
     15        """
     16
    517        #properties
    618        def __init__(self):
     
    2537                self.vel_obs                     = float('NaN')
    2638                self.thickness_obs               = float('NaN')
     39
     40                #set defaults
     41                self.setdefaultparameters()
     42
    2743                #}}}
    28         def __repr__(obj):
     44        def __repr__(self):
    2945                # {{{ Display
    3046                string='\n   Inversion parameters:'
    31                 string="%s\n%s"%(string,fielddisplay(obj,'iscontrol','is inversion activated?'))
    32                 string="%s\n%s"%(string,fielddisplay(obj,'incomplete_adjoint','do we assume linear viscosity?'))
    33                 string="%s\n%s"%(string,fielddisplay(obj,'control_parameters','parameter where inverse control is carried out; ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}'))
    34                 string="%s\n%s"%(string,fielddisplay(obj,'nsteps','number of optimization searches'))
    35                 string="%s\n%s"%(string,fielddisplay(obj,'cost_functions','indicate the type of response for each optimization step'))
    36                 string="%s\n%s"%(string,fielddisplay(obj,'cost_functions_coefficients','cost_functions_coefficients applied to the misfit of each vertex and for each control_parameter'))
    37                 string="%s\n%s"%(string,fielddisplay(obj,'cost_function_threshold','misfit convergence criterion. Default is 1%, NaN if not applied'))
    38                 string="%s\n%s"%(string,fielddisplay(obj,'maxiter_per_step','maximum iterations during each optimization step'))
    39                 string="%s\n%s"%(string,fielddisplay(obj,'gradient_scaling','scaling factor on gradient direction during optimization, for each optimization step'))
    40                 string="%s\n%s"%(string,fielddisplay(obj,'step_threshold','decrease threshold for misfit, default is 30%'))
    41                 string="%s\n%s"%(string,fielddisplay(obj,'min_parameters','absolute minimum acceptable value of the inversed parameter on each vertex'))
    42                 string="%s\n%s"%(string,fielddisplay(obj,'max_parameters','absolute maximum acceptable value of the inversed parameter on each vertex'))
    43                 string="%s\n%s"%(string,fielddisplay(obj,'gradient_only','stop control method solution at gradient'))
    44                 string="%s\n%s"%(string,fielddisplay(obj,'vx_obs','observed velocity x component [m/a]'))
    45                 string="%s\n%s"%(string,fielddisplay(obj,'vy_obs','observed velocity y component [m/a]'))
    46                 string="%s\n%s"%(string,fielddisplay(obj,'vel_obs','observed velocity magnitude [m/a]'))
    47                 string="%s\n%s"%(string,fielddisplay(obj,'thickness_obs','observed thickness [m]'))
     47                string="%s\n%s"%(string,fielddisplay(self,'iscontrol','is inversion activated?'))
     48                string="%s\n%s"%(string,fielddisplay(self,'incomplete_adjoint','do we assume linear viscosity?'))
     49                string="%s\n%s"%(string,fielddisplay(self,'control_parameters','parameter where inverse control is carried out; ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}'))
     50                string="%s\n%s"%(string,fielddisplay(self,'nsteps','number of optimization searches'))
     51                string="%s\n%s"%(string,fielddisplay(self,'cost_functions','indicate the type of response for each optimization step'))
     52                string="%s\n%s"%(string,fielddisplay(self,'cost_functions_coefficients','cost_functions_coefficients applied to the misfit of each vertex and for each control_parameter'))
     53                string="%s\n%s"%(string,fielddisplay(self,'cost_function_threshold','misfit convergence criterion. Default is 1%, NaN if not applied'))
     54                string="%s\n%s"%(string,fielddisplay(self,'maxiter_per_step','maximum iterations during each optimization step'))
     55                string="%s\n%s"%(string,fielddisplay(self,'gradient_scaling','scaling factor on gradient direction during optimization, for each optimization step'))
     56                string="%s\n%s"%(string,fielddisplay(self,'step_threshold','decrease threshold for misfit, default is 30%'))
     57                string="%s\n%s"%(string,fielddisplay(self,'min_parameters','absolute minimum acceptable value of the inversed parameter on each vertex'))
     58                string="%s\n%s"%(string,fielddisplay(self,'max_parameters','absolute maximum acceptable value of the inversed parameter on each vertex'))
     59                string="%s\n%s"%(string,fielddisplay(self,'gradient_only','stop control method solution at gradient'))
     60                string="%s\n%s"%(string,fielddisplay(self,'vx_obs','observed velocity x component [m/a]'))
     61                string="%s\n%s"%(string,fielddisplay(self,'vy_obs','observed velocity y component [m/a]'))
     62                string="%s\n%s"%(string,fielddisplay(self,'vel_obs','observed velocity magnitude [m/a]'))
     63                string="%s\n%s"%(string,fielddisplay(self,'thickness_obs','observed thickness [m]'))
    4864                string="%s\n%s"%(string,'Available cost functions:')
    4965                string="%s\n%s"%(string,'   101: SurfaceAbsVelMisfit')
     
    5975                #}}}
    6076
    61         def setdefaultparameters(obj):
    62                 # {{{setdefaultparameters
     77        def setdefaultparameters(self): # {{{
    6378               
    6479                #default is incomplete adjoint for now
    65                 obj.incomplete_adjoint=1
     80                self.incomplete_adjoint=1
    6681
    6782                #parameter to be inferred by control methods (only
    6883                #drag and B are supported yet)
    69                 obj.control_parameters=['FrictionCoefficient']
     84                self.control_parameters='FrictionCoefficient'
    7085
    7186                #number of steps in the control methods
    72                 obj.nsteps=20
     87                self.nsteps=20
    7388
    7489                #maximum number of iteration in the optimization algorithm for
    7590                #each step
    76                 obj.maxiter_per_step=20*ones(obj.nsteps)
     91                self.maxiter_per_step=20*numpy.ones(self.nsteps)
    7792
    7893                #the inversed parameter is updated as follows:
     
    8196                #inversed parameter (10^8 for B, 50 for drag) and can be decreased
    8297                #after the first iterations
    83                 obj.gradient_scaling=50*ones(obj.nsteps)
     98                self.gradient_scaling=50*numpy.ones(self.nsteps)
    8499
    85100                #several responses can be used:
    86                 obj.cost_functions=101*ones(obj.nsteps)
     101                self.cost_functions=101*numpy.ones(self.nsteps)
    87102
    88103                #step_threshold is used to speed up control method. When
    89                 #misfit(1)/misfit(0) < obj.step_threshold, we go directly to
     104                #misfit(1)/misfit(0) < self.step_threshold, we go directly to
    90105                #the next step
    91                 obj.step_threshold=.7*ones(obj.nsteps) #30 per cent decrement
     106                self.step_threshold=.7*numpy.ones(self.nsteps) #30 per cent decrement
    92107
    93108                #stop control solution at the gradient computation and return it?
    94                 obj.gradient_only=0
     109                self.gradient_only=0
    95110
    96111                #cost_function_threshold is a criteria to stop the control methods.
    97112                #if J[n]-J[n-1]/J[n] < criteria, the control run stops
    98113                #NaN if not applied
    99                 obj.cost_function_threshold=NaN #not activated
     114                self.cost_function_threshold=float('NaN')    #not activated
    100115
    101                 return obj
    102                 #}}}
     116                return self
     117        #}}}
    103118
     119        def checkconsistency(self,md,solution,analyses):    # {{{
    104120
     121                #Early return
     122                if not self.iscontrol:
     123                        return md
     124
     125                num_controls=numpy.size(md.inversion.control_parameters)
     126                num_costfunc=numpy.size(md.inversion.cost_functions,1)
     127
     128                md = checkfield(md,'inversion.iscontrol','values',[0,1])
     129                md = checkfield(md,'inversion.tao','values',[0,1])
     130                md = checkfield(md,'inversion.incomplete_adjoint','values',[0,1])
     131                md = checkfield(md,'inversion.control_parameters','cell',1,'values',['BalancethicknessThickeningRate','FrictionCoefficient','MaterialsRheologyBbar','Vx','Vy'])
     132                md = checkfield(md,'inversion.nsteps','numel',[1],'>=',1)
     133                md = checkfield(md,'inversion.maxiter_per_step','size',[md.inversion.nsteps],'>=',0)
     134                md = checkfield(md,'inversion.step_threshold','size',[md.inversion.nsteps])
     135                md = checkfield(md,'inversion.cost_functions','size',[md.inversion.nsteps,num_costfunc],'values',[101,102,103,104,105,201,501,502,503,504,505])
     136                md = checkfield(md,'inversion.cost_functions_coefficients','size',[md.mesh.numberofvertices,num_costfunc],'>=',0)
     137                md = checkfield(md,'inversion.gradient_only','values',[0,1])
     138                md = checkfield(md,'inversion.gradient_scaling','size',[md.inversion.nsteps,num_controls])
     139                md = checkfield(md,'inversion.min_parameters','size',[md.mesh.numberofvertices,num_controls])
     140                md = checkfield(md,'inversion.max_parameters','size',[md.mesh.numberofvertices,num_controls])
     141
     142                if solution==BalancethicknessSolutionEnum():
     143                        md = checkfield(md,'inversion.thickness_obs','size',[md.mesh.numberofvertices],'NaN',1)
     144                else:
     145                        md = checkfield(md,'inversion.vx_obs','size',[md.mesh.numberofvertices],'NaN',1)
     146                        md = checkfield(md,'inversion.vy_obs','size',[md.mesh.numberofvertices],'NaN',1)
     147
     148                return md
     149        # }}}
     150
     151        def marshall(self,fid):    # {{{
     152
     153                WriteData(fid,'object',self,'fieldname','iscontrol','format','Boolean')
     154                WriteData(fid,'object',self,'fieldname','tao','format','Boolean')
     155                WriteData(fid,'object',self,'fieldname','incomplete_adjoint','format','Boolean')
     156                if not self.iscontrol:
     157                        return
     158                WriteData(fid,'object',self,'fieldname','nsteps','format','Integer')
     159                WriteData(fid,'object',self,'fieldname','maxiter_per_step','format','DoubleMat','mattype',3)
     160                WriteData(fid,'object',self,'fieldname','cost_functions_coefficients','format','DoubleMat','mattype',1)
     161                WriteData(fid,'object',self,'fieldname','gradient_scaling','format','DoubleMat','mattype',3)
     162                WriteData(fid,'object',self,'fieldname','cost_function_threshold','format','Double')
     163                WriteData(fid,'object',self,'fieldname','min_parameters','format','DoubleMat','mattype',3)
     164                WriteData(fid,'object',self,'fieldname','max_parameters','format','DoubleMat','mattype',3)
     165                WriteData(fid,'object',self,'fieldname','step_threshold','format','DoubleMat','mattype',3)
     166                WriteData(fid,'object',self,'fieldname','gradient_only','format','Boolean')
     167                WriteData(fid,'object',self,'fieldname','vx_obs','format','DoubleMat','mattype',1)
     168                WriteData(fid,'object',self,'fieldname','vy_obs','format','DoubleMat','mattype',1)
     169                WriteData(fid,'object',self,'fieldname','vz_obs','format','DoubleMat','mattype',1)
     170                WriteData(fid,'object',self,'fieldname','thickness_obs','format','DoubleMat','mattype',1)
     171
     172                #process control parameters
     173                num_control_parameters=numpy.size(self.control_parameters)
     174                data=[StringToEnum(self.control_parameters[i])[0] for i in xrange(0,num_control_parameters)]
     175                WriteData(fid,'data',data,'enum',InversionControlParametersEnum(),'format','DoubleMat','mattype',3)
     176                WriteData(fid,'data',num_control_parameters,'enum',InversionNumControlParametersEnum(),'format','Integer')
     177
     178                #process cost functions
     179                num_cost_functions=size(self.cost_functions,1)
     180                data=self.cost_functions
     181                data[[i for i,item in enumerate(data) if item==101]]=SurfaceAbsVelMisfitEnum()
     182                data[[i for i,item in enumerate(data) if item==102]]=SurfaceRelVelMisfitEnum()
     183                data[[i for i,item in enumerate(data) if item==103]]=SurfaceLogVelMisfitEnum()
     184                data[[i for i,item in enumerate(data) if item==104]]=SurfaceLogVxVyMisfitEnum()
     185                data[[i for i,item in enumerate(data) if item==105]]=SurfaceAverageVelMisfitEnum()
     186                data[[i for i,item in enumerate(data) if item==201]]=ThicknessAbsMisfitEnum()
     187                data[[i for i,item in enumerate(data) if item==501]]=DragCoefficientAbsGradientEnum()
     188                data[[i for i,item in enumerate(data) if item==502]]=RheologyBbarAbsGradientEnum()
     189                data[[i for i,item in enumerate(data) if item==503]]=ThicknessAbsGradientEnum()
     190                data[[i for i,item in enumerate(data) if item==504]]=ThicknessAlongGradientEnum()
     191                data[[i for i,item in enumerate(data) if item==505]]=ThicknessAcrossGradientEnum()
     192                WriteData(fid,'data',data,'enum',InversionCostFunctionsEnum(),'format','DoubleMat','mattype',3)
     193                WriteData(fid,'data',num_cost_functions,'enum',InversionNumCostFunctionsEnum(),'format','Integer')
     194        # }}}
     195
  • issm/branches/trunk-jpl-damage/src/m/classes/mask.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class mask:
     7class mask(object):
     8        """
     9        MASK class definition
     10
     11           Usage:
     12              mask=mask();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1727
    1828                #}}}
    19         def __repr__(obj):
     29        def __repr__(self):
    2030                # {{{ Display
    2131
    2232                string="";
    23                 string="%s\n%s"%(string,fielddisplay(obj,"elementonfloatingice","element on floating ice flags list"))
    24                 string="%s\n%s"%(string,fielddisplay(obj,"vertexonfloatingice","vertex on floating ice flags list"))
    25                 string="%s\n%s"%(string,fielddisplay(obj,"elementongroundedice","element on grounded ice  list"))
    26                 string="%s\n%s"%(string,fielddisplay(obj,"vertexongroundedice","vertex on grounded ice flags list"))
    27                 string="%s\n%s"%(string,fielddisplay(obj,"elementonwater","element on water flags list"))
    28                 string="%s\n%s"%(string,fielddisplay(obj,"vertexonwater","vertex on water flags list"))
     33                string="%s\n%s"%(string,fielddisplay(self,"elementonfloatingice","element on floating ice flags list"))
     34                string="%s\n%s"%(string,fielddisplay(self,"vertexonfloatingice","vertex on floating ice flags list"))
     35                string="%s\n%s"%(string,fielddisplay(self,"elementongroundedice","element on grounded ice  list"))
     36                string="%s\n%s"%(string,fielddisplay(self,"vertexongroundedice","vertex on grounded ice flags list"))
     37                string="%s\n%s"%(string,fielddisplay(self,"elementonwater","element on water flags list"))
     38                string="%s\n%s"%(string,fielddisplay(self,"vertexonwater","vertex on water flags list"))
    2939                return string
    3040                #}}}
    3141               
    32         def setdefaultparameters(obj):
     42        def setdefaultparameters(self):
    3343                # {{{setdefaultparameters
    34                 return obj
     44                return self
    3545        #}}}
    3646
     47        def checkconsistency(self,md,solution,analyses):    # {{{
     48
     49                md = checkfield(md,'mask.elementonfloatingice','size',[md.mesh.numberofelements],'values',[0,1])
     50                md = checkfield(md,'mask.elementongroundedice','size',[md.mesh.numberofelements],'values',[0,1])
     51                md = checkfield(md,'mask.elementonwater'      ,'size',[md.mesh.numberofelements],'values',[0,1])
     52                md = checkfield(md,'mask.vertexonfloatingice' ,'size',[md.mesh.numberofvertices],'values',[0,1])
     53                md = checkfield(md,'mask.vertexongroundedice' ,'size',[md.mesh.numberofvertices],'values',[0,1])
     54                md = checkfield(md,'mask.vertexonwater'       ,'size',[md.mesh.numberofvertices],'values',[0,1])
     55
     56                return md
     57        # }}}
     58
     59        def marshall(self,fid):    # {{{
     60                WriteData(fid,'object',self,'fieldname','elementonfloatingice','format','BooleanMat','mattype',2)
     61                WriteData(fid,'object',self,'fieldname','elementongroundedice','format','BooleanMat','mattype',2)
     62                WriteData(fid,'object',self,'fieldname','elementonwater','format','BooleanMat','mattype',2)
     63                WriteData(fid,'object',self,'fieldname','vertexonfloatingice','format','DoubleMat','mattype',1)
     64                WriteData(fid,'object',self,'fieldname','vertexongroundedice','format','DoubleMat','mattype',1)
     65                WriteData(fid,'object',self,'fieldname','vertexonwater','format','DoubleMat','mattype',1)
     66        # }}}
     67
  • issm/branches/trunk-jpl-damage/src/m/classes/materials.m

    r12897 r13101  
    66classdef materials
    77        properties (SetAccess=public)
    8                 rho_ice                    = 0;
    9                 rho_water                  = 0;
    10                 rho_freshwater             = 0;
    11                 mu_water                   = 0;
    12                 heatcapacity               = 0;
    13                 latentheat                 = 0;
    14                 thermalconductivity        = 0;
    15                 meltingpoint               = 0;
    16                 beta                       = 0;
    17                 mixed_layer_capacity       = 0;
    18                 thermal_exchange_velocity  = 0;
     8                rho_ice                    = 0.;
     9                rho_water                  = 0.;
     10                rho_freshwater             = 0.;
     11                mu_water                   = 0.;
     12                heatcapacity               = 0.;
     13                latentheat                 = 0.;
     14                thermalconductivity        = 0.;
     15                meltingpoint               = 0.;
     16                beta                       = 0.;
     17                mixed_layer_capacity       = 0.;
     18                thermal_exchange_velocity  = 0.;
    1919                rheology_B   = NaN;
    2020                rheology_n   = NaN;
     
    3434
    3535                        %ice density (kg/m^3)
    36                         obj.rho_ice=917;
     36                        obj.rho_ice=917.;
    3737
    3838                        %ocean water density (kg/m^3)
    39                         obj.rho_water=1023;
     39                        obj.rho_water=1023.;
    4040
    4141                        %fresh water density (kg/m^3)
    42                         obj.rho_freshwater=1000;
     42                        obj.rho_freshwater=1000.;
    4343
    4444                        %water viscosity (N.s/m^2)
     
    4646
    4747                        %ice heat capacity cp (J/kg/K)
    48                         obj.heatcapacity=2093;
     48                        obj.heatcapacity=2093.;
    4949
    5050                        %ice latent heat of fusion L (J/kg)
     
    6161
    6262                        %mixed layer (ice-water interface) heat capacity (J/kg/K)
    63                         obj.mixed_layer_capacity=3974;
     63                        obj.mixed_layer_capacity=3974.;
    6464
    6565                        %thermal exchange velocity (ice-water interface) (m/s)
     
    114114                        WriteData(fid,'object',obj,'fieldname','rheology_n','format','DoubleMat','mattype',2);
    115115                        WriteData(fid,'object',obj,'fieldname','rheology_Z','format','DoubleMat','mattype',1);
    116                         WriteData(fid,'data',StringToEnum(obj.rheology_law),'enum',MaterialsRheologyLawEnum,'format','Integer');
     116                        WriteData(fid,'data',StringToEnum(obj.rheology_law),'enum',MaterialsRheologyLawEnum(),'format','Integer');
    117117                end % }}}
    118118        end
  • issm/branches/trunk-jpl-damage/src/m/classes/materials.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from StringToEnum import StringToEnum
     5from checkfield import *
     6from WriteData import *
    37
    4 class materials:
     8class materials(object):
     9        """
     10        MATERIALS class definition
     11
     12           Usage:
     13              materials=materials();
     14        """
     15
    516        #properties
    617        def __init__(self):
    718                # {{{ Properties
    8                 self.rho_ice                    = 0;
    9                 self.rho_water                  = 0;
    10                 self.mu_water                   = 0;
    11                 self.heatcapacity               = 0;
    12                 self.latentheat                 = 0;
    13                 self.thermalconductivity        = 0;
    14                 self.meltingpoint               = 0;
    15                 self.beta                       = 0;
    16                 self.mixed_layer_capacity       = 0;
    17                 self.thermal_exchange_velocity  = 0;
     19                self.rho_ice                    = 0.
     20                self.rho_water                  = 0.
     21                self.rho_freshwater             = 0.
     22                self.mu_water                   = 0.
     23                self.heatcapacity               = 0.
     24                self.latentheat                 = 0.
     25                self.thermalconductivity        = 0.
     26                self.meltingpoint               = 0.
     27                self.beta                       = 0.
     28                self.mixed_layer_capacity       = 0.
     29                self.thermal_exchange_velocity  = 0.
    1830                self.rheology_B   = float('NaN')
    1931                self.rheology_n   = float('NaN')
    20                 self.rheology_law = "";
     32                self.rheology_law = ''
    2133
    2234                self.setdefaultparameters()
    2335                #}}}
    24         def __repr__(obj):
     36        def __repr__(self):
    2537                # {{{ Display
    2638                string="   Materials:"
    2739
    28                 string="%s\n\n%s"%(string,fielddisplay(obj,"rho_ice","ice density [kg/m^3]"))
    29                 string="%s\n%s"%(string,fielddisplay(obj,"rho_water","water density [kg/m^3]"))
    30                 string="%s\n%s"%(string,fielddisplay(obj,"mu_water","water viscosity [N s/m^2]"))
    31                 string="%s\n%s"%(string,fielddisplay(obj,"heatcapacity","heat capacity [J/kg/K]"))
    32                 string="%s\n%s"%(string,fielddisplay(obj,"thermalconductivity","ice thermal conductivity [W/m/K]"))
    33                 string="%s\n%s"%(string,fielddisplay(obj,"meltingpoint","melting point of ice at 1atm in K"))
    34                 string="%s\n%s"%(string,fielddisplay(obj,"latentheat","latent heat of fusion [J/m^3]"))
    35                 string="%s\n%s"%(string,fielddisplay(obj,"beta","rate of change of melting point with pressure [K/Pa]"))
    36                 string="%s\n%s"%(string,fielddisplay(obj,"mixed_layer_capacity","mixed layer capacity [W/kg/K]"))
    37                 string="%s\n%s"%(string,fielddisplay(obj,"thermal_exchange_velocity","thermal exchange velocity [m/s]"))
    38                 string="%s\n%s"%(string,fielddisplay(obj,"rheology_B","flow law parameter [Pa/s^(1/n)]"))
    39                 string="%s\n%s"%(string,fielddisplay(obj,"rheology_n","Glen""s flow law exponent"))
    40                 string="%s\n%s"%(string,fielddisplay(obj,"rheology_law","law for the temperature dependance of the rheology: ""None"", ""Paterson"" or ""Arrhenius"""))
     40                string="%s\n\n%s"%(string,fielddisplay(self,"rho_ice","ice density [kg/m^3]"))
     41                string="%s\n%s"%(string,fielddisplay(self,"rho_water","water density [kg/m^3]"))
     42                string="%s\n%s"%(string,fielddisplay(self,"rho_freshwater","fresh water density [kg/m^3]"))
     43                string="%s\n%s"%(string,fielddisplay(self,"mu_water","water viscosity [N s/m^2]"))
     44                string="%s\n%s"%(string,fielddisplay(self,"heatcapacity","heat capacity [J/kg/K]"))
     45                string="%s\n%s"%(string,fielddisplay(self,"thermalconductivity","ice thermal conductivity [W/m/K]"))
     46                string="%s\n%s"%(string,fielddisplay(self,"meltingpoint","melting point of ice at 1atm in K"))
     47                string="%s\n%s"%(string,fielddisplay(self,"latentheat","latent heat of fusion [J/m^3]"))
     48                string="%s\n%s"%(string,fielddisplay(self,"beta","rate of change of melting point with pressure [K/Pa]"))
     49                string="%s\n%s"%(string,fielddisplay(self,"mixed_layer_capacity","mixed layer capacity [W/kg/K]"))
     50                string="%s\n%s"%(string,fielddisplay(self,"thermal_exchange_velocity","thermal exchange velocity [m/s]"))
     51                string="%s\n%s"%(string,fielddisplay(self,"rheology_B","flow law parameter [Pa/s^(1/n)]"))
     52                string="%s\n%s"%(string,fielddisplay(self,"rheology_n","Glen's flow law exponent"))
     53                string="%s\n%s"%(string,fielddisplay(self,"rheology_law","law for the temperature dependance of the rheology: 'None', 'Paterson' or 'Arrhenius'"))
    4154
    4255                return string
    4356                #}}}
    44         def setdefaultparameters(obj):
     57        def setdefaultparameters(self):
    4558                # {{{setdefaultparameters
    4659                #ice density (kg/m^3)
    47                 obj.rho_ice=917
     60                self.rho_ice=917.
    4861
    49                 #water density (kg/m^3)
    50                 obj.rho_water=1023
     62                #ocean water density (kg/m^3)
     63                self.rho_water=1023.
     64
     65                #fresh water density (kg/m^3)
     66                self.rho_freshwater=1000.
    5167
    5268                #water viscosity (N.s/m^2)
    53                 obj.mu_water=0.001787 
     69                self.mu_water=0.001787 
    5470
    5571                #ice heat capacity cp (J/kg/K)
    56                 obj.heatcapacity=2093
     72                self.heatcapacity=2093.
    5773
    5874                #ice latent heat of fusion L (J/kg)
    59                 obj.latentheat=3.34*10**5
     75                self.latentheat=3.34*10**5
    6076
    6177                #ice thermal conductivity (W/m/K)
    62                 obj.thermalconductivity=2.4
     78                self.thermalconductivity=2.4
    6379
    6480                #the melting point of ice at 1 atmosphere of pressure in K
    65                 obj.meltingpoint=273.15
     81                self.meltingpoint=273.15
    6682
    6783                #rate of change of melting point with pressure (K/Pa)
    68                 obj.beta=9.8*10**-8
     84                self.beta=9.8*10**-8
    6985
    7086                #mixed layer (ice-water interface) heat capacity (J/kg/K)
    71                 obj.mixed_layer_capacity=3974
     87                self.mixed_layer_capacity=3974.
    7288
    7389                #thermal exchange velocity (ice-water interface) (m/s)
    74                 obj.thermal_exchange_velocity=1.00*10**-4
     90                self.thermal_exchange_velocity=1.00*10**-4
    7591
    7692                #Rheology law: what is the temperature dependence of B with T
    7793                #available: none, paterson and arrhenius
    78                 obj.rheology_law='Paterson'
    79                 return obj
     94                self.rheology_law='Paterson'
     95                return self
    8096                #}}}
     97
     98        def checkconsistency(self,md,solution,analyses):    # {{{
     99                md = checkfield(md,'materials.rho_ice','>',0)
     100                md = checkfield(md,'materials.rho_water','>',0)
     101                md = checkfield(md,'materials.rho_freshwater','>',0)
     102                md = checkfield(md,'materials.mu_water','>',0)
     103                md = checkfield(md,'materials.rheology_B','>',0,'size',[md.mesh.numberofvertices])
     104                md = checkfield(md,'materials.rheology_n','>',0,'size',[md.mesh.numberofelements])
     105                md = checkfield(md,'materials.rheology_law','values',['None','Paterson','Arrhenius'])
     106                return md
     107        # }}}
     108
     109        def marshall(self,fid):    # {{{
     110                WriteData(fid,'object',self,'fieldname','rho_ice','format','Double')
     111                WriteData(fid,'object',self,'fieldname','rho_water','format','Double')
     112                WriteData(fid,'object',self,'fieldname','rho_freshwater','format','Double')
     113                WriteData(fid,'object',self,'fieldname','mu_water','format','Double')
     114                WriteData(fid,'object',self,'fieldname','heatcapacity','format','Double')
     115                WriteData(fid,'object',self,'fieldname','latentheat','format','Double')
     116                WriteData(fid,'object',self,'fieldname','thermalconductivity','format','Double')
     117                WriteData(fid,'object',self,'fieldname','meltingpoint','format','Double')
     118                WriteData(fid,'object',self,'fieldname','beta','format','Double')
     119                WriteData(fid,'object',self,'fieldname','mixed_layer_capacity','format','Double')
     120                WriteData(fid,'object',self,'fieldname','thermal_exchange_velocity','format','Double')
     121                WriteData(fid,'object',self,'fieldname','rheology_B','format','DoubleMat','mattype',1)
     122                WriteData(fid,'object',self,'fieldname','rheology_n','format','DoubleMat','mattype',2)
     123                WriteData(fid,'data',StringToEnum(self.rheology_law)[0],'enum',MaterialsRheologyLawEnum(),'format','Integer')
     124        # }}}
     125
  • issm/branches/trunk-jpl-damage/src/m/classes/mesh.m

    r12946 r13101  
    8787                        md = checkfield(md,'mesh.vertexonbed','size',[md.mesh.numberofvertices 1],'values',[0 1]);
    8888                        md = checkfield(md,'mesh.vertexonsurface','size',[md.mesh.numberofvertices 1],'values',[0 1]);
     89                        if (md.mesh.dimension==3),
     90                                md = checkfield(md,'mesh.z','>=',md.geometry.bed-10^-10,'message','''mesh.z'' lower than bedrock');
     91                                md = checkfield(md,'mesh.z','<=',md.geometry.surface+10^-10,'message','''mesh.z'' higher than surface elevation');
     92                        end
    8993                        if (md.mesh.dimension==2),
    9094                                md = checkfield(md,'mesh.average_vertex_connectivity','>=',9,'message','''mesh.average_vertex_connectivity'' should be at least 9 in 2d');
     
    96100                        %Solution specific checks
    97101                        switch(solution),
    98                                 case PrognosticSolutionEnum,
     102                                case PrognosticSolutionEnum(),
    99103                                        if md.prognostic.stabilization==3,
    100104                                                md = checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
     
    102106                                                md = checkfield(md,'mesh.edges(:,1:3)','>',0);
    103107                                        end
    104                                 case BalancethicknessSolutionEnum,
     108                                case BalancethicknessSolutionEnum(),
    105109                                        if md.balancethickness.stabilization==3,
    106110                                                md = checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
     
    108112                                                md = checkfield(md,'mesh.edges(:,1:3)','>',0);
    109113                                        end
    110                                 case TransientSolutionEnum,
     114                                case TransientSolutionEnum(),
    111115                                        if md.transient.isprognostic & md.prognostic.stabilization==3,
    112116                                                md = checkfield(md,'mesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d meshes');
     
    114118                                                md = checkfield(md,'mesh.edges(:,1:3)','>',0);
    115119                                        end
    116                                 case ThermalSolutionEnum,
     120                                case ThermalSolutionEnum(),
    117121                                        md = checkfield(md,'mesh.dimension','values',3,'message','thermal solution only supported on 3d meshes');
    118122                        end
  • issm/branches/trunk-jpl-damage/src/m/classes/mesh.py

    r12946 r13101  
    22import numpy
    33from fielddisplay import fielddisplay
     4from EnumDefinitions import *
    45from checkfield import *
    5 from EnumDefinitions import *
    66from MatlabFuncs import *
    77
    8 class mesh:
     8class mesh(object):
     9        """
     10        MESH class definition
     11
     12           Usage:
     13              mesh=mesh();
     14        """
     15
    916        #properties
    1017        def __init__(self):
     
    5461
    5562                #}}}
    56         def __repr__(obj):
     63        def __repr__(self):
    5764                # {{{ Display
    5865
    59                 if obj.dimension==3:
     66                if self.dimension==3:
    6067                        string="\n%s"%("      Elements and vertices of the original 2d mesh:")
    6168                       
    62                         string="%s\n%s"%(string,fielddisplay(obj,"numberofelements2d","number of elements"))
    63                         string="%s\n%s"%(string,fielddisplay(obj,"numberofvertices2d","number of vertices"))
    64                         string="%s\n%s"%(string,fielddisplay(obj,"elements2d","index into (x,y,z), coordinates of the vertices"))
    65                         string="%s\n%s"%(string,fielddisplay(obj,"x2d","vertices x coordinate"))
    66                         string="%s\n%s"%(string,fielddisplay(obj,"y2d","vertices y coordinate"))
     69                        string="%s\n%s"%(string,fielddisplay(self,"numberofelements2d","number of elements"))
     70                        string="%s\n%s"%(string,fielddisplay(self,"numberofvertices2d","number of vertices"))
     71                        string="%s\n%s"%(string,fielddisplay(self,"elements2d","index into (x,y,z), coordinates of the vertices"))
     72                        string="%s\n%s"%(string,fielddisplay(self,"x2d","vertices x coordinate"))
     73                        string="%s\n%s"%(string,fielddisplay(self,"y2d","vertices y coordinate"))
    6774
    6875                        string="%s\n%s" %(string,"Elements and vertices of the extruded 3d mesh:")
    6976                else:
    7077                        string="\n%s"%("      Elements and vertices:")
    71                 string="%s\n%s"%(string,fielddisplay(obj,"numberofelements","number of elements"))
    72                 string="%s\n%s"%(string,fielddisplay(obj,"numberofvertices","number of vertices"))
    73                 string="%s\n%s"%(string,fielddisplay(obj,"elements","index into (x,y,z), coordinates of the vertices"))
    74                 string="%s\n%s"%(string,fielddisplay(obj,"x","vertices x coordinate"))
    75                 string="%s\n%s"%(string,fielddisplay(obj,"y","vertices y coordinate"))
    76                 string="%s\n%s"%(string,fielddisplay(obj,"z","vertices z coordinate"))
    77                 string="%s\n%s"%(string,fielddisplay(obj,"edges","edges of the 2d mesh (vertex1 vertex2 element1 element2)"))
    78                 string="%s\n%s"%(string,fielddisplay(obj,"numberofedges","number of edges of the 2d mesh"))
     78                string="%s\n%s"%(string,fielddisplay(self,"numberofelements","number of elements"))
     79                string="%s\n%s"%(string,fielddisplay(self,"numberofvertices","number of vertices"))
     80                string="%s\n%s"%(string,fielddisplay(self,"elements","index into (x,y,z), coordinates of the vertices"))
     81                string="%s\n%s"%(string,fielddisplay(self,"x","vertices x coordinate"))
     82                string="%s\n%s"%(string,fielddisplay(self,"y","vertices y coordinate"))
     83                string="%s\n%s"%(string,fielddisplay(self,"z","vertices z coordinate"))
     84                string="%s\n%s"%(string,fielddisplay(self,"edges","edges of the 2d mesh (vertex1 vertex2 element1 element2)"))
     85                string="%s\n%s"%(string,fielddisplay(self,"numberofedges","number of edges of the 2d mesh"))
    7986
    8087                string="%s%s"%(string,"\n      Properties:")
    81                 string="%s\n%s"%(string,fielddisplay(obj,"dimension","mesh dimension (2d or 3d)"))
    82                 string="%s\n%s"%(string,fielddisplay(obj,"numberoflayers","number of extrusion layers"))
    83                 string="%s\n%s"%(string,fielddisplay(obj,"vertexonbed","lower vertices flags list"))
    84                 string="%s\n%s"%(string,fielddisplay(obj,"elementonbed","lower elements flags list"))
    85                 string="%s\n%s"%(string,fielddisplay(obj,"vertexonsurface","upper vertices flags list"))
    86                 string="%s\n%s"%(string,fielddisplay(obj,"elementonsurface","upper elements flags list"))
    87                 string="%s\n%s"%(string,fielddisplay(obj,"uppervertex","upper vertex list (NaN for vertex on the upper surface)"))
    88                 string="%s\n%s"%(string,fielddisplay(obj,"upperelements","upper element list (NaN for element on the upper layer)"))
    89                 string="%s\n%s"%(string,fielddisplay(obj,"lowervertex","lower vertex list (NaN for vertex on the lower surface)"))
    90                 string="%s\n%s"%(string,fielddisplay(obj,"lowerelements","lower element list (NaN for element on the lower layer"))
    91                 string="%s\n%s"%(string,fielddisplay(obj,"vertexonboundary","vertices on the boundary of the domain flag list"))
    92                 string="%s\n%s"%(string,fielddisplay(obj,"segments","edges on domain boundary (vertex1 vertex2 element)"))
    93                 string="%s\n%s"%(string,fielddisplay(obj,"segmentmarkers","number associated to each segment"))
    94                 string="%s\n%s"%(string,fielddisplay(obj,"vertexconnectivity","list of vertices connected to vertex_i"))
    95                 string="%s\n%s"%(string,fielddisplay(obj,"elementconnectivity","list of vertices connected to element_i"))
    96                 string="%s\n%s"%(string,fielddisplay(obj,"average_vertex_connectivity","average number of vertices connected to one vertex"))
     88                string="%s\n%s"%(string,fielddisplay(self,"dimension","mesh dimension (2d or 3d)"))
     89                string="%s\n%s"%(string,fielddisplay(self,"numberoflayers","number of extrusion layers"))
     90                string="%s\n%s"%(string,fielddisplay(self,"vertexonbed","lower vertices flags list"))
     91                string="%s\n%s"%(string,fielddisplay(self,"elementonbed","lower elements flags list"))
     92                string="%s\n%s"%(string,fielddisplay(self,"vertexonsurface","upper vertices flags list"))
     93                string="%s\n%s"%(string,fielddisplay(self,"elementonsurface","upper elements flags list"))
     94                string="%s\n%s"%(string,fielddisplay(self,"uppervertex","upper vertex list (NaN for vertex on the upper surface)"))
     95                string="%s\n%s"%(string,fielddisplay(self,"upperelements","upper element list (NaN for element on the upper layer)"))
     96                string="%s\n%s"%(string,fielddisplay(self,"lowervertex","lower vertex list (NaN for vertex on the lower surface)"))
     97                string="%s\n%s"%(string,fielddisplay(self,"lowerelements","lower element list (NaN for element on the lower layer"))
     98                string="%s\n%s"%(string,fielddisplay(self,"vertexonboundary","vertices on the boundary of the domain flag list"))
     99                string="%s\n%s"%(string,fielddisplay(self,"segments","edges on domain boundary (vertex1 vertex2 element)"))
     100                string="%s\n%s"%(string,fielddisplay(self,"segmentmarkers","number associated to each segment"))
     101                string="%s\n%s"%(string,fielddisplay(self,"vertexconnectivity","list of vertices connected to vertex_i"))
     102                string="%s\n%s"%(string,fielddisplay(self,"elementconnectivity","list of vertices connected to element_i"))
     103                string="%s\n%s"%(string,fielddisplay(self,"average_vertex_connectivity","average number of vertices connected to one vertex"))
    97104
    98105                string="%s%s"%(string,"\n      Extracted model:")
    99                 string="%s\n%s"%(string,fielddisplay(obj,"extractedvertices","vertices extracted from the model"))
    100                 string="%s\n%s"%(string,fielddisplay(obj,"extractedelements","elements extracted from the model"))
     106                string="%s\n%s"%(string,fielddisplay(self,"extractedvertices","vertices extracted from the model"))
     107                string="%s\n%s"%(string,fielddisplay(self,"extractedelements","elements extracted from the model"))
    101108
    102109                string="%s%s"%(string,"\n      Projection:")
    103                 string="%s\n%s"%(string,fielddisplay(obj,"lat","vertices latitude"))
    104                 string="%s\n%s"%(string,fielddisplay(obj,"long","vertices longitude"))
    105                 string="%s\n%s"%(string,fielddisplay(obj,"hemisphere","Indicate hemisphere ""n"" or ""s"" "))
     110                string="%s\n%s"%(string,fielddisplay(self,"lat","vertices latitude"))
     111                string="%s\n%s"%(string,fielddisplay(self,"long","vertices longitude"))
     112                string="%s\n%s"%(string,fielddisplay(self,"hemisphere","Indicate hemisphere 'n' or 's'"))
    106113                return string
    107114                #}}}
    108115               
    109         def setdefaultparameters(obj):
     116        def setdefaultparameters(self):
    110117                # {{{setdefaultparameters
    111118               
     
    115122                #give a good memory/time ration. This value can be checked in
    116123                #trunk/test/Miscellaneous/runme.m
    117                 obj.average_vertex_connectivity=25
    118 
    119                 return obj
     124                self.average_vertex_connectivity=25
     125
     126                return self
    120127        #}}}
    121128
     
    130137                else:
    131138                        md = checkfield(md,'mesh.elements','size',[md.mesh.numberofelements,6])
    132                 if any(numpy.logical_not(ismember(range(1,md.mesh.numberofvertices+1),md.mesh.elements))):
    133                         md = checkmessage(md,"orphan nodes have been found. Check the mesh outline")
     139                if numpy.any(numpy.logical_not(ismember(range(1,md.mesh.numberofvertices+1),md.mesh.elements))):
     140                        md.checkmessage("orphan nodes have been found. Check the mesh outline")
    134141                md = checkfield(md,'mesh.dimension','values',[2,3])
    135142                md = checkfield(md,'mesh.numberoflayers','>=',0)
     
    148155
    149156                #Solution specific checks
    150                 if   solution==PrognosticSolutionEnum:
     157                if   solution==PrognosticSolutionEnum():
    151158                        if md.prognostic.stabilization==3:
    152159                                md = checkfield(md,'mesh.dimension','values',2,'message',"Discontinuous Galerkin only supported for 2d meshes")
    153160                                md = checkfield(md,'mesh.edges','size',[float('NaN'),4])
    154161                                md = checkfield(md,'mesh.edges[:,1:3]','>',0)
    155                 elif solution==BalancethicknessSolutionEnum:
     162                elif solution==BalancethicknessSolutionEnum():
    156163                        if md.balancethickness.stabilization==3:
    157164                                md = checkfield(md,'mesh.dimension','values',2,'message',"Discontinuous Galerkin only supported for 2d meshes")
    158165                                md = checkfield(md,'mesh.edges','size',[float('NaN'),4])
    159166                                md = checkfield(md,'mesh.edges[:,1:3]','>',0)
    160                 elif solution==TransientSolutionEnum:
     167                elif solution==TransientSolutionEnum():
    161168                        if md.transient.isprognostic and md.prognostic.stabilization==3:
    162169                                md = checkfield(md,'mesh.dimension','values',2,'message',"Discontinuous Galerkin only supported for 2d meshes")
    163170                                md = checkfield(md,'mesh.edges','size',[float('NaN'),4])
    164171                                md = checkfield(md,'mesh.edges[:,1:3]','>',0)
    165                 elif solution==ThermalSolutionEnum:
     172                elif solution==ThermalSolutionEnum():
    166173                        md = checkfield(md,'mesh.dimension','values',3,'message','thermal solution only supported on 3d meshes')
    167174
  • issm/branches/trunk-jpl-damage/src/m/classes/miscellaneous.m

    r12878 r13101  
    1 %MISCELANEOUS class definition
     1%MISCELLANEOUS class definition
    22%
    33%   Usage:
  • issm/branches/trunk-jpl-damage/src/m/classes/miscellaneous.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class miscellaneous:
     7class miscellaneous(object):
     8        """
     9        MISCELLANEOUS class definition
     10
     11           Usage:
     12              miscellaneous=miscellaneous();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1424
    1525                #}}}
    16         def __repr__(obj):
     26        def __repr__(self):
    1727                # {{{ Display
    1828                string='   miscellaneous parameters:'
    1929
    20                 string="%s\n\n%s"%(string,fielddisplay(obj,'notes','notes in a cell of strings'))
    21                 string="%s\n%s"%(string,fielddisplay(obj,'name','model name'))
    22                 string="%s\n%s"%(string,fielddisplay(obj,'dummy','empty field to store some data'))
     30                string="%s\n\n%s"%(string,fielddisplay(self,'notes','notes in a cell of strings'))
     31                string="%s\n%s"%(string,fielddisplay(self,'name','model name'))
     32                string="%s\n%s"%(string,fielddisplay(self,'dummy','empty field to store some data'))
    2333                return string
    2434                #}}}
    2535               
    26         def setdefaultparameters(obj):
     36        def setdefaultparameters(self):
    2737                # {{{setdefaultparameters
    28                 return obj
     38                return self
    2939        #}}}
    3040
     41        def checkconsistency(self,md,solution,analyses):    # {{{
     42                md = checkfield(md,'miscellaneous.name','empty',1)
     43                return md
     44        # }}}
     45
     46        def marshall(self,fid):    #  {{{
     47                WriteData(fid,'object',self,'fieldname','name','format','String')
     48        # }}}
     49
  • issm/branches/trunk-jpl-damage/src/m/classes/model/model.m

    r12878 r13101  
    9191                 end
    9292                 %}}}
     93                 function md = collapse(md)% {{{
     94                         %COLLAPSE - collapses a 3d mesh into a 2d mesh
     95                         %
     96                         %   This routine collapses a 3d model into a 2d model
     97                         %   and collapses all the fileds of the 3d model by
     98                         %   taking their depth-averaged values
     99                         %
     100                         %   Usage:
     101                         %      md=collapse(md)
     102                         %
     103                         %   See also: EXTRUDE, MODELEXTRACT
     104
     105                         %Check that the model is really a 3d model
     106                         if ~md.mesh.dimension==3,
     107                                 error('collapse error message: only 3d mesh can be collapsed')
     108                         end
     109
     110                         %Start with changing alle the fields from the 3d mesh
     111
     112                         %drag is limited to nodes that are on the bedrock.
     113                         md.friction.coefficient=project2d(md,md.friction.coefficient,1);
     114
     115                         %p and q (same deal, except for element that are on the bedrock: )
     116                         md.friction.p=project2d(md,md.friction.p,1);
     117                         md.friction.q=project2d(md,md.friction.q,1);
     118
     119                         %observations
     120                         if ~isnan(md.inversion.vx_obs), md.inversion.vx_obs=project2d(md,md.inversion.vx_obs,md.mesh.numberoflayers); end;
     121                         if ~isnan(md.inversion.vy_obs), md.inversion.vy_obs=project2d(md,md.inversion.vy_obs,md.mesh.numberoflayers); end;
     122                         if ~isnan(md.inversion.vel_obs), md.inversion.vel_obs=project2d(md,md.inversion.vel_obs,md.mesh.numberoflayers); end;
     123                         if ~isnan(md.inversion.cost_functions_coefficients), md.inversion.cost_functions_coefficients=project2d(md,md.inversion.cost_functions_coefficients,md.mesh.numberoflayers); end;
     124                         if numel(md.inversion.min_parameters)>1, md.inversion.min_parameters=project2d(md,md.inversion.min_parameters,md.mesh.numberoflayers); end;
     125                         if numel(md.inversion.max_parameters)>1, md.inversion.max_parameters=project2d(md,md.inversion.max_parameters,md.mesh.numberoflayers); end;
     126                         if ~isnan(md.surfaceforcings.mass_balance),
     127                                 md.surfaceforcings.mass_balance=project2d(md,md.surfaceforcings.mass_balance,md.mesh.numberoflayers);
     128                         end;
     129                         if ~isnan(md.balancethickness.thickening_rate), md.balancethickness.thickening_rate=project2d(md,md.balancethickness.thickening_rate,md.mesh.numberoflayers); end;
     130
     131                         %results
     132                         if ~isnan(md.initialization.vx),md.initialization.vx=DepthAverage(md,md.initialization.vx);end;
     133                         if ~isnan(md.initialization.vy),md.initialization.vy=DepthAverage(md,md.initialization.vy);end;
     134                         if ~isnan(md.initialization.vz),md.initialization.vz=DepthAverage(md,md.initialization.vz);end;
     135                         if ~isnan(md.initialization.vel),md.initialization.vel=DepthAverage(md,md.initialization.vel);end;
     136                         if ~isnan(md.initialization.temperature),md.initialization.temperature=DepthAverage(md,md.initialization.temperature);end;
     137
     138                         %bedinfo and surface info
     139                         md.mesh.elementonbed=ones(md.mesh.numberofelements2d,1);
     140                         md.mesh.elementonsurface=ones(md.mesh.numberofelements2d,1);
     141                         md.mesh.vertexonbed=ones(md.mesh.numberofvertices2d,1);
     142                         md.mesh.vertexonsurface=ones(md.mesh.numberofvertices2d,1);
     143
     144                         %elementstype
     145                         if ~isnan(md.flowequation.element_equation)
     146                                 md.flowequation.element_equation=project2d(md,md.flowequation.element_equation,1);
     147                                 md.flowequation.vertex_equation=project2d(md,md.flowequation.vertex_equation,1);
     148                                 md.flowequation.bordermacayeal=project2d(md,md.flowequation.bordermacayeal,1);
     149                                 md.flowequation.borderpattyn=project2d(md,md.flowequation.borderpattyn,1);
     150                                 md.flowequation.borderstokes=project2d(md,md.flowequation.borderstokes,1);
     151                         end   
     152
     153                         %boundary conditions
     154                         md.diagnostic.spcvx=project2d(md,md.diagnostic.spcvx,md.mesh.numberoflayers);
     155                         md.diagnostic.spcvy=project2d(md,md.diagnostic.spcvy,md.mesh.numberoflayers);
     156                         md.diagnostic.spcvz=project2d(md,md.diagnostic.spcvz,md.mesh.numberoflayers);
     157                         md.diagnostic.referential=project2d(md,md.diagnostic.referential,md.mesh.numberoflayers);
     158                         md.prognostic.spcthickness=project2d(md,md.prognostic.spcthickness,md.mesh.numberoflayers);
     159                         md.thermal.spctemperature=project2d(md,md.thermal.spctemperature,md.mesh.numberoflayers);
     160
     161                         %Extrusion of Neumann BC
     162                         if ~isnan(md.diagnostic.icefront),
     163                                 numberofneumann2d=size(md.diagnostic.icefront,1)/(md.mesh.numberoflayers-1);
     164                                 md.diagnostic.icefront=[md.diagnostic.icefront(1:numberofneumann2d,1:2) md.diagnostic.icefront(1:numberofneumann2d,5:6)]; %Add two columns on the first layer
     165                         end
     166
     167                         %materials
     168                         md.materials.rheology_B=DepthAverage(md,md.materials.rheology_B);
     169                         md.materials.rheology_n=project2d(md,md.materials.rheology_n,1);
     170
     171                         %special for thermal modeling:
     172                         md.basalforcings.melting_rate=project2d(md,md.basalforcings.melting_rate,1);
     173                         md.basalforcings.geothermalflux=project2d(md,md.basalforcings.geothermalflux,1); %bedrock only gets geothermal flux
     174
     175                         %update of connectivity matrix
     176                         md.mesh.average_vertex_connectivity=25;
     177
     178                         %Collapse the mesh
     179                         nodes2d=md.mesh.numberofvertices2d;
     180                         elements2d=md.mesh.numberofelements2d;
     181
     182                         %parameters
     183                         md.geometry.surface=project2d(md,md.geometry.surface,1);
     184                         md.geometry.thickness=project2d(md,md.geometry.thickness,1);
     185                         md.geometry.bed=project2d(md,md.geometry.bed,1);
     186                         md.geometry.bathymetry=project2d(md,md.geometry.bathymetry,1);
     187                         md.mesh.vertexonboundary=project2d(md,md.mesh.vertexonboundary,1);
     188                         md.mesh.elementconnectivity=project2d(md,md.mesh.elementconnectivity,1);
     189                         md.mask.elementonfloatingice=project2d(md,md.mask.elementonfloatingice,1);
     190                         md.mask.vertexonfloatingice=project2d(md,md.mask.vertexonfloatingice,1);
     191                         md.mask.elementongroundedice=project2d(md,md.mask.elementongroundedice,1);
     192                         md.mask.vertexongroundedice=project2d(md,md.mask.vertexongroundedice,1);
     193                         md.mask.elementonwater=project2d(md,md.mask.elementonwater,1);
     194                         md.mask.vertexonwater=project2d(md,md.mask.vertexonwater,1);
     195
     196                         %lat long
     197                         if numel(md.mesh.lat) ==md.mesh.numberofvertices,  md.mesh.lat=project2d(md,md.mesh.lat,1); end
     198                         if numel(md.mesh.long)==md.mesh.numberofvertices, md.mesh.long=project2d(md,md.mesh.long,1); end
     199
     200                         %Initialize with the 2d mesh
     201                         md.mesh.x=md.mesh.x2d;
     202                         md.mesh.y=md.mesh.y2d;
     203                         md.mesh.z=zeros(size(md.mesh.x2d));
     204                         md.mesh.numberofvertices=md.mesh.numberofvertices2d;
     205                         md.mesh.numberofelements=md.mesh.numberofelements2d;
     206                         md.mesh.elements=md.mesh.elements2d;
     207
     208                         %Keep a trace of lower and upper nodes
     209                         md.mesh.lowervertex=NaN;
     210                         md.mesh.uppervertex=NaN;
     211                         md.mesh.lowerelements=NaN;
     212                         md.mesh.upperelements=NaN;
     213
     214                         %Remove old mesh
     215                         md.mesh.x2d=NaN;
     216                         md.mesh.y2d=NaN;
     217                         md.mesh.elements2d=NaN;
     218                         md.mesh.numberofelements2d=md.mesh.numberofelements;
     219                         md.mesh.numberofvertices2d=md.mesh.numberofvertices;
     220                         md.mesh.numberoflayers=0;
     221
     222                         %Update mesh type
     223                         md.mesh.dimension=2;
     224                 end % }}}
     225                 function md2 = extract(md,area) % {{{
     226                         %extract - extract a model according to an Argus contour or flag list
     227                         %
     228                         %   This routine extracts a submodel from a bigger model with respect to a given contour
     229                         %   md must be followed by the corresponding exp file or flags list
     230                         %   It can either be a domain file (argus type, .exp extension), or an array of element flags.
     231                         %   If user wants every element outside the domain to be
     232                         %   extract2d, add '~' to the name of the domain file (ex: '~Pattyn.exp');
     233                         %   an empty string '' will be considered as an empty domain
     234                         %   a string 'all' will be considered as the entire domain
     235                         %   add an argument 0 if you do not want the elements to be checked (faster)
     236                         %
     237                         %   Usage:
     238                         %      md2=extract(md,area);
     239                         %
     240                         %   Examples:
     241                         %      md2=extract(md,'Domain.exp');
     242                         %      md2=extract(md,md.mask.elementonfloatingice);
     243                         %
     244                         %   See also: EXTRUDE, COLLAPSE
     245
     246                         %copy model
     247                         md1=md;
     248
     249                         %some checks
     250                         if ((nargin~=2) | (nargout~=1)),
     251                                 help extract
     252                                 error('extract error message: bad usage');
     253                         end
     254
     255                         %get check option
     256                         if (nargin==3 & varargin{1}==0),
     257                                 checkoutline=0;
     258                         else
     259                                 checkoutline=1;
     260                         end
     261
     262                         %get elements that are inside area
     263                         flag_elem=FlagElements(md1,area);
     264                         if ~any(flag_elem),
     265                                 error('extracted model is empty');
     266                         end
     267
     268                         %kick out all elements with 3 dirichlets
     269                         spc_elem=find(~flag_elem);
     270                         spc_node=sort(unique(md1.mesh.elements(spc_elem,:)));
     271                         flag=ones(md1.mesh.numberofvertices,1);
     272                         flag(spc_node)=0;
     273                         pos=find(sum(flag(md1.mesh.elements),2)==0);
     274                         flag_elem(pos)=0;
     275
     276                         %extracted elements and nodes lists
     277                         pos_elem=find(flag_elem);
     278                         pos_node=sort(unique(md1.mesh.elements(pos_elem,:)));
     279
     280                         %keep track of some fields
     281                         numberofvertices1=md1.mesh.numberofvertices;
     282                         numberofelements1=md1.mesh.numberofelements;
     283                         numberofvertices2=length(pos_node);
     284                         numberofelements2=length(pos_elem);
     285                         flag_node=zeros(numberofvertices1,1);
     286                         flag_node(pos_node)=1;
     287
     288                         %Create Pelem and Pnode (transform old nodes in new nodes and same thing for the elements)
     289                         Pelem=zeros(numberofelements1,1);
     290                         Pelem(pos_elem)=[1:numberofelements2]';
     291                         Pnode=zeros(numberofvertices1,1);
     292                         Pnode(pos_node)=[1:numberofvertices2]';
     293
     294                         %renumber the elements (some node won't exist anymore)
     295                         elements_1=md1.mesh.elements;
     296                         elements_2=elements_1(pos_elem,:);
     297                         elements_2(:,1)=Pnode(elements_2(:,1));
     298                         elements_2(:,2)=Pnode(elements_2(:,2));
     299                         elements_2(:,3)=Pnode(elements_2(:,3));
     300                         if md1.mesh.dimension==3,
     301                                 elements_2(:,4)=Pnode(elements_2(:,4));
     302                                 elements_2(:,5)=Pnode(elements_2(:,5));
     303                                 elements_2(:,6)=Pnode(elements_2(:,6));
     304                         end
     305
     306                         %OK, now create the new model !
     307
     308                         %take every fields from model
     309                         md2=md1;
     310
     311                         %automatically modify fields
     312
     313                         %loop over model fields
     314                         model_fields=fields(md1);
     315                         for i=1:length(model_fields),
     316                                 %get field
     317                                 field=md1.(model_fields{i});
     318                                 fieldsize=size(field);
     319                                 if isobject(field), %recursive call
     320                                         object_fields=fields(md1.(model_fields{i}));
     321                                         for j=1:length(object_fields),
     322                                                 %get field
     323                                                 field=md1.(model_fields{i}).(object_fields{j});
     324                                                 fieldsize=size(field);
     325                                                 %size = number of nodes * n
     326                                                 if fieldsize(1)==numberofvertices1
     327                                                         md2.(model_fields{i}).(object_fields{j})=field(pos_node,:);
     328                                                 elseif (fieldsize(1)==numberofvertices1+1)
     329                                                         md2.(model_fields{i}).(object_fields{j})=[field(pos_node,:); field(end,:)];
     330                                                         %size = number of elements * n
     331                                                 elseif fieldsize(1)==numberofelements1
     332                                                         md2.(model_fields{i}).(object_fields{j})=field(pos_elem,:);
     333                                                 end
     334                                         end
     335                                 else
     336                                         %size = number of nodes * n
     337                                         if fieldsize(1)==numberofvertices1
     338                                                 md2.(model_fields{i})=field(pos_node,:);
     339                                         elseif (fieldsize(1)==numberofvertices1+1)
     340                                                 md2.(model_fields{i})=[field(pos_node,:); field(end,:)];
     341                                                 %size = number of elements * n
     342                                         elseif fieldsize(1)==numberofelements1
     343                                                 md2.(model_fields{i})=field(pos_elem,:);
     344                                         end
     345                                 end
     346                         end
     347
     348                         %modify some specific fields
     349
     350                         %Mesh
     351                         md2.mesh.numberofelements=numberofelements2;
     352                         md2.mesh.numberofvertices=numberofvertices2;
     353                         md2.mesh.elements=elements_2;
     354
     355                         %mesh.uppervertex mesh.lowervertex
     356                         if md1.mesh.dimension==3
     357                                 md2.mesh.uppervertex=md1.mesh.uppervertex(pos_node);
     358                                 pos=find(~isnan(md2.mesh.uppervertex));
     359                                 md2.mesh.uppervertex(pos)=Pnode(md2.mesh.uppervertex(pos));
     360
     361                                 md2.mesh.lowervertex=md1.mesh.lowervertex(pos_node);
     362                                 pos=find(~isnan(md2.mesh.lowervertex));
     363                                 md2.mesh.lowervertex(pos)=Pnode(md2.mesh.lowervertex(pos));
     364
     365                                 md2.mesh.upperelements=md1.mesh.upperelements(pos_elem);
     366                                 pos=find(~isnan(md2.mesh.upperelements));
     367                                 md2.mesh.upperelements(pos)=Pelem(md2.mesh.upperelements(pos));
     368
     369                                 md2.mesh.lowerelements=md1.mesh.lowerelements(pos_elem);
     370                                 pos=find(~isnan(md2.mesh.lowerelements));
     371                                 md2.mesh.lowerelements(pos)=Pelem(md2.mesh.lowerelements(pos));
     372                         end
     373
     374                         %Initial 2d mesh
     375                         if md1.mesh.dimension==3
     376                                 flag_elem_2d=flag_elem(1:md1.mesh.numberofelements2d);
     377                                 pos_elem_2d=find(flag_elem_2d);
     378                                 flag_node_2d=flag_node(1:md1.mesh.numberofvertices2d);
     379                                 pos_node_2d=find(flag_node_2d);
     380
     381                                 md2.mesh.numberofelements2d=length(pos_elem_2d);
     382                                 md2.mesh.numberofvertices2d=length(pos_node_2d);
     383                                 md2.mesh.elements2d=md1.mesh.elements2d(pos_elem_2d,:);
     384                                 md2.mesh.elements2d(:,1)=Pnode(md2.mesh.elements2d(:,1));
     385                                 md2.mesh.elements2d(:,2)=Pnode(md2.mesh.elements2d(:,2));
     386                                 md2.mesh.elements2d(:,3)=Pnode(md2.mesh.elements2d(:,3));
     387
     388                                 md2.mesh.x2d=md1.mesh.x(pos_node_2d);
     389                                 md2.mesh.y2d=md1.mesh.y(pos_node_2d);
     390                         end
     391
     392                         %Edges
     393                         if size(md2.mesh.edges,2)>1, %do not use ~isnan because there are some NaNs...
     394                                 %renumber first two columns
     395                                 pos=find(md2.mesh.edges(:,4)~=-1);
     396                                 md2.mesh.edges(:  ,1)=Pnode(md2.mesh.edges(:,1));
     397                                 md2.mesh.edges(:  ,2)=Pnode(md2.mesh.edges(:,2));
     398                                 md2.mesh.edges(:  ,3)=Pelem(md2.mesh.edges(:,3));
     399                                 md2.mesh.edges(pos,4)=Pelem(md2.mesh.edges(pos,4));
     400                                 %remove edges when the 2 vertices are not in the domain.
     401                                 md2.mesh.edges=md2.mesh.edges(find(md2.mesh.edges(:,1) & md2.mesh.edges(:,2)),:);
     402                                 %Replace all zeros by -1 in the last two columns;
     403                                 pos=find(md2.mesh.edges(:,3)==0);
     404                                 md2.mesh.edges(pos,3)=-1;
     405                                 pos=find(md2.mesh.edges(:,4)==0);
     406                                 md2.mesh.edges(pos,4)=-1;
     407                                 %Invert -1 on the third column with last column (Also invert first two columns!!)
     408                                 pos=find(md2.mesh.edges(:,3)==-1);
     409                                 md2.mesh.edges(pos,3)=md2.mesh.edges(pos,4);
     410                                 md2.mesh.edges(pos,4)=-1;
     411                                 values=md2.mesh.edges(pos,2);
     412                                 md2.mesh.edges(pos,2)=md2.mesh.edges(pos,1);
     413                                 md2.mesh.edges(pos,1)=values;
     414                                 %Finally remove edges that do not belong to any element
     415                                 pos=find(md2.mesh.edges(:,3)==-1 & md2.mesh.edges(:,4)==-1);
     416                                 md2.mesh.edges(pos,:)=[];
     417                         end
     418
     419                         %Penalties
     420                         if ~isnan(md2.diagnostic.vertex_pairing),
     421                                 for i=1:size(md1.diagnostic.vertex_pairing,1);
     422                                         md2.diagnostic.vertex_pairing(i,:)=Pnode(md1.diagnostic.vertex_pairing(i,:));
     423                                 end
     424                                 md2.diagnostic.vertex_pairing=md2.diagnostic.vertex_pairing(find(md2.diagnostic.vertex_pairing(:,1)),:);
     425                         end
     426                         if ~isnan(md2.prognostic.vertex_pairing),
     427                                 for i=1:size(md1.prognostic.vertex_pairing,1);
     428                                         md2.prognostic.vertex_pairing(i,:)=Pnode(md1.prognostic.vertex_pairing(i,:));
     429                                 end
     430                                 md2.prognostic.vertex_pairing=md2.prognostic.vertex_pairing(find(md2.prognostic.vertex_pairing(:,1)),:);
     431                         end
     432
     433                         %recreate segments
     434                         if md1.mesh.dimension==2
     435                                 md2.mesh.vertexconnectivity=NodeConnectivity(md2.mesh.elements,md2.mesh.numberofvertices);
     436                                 md2.mesh.elementconnectivity=ElementConnectivity(md2.mesh.elements,md2.mesh.vertexconnectivity);
     437                                 md2.mesh.segments=contourenvelope(md2);
     438                                 md2.mesh.vertexonboundary=zeros(numberofvertices2,1); md2.mesh.vertexonboundary(md2.mesh.segments(:,1:2))=1;
     439                         else
     440                                 %First do the connectivity for the contourenvelope in 2d
     441                                 md2.mesh.vertexconnectivity=NodeConnectivity(md2.mesh.elements2d,md2.mesh.numberofvertices2d);
     442                                 md2.mesh.elementconnectivity=ElementConnectivity(md2.mesh.elements2d,md2.mesh.vertexconnectivity);
     443                                 md2.mesh.segments=contourenvelope(md2);
     444                                 md2.mesh.vertexonboundary=zeros(numberofvertices2/md2.mesh.numberoflayers,1); md2.mesh.vertexonboundary(md2.mesh.segments(:,1:2))=1;
     445                                 md2.mesh.vertexonboundary=repmat(md2.mesh.vertexonboundary,md2.mesh.numberoflayers,1);
     446                                 %Then do it for 3d as usual
     447                                 md2.mesh.vertexconnectivity=NodeConnectivity(md2.mesh.elements,md2.mesh.numberofvertices);
     448                                 md2.mesh.elementconnectivity=ElementConnectivity(md2.mesh.elements,md2.mesh.vertexconnectivity);
     449                         end
     450
     451                         %Boundary conditions: Dirichlets on new boundary
     452                         %Catch the elements that have not been extracted
     453                         orphans_elem=find(~flag_elem);
     454                         orphans_node=unique(md1.mesh.elements(orphans_elem,:))';
     455                         %Figure out which node are on the boundary between md2 and md1
     456                         nodestoflag1=intersect(orphans_node,pos_node);
     457                         nodestoflag2=Pnode(nodestoflag1);
     458                         if numel(md1.diagnostic.spcvx)>1 & numel(md1.diagnostic.spcvy)>2 & numel(md1.diagnostic.spcvz)>2,
     459                                 if numel(md1.inversion.vx_obs)>1 & numel(md1.inversion.vy_obs)>1
     460                                         md2.diagnostic.spcvx(nodestoflag2)=md2.inversion.vx_obs(nodestoflag2);
     461                                         md2.diagnostic.spcvy(nodestoflag2)=md2.inversion.vy_obs(nodestoflag2);
     462                                 else
     463                                         md2.diagnostic.spcvx(nodestoflag2)=NaN;
     464                                         md2.diagnostic.spcvy(nodestoflag2)=NaN;
     465                                         disp(' ')
     466                                         disp('!! extract warning: spc values should be checked !!')
     467                                         disp(' ')
     468                                 end
     469                                 %put 0 for vz
     470                                 md2.diagnostic.spcvz(nodestoflag2)=0;
     471                         end
     472                         if ~isnan(md1.thermal.spctemperature),
     473                                 md2.thermal.spctemperature(nodestoflag2,1)=1;
     474                         end
     475
     476                         %Diagnostic
     477                         if ~isnan(md2.diagnostic.icefront)
     478                                 md2.diagnostic.icefront(:,1)=Pnode(md1.diagnostic.icefront(:,1));
     479                                 md2.diagnostic.icefront(:,2)=Pnode(md1.diagnostic.icefront(:,2));
     480                                 md2.diagnostic.icefront(:,end-1)=Pelem(md1.diagnostic.icefront(:,end-1));
     481                                 if md1.mesh.dimension==3
     482                                         md2.diagnostic.icefront(:,3)=Pnode(md1.diagnostic.icefront(:,3));
     483                                         md2.diagnostic.icefront(:,4)=Pnode(md1.diagnostic.icefront(:,4));
     484                                 end
     485                                 md2.diagnostic.icefront=md2.diagnostic.icefront(find(md2.diagnostic.icefront(:,1) & md2.diagnostic.icefront(:,2) & md2.diagnostic.icefront(:,end)),:);
     486                         end
     487
     488                         %Results fields
     489                         if isstruct(md1.results),
     490                                 md2.results=struct();
     491                                 solutionfields=fields(md1.results);
     492                                 for i=1:length(solutionfields),
     493                                         %get subfields
     494                                         solutionsubfields=fields(md1.results.(solutionfields{i}));
     495                                         for j=1:length(solutionsubfields),
     496                                                 field=md1.results.(solutionfields{i}).(solutionsubfields{j});
     497                                                 if length(field)==numberofvertices1,
     498                                                         md2.results.(solutionfields{i}).(solutionsubfields{j})=field(pos_node);
     499                                                 elseif length(field)==numberofelements1,
     500                                                         md2.results.(solutionfields{i}).(solutionsubfields{j})=field(pos_elem);
     501                                                 else
     502                                                         md2.results.(solutionfields{i}).(solutionsubfields{j})=field;
     503                                                 end
     504                                         end
     505                                 end
     506                         end
     507
     508                         %Keep track of pos_node and pos_elem
     509                         md2.mesh.extractedvertices=pos_node;
     510                         md2.mesh.extractedelements=pos_elem;
     511                 end % }}}
     512                 function md = extrude(md,varargin) % {{{
     513                         %EXTRUDE - vertically extrude a 2d mesh
     514                         %
     515                         %   vertically extrude a 2d mesh and create corresponding 3d mesh.
     516                         %   The vertical distribution can:
     517                         %    - follow a polynomial law
     518                         %    - follow two polynomial laws, one for the lower part and one for the upper part of the mesh
     519                         %    - be discribed by a list of coefficients (between 0 and 1)
     520                         %   
     521                         %
     522                         %   Usage:
     523                         %      md=extrude(md,numlayers,extrusionexponent);
     524                         %      md=extrude(md,numlayers,lowerexponent,upperexponent);
     525                         %      md=extrude(md,listofcoefficients);
     526                         %
     527                         %   Example:
     528                         %      md=extrude(md,8,3);
     529                         %      md=extrude(md,8,3,2);
     530                         %      md=extrude(md,[0 0.2 0.5 0.7 0.9 0.95 1]);
     531                         %
     532                         %   See also: MODELEXTRACT, COLLAPSE
     533
     534                         %some checks on list of arguments
     535                         if ((nargin>4) | (nargin<2) | (nargout~=1)),
     536                                 help extrude;
     537                                 error('extrude error message');
     538                         end
     539
     540                         %Extrude the mesh
     541                         if nargin==2, %list of coefficients
     542                                 list=varargin{1};
     543                                 if any(list<0) | any(list>1),
     544                                         error('extrusioncoefficients must be between 0 and 1');
     545                                 end
     546                                 extrusionlist=sort(unique([list(:);0;1]));
     547                                 numlayers=length(extrusionlist);
     548                         elseif nargin==3, %one polynomial law
     549                                 if varargin{2}<=0,
     550                                         help extrude;
     551                                         error('extrusionexponent must be >=0');
     552                                 end
     553                                 numlayers=varargin{1};
     554                                 extrusionlist=((0:1:numlayers-1)/(numlayers-1)).^varargin{2};
     555                         elseif nargin==4, %two polynomial laws
     556                                 numlayers=varargin{1};
     557                                 lowerexp=varargin{2};
     558                                 upperexp=varargin{3};
     559
     560                                 if varargin{2}<=0 | varargin{3}<=0,
     561                                         help extrude;
     562                                         error('lower and upper extrusionexponents must be >=0');
     563                                 end
     564
     565                                 lowerextrusionlist=[(0:2/(numlayers-1):1).^lowerexp]/2;
     566                                 upperextrusionlist=[(0:2/(numlayers-1):1).^upperexp]/2;
     567                                 extrusionlist=sort(unique([lowerextrusionlist 1-upperextrusionlist]));
     568
     569                         end
     570
     571                         if numlayers<2,
     572                                 error('number of layers should be at least 2');
     573                         end
     574                         if md.mesh.dimension==3,
     575                                 error('Cannot extrude a 3d mesh (extrude cannot be called more than once)');
     576                         end
     577
     578                         %Initialize with the 2d mesh
     579                         x3d=[];
     580                         y3d=[];
     581                         z3d=[];  %the lower node is on the bed
     582                         thickness3d=md.geometry.thickness; %thickness and bed for these nodes
     583                         bed3d=md.geometry.bed;
     584
     585                         %Create the new layers
     586                         for i=1:numlayers,
     587                                 x3d=[x3d; md.mesh.x];
     588                                 y3d=[y3d; md.mesh.y];
     589                                 %nodes are distributed between bed and surface accordingly to the given exponent
     590                                 z3d=[z3d; bed3d+thickness3d*extrusionlist(i)];
     591                         end
     592                         number_nodes3d=size(x3d,1); %number of 3d nodes for the non extruded part of the mesh
     593
     594                         %Extrude elements
     595                         elements3d=[];
     596                         for i=1:numlayers-1,
     597                                 elements3d=[elements3d;[md.mesh.elements+(i-1)*md.mesh.numberofvertices md.mesh.elements+i*md.mesh.numberofvertices]]; %Create the elements of the 3d mesh for the non extruded part
     598                         end
     599                         number_el3d=size(elements3d,1); %number of 3d nodes for the non extruded part of the mesh
     600
     601                         %Keep a trace of lower and upper nodes
     602                         mesh.lowervertex=NaN*ones(number_nodes3d,1);
     603                         mesh.uppervertex=NaN*ones(number_nodes3d,1);
     604                         mesh.lowervertex(md.mesh.numberofvertices+1:end)=1:(numlayers-1)*md.mesh.numberofvertices;
     605                         mesh.uppervertex(1:(numlayers-1)*md.mesh.numberofvertices)=md.mesh.numberofvertices+1:number_nodes3d;
     606                         md.mesh.lowervertex=mesh.lowervertex;
     607                         md.mesh.uppervertex=mesh.uppervertex;
     608
     609                         %same for lower and upper elements
     610                         mesh.lowerelements=NaN*ones(number_el3d,1);
     611                         mesh.upperelements=NaN*ones(number_el3d,1);
     612                         mesh.lowerelements(md.mesh.numberofelements+1:end)=1:(numlayers-2)*md.mesh.numberofelements;
     613                         mesh.upperelements(1:(numlayers-2)*md.mesh.numberofelements)=md.mesh.numberofelements+1:(numlayers-1)*md.mesh.numberofelements;
     614                         md.mesh.lowerelements=mesh.lowerelements;
     615                         md.mesh.upperelements=mesh.upperelements;
     616
     617                         %Save old mesh
     618                         md.mesh.x2d=md.mesh.x;
     619                         md.mesh.y2d=md.mesh.y;
     620                         md.mesh.elements2d=md.mesh.elements;
     621                         md.mesh.numberofelements2d=md.mesh.numberofelements;
     622                         md.mesh.numberofvertices2d=md.mesh.numberofvertices;
     623
     624                         %Update mesh type
     625                         md.mesh.dimension=3;
     626
     627                         %Build global 3d mesh
     628                         md.mesh.elements=elements3d;
     629                         md.mesh.x=x3d;
     630                         md.mesh.y=y3d;
     631                         md.mesh.z=z3d;
     632                         md.mesh.numberofelements=number_el3d;
     633                         md.mesh.numberofvertices=number_nodes3d;
     634                         md.mesh.numberoflayers=numlayers;
     635
     636                         %Ok, now deal with the other fields from the 2d mesh:
     637
     638                         %lat long
     639                         md.mesh.lat=project3d(md,'vector',md.mesh.lat,'type','node');
     640                         md.mesh.long=project3d(md,'vector',md.mesh.long,'type','node');
     641
     642                         %drag coefficient is limited to nodes that are on the bedrock.
     643                         md.friction.coefficient=project3d(md,'vector',md.friction.coefficient,'type','node','layer',1);
     644
     645                         %p and q (same deal, except for element that are on the bedrock: )
     646                         md.friction.p=project3d(md,'vector',md.friction.p,'type','element');
     647                         md.friction.q=project3d(md,'vector',md.friction.q,'type','element');
     648
     649                         %observations
     650                         md.inversion.vx_obs=project3d(md,'vector',md.inversion.vx_obs,'type','node');
     651                         md.inversion.vy_obs=project3d(md,'vector',md.inversion.vy_obs,'type','node');
     652                         md.inversion.vel_obs=project3d(md,'vector',md.inversion.vel_obs,'type','node');
     653                         md.surfaceforcings.mass_balance=project3d(md,'vector',md.surfaceforcings.mass_balance,'type','node');
     654                         md.surfaceforcings.precipitation=project3d(md,'vector',md.surfaceforcings.precipitation,'type','node');
     655                         md.balancethickness.thickening_rate=project3d(md,'vector',md.balancethickness.thickening_rate,'type','node');
     656                         md.surfaceforcings.monthlytemperatures=project3d(md,'vector',md.surfaceforcings.monthlytemperatures,'type','node');
     657
     658                         %results
     659                         if ~isnan(md.initialization.vx),md.initialization.vx=project3d(md,'vector',md.initialization.vx,'type','node');end;
     660                         if ~isnan(md.initialization.vy),md.initialization.vy=project3d(md,'vector',md.initialization.vy,'type','node');end;
     661                         if ~isnan(md.initialization.vz),md.initialization.vz=project3d(md,'vector',md.initialization.vz,'type','node');end;
     662                         if ~isnan(md.initialization.vel),md.initialization.vel=project3d(md,'vector',md.initialization.vel,'type','node');end;
     663                         if ~isnan(md.initialization.temperature),md.initialization.temperature=project3d(md,'vector',md.initialization.temperature,'type','node');end;
     664                         if ~isnan(md.initialization.waterfraction),md.initialization.waterfraction=project3d(md,'vector',md.initialization.waterfraction,'type','node');end;
     665
     666                         %bedinfo and surface info
     667                         md.mesh.elementonbed=project3d(md,'vector',ones(md.mesh.numberofelements2d,1),'type','element','layer',1);
     668                         md.mesh.elementonsurface=project3d(md,'vector',ones(md.mesh.numberofelements2d,1),'type','element','layer',md.mesh.numberoflayers-1);
     669                         md.mesh.vertexonbed=project3d(md,'vector',ones(md.mesh.numberofvertices2d,1),'type','node','layer',1);
     670                         md.mesh.vertexonsurface=project3d(md,'vector',ones(md.mesh.numberofvertices2d,1),'type','node','layer',md.mesh.numberoflayers);
     671
     672                         %elementstype
     673                         if ~isnan(md.flowequation.element_equation)
     674                                 oldelements_type=md.flowequation.element_equation;
     675                                 md.flowequation.element_equation=zeros(number_el3d,1);
     676                                 md.flowequation.element_equation=project3d(md,'vector',oldelements_type,'type','element');
     677                         end
     678
     679                         %verticestype
     680                         if ~isnan(md.flowequation.vertex_equation)
     681                                 oldvertices_type=md.flowequation.vertex_equation;
     682                                 md.flowequation.vertex_equation=zeros(number_nodes3d,1);
     683                                 md.flowequation.vertex_equation=project3d(md,'vector',oldvertices_type,'type','node');
     684                         end
     685                         md.flowequation.bordermacayeal=project3d(md,'vector',md.flowequation.bordermacayeal,'type','node');
     686                         md.flowequation.borderpattyn=project3d(md,'vector',md.flowequation.borderpattyn,'type','node');
     687                         md.flowequation.borderstokes=project3d(md,'vector',md.flowequation.borderstokes,'type','node');
     688
     689                         %boundary conditions
     690                         md.diagnostic.spcvx=project3d(md,'vector',md.diagnostic.spcvx,'type','node');
     691                         md.diagnostic.spcvy=project3d(md,'vector',md.diagnostic.spcvy,'type','node');
     692                         md.diagnostic.spcvz=project3d(md,'vector',md.diagnostic.spcvz,'type','node');
     693                         md.thermal.spctemperature=project3d(md,'vector',md.thermal.spctemperature,'type','node','layer',md.mesh.numberoflayers,'padding',NaN);
     694                         md.prognostic.spcthickness=project3d(md,'vector',md.prognostic.spcthickness,'type','node');
     695                         md.balancethickness.spcthickness=project3d(md,'vector',md.balancethickness.spcthickness,'type','node');
     696                         md.diagnostic.referential=project3d(md,'vector',md.diagnostic.referential,'type','node');
     697
     698                         %in 3d, pressureload: [node1 node2 node3 node4 element]
     699                         pressureload_layer1=[md.diagnostic.icefront(:,1:2)  md.diagnostic.icefront(:,2)+md.mesh.numberofvertices2d  md.diagnostic.icefront(:,1)+md.mesh.numberofvertices2d  md.diagnostic.icefront(:,3:4)]; %Add two columns on the first layer
     700                         pressureload=[];
     701                         for i=1:numlayers-1,
     702                                 pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d pressureload_layer1(:,6)];
     703                         end
     704                         md.diagnostic.icefront=pressureload;
     705
     706                         %connectivity
     707                         md.mesh.elementconnectivity=repmat(md.mesh.elementconnectivity,numlayers-1,1);
     708                         md.mesh.elementconnectivity(find(md.mesh.elementconnectivity==0))=NaN;
     709                         for i=2:numlayers-1,
     710                                 md.mesh.elementconnectivity((i-1)*md.mesh.numberofelements2d+1:(i)*md.mesh.numberofelements2d,:)...
     711                                         =md.mesh.elementconnectivity((i-1)*md.mesh.numberofelements2d+1:(i)*md.mesh.numberofelements2d,:)+md.mesh.numberofelements2d;
     712                         end
     713                         md.mesh.elementconnectivity(find(isnan(md.mesh.elementconnectivity)))=0;
     714
     715                         %materials
     716                         md.materials.rheology_B=project3d(md,'vector',md.materials.rheology_B,'type','node');
     717                         md.materials.rheology_n=project3d(md,'vector',md.materials.rheology_n,'type','element');
     718
     719                         %parameters
     720                         md.geometry.surface=project3d(md,'vector',md.geometry.surface,'type','node');
     721                         md.geometry.thickness=project3d(md,'vector',md.geometry.thickness,'type','node');
     722                         md.geometry.hydrostatic_ratio=project3d(md,'vector',md.geometry.hydrostatic_ratio,'type','node');
     723                         md.geometry.bed=project3d(md,'vector',md.geometry.bed,'type','node');
     724                         md.geometry.bathymetry=project3d(md,'vector',md.geometry.bathymetry,'type','node');
     725                         md.mesh.vertexonboundary=project3d(md,'vector',md.mesh.vertexonboundary,'type','node');
     726                         md.mask.elementonfloatingice=project3d(md,'vector',md.mask.elementonfloatingice,'type','element');
     727                         md.mask.vertexonfloatingice=project3d(md,'vector',md.mask.vertexonfloatingice,'type','node');
     728                         md.mask.elementongroundedice=project3d(md,'vector',md.mask.elementongroundedice,'type','element');
     729                         md.mask.vertexongroundedice=project3d(md,'vector',md.mask.vertexongroundedice,'type','node');
     730                         md.mask.elementonwater=project3d(md,'vector',md.mask.elementonwater,'type','element');
     731                         md.mask.vertexonwater=project3d(md,'vector',md.mask.vertexonwater,'type','node');
     732                         if ~isnan(md.inversion.cost_functions_coefficients),md.inversion.cost_functions_coefficients=project3d(md,'vector',md.inversion.cost_functions_coefficients,'type','node');end;
     733                         if ~isnan(md.inversion.min_parameters),md.inversion.min_parameters=project3d(md,'vector',md.inversion.min_parameters,'type','node');end;
     734                         if ~isnan(md.inversion.max_parameters),md.inversion.max_parameters=project3d(md,'vector',md.inversion.max_parameters,'type','node');end;
     735                         if ~isnan(md.qmu.partition),md.qmu.partition=project3d(md,'vector',md.qmu.partition','type','node');end
     736                         if(md.surfaceforcings.isdelta18o),md.surfaceforcings.temperatures_lgm=project3d(md,'vector',md.surfaceforcings.temperatures_lgm,'type','node');end
     737                         if(md.surfaceforcings.isdelta18o),md.surfaceforcings.temperatures_presentday=project3d(md,'vector',md.surfaceforcings.temperatures_presentday,'type','node');end
     738                         if(md.surfaceforcings.isdelta18o),md.surfaceforcings.precipitations_presentday=project3d(md,'vector',md.surfaceforcings.precipitations_presentday,'type','node');end
     739
     740                         %Put lithostatic pressure if there is an existing pressure
     741                         if ~isnan(md.initialization.pressure),
     742                                 md.initialization.pressure=md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.mesh.z);
     743                         end
     744
     745                         %special for thermal modeling:
     746                         md.basalforcings.melting_rate=project3d(md,'vector',md.basalforcings.melting_rate,'type','node','layer',1);
     747                         if ~isnan(md.basalforcings.geothermalflux)
     748                                 md.basalforcings.geothermalflux=project3d(md,'vector',md.basalforcings.geothermalflux,'type','node','layer',1); %bedrock only gets geothermal flux
     749                         end
     750
     751                         %increase connectivity if less than 25:
     752                         if md.mesh.average_vertex_connectivity<=25,
     753                                 md.mesh.average_vertex_connectivity=100;
     754                         end
     755                        end % }}}
    93756                 function md = structtomodel(md,structmd) % {{{
    94757
     
    3851048                         md.settings         = settings();
    3861049                         md.solver           = solver();
    387                          if ismumps,
    388                                  md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum,mumpsoptions);
     1050                         if ismumps(),
     1051                                 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum(),mumpsoptions());
    3891052                         else
    390                                  md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum,iluasmoptions);
     1053                                 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum(),iluasmoptions());
    3911054                         end
    3921055                         md.cluster          = generic();
  • issm/branches/trunk-jpl-damage/src/m/classes/model/model.py

    r12946 r13101  
    3333from private import private
    3434from EnumDefinitions import *
     35from ismumps import *
     36from mumpsoptions import *
     37from iluasmoptions import *
    3538#}}}
    3639
     
    5659                self.settings         = settings()
    5760                self.solver           = solver()
    58 #               need EnumToString for these to work
    59 #               if ismumps:
    60 #                       md.solver.addoptions(DiagnosticVertAnalysisEnum(),mumpsoptions)
    61 #               else:
    62 #                       md.solver.addoptions(DiagnosticVertAnalysisEnum(),iluasmoptions)
     61                if ismumps():
     62                        self.solver.addoptions(DiagnosticVertAnalysisEnum(),mumpsoptions())
     63                else:
     64                        self.solver.addoptions(DiagnosticVertAnalysisEnum(),iluasmoptions())
    6365                self.cluster          = generic()
    6466
     
    116118                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("inversion","[%s,%s]" % ("1x1",obj.inversion.__class__.__name__),"parameters for inverse methods"))
    117119                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("qmu","[%s,%s]" % ("1x1",obj.qmu.__class__.__name__),"dakota properties"))
    118                 string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("results","[%s,%s]" % ("1x1",obj.results.__class__.__name__),"model results'"))
     120                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("results","[%s,%s]" % ("1x1",obj.results.__class__.__name__),"model results"))
    119121                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("radaroverlay","[%s,%s]" % ("1x1",obj.radaroverlay.__class__.__name__),"radar image for plot overlay"))
    120122                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("miscellaneous","[%s,%s]" % ("1x1",obj.miscellaneous.__class__.__name__),"miscellaneous fields"))
  • issm/branches/trunk-jpl-damage/src/m/classes/model/planet.m

    r12878 r13101  
    66classdef planet < model
    77    properties (SetAccess=public) %Planet fields
    8                  % {{{
    9                  %Planet specific fields
    10                  r=NaN;
    11                  theta=NaN;
    12                  phi=NaN;
     8         end
     9         methods
     10                 function md = planet(varargin) % {{{
     11
     12                         switch nargin
     13                                 case 0
     14                                         md=setdefaultparameters(md);
     15                                 otherwise
     16                                         error('planet constructor error message: 0 of 1 argument only in input.');
     17                                 end
     18                 end
     19                 %}}}
     20                 function md = setdefaultparameters(md) % {{{
     21
     22                         %initialize subclasses
     23                         md.mesh             = planetmesh();
     24                         md.mask             = mask();
     25                         md.constants        = constants();
     26                         md.geometry         = geometry();
     27                         md.initialization   = initialization();
     28                         md.surfaceforcings  = surfaceforcings();
     29                         md.basalforcings    = basalforcings();
     30                         md.friction         = friction();
     31                         md.rifts            = rifts();
     32                         md.timestepping     = timestepping();
     33                         md.groundingline    = groundingline();
     34                         md.materials        = materials();
     35                         md.flowequation     = flowequation();
     36                         md.debug            = debug();
     37                         md.verbose          = verbose('solution',true,'qmu',true,'control',true);
     38                         md.settings         = settings();
     39                         md.solver           = solver();
     40                         if ismumps(),
     41                                 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum(),mumpsoptions());
     42                         else
     43                                 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum(),iluasmoptions());
     44                         end
     45                         md.cluster          = generic();
     46                         md.balancethickness = balancethickness();
     47                         md.diagnostic       = diagnostic();
     48                         md.hydrology        = hydrology();
     49                         md.prognostic       = prognostic();
     50                         md.thermal          = thermal();
     51                         md.steadystate      = steadystate();
     52                         md.transient        = transient();
     53                         md.autodiff         = autodiff();
     54                         md.flaim            = flaim();
     55                         md.inversion        = inversion();
     56                         md.qmu              = qmu();
     57                         md.radaroverlay     = radaroverlay();
     58                         md.results          = struct();
     59                         md.miscellaneous    = miscellaneous();
     60                         md.private          = private();
     61                 end
    1362                 %}}}
    1463         end
    15          methods
    16                 function md=planetmesh(md,varargin) % {{{
    17                 %PLANETMESH: build 2d shell mesh
    18                 %
    19                 % Usage: md=planetmesh(md,'method','mixed','radius',6378000,'angleresol',1);
    20                 %        md=planetmesh(md,'method','tria','shape','iso','radius',6378000,'refinement',5);
    21                 %
    22 
    23                 %recover options
    24                 options=pairoptions(varargin{:});
    25 
    26                 method=getfieldvalue(options,'method','mixed');
    27                
    28                 if strcmpi(method,'mixed'),
    29                         %recover radius and angleresol:
    30                         radius=getfieldvalue(options,'radius',6378000); %earth radius as default
    31                         angleresol=getfieldvalue(options,'angleresol',10); %10 degree resolution
    32                        
    33                         %call mixed mesh
    34                         md=planetmixedmesh(md,radius,angleresol);
    35                 else
    36                         %recover radius, shape and level of refinmenet
    37                         radius=getfieldvalue(options,'radius',6378000); %earth radius as default
    38                         refinement=getfieldvalue(options,'refinement',5); %refine 5 times
    39                         shape=getfieldvalue(options,'shape','ico');
    40                        
    41                         %call triangular mesh
    42                         md=planettrimesh(md,shape,radius,refinement);
    43                 end
    44 
    45                 end
    46                 % }}}
    47          end
    4864 end
  • issm/branches/trunk-jpl-damage/src/m/classes/modellist.m

    r12168 r13101  
    1010        end
    1111        methods
     12                function md_list=modelsextract(md,flags,minel,varargin) % {{{
     13                        %modelsextract - extract several self contained models according to a list of element flags.
     14                        %
     15                        %   The difference between this routine and the modelextract.m routine (without an 's') is that
     16                        %   as many models are extracted as there are closed contours defined in area.
     17                        %   This routine is needed for example when doing data assimilation of ice shelves in Antarctica.
     18                        %   Many independent ice shelves are present, and we don't want data assimilation on one ice shelf
     19                        %   to be hindered by another totally independent ice shelf.
     20                        %
     21                        %   Usage:
     22                        %      md_list=modelsextract(md,elementfalgs,minel);
     23                        %
     24                        %   Examples:
     25                        %      md_list=modelsextract(md,md.mask.elementonfloatingice,1000);
     26                        %
     27                        %   See also: EXTRUDE, COLLAPSE, MODELEXTRACT
     28
     29                        disp('selecting pools of elements');
     30                        %go through flags and build as many independent element flags as there are groups of connected 1s
     31                        %in flags.
     32
     33                        %2D or 3D?
     34                        if md.mesh.dimension==3,
     35                                numberofelements=md.mesh.numberofelements2d; %this will be forgotten when we get out.
     36                                flags=project2d(md,flags,1);
     37                        else
     38                                numberofelements=md.mesh.numberofelements;
     39                        end
     40
     41                        %recover extra arguments:
     42                        distance=0;
     43                        if nargin==4,
     44                                distance=varargin{1};
     45                        end
     46
     47                        flag_list=cell(0,1);
     48
     49                        for i=1:size(flags,1),
     50
     51                                if (flags(i)),
     52
     53                                        %ok, we are sure element i is part of a new pool.
     54                                        pool=zeros(numberofelements,1);
     55                                        pool=PropagateFlagsFromConnectivity(md.mesh.elementconnectivity,pool,i,flags);
     56                                        flag_list{end+1,1}=pool;
     57
     58                                        %speed up rest of computation by taking pool out of flags:
     59                                        pos=find(pool);flags(pos)=0;
     60
     61                                end
     62                        end
     63
     64                        %go through flag_list and discard any pool of less than minel elements:
     65                        ex_pos=[];
     66                        for i=1:length(flag_list),
     67                                if length(find(flag_list{i}))<minel,
     68                                        ex_pos=[ex_pos; i];
     69                                end
     70                        end
     71                        flag_list(ex_pos)=[];
     72
     73                        %now, if distance was specified, expand the flag_list by distance km:
     74                        if distance,
     75                                for i=1:length(flag_list),
     76                                        flag_list{i}=PropagateFlagsUntilDistance(md,flag_list{i},distance);
     77                                end
     78                        end
     79
     80                        %now, go use the pools of flags to extract models:
     81                        disp(['extracting ' num2str(size(flag_list,1)) ' models']);
     82                        models=cell(0,1);
     83
     84                        for i=1:size(flag_list,1),
     85                                disp(['   ' num2str(i) '/' num2str(size(flag_list,1))]);
     86                                if md.mesh.dimension==3,
     87                                        flags2d=flag_list{i};
     88                                        realflags=project3d(md,flags2d,'element');
     89                                else
     90                                        realflags=flag_list{i};
     91                                end
     92                                models{end+1,1}=modelextract(md,realflags);
     93                        end
     94
     95                        %return model list
     96                        md_list=modellist(models);
     97
     98                end %end of this function }}}
     99                function md_list=modelsextractfromdomains(md,directory) % {{{
     100                        %modelsextractfromdomains- extract several self contained models according to a list of domains
     101                        %
     102                        %   Usage:
     103                        %      md_list=modelsextractfromdomains(md,'Basins/');
     104                        %
     105                        %   Examples:
     106                        %      md_list=modelsextract(md,'Basins/');
     107                        %
     108                        %   See also: MODELSEXTRACTS, MODELEXTRACT
     109
     110                        %go into directory and get list of files.
     111                        cd(directory);
     112                        basins=listfiles;
     113                        cd ..
     114
     115                        models=cell(0,1);
     116                        for i=1:length(basins),
     117                                models{end+1,1}=modelextract(md,[directory '/' basins{i}]);
     118                        end
     119
     120                        %return model list:
     121                        md_list=modellist(models);
     122
     123                end % }}}
    12124                function obj = modellist(varargin) % {{{
    13125
     
    180292        end
    181293end
     294
     295function BuildMultipleQueueingScript(cluster,name,executionpath,codepath)% {{{
     296%BUILDMULTIPLEQUEUEINGSCRIPT -
     297%
     298%   Usage:
     299%      BuildMultipleQueueingScript(executionpath,codepath)
     300
     301disp('building queueing script');
     302
     303%First try and figure out if there is a special script for this particular cluster
     304function_name=['BuildMultipleQueueingScript' cluster];
     305
     306%some specific treatment of identical cluster, gemini, castor and pollux
     307if strcmpi(cluster,'castor') || strcmpi(cluster,'pollux'),
     308        function_name='BuildMultipleQueueingScriptgemini';
     309end
     310
     311if exist(function_name,'file'),
     312        %Call this function:
     313        eval([function_name '(name,executionpath,codepath);']);
     314else
     315        %Call the generic BuildQueueingScript:
     316        BuildMultipleQueueingScriptGeneric(name,executionpath,codepath);
     317end
     318end % }}}
     319function BuildQueueingScriptgemini(name,executionpath,codepath)% {{{
     320%BUILDQUEUEINGSCRIPTGEMINI - ...
     321%
     322%   Usage:
     323%      BuildQueueingScriptgemini(md,executionpath,codepath)
     324
     325scriptname=[name '.queue'];
     326
     327fid=fopen(scriptname,'w');
     328if fid==-1,
     329        error(['BuildQueueingScriptgeminierror message: could not open ' scriptname ' file for ascii writing']);
     330end
     331
     332fprintf(fid,'#!/bin/sh\n');
     333fprintf(fid,'cd %s\n',executionpath);
     334fprintf(fid,'mkdir %s\n',name);
     335fprintf(fid,'cd %s\n',name);
     336fprintf(fid,'mv ../ModelList.tar.gz ./\n');
     337fprintf(fid,'tar -zxvf ModelList.tar.gz\n');
     338fprintf(fid,'foreach i (%s-*vs*.queue)\n',name);
     339fprintf(fid,'qsub $i\n');
     340fprintf(fid,'end\n');
     341fclose(fid);
     342end% }}}
     343function LaunchMultipleQueueJob(cluster,name,executionpath)% {{{
     344%LAUNCHMULTIPLEQUEUEJOB - ...
     345%
     346%   Usage:
     347%      LaunchMultipleQueueJob(executionpath)
     348
     349%First try and figure out if there is a special script for thie particular cluster
     350function_name=['LaunchMultipleQueueJob' cluster];
     351
     352%some specific treatment of identical cluster, gemini, castor and pollux
     353if strcmpi(cluster,'castor') || strcmpi(cluster,'pollux'),
     354        function_name='LaunchMultipleQueueJobgemini';
     355end
     356
     357if exist(function_name,'file'),
     358        %Call this function:
     359        eval([function_name '(cluster,name,executionpath);']);
     360else
     361        %Call the generic LaunchMultipleQueueJob:
     362        LaunchMultipleQueueJobGeneric(cluster,name,executionpath);
     363end
     364end% }}}
     365function md=LaunchMultipleQueueJobgemini(cluster,name,executionpath)% {{{
     366%LAUNCHMULTIPLEQUEUEJOBGEMINI - Launch multiple queueing script on Gemini cluster
     367%
     368%   Usage:
     369%      LaunchMultipleQueueJobgemini(cluster,name,executionpath)
     370
     371
     372%first, check we have the binary file and the queueing script
     373if ~exist([ name '.queue'],'file'),
     374        error('LaunchMultipleQueueJobgemini error message: queueing script issing, cannot go forward');
     375end
     376
     377if ~exist('ModelList.tar.gz','file'),
     378        error('LaunchMultipleQueueJobgemini error message: inputs models file missing, cannot go forward');
     379end
     380
     381%upload both files to cluster
     382disp('uploading input file,  queueing script and variables script');
     383eval(['!scp ModelList.tar.gz ' name '.queue '  cluster ':' executionpath]);
     384
     385disp('launching solution sequence on remote cluster');
     386issmssh(cluster,login,['"cd ' executionpath ' && source ' name '.queue "']);
     387end% }}}
  • issm/branches/trunk-jpl-damage/src/m/classes/pairoptions.py

    r12946 r13101  
    3636                #go through arg and build list of objects
    3737                for i in xrange(numoptions):
    38                         if isinstance(arg[2*i],str):
     38                        if isinstance(arg[2*i],(str,unicode)):
    3939                                self.list[arg[2*i]] = arg[2*i+1];
    4040                        else:
     
    4545        def addfield(self,field,value):    # {{{
    4646                """ADDFIELD - add a field to an options list"""
    47                 if isinstance(field,str):
     47                if isinstance(field,(str,unicode)):
    4848                        if field in self.list:
    4949                                print "WARNING: field '%s' with value=%s exists and will be overwritten with value=%s." % (field,str(self.list[field]),str(value))
     
    5353        def addfielddefault(self,field,value):    # {{{
    5454                """ADDFIELDDEFAULT - add a field to an options list if it does not exist"""
    55                 if isinstance(field,str):
    56                         if not field in self.list:
     55                if isinstance(field,(str,unicode)):
     56                        if field not in self.list:
    5757                                self.list[field] = value
    5858        # }}}
     
    100100                        s+="   list: (%ix%i)\n\n" % (len(self.list),2)
    101101                        for item in self.list.iteritems():
    102                                 if   isinstance(item[1],str):
     102                                if   isinstance(item[1],(str,unicode)):
    103103                                        s+="     field: %-10s value: '%s'\n" % (item[0],item[1])
    104104                                elif isinstance(item[1],(bool,int,long,float)):
     
    117117                if field == None or field == '':
    118118                        raise ValueError('exist error message: bad usage');
    119                 if not isinstance(field,str):
     119                if not isinstance(field,(str,unicode)):
    120120                        raise TypeError("exist error message: field '%s' should be a string." % str(field));
    121121
     
    157157                if field == None or field == '':
    158158                        raise ValueError('getfieldvalue error message: bad usage');
    159                 if not isinstance(field,str):
     159                if not isinstance(field,(str,unicode)):
    160160                        raise TypeError("getfieldvalue error message: field '%s' should be a string." % str(field));
    161161
     
    204204
    205205                        #Write option value
    206                         if   isinstance(value,str):
     206                        if   isinstance(value,(str,unicode)):
    207207                                WriteData(fid,'enum',(firstindex-1)+2*i+2,'data',value,'format','String')
    208208                        elif isinstance(value,(bool,int,long,float)):
  • issm/branches/trunk-jpl-damage/src/m/classes/planetmesh.m

    r12946 r13101  
    66classdef planetmesh
    77        properties (SetAccess=public)
     8                x                           = NaN;
     9                y                           = NaN;
     10                z                           = NaN;
    811                r                           = NaN;
    912                theta                       = NaN;
     
    4245                function md = checkconsistency(obj,md,solution,analyses) % {{{
    4346
     47                        md = checkfield(md,'planetmesh.x','NaN',1,'size',[md.planetmesh.numberofvertices 1]);
     48                        md = checkfield(md,'planetmesh.y','NaN',1,'size',[md.planetmesh.numberofvertices 1]);
     49                        md = checkfield(md,'planetmesh.z','NaN',1,'size',[md.planetmesh.numberofvertices 1]);
    4450                        md = checkfield(md,'planetmesh.r','NaN',1,'size',[md.planetmesh.numberofvertices 1]);
    4551                        md = checkfield(md,'planetmesh.theta','NaN',1,'size',[md.planetmesh.numberofvertices 1]);
     
    6874                        %Solution specific checks
    6975                        switch(solution),
    70                                 case PrognosticSolutionEnum,
     76                                case PrognosticSolutionEnum(),
    7177                                        if md.prognostic.stabilization==3,
    7278                                                md = checkfield(md,'planetmesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d planetmeshes');
    7379                                        end
    74                                 case TransientSolutionEnum,
     80                                case TransientSolutionEnum(),
    7581                                        if md.transient.isprognostic & md.prognostic.stabilization==3,
    7682                                                md = checkfield(md,'planetmesh.dimension','values',2,'message','Discontinuous Galerkin only supported for 2d planetmeshes');
    7783                                        end
    78                                 case ThermalSolutionEnum,
     84                                case ThermalSolutionEnum(),
    7985                                        md = checkfield(md,'planetmesh.dimension','values',3,'message','thermal solution only supported on 3d planetmeshes');
    8086                        end
     
    8793                        fielddisplay(obj,'numberofvertices','number of vertices');
    8894                        fielddisplay(obj,'elements','index into (x,y,z), coordinates of the vertices');
     95                        fielddisplay(obj,'x','vertices x coordinate');
     96                        fielddisplay(obj,'y','vertices y coordinate');
     97                        fielddisplay(obj,'z','vertices z coordinate');
    8998                        fielddisplay(obj,'r','vertices r coordinate');
    9099                        fielddisplay(obj,'theta','vertices theta coordinate');
     
    101110                end % }}}
    102111                function marshall(obj,fid) % {{{
     112                        WriteData(fid,'object',obj,'fieldname','x','format','DoubleMat','mattype',1);
     113                        WriteData(fid,'object',obj,'fieldname','y','format','DoubleMat','mattype',1);
     114                        WriteData(fid,'object',obj,'fieldname','z','format','DoubleMat','mattype',1);
    103115                        WriteData(fid,'object',obj,'fieldname','r','format','DoubleMat','mattype',1);
    104116                        WriteData(fid,'object',obj,'fieldname','theta','format','DoubleMat','mattype',1);
  • issm/branches/trunk-jpl-damage/src/m/classes/private.py

    r12946 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
    35
    4 class private:
     6class private(object):
     7        """
     8        PRIVATE class definition
     9
     10           Usage:
     11              private=private();
     12        """
     13
    514        #properties
    615        def __init__(self):
    716                # {{{ Properties
    8                 self.isconsistent = True;
     17                self.isconsistent = True
    918                self.runtimename  = ''
    1019                self.bamg         = {}
    11                 self.solution     = '';
     20                self.solution     = ''
    1221
    1322                #set defaults
     
    1524
    1625                #}}}
    17         def __repr__(obj):
     26        def __repr__(self):
    1827                # {{{ Display
    1928                string='   private parameters: do not change'
    2029
    21                 string="%s\n%s"%(string,fielddisplay(obj,'isconsistent','is model self consistent'))
    22                 string="%s\n%s"%(string,fielddisplay(obj,'runtimename','name of the run launched'))
    23                 string="%s\n%s"%(string,fielddisplay(obj,'bamg','structure with mesh properties constructed if bamg is used to mesh the domain'))
    24                 string="%s\n%s"%(string,fielddisplay(obj,'solution','type of solution launched'))
     30                string="%s\n%s"%(string,fielddisplay(self,'isconsistent','is model self consistent'))
     31                string="%s\n%s"%(string,fielddisplay(self,'runtimename','name of the run launched'))
     32                string="%s\n%s"%(string,fielddisplay(self,'bamg','structure with mesh properties constructed if bamg is used to mesh the domain'))
     33                string="%s\n%s"%(string,fielddisplay(self,'solution','type of solution launched'))
    2534                return string
    2635                #}}}
    2736               
    28         def setdefaultparameters(obj):
     37        def setdefaultparameters(self):
    2938                # {{{setdefaultparameters
    30                 return obj
     39                return self
    3140        #}}}
    3241
     42        def checkconsistency(self,md,solution,analyses):    # {{{
     43                return md
     44        # }}}
     45
  • issm/branches/trunk-jpl-damage/src/m/classes/prognostic.m

    r12878 r13101  
    3838                function md = checkconsistency(obj,md,solution,analyses) % {{{
    3939
    40                         %Early return,
    41                         if ~ismember(PrognosticAnalysisEnum,analyses) |  (solution==TransientSolutionEnum & md.transient.isprognostic==0), return; end
     40                        %Early return
     41                        if ~ismember(PrognosticAnalysisEnum(),analyses) |  (solution==TransientSolutionEnum() & md.transient.isprognostic==0), return; end
    4242
    4343                        md = checkfield(md,'prognostic.spcthickness','forcing',1);
     
    6262                        WriteData(fid,'object',obj,'fieldname','spcthickness','format','DoubleMat','mattype',1);
    6363                        WriteData(fid,'object',obj,'fieldname','min_thickness','format','Double');
    64                         WriteData(fid,'data',StringToEnum(obj.hydrostatic_adjustment),'format','Integer','enum',PrognosticHydrostaticAdjustmentEnum);
     64                        WriteData(fid,'data',StringToEnum(obj.hydrostatic_adjustment),'format','Integer','enum',PrognosticHydrostaticAdjustmentEnum());
    6565                        WriteData(fid,'object',obj,'fieldname','stabilization','format','Integer');
    6666                        WriteData(fid,'object',obj,'fieldname','vertex_pairing','format','DoubleMat','mattype',3);
  • issm/branches/trunk-jpl-damage/src/m/classes/prognostic.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from StringToEnum import StringToEnum
     5from checkfield import *
     6from WriteData import *
    37
    4 class prognostic:
     8class prognostic(object):
     9        """
     10        PROGNOSTIC class definition
     11
     12           Usage:
     13              prognostic=prognostic();
     14        """
     15
    516        #properties
    617        def __init__(self):
     
    1728
    1829                #}}}
    19         def __repr__(obj):
     30        def __repr__(self):
    2031                # {{{ Display
    2132                string='   Prognostic solution parameters:'
    22                 string="%s\n\n%s"%(string,fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint)'))
    23                 string="%s\n%s"%(string,fielddisplay(obj,'min_thickness','minimum ice thickness allowed'))
    24                 string="%s\n%s"%(string,fielddisplay(obj,'hydrostatic_adjustment','adjustment of ice shelves surface and bed elevations: ''Incremental'' or ''Absolute'' '))
    25                 string="%s\n%s"%(string,fielddisplay(obj,'stabilization','0->no, 1->artificial_diffusivity, 2->streamline upwinding, 3->discontinuous Galerkin'))
     33                string="%s\n\n%s"%(string,fielddisplay(self,'spcthickness','thickness constraints (NaN means no constraint)'))
     34                string="%s\n%s"%(string,fielddisplay(self,'min_thickness','minimum ice thickness allowed'))
     35                string="%s\n%s"%(string,fielddisplay(self,'hydrostatic_adjustment','adjustment of ice shelves surface and bed elevations: ''Incremental'' or ''Absolute'' '))
     36                string="%s\n%s"%(string,fielddisplay(self,'stabilization','0->no, 1->artificial_diffusivity, 2->streamline upwinding, 3->discontinuous Galerkin'))
    2637
    2738                return string
    2839                #}}}
    2940               
    30         def setdefaultparameters(obj):
     41        def setdefaultparameters(self):
    3142                # {{{setdefaultparameters
    3243               
    3344                #Type of stabilization to use 0:nothing 1:artificial_diffusivity 3:Discontinuous Galerkin
    34                 obj.stabilization=1
     45                self.stabilization=1
    3546
    3647                #Factor applied to compute the penalties kappa=max(stiffness matrix)*10^penalty_factor
    37                 obj.penalty_factor=3
     48                self.penalty_factor=3
    3849
    3950                #Minimum ice thickness that can be used
    40                 obj.min_thickness=1
     51                self.min_thickness=1
    4152
    4253                #Hydrostatic adjustment
    43                 obj.hydrostatic_adjustment='Absolute'
     54                self.hydrostatic_adjustment='Absolute'
    4455
    45                 return obj
     56                return self
    4657        #}}}
    4758
     59        def checkconsistency(self,md,solution,analyses):    # {{{
     60
     61                #Early return
     62                if (PrognosticAnalysisEnum() not in analyses) or (solution==TransientSolutionEnum() and not md.transient.isprognostic):
     63                        return md
     64
     65                md = checkfield(md,'prognostic.spcthickness','forcing',1)
     66                md = checkfield(md,'prognostic.hydrostatic_adjustment','values',['Absolute','Incremental'])
     67                md = checkfield(md,'prognostic.stabilization','values',[0,1,2,3])
     68                md = checkfield(md,'prognostic.min_thickness','>',0)
     69
     70                return md
     71        # }}}
     72
     73        def marshall(self,fid):    # {{{
     74                WriteData(fid,'object',self,'fieldname','spcthickness','format','DoubleMat','mattype',1)
     75                WriteData(fid,'object',self,'fieldname','min_thickness','format','Double')
     76                WriteData(fid,'data',StringToEnum(self.hydrostatic_adjustment)[0],'format','Integer','enum',PrognosticHydrostaticAdjustmentEnum())
     77                WriteData(fid,'object',self,'fieldname','stabilization','format','Integer')
     78                WriteData(fid,'object',self,'fieldname','vertex_pairing','format','DoubleMat','mattype',3)
     79                WriteData(fid,'object',self,'fieldname','penalty_factor','format','Double')
     80        # }}}
     81
  • issm/branches/trunk-jpl-damage/src/m/classes/qmu.m

    r12878 r13101  
    4747                                        md = checkmessage(md,['user supplied partition for qmu analysis should have size md.mesh.numberofvertices x 1 ']);
    4848                                end
    49                                 if find(md.qmu.partition)>=md.mesh.numberofvertices,
    50                                         md = checkmessage(md,['user supplied partition should be indexed from 0 (c-convention)']);
    51                                 end
    5249                                if min(md.qmu.partition)~=0,
    5350                                        md = checkmessage(md,['partition vector not indexed from 0 on']);
    54                                 end
    55                                 if max(md.qmu.partition)>=md.mesh.numberofvertices,
    56                                         md = checkmessage(md,['partition vector cannot have maximum index larger than number of nodes']);
    57                                 end
    58                                 if ~isempty(find(md.qmu.partition<0)),
    59                                         md = checkmessage(md,['partition vector cannot have values less than 0']);
    60                                 end
    61                                 if ~isempty(find(md.qmu.partition>=md.qmu.numberofpartitions)),
    62                                         md = checkmessage(md,['partition vector cannot have values more than md.qmu.numberofpartitions-1']);
    6351                                end
    6452                                if max(md.qmu.partition)>=md.qmu.numberofpartitions,
     
    140128                                end
    141129                        end
    142                         fielddisplay(obj,'partition','user provided mesh partitionition, defaults to metis if not specified')
    143                         fielddisplay(obj,'numberofpartitions','number of partitions for semi-descrete qmu')
     130                        fielddisplay(obj,'partition','user provided mesh partitioning, defaults to metis if not specified')
     131                        fielddisplay(obj,'numberofpartitions','number of partitions for semi-discrete qmu')
    144132                        fielddisplay(obj,'variabledescriptors','');
    145133                        fielddisplay(obj,'responsedescriptors','');
  • issm/branches/trunk-jpl-damage/src/m/classes/qmu.py

    r12168 r13101  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
     4from EnumDefinitions import *
     5from checkfield import *
     6from WriteData import *
     7from MatlabFuncs import *
    38
    4 class qmu:
     9class qmu(object):
     10        """
     11        QMU class definition
     12
     13           Usage:
     14              qmu=qmu();
     15        """
     16
    517        #properties
    618        def __init__(self):
     
    2739
    2840                #}}}
    29         def __repr__(obj):
    30                 # {{{ Display
    31                 string="   qmu parameters: not implemented yet!"
    32                 return string
    33                 #}}}
    34                
    35         def setdefaultparameters(obj):
     41
     42        def setdefaultparameters(self):
    3643                # {{{setdefaultparameters
    37                 return obj
     44                return self
    3845        #}}}
    3946
     47        def checkconsistency(self,md,solution,analyses):    # {{{
     48
     49                #Early return
     50                if not md.qmu.isdakota:
     51                        return
     52
     53                if not md.qmu.params.evaluation_concurrency==1:
     54                        md.checkmessage("concurrency should be set to 1 when running dakota in library mode")
     55                if md.qmu.partition:
     56                        if not numpy.size(md.qmu.partition)==md.mesh.numberofvertices:
     57                                md.checkmessage("user supplied partition for qmu analysis should have size md.mesh.numberofvertices x 1")
     58                        if not min(md.qmu.partition)==0:
     59                                md.checkmessage("partition vector not indexed from 0 on")
     60                        if max(md.qmu.partition)>=md.qmu.numberofpartitions:
     61                                md.checkmessage("for qmu analysis, partitioning vector cannot go over npart, number of partition areas")
     62
     63                if not strcmpi(md.cluster.name,'none'):
     64                        if not md.settings.waitonlock:
     65                                md.checkmessage("waitonlock should be activated when running qmu in parallel mode!")
     66
     67                return md
     68        # }}}
     69
     70        def __repr__(self):    # {{{
     71                s ='   qmu parameters:\n'
     72
     73                s+="%s\n" % fielddisplay(self,'isdakota','is qmu analysis activated?')
     74                for i,variable in enumerate(self.variables):
     75                        s+="         variables%s:  (arrays of each variable class)\n" % \
     76                                string_dim(self.variables,i)
     77                        fnames=vars(variable)
     78                        maxlen=0
     79                        for fname in fnames:
     80                                maxlen=max(maxlen,len(fname))
     81
     82                        for fname in fnames:
     83                                s+="'            %-*s:    [%ix%i]    '%s'\n" % \
     84                                        (maxlen+1,fname,size(getattr(variable,fname)),type(getattr(variable,fname)))
     85
     86                for i,response in enumerate(self.responses):
     87                        s+="         responses%s:  (arrays of each response class)\n" % \
     88                                string_dim(self.responses,i)
     89                        fnames=vars(response)
     90                        maxlen=0
     91                        for fname in fnames:
     92                                maxlen=max(maxlen,len(fname))
     93
     94                        for fname in fnames:
     95                                s+="            %-*s:    [%ix%i]    '%s'\n" % \
     96                                        (maxlen+1,fname,size(getattr(response,fname)),type(getattr(response,fname)))
     97
     98                s+="%s\n" % fielddisplay(self,'numberofresponses','number of responses')
     99
     100                for i,method in enumerate(self.method):
     101                        if isinstance(method,'dakota_method'):
     102                                s+="            method%s :    '%s'\n" % \
     103                                        (string_dim(method,i),method.method)
     104
     105                for i,param in enumerate(self.params):
     106                        s+="         params%s:  (array of method-independent parameters)\n" % \
     107                                string_dim(self.params,i)
     108                        fnames=vars(param)
     109                        maxlen=0
     110                        for fname in fnames:
     111                                maxlen=max(maxlen,len(fname))
     112
     113                        for fname in fnames:
     114                                s+="            %-*s: %s\n" % \
     115                                        (maxlen+1,fname,any2str(getattr(param,fname)))
     116
     117                for i,result in enumerate(self.results):
     118                        s+="         results%s:  (information from dakota files)\n" % \
     119                                string_dim(self.results,i)
     120                        fnames=vars(result)
     121                        maxlen=0
     122                        for fname in fnames:
     123                                maxlen=max(maxlen,len(fname))
     124
     125                        for fname in fnames:
     126                                s+="            %-*s:    [%ix%i]    '%s'\n" % \
     127                                        (maxlen+1,fname,size(getattr(result,fname)),type(getattr(result,fname)))
     128
     129                s+="%s\n" % fielddisplay(self,'partition','user provided mesh partitioning, defaults to metis if not specified')
     130                s+="%s\n" % fielddisplay(self,'numberofpartitions','number of partitions for semi-discrete qmu')
     131                s+="%s\n" % fielddisplay(self,'variabledescriptors','')
     132                s+="%s\n" % fielddisplay(self,'responsedescriptors','')
     133                s+="%s\n" % fielddisplay(self,'method','array of dakota_method class')
     134                s+="%s\n" % fielddisplay(self,'mass_flux_profile_directory','directory for mass flux profiles')
     135                s+="%s\n" % fielddisplay(self,'mass_flux_profiles','list of mass_flux profiles')
     136                s+="%s\n" % fielddisplay(self,'mass_flux_segments','')
     137                s+="%s\n" % fielddisplay(self,'adjacency','')
     138                s+="%s\n" % fielddisplay(self,'vertex_weight','weight applied to each mesh vertex')
     139
     140                return s
     141        # }}}
     142               
     143        def marshall(self,fid):    # {{{
     144                WriteData(fid,'object',self,'fieldname','isdakota','format','Boolean')
     145                if not self.isdakota:
     146                        return
     147                WriteData(fid,'object',self,'fieldname','partition','format','DoubleMat','mattype',2)
     148                WriteData(fid,'object',self,'fieldname','numberofpartitions','format','Integer')
     149                WriteData(fid,'object',self,'fieldname','numberofresponses','format','Integer')
     150                WriteData(fid,'object',self,'fieldname','variabledescriptors','format','StringArray')
     151                WriteData(fid,'object',self,'fieldname','responsedescriptors','format','StringArray')
     152                WriteData(fid,'object',self,'fieldname','mass_flux_segments','format','MatArray')
     153        # }}}
     154
  • issm/branches/trunk-jpl-damage/src/m/classes/radaroverlay.py

    r12168 r13101  
    22from fielddisplay import fielddisplay
    33
    4 class radaroverlay:
     4class radaroverlay(object):
     5        """
     6        RADAROVERLAY class definition
     7
     8           Usage:
     9              radaroverlay=radaroverlay();
     10        """
     11
    512        #properties
    613        def __init__(self):
     
    1421
    1522                #}}}
    16         def __repr__(obj):
     23        def __repr__(self):
    1724                # {{{ Display
    1825                string='   radaroverlay parameters:'
    19                 string="%s\n\n%s"%(string,fielddisplay(obj,'pwr','radar power image (matrix)'))
    20                 string="%s\n%s"%(string,fielddisplay(obj,'x','corresponding x coordinates'))
    21                 string="%s\n%s"%(string,fielddisplay(obj,'y','corresponding y coordinates'))
     26                string="%s\n\n%s"%(string,fielddisplay(self,'pwr','radar power image (matrix)'))
     27                string="%s\n%s"%(string,fielddisplay(self,'x','corresponding x coordinates'))
     28                string="%s\n%s"%(string,fielddisplay(self,'y','corresponding y coordinates'))
    2229                return string
    2330                #}}}
    2431               
    25         def setdefaultparameters(obj):
     32        def setdefaultparameters(self):
    2633                # {{{setdefaultparameters
    27                 return obj
     34                return self
    2835        #}}}
    2936
  • issm/branches/trunk-jpl-damage/src/m/classes/rifts.m

    r12878 r13101  
    7979                        end
    8080
    81                         WriteData(fid,'data',numrifts,'enum',RiftsNumriftsEnum,'format','Integer');
    82                         WriteData(fid,'data',data,'enum',RiftsRiftstructEnum,'format','DoubleMat','mattype',3);
     81                        WriteData(fid,'data',numrifts,'enum',RiftsNumriftsEnum(),'format','Integer');
     82                        WriteData(fid,'data',data,'enum',RiftsRiftstructEnum(),'format','DoubleMat','mattype',3);
    8383                end % }}}
    8484        end
  • issm/branches/trunk-jpl-damage/src/m/classes/rifts.py

    r12168 r13101  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
     4from EnumDefinitions import *
     5from checkfield import *
     6from WriteData import *
     7from isnans import *
    38
    4 class rifts:
     9class rifts(object):
     10        """
     11        RIFTS class definition
     12
     13           Usage:
     14              rifts=rifts();
     15        """
     16
    517        #properties
    618        def __init__(self):
     
    1325
    1426                #}}}
    15         def __repr__(obj):
     27        def __repr__(self):
    1628                # {{{ Display
    1729                string='   rifts parameters:'
    1830
    19                 string="%s\n\n%s"%(string,fielddisplay(obj,'riftstruct','structure containing all rift information (vertices coordinates, segments, type of melange, ...)'))
    20                 string="%s\n%s"%(string,fielddisplay(obj,'riftproperties',''))
     31                string="%s\n\n%s"%(string,fielddisplay(self,'riftstruct','structure containing all rift information (vertices coordinates, segments, type of melange, ...)'))
     32                string="%s\n%s"%(string,fielddisplay(self,'riftproperties',''))
    2133                return string
    2234                #}}}
    2335               
    24         def setdefaultparameters(obj):
     36        def setdefaultparameters(self):
    2537                # {{{setdefaultparameters
    26                 return obj
     38                return self
    2739        #}}}
    2840
     41        def checkconsistency(self,md,solution,analyses):    # {{{
     42                if (not self.riftstruct) or numpy.any(isnans(self.riftstruct)):
     43                        numrifts=0
     44                else:
     45                        numrifts=len(self.riftstruct)
     46
     47                if numrifts:
     48                        if not md.mesh.dimension==2:
     49                                md.checkmessage("models with rifts are only supported in 2d for now!")
     50                        if not isinstance(self.riftstruct,list):
     51                                md.checkmessage("rifts.riftstruct should be a structure!")
     52                        if numpy.any(md.mesh.segmentmarkers>=2):
     53                                #We have segments with rift markers, but no rift structure!
     54                                md.checkmessage("model should be processed for rifts (run meshprocessrifts)!")
     55                        md = checkfield(md,'rifts.riftstruct.fill','values',[WaterEnum(),AirEnum(),IceEnum(),MelangeEnum()])
     56                else:
     57                        if numpy.any(numpy.logical_not(isnans(self.riftstruct))):
     58                                md.checkmessage("riftstruct shoud be NaN since numrifts is 0!")
     59
     60                return md
     61        # }}}
     62
     63        def marshall(self,fid):    # {{{
     64
     65                #Process rift info
     66                if (not self.riftstruct) or numpy.any(isnans(self.riftstruct)):
     67                        numrifts=0
     68                else:
     69                        numrifts=len(self.riftstruct)
     70
     71                numpairs=0
     72                for i in xrange(0,numrifts):
     73                        numpairs+=numpy.size(self.riftstruct[i].penaltypairs,0)
     74
     75                # 2 for nodes + 2 for elements+ 2 for  normals + 1 for length + 1 for fill + 1 for friction + 1 for fraction + 1 for fractionincrement + 1 for state.
     76                data=numpy.zeros((numpairs,12))
     77                count=0
     78                for i in xrange(0,numrifts):
     79                        numpairsforthisrift=numpy.size(self.riftstruct[i]['penaltypairs'],0)
     80                        data[count:count+numpairsforthisrift-1,0:6]=self.riftstruct[i]['penaltypairs']
     81                        data[count:count+numpairsforthisrift-1,7]=self.riftstruct[i]['fill']
     82                        data[count:count+numpairsforthisrift-1,8]=self.riftstruct[i]['friction']
     83                        data[count:count+numpairsforthisrift-1,9]=self.riftstruct[i]['fraction']
     84                        data[count:count+numpairsforthisrift-1,10]=self.riftstruct[i]['fractionincrement']
     85                        data[count:count+numpairsforthisrift-1,11]=self.riftstruct[i]['state']
     86                        count+=numpairsforthisrift
     87
     88                WriteData(fid,'data',numrifts,'enum',RiftsNumriftsEnum(),'format','Integer')
     89                WriteData(fid,'data',data,'enum',RiftsRiftstructEnum(),'format','DoubleMat','mattype',3)
     90        # }}}
     91
  • issm/branches/trunk-jpl-damage/src/m/classes/settings.m

    r12878 r13101  
    4343                function md = checkconsistency(obj,md,solution,analyses) % {{{
    4444
    45                         md = checkfield(md,'settings.io_gather','numel',1,'values',[0 1]);
    46                         md = checkfield(md,'settings.lowmem','numel',1,'values',[0 1]);
    47                         md = checkfield(md,'settings.results_as_patches','numel',1,'values',[0 1]);
    48                         md = checkfield(md,'settings.output_frequency','numel',1,'>=',1);
    49                         md = checkfield(md,'settings.waitonlock','numel',1);
     45                        md = checkfield(md,'settings.io_gather','numel',[1],'values',[0 1]);
     46                        md = checkfield(md,'settings.lowmem','numel',[1],'values',[0 1]);
     47                        md = checkfield(md,'settings.results_as_patches','numel',[1],'values',[0 1]);
     48                        md = checkfield(md,'settings.output_frequency','numel',[1],'>=',1);
     49                        md = checkfield(md,'settings.waitonlock','numel',[1]);
    5050
    5151                end % }}}
  • issm/branches/trunk-jpl-damage/src/m/classes/settings.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class settings:
     7class settings(object):
     8        """
     9        SETTINGS class definition
     10
     11           Usage:
     12              settings=settings();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1626
    1727                #}}}
    18         def __repr__(obj):
     28        def __repr__(self):
    1929                # {{{ Display
    2030                string="   general settings parameters:"
    2131
    22                 string="%s\n%s"%(string,fielddisplay(obj,"io_gather","I/O gathering strategy for result outputs (default 1)"))
    23                 string="%s\n%s"%(string,fielddisplay(obj,"lowmem","is the memory limited ? (0 or 1)"))
    24                 string="%s\n%s"%(string,fielddisplay(obj,"results_as_patches","provide results as patches for each element (0 or 1)"))
    25                 string="%s\n%s"%(string,fielddisplay(obj,"output_frequency","frequency at which results are saved in all solutions with multiple time_steps"))
    26                 string="%s\n%s"%(string,fielddisplay(obj,"waitonlock","maximum number of minutes to wait for batch results, or return 0"))
     32                string="%s\n%s"%(string,fielddisplay(self,"io_gather","I/O gathering strategy for result outputs (default 1)"))
     33                string="%s\n%s"%(string,fielddisplay(self,"lowmem","is the memory limited ? (0 or 1)"))
     34                string="%s\n%s"%(string,fielddisplay(self,"results_as_patches","provide results as patches for each element (0 or 1)"))
     35                string="%s\n%s"%(string,fielddisplay(self,"output_frequency","frequency at which results are saved in all solutions with multiple time_steps"))
     36                string="%s\n%s"%(string,fielddisplay(self,"waitonlock","maximum number of minutes to wait for batch results, or return 0"))
    2737                return string
    2838                #}}}
    2939               
    30         def setdefaultparameters(obj):
     40        def setdefaultparameters(self):
    3141                # {{{setdefaultparameters
    3242               
    3343                #are we short in memory ? (0 faster but requires more memory)
    34                 obj.lowmem=0
     44                self.lowmem=0
    3545
    3646                #i/o:
    37                 obj.io_gather=1
     47                self.io_gather=1
    3848
    3949                #results frequency by default every step
    40                 obj.output_frequency=1
     50                self.output_frequency=1
    4151
    4252                #do not use patches by default (difficult to plot)
    43                 obj.results_as_patches=0
     53                self.results_as_patches=0
    4454
    4555                #this option can be activated to load automatically the results
     
    4757                #N minutes that is generated once the solution has converged
    4858                #0 to desactivate
    49                 obj.waitonlock=float('Inf')
     59                self.waitonlock=float('Inf')
    5060
    51                 return obj
     61                return self
    5262        #}}}
    5363
     64        def checkconsistency(self,md,solution,analyses):    # {{{
     65                md = checkfield(md,'settings.io_gather','numel',[1],'values',[0,1])
     66                md = checkfield(md,'settings.lowmem','numel',[1],'values',[0,1])
     67                md = checkfield(md,'settings.results_as_patches','numel',[1],'values',[0,1])
     68                md = checkfield(md,'settings.output_frequency','numel',[1],'>=',1)
     69                md = checkfield(md,'settings.waitonlock','numel',[1])
     70
     71                return md
     72        # }}}
     73
     74        def marshall(self,fid):    # {{{
     75                WriteData(fid,'object',self,'fieldname','io_gather','format','Boolean')
     76                WriteData(fid,'object',self,'fieldname','lowmem','format','Boolean')
     77                WriteData(fid,'object',self,'fieldname','results_as_patches','format','Boolean')
     78                WriteData(fid,'object',self,'fieldname','output_frequency','format','Integer')
     79                WriteData(fid,'object',self,'fieldname','waitonlock','format','Boolean')
     80        # }}}
     81
  • issm/branches/trunk-jpl-damage/src/m/classes/solver.m

    r12878 r13101  
    2020                 function obj = addoptions(obj,analysis,varargin) % {{{
    2121                 % Usage example:
    22                  %    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum,stokesoptions());
    23                  %    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum);
     22                 %    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum(),stokesoptions());
     23                 %    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum());
    2424
    2525                         %Convert analysis from enum to string
     
    3838
    3939                         %MUMPS is the default solver
    40                          if ismumps,
    41                                  obj.NoneAnalysis=mumpsoptions;
     40                         if ismumps(),
     41                                 obj.NoneAnalysis=mumpsoptions();
    4242                         else
    43                                  obj.NoneAnalysis=iluasmoptions;
     43                                 obj.NoneAnalysis=iluasmoptions();
    4444                         end
    4545
  • issm/branches/trunk-jpl-damage/src/m/classes/solver.py

    r12168 r13101  
    1 #module imports {{{
    2 import fielddisplay
    3 import ismumps
    4 from  mumpsoptions import *
    5 from  iluasmoptions import *
    6 #}}}
    7 class solver:
    8         #properties
    9         def __init__(self):
    10                 # {{{ Properties
    11                 if ismumps:
    12                         self.options=[["NoneAnalysis",mumpsoptions()]]
     1from ismumps import *
     2from mumpsoptions import *
     3from iluasmoptions import *
     4from EnumToString import EnumToString
     5from MatlabFuncs import *
     6from EnumDefinitions import *
     7from checkfield import *
     8
     9class solver(object):
     10        """
     11        SOLVER class definition
     12
     13           Usage:
     14              obj=solver();
     15        """
     16
     17        def __init__(self):    # {{{
     18                #MUMPS is the default solver
     19                if ismumps():
     20                        self.NoneAnalysis=mumpsoptions()
    1321                else:
    14                         self.options=[["NoneAnalysis",iluasmoptions()]]
    15                 #}}}
    16         def __repr__(obj):
    17                 # {{{ Display
    18                
    19                 string2="   solver parameters:"
    20                 for i in range(len(obj.options)):
    21                         option=obj.options[i]
    22                         analysis=option[0]
    23                         ioptions=option[1]
     22                        self.NoneAnalysis=iluasmoptions()
    2423
    25                         string=""
    26                         for i in range(len(ioptions)):
    27                                 option=ioptions[i]
    28                                 if not option:
    29                                         #do nothing
    30                                         pass
    31                                 elif len(option)==1:
     24                #The other properties are dynamic
     25        # }}}
     26
     27        def addoptions(self,analysis,*args):    # {{{
     28                # Usage example:
     29                #    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum(),stokesoptions());
     30                #    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum());
     31
     32                #Convert analysis from enum to string
     33                [analysis]=EnumToString(analysis)
     34
     35                #Create dynamic property if property does not exist yet
     36                if not hasattr(self,analysis):
     37#                       exec("self.%s = None" % analysis)
     38                        setattr(self,analysis,None)
     39
     40                #Add solver options to analysis
     41                if len(args)==1:
     42                        setattr(self,analysis,args[0])
     43
     44                return self
     45        # }}}
     46
     47        def __repr__(self):    # {{{
     48                s ="List of solver options per analysis:\n\n"
     49                for analysis in vars(self).iterkeys():
     50                        s+="%s :\n" % analysis
     51                        s+="%s\n" % getattr(self,analysis)
     52
     53                return s
     54        # }}}
     55
     56        def checkconsistency(self,md,solution,analyses):    # {{{
     57                for analysis in vars(self).iterkeys():
     58                        if not getattr(self,analysis):
     59                                md.checkmessage("md.solver.%s is empty" % analysis)
     60
     61                return md
     62        # }}}
     63
     64        def PetscFile(self,filename):    # {{{
     65                """
     66                PETSCFILE - build petsc file
     67
     68                   Build a Petsc compatible options file, from the solver model field  + return options string
     69
     70                   Usage:     PetscFile(solver,filename);
     71                """
     72
     73                #open file for writing
     74                try:
     75                        fid=open(filename,'w')
     76                except IOError as e:
     77                        raise IOError("PetscFile error: could not open '%s' for writing." % filename)
     78
     79                #write header
     80                fid.write("%s%s%s\n" % ('%Petsc options file: ',filename,' written from Matlab solver array'))
     81
     82                #start writing options
     83                for analysis in vars(self).iterkeys():
     84                        options=getattr(self,analysis)
     85
     86                        #first write analysis:
     87                        fid.write("\n+%s\n" % analysis)    #append a + to recognize it's an analysis enum
     88
     89                        #now, write options
     90                        for optionname,optionvalue in options.iteritems():
     91
     92                                if not optionvalue:
    3293                                        #this option has only one argument
    33                                         string="%s%s%s"%(string," -",option[0])
    34                                 elif len(option)==2:
     94                                        fid.write("-%s\n" % optionname)
     95                                else:
    3596                                        #option with value. value can be string or scalar
    36                                         if isinstance(option[1],float):
    37                                                 string="%s%s%s%s%s"%(string," -",option[0]," ","%g"%(option[1]))
    38                                         elif isinstance(option[1],str):
    39                                                 string="%s%s%s%s%s"%(string," -",option[0]," ",option[1])
    40                                         elif isinstance(option[1],int):
    41                                                 string="%s%s%s%s%s"%(string," -",option[0]," ","%i"%(option[1]))
     97                                        if   isinstance(optionvalue,(bool,int,long,float)):
     98                                                fid.write("-%s %g\n" % (optionname,optionvalue))
     99                                        elif isinstance(optionvalue,(str,unicode)):
     100                                                fid.write("-%s %s\n" % (optionname,optionvalue))
    42101                                        else:
    43                                                 raise RuntimeError("%s%s%s"%("PetscString error: option #","%i"%(i)," is not well formatted"))
    44                                 else:
    45                                         raise RuntimeError("%s%s%s"%("PetscString error: option #","%i"%(i)," is not well formatted"))
     102                                                raise TypeError("PetscFile error: option '%s' is not well formatted." % optionname)
    46103
    47                         string2="%s\n%s"%(string2,"   %s -> '%s'"%(analysis,string))
    48                 return string2
    49         #}}}
     104                fid.close()
     105        # }}}
     106
  • issm/branches/trunk-jpl-damage/src/m/classes/steadystate.m

    r12878 r13101  
    2929
    3030                        %Early return
    31                         if solution~=SteadystateSolutionEnum, return; end;
     31                        if solution~=SteadystateSolutionEnum(), return; end;
    3232
    3333                        if md.timestepping.time_step~=0,
  • issm/branches/trunk-jpl-damage/src/m/classes/steadystate.py

    r12168 r13101  
    11#module imports
     2import numpy
    23from fielddisplay import fielddisplay
     4from EnumDefinitions import *
     5from checkfield import *
     6from WriteData import *
    37
    4 class steadystate:
     8class steadystate(object):
     9        """
     10        STEADYSTATE class definition
     11
     12           Usage:
     13              steadystate=steadystate();
     14        """
     15
    516        #properties
    617        def __init__(self):
     
    1425
    1526                #}}}
    16         def __repr__(obj):
     27        def __repr__(self):
    1728                # {{{ Display
    1829                string='   steadystate solution parameters:'
    19                 string="%s\n%s"%(string,fielddisplay(obj,'reltol','relative tolerance criterion'))
    20                 string="%s\n%s"%(string,fielddisplay(obj,'maxiter','maximum number of iterations'))
    21                 string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','additional requested outputs'))
     30                string="%s\n%s"%(string,fielddisplay(self,'reltol','relative tolerance criterion'))
     31                string="%s\n%s"%(string,fielddisplay(self,'maxiter','maximum number of iterations'))
     32                string="%s\n%s"%(string,fielddisplay(self,'requested_outputs','additional requested outputs'))
    2233                return string
    2334                #}}}
    2435               
    25         def setdefaultparameters(obj):
     36        def setdefaultparameters(self):
    2637                # {{{setdefaultparameters
    2738               
    2839                #maximum of steady state iterations
    29                 obj.maxiter=100
     40                self.maxiter=100
    3041
    3142                #Relative tolerance for the steadystate convertgence
    32                 obj.reltol=0.01
     43                self.reltol=0.01
    3344
    34                 return obj
     45                return self
    3546        #}}}
    3647
     48        def checkconsistency(self,md,solution,analyses):    # {{{
     49
     50                #Early return
     51                if not solution==SteadystateSolutionEnum():
     52                        return md
     53
     54                if not md.timestepping.time_step==0:
     55                        md.checkmessage("for a steadystate computation, timestepping.time_step must be zero.")
     56
     57                if numpy.isnan(md.diagnostic.reltol):
     58                        md.checkmessage("for a steadystate computation, diagnostic.reltol (relative convergence criterion) must be defined!")
     59
     60                return md
     61        # }}}
     62
     63        def marshall(self,fid):    # {{{
     64                WriteData(fid,'object',self,'fieldname','reltol','format','Double')
     65                WriteData(fid,'object',self,'fieldname','maxiter','format','Integer')
     66                WriteData(fid,'object',self,'fieldname','requested_outputs','format','DoubleMat','mattype',3)
     67        # }}}
     68
  • issm/branches/trunk-jpl-damage/src/m/classes/surfaceforcings.m

    r12878 r13101  
    1111                issmbgradients = 0;
    1212                isdelta18o = 0;
    13            hc = NaN;
     13                hc = NaN;
    1414                smb_pos_max = NaN;
    1515                smb_pos_min = NaN;
     
    4444                function md = checkconsistency(obj,md,solution,analyses) % {{{
    4545
    46                         if ismember(PrognosticAnalysisEnum,analyses),
    47                                 md = checkfield(md,'surfaceforcings.ispdd','numel',1,'values',[0 1]);
    48                                 checkfield(md,'surfaceforcings.issmbgradients','numel',1,'values',[0 1]);
     46                        if ismember(PrognosticAnalysisEnum(),analyses),
     47                                md = checkfield(md,'surfaceforcings.ispdd','numel',[1],'values',[0 1]);
     48                                md = checkfield(md,'surfaceforcings.issmbgradients','numel',[1],'values',[0 1]);
    4949                                if(obj.ispdd)
    50                                         if(obj.isdelta18o==0)
    51                                                 md = checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
    52                                                 md = checkfield(md,'surfaceforcings.precipitation','forcing',1,'NaN',1);
    53                                         else
    54                                                 md = checkfield(md,'surfaceforcings.delta18o','NaN',1);
    55                                                 md = checkfield(md,'surfaceforcings.delta18o_surface','NaN',1);
    56                                                 md = checkfield(md,'surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
    57                                                 md = checkfield(md,'surfaceforcings.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);
    58                                                 md = checkfield(md,'surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
    59                                         end
     50                                        if(obj.isdelta18o==0)
     51                                                md = checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1);
     52                                                md = checkfield(md,'surfaceforcings.precipitation','forcing',1,'NaN',1);
     53                                        else
     54                                                md = checkfield(md,'surfaceforcings.delta18o','NaN',1);
     55                                                md = checkfield(md,'surfaceforcings.delta18o_surface','NaN',1);
     56                                                md = checkfield(md,'surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
     57                                                md = checkfield(md,'surfaceforcings.temperatures_lgm','size',[md.mesh.numberofvertices+1 12],'NaN',1);
     58                                                md = checkfield(md,'surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1 12],'NaN',1);
     59                                        end
    6060                                elseif(obj.issmbgradients)
    61                                         checkfield(md,'surfaceforcings.hc','forcing',1,'NaN',1);
    62                                         checkfield(md,'surfaceforcings.smb_pos_max','forcing',1,'NaN',1);
    63                                         checkfield(md,'surfaceforcings.smb_pos_min','forcing',1,'NaN',1);
    64                                         checkfield(md,'surfaceforcings.a_pos','forcing',1,'NaN',1);
    65                                         checkfield(md,'surfaceforcings.b_pos','forcing',1,'NaN',1);
    66                                         checkfield(md,'surfaceforcings.a_neg','forcing',1,'NaN',1);
    67                                         checkfield(md,'surfaceforcings.b_neg','forcing',1,'NaN',1);
     61                                        md = checkfield(md,'surfaceforcings.hc','forcing',1,'NaN',1);
     62                                        md = checkfield(md,'surfaceforcings.smb_pos_max','forcing',1,'NaN',1);
     63                                        md = checkfield(md,'surfaceforcings.smb_pos_min','forcing',1,'NaN',1);
     64                                        md = checkfield(md,'surfaceforcings.a_pos','forcing',1,'NaN',1);
     65                                        md = checkfield(md,'surfaceforcings.b_pos','forcing',1,'NaN',1);
     66                                        md = checkfield(md,'surfaceforcings.a_neg','forcing',1,'NaN',1);
     67                                        md = checkfield(md,'surfaceforcings.b_neg','forcing',1,'NaN',1);
    6868                                else
    6969                                        md = checkfield(md,'surfaceforcings.mass_balance','forcing',1,'NaN',1);
    7070                                end
    7171                        end
    72                         if ismember(BalancethicknessAnalysisEnum,analyses),
     72                        if ismember(BalancethicknessAnalysisEnum(),analyses),
    7373                                md = checkfield(md,'surfaceforcings.mass_balance','size',[md.mesh.numberofvertices 1],'NaN',1);
    7474                        end
     
    103103                        WriteData(fid,'object',obj,'fieldname','isdelta18o','format','Boolean');
    104104                        if obj.ispdd,
    105                           if obj.isdelta18o
    106                                 WriteData(fid,'object',obj,'fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
    107                                 WriteData(fid,'object',obj,'fieldname','temperatures_lgm','format','DoubleMat','mattype',1);
    108                                 WriteData(fid,'object',obj,'fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
    109                                 WriteData(fid,'object',obj,'fieldname','delta18o_surface','format','DoubleMat','mattype',1);
    110                                 WriteData(fid,'object',obj,'fieldname','delta18o','format','DoubleMat','mattype',1);
    111                           else
    112                                 WriteData(fid,'object',obj,'fieldname','monthlytemperatures','format','DoubleMat','mattype',1);
    113                                 WriteData(fid,'object',obj,'fieldname','precipitation','format','DoubleMat','mattype',1);
    114                           end
     105                                if obj.isdelta18o
     106                                        WriteData(fid,'object',obj,'fieldname','temperatures_presentday','format','DoubleMat','mattype',1);
     107                                        WriteData(fid,'object',obj,'fieldname','temperatures_lgm','format','DoubleMat','mattype',1);
     108                                        WriteData(fid,'object',obj,'fieldname','precipitations_presentday','format','DoubleMat','mattype',1);
     109                                        WriteData(fid,'object',obj,'fieldname','delta18o_surface','format','DoubleMat','mattype',1);
     110                                        WriteData(fid,'object',obj,'fieldname','delta18o','format','DoubleMat','mattype',1);
     111                                else
     112                                        WriteData(fid,'object',obj,'fieldname','monthlytemperatures','format','DoubleMat','mattype',1);
     113                                        WriteData(fid,'object',obj,'fieldname','precipitation','format','DoubleMat','mattype',1);
     114                                end
    115115                        end
    116116                        WriteData(fid,'object',obj,'fieldname','issmbgradients','format','Boolean');
  • issm/branches/trunk-jpl-damage/src/m/classes/surfaceforcings.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class surfaceforcings:
     7class surfaceforcings(object):
     8        """
     9        SURFACEFORCING Class definition
     10
     11           Usage:
     12              surfaceforcings=surfaceforcings();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    818                self.precipitation = float('NaN')
    919                self.mass_balance  = float('NaN')
     20                self.ispdd = 0
     21                self.issmbgradients = 0
     22                self.isdelta18o = 0
     23                self.hc = float('NaN')
     24                self.smb_pos_max = float('NaN')
     25                self.smb_pos_min = float('NaN')
     26                self.a_pos = float('NaN')
     27                self.b_pos = float('NaN')
     28                self.a_neg = float('NaN')
     29                self.b_neg = float('NaN')
     30                self.monthlytemperatures = float('NaN')
     31                self.delta18o = float('NaN')
     32                self.delta18o_surface = float('NaN')
     33                self.temperatures_presentday = float('NaN')
     34                self.temperatures_lgm = float('NaN')
     35                self.precipitations_presentday = float('NaN')
    1036
    1137                #set defaults
     
    1339
    1440                #}}}
    15         def __repr__(obj):
     41        def __repr__(self):
    1642                # {{{ Display
    1743                string="   surface forcings parameters:"
    1844
    19                 string="%s\n\n%s"%(string,fielddisplay(obj,'precipitation','surface precipitation [m/yr water eq]'))
    20                 string="%s\n%s"%(string,fielddisplay(obj,'mass_balance','surface mass balance [m/yr ice eq]'))
     45                string="%s\n\n%s"%(string,fielddisplay(self,'precipitation','surface precipitation [m/yr water eq]'))
     46                string="%s\n%s"%(string,fielddisplay(self,'mass_balance','surface mass balance [m/yr ice eq]'))
     47                string="%s\n%s"%(string,fielddisplay(self,'ispdd','is pdd activated (0 or 1, default is 0)'))
     48                string="%s\n%s"%(string,fielddisplay(self,'isdelta18o','is temperature and precipitation delta18o parametrisation activated (0 or 1, default is 0)'))
     49                string="%s\n%s"%(string,fielddisplay(self,'monthlytemperatures','monthly surface temperatures [Kelvin], required if pdd is activated and delta18o not activated'))
     50                string="%s\n%s"%(string,fielddisplay(self,'precipitation','surface precipitation [m/yr water eq]'))
     51                string="%s\n%s"%(string,fielddisplay(self,'temperatures_presentday','monthly present day surface temperatures [Kelvin], required if pdd is activated and delta18o activated'))
     52                string="%s\n%s"%(string,fielddisplay(self,'temperatures_lgm','monthly LGM surface temperatures [Kelvin], required if pdd is activated and delta18o activated'))
     53                string="%s\n%s"%(string,fielddisplay(self,'precipitations_presentday','monthly surface precipitation [m/yr water eq], required if pdd is activated and delta18o activated'))
     54                string="%s\n%s"%(string,fielddisplay(self,'delta18o','delta18o, required if pdd is activated and delta18o activated'))
     55                string="%s\n%s"%(string,fielddisplay(self,'delta18o_surface','surface elevation of the delta18o site, required if pdd is activated and delta18o activated'))
     56                string="%s\n%s"%(string,fielddisplay(self,'issmbgradients','is smb gradients method activated (0 or 1, default is 0)'))
     57                string="%s\n%s"%(string,fielddisplay(self,'hc',' elevation of intersection between accumulation and ablation regime required if smb gradients is activated'))
     58                string="%s\n%s"%(string,fielddisplay(self,'smb_pos_max',' maximum value of positive smb required if smb gradients is activated'))
     59                string="%s\n%s"%(string,fielddisplay(self,'smb_pos_min',' minimum value of positive smb required if smb gradients is activated'))
     60                string="%s\n%s"%(string,fielddisplay(self,'a_pos',' intercept of hs - smb regression line for accumulation regime required if smb gradients is activated'))
     61                string="%s\n%s"%(string,fielddisplay(self,'b_pos',' slope of hs - smb regression line for accumulation regime required if smb gradients is activated'))
     62                string="%s\n%s"%(string,fielddisplay(self,'a_neg',' intercept of hs - smb regression line for ablation regime required if smb gradients is activated'))
     63                string="%s\n%s"%(string,fielddisplay(self,'b_neg',' slope of hs - smb regression line for ablation regime required if smb gradients is activated'))
    2164
    2265                return string
    2366                #}}}
    2467               
    25         def setdefaultparameters(obj):
     68        def setdefaultparameters(self):
    2669                # {{{setdefaultparameters
    27                 return obj
     70                 
     71                #pdd method not used in default mode
     72                self.ispdd=0
     73                self.issmbgradients=0
     74                self.isdelta18o=0
     75
     76                return self
    2877        #}}}
    2978
     79        def checkconsistency(self,md,solution,analyses):    # {{{
     80
     81                if PrognosticAnalysisEnum() in analyses:
     82                        md = checkfield(md,'surfaceforcings.ispdd','numel',[1],'values',[0,1])
     83                        md = checkfield(md,'surfaceforcings.issmbgradients','numel',[1],'values',[0,1])
     84                        if   self.ispdd:
     85                                if not self.isdelta18o:
     86                                        md = checkfield(md,'surfaceforcings.monthlytemperatures','forcing',1,'NaN',1)
     87                                        md = checkfield(md,'surfaceforcings.precipitation','forcing',1,'NaN',1)
     88                                else:
     89                                        md = checkfield(md,'surfaceforcings.delta18o','NaN',1)
     90                                        md = checkfield(md,'surfaceforcings.delta18o_surface','NaN',1)
     91                                        md = checkfield(md,'surfaceforcings.temperatures_presentday','size',[md.mesh.numberofvertices+1,12],'NaN',1)
     92                                        md = checkfield(md,'surfaceforcings.temperatures_lgm','size',[md.mesh.numberofvertices+1,12],'NaN',1)
     93                                        md = checkfield(md,'surfaceforcings.precipitations_presentday','size',[md.mesh.numberofvertices+1,12],'NaN',1)
     94                        elif self.issmbgradients:
     95                                md = checkfield(md,'surfaceforcings.hc','forcing',1,'NaN',1)
     96                                md = checkfield(md,'surfaceforcings.smb_pos_max','forcing',1,'NaN',1)
     97                                md = checkfield(md,'surfaceforcings.smb_pos_min','forcing',1,'NaN',1)
     98                                md = checkfield(md,'surfaceforcings.a_pos','forcing',1,'NaN',1)
     99                                md = checkfield(md,'surfaceforcings.b_pos','forcing',1,'NaN',1)
     100                                md = checkfield(md,'surfaceforcings.a_neg','forcing',1,'NaN',1)
     101                                md = checkfield(md,'surfaceforcings.b_neg','forcing',1,'NaN',1)
     102                        else:
     103                                md = checkfield(md,'surfaceforcings.mass_balance','forcing',1,'NaN',1)
     104
     105                if BalancethicknessAnalysisEnum() in analyses:
     106                        md = checkfield(md,'surfaceforcings.mass_balance','size',[md.mesh.numberofvertices],'NaN',1)
     107
     108                return md
     109        # }}}
     110
     111        def marshall(self,fid):    # {{{
     112                WriteData(fid,'object',self,'fieldname','precipitation','format','DoubleMat','mattype',1)
     113                WriteData(fid,'object',self,'fieldname','mass_balance','format','DoubleMat','mattype',1)
     114                WriteData(fid,'object',self,'fieldname','ispdd','format','Boolean')
     115                WriteData(fid,'object',self,'fieldname','isdelta18o','format','Boolean')
     116
     117                if self.ispdd:
     118                        if self.isdelta18o:
     119                                WriteData(fid,'object',self,'fieldname','temperatures_presentday','format','DoubleMat','mattype',1)
     120                                WriteData(fid,'object',self,'fieldname','temperatures_lgm','format','DoubleMat','mattype',1)
     121                                WriteData(fid,'object',self,'fieldname','precipitations_presentday','format','DoubleMat','mattype',1)
     122                                WriteData(fid,'object',self,'fieldname','delta18o_surface','format','DoubleMat','mattype',1)
     123                                WriteData(fid,'object',self,'fieldname','delta18o','format','DoubleMat','mattype',1)
     124                        else:
     125                                WriteData(fid,'object',self,'fieldname','monthlytemperatures','format','DoubleMat','mattype',1)
     126                                WriteData(fid,'object',self,'fieldname','precipitation','format','DoubleMat','mattype',1)
     127
     128                WriteData(fid,'object',self,'fieldname','issmbgradients','format','Boolean')
     129
     130                if self.issmbgradients:
     131                        WriteData(fid,'object',self,'fieldname','hc','format','DoubleMat','mattype',1)
     132                        WriteData(fid,'object',self,'fieldname','smb_pos_max','format','DoubleMat','mattype',1)
     133                        WriteData(fid,'object',self,'fieldname','smb_pos_min','format','DoubleMat','mattype',1)
     134                        WriteData(fid,'object',self,'fieldname','a_pos','format','DoubleMat','mattype',1)
     135                        WriteData(fid,'object',self,'fieldname','b_pos','format','DoubleMat','mattype',1)
     136                        WriteData(fid,'object',self,'fieldname','a_neg','format','DoubleMat','mattype',1)
     137                        WriteData(fid,'object',self,'fieldname','b_neg','format','DoubleMat','mattype',1)
     138        # }}}
     139
  • issm/branches/trunk-jpl-damage/src/m/classes/thermal.m

    r12878 r13101  
    4343
    4444                        %Early return
    45                         if (~ismember(ThermalAnalysisEnum,analyses) & ~ismember(EnthalpyAnalysisEnum,analyses)) | (solution==TransientSolutionEnum & md.transient.isthermal==0), return; end
     45                        if (~ismember(ThermalAnalysisEnum(),analyses) & ~ismember(EnthalpyAnalysisEnum(),analyses)) | (solution==TransientSolutionEnum() & md.transient.isthermal==0), return; end
    4646
    47                         md = checkfield(md,'thermal.stabilization','numel',1,'values',[0 1 2]);
     47                        md = checkfield(md,'thermal.stabilization','numel',[1],'values',[0 1 2]);
    4848                        md = checkfield(md,'thermal.spctemperature','forcing',1);
    49                         if (ismember(EnthalpyAnalysisEnum,analyses) & md.thermal.isenthalpy & md.mesh.dimension==3),
    50                         md = checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message','spctemperature should be below the adjusted melting point');
    51                         md = checkfield(md,'thermal.isenthalpy','numel',1,'values',[0 1]);
     49                        if (ismember(EnthalpyAnalysisEnum(),analyses) & md.thermal.isenthalpy & md.mesh.dimension==3),
     50                                md = checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message','spctemperature should be below the adjusted melting point');
     51                                md = checkfield(md,'thermal.isenthalpy','numel',[1],'values',[0 1]);
    5252                        end
    5353                end % }}}
  • issm/branches/trunk-jpl-damage/src/m/classes/thermal.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class thermal:
     7class thermal(object):
     8        """
     9        THERMAL class definition
     10
     11           Usage:
     12              thermal=thermal();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1828
    1929                #}}}
    20         def __repr__(obj):
     30        def __repr__(self):
    2131                # {{{ Display
    2232                string='   Thermal solution parameters:'
    23                 string="%s\n\n%s"%(string,fielddisplay(obj,'spctemperature','temperature constraints (NaN means no constraint)'))
    24                 string="%s\n%s"%(string,fielddisplay(obj,'stabilization','0->no, 1->artificial_diffusivity, 2->SUPG'))
    25                 string="%s\n%s"%(string,fielddisplay(obj,'maxiter','maximum number of non linear iterations'))
    26                 string="%s\n%s"%(string,fielddisplay(obj,'penalty_lock','stabilize unstable thermal constraints that keep zigzagging after n iteration (default is 0, no stabilization)'))
    27                 string="%s\n%s"%(string,fielddisplay(obj,'penalty_threshold','threshold to declare convergence of thermal solution (default is 0)'))
    28                 string="%s\n%s"%(string,fielddisplay(obj,'isenthalpy','use an enthalpy formulation to include temperate ice (default is 0)'))
     33                string="%s\n\n%s"%(string,fielddisplay(self,'spctemperature','temperature constraints (NaN means no constraint)'))
     34                string="%s\n%s"%(string,fielddisplay(self,'stabilization','0->no, 1->artificial_diffusivity, 2->SUPG'))
     35                string="%s\n%s"%(string,fielddisplay(self,'maxiter','maximum number of non linear iterations'))
     36                string="%s\n%s"%(string,fielddisplay(self,'penalty_lock','stabilize unstable thermal constraints that keep zigzagging after n iteration (default is 0, no stabilization)'))
     37                string="%s\n%s"%(string,fielddisplay(self,'penalty_threshold','threshold to declare convergence of thermal solution (default is 0)'))
     38                string="%s\n%s"%(string,fielddisplay(self,'isenthalpy','use an enthalpy formulation to include temperate ice (default is 0)'))
    2939                return string
    3040                #}}}
    3141               
    32         def setdefaultparameters(obj):
     42        def setdefaultparameters(self):
    3343                # {{{setdefaultparameters
    3444               
    3545                #Number of unstable constraints acceptable
    36                 obj.penalty_threshold=0
     46                self.penalty_threshold=0
    3747
    3848                #Type of stabilization used
    39                 obj.stabilization=1
     49                self.stabilization=1
    4050
    4151                #Maximum number of iterations
    42                 obj.maxiter=100
     52                self.maxiter=100
    4353
    4454                #factor used to compute the values of the penalties: kappa=max(stiffness matrix)*10^penalty_factor
    45                 obj.penalty_factor=3
     55                self.penalty_factor=3
    4656
    4757                #Should we use cold ice (default) or enthalpy formulation
    48                 obj.isenthalpy=0
     58                self.isenthalpy=0
    4959
    50                 return obj
     60                return self
    5161        #}}}
    5262
     63        def checkconsistency(self,md,solution,analyses):    # {{{
     64
     65                #Early return
     66                if (ThermalAnalysisEnum() not in analyses and EnthalpyAnalysisEnum() not in analyses) or (solution==TransientSolutionEnum() and not md.transient.isthermal):
     67                        return md
     68
     69                md = checkfield(md,'thermal.stabilization','numel',[1],'values',[0,1,2])
     70                md = checkfield(md,'thermal.spctemperature','forcing',1)
     71                if EnthalpyAnalysisEnum() in analyses and md.thermal.isenthalpy and md.mesh.dimension==3:
     72                        md = checkfield(md,'thermal.spctemperature','<',md.materials.meltingpoint-md.materials.beta*md.materials.rho_ice*md.constants.g*(md.geometry.surface-md.mesh.z),'message',"spctemperature should be below the adjusted melting point")
     73                        md = checkfield(md,'thermal.isenthalpy','numel',[1],'values',[0,1])
     74
     75                return md
     76        # }}}
     77
     78        def marshall(self,fid):    # {{{
     79                WriteData(fid,'object',self,'fieldname','spctemperature','format','DoubleMat','mattype',1)
     80                WriteData(fid,'object',self,'fieldname','penalty_threshold','format','Integer')
     81                WriteData(fid,'object',self,'fieldname','stabilization','format','Integer')
     82                WriteData(fid,'object',self,'fieldname','maxiter','format','Integer')
     83                WriteData(fid,'object',self,'fieldname','penalty_lock','format','Integer')
     84                WriteData(fid,'object',self,'fieldname','penalty_factor','format','Double')
     85                WriteData(fid,'object',self,'fieldname','isenthalpy','format','Boolean')
     86        # }}}
     87
  • issm/branches/trunk-jpl-damage/src/m/classes/timestepping.m

    r12878 r13101  
    3535                function md = checkconsistency(obj,md,solution,analyses) % {{{
    3636
    37                         md = checkfield(md,'timestepping.start_time','numel',1,'NaN',1);
    38                         md = checkfield(md,'timestepping.final_time','numel',1,'NaN',1);
    39                         md = checkfield(md,'timestepping.time_step','numel',1,'>=',0,'NaN',1);
    40                         md = checkfield(md,'timestepping.time_adapt','numel',1,'values',[0 1]);
    41                         md = checkfield(md,'timestepping.cfl_coefficient','numel',1,'>',0,'<=',1);
     37                        md = checkfield(md,'timestepping.start_time','numel',[1],'NaN',1);
     38                        md = checkfield(md,'timestepping.final_time','numel',[1],'NaN',1);
     39                        md = checkfield(md,'timestepping.time_step','numel',[1],'>=',0,'NaN',1);
     40                        md = checkfield(md,'timestepping.time_adapt','numel',[1],'values',[0 1]);
     41                        md = checkfield(md,'timestepping.cfl_coefficient','numel',[1],'>',0,'<=',1);
    4242                        if obj.final_time-obj.start_time<0,
    4343                                md = checkmessage(md,'timestepping.final_time should be larger than timestepping.start_time');
  • issm/branches/trunk-jpl-damage/src/m/classes/timestepping.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class timestepping:
     7class timestepping(object):
     8        """
     9        TIMESTEPPING Class definition
     10
     11           Usage:
     12              timestepping=timestepping();
     13        """
     14
    515        #properties
    616        def __init__(self):
    717                # {{{ Properties
     18                self.start_time      = 0
     19                self.final_time      = 0
    820                self.time_step       = 0
    9                 self.final_time      = 0
    1021                self.time_adapt      = 0
    1122                self.cfl_coefficient = 0
     
    1526
    1627                #}}}
    17         def __repr__(obj):
     28        def __repr__(self):
    1829                # {{{ Display
    1930                string="   timestepping parameters:"
    20                 string="%s\n\n%s"%(string,fielddisplay(obj,"time_step","length of time steps [yrs]"))
    21                 string="%s\n%s"%(string,fielddisplay(obj,"final_time","final time to stop the simulation [yrs]"))
    22                 string="%s\n%s"%(string,fielddisplay(obj,"time_adapt","use cfl condition to define time step ? (0 or 1) "))
    23                 string="%s\n%s"%(string,fielddisplay(obj,"cfl_coefficient","coefficient applied to cfl condition"))
     31                string="%s\n\n%s"%(string,fielddisplay(self,"start_time","simulation starting time [yrs]"))
     32                string="%s\n%s"%(string,fielddisplay(self,"final_time","final time to stop the simulation [yrs]"))
     33                string="%s\n%s"%(string,fielddisplay(self,"time_step","length of time steps [yrs]"))
     34                string="%s\n%s"%(string,fielddisplay(self,"time_adapt","use cfl condition to define time step ? (0 or 1) "))
     35                string="%s\n%s"%(string,fielddisplay(self,"cfl_coefficient","coefficient applied to cfl condition"))
    2436                return string
    2537                #}}}
    2638               
    27         def setdefaultparameters(obj):
     39        def setdefaultparameters(self):
    2840                # {{{setdefaultparameters
    2941               
    3042                #time between 2 time steps
    31                 obj.time_step=1/2
     43                self.time_step=1/2
    3244
    3345                #final time
    34                 obj.final_time=10*obj.time_step
     46                self.final_time=10*self.time_step
    3547
    3648                #time adaptation?
    37                 obj.time_adapt=0
    38                 obj.cfl_coefficient=.5
     49                self.time_adapt=0
     50                self.cfl_coefficient=.5
    3951
    40                 return obj
     52                return self
    4153        #}}}
     54
     55        def checkconsistency(self,md,solution,analyses):    # {{{
     56
     57                md = checkfield(md,'timestepping.start_time','numel',[1],'NaN',1)
     58                md = checkfield(md,'timestepping.final_time','numel',[1],'NaN',1)
     59                md = checkfield(md,'timestepping.time_step','numel',[1],'>=',0,'NaN',1)
     60                md = checkfield(md,'timestepping.time_adapt','numel',[1],'values',[0,1])
     61                md = checkfield(md,'timestepping.cfl_coefficient','numel',[1],'>',0,'<=',1)
     62                if self.final_time-self.start_time<0:
     63                        md.checkmessage("timestepping.final_time should be larger than timestepping.start_time")
     64
     65                return md
     66        # }}}
     67
     68        def marshall(self,fid):    # {{{
     69                WriteData(fid,'object',self,'fieldname','start_time','format','Double')
     70                WriteData(fid,'object',self,'fieldname','final_time','format','Double')
     71                WriteData(fid,'object',self,'fieldname','time_step','format','Double')
     72                WriteData(fid,'object',self,'fieldname','time_adapt','format','Boolean')
     73                WriteData(fid,'object',self,'fieldname','cfl_coefficient','format','Double')
     74        # }}}
     75
  • issm/branches/trunk-jpl-damage/src/m/classes/transient.m

    r12878 r13101  
    3333
    3434                        %Early return
    35                         if solution~=TransientSolutionEnum, return; end
     35                        if solution~=TransientSolutionEnum(), return; end
    3636
    37                         md = checkfield(md,'transient.isprognostic','numel',1,'values',[0 1]);
    38                         md = checkfield(md,'transient.isdiagnostic','numel',1,'values',[0 1]);
    39                         md = checkfield(md,'transient.isthermal','numel',1,'values',[0 1]);
    40                         md = checkfield(md,'transient.isgroundingline','numel',1,'values',[0 1]);
     37                        md = checkfield(md,'transient.isprognostic','numel',[1],'values',[0 1]);
     38                        md = checkfield(md,'transient.isdiagnostic','numel',[1],'values',[0 1]);
     39                        md = checkfield(md,'transient.isthermal','numel',[1],'values',[0 1]);
     40                        md = checkfield(md,'transient.isgroundingline','numel',[1],'values',[0 1]);
    4141                        md = checkfield(md,'transient.requested_outputs','size',[NaN 1]);
    4242
  • issm/branches/trunk-jpl-damage/src/m/classes/transient.py

    r12168 r13101  
    11#module imports
    22from fielddisplay import fielddisplay
     3from EnumDefinitions import *
     4from checkfield import *
     5from WriteData import *
    36
    4 class transient:
     7class transient(object):
     8        """
     9        TRANSIENT class definition
     10
     11           Usage:
     12              transient=transient();
     13        """
     14
    515        #properties
    616        def __init__(self):
     
    1626
    1727                #}}}
    18         def __repr__(obj):
     28        def __repr__(self):
    1929                # {{{ Display
    2030                string='   transient solution parameters:'
    21                 string="%s\n%s"%(string,fielddisplay(obj,'isprognostic','indicates if a prognostic solution is used in the transient'))
    22                 string="%s\n%s"%(string,fielddisplay(obj,'isthermal','indicates if a thermal solution is used in the transient'))
    23                 string="%s\n%s"%(string,fielddisplay(obj,'isdiagnostic','indicates if a diagnostic solution is used in the transient'))
    24                 string="%s\n%s"%(string,fielddisplay(obj,'isgroundingline','indicates if a groundingline migration is used in the transient'))
    25                 string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','list of additional outputs requested'))
     31                string="%s\n%s"%(string,fielddisplay(self,'isprognostic','indicates if a prognostic solution is used in the transient'))
     32                string="%s\n%s"%(string,fielddisplay(self,'isthermal','indicates if a thermal solution is used in the transient'))
     33                string="%s\n%s"%(string,fielddisplay(self,'isdiagnostic','indicates if a diagnostic solution is used in the transient'))
     34                string="%s\n%s"%(string,fielddisplay(self,'isgroundingline','indicates if a groundingline migration is used in the transient'))
     35                string="%s\n%s"%(string,fielddisplay(self,'requested_outputs','list of additional outputs requested'))
    2636                return string
    2737                #}}}
    2838               
    29         def setdefaultparameters(obj):
     39        def setdefaultparameters(self):
    3040                # {{{setdefaultparameters
    3141               
    3242                #full analysis: Diagnostic, Prognostic and Thermal but no groundingline migration for now
    33                 obj.isprognostic=1
    34                 obj.isdiagnostic=1
    35                 obj.isthermal=1
    36                 obj.isgroundingline=0
     43                self.isprognostic=1
     44                self.isdiagnostic=1
     45                self.isthermal=1
     46                self.isgroundingline=0
    3747
    38                 return obj
     48                return self
    3949        #}}}
    4050
     51        def checkconsistency(self,md,solution,analyses):    # {{{
     52
     53                #Early return
     54                if not solution==TransientSolutionEnum():
     55                        return md
     56
     57                md = checkfield(md,'transient.isprognostic','numel',[1],'values',[0,1])
     58                md = checkfield(md,'transient.isdiagnostic','numel',[1],'values',[0,1])
     59                md = checkfield(md,'transient.isthermal','numel',[1],'values',[0,1])
     60                md = checkfield(md,'transient.isgroundingline','numel',[1],'values',[0,1])
     61                md = checkfield(md,'transient.requested_outputs','size',[float('NaN')])
     62
     63
     64                return md
     65        # }}}
     66
     67        def marshall(self,fid):    # {{{
     68                WriteData(fid,'object',self,'fieldname','isprognostic','format','Boolean')
     69                WriteData(fid,'object',self,'fieldname','isdiagnostic','format','Boolean')
     70                WriteData(fid,'object',self,'fieldname','isthermal','format','Boolean')
     71                WriteData(fid,'object',self,'fieldname','isgroundingline','format','Boolean')
     72                WriteData(fid,'object',self,'fieldname','requested_outputs','format','DoubleMat','mattype',3)
     73        # }}}
     74
  • issm/branches/trunk-jpl-damage/src/m/classes/verbose.m

    r12946 r13101  
    120120                %}}}
    121121                function marshall(obj,fid) % {{{
    122                         WriteData(fid,'data',VerboseToBinary(obj),'enum',VerboseEnum,'format','Integer');
     122                        WriteData(fid,'data',VerboseToBinary(obj),'enum',VerboseEnum(),'format','Integer');
    123123                end % }}}
    124124        end
  • issm/branches/trunk-jpl-damage/src/m/classes/verbose.py

    r12946 r13101  
    11from pairoptions import *
    22from MatlabFuncs import *
     3from EnumDefinitions import *
    34from WriteData import *
    4 from EnumDefinitions import *
    55
    66class verbose(object):
     
    4444                elif len(args) == 1:
    4545                        binary=args[0]
    46                         if   isinstance(binary,str):
     46                        if   isinstance(binary,(str,unicode)):
    4747                                if strcmpi(binary,'all'):
    4848                                        binary=2**11-1    #all ones
     
    5252                                        binary=int(binary,2)
    5353                                        self.BinaryToVerbose(binary)
    54                         elif isinstance(binary,(int,float)):
     54                        elif isinstance(binary,(int,long,float)):
    5555                                self.BinaryToVerbose(int(binary))
    5656
     
    6262                        listproperties=vars(self)
    6363                        for [fieldname,fieldvalue] in listproperties.iteritems():
    64                                 if isinstance(fieldvalue,bool) or isinstance(fieldvalue,(int,float)):
     64                                if isinstance(fieldvalue,bool) or isinstance(fieldvalue,(int,long,float)):
    6565                                        setattr(self,fieldname,bool(fieldvalue))
    6666                                else:
     
    125125
    126126        def marshall(self,fid):    # {{{
    127                         WriteData(fid,'data',VerboseToBinary(self),'enum',VerboseEnum,'format','Integer')
     127                        WriteData(fid,'data',self.VerboseToBinary(),'enum',VerboseEnum(),'format','Integer')
    128128        # }}}
    129129
  • issm/branches/trunk-jpl-damage/src/m/enum/EnumDefinitions.py

    r12947 r13101  
     1from StringToEnum import StringToEnum
     2
    13"""
    24
     
    79"""
    810
    9 def AutodiffForwardEnum():
    10         """
    11         AUTODIFFFORWARDENUM - Enum of AutodiffForward
    12 
    13            Usage:
    14               macro=AutodiffForwardEnum()
    15         """
    16 
    17         return StringToEnum('AutodiffForward')
    18 
    1911def AutodiffIsautodiffEnum():
    2012        """
     
    2517        """
    2618
    27         return StringToEnum('AutodiffIsautodiff')
    28 
    29 def AutodiffReverseEnum():
    30         """
    31         AUTODIFFREVERSEENUM - Enum of AutodiffReverse
    32 
    33            Usage:
    34               macro=AutodiffReverseEnum()
    35         """
    36 
    37         return StringToEnum('AutodiffReverse')
     19        return StringToEnum('AutodiffIsautodiff')[0]
    3820
    3921def BalancethicknessSpcthicknessEnum():
     
    4527        """
    4628
    47         return StringToEnum('BalancethicknessSpcthickness')
     29        return StringToEnum('BalancethicknessSpcthickness')[0]
    4830
    4931def BalancethicknessStabilizationEnum():
     
    5537        """
    5638
    57         return StringToEnum('BalancethicknessStabilization')
     39        return StringToEnum('BalancethicknessStabilization')[0]
    5840
    5941def BalancethicknessThickeningRateEnum():
     
    6547        """
    6648
    67         return StringToEnum('BalancethicknessThickeningRate')
     49        return StringToEnum('BalancethicknessThickeningRate')[0]
    6850
    6951def BasalforcingsGeothermalfluxEnum():
     
    7557        """
    7658
    77         return StringToEnum('BasalforcingsGeothermalflux')
     59        return StringToEnum('BasalforcingsGeothermalflux')[0]
    7860
    7961def BasalforcingsMeltingRateCorrectionEnum():
     
    8567        """
    8668
    87         return StringToEnum('BasalforcingsMeltingRateCorrection')
     69        return StringToEnum('BasalforcingsMeltingRateCorrection')[0]
    8870
    8971def BasalforcingsMeltingRateEnum():
     
    9577        """
    9678
    97         return StringToEnum('BasalforcingsMeltingRate')
     79        return StringToEnum('BasalforcingsMeltingRate')[0]
    9880
    9981def BathymetryEnum():
     
    10587        """
    10688
    107         return StringToEnum('Bathymetry')
     89        return StringToEnum('Bathymetry')[0]
    10890
    10991def BedEnum():
     
    11597        """
    11698
    117         return StringToEnum('Bed')
     99        return StringToEnum('Bed')[0]
    118100
    119101def ConstantsGEnum():
     
    125107        """
    126108
    127         return StringToEnum('ConstantsG')
     109        return StringToEnum('ConstantsG')[0]
    128110
    129111def ConstantsReferencetemperatureEnum():
     
    135117        """
    136118
    137         return StringToEnum('ConstantsReferencetemperature')
     119        return StringToEnum('ConstantsReferencetemperature')[0]
    138120
    139121def ConstantsYtsEnum():
     
    145127        """
    146128
    147         return StringToEnum('ConstantsYts')
     129        return StringToEnum('ConstantsYts')[0]
    148130
    149131def DiagnosticAbstolEnum():
     
    155137        """
    156138
    157         return StringToEnum('DiagnosticAbstol')
     139        return StringToEnum('DiagnosticAbstol')[0]
    158140
    159141def DiagnosticIcefrontEnum():
     
    165147        """
    166148
    167         return StringToEnum('DiagnosticIcefront')
     149        return StringToEnum('DiagnosticIcefront')[0]
    168150
    169151def DiagnosticIsnewtonEnum():
     
    175157        """
    176158
    177         return StringToEnum('DiagnosticIsnewton')
     159        return StringToEnum('DiagnosticIsnewton')[0]
    178160
    179161def DiagnosticMaxiterEnum():
     
    185167        """
    186168
    187         return StringToEnum('DiagnosticMaxiter')
     169        return StringToEnum('DiagnosticMaxiter')[0]
    188170
    189171def DiagnosticNumRequestedOutputsEnum():
     
    195177        """
    196178
    197         return StringToEnum('DiagnosticNumRequestedOutputs')
     179        return StringToEnum('DiagnosticNumRequestedOutputs')[0]
    198180
    199181def DiagnosticPenaltyFactorEnum():
     
    205187        """
    206188
    207         return StringToEnum('DiagnosticPenaltyFactor')
     189        return StringToEnum('DiagnosticPenaltyFactor')[0]
    208190
    209191def DiagnosticReferentialEnum():
     
    215197        """
    216198
    217         return StringToEnum('DiagnosticReferential')
     199        return StringToEnum('DiagnosticReferential')[0]
    218200
    219201def DiagnosticReltolEnum():
     
    225207        """
    226208
    227         return StringToEnum('DiagnosticReltol')
     209        return StringToEnum('DiagnosticReltol')[0]
    228210
    229211def DiagnosticRequestedOutputsEnum():
     
    235217        """
    236218
    237         return StringToEnum('DiagnosticRequestedOutputs')
     219        return StringToEnum('DiagnosticRequestedOutputs')[0]
    238220
    239221def DiagnosticRestolEnum():
     
    245227        """
    246228
    247         return StringToEnum('DiagnosticRestol')
     229        return StringToEnum('DiagnosticRestol')[0]
    248230
    249231def DiagnosticRiftPenaltyLockEnum():
     
    255237        """
    256238
    257         return StringToEnum('DiagnosticRiftPenaltyLock')
     239        return StringToEnum('DiagnosticRiftPenaltyLock')[0]
    258240
    259241def DiagnosticRiftPenaltyThresholdEnum():
     
    265247        """
    266248
    267         return StringToEnum('DiagnosticRiftPenaltyThreshold')
     249        return StringToEnum('DiagnosticRiftPenaltyThreshold')[0]
    268250
    269251def DiagnosticShelfDampeningEnum():
     
    275257        """
    276258
    277         return StringToEnum('DiagnosticShelfDampening')
     259        return StringToEnum('DiagnosticShelfDampening')[0]
    278260
    279261def DiagnosticSpcvxEnum():
     
    285267        """
    286268
    287         return StringToEnum('DiagnosticSpcvx')
     269        return StringToEnum('DiagnosticSpcvx')[0]
    288270
    289271def DiagnosticSpcvyEnum():
     
    295277        """
    296278
    297         return StringToEnum('DiagnosticSpcvy')
     279        return StringToEnum('DiagnosticSpcvy')[0]
    298280
    299281def DiagnosticSpcvzEnum():
     
    305287        """
    306288
    307         return StringToEnum('DiagnosticSpcvz')
     289        return StringToEnum('DiagnosticSpcvz')[0]
    308290
    309291def DiagnosticStokesreconditioningEnum():
     
    315297        """
    316298
    317         return StringToEnum('DiagnosticStokesreconditioning')
     299        return StringToEnum('DiagnosticStokesreconditioning')[0]
    318300
    319301def DiagnosticVertexPairingEnum():
     
    325307        """
    326308
    327         return StringToEnum('DiagnosticVertexPairing')
     309        return StringToEnum('DiagnosticVertexPairing')[0]
    328310
    329311def DiagnosticViscosityOvershootEnum():
     
    335317        """
    336318
    337         return StringToEnum('DiagnosticViscosityOvershoot')
     319        return StringToEnum('DiagnosticViscosityOvershoot')[0]
    338320
    339321def FlowequationBordermacayealEnum():
     
    345327        """
    346328
    347         return StringToEnum('FlowequationBordermacayeal')
     329        return StringToEnum('FlowequationBordermacayeal')[0]
    348330
    349331def FlowequationBorderpattynEnum():
     
    355337        """
    356338
    357         return StringToEnum('FlowequationBorderpattyn')
     339        return StringToEnum('FlowequationBorderpattyn')[0]
    358340
    359341def FlowequationBorderstokesEnum():
     
    365347        """
    366348
    367         return StringToEnum('FlowequationBorderstokes')
     349        return StringToEnum('FlowequationBorderstokes')[0]
    368350
    369351def FlowequationElementEquationEnum():
     
    375357        """
    376358
    377         return StringToEnum('FlowequationElementEquation')
     359        return StringToEnum('FlowequationElementEquation')[0]
    378360
    379361def FlowequationIshutterEnum():
     
    385367        """
    386368
    387         return StringToEnum('FlowequationIshutter')
     369        return StringToEnum('FlowequationIshutter')[0]
     370
     371def FlowequationIsl1l2Enum():
     372        """
     373        FLOWEQUATIONISL1L2ENUM - Enum of FlowequationIsl1l2
     374
     375           Usage:
     376              macro=FlowequationIsl1l2Enum()
     377        """
     378
     379        return StringToEnum('FlowequationIsl1l2')[0]
    388380
    389381def FlowequationIsmacayealpattynEnum():
     
    395387        """
    396388
    397         return StringToEnum('FlowequationIsmacayealpattyn')
     389        return StringToEnum('FlowequationIsmacayealpattyn')[0]
    398390
    399391def FlowequationIsstokesEnum():
     
    405397        """
    406398
    407         return StringToEnum('FlowequationIsstokes')
     399        return StringToEnum('FlowequationIsstokes')[0]
    408400
    409401def FlowequationVertexEquationEnum():
     
    415407        """
    416408
    417         return StringToEnum('FlowequationVertexEquation')
     409        return StringToEnum('FlowequationVertexEquation')[0]
    418410
    419411def FrictionCoefficientEnum():
     
    425417        """
    426418
    427         return StringToEnum('FrictionCoefficient')
     419        return StringToEnum('FrictionCoefficient')[0]
    428420
    429421def FrictionPEnum():
     
    435427        """
    436428
    437         return StringToEnum('FrictionP')
     429        return StringToEnum('FrictionP')[0]
    438430
    439431def FrictionQEnum():
     
    445437        """
    446438
    447         return StringToEnum('FrictionQ')
     439        return StringToEnum('FrictionQ')[0]
    448440
    449441def GeometryHydrostaticRatioEnum():
     
    455447        """
    456448
    457         return StringToEnum('GeometryHydrostaticRatio')
     449        return StringToEnum('GeometryHydrostaticRatio')[0]
    458450
    459451def HydrologyCREnum():
     
    465457        """
    466458
    467         return StringToEnum('HydrologyCR')
     459        return StringToEnum('HydrologyCR')[0]
    468460
    469461def HydrologyKnEnum():
     
    475467        """
    476468
    477         return StringToEnum('HydrologyKn')
     469        return StringToEnum('HydrologyKn')[0]
    478470
    479471def HydrologyNEnum():
     
    485477        """
    486478
    487         return StringToEnum('HydrologyN')
     479        return StringToEnum('HydrologyN')[0]
    488480
    489481def HydrologyPEnum():
     
    495487        """
    496488
    497         return StringToEnum('HydrologyP')
     489        return StringToEnum('HydrologyP')[0]
    498490
    499491def HydrologyQEnum():
     
    505497        """
    506498
    507         return StringToEnum('HydrologyQ')
     499        return StringToEnum('HydrologyQ')[0]
    508500
    509501def HydrologySpcwatercolumnEnum():
     
    515507        """
    516508
    517         return StringToEnum('HydrologySpcwatercolumn')
     509        return StringToEnum('HydrologySpcwatercolumn')[0]
    518510
    519511def HydrologyStabilizationEnum():
     
    525517        """
    526518
    527         return StringToEnum('HydrologyStabilization')
     519        return StringToEnum('HydrologyStabilization')[0]
    528520
    529521def InversionControlParametersEnum():
     
    535527        """
    536528
    537         return StringToEnum('InversionControlParameters')
     529        return StringToEnum('InversionControlParameters')[0]
    538530
    539531def InversionCostFunctionEnum():
     
    545537        """
    546538
    547         return StringToEnum('InversionCostFunction')
     539        return StringToEnum('InversionCostFunction')[0]
    548540
    549541def InversionCostFunctionThresholdEnum():
     
    555547        """
    556548
    557         return StringToEnum('InversionCostFunctionThreshold')
     549        return StringToEnum('InversionCostFunctionThreshold')[0]
    558550
    559551def InversionCostFunctionsCoefficientsEnum():
     
    565557        """
    566558
    567         return StringToEnum('InversionCostFunctionsCoefficients')
     559        return StringToEnum('InversionCostFunctionsCoefficients')[0]
    568560
    569561def InversionCostFunctionsEnum():
     
    575567        """
    576568
    577         return StringToEnum('InversionCostFunctions')
     569        return StringToEnum('InversionCostFunctions')[0]
    578570
    579571def InversionGradientOnlyEnum():
     
    585577        """
    586578
    587         return StringToEnum('InversionGradientOnly')
     579        return StringToEnum('InversionGradientOnly')[0]
    588580
    589581def InversionGradientScalingEnum():
     
    595587        """
    596588
    597         return StringToEnum('InversionGradientScaling')
     589        return StringToEnum('InversionGradientScaling')[0]
    598590
    599591def InversionIscontrolEnum():
     
    605597        """
    606598
    607         return StringToEnum('InversionIscontrol')
     599        return StringToEnum('InversionIscontrol')[0]
    608600
    609601def InversionTaoEnum():
     
    615607        """
    616608
    617         return StringToEnum('InversionTao')
     609        return StringToEnum('InversionTao')[0]
    618610
    619611def InversionIncompleteAdjointEnum():
     
    625617        """
    626618
    627         return StringToEnum('InversionIncompleteAdjoint')
     619        return StringToEnum('InversionIncompleteAdjoint')[0]
    628620
    629621def InversionMaxParametersEnum():
     
    635627        """
    636628
    637         return StringToEnum('InversionMaxParameters')
     629        return StringToEnum('InversionMaxParameters')[0]
    638630
    639631def InversionMaxiterPerStepEnum():
     
    645637        """
    646638
    647         return StringToEnum('InversionMaxiterPerStep')
     639        return StringToEnum('InversionMaxiterPerStep')[0]
    648640
    649641def InversionMinParametersEnum():
     
    655647        """
    656648
    657         return StringToEnum('InversionMinParameters')
     649        return StringToEnum('InversionMinParameters')[0]
    658650
    659651def InversionNstepsEnum():
     
    665657        """
    666658
    667         return StringToEnum('InversionNsteps')
     659        return StringToEnum('InversionNsteps')[0]
    668660
    669661def InversionNumControlParametersEnum():
     
    675667        """
    676668
    677         return StringToEnum('InversionNumControlParameters')
     669        return StringToEnum('InversionNumControlParameters')[0]
    678670
    679671def InversionNumCostFunctionsEnum():
     
    685677        """
    686678
    687         return StringToEnum('InversionNumCostFunctions')
     679        return StringToEnum('InversionNumCostFunctions')[0]
    688680
    689681def InversionStepThresholdEnum():
     
    695687        """
    696688
    697         return StringToEnum('InversionStepThreshold')
     689        return StringToEnum('InversionStepThreshold')[0]
    698690
    699691def InversionThicknessObsEnum():
     
    705697        """
    706698
    707         return StringToEnum('InversionThicknessObs')
     699        return StringToEnum('InversionThicknessObs')[0]
    708700
    709701def InversionVelObsEnum():
     
    715707        """
    716708
    717         return StringToEnum('InversionVelObs')
     709        return StringToEnum('InversionVelObs')[0]
    718710
    719711def InversionVxObsEnum():
     
    725717        """
    726718
    727         return StringToEnum('InversionVxObs')
     719        return StringToEnum('InversionVxObs')[0]
    728720
    729721def InversionVyObsEnum():
     
    735727        """
    736728
    737         return StringToEnum('InversionVyObs')
     729        return StringToEnum('InversionVyObs')[0]
    738730
    739731def InversionVzObsEnum():
     
    745737        """
    746738
    747         return StringToEnum('InversionVzObs')
     739        return StringToEnum('InversionVzObs')[0]
    748740
    749741def MaskElementonfloatingiceEnum():
     
    755747        """
    756748
    757         return StringToEnum('MaskElementonfloatingice')
     749        return StringToEnum('MaskElementonfloatingice')[0]
    758750
    759751def MaskElementongroundediceEnum():
     
    765757        """
    766758
    767         return StringToEnum('MaskElementongroundedice')
     759        return StringToEnum('MaskElementongroundedice')[0]
    768760
    769761def MaskElementonwaterEnum():
     
    775767        """
    776768
    777         return StringToEnum('MaskElementonwater')
     769        return StringToEnum('MaskElementonwater')[0]
    778770
    779771def MaskVertexonfloatingiceEnum():
     
    785777        """
    786778
    787         return StringToEnum('MaskVertexonfloatingice')
     779        return StringToEnum('MaskVertexonfloatingice')[0]
    788780
    789781def MaskVertexongroundediceEnum():
     
    795787        """
    796788
    797         return StringToEnum('MaskVertexongroundedice')
     789        return StringToEnum('MaskVertexongroundedice')[0]
    798790
    799791def MaskVertexonwaterEnum():
     
    805797        """
    806798
    807         return StringToEnum('MaskVertexonwater')
     799        return StringToEnum('MaskVertexonwater')[0]
    808800
    809801def MaterialsBetaEnum():
     
    815807        """
    816808
    817         return StringToEnum('MaterialsBeta')
     809        return StringToEnum('MaterialsBeta')[0]
    818810
    819811def MaterialsHeatcapacityEnum():
     
    825817        """
    826818
    827         return StringToEnum('MaterialsHeatcapacity')
     819        return StringToEnum('MaterialsHeatcapacity')[0]
    828820
    829821def MaterialsLatentheatEnum():
     
    835827        """
    836828
    837         return StringToEnum('MaterialsLatentheat')
     829        return StringToEnum('MaterialsLatentheat')[0]
    838830
    839831def MaterialsMeltingpointEnum():
     
    845837        """
    846838
    847         return StringToEnum('MaterialsMeltingpoint')
     839        return StringToEnum('MaterialsMeltingpoint')[0]
    848840
    849841def MaterialsMixedLayerCapacityEnum():
     
    855847        """
    856848
    857         return StringToEnum('MaterialsMixedLayerCapacity')
     849        return StringToEnum('MaterialsMixedLayerCapacity')[0]
    858850
    859851def MaterialsRheologyBEnum():
     
    865857        """
    866858
    867         return StringToEnum('MaterialsRheologyB')
     859        return StringToEnum('MaterialsRheologyB')[0]
    868860
    869861def MaterialsRheologyBbarEnum():
     
    875867        """
    876868
    877         return StringToEnum('MaterialsRheologyBbar')
     869        return StringToEnum('MaterialsRheologyBbar')[0]
    878870
    879871def MaterialsRheologyLawEnum():
     
    885877        """
    886878
    887         return StringToEnum('MaterialsRheologyLaw')
     879        return StringToEnum('MaterialsRheologyLaw')[0]
    888880
    889881def MaterialsRheologyNEnum():
     
    895887        """
    896888
    897         return StringToEnum('MaterialsRheologyN')
     889        return StringToEnum('MaterialsRheologyN')[0]
    898890
    899891def MaterialsRheologyZEnum():
     
    905897        """
    906898
    907         return StringToEnum('MaterialsRheologyZ')
     899        return StringToEnum('MaterialsRheologyZ')[0]
    908900
    909901def MaterialsRheologyZbarEnum():
     
    915907        """
    916908
    917         return StringToEnum('MaterialsRheologyZbar')
     909        return StringToEnum('MaterialsRheologyZbar')[0]
    918910
    919911def MaterialsRhoIceEnum():
     
    925917        """
    926918
    927         return StringToEnum('MaterialsRhoIce')
     919        return StringToEnum('MaterialsRhoIce')[0]
    928920
    929921def MaterialsRhoWaterEnum():
     
    935927        """
    936928
    937         return StringToEnum('MaterialsRhoWater')
     929        return StringToEnum('MaterialsRhoWater')[0]
    938930
    939931def MaterialsRhoFreshwaterEnum():
     
    945937        """
    946938
    947         return StringToEnum('MaterialsRhoFreshwater')
     939        return StringToEnum('MaterialsRhoFreshwater')[0]
    948940
    949941def MaterialsMuWaterEnum():
     
    955947        """
    956948
    957         return StringToEnum('MaterialsMuWater')
     949        return StringToEnum('MaterialsMuWater')[0]
    958950
    959951def MaterialsThermalExchangeVelocityEnum():
     
    965957        """
    966958
    967         return StringToEnum('MaterialsThermalExchangeVelocity')
     959        return StringToEnum('MaterialsThermalExchangeVelocity')[0]
    968960
    969961def MaterialsThermalconductivityEnum():
     
    975967        """
    976968
    977         return StringToEnum('MaterialsThermalconductivity')
     969        return StringToEnum('MaterialsThermalconductivity')[0]
    978970
    979971def MeshAverageVertexConnectivityEnum():
     
    985977        """
    986978
    987         return StringToEnum('MeshAverageVertexConnectivity')
     979        return StringToEnum('MeshAverageVertexConnectivity')[0]
    988980
    989981def MeshDimensionEnum():
     
    995987        """
    996988
    997         return StringToEnum('MeshDimension')
     989        return StringToEnum('MeshDimension')[0]
    998990
    999991def MeshEdgesEnum():
     
    1005997        """
    1006998
    1007         return StringToEnum('MeshEdges')
     999        return StringToEnum('MeshEdges')[0]
    10081000
    10091001def MeshElementconnectivityEnum():
     
    10151007        """
    10161008
    1017         return StringToEnum('MeshElementconnectivity')
     1009        return StringToEnum('MeshElementconnectivity')[0]
    10181010
    10191011def MeshElementonbedEnum():
     
    10251017        """
    10261018
    1027         return StringToEnum('MeshElementonbed')
     1019        return StringToEnum('MeshElementonbed')[0]
    10281020
    10291021def MeshElementonsurfaceEnum():
     
    10351027        """
    10361028
    1037         return StringToEnum('MeshElementonsurface')
     1029        return StringToEnum('MeshElementonsurface')[0]
    10381030
    10391031def MeshElements2dEnum():
     
    10451037        """
    10461038
    1047         return StringToEnum('MeshElements2d')
     1039        return StringToEnum('MeshElements2d')[0]
    10481040
    10491041def MeshElementsEnum():
     
    10551047        """
    10561048
    1057         return StringToEnum('MeshElements')
     1049        return StringToEnum('MeshElements')[0]
    10581050
    10591051def MeshLowerelementsEnum():
     
    10651057        """
    10661058
    1067         return StringToEnum('MeshLowerelements')
     1059        return StringToEnum('MeshLowerelements')[0]
    10681060
    10691061def MeshNumberofedgesEnum():
     
    10751067        """
    10761068
    1077         return StringToEnum('MeshNumberofedges')
     1069        return StringToEnum('MeshNumberofedges')[0]
    10781070
    10791071def MeshNumberofelements2dEnum():
     
    10851077        """
    10861078
    1087         return StringToEnum('MeshNumberofelements2d')
     1079        return StringToEnum('MeshNumberofelements2d')[0]
    10881080
    10891081def MeshNumberofelementsEnum():
     
    10951087        """
    10961088
    1097         return StringToEnum('MeshNumberofelements')
     1089        return StringToEnum('MeshNumberofelements')[0]
    10981090
    10991091def MeshNumberoflayersEnum():
     
    11051097        """
    11061098
    1107         return StringToEnum('MeshNumberoflayers')
     1099        return StringToEnum('MeshNumberoflayers')[0]
    11081100
    11091101def MeshNumberofvertices2dEnum():
     
    11151107        """
    11161108
    1117         return StringToEnum('MeshNumberofvertices2d')
     1109        return StringToEnum('MeshNumberofvertices2d')[0]
    11181110
    11191111def MeshNumberofverticesEnum():
     
    11251117        """
    11261118
    1127         return StringToEnum('MeshNumberofvertices')
     1119        return StringToEnum('MeshNumberofvertices')[0]
    11281120
    11291121def MeshUpperelementsEnum():
     
    11351127        """
    11361128
    1137         return StringToEnum('MeshUpperelements')
     1129        return StringToEnum('MeshUpperelements')[0]
    11381130
    11391131def MeshVertexonbedEnum():
     
    11451137        """
    11461138
    1147         return StringToEnum('MeshVertexonbed')
     1139        return StringToEnum('MeshVertexonbed')[0]
    11481140
    11491141def MeshVertexonsurfaceEnum():
     
    11551147        """
    11561148
    1157         return StringToEnum('MeshVertexonsurface')
     1149        return StringToEnum('MeshVertexonsurface')[0]
    11581150
    11591151def MeshXEnum():
     
    11651157        """
    11661158
    1167         return StringToEnum('MeshX')
     1159        return StringToEnum('MeshX')[0]
    11681160
    11691161def MeshYEnum():
     
    11751167        """
    11761168
    1177         return StringToEnum('MeshY')
     1169        return StringToEnum('MeshY')[0]
    11781170
    11791171def MeshZEnum():
     
    11851177        """
    11861178
    1187         return StringToEnum('MeshZ')
     1179        return StringToEnum('MeshZ')[0]
    11881180
    11891181def MiscellaneousNameEnum():
     
    11951187        """
    11961188
    1197         return StringToEnum('MiscellaneousName')
     1189        return StringToEnum('MiscellaneousName')[0]
    11981190
    11991191def PrognosticHydrostaticAdjustmentEnum():
     
    12051197        """
    12061198
    1207         return StringToEnum('PrognosticHydrostaticAdjustment')
     1199        return StringToEnum('PrognosticHydrostaticAdjustment')[0]
    12081200
    12091201def PrognosticMinThicknessEnum():
     
    12151207        """
    12161208
    1217         return StringToEnum('PrognosticMinThickness')
     1209        return StringToEnum('PrognosticMinThickness')[0]
    12181210
    12191211def PrognosticPenaltyFactorEnum():
     
    12251217        """
    12261218
    1227         return StringToEnum('PrognosticPenaltyFactor')
     1219        return StringToEnum('PrognosticPenaltyFactor')[0]
    12281220
    12291221def PrognosticSpcthicknessEnum():
     
    12351227        """
    12361228
    1237         return StringToEnum('PrognosticSpcthickness')
     1229        return StringToEnum('PrognosticSpcthickness')[0]
    12381230
    12391231def PrognosticStabilizationEnum():
     
    12451237        """
    12461238
    1247         return StringToEnum('PrognosticStabilization')
     1239        return StringToEnum('PrognosticStabilization')[0]
    12481240
    12491241def PrognosticVertexPairingEnum():
     
    12551247        """
    12561248
    1257         return StringToEnum('PrognosticVertexPairing')
     1249        return StringToEnum('PrognosticVertexPairing')[0]
    12581250
    12591251def QmuIsdakotaEnum():
     
    12651257        """
    12661258
    1267         return StringToEnum('QmuIsdakota')
     1259        return StringToEnum('QmuIsdakota')[0]
    12681260
    12691261def QmuMassFluxSegmentsEnum():
     
    12751267        """
    12761268
    1277         return StringToEnum('QmuMassFluxSegments')
     1269        return StringToEnum('QmuMassFluxSegments')[0]
    12781270
    12791271def QmuNumberofpartitionsEnum():
     
    12851277        """
    12861278
    1287         return StringToEnum('QmuNumberofpartitions')
     1279        return StringToEnum('QmuNumberofpartitions')[0]
    12881280
    12891281def QmuNumberofresponsesEnum():
     
    12951287        """
    12961288
    1297         return StringToEnum('QmuNumberofresponses')
     1289        return StringToEnum('QmuNumberofresponses')[0]
    12981290
    12991291def QmuPartitionEnum():
     
    13051297        """
    13061298
    1307         return StringToEnum('QmuPartition')
     1299        return StringToEnum('QmuPartition')[0]
    13081300
    13091301def QmuResponsedescriptorsEnum():
     
    13151307        """
    13161308
    1317         return StringToEnum('QmuResponsedescriptors')
     1309        return StringToEnum('QmuResponsedescriptors')[0]
    13181310
    13191311def QmuVariabledescriptorsEnum():
     
    13251317        """
    13261318
    1327         return StringToEnum('QmuVariabledescriptors')
     1319        return StringToEnum('QmuVariabledescriptors')[0]
    13281320
    13291321def RiftsNumriftsEnum():
     
    13351327        """
    13361328
    1337         return StringToEnum('RiftsNumrifts')
     1329        return StringToEnum('RiftsNumrifts')[0]
    13381330
    13391331def RiftsRiftstructEnum():
     
    13451337        """
    13461338
    1347         return StringToEnum('RiftsRiftstruct')
     1339        return StringToEnum('RiftsRiftstruct')[0]
    13481340
    13491341def SettingsIoGatherEnum():
     
    13551347        """
    13561348
    1357         return StringToEnum('SettingsIoGather')
     1349        return StringToEnum('SettingsIoGather')[0]
    13581350
    13591351def SettingsLowmemEnum():
     
    13651357        """
    13661358
    1367         return StringToEnum('SettingsLowmem')
     1359        return StringToEnum('SettingsLowmem')[0]
    13681360
    13691361def SettingsOutputFrequencyEnum():
     
    13751367        """
    13761368
    1377         return StringToEnum('SettingsOutputFrequency')
     1369        return StringToEnum('SettingsOutputFrequency')[0]
    13781370
    13791371def SettingsResultsAsPatchesEnum():
     
    13851377        """
    13861378
    1387         return StringToEnum('SettingsResultsAsPatches')
     1379        return StringToEnum('SettingsResultsAsPatches')[0]
    13881380
    13891381def SettingsWaitonlockEnum():
     
    13951387        """
    13961388
    1397         return StringToEnum('SettingsWaitonlock')
     1389        return StringToEnum('SettingsWaitonlock')[0]
    13981390
    13991391def SurfaceforcingsDelta18oEnum():
     
    14051397        """
    14061398
    1407         return StringToEnum('SurfaceforcingsDelta18o')
     1399        return StringToEnum('SurfaceforcingsDelta18o')[0]
    14081400
    14091401def SurfaceforcingsDelta18oSurfaceEnum():
     
    14151407        """
    14161408
    1417         return StringToEnum('SurfaceforcingsDelta18oSurface')
     1409        return StringToEnum('SurfaceforcingsDelta18oSurface')[0]
    14181410
    14191411def SurfaceforcingsIsdelta18oEnum():
     
    14251417        """
    14261418
    1427         return StringToEnum('SurfaceforcingsIsdelta18o')
     1419        return StringToEnum('SurfaceforcingsIsdelta18o')[0]
    14281420
    14291421def SurfaceforcingsPrecipitationsPresentdayEnum():
     
    14351427        """
    14361428
    1437         return StringToEnum('SurfaceforcingsPrecipitationsPresentday')
     1429        return StringToEnum('SurfaceforcingsPrecipitationsPresentday')[0]
    14381430
    14391431def SurfaceforcingsTemperaturesPresentdayEnum():
     
    14451437        """
    14461438
    1447         return StringToEnum('SurfaceforcingsTemperaturesPresentday')
     1439        return StringToEnum('SurfaceforcingsTemperaturesPresentday')[0]
    14481440
    14491441def SurfaceforcingsTemperaturesLgmEnum():
     
    14551447        """
    14561448
    1457         return StringToEnum('SurfaceforcingsTemperaturesLgm')
     1449        return StringToEnum('SurfaceforcingsTemperaturesLgm')[0]
    14581450
    14591451def DebugProfilingEnum():
     
    14651457        """
    14661458
    1467         return StringToEnum('DebugProfiling')
     1459        return StringToEnum('DebugProfiling')[0]
    14681460
    14691461def ProfilingCurrentMemEnum():
     
    14751467        """
    14761468
    1477         return StringToEnum('ProfilingCurrentMem')
     1469        return StringToEnum('ProfilingCurrentMem')[0]
    14781470
    14791471def ProfilingCurrentFlopsEnum():
     
    14851477        """
    14861478
    1487         return StringToEnum('ProfilingCurrentFlops')
     1479        return StringToEnum('ProfilingCurrentFlops')[0]
    14881480
    14891481def ProfilingSolutionTimeEnum():
     
    14951487        """
    14961488
    1497         return StringToEnum('ProfilingSolutionTime')
     1489        return StringToEnum('ProfilingSolutionTime')[0]
    14981490
    14991491def MaxIterationConvergenceFlagEnum():
     
    15051497        """
    15061498
    1507         return StringToEnum('MaxIterationConvergenceFlag')
     1499        return StringToEnum('MaxIterationConvergenceFlag')[0]
    15081500
    15091501def SteadystateMaxiterEnum():
     
    15151507        """
    15161508
    1517         return StringToEnum('SteadystateMaxiter')
     1509        return StringToEnum('SteadystateMaxiter')[0]
    15181510
    15191511def SteadystateNumRequestedOutputsEnum():
     
    15251517        """
    15261518
    1527         return StringToEnum('SteadystateNumRequestedOutputs')
     1519        return StringToEnum('SteadystateNumRequestedOutputs')[0]
    15281520
    15291521def SteadystateReltolEnum():
     
    15351527        """
    15361528
    1537         return StringToEnum('SteadystateReltol')
     1529        return StringToEnum('SteadystateReltol')[0]
    15381530
    15391531def SteadystateRequestedOutputsEnum():
     
    15451537        """
    15461538
    1547         return StringToEnum('SteadystateRequestedOutputs')
     1539        return StringToEnum('SteadystateRequestedOutputs')[0]
    15481540
    15491541def SurfaceEnum():
     
    15551547        """
    15561548
    1557         return StringToEnum('Surface')
     1549        return StringToEnum('Surface')[0]
    15581550
    15591551def SurfaceforcingsPrecipitationEnum():
     
    15651557        """
    15661558
    1567         return StringToEnum('SurfaceforcingsPrecipitation')
     1559        return StringToEnum('SurfaceforcingsPrecipitation')[0]
    15681560
    15691561def SurfaceforcingsMassBalanceEnum():
     
    15751567        """
    15761568
    1577         return StringToEnum('SurfaceforcingsMassBalance')
     1569        return StringToEnum('SurfaceforcingsMassBalance')[0]
    15781570
    15791571def SurfaceforcingsIspddEnum():
     
    15851577        """
    15861578
    1587         return StringToEnum('SurfaceforcingsIspdd')
     1579        return StringToEnum('SurfaceforcingsIspdd')[0]
    15881580
    15891581def SurfaceforcingsIssmbgradientsEnum():
     
    15951587        """
    15961588
    1597         return StringToEnum('SurfaceforcingsIssmbgradients')
     1589        return StringToEnum('SurfaceforcingsIssmbgradients')[0]
    15981590
    15991591def SurfaceforcingsMonthlytemperaturesEnum():
     
    16051597        """
    16061598
    1607         return StringToEnum('SurfaceforcingsMonthlytemperatures')
     1599        return StringToEnum('SurfaceforcingsMonthlytemperatures')[0]
    16081600
    16091601def SurfaceforcingsHcEnum():
     
    16151607        """
    16161608
    1617         return StringToEnum('SurfaceforcingsHc')
     1609        return StringToEnum('SurfaceforcingsHc')[0]
    16181610
    16191611def SurfaceforcingsSmbPosMaxEnum():
     
    16251617        """
    16261618
    1627         return StringToEnum('SurfaceforcingsSmbPosMax')
     1619        return StringToEnum('SurfaceforcingsSmbPosMax')[0]
    16281620
    16291621def SurfaceforcingsSmbPosMinEnum():
     
    16351627        """
    16361628
    1637         return StringToEnum('SurfaceforcingsSmbPosMin')
     1629        return StringToEnum('SurfaceforcingsSmbPosMin')[0]
    16381630
    16391631def SurfaceforcingsAPosEnum():
     
    16451637        """
    16461638
    1647         return StringToEnum('SurfaceforcingsAPos')
     1639        return StringToEnum('SurfaceforcingsAPos')[0]
    16481640
    16491641def SurfaceforcingsBPosEnum():
     
    16551647        """
    16561648
    1657         return StringToEnum('SurfaceforcingsBPos')
     1649        return StringToEnum('SurfaceforcingsBPos')[0]
    16581650
    16591651def SurfaceforcingsANegEnum():
     
    16651657        """
    16661658
    1667         return StringToEnum('SurfaceforcingsANeg')
     1659        return StringToEnum('SurfaceforcingsANeg')[0]
    16681660
    16691661def SurfaceforcingsBNegEnum():
     
    16751667        """
    16761668
    1677         return StringToEnum('SurfaceforcingsBNeg')
     1669        return StringToEnum('SurfaceforcingsBNeg')[0]
    16781670
    16791671def ThermalMaxiterEnum():
     
    16851677        """
    16861678
    1687         return StringToEnum('ThermalMaxiter')
     1679        return StringToEnum('ThermalMaxiter')[0]
    16881680
    16891681def ThermalPenaltyFactorEnum():
     
    16951687        """
    16961688
    1697         return StringToEnum('ThermalPenaltyFactor')
     1689        return StringToEnum('ThermalPenaltyFactor')[0]
    16981690
    16991691def ThermalPenaltyLockEnum():
     
    17051697        """
    17061698
    1707         return StringToEnum('ThermalPenaltyLock')
     1699        return StringToEnum('ThermalPenaltyLock')[0]
    17081700
    17091701def ThermalPenaltyThresholdEnum():
     
    17151707        """
    17161708
    1717         return StringToEnum('ThermalPenaltyThreshold')
     1709        return StringToEnum('ThermalPenaltyThreshold')[0]
    17181710
    17191711def ThermalSpctemperatureEnum():
     
    17251717        """
    17261718
    1727         return StringToEnum('ThermalSpctemperature')
     1719        return StringToEnum('ThermalSpctemperature')[0]
    17281720
    17291721def ThermalStabilizationEnum():
     
    17351727        """
    17361728
    1737         return StringToEnum('ThermalStabilization')
     1729        return StringToEnum('ThermalStabilization')[0]
    17381730
    17391731def ThermalIsenthalpyEnum():
     
    17451737        """
    17461738
    1747         return StringToEnum('ThermalIsenthalpy')
     1739        return StringToEnum('ThermalIsenthalpy')[0]
    17481740
    17491741def ThicknessEnum():
     
    17551747        """
    17561748
    1757         return StringToEnum('Thickness')
     1749        return StringToEnum('Thickness')[0]
    17581750
    17591751def TimesteppingStartTimeEnum():
     
    17651757        """
    17661758
    1767         return StringToEnum('TimesteppingStartTime')
     1759        return StringToEnum('TimesteppingStartTime')[0]
    17681760
    17691761def TimesteppingFinalTimeEnum():
     
    17751767        """
    17761768
    1777         return StringToEnum('TimesteppingFinalTime')
     1769        return StringToEnum('TimesteppingFinalTime')[0]
    17781770
    17791771def TimesteppingCflCoefficientEnum():
     
    17851777        """
    17861778
    1787         return StringToEnum('TimesteppingCflCoefficient')
     1779        return StringToEnum('TimesteppingCflCoefficient')[0]
    17881780
    17891781def TimesteppingTimeAdaptEnum():
     
    17951787        """
    17961788
    1797         return StringToEnum('TimesteppingTimeAdapt')
     1789        return StringToEnum('TimesteppingTimeAdapt')[0]
    17981790
    17991791def TimesteppingTimeStepEnum():
     
    18051797        """
    18061798
    1807         return StringToEnum('TimesteppingTimeStep')
     1799        return StringToEnum('TimesteppingTimeStep')[0]
    18081800
    18091801def TransientIsdiagnosticEnum():
     
    18151807        """
    18161808
    1817         return StringToEnum('TransientIsdiagnostic')
     1809        return StringToEnum('TransientIsdiagnostic')[0]
    18181810
    18191811def TransientIsgroundinglineEnum():
     
    18251817        """
    18261818
    1827         return StringToEnum('TransientIsgroundingline')
     1819        return StringToEnum('TransientIsgroundingline')[0]
    18281820
    18291821def TransientIsprognosticEnum():
     
    18351827        """
    18361828
    1837         return StringToEnum('TransientIsprognostic')
     1829        return StringToEnum('TransientIsprognostic')[0]
    18381830
    18391831def TransientIsthermalEnum():
     
    18451837        """
    18461838
    1847         return StringToEnum('TransientIsthermal')
     1839        return StringToEnum('TransientIsthermal')[0]
    18481840
    18491841def TransientNumRequestedOutputsEnum():
     
    18551847        """
    18561848
    1857         return StringToEnum('TransientNumRequestedOutputs')
     1849        return StringToEnum('TransientNumRequestedOutputs')[0]
    18581850
    18591851def TransientRequestedOutputsEnum():
     
    18651857        """
    18661858
    1867         return StringToEnum('TransientRequestedOutputs')
     1859        return StringToEnum('TransientRequestedOutputs')[0]
    18681860
    18691861def SolutionTypeEnum():
     
    18751867        """
    18761868
    1877         return StringToEnum('SolutionType')
     1869        return StringToEnum('SolutionType')[0]
    18781870
    18791871def AnalysisTypeEnum():
     
    18851877        """
    18861878
    1887         return StringToEnum('AnalysisType')
     1879        return StringToEnum('AnalysisType')[0]
    18881880
    18891881def ConfigurationTypeEnum():
     
    18951887        """
    18961888
    1897         return StringToEnum('ConfigurationType')
     1889        return StringToEnum('ConfigurationType')[0]
    18981890
    18991891def AdjointBalancethicknessAnalysisEnum():
     
    19051897        """
    19061898
    1907         return StringToEnum('AdjointBalancethicknessAnalysis')
     1899        return StringToEnum('AdjointBalancethicknessAnalysis')[0]
    19081900
    19091901def AdjointHorizAnalysisEnum():
     
    19151907        """
    19161908
    1917         return StringToEnum('AdjointHorizAnalysis')
     1909        return StringToEnum('AdjointHorizAnalysis')[0]
    19181910
    19191911def AdjointSolutionEnum():
     
    19251917        """
    19261918
    1927         return StringToEnum('AdjointSolution')
     1919        return StringToEnum('AdjointSolution')[0]
    19281920
    19291921def AnalysisCounterEnum():
     
    19351927        """
    19361928
    1937         return StringToEnum('AnalysisCounter')
     1929        return StringToEnum('AnalysisCounter')[0]
    19381930
    19391931def BalancethicknessAnalysisEnum():
     
    19451937        """
    19461938
    1947         return StringToEnum('BalancethicknessAnalysis')
     1939        return StringToEnum('BalancethicknessAnalysis')[0]
    19481940
    19491941def BalancethicknessSolutionEnum():
     
    19551947        """
    19561948
    1957         return StringToEnum('BalancethicknessSolution')
     1949        return StringToEnum('BalancethicknessSolution')[0]
    19581950
    19591951def BedSlopeAnalysisEnum():
     
    19651957        """
    19661958
    1967         return StringToEnum('BedSlopeAnalysis')
     1959        return StringToEnum('BedSlopeAnalysis')[0]
    19681960
    19691961def BedSlopeSolutionEnum():
     
    19751967        """
    19761968
    1977         return StringToEnum('BedSlopeSolution')
     1969        return StringToEnum('BedSlopeSolution')[0]
    19781970
    19791971def BedSlopeXAnalysisEnum():
     
    19851977        """
    19861978
    1987         return StringToEnum('BedSlopeXAnalysis')
     1979        return StringToEnum('BedSlopeXAnalysis')[0]
    19881980
    19891981def BedSlopeYAnalysisEnum():
     
    19951987        """
    19961988
    1997         return StringToEnum('BedSlopeYAnalysis')
     1989        return StringToEnum('BedSlopeYAnalysis')[0]
    19981990
    19991991def DiagnosticHorizAnalysisEnum():
     
    20051997        """
    20061998
    2007         return StringToEnum('DiagnosticHorizAnalysis')
     1999        return StringToEnum('DiagnosticHorizAnalysis')[0]
    20082000
    20092001def DiagnosticHutterAnalysisEnum():
     
    20152007        """
    20162008
    2017         return StringToEnum('DiagnosticHutterAnalysis')
     2009        return StringToEnum('DiagnosticHutterAnalysis')[0]
    20182010
    20192011def DiagnosticSolutionEnum():
     
    20252017        """
    20262018
    2027         return StringToEnum('DiagnosticSolution')
     2019        return StringToEnum('DiagnosticSolution')[0]
    20282020
    20292021def DiagnosticVertAnalysisEnum():
     
    20352027        """
    20362028
    2037         return StringToEnum('DiagnosticVertAnalysis')
     2029        return StringToEnum('DiagnosticVertAnalysis')[0]
    20382030
    20392031def EnthalpyAnalysisEnum():
     
    20452037        """
    20462038
    2047         return StringToEnum('EnthalpyAnalysis')
     2039        return StringToEnum('EnthalpyAnalysis')[0]
    20482040
    20492041def EnthalpySolutionEnum():
     
    20552047        """
    20562048
    2057         return StringToEnum('EnthalpySolution')
     2049        return StringToEnum('EnthalpySolution')[0]
    20582050
    20592051def FlaimAnalysisEnum():
     
    20652057        """
    20662058
    2067         return StringToEnum('FlaimAnalysis')
     2059        return StringToEnum('FlaimAnalysis')[0]
    20682060
    20692061def FlaimSolutionEnum():
     
    20752067        """
    20762068
    2077         return StringToEnum('FlaimSolution')
     2069        return StringToEnum('FlaimSolution')[0]
    20782070
    20792071def HydrologyAnalysisEnum():
     
    20852077        """
    20862078
    2087         return StringToEnum('HydrologyAnalysis')
     2079        return StringToEnum('HydrologyAnalysis')[0]
    20882080
    20892081def HydrologySolutionEnum():
     
    20952087        """
    20962088
    2097         return StringToEnum('HydrologySolution')
     2089        return StringToEnum('HydrologySolution')[0]
    20982090
    20992091def MeltingAnalysisEnum():
     
    21052097        """
    21062098
    2107         return StringToEnum('MeltingAnalysis')
     2099        return StringToEnum('MeltingAnalysis')[0]
    21082100
    21092101def NoneAnalysisEnum():
     
    21152107        """
    21162108
    2117         return StringToEnum('NoneAnalysis')
     2109        return StringToEnum('NoneAnalysis')[0]
    21182110
    21192111def PrognosticAnalysisEnum():
     
    21252117        """
    21262118
    2127         return StringToEnum('PrognosticAnalysis')
     2119        return StringToEnum('PrognosticAnalysis')[0]
    21282120
    21292121def PrognosticSolutionEnum():
     
    21352127        """
    21362128
    2137         return StringToEnum('PrognosticSolution')
     2129        return StringToEnum('PrognosticSolution')[0]
    21382130
    21392131def SteadystateSolutionEnum():
     
    21452137        """
    21462138
    2147         return StringToEnum('SteadystateSolution')
     2139        return StringToEnum('SteadystateSolution')[0]
    21482140
    21492141def SurfaceSlopeAnalysisEnum():
     
    21552147        """
    21562148
    2157         return StringToEnum('SurfaceSlopeAnalysis')
     2149        return StringToEnum('SurfaceSlopeAnalysis')[0]
    21582150
    21592151def SurfaceSlopeSolutionEnum():
     
    21652157        """
    21662158
    2167         return StringToEnum('SurfaceSlopeSolution')
     2159        return StringToEnum('SurfaceSlopeSolution')[0]
    21682160
    21692161def SurfaceSlopeXAnalysisEnum():
     
    21752167        """
    21762168
    2177         return StringToEnum('SurfaceSlopeXAnalysis')
     2169        return StringToEnum('SurfaceSlopeXAnalysis')[0]
    21782170
    21792171def SurfaceSlopeYAnalysisEnum():
     
    21852177        """
    21862178
    2187         return StringToEnum('SurfaceSlopeYAnalysis')
     2179        return StringToEnum('SurfaceSlopeYAnalysis')[0]
    21882180
    21892181def ThermalAnalysisEnum():
     
    21952187        """
    21962188
    2197         return StringToEnum('ThermalAnalysis')
     2189        return StringToEnum('ThermalAnalysis')[0]
    21982190
    21992191def ThermalSolutionEnum():
     
    22052197        """
    22062198
    2207         return StringToEnum('ThermalSolution')
     2199        return StringToEnum('ThermalSolution')[0]
    22082200
    22092201def TransientSolutionEnum():
     
    22152207        """
    22162208
    2217         return StringToEnum('TransientSolution')
     2209        return StringToEnum('TransientSolution')[0]
    22182210
    22192211def ApproximationEnum():
     
    22252217        """
    22262218
    2227         return StringToEnum('Approximation')
     2219        return StringToEnum('Approximation')[0]
     2220
     2221def NoneApproximationEnum():
     2222        """
     2223        NONEAPPROXIMATIONENUM - Enum of NoneApproximation
     2224
     2225           Usage:
     2226              macro=NoneApproximationEnum()
     2227        """
     2228
     2229        return StringToEnum('NoneApproximation')[0]
    22282230
    22292231def HutterApproximationEnum():
     
    22352237        """
    22362238
    2237         return StringToEnum('HutterApproximation')
     2239        return StringToEnum('HutterApproximation')[0]
    22382240
    22392241def MacAyealApproximationEnum():
     
    22452247        """
    22462248
    2247         return StringToEnum('MacAyealApproximation')
     2249        return StringToEnum('MacAyealApproximation')[0]
    22482250
    22492251def MacAyealPattynApproximationEnum():
     
    22552257        """
    22562258
    2257         return StringToEnum('MacAyealPattynApproximation')
     2259        return StringToEnum('MacAyealPattynApproximation')[0]
    22582260
    22592261def MacAyealStokesApproximationEnum():
     
    22652267        """
    22662268
    2267         return StringToEnum('MacAyealStokesApproximation')
    2268 
    2269 def NoneApproximationEnum():
    2270         """
    2271         NONEAPPROXIMATIONENUM - Enum of NoneApproximation
    2272 
    2273            Usage:
    2274               macro=NoneApproximationEnum()
    2275         """
    2276 
    2277         return StringToEnum('NoneApproximation')
     2269        return StringToEnum('MacAyealStokesApproximation')[0]
     2270
     2271def L1L2ApproximationEnum():
     2272        """
     2273        L1L2APPROXIMATIONENUM - Enum of L1L2Approximation
     2274
     2275           Usage:
     2276              macro=L1L2ApproximationEnum()
     2277        """
     2278
     2279        return StringToEnum('L1L2Approximation')[0]
    22782280
    22792281def PattynApproximationEnum():
     
    22852287        """
    22862288
    2287         return StringToEnum('PattynApproximation')
     2289        return StringToEnum('PattynApproximation')[0]
    22882290
    22892291def PattynStokesApproximationEnum():
     
    22952297        """
    22962298
    2297         return StringToEnum('PattynStokesApproximation')
     2299        return StringToEnum('PattynStokesApproximation')[0]
    22982300
    22992301def StokesApproximationEnum():
     
    23052307        """
    23062308
    2307         return StringToEnum('StokesApproximation')
     2309        return StringToEnum('StokesApproximation')[0]
    23082310
    23092311def ConstraintsEnum():
     
    23152317        """
    23162318
    2317         return StringToEnum('Constraints')
     2319        return StringToEnum('Constraints')[0]
    23182320
    23192321def LoadsEnum():
     
    23252327        """
    23262328
    2327         return StringToEnum('Loads')
     2329        return StringToEnum('Loads')[0]
    23282330
    23292331def MaterialsEnum():
     
    23352337        """
    23362338
    2337         return StringToEnum('Materials')
     2339        return StringToEnum('Materials')[0]
    23382340
    23392341def NodesEnum():
     
    23452347        """
    23462348
    2347         return StringToEnum('Nodes')
     2349        return StringToEnum('Nodes')[0]
    23482350
    23492351def ParametersEnum():
     
    23552357        """
    23562358
    2357         return StringToEnum('Parameters')
     2359        return StringToEnum('Parameters')[0]
    23582360
    23592361def VerticesEnum():
     
    23652367        """
    23662368
    2367         return StringToEnum('Vertices')
     2369        return StringToEnum('Vertices')[0]
    23682370
    23692371def ResultsEnum():
     
    23752377        """
    23762378
    2377         return StringToEnum('Results')
     2379        return StringToEnum('Results')[0]
    23782380
    23792381def BoolInputEnum():
     
    23852387        """
    23862388
    2387         return StringToEnum('BoolInput')
     2389        return StringToEnum('BoolInput')[0]
    23882390
    23892391def BoolParamEnum():
     
    23952397        """
    23962398
    2397         return StringToEnum('BoolParam')
     2399        return StringToEnum('BoolParam')[0]
    23982400
    23992401def ContourEnum():
     
    24052407        """
    24062408
    2407         return StringToEnum('Contour')
     2409        return StringToEnum('Contour')[0]
    24082410
    24092411def ControlInputEnum():
     
    24152417        """
    24162418
    2417         return StringToEnum('ControlInput')
     2419        return StringToEnum('ControlInput')[0]
    24182420
    24192421def DatasetInputEnum():
     
    24252427        """
    24262428
    2427         return StringToEnum('DatasetInput')
     2429        return StringToEnum('DatasetInput')[0]
    24282430
    24292431def DofIndexingEnum():
     
    24352437        """
    24362438
    2437         return StringToEnum('DofIndexing')
     2439        return StringToEnum('DofIndexing')[0]
    24382440
    24392441def DoubleInputEnum():
     
    24452447        """
    24462448
    2447         return StringToEnum('DoubleInput')
     2449        return StringToEnum('DoubleInput')[0]
    24482450
    24492451def DoubleMatArrayParamEnum():
     
    24552457        """
    24562458
    2457         return StringToEnum('DoubleMatArrayParam')
     2459        return StringToEnum('DoubleMatArrayParam')[0]
    24582460
    24592461def DoubleMatParamEnum():
     
    24652467        """
    24662468
    2467         return StringToEnum('DoubleMatParam')
     2469        return StringToEnum('DoubleMatParam')[0]
    24682470
    24692471def DoubleParamEnum():
     
    24752477        """
    24762478
    2477         return StringToEnum('DoubleParam')
     2479        return StringToEnum('DoubleParam')[0]
    24782480
    24792481def DoubleVecParamEnum():
     
    24852487        """
    24862488
    2487         return StringToEnum('DoubleVecParam')
     2489        return StringToEnum('DoubleVecParam')[0]
    24882490
    24892491def ElementEnum():
     
    24952497        """
    24962498
    2497         return StringToEnum('Element')
     2499        return StringToEnum('Element')[0]
    24982500
    24992501def ElementResultEnum():
     
    25052507        """
    25062508
    2507         return StringToEnum('ElementResult')
     2509        return StringToEnum('ElementResult')[0]
    25082510
    25092511def ExternalResultEnum():
     
    25152517        """
    25162518
    2517         return StringToEnum('ExternalResult')
     2519        return StringToEnum('ExternalResult')[0]
    25182520
    25192521def FileParamEnum():
     
    25252527        """
    25262528
    2527         return StringToEnum('FileParam')
     2529        return StringToEnum('FileParam')[0]
    25282530
    25292531def HookEnum():
     
    25352537        """
    25362538
    2537         return StringToEnum('Hook')
     2539        return StringToEnum('Hook')[0]
    25382540
    25392541def IcefrontEnum():
     
    25452547        """
    25462548
    2547         return StringToEnum('Icefront')
     2549        return StringToEnum('Icefront')[0]
    25482550
    25492551def InputEnum():
     
    25552557        """
    25562558
    2557         return StringToEnum('Input')
     2559        return StringToEnum('Input')[0]
    25582560
    25592561def IntInputEnum():
     
    25652567        """
    25662568
    2567         return StringToEnum('IntInput')
     2569        return StringToEnum('IntInput')[0]
    25682570
    25692571def IntParamEnum():
     
    25752577        """
    25762578
    2577         return StringToEnum('IntParam')
     2579        return StringToEnum('IntParam')[0]
    25782580
    25792581def IntVecParamEnum():
     
    25852587        """
    25862588
    2587         return StringToEnum('IntVecParam')
     2589        return StringToEnum('IntVecParam')[0]
    25882590
    25892591def TransientParamEnum():
     
    25952597        """
    25962598
    2597         return StringToEnum('TransientParam')
     2599        return StringToEnum('TransientParam')[0]
    25982600
    25992601def MacAyeal2dIceFrontEnum():
     
    26052607        """
    26062608
    2607         return StringToEnum('MacAyeal2dIceFront')
     2609        return StringToEnum('MacAyeal2dIceFront')[0]
    26082610
    26092611def MacAyeal3dIceFrontEnum():
     
    26152617        """
    26162618
    2617         return StringToEnum('MacAyeal3dIceFront')
     2619        return StringToEnum('MacAyeal3dIceFront')[0]
    26182620
    26192621def MaticeEnum():
     
    26252627        """
    26262628
    2627         return StringToEnum('Matice')
     2629        return StringToEnum('Matice')[0]
    26282630
    26292631def MatparEnum():
     
    26352637        """
    26362638
    2637         return StringToEnum('Matpar')
     2639        return StringToEnum('Matpar')[0]
    26382640
    26392641def NodeEnum():
     
    26452647        """
    26462648
    2647         return StringToEnum('Node')
     2649        return StringToEnum('Node')[0]
    26482650
    26492651def NumericalfluxEnum():
     
    26552657        """
    26562658
    2657         return StringToEnum('Numericalflux')
     2659        return StringToEnum('Numericalflux')[0]
    26582660
    26592661def ParamEnum():
     
    26652667        """
    26662668
    2667         return StringToEnum('Param')
     2669        return StringToEnum('Param')[0]
     2670
     2671def L1L2IceFrontEnum():
     2672        """
     2673        L1L2ICEFRONTENUM - Enum of L1L2IceFront
     2674
     2675           Usage:
     2676              macro=L1L2IceFrontEnum()
     2677        """
     2678
     2679        return StringToEnum('L1L2IceFront')[0]
    26682680
    26692681def PattynIceFrontEnum():
     
    26752687        """
    26762688
    2677         return StringToEnum('PattynIceFront')
     2689        return StringToEnum('PattynIceFront')[0]
    26782690
    26792691def PengridEnum():
     
    26852697        """
    26862698
    2687         return StringToEnum('Pengrid')
     2699        return StringToEnum('Pengrid')[0]
    26882700
    26892701def PenpairEnum():
     
    26952707        """
    26962708
    2697         return StringToEnum('Penpair')
     2709        return StringToEnum('Penpair')[0]
    26982710
    26992711def PentaEnum():
     
    27052717        """
    27062718
    2707         return StringToEnum('Penta')
     2719        return StringToEnum('Penta')[0]
    27082720
    27092721def PentaP1InputEnum():
     
    27152727        """
    27162728
    2717         return StringToEnum('PentaP1Input')
     2729        return StringToEnum('PentaP1Input')[0]
    27182730
    27192731def MatrixParamEnum():
     
    27252737        """
    27262738
    2727         return StringToEnum('MatrixParam')
     2739        return StringToEnum('MatrixParam')[0]
    27282740
    27292741def VectorParamEnum():
     
    27352747        """
    27362748
    2737         return StringToEnum('VectorParam')
     2749        return StringToEnum('VectorParam')[0]
    27382750
    27392751def RiftfrontEnum():
     
    27452757        """
    27462758
    2747         return StringToEnum('Riftfront')
     2759        return StringToEnum('Riftfront')[0]
    27482760
    27492761def SegmentEnum():
     
    27552767        """
    27562768
    2757         return StringToEnum('Segment')
     2769        return StringToEnum('Segment')[0]
    27582770
    27592771def SegmentRiftfrontEnum():
     
    27652777        """
    27662778
    2767         return StringToEnum('SegmentRiftfront')
     2779        return StringToEnum('SegmentRiftfront')[0]
    27682780
    27692781def SpcDynamicEnum():
     
    27752787        """
    27762788
    2777         return StringToEnum('SpcDynamic')
     2789        return StringToEnum('SpcDynamic')[0]
    27782790
    27792791def SpcStaticEnum():
     
    27852797        """
    27862798
    2787         return StringToEnum('SpcStatic')
     2799        return StringToEnum('SpcStatic')[0]
    27882800
    27892801def SpcTransientEnum():
     
    27952807        """
    27962808
    2797         return StringToEnum('SpcTransient')
     2809        return StringToEnum('SpcTransient')[0]
    27982810
    27992811def StokesIceFrontEnum():
     
    28052817        """
    28062818
    2807         return StringToEnum('StokesIceFront')
     2819        return StringToEnum('StokesIceFront')[0]
    28082820
    28092821def StringArrayParamEnum():
     
    28152827        """
    28162828
    2817         return StringToEnum('StringArrayParam')
     2829        return StringToEnum('StringArrayParam')[0]
    28182830
    28192831def StringParamEnum():
     
    28252837        """
    28262838
    2827         return StringToEnum('StringParam')
     2839        return StringToEnum('StringParam')[0]
    28282840
    28292841def TriaEnum():
     
    28352847        """
    28362848
    2837         return StringToEnum('Tria')
     2849        return StringToEnum('Tria')[0]
    28382850
    28392851def TriaP1InputEnum():
     
    28452857        """
    28462858
    2847         return StringToEnum('TriaP1Input')
     2859        return StringToEnum('TriaP1Input')[0]
    28482860
    28492861def VertexEnum():
     
    28552867        """
    28562868
    2857         return StringToEnum('Vertex')
     2869        return StringToEnum('Vertex')[0]
    28582870
    28592871def AirEnum():
     
    28652877        """
    28662878
    2867         return StringToEnum('Air')
     2879        return StringToEnum('Air')[0]
    28682880
    28692881def IceEnum():
     
    28752887        """
    28762888
    2877         return StringToEnum('Ice')
     2889        return StringToEnum('Ice')[0]
    28782890
    28792891def MelangeEnum():
     
    28852897        """
    28862898
    2887         return StringToEnum('Melange')
     2899        return StringToEnum('Melange')[0]
    28882900
    28892901def WaterEnum():
     
    28952907        """
    28962908
    2897         return StringToEnum('Water')
     2909        return StringToEnum('Water')[0]
    28982910
    28992911def ClosedEnum():
     
    29052917        """
    29062918
    2907         return StringToEnum('Closed')
     2919        return StringToEnum('Closed')[0]
    29082920
    29092921def FreeEnum():
     
    29152927        """
    29162928
    2917         return StringToEnum('Free')
     2929        return StringToEnum('Free')[0]
    29182930
    29192931def OpenEnum():
     
    29252937        """
    29262938
    2927         return StringToEnum('Open')
     2939        return StringToEnum('Open')[0]
    29282940
    29292941def AdjointpEnum():
     
    29352947        """
    29362948
    2937         return StringToEnum('Adjointp')
     2949        return StringToEnum('Adjointp')[0]
    29382950
    29392951def AdjointxEnum():
     
    29452957        """
    29462958
    2947         return StringToEnum('Adjointx')
     2959        return StringToEnum('Adjointx')[0]
    29482960
    29492961def AdjointyEnum():
     
    29552967        """
    29562968
    2957         return StringToEnum('Adjointy')
     2969        return StringToEnum('Adjointy')[0]
    29582970
    29592971def AdjointzEnum():
     
    29652977        """
    29662978
    2967         return StringToEnum('Adjointz')
     2979        return StringToEnum('Adjointz')[0]
    29682980
    29692981def BedSlopeXEnum():
     
    29752987        """
    29762988
    2977         return StringToEnum('BedSlopeX')
     2989        return StringToEnum('BedSlopeX')[0]
    29782990
    29792991def BedSlopeYEnum():
     
    29852997        """
    29862998
    2987         return StringToEnum('BedSlopeY')
     2999        return StringToEnum('BedSlopeY')[0]
    29883000
    29893001def BoundaryEnum():
     
    29953007        """
    29963008
    2997         return StringToEnum('Boundary')
     3009        return StringToEnum('Boundary')[0]
    29983010
    29993011def ConstantEnum():
     
    30053017        """
    30063018
    3007         return StringToEnum('Constant')
     3019        return StringToEnum('Constant')[0]
    30083020
    30093021def ConvergedEnum():
     
    30153027        """
    30163028
    3017         return StringToEnum('Converged')
     3029        return StringToEnum('Converged')[0]
    30183030
    30193031def ExtToIuEnum():
     
    30253037        """
    30263038
    3027         return StringToEnum('ExtToIu')
     3039        return StringToEnum('ExtToIu')[0]
    30283040
    30293041def FillEnum():
     
    30353047        """
    30363048
    3037         return StringToEnum('Fill')
     3049        return StringToEnum('Fill')[0]
    30383050
    30393051def FractionIncrementEnum():
     
    30453057        """
    30463058
    3047         return StringToEnum('FractionIncrement')
     3059        return StringToEnum('FractionIncrement')[0]
    30483060
    30493061def FrictionEnum():
     
    30553067        """
    30563068
    3057         return StringToEnum('Friction')
     3069        return StringToEnum('Friction')[0]
    30583070
    30593071def GroundinglineMeltingRateEnum():
     
    30653077        """
    30663078
    3067         return StringToEnum('GroundinglineMeltingRate')
     3079        return StringToEnum('GroundinglineMeltingRate')[0]
    30683080
    30693081def InternalEnum():
     
    30753087        """
    30763088
    3077         return StringToEnum('Internal')
     3089        return StringToEnum('Internal')[0]
    30783090
    30793091def IuToExtEnum():
     
    30853097        """
    30863098
    3087         return StringToEnum('IuToExt')
     3099        return StringToEnum('IuToExt')[0]
    30883100
    30893101def MassFluxEnum():
     
    30953107        """
    30963108
    3097         return StringToEnum('MassFlux')
     3109        return StringToEnum('MassFlux')[0]
    30983110
    30993111def MaxPenetrationEnum():
     
    31053117        """
    31063118
    3107         return StringToEnum('MaxPenetration')
     3119        return StringToEnum('MaxPenetration')[0]
    31083120
    31093121def MeltingOffsetEnum():
     
    31153127        """
    31163128
    3117         return StringToEnum('MeltingOffset')
     3129        return StringToEnum('MeltingOffset')[0]
    31183130
    31193131def MisfitEnum():
     
    31253137        """
    31263138
    3127         return StringToEnum('Misfit')
     3139        return StringToEnum('Misfit')[0]
    31283140
    31293141def NumberNodeToElementConnectivityEnum():
     
    31353147        """
    31363148
    3137         return StringToEnum('NumberNodeToElementConnectivity')
     3149        return StringToEnum('NumberNodeToElementConnectivity')[0]
    31383150
    31393151def PressureEnum():
     
    31453157        """
    31463158
    3147         return StringToEnum('Pressure')
     3159        return StringToEnum('Pressure')[0]
    31483160
    31493161def PressurePicardEnum():
     
    31553167        """
    31563168
    3157         return StringToEnum('PressurePicard')
     3169        return StringToEnum('PressurePicard')[0]
    31583170
    31593171def QmuPressureEnum():
     
    31653177        """
    31663178
    3167         return StringToEnum('QmuPressure')
     3179        return StringToEnum('QmuPressure')[0]
    31683180
    31693181def QmuVxEnum():
     
    31753187        """
    31763188
    3177         return StringToEnum('QmuVx')
     3189        return StringToEnum('QmuVx')[0]
    31783190
    31793191def QmuVyEnum():
     
    31853197        """
    31863198
    3187         return StringToEnum('QmuVy')
     3199        return StringToEnum('QmuVy')[0]
    31883200
    31893201def QmuVzEnum():
     
    31953207        """
    31963208
    3197         return StringToEnum('QmuVz')
     3209        return StringToEnum('QmuVz')[0]
    31983210
    31993211def QmuThicknessEnum():
     
    32053217        """
    32063218
    3207         return StringToEnum('QmuThickness')
     3219        return StringToEnum('QmuThickness')[0]
    32083220
    32093221def QmuBedEnum():
     
    32153227        """
    32163228
    3217         return StringToEnum('QmuBed')
     3229        return StringToEnum('QmuBed')[0]
    32183230
    32193231def QmuSurfaceEnum():
     
    32253237        """
    32263238
    3227         return StringToEnum('QmuSurface')
     3239        return StringToEnum('QmuSurface')[0]
    32283240
    32293241def QmuMeltingEnum():
     
    32353247        """
    32363248
    3237         return StringToEnum('QmuMelting')
     3249        return StringToEnum('QmuMelting')[0]
    32383250
    32393251def ResetPenaltiesEnum():
     
    32453257        """
    32463258
    3247         return StringToEnum('ResetPenalties')
     3259        return StringToEnum('ResetPenalties')[0]
    32483260
    32493261def SegmentOnIceShelfEnum():
     
    32553267        """
    32563268
    3257         return StringToEnum('SegmentOnIceShelf')
     3269        return StringToEnum('SegmentOnIceShelf')[0]
    32583270
    32593271def SurfaceAbsVelMisfitEnum():
     
    32653277        """
    32663278
    3267         return StringToEnum('SurfaceAbsVelMisfit')
     3279        return StringToEnum('SurfaceAbsVelMisfit')[0]
    32683280
    32693281def SurfaceAreaEnum():
     
    32753287        """
    32763288
    3277         return StringToEnum('SurfaceArea')
     3289        return StringToEnum('SurfaceArea')[0]
    32783290
    32793291def SurfaceAverageVelMisfitEnum():
     
    32853297        """
    32863298
    3287         return StringToEnum('SurfaceAverageVelMisfit')
     3299        return StringToEnum('SurfaceAverageVelMisfit')[0]
    32883300
    32893301def SurfaceLogVelMisfitEnum():
     
    32953307        """
    32963308
    3297         return StringToEnum('SurfaceLogVelMisfit')
     3309        return StringToEnum('SurfaceLogVelMisfit')[0]
    32983310
    32993311def SurfaceLogVxVyMisfitEnum():
     
    33053317        """
    33063318
    3307         return StringToEnum('SurfaceLogVxVyMisfit')
     3319        return StringToEnum('SurfaceLogVxVyMisfit')[0]
    33083320
    33093321def SurfaceRelVelMisfitEnum():
     
    33153327        """
    33163328
    3317         return StringToEnum('SurfaceRelVelMisfit')
     3329        return StringToEnum('SurfaceRelVelMisfit')[0]
    33183330
    33193331def SurfaceSlopeXEnum():
     
    33253337        """
    33263338
    3327         return StringToEnum('SurfaceSlopeX')
     3339        return StringToEnum('SurfaceSlopeX')[0]
    33283340
    33293341def SurfaceSlopeYEnum():
     
    33353347        """
    33363348
    3337         return StringToEnum('SurfaceSlopeY')
     3349        return StringToEnum('SurfaceSlopeY')[0]
    33383350
    33393351def TemperatureEnum():
     
    33453357        """
    33463358
    3347         return StringToEnum('Temperature')
     3359        return StringToEnum('Temperature')[0]
    33483360
    33493361def TemperatureOldEnum():
     
    33553367        """
    33563368
    3357         return StringToEnum('TemperatureOld')
     3369        return StringToEnum('TemperatureOld')[0]
    33583370
    33593371def TemperaturePicardEnum():
     
    33653377        """
    33663378
    3367         return StringToEnum('TemperaturePicard')
     3379        return StringToEnum('TemperaturePicard')[0]
    33683380
    33693381def TemperatureSurfaceEnum():
     
    33753387        """
    33763388
    3377         return StringToEnum('TemperatureSurface')
     3389        return StringToEnum('TemperatureSurface')[0]
    33783390
    33793391def TemperatureBasalEnum():
     
    33853397        """
    33863398
    3387         return StringToEnum('TemperatureBasal')
     3399        return StringToEnum('TemperatureBasal')[0]
    33883400
    33893401def ThicknessAbsMisfitEnum():
     
    33953407        """
    33963408
    3397         return StringToEnum('ThicknessAbsMisfit')
     3409        return StringToEnum('ThicknessAbsMisfit')[0]
    33983410
    33993411def TypeEnum():
     
    34053417        """
    34063418
    3407         return StringToEnum('Type')
     3419        return StringToEnum('Type')[0]
    34083420
    34093421def VelEnum():
     
    34153427        """
    34163428
    3417         return StringToEnum('Vel')
     3429        return StringToEnum('Vel')[0]
    34183430
    34193431def VelocityEnum():
     
    34253437        """
    34263438
    3427         return StringToEnum('Velocity')
     3439        return StringToEnum('Velocity')[0]
    34283440
    34293441def VxAverageEnum():
     
    34353447        """
    34363448
    3437         return StringToEnum('VxAverage')
     3449        return StringToEnum('VxAverage')[0]
    34383450
    34393451def VxEnum():
     
    34453457        """
    34463458
    3447         return StringToEnum('Vx')
     3459        return StringToEnum('Vx')[0]
    34483460
    34493461def VxPicardEnum():
     
    34553467        """
    34563468
    3457         return StringToEnum('VxPicard')
     3469        return StringToEnum('VxPicard')[0]
    34583470
    34593471def VyAverageEnum():
     
    34653477        """
    34663478
    3467         return StringToEnum('VyAverage')
     3479        return StringToEnum('VyAverage')[0]
    34683480
    34693481def VyEnum():
     
    34753487        """
    34763488
    3477         return StringToEnum('Vy')
     3489        return StringToEnum('Vy')[0]
    34783490
    34793491def VyPicardEnum():
     
    34853497        """
    34863498
    3487         return StringToEnum('VyPicard')
     3499        return StringToEnum('VyPicard')[0]
    34883500
    34893501def VzEnum():
     
    34953507        """
    34963508
    3497         return StringToEnum('Vz')
     3509        return StringToEnum('Vz')[0]
    34983510
    34993511def VzMacAyealEnum():
     
    35053517        """
    35063518
    3507         return StringToEnum('VzMacAyeal')
     3519        return StringToEnum('VzMacAyeal')[0]
    35083520
    35093521def VzPattynEnum():
     
    35153527        """
    35163528
    3517         return StringToEnum('VzPattyn')
     3529        return StringToEnum('VzPattyn')[0]
    35183530
    35193531def VzPicardEnum():
     
    35253537        """
    35263538
    3527         return StringToEnum('VzPicard')
     3539        return StringToEnum('VzPicard')[0]
    35283540
    35293541def VzStokesEnum():
     
    35353547        """
    35363548
    3537         return StringToEnum('VzStokes')
     3549        return StringToEnum('VzStokes')[0]
    35383550
    35393551def VxMeshEnum():
     
    35453557        """
    35463558
    3547         return StringToEnum('VxMesh')
     3559        return StringToEnum('VxMesh')[0]
    35483560
    35493561def VyMeshEnum():
     
    35553567        """
    35563568
    3557         return StringToEnum('VyMesh')
     3569        return StringToEnum('VyMesh')[0]
    35583570
    35593571def VzMeshEnum():
     
    35653577        """
    35663578
    3567         return StringToEnum('VzMesh')
     3579        return StringToEnum('VzMesh')[0]
    35683580
    35693581def EnthalpyEnum():
     
    35753587        """
    35763588
    3577         return StringToEnum('Enthalpy')
     3589        return StringToEnum('Enthalpy')[0]
    35783590
    35793591def EnthalpyPicardEnum():
     
    35853597        """
    35863598
    3587         return StringToEnum('EnthalpyPicard')
     3599        return StringToEnum('EnthalpyPicard')[0]
    35883600
    35893601def ThicknessAbsGradientEnum():
     
    35953607        """
    35963608
    3597         return StringToEnum('ThicknessAbsGradient')
     3609        return StringToEnum('ThicknessAbsGradient')[0]
     3610
     3611def ThicknessAlongGradientEnum():
     3612        """
     3613        THICKNESSALONGGRADIENTENUM - Enum of ThicknessAlongGradient
     3614
     3615           Usage:
     3616              macro=ThicknessAlongGradientEnum()
     3617        """
     3618
     3619        return StringToEnum('ThicknessAlongGradient')[0]
     3620
     3621def ThicknessAcrossGradientEnum():
     3622        """
     3623        THICKNESSACROSSGRADIENTENUM - Enum of ThicknessAcrossGradient
     3624
     3625           Usage:
     3626              macro=ThicknessAcrossGradientEnum()
     3627        """
     3628
     3629        return StringToEnum('ThicknessAcrossGradient')[0]
    35983630
    35993631def StepResponsesEnum():
     
    36053637        """
    36063638
    3607         return StringToEnum('StepResponses')
     3639        return StringToEnum('StepResponses')[0]
    36083640
    36093641def IntMatParamEnum():
     
    36153647        """
    36163648
    3617         return StringToEnum('IntMatParam')
     3649        return StringToEnum('IntMatParam')[0]
    36183650
    36193651def RheologyBbarAbsGradientEnum():
     
    36253657        """
    36263658
    3627         return StringToEnum('RheologyBbarAbsGradient')
     3659        return StringToEnum('RheologyBbarAbsGradient')[0]
    36283660
    36293661def DragCoefficientAbsGradientEnum():
     
    36353667        """
    36363668
    3637         return StringToEnum('DragCoefficientAbsGradient')
     3669        return StringToEnum('DragCoefficientAbsGradient')[0]
    36383670
    36393671def TransientInputEnum():
     
    36453677        """
    36463678
    3647         return StringToEnum('TransientInput')
     3679        return StringToEnum('TransientInput')[0]
    36483680
    36493681def OutputfilenameEnum():
     
    36553687        """
    36563688
    3657         return StringToEnum('Outputfilename')
     3689        return StringToEnum('Outputfilename')[0]
    36583690
    36593691def WaterfractionEnum():
     
    36653697        """
    36663698
    3667         return StringToEnum('Waterfraction')
     3699        return StringToEnum('Waterfraction')[0]
    36683700
    36693701def WatercolumnEnum():
     
    36753707        """
    36763708
    3677         return StringToEnum('Watercolumn')
     3709        return StringToEnum('Watercolumn')[0]
    36783710
    36793711def BasalFrictionEnum():
     
    36853717        """
    36863718
    3687         return StringToEnum('BasalFriction')
     3719        return StringToEnum('BasalFriction')[0]
    36883720
    36893721def ViscousHeatingEnum():
     
    36953727        """
    36963728
    3697         return StringToEnum('ViscousHeating')
     3729        return StringToEnum('ViscousHeating')[0]
    36983730
    36993731def QmuTemperatureEnum():
     
    37053737        """
    37063738
    3707         return StringToEnum('QmuTemperature')
     3739        return StringToEnum('QmuTemperature')[0]
    37083740
    37093741def HydrologyWaterVxEnum():
     
    37153747        """
    37163748
    3717         return StringToEnum('HydrologyWaterVx')
     3749        return StringToEnum('HydrologyWaterVx')[0]
    37183750
    37193751def HydrologyWaterVyEnum():
     
    37253757        """
    37263758
    3727         return StringToEnum('HydrologyWaterVy')
     3759        return StringToEnum('HydrologyWaterVy')[0]
    37283760
    37293761def StressTensorEnum():
     
    37353767        """
    37363768
    3737         return StringToEnum('StressTensor')
     3769        return StringToEnum('StressTensor')[0]
    37383770
    37393771def StressTensorxxEnum():
     
    37453777        """
    37463778
    3747         return StringToEnum('StressTensorxx')
     3779        return StringToEnum('StressTensorxx')[0]
    37483780
    37493781def StressTensorxyEnum():
     
    37553787        """
    37563788
    3757         return StringToEnum('StressTensorxy')
     3789        return StringToEnum('StressTensorxy')[0]
    37583790
    37593791def StressTensorxzEnum():
     
    37653797        """
    37663798
    3767         return StringToEnum('StressTensorxz')
     3799        return StringToEnum('StressTensorxz')[0]
    37683800
    37693801def StressTensoryyEnum():
     
    37753807        """
    37763808
    3777         return StringToEnum('StressTensoryy')
     3809        return StringToEnum('StressTensoryy')[0]
    37783810
    37793811def StressTensoryzEnum():
     
    37853817        """
    37863818
    3787         return StringToEnum('StressTensoryz')
     3819        return StringToEnum('StressTensoryz')[0]
    37883820
    37893821def StressTensorzzEnum():
     
    37953827        """
    37963828
    3797         return StringToEnum('StressTensorzz')
     3829        return StringToEnum('StressTensorzz')[0]
     3830
     3831def P0Enum():
     3832        """
     3833        P0ENUM - Enum of P0
     3834
     3835           Usage:
     3836              macro=P0Enum()
     3837        """
     3838
     3839        return StringToEnum('P0')[0]
     3840
     3841def P1Enum():
     3842        """
     3843        P1ENUM - Enum of P1
     3844
     3845           Usage:
     3846              macro=P1Enum()
     3847        """
     3848
     3849        return StringToEnum('P1')[0]
     3850
     3851def P1DGEnum():
     3852        """
     3853        P1DGENUM - Enum of P1DG
     3854
     3855           Usage:
     3856              macro=P1DGEnum()
     3857        """
     3858
     3859        return StringToEnum('P1DG')[0]
     3860
     3861def SaveResultsEnum():
     3862        """
     3863        SAVERESULTSENUM - Enum of SaveResults
     3864
     3865           Usage:
     3866              macro=SaveResultsEnum()
     3867        """
     3868
     3869        return StringToEnum('SaveResults')[0]
     3870
     3871def BoolElementResultEnum():
     3872        """
     3873        BOOLELEMENTRESULTENUM - Enum of BoolElementResult
     3874
     3875           Usage:
     3876              macro=BoolElementResultEnum()
     3877        """
     3878
     3879        return StringToEnum('BoolElementResult')[0]
     3880
     3881def BoolExternalResultEnum():
     3882        """
     3883        BOOLEXTERNALRESULTENUM - Enum of BoolExternalResult
     3884
     3885           Usage:
     3886              macro=BoolExternalResultEnum()
     3887        """
     3888
     3889        return StringToEnum('BoolExternalResult')[0]
     3890
     3891def DoubleElementResultEnum():
     3892        """
     3893        DOUBLEELEMENTRESULTENUM - Enum of DoubleElementResult
     3894
     3895           Usage:
     3896              macro=DoubleElementResultEnum()
     3897        """
     3898
     3899        return StringToEnum('DoubleElementResult')[0]
     3900
     3901def DoubleExternalResultEnum():
     3902        """
     3903        DOUBLEEXTERNALRESULTENUM - Enum of DoubleExternalResult
     3904
     3905           Usage:
     3906              macro=DoubleExternalResultEnum()
     3907        """
     3908
     3909        return StringToEnum('DoubleExternalResult')[0]
     3910
     3911def DoubleMatExternalResultEnum():
     3912        """
     3913        DOUBLEMATEXTERNALRESULTENUM - Enum of DoubleMatExternalResult
     3914
     3915           Usage:
     3916              macro=DoubleMatExternalResultEnum()
     3917        """
     3918
     3919        return StringToEnum('DoubleMatExternalResult')[0]
     3920
     3921def DoubleVecExternalResultEnum():
     3922        """
     3923        DOUBLEVECEXTERNALRESULTENUM - Enum of DoubleVecExternalResult
     3924
     3925           Usage:
     3926              macro=DoubleVecExternalResultEnum()
     3927        """
     3928
     3929        return StringToEnum('DoubleVecExternalResult')[0]
     3930
     3931def IntExternalResultEnum():
     3932        """
     3933        INTEXTERNALRESULTENUM - Enum of IntExternalResult
     3934
     3935           Usage:
     3936              macro=IntExternalResultEnum()
     3937        """
     3938
     3939        return StringToEnum('IntExternalResult')[0]
     3940
     3941def JEnum():
     3942        """
     3943        JENUM - Enum of J
     3944
     3945           Usage:
     3946              macro=JEnum()
     3947        """
     3948
     3949        return StringToEnum('J')[0]
     3950
     3951def PatchEnum():
     3952        """
     3953        PATCHENUM - Enum of Patch
     3954
     3955           Usage:
     3956              macro=PatchEnum()
     3957        """
     3958
     3959        return StringToEnum('Patch')[0]
     3960
     3961def PatchNodesEnum():
     3962        """
     3963        PATCHNODESENUM - Enum of PatchNodes
     3964
     3965           Usage:
     3966              macro=PatchNodesEnum()
     3967        """
     3968
     3969        return StringToEnum('PatchNodes')[0]
     3970
     3971def PatchVerticesEnum():
     3972        """
     3973        PATCHVERTICESENUM - Enum of PatchVertices
     3974
     3975           Usage:
     3976              macro=PatchVerticesEnum()
     3977        """
     3978
     3979        return StringToEnum('PatchVertices')[0]
     3980
     3981def PentaP1ElementResultEnum():
     3982        """
     3983        PENTAP1ELEMENTRESULTENUM - Enum of PentaP1ElementResult
     3984
     3985           Usage:
     3986              macro=PentaP1ElementResultEnum()
     3987        """
     3988
     3989        return StringToEnum('PentaP1ElementResult')[0]
     3990
     3991def PetscVecExternalResultEnum():
     3992        """
     3993        PETSCVECEXTERNALRESULTENUM - Enum of PetscVecExternalResult
     3994
     3995           Usage:
     3996              macro=PetscVecExternalResultEnum()
     3997        """
     3998
     3999        return StringToEnum('PetscVecExternalResult')[0]
     4000
     4001def StringExternalResultEnum():
     4002        """
     4003        STRINGEXTERNALRESULTENUM - Enum of StringExternalResult
     4004
     4005           Usage:
     4006              macro=StringExternalResultEnum()
     4007        """
     4008
     4009        return StringToEnum('StringExternalResult')[0]
     4010
     4011def StepEnum():
     4012        """
     4013        STEPENUM - Enum of Step
     4014
     4015           Usage:
     4016              macro=StepEnum()
     4017        """
     4018
     4019        return StringToEnum('Step')[0]
     4020
     4021def TimeEnum():
     4022        """
     4023        TIMEENUM - Enum of Time
     4024
     4025           Usage:
     4026              macro=TimeEnum()
     4027        """
     4028
     4029        return StringToEnum('Time')[0]
     4030
     4031def TriaP1ElementResultEnum():
     4032        """
     4033        TRIAP1ELEMENTRESULTENUM - Enum of TriaP1ElementResult
     4034
     4035           Usage:
     4036              macro=TriaP1ElementResultEnum()
     4037        """
     4038
     4039        return StringToEnum('TriaP1ElementResult')[0]
     4040
     4041def WaterColumnOldEnum():
     4042        """
     4043        WATERCOLUMNOLDENUM - Enum of WaterColumnOld
     4044
     4045           Usage:
     4046              macro=WaterColumnOldEnum()
     4047        """
     4048
     4049        return StringToEnum('WaterColumnOld')[0]
     4050
     4051def MinVelEnum():
     4052        """
     4053        MINVELENUM - Enum of MinVel
     4054
     4055           Usage:
     4056              macro=MinVelEnum()
     4057        """
     4058
     4059        return StringToEnum('MinVel')[0]
     4060
     4061def MaxVelEnum():
     4062        """
     4063        MAXVELENUM - Enum of MaxVel
     4064
     4065           Usage:
     4066              macro=MaxVelEnum()
     4067        """
     4068
     4069        return StringToEnum('MaxVel')[0]
     4070
     4071def MinVxEnum():
     4072        """
     4073        MINVXENUM - Enum of MinVx
     4074
     4075           Usage:
     4076              macro=MinVxEnum()
     4077        """
     4078
     4079        return StringToEnum('MinVx')[0]
     4080
     4081def MaxVxEnum():
     4082        """
     4083        MAXVXENUM - Enum of MaxVx
     4084
     4085           Usage:
     4086              macro=MaxVxEnum()
     4087        """
     4088
     4089        return StringToEnum('MaxVx')[0]
     4090
     4091def MaxAbsVxEnum():
     4092        """
     4093        MAXABSVXENUM - Enum of MaxAbsVx
     4094
     4095           Usage:
     4096              macro=MaxAbsVxEnum()
     4097        """
     4098
     4099        return StringToEnum('MaxAbsVx')[0]
     4100
     4101def MinVyEnum():
     4102        """
     4103        MINVYENUM - Enum of MinVy
     4104
     4105           Usage:
     4106              macro=MinVyEnum()
     4107        """
     4108
     4109        return StringToEnum('MinVy')[0]
     4110
     4111def MaxVyEnum():
     4112        """
     4113        MAXVYENUM - Enum of MaxVy
     4114
     4115           Usage:
     4116              macro=MaxVyEnum()
     4117        """
     4118
     4119        return StringToEnum('MaxVy')[0]
     4120
     4121def MaxAbsVyEnum():
     4122        """
     4123        MAXABSVYENUM - Enum of MaxAbsVy
     4124
     4125           Usage:
     4126              macro=MaxAbsVyEnum()
     4127        """
     4128
     4129        return StringToEnum('MaxAbsVy')[0]
     4130
     4131def MinVzEnum():
     4132        """
     4133        MINVZENUM - Enum of MinVz
     4134
     4135           Usage:
     4136              macro=MinVzEnum()
     4137        """
     4138
     4139        return StringToEnum('MinVz')[0]
     4140
     4141def MaxVzEnum():
     4142        """
     4143        MAXVZENUM - Enum of MaxVz
     4144
     4145           Usage:
     4146              macro=MaxVzEnum()
     4147        """
     4148
     4149        return StringToEnum('MaxVz')[0]
     4150
     4151def MaxAbsVzEnum():
     4152        """
     4153        MAXABSVZENUM - Enum of MaxAbsVz
     4154
     4155           Usage:
     4156              macro=MaxAbsVzEnum()
     4157        """
     4158
     4159        return StringToEnum('MaxAbsVz')[0]
    37984160
    37994161def IceVolumeEnum():
     
    38054167        """
    38064168
    3807         return StringToEnum('IceVolume')
     4169        return StringToEnum('IceVolume')[0]
    38084170
    38094171def TotalSmbEnum():
     
    38154177        """
    38164178
    3817         return StringToEnum('TotalSmb')
    3818 
    3819 def ThicknessAlongGradientEnum():
    3820         """
    3821         THICKNESSALONGGRADIENTENUM - Enum of ThicknessAlongGradient
    3822 
    3823            Usage:
    3824               macro=ThicknessAlongGradientEnum()
    3825         """
    3826 
    3827         return StringToEnum('ThicknessAlongGradient')
    3828 
    3829 def ThicknessAcrossGradientEnum():
    3830         """
    3831         THICKNESSACROSSGRADIENTENUM - Enum of ThicknessAcrossGradient
    3832 
    3833            Usage:
    3834               macro=ThicknessAcrossGradientEnum()
    3835         """
    3836 
    3837         return StringToEnum('ThicknessAcrossGradient')
    3838 
    3839 def P0Enum():
    3840         """
    3841         P0ENUM - Enum of P0
    3842 
    3843            Usage:
    3844               macro=P0Enum()
    3845         """
    3846 
    3847         return StringToEnum('P0')
    3848 
    3849 def P1Enum():
    3850         """
    3851         P1ENUM - Enum of P1
    3852 
    3853            Usage:
    3854               macro=P1Enum()
    3855         """
    3856 
    3857         return StringToEnum('P1')
    3858 
    3859 def P1DGEnum():
    3860         """
    3861         P1DGENUM - Enum of P1DG
    3862 
    3863            Usage:
    3864               macro=P1DGEnum()
    3865         """
    3866 
    3867         return StringToEnum('P1DG')
    3868 
    3869 def SaveResultsEnum():
    3870         """
    3871         SAVERESULTSENUM - Enum of SaveResults
    3872 
    3873            Usage:
    3874               macro=SaveResultsEnum()
    3875         """
    3876 
    3877         return StringToEnum('SaveResults')
    3878 
    3879 def BoolElementResultEnum():
    3880         """
    3881         BOOLELEMENTRESULTENUM - Enum of BoolElementResult
    3882 
    3883            Usage:
    3884               macro=BoolElementResultEnum()
    3885         """
    3886 
    3887         return StringToEnum('BoolElementResult')
    3888 
    3889 def BoolExternalResultEnum():
    3890         """
    3891         BOOLEXTERNALRESULTENUM - Enum of BoolExternalResult
    3892 
    3893            Usage:
    3894               macro=BoolExternalResultEnum()
    3895         """
    3896 
    3897         return StringToEnum('BoolExternalResult')
    3898 
    3899 def DoubleElementResultEnum():
    3900         """
    3901         DOUBLEELEMENTRESULTENUM - Enum of DoubleElementResult
    3902 
    3903            Usage:
    3904               macro=DoubleElementResultEnum()
    3905         """
    3906 
    3907         return StringToEnum('DoubleElementResult')
    3908 
    3909 def DoubleExternalResultEnum():
    3910         """
    3911         DOUBLEEXTERNALRESULTENUM - Enum of DoubleExternalResult
    3912 
    3913            Usage:
    3914               macro=DoubleExternalResultEnum()
    3915         """
    3916 
    3917         return StringToEnum('DoubleExternalResult')
    3918 
    3919 def DoubleMatExternalResultEnum():
    3920         """
    3921         DOUBLEMATEXTERNALRESULTENUM - Enum of DoubleMatExternalResult
    3922 
    3923            Usage:
    3924               macro=DoubleMatExternalResultEnum()
    3925         """
    3926 
    3927         return StringToEnum('DoubleMatExternalResult')
    3928 
    3929 def DoubleVecExternalResultEnum():
    3930         """
    3931         DOUBLEVECEXTERNALRESULTENUM - Enum of DoubleVecExternalResult
    3932 
    3933            Usage:
    3934               macro=DoubleVecExternalResultEnum()
    3935         """
    3936 
    3937         return StringToEnum('DoubleVecExternalResult')
    3938 
    3939 def IntExternalResultEnum():
    3940         """
    3941         INTEXTERNALRESULTENUM - Enum of IntExternalResult
    3942 
    3943            Usage:
    3944               macro=IntExternalResultEnum()
    3945         """
    3946 
    3947         return StringToEnum('IntExternalResult')
    3948 
    3949 def JEnum():
    3950         """
    3951         JENUM - Enum of J
    3952 
    3953            Usage:
    3954               macro=JEnum()
    3955         """
    3956 
    3957         return StringToEnum('J')
    3958 
    3959 def PatchEnum():
    3960         """
    3961         PATCHENUM - Enum of Patch
    3962 
    3963            Usage:
    3964               macro=PatchEnum()
    3965         """
    3966 
    3967         return StringToEnum('Patch')
    3968 
    3969 def PatchNodesEnum():
    3970         """
    3971         PATCHNODESENUM - Enum of PatchNodes
    3972 
    3973            Usage:
    3974               macro=PatchNodesEnum()
    3975         """
    3976 
    3977         return StringToEnum('PatchNodes')
    3978 
    3979 def PatchVerticesEnum():
    3980         """
    3981         PATCHVERTICESENUM - Enum of PatchVertices
    3982 
    3983            Usage:
    3984               macro=PatchVerticesEnum()
    3985         """
    3986 
    3987         return StringToEnum('PatchVertices')
    3988 
    3989 def PentaP1ElementResultEnum():
    3990         """
    3991         PENTAP1ELEMENTRESULTENUM - Enum of PentaP1ElementResult
    3992 
    3993            Usage:
    3994               macro=PentaP1ElementResultEnum()
    3995         """
    3996 
    3997         return StringToEnum('PentaP1ElementResult')
    3998 
    3999 def PetscVecExternalResultEnum():
    4000         """
    4001         PETSCVECEXTERNALRESULTENUM - Enum of PetscVecExternalResult
    4002 
    4003            Usage:
    4004               macro=PetscVecExternalResultEnum()
    4005         """
    4006 
    4007         return StringToEnum('PetscVecExternalResult')
    4008 
    4009 def StringExternalResultEnum():
    4010         """
    4011         STRINGEXTERNALRESULTENUM - Enum of StringExternalResult
    4012 
    4013            Usage:
    4014               macro=StringExternalResultEnum()
    4015         """
    4016 
    4017         return StringToEnum('StringExternalResult')
    4018 
    4019 def StepEnum():
    4020         """
    4021         STEPENUM - Enum of Step
    4022 
    4023            Usage:
    4024               macro=StepEnum()
    4025         """
    4026 
    4027         return StringToEnum('Step')
    4028 
    4029 def TimeEnum():
    4030         """
    4031         TIMEENUM - Enum of Time
    4032 
    4033            Usage:
    4034               macro=TimeEnum()
    4035         """
    4036 
    4037         return StringToEnum('Time')
    4038 
    4039 def TriaP1ElementResultEnum():
    4040         """
    4041         TRIAP1ELEMENTRESULTENUM - Enum of TriaP1ElementResult
    4042 
    4043            Usage:
    4044               macro=TriaP1ElementResultEnum()
    4045         """
    4046 
    4047         return StringToEnum('TriaP1ElementResult')
    4048 
    4049 def WaterColumnOldEnum():
    4050         """
    4051         WATERCOLUMNOLDENUM - Enum of WaterColumnOld
    4052 
    4053            Usage:
    4054               macro=WaterColumnOldEnum()
    4055         """
    4056 
    4057         return StringToEnum('WaterColumnOld')
    4058 
    4059 def MinVelEnum():
    4060         """
    4061         MINVELENUM - Enum of MinVel
    4062 
    4063            Usage:
    4064               macro=MinVelEnum()
    4065         """
    4066 
    4067         return StringToEnum('MinVel')
    4068 
    4069 def MaxVelEnum():
    4070         """
    4071         MAXVELENUM - Enum of MaxVel
    4072 
    4073            Usage:
    4074               macro=MaxVelEnum()
    4075         """
    4076 
    4077         return StringToEnum('MaxVel')
    4078 
    4079 def MinVxEnum():
    4080         """
    4081         MINVXENUM - Enum of MinVx
    4082 
    4083            Usage:
    4084               macro=MinVxEnum()
    4085         """
    4086 
    4087         return StringToEnum('MinVx')
    4088 
    4089 def MaxVxEnum():
    4090         """
    4091         MAXVXENUM - Enum of MaxVx
    4092 
    4093            Usage:
    4094               macro=MaxVxEnum()
    4095         """
    4096 
    4097         return StringToEnum('MaxVx')
    4098 
    4099 def MaxAbsVxEnum():
    4100         """
    4101         MAXABSVXENUM - Enum of MaxAbsVx
    4102 
    4103            Usage:
    4104               macro=MaxAbsVxEnum()
    4105         """
    4106 
    4107         return StringToEnum('MaxAbsVx')
    4108 
    4109 def MinVyEnum():
    4110         """
    4111         MINVYENUM - Enum of MinVy
    4112 
    4113            Usage:
    4114               macro=MinVyEnum()
    4115         """
    4116 
    4117         return StringToEnum('MinVy')
    4118 
    4119 def MaxVyEnum():
    4120         """
    4121         MAXVYENUM - Enum of MaxVy
    4122 
    4123            Usage:
    4124               macro=MaxVyEnum()
    4125         """
    4126 
    4127         return StringToEnum('MaxVy')
    4128 
    4129 def MaxAbsVyEnum():
    4130         """
    4131         MAXABSVYENUM - Enum of MaxAbsVy
    4132 
    4133            Usage:
    4134               macro=MaxAbsVyEnum()
    4135         """
    4136 
    4137         return StringToEnum('MaxAbsVy')
    4138 
    4139 def MinVzEnum():
    4140         """
    4141         MINVZENUM - Enum of MinVz
    4142 
    4143            Usage:
    4144               macro=MinVzEnum()
    4145         """
    4146 
    4147         return StringToEnum('MinVz')
    4148 
    4149 def MaxVzEnum():
    4150         """
    4151         MAXVZENUM - Enum of MaxVz
    4152 
    4153            Usage:
    4154               macro=MaxVzEnum()
    4155         """
    4156 
    4157         return StringToEnum('MaxVz')
    4158 
    4159 def MaxAbsVzEnum():
    4160         """
    4161         MAXABSVZENUM - Enum of MaxAbsVz
    4162 
    4163            Usage:
    4164               macro=MaxAbsVzEnum()
    4165         """
    4166 
    4167         return StringToEnum('MaxAbsVz')
     4179        return StringToEnum('TotalSmb')[0]
    41684180
    41694181def RelativeEnum():
     
    41754187        """
    41764188
    4177         return StringToEnum('Relative')
     4189        return StringToEnum('Relative')[0]
    41784190
    41794191def AbsoluteEnum():
     
    41854197        """
    41864198
    4187         return StringToEnum('Absolute')
     4199        return StringToEnum('Absolute')[0]
    41884200
    41894201def IncrementalEnum():
     
    41954207        """
    41964208
    4197         return StringToEnum('Incremental')
     4209        return StringToEnum('Incremental')[0]
    41984210
    41994211def AgressiveMigrationEnum():
     
    42054217        """
    42064218
    4207         return StringToEnum('AgressiveMigration')
     4219        return StringToEnum('AgressiveMigration')[0]
    42084220
    42094221def NoneEnum():
     
    42154227        """
    42164228
    4217         return StringToEnum('None')
     4229        return StringToEnum('None')[0]
    42184230
    42194231def SoftMigrationEnum():
     
    42254237        """
    42264238
    4227         return StringToEnum('SoftMigration')
     4239        return StringToEnum('SoftMigration')[0]
    42284240
    42294241def StokesSolverEnum():
     
    42354247        """
    42364248
    4237         return StringToEnum('StokesSolver')
     4249        return StringToEnum('StokesSolver')[0]
    42384250
    42394251def AdjointEnum():
     
    42454257        """
    42464258
    4247         return StringToEnum('Adjoint')
     4259        return StringToEnum('Adjoint')[0]
    42484260
    42494261def ColinearEnum():
     
    42554267        """
    42564268
    4257         return StringToEnum('Colinear')
     4269        return StringToEnum('Colinear')[0]
    42584270
    42594271def ControlSteadyEnum():
     
    42654277        """
    42664278
    4267         return StringToEnum('ControlSteady')
     4279        return StringToEnum('ControlSteady')[0]
    42684280
    42694281def FsetEnum():
     
    42754287        """
    42764288
    4277         return StringToEnum('Fset')
     4289        return StringToEnum('Fset')[0]
    42784290
    42794291def Gradient1Enum():
     
    42854297        """
    42864298
    4287         return StringToEnum('Gradient1')
     4299        return StringToEnum('Gradient1')[0]
    42884300
    42894301def Gradient2Enum():
     
    42954307        """
    42964308
    4297         return StringToEnum('Gradient2')
     4309        return StringToEnum('Gradient2')[0]
    42984310
    42994311def Gradient3Enum():
     
    43054317        """
    43064318
    4307         return StringToEnum('Gradient3')
     4319        return StringToEnum('Gradient3')[0]
    43084320
    43094321def GradientEnum():
     
    43154327        """
    43164328
    4317         return StringToEnum('Gradient')
     4329        return StringToEnum('Gradient')[0]
    43184330
    43194331def GroundinglineMigrationEnum():
     
    43254337        """
    43264338
    4327         return StringToEnum('GroundinglineMigration')
     4339        return StringToEnum('GroundinglineMigration')[0]
    43284340
    43294341def GsetEnum():
     
    43354347        """
    43364348
    4337         return StringToEnum('Gset')
     4349        return StringToEnum('Gset')[0]
    43384350
    43394351def IndexEnum():
     
    43454357        """
    43464358
    4347         return StringToEnum('Index')
     4359        return StringToEnum('Index')[0]
    43484360
    43494361def IndexedEnum():
     
    43554367        """
    43564368
    4357         return StringToEnum('Indexed')
     4369        return StringToEnum('Indexed')[0]
    43584370
    43594371def IntersectEnum():
     
    43654377        """
    43664378
    4367         return StringToEnum('Intersect')
     4379        return StringToEnum('Intersect')[0]
    43684380
    43694381def NodalEnum():
     
    43754387        """
    43764388
    4377         return StringToEnum('Nodal')
     4389        return StringToEnum('Nodal')[0]
    43784390
    43794391def OldGradientEnum():
     
    43854397        """
    43864398
    4387         return StringToEnum('OldGradient')
     4399        return StringToEnum('OldGradient')[0]
    43884400
    43894401def OutputFilePointerEnum():
     
    43954407        """
    43964408
    4397         return StringToEnum('OutputFilePointer')
     4409        return StringToEnum('OutputFilePointer')[0]
    43984410
    43994411def PetscOptionsAnalysesEnum():
     
    44054417        """
    44064418
    4407         return StringToEnum('PetscOptionsAnalyses')
     4419        return StringToEnum('PetscOptionsAnalyses')[0]
    44084420
    44094421def PetscOptionsStringsEnum():
     
    44154427        """
    44164428
    4417         return StringToEnum('PetscOptionsStrings')
     4429        return StringToEnum('PetscOptionsStrings')[0]
    44184430
    44194431def QmuErrNameEnum():
     
    44254437        """
    44264438
    4427         return StringToEnum('QmuErrName')
     4439        return StringToEnum('QmuErrName')[0]
    44284440
    44294441def QmuInNameEnum():
     
    44354447        """
    44364448
    4437         return StringToEnum('QmuInName')
     4449        return StringToEnum('QmuInName')[0]
    44384450
    44394451def QmuOutNameEnum():
     
    44454457        """
    44464458
    4447         return StringToEnum('QmuOutName')
     4459        return StringToEnum('QmuOutName')[0]
    44484460
    44494461def RegularEnum():
     
    44554467        """
    44564468
    4457         return StringToEnum('Regular')
     4469        return StringToEnum('Regular')[0]
    44584470
    44594471def ScaledEnum():
     
    44654477        """
    44664478
    4467         return StringToEnum('Scaled')
     4479        return StringToEnum('Scaled')[0]
    44684480
    44694481def SeparateEnum():
     
    44754487        """
    44764488
    4477         return StringToEnum('Separate')
     4489        return StringToEnum('Separate')[0]
    44784490
    44794491def SsetEnum():
     
    44854497        """
    44864498
    4487         return StringToEnum('Sset')
     4499        return StringToEnum('Sset')[0]
    44884500
    44894501def VerboseEnum():
     
    44954507        """
    44964508
    4497         return StringToEnum('Verbose')
     4509        return StringToEnum('Verbose')[0]
    44984510
    44994511def TriangleInterpEnum():
     
    45054517        """
    45064518
    4507         return StringToEnum('TriangleInterp')
     4519        return StringToEnum('TriangleInterp')[0]
    45084520
    45094521def BilinearInterpEnum():
     
    45154527        """
    45164528
    4517         return StringToEnum('BilinearInterp')
     4529        return StringToEnum('BilinearInterp')[0]
    45184530
    45194531def NearestInterpEnum():
     
    45254537        """
    45264538
    4527         return StringToEnum('NearestInterp')
     4539        return StringToEnum('NearestInterp')[0]
    45284540
    45294541def XYEnum():
     
    45354547        """
    45364548
    4537         return StringToEnum('XY')
     4549        return StringToEnum('XY')[0]
    45384550
    45394551def XYZPEnum():
     
    45454557        """
    45464558
    4547         return StringToEnum('XYZP')
     4559        return StringToEnum('XYZP')[0]
    45484560
    45494561def OptionEnum():
     
    45554567        """
    45564568
    4557         return StringToEnum('Option')
     4569        return StringToEnum('Option')[0]
    45584570
    45594571def OptionCellEnum():
     
    45654577        """
    45664578
    4567         return StringToEnum('OptionCell')
     4579        return StringToEnum('OptionCell')[0]
    45684580
    45694581def OptionCharEnum():
     
    45754587        """
    45764588
    4577         return StringToEnum('OptionChar')
     4589        return StringToEnum('OptionChar')[0]
    45784590
    45794591def OptionStructEnum():
     
    45854597        """
    45864598
    4587         return StringToEnum('OptionStruct')
     4599        return StringToEnum('OptionStruct')[0]
    45884600
    45894601def OptionDoubleEnum():
     
    45954607        """
    45964608
    4597         return StringToEnum('OptionDouble')
     4609        return StringToEnum('OptionDouble')[0]
    45984610
    45994611def OptionLogicalEnum():
     
    46054617        """
    46064618
    4607         return StringToEnum('OptionLogical')
     4619        return StringToEnum('OptionLogical')[0]
    46084620
    46094621def PatersonEnum():
     
    46154627        """
    46164628
    4617         return StringToEnum('Paterson')
     4629        return StringToEnum('Paterson')[0]
    46184630
    46194631def ArrheniusEnum():
     
    46254637        """
    46264638
    4627         return StringToEnum('Arrhenius')
     4639        return StringToEnum('Arrhenius')[0]
    46284640
    46294641def MaximumNumberOfEnums():
     
    46354647        """
    46364648
    4637         return 462
    4638 
     4649        return 463
     4650
  • issm/branches/trunk-jpl-damage/src/m/enum/MaximumNumberOfEnums.m

    r12947 r13101  
    99%      macro=MaximumNumberOfEnums()
    1010
    11 macro=462;
     11macro=463;
  • issm/branches/trunk-jpl-damage/src/modules/BamgConvertMesh/BamgConvertMesh.cpp

    r12878 r13101  
    3434
    3535        /*Check inputs*/
    36         if(nels<0) _error2_("Number of elements must be positive, check index number of lines");
    37         if(nods<0) _error2_("Number of nods must be positive, check x and y sizes");
    38         if(test1!=3) _error2_("index should have 3 columns");
    39         if(test2!=nods) _error2_("x and y do not have the same length");
     36        if(nels<0) _error_("Number of elements must be positive, check index number of lines");
     37        if(nods<0) _error_("Number of nods must be positive, check x and y sizes");
     38        if(test1!=3) _error_("index should have 3 columns");
     39        if(test2!=nods) _error_("x and y do not have the same length");
    4040
    4141        /* Run core computations: */
  • issm/branches/trunk-jpl-damage/src/modules/BamgTriangulate/BamgTriangulate.cpp

    r12878 r13101  
    3232
    3333        /*Check inputs*/
    34         if(y_rows!=nods)         _error2_("x and y do not have the same length");
    35         if(x_cols>1 || y_cols>1) _error2_("x and y should have only one column");
    36         if(nods<3)               _error2_("At least 3 points are required");
     34        if(y_rows!=nods)         _error_("x and y do not have the same length");
     35        if(x_cols>1 || y_cols>1) _error_("x and y should have only one column");
     36        if(nods<3)               _error_("At least 3 points are required");
    3737
    3838        /* Run core computations: */
  • issm/branches/trunk-jpl-damage/src/modules/Chaco/Chaco.cpp

    r12878 r13101  
    4242
    4343        #ifndef _HAVE_CHACO_ //only works if dakota library has been compiled in.
    44         _error2_("Chaco not available! Cannot carry out Chaco partitioning!");
     44        _error_("Chaco not available! Cannot carry out Chaco partitioning!");
    4545        #endif
    4646
     
    5454        nvtxs = mxGetN(A_IN);
    5555        mwstart = mxGetJc(A_IN);
    56         start=(int*)xmalloc((nvtxs+1)*sizeof(int));
     56        start=xNew<int>((nvtxs+1));
    5757        for (i=0; i<nvtxs+1;i++)start[i]=(int)mwstart[i];
    5858
    5959        mwadjacency = mxGetIr(A_IN);
    60         adjacency = (int*)xmalloc(mxGetNzmax(A_IN)*sizeof(int));
     60        adjacency = xNew<int>(mxGetNzmax(A_IN));
    6161        for (i=0; i<mxGetNzmax(A_IN); i++) adjacency[i]= (int)mwadjacency[i];
    6262
    6363        nedges = start[nvtxs];
    6464        if(!mxIsEmpty(EWGTS_IN)){
    65                 ewgts = (float*)xcalloc(nedges, sizeof(float));
     65                ewgts = xNewZeroInit<float>(nedges);
    6666                doublepointer=mxGetPr(A_IN);
    6767                for (i = 0; i < nedges; i++)ewgts[i] = (float)doublepointer[i];
     
    7777        for (i=0;i<(nterms<10?nterms:10);i++) options[i]=in_options[i]; //copy in_options into default options
    7878        FetchData(&npart,NPARTS_IN);
    79         nparts=(int*)xmalloc(sizeof(int)); nparts[0]=npart; //weird Chacox interface ain't it?
     79        nparts=xNew<int>(1); nparts[0]=npart; //weird Chacox interface ain't it?
    8080        FetchData(&goal,&nterms,GOAL_IN);
    8181       
     
    104104       
    105105        /*Allocate output: */
    106         assignment = (short*)xcalloc(nvtxs, sizeof(short));
     106        assignment = xNewZeroInit<short>(nvtxs);
    107107       
    108108    /*Call core: */
     
    110110
    111111    /*Output data: */
    112         doubleassignment=(double*)xmalloc(nvtxs*sizeof(double));
     112        doubleassignment=xNew<double>(nvtxs);
    113113        for(i=0;i<nvtxs;i++) doubleassignment[i]=(double)assignment[i];
    114114        WriteData(ASSGN_OUT,doubleassignment,nvtxs);
  • issm/branches/trunk-jpl-damage/src/modules/ContourToMesh/ContourToMesh.cpp

    r12878 r13101  
    4747        if(nlhs!=1 && nlhs!=2){
    4848                ContourToMeshUsage();
    49                 _error2_("usage. See above");
     49                _error_("usage. See above");
    5050        }
    5151        #endif
     
    5353        if(nrhs!=NRHS){
    5454                ContourToMeshUsage();
    55                 _error2_("usage. See above");
     55                _error_("usage. See above");
    5656        }
    5757
     
    8282                WriteData(PLHS1,in_elem);
    8383        }
    84         else _error2_("wrong interpolation type");
     84        else _error_("wrong interpolation type");
    8585
    8686        /*end module: */
  • issm/branches/trunk-jpl-damage/src/modules/ContourToNodes/ContourToNodes.cpp

    r12878 r13101  
    6868
    6969        numcontours=mxGetNumberOfElements(matlabstructure);
    70         contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
     70        contours=xNew<Contour*>(numcontours);
    7171        for(i=0;i<numcontours;i++){
    7272                //allocate
    73                 contouri=(Contour*)xmalloc(sizeof(Contour));
     73                contouri=xNew<Contour>(1);
    7474                //retrieve dimension of this contour.
    7575                contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
  • issm/branches/trunk-jpl-damage/src/modules/EnumToString/EnumToString.cpp

    r12878 r13101  
    55#include "./EnumToString.h"
    66
    7 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
     7WRAPPER(EnumToString){
    88
    99        char    *name    = NULL;
    1010        int      enum_in;
    1111
    12         /*checks on arguments on the matlab side: */
    13         if(nrhs!=NRHS){
    14                 EnumToStringUsage(); _error2_("usage. See above");
    15         }
     12        /*Boot module: */
     13        MODULEBOOT();
     14
     15        /*checks on arguments: */
     16        CHECKARGUMENTS(NLHS,NRHS,&EnumToStringUsage);
    1617
    1718        /*Fetch inputs: */
     
    2324        /* output: */
    2425        WriteData(NAME,name);
     26
     27        /*end module: */
     28        MODULEEND();
    2529}
    2630
  • issm/branches/trunk-jpl-damage/src/modules/EnumToString/EnumToString.h

    r12013 r13101  
    66#define _ENUMTOSTRING_H
    77
    8 /* local prototypes: */
    9 void EnumToStringUsage(void);
     8#ifdef HAVE_CONFIG_H
     9#include <config.h>
     10#else
     11#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     12#endif
    1013
     14/*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/
     15#ifdef _HAVE_PYTHON_
     16#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
     17#endif
     18
     19/*Header files: */
    1120#include "../../c/include/globals.h"
    1221#include "../../c/modules/modules.h"
     
    1524#include "../../c/issm-binding.h"
    1625   
     26#ifdef _HAVE_MATLAB_MODULES_
    1727/* serial input macros: */
    1828#define ENUMIN (mxArray*)prhs[0]
    19 
    2029/* serial output macros: */
    2130#define NAME (mxArray**)&plhs[0]
     31#endif
     32
     33#ifdef _HAVE_PYTHON_MODULES_
     34/* serial input macros: */
     35#define ENUMIN PyTuple_GetItem(args,0)
     36/* serial output macros: */
     37#define NAME output,0
     38#endif
    2239
    2340/* serial arg counts: */
     
    3047#define __FUNCT__  "EnumToString"
    3148
     49/* local prototypes: */
     50void EnumToStringUsage(void);
     51
    3252#endif  /* _TEST_H */
  • issm/branches/trunk-jpl-damage/src/modules/Exp2Kml/Exp2Kml.cpp

    r12878 r13101  
    2525        /*checks on arguments on the matlab side: */
    2626        if (nlhs > NLHS) {
    27                 Exp2KmlUsage(); _error2_("Exp2Kml usage error");
     27                Exp2KmlUsage(); _error_("Exp2Kml usage error");
    2828        }
    2929        if (nrhs < NRHS) {
    30                 Exp2KmlUsage(); _error2_("Exp2Kml usage error");
     30                Exp2KmlUsage(); _error_("Exp2Kml usage error");
    3131        }
    3232
     
    4949
    5050        /*some checks*/
    51         if (sgn !=+1 && sgn !=-1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
    52         if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
    53         if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
     51        if (sgn !=+1 && sgn !=-1) _error_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
     52        if (fabs(cm)      > 180.) _error_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
     53        if (sp < 0. || sp >  90.) _error_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
    5454
    5555        /* Run core computations: */
  • issm/branches/trunk-jpl-damage/src/modules/InternalFront/InternalFront.cpp

    r12878 r13101  
    2626        /*Fetch required fields*/
    2727        FetchData(&numberofelements,mxGetAssignedField(MODEL,0,"numberofelements"));
    28         if(numberofelements<=0) _error2_("No elements found in the model");
     28        if(numberofelements<=0) _error_("No elements found in the model");
    2929        FetchData(&elements,&M,&N,mxGetAssignedField(MODEL,0,"elements"));
    30         if(M!=numberofelements || N!=3) _error2_("Field 'elements' should be of size [md.numberofelements 3]");
     30        if(M!=numberofelements || N!=3) _error_("Field 'elements' should be of size [md.numberofelements 3]");
    3131        FetchData(&elementonwater,&M,&N,mxGetAssignedField(MODEL,0,"elementonwater"));
    32         if(M!=numberofelements || N!=1) _error2_("Field 'elementonwater' should be of size [md.numberofelements 1]");
     32        if(M!=numberofelements || N!=1) _error_("Field 'elementonwater' should be of size [md.numberofelements 1]");
    3333        FetchData(&elementconnectivity,&M,&N,mxGetAssignedField(MODEL,0,"elementconnectivity"));
    34         if(M!=numberofelements || N!=3) _error2_("Field 'elementconnectivity' should be of size [md.numberofelements 3]");
     34        if(M!=numberofelements || N!=3) _error_("Field 'elementconnectivity' should be of size [md.numberofelements 3]");
    3535
    3636        /*Allocate and initialize all variables*/
    3737        numberofsegments=0;
    38         front=(int*)xmalloc(3*numberofelements*4*sizeof(int));
     38        front=xNew<int>(3*numberofelements*4);
    3939
    4040        /*Loop over all elements on water*/
     
    8181        /*Now that we know how many segments there is we can allocate the final matrix*/
    8282        if(numberofsegments){
    83                 front2=(double*)xmalloc(4*numberofsegments*sizeof(double));
     83                front2=xNew<double>(4*numberofsegments);
    8484                for(i=0;i<4*numberofsegments;i++) front2[i]=(double)front[i];
    8585        }
  • issm/branches/trunk-jpl-damage/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp

    r12878 r13101  
    4646        if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=7)){
    4747                InterpFromGridToMeshUsage();
    48                 _error2_("usage. See above");
     48                _error_("usage. See above");
    4949        }
    5050
  • issm/branches/trunk-jpl-damage/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp

    r12878 r13101  
    6969        if(nlhs!=NLHS){
    7070                InterpFromMesh2dUsage();
    71                 _error2_("InterpFromMeshToMesh2dUsage usage error");
     71                _error_("InterpFromMeshToMesh2dUsage usage error");
    7272        }
    7373        if((nrhs!=6) && (nrhs!=7) && (nrhs!=8)){
    7474                InterpFromMesh2dUsage();
    75                 _error2_("InterpFromMeshToMesh2dUsage usage error");
     75                _error_("InterpFromMeshToMesh2dUsage usage error");
    7676        }
    7777
     
    100100                /*contours: */
    101101                numcontours=mxGetNumberOfElements(matlabstructure);
    102                 contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
     102                contours=xNew<Contour*>(numcontours);
    103103                for(i=0;i<numcontours;i++){
    104104                        //allocate
    105                         contouri=(Contour*)xmalloc(sizeof(Contour));
     105                        contouri=xNew<Contour>(1);
    106106                        //retrieve dimension of this contour.
    107107                        contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
     
    131131        /*some checks*/
    132132        if (x_data_rows!=y_data_rows){
    133                 _error2_("vectors x and y should have the same length!");
     133                _error_("vectors x and y should have the same length!");
    134134        }
    135135        if (x_prime_rows!=y_prime_rows){
    136                 _error2_("vectors x_prime and y_prime should have the same length!");
     136                _error_("vectors x_prime and y_prime should have the same length!");
    137137        }
    138138       
  • issm/branches/trunk-jpl-damage/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp

    r12878 r13101  
    2828        if(nlhs!=NLHS){
    2929                InterpFromMeshToMesh2dUsage();
    30                 _error2_("InterpFromMeshToMesh2dUsage usage error");
     30                _error_("InterpFromMeshToMesh2dUsage usage error");
    3131        }
    3232        #endif
     
    3434        if(nrhs<NRHS){
    3535                InterpFromMeshToMesh2dUsage();
    36                 _error2_("InterpFromMeshToMesh2dUsage usage error");
     36                _error_("InterpFromMeshToMesh2dUsage usage error");
    3737        }
    3838
    3939        /*Fetch inputs: */
    40         FetchData(&index,&nels_data,&test,INDEX); if(test!=3) _error2_("index should have 3 columns");
    41         FetchData(&x_data,&nods_data,X);          if(nods_data<3) _error2_("there should be at least three points");
    42         FetchData(&y_data,&test,Y);               if(test!=nods_data) _error2_("vectors x and y should have the same length");
    43         FetchData(&data,&M_data,&N_data,DATA);    if(M_data*N_data<1) _error2_("data is empty");
    44         FetchData(&x_interp,&N_interp,XINTERP);   if(N_interp<1) _error2_("no interpolation requested");
    45         FetchData(&y_interp,&test,YINTERP);       if(test!=N_interp) _error2_("vectors x_interp and y_interp should have the same length");
     40        FetchData(&index,&nels_data,&test,INDEX); if(test!=3) _error_("index should have 3 columns");
     41        FetchData(&x_data,&nods_data,X);          if(nods_data<3) _error_("there should be at least three points");
     42        FetchData(&y_data,&test,Y);               if(test!=nods_data) _error_("vectors x and y should have the same length");
     43        FetchData(&data,&M_data,&N_data,DATA);    if(M_data*N_data<1) _error_("data is empty");
     44        FetchData(&x_interp,&N_interp,XINTERP);   if(N_interp<1) _error_("no interpolation requested");
     45        FetchData(&y_interp,&test,YINTERP);       if(test!=N_interp) _error_("vectors x_interp and y_interp should have the same length");
    4646        FetchData(&options,NRHS,nrhs,ARGUMENTS);
    4747
  • issm/branches/trunk-jpl-damage/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp

    r12878 r13101  
    7676        /*some checks*/
    7777        if (x_data_rows!=y_data_rows || x_data_rows!=z_data_rows){
    78                 _error2_("vectors x, y and z should have the same length!");
     78                _error_("vectors x, y and z should have the same length!");
    7979        }
    8080        if (x_prime_rows!=y_prime_rows || x_prime_rows!=z_prime_rows){
    81                 _error2_("vectors x_prime, y_prime and z_prime should have the same length!");
     81                _error_("vectors x_prime, y_prime and z_prime should have the same length!");
    8282        }
    8383        /*get number of elements and number of nodes in the data*/
  • issm/branches/trunk-jpl-damage/src/modules/KMLFileRead/KMLFileRead.cpp

    r12878 r13101  
    4545        /*checks on arguments on the matlab side: */
    4646        if (nlhs > NLHS) {
    47                 KMLFileReadUsage(); _error2_("KMLFileRead usage error");
     47                KMLFileReadUsage(); _error_("KMLFileRead usage error");
    4848        }
    4949        if (nrhs < NRHS) {
    50                 KMLFileReadUsage(); _error2_("KMLFileRead usage error");
     50                KMLFileReadUsage(); _error_("KMLFileRead usage error");
    5151        }
    5252
  • issm/branches/trunk-jpl-damage/src/modules/KMLMeshWrite/KMLMeshWrite.cpp

    r12878 r13101  
    4040        /*checks on arguments on the matlab side: */
    4141        if (nlhs > NLHS) {
    42                 KMLMeshWriteUsage(); _error2_("KMLMeshWrite usage error");
     42                KMLMeshWriteUsage(); _error_("KMLMeshWrite usage error");
    4343        }
    4444        if (nrhs < NRHS) {
    45                 KMLMeshWriteUsage(); _error2_("KMLMeshWrite usage error");
     45                KMLMeshWriteUsage(); _error_("KMLMeshWrite usage error");
    4646        }
    4747
     
    5555                        if (notesi && mxIsChar(notesi) && mxGetNumberOfElements(notesi)) {
    5656                                if (!notes) {
    57                                         notes=(char *) xmalloc((mxGetNumberOfElements(notesi)+1)*sizeof(char));
     57                                        notes=xNew<char>(mxGetNumberOfElements(notesi)+1);
    5858                                        mxGetString(notesi,notes,mxGetNumberOfElements(notesi)+1);
    5959                                }
     
    8787
    8888        if (nodecon && (mncon != nnodes))
    89           {_error2_("Nodal connectivity table, if supplied, must be supplied for all nodes.");}
     89          {_error_("Nodal connectivity table, if supplied, must be supplied for all nodes.");}
    9090        else if (!nodecon)
    9191                mncon=nnodes;
    9292        if ((llat != nnodes) || (llng != nnodes) || (llat != llng))
    93                 _error2_("Latitude and longitude vectors must be supplied for all nodes.");
     93                _error_("Latitude and longitude vectors must be supplied for all nodes.");
    9494        if (part && (lprt != nnodes))
    95                 _error2_("Partitioning vector, if supplied, must be supplied for all nodes.");
     95                _error_("Partitioning vector, if supplied, must be supplied for all nodes.");
    9696        if (data && !((mdata == nnodes) || (mdata == melem)))
    97                 _error2_("Data matrix, if supplied, must be supplied for all nodes or all elements.");
     97                _error_("Data matrix, if supplied, must be supplied for all nodes or all elements.");
    9898        if (cmap && (ncmap != 3))
    99                 _error2_("Colormap matrix, if supplied, must have three columns for rgb.");
     99                _error_("Colormap matrix, if supplied, must have three columns for rgb.");
    100100        if (!strlen(filnam))
    101101                strcpy(filnam,"stdout");
  • issm/branches/trunk-jpl-damage/src/modules/KMLOverlay/KMLOverlay.cpp

    r12878 r13101  
    3131        /*checks on arguments on the matlab side: */
    3232        if(nlhs>NLHS){
    33                 KMLOverlayUsage(); _error2_("KMLOverlay usage error");
     33                KMLOverlayUsage(); _error_("KMLOverlay usage error");
    3434        }
    3535        if(nrhs<NRHS){
    36                 KMLOverlayUsage(); _error2_("KMLOverlay usage error");
     36                KMLOverlayUsage(); _error_("KMLOverlay usage error");
    3737        }
    3838
     
    5151
    5252        /*some checks*/
    53         if (nlat !=2) _error2_("Latitudinal axes \"lataxis\" require two double values, not " << nlat << ".");
    54         if (nlong!=2) _error2_("Longitudinal axes \"longaxis\" require two double values, not " << nlong << ".");
    55         if (!nimages) _error2_("No image files provided.");
     53        if (nlat !=2) _error_("Latitudinal axes \"lataxis\" require two double values, not " << nlat << ".");
     54        if (nlong!=2) _error_("Longitudinal axes \"longaxis\" require two double values, not " << nlong << ".");
     55        if (!nimages) _error_("No image files provided.");
    5656
    5757        if ((int)dzip){
     
    9090                if (verbose) _printLine_(czip);
    9191
    92                 if (mexEvalString(czip)) _error2_("Error zipping file \"" << filkmz << "\".");
     92                if (mexEvalString(czip)) _error_("Error zipping file \"" << filkmz << "\".");
    9393                xfree((void**)&czip);
    9494                xfree((void**)&filkmz);
  • issm/branches/trunk-jpl-damage/src/modules/Kml2Exp/Kml2Exp.cpp

    r12878 r13101  
    2222        /*checks on arguments on the matlab side: */
    2323        if (nlhs > NLHS) {
    24                 Kml2ExpUsage(); _error2_("Kml2Exp usage error");
     24                Kml2ExpUsage(); _error_("Kml2Exp usage error");
    2525        }
    2626        if (nrhs < NRHS) {
    27                 Kml2ExpUsage(); _error2_("Kml2Exp usage error");
     27                Kml2ExpUsage(); _error_("Kml2Exp usage error");
    2828        }
    2929
     
    4343
    4444        /*some checks*/
    45         if (sgn !=+1 && sgn!= -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
    46         if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
    47         if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
     45        if (sgn !=+1 && sgn!= -1) _error_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
     46        if (fabs(cm)      > 180.) _error_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
     47        if (sp < 0. || sp >  90.) _error_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
    4848
    4949        /* Run core computations: */
  • issm/branches/trunk-jpl-damage/src/modules/Kriging/Kriging.cpp

    r12878 r13101  
    2222        /*checks on arguments on the matlab side: */
    2323        if (nrhs<NRHS || nlhs>NLHS){
    24                 KrigingUsage(); _error2_("Kriging usage error");
     24                KrigingUsage(); _error_("Kriging usage error");
    2525        }
    2626
    2727        /*Fetch inputs: */
    2828        FetchData(&x,&n_obs,X);
    29         FetchData(&y,&N,Y);                       if(n_obs!=N) _error2_("x and y should have the same size");
    30         FetchData(&observations,&N,OBSERVATIONS); if(n_obs!=N) _error2_("x and observations should have the same size");
     29        FetchData(&y,&N,Y);                       if(n_obs!=N) _error_("x and y should have the same size");
     30        FetchData(&observations,&N,OBSERVATIONS); if(n_obs!=N) _error_("x and observations should have the same size");
    3131        FetchData(&x_interp,&M_interp,&N_interp,XINTERP);
    32         FetchData(&y_interp,&M,&N,YINTERP);       if(N!=N_interp || M!=M_interp) _error2_("x_interp and y_interp should have the same size");
     32        FetchData(&y_interp,&M,&N,YINTERP);       if(N!=N_interp || M!=M_interp) _error_("x_interp and y_interp should have the same size");
    3333        FetchData(&options,NRHS,nrhs,prhs);
    3434
  • issm/branches/trunk-jpl-damage/src/modules/Ll2xy/Ll2xy.cpp

    r12878 r13101  
    2525        /*checks on arguments on the matlab side: */
    2626        if (nlhs > NLHS) {
    27                 Ll2xyUsage(); _error2_("Ll2xy usage error");
     27                Ll2xyUsage(); _error_("Ll2xy usage error");
    2828        }
    2929        if (nrhs < NRHS) {
    30                 Ll2xyUsage(); _error2_("Ll2xy usage error");
     30                Ll2xyUsage(); _error_("Ll2xy usage error");
    3131        }
    3232
     
    4747        /*some checks*/
    4848        if (verbose) _printLine_("Checking inputs:");
    49         if (nlat != nlon){_error2_("Must have same number of lat[" << nlat << "] and lon[" << nlon << "] coordinates.");}
     49        if (nlat != nlon){_error_("Must have same number of lat[" << nlat << "] and lon[" << nlon << "] coordinates.");}
    5050        else                ncoord=nlat;
    51         if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
    52         if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
    53         if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
     51        if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
     52        if (fabs(cm)      > 180.) _error_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
     53        if (sp < 0. || sp >  90.) _error_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
    5454
    5555        x=(double*)mxMalloc(ncoord*sizeof(double));
  • issm/branches/trunk-jpl-damage/src/modules/MeshPartition/MeshPartition.cpp

    r12878 r13101  
    7474
    7575        /*Post process node_partitioning and element_partitioning to be in double format. Metis needed them in int* format: */
    76         element_partitioning=(double*)xmalloc(numberofelements*sizeof(double));
     76        element_partitioning=xNew<double>(numberofelements);
    7777        for (i=0;i<numberofelements;i++){
    7878                element_partitioning[i]=(double)int_element_partitioning[i]+1; //Metis indexing from 0, matlab from 1.
    7979        }
    8080       
    81         node_partitioning=(double*)xmalloc(numberofvertices*sizeof(double));
     81        node_partitioning=xNew<double>(numberofvertices);
    8282        for (i=0;i<numberofvertices;i++){
    8383                node_partitioning[i]=(double)int_node_partitioning[i]+1; //Metis indexing from 0, matlab from 1.
  • issm/branches/trunk-jpl-damage/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp

    r12878 r13101  
    5454        //index
    5555        FetchData(&double_index,&nel,&dummy,INDEX);
    56         if(dummy!=3 && dummy!=6)_error2_("element triangulation should be of 3 or 6 column width!");
    57         index=(int*)xmalloc(nel*3*sizeof(int));
     56        if(dummy!=3 && dummy!=6)_error_("element triangulation should be of 3 or 6 column width!");
     57        index=xNew<int>(nel*3);
    5858        for(i=0;i<nel;i++){
    5959                for(j=0;j<3;j++){
     
    6767        //contours
    6868        numcontours=mxGetNumberOfElements(matlabstructure);
    69         contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
     69        contours=xNew<Contour*>(numcontours);
    7070        for(i=0;i<numcontours;i++){
    7171                //allocate
    72                 contouri=(Contour*)xmalloc(sizeof(Contour));
     72                contouri=xNew<Contour>(1);
    7373                //retrieve dimension of this contour.
    7474                contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
  • issm/branches/trunk-jpl-damage/src/modules/Scotch/Scotch.cpp

    r12878 r13101  
    2525
    2626#ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
    27         _error2_("Scotch not available! Cannot carry out Scotch partitioning!");
     27        _error_("Scotch not available! Cannot carry out Scotch partitioning!");
    2828        #else
    2929
  • issm/branches/trunk-jpl-damage/src/modules/Shp2Kml/Shp2Kml.cpp

    r12878 r13101  
    2525
    2626        #ifndef _HAVE_SHAPELIB_ //only works if shapelib library has been compiled in.
    27         _error2_("Shapelib not available! Cannot carry out shp file translation!");
     27        _error_("Shapelib not available! Cannot carry out shp file translation!");
    2828        #endif
    2929
     
    3333        /*checks on arguments on the matlab side: */
    3434        if (nlhs > NLHS) {
    35                 Shp2KmlUsage(); _error2_("Shp2Kml usage error");
     35                Shp2KmlUsage(); _error_("Shp2Kml usage error");
    3636        }
    3737        if (nrhs < NRHS) {
    38                 Shp2KmlUsage(); _error2_("Shp2Kml usage error");
     38                Shp2KmlUsage(); _error_("Shp2Kml usage error");
    3939        }
    4040
     
    5454
    5555        /*some checks*/
    56         if (sgn < -1 || sgn > +1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north), -1 (south), or 0 (no translation).");
    57         if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
    58         if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
     56        if (sgn < -1 || sgn > +1) _error_("Hemisphere sgn=" << sgn << " must be +1 (north), -1 (south), or 0 (no translation).");
     57        if (fabs(cm)      > 180.) _error_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
     58        if (sp < 0. || sp >  90.) _error_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
    5959
    6060        /* Run core computations: */
  • issm/branches/trunk-jpl-damage/src/modules/StringToEnum/StringToEnum.cpp

    r12878 r13101  
    55#include "./StringToEnum.h"
    66
    7 void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
     7WRAPPER(StringToEnum){
    88
    99        char    *name    = NULL;
    1010        int      enum_out;
    1111
    12         /*checks on arguments on the matlab side: */
    13         if(nrhs!=NRHS){
    14                 StringToEnumUsage(); _error2_("usage. See above");
    15         }
     12        /*Boot module: */
     13        MODULEBOOT();
     14
     15        /*checks on arguments: */
     16        CHECKARGUMENTS(NLHS,NRHS,&StringToEnumUsage);
    1617
    1718        /*Fetch inputs: */
     
    2324        /* output: */
    2425        WriteData(ENUMOUT,enum_out);
     26
     27        /*end module: */
     28        MODULEEND();
    2529}
    2630
  • issm/branches/trunk-jpl-damage/src/modules/StringToEnum/StringToEnum.h

    r12013 r13101  
    66#define _STRINGTOENUM_H
    77
    8 /* local prototypes: */
    9 void StringToEnumUsage(void);
     8#ifdef HAVE_CONFIG_H
     9#include <config.h>
     10#else
     11#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
     12#endif
    1013
     14/*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/
     15#ifdef _HAVE_PYTHON_
     16#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
     17#endif
     18
     19/*Header files: */
    1120#include "../../c/include/globals.h"
    1221#include "../../c/modules/modules.h"
     
    1524#include "../../c/issm-binding.h"
    1625   
     26#ifdef _HAVE_MATLAB_MODULES_
    1727/* serial input macros: */
    1828#define NAME (mxArray*)prhs[0]
    19 
    2029/* serial output macros: */
    2130#define ENUMOUT (mxArray**)&plhs[0]
     31#endif
     32
     33#ifdef _HAVE_PYTHON_MODULES_
     34/* serial input macros: */
     35#define NAME PyTuple_GetItem(args,0)
     36/* serial output macros: */
     37#define ENUMOUT output,0
     38#endif
    2239
    2340/* serial arg counts: */
     
    3047#define __FUNCT__  "StringToEnum"
    3148
     49/* local prototypes: */
     50void StringToEnumUsage(void);
     51
    3252#endif  /* _TEST_H */
  • issm/branches/trunk-jpl-damage/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp

    r12878 r13101  
    7373                nel=mxGetM(prhs[0]);
    7474                tindex_in=mxGetPr(prhs[0]);
    75                 index_in=(double*)xmalloc(nel*3*sizeof(double));
     75                index_in=xNew<double>(nel*3);
    7676                for (i=0;i<nel;i++){
    7777                        for (j=0;j<3;j++){
     
    8888                nods=mxGetM(prhs[1]);
    8989                x_inm=mxGetPr(prhs[1]);
    90                 x_in=(double*)xmalloc(nods*sizeof(double));
     90                x_in=xNew<double>(nods);
    9191                for (i=0;i<nods;i++){
    9292                        x_in[i]=x_inm[i];
     
    100100        if(mxIsDouble(prhs[2])){
    101101                y_inm=mxGetPr(prhs[2]);
    102                 y_in=(double*)xmalloc(nods*sizeof(double));
     102                y_in=xNew<double>(nods);
    103103                for (i=0;i<nods;i++){
    104104                        y_in[i]=y_inm[i];
     
    113113                num_seg=mxGetM(prhs[3]);
    114114                tsegments_in=mxGetPr(prhs[3]);
    115                 segments_in=(double*)xmalloc(num_seg*3*sizeof(double));
     115                segments_in=xNew<double>(num_seg*3);
    116116                for (i=0;i<num_seg;i++){
    117117                        for (j=0;j<3;j++){
     
    127127        if(mxIsDouble(prhs[4])){
    128128                tsegmentmarkers_in=mxGetPr(prhs[4]);
    129                 segmentmarkers_in=(double*)xmalloc(num_seg*sizeof(double));
     129                segmentmarkers_in=xNew<double>(num_seg);
    130130                for (i=0;i<num_seg;i++){
    131131                        segmentmarkers_in[i]=tsegmentmarkers_in[i];
  • issm/branches/trunk-jpl-damage/src/modules/Xy2ll/Xy2ll.cpp

    r12878 r13101  
    2424        /*checks on arguments on the matlab side: */
    2525        if (nlhs > NLHS) {
    26                 Xy2llUsage(); _error2_("Xy2ll usage error");
     26                Xy2llUsage(); _error_("Xy2ll usage error");
    2727        }
    2828        if (nrhs < NRHS) {
    29                 Xy2llUsage(); _error2_("Xy2ll usage error");
     29                Xy2llUsage(); _error_("Xy2ll usage error");
    3030        }
    3131
     
    4545
    4646        /*some checks*/
    47         if   (nx != ny){_error2_("Must have same number of x[" << nx << "] and y[" << ny << "] coordinates.");}
     47        if   (nx != ny){_error_("Must have same number of x[" << nx << "] and y[" << ny << "] coordinates.");}
    4848        else            ncoord=nx;
    49         if (sgn != +1 && sgn != -1) _error2_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
    50         if (fabs(cm)      > 180.) _error2_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
    51         if (sp < 0. || sp >  90.) _error2_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
     49        if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=" << sgn << " must be +1 (north) or -1 (south).");
     50        if (fabs(cm)      > 180.) _error_("Central meridian cm=" << cm << " must be between -180 (west) and +180 (east) degrees.");
     51        if (sp < 0. || sp >  90.) _error_("Standard parallel sp=" << sp << " must be between 0 and 90 degrees (in specified hemisphere).");
    5252
    5353        lat=(double*)mxMalloc(ncoord*sizeof(double));
  • issm/branches/trunk-jpl-damage/src/modules/matlab/Makefile.am

    r12878 r13101  
    1 INCLUDES = @DAKOTAINCL@ @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @SPOOLESINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
     1AM_CPPFLAGS = @DAKOTAINCL@ @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @SPOOLESINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
     2
    23EXEEXT=$(MATLABWRAPPEREXT)
    3 #Bin programs {{{1
     4
     5#Modules {{{1
    46if MODULES
    5 bin_PROGRAMS =  AverageFilter\
    6                                 BamgMesher\
    7                                 BamgConvertMesh\
    8                                 BamgTriangulate\
    9                                 Chaco\
    10                                 ContourToMesh \
    11                                 ContourToNodes \
    12                                 ElementConnectivity\
    13                                 EnumToString\
    14                                 Exp2Kml \
    15                                 HoleFiller \
    16                                 InternalFront\
    17                                 InterpFromGridToMesh \
    18                                 InterpFromMeshToMesh2d \
    19                                 InterpFromMeshToMesh3d \
    20                                 InterpFromMeshToGrid \
    21                                 InterpFromMesh2d \
    22                                 KMLFileRead \
    23                                 KMLMeshWrite \
    24                                 KMLOverlay \
    25                                 Kml2Exp \
    26                                 Kriging \
    27                                 Ll2xy \
    28                                 NodeConnectivity \
    29                                 MeshPartition\
    30                                 MeshProfileIntersection\
    31                                 PointCloudFindNeighbors\
    32                                 PropagateFlagsFromConnectivity\
    33                                 Scotch\
    34                                 Shp2Kml\
    35                                 StringToEnum\
    36                                 TriaSearch\
    37                                 TriMesh\
    38                                 TriMeshProcessRifts\
    39                                 Xy2ll
     7lib_LTLIBRARIES =  AverageFilter.la\
     8                               BamgMesher.la\
     9                                   BamgConvertMesh.la\
     10                                   BamgTriangulate.la\
     11                                   ContourToMesh.la\
     12                                   ContourToNodes.la\
     13                                   ElementConnectivity.la\
     14                                   EnumToString.la\
     15                                   Exp2Kml.la\
     16                                   HoleFiller.la\
     17                                   InternalFront.la\
     18                                   InterpFromGridToMesh.la\
     19                                   InterpFromMeshToMesh2d.la\
     20                                   InterpFromMeshToMesh3d.la\
     21                                   InterpFromMeshToGrid.la\
     22                                   InterpFromMesh2d.la\
     23                                   KMLFileRead.la\
     24                                   KMLMeshWrite.la\
     25                                   KMLOverlay.la\
     26                                   Kml2Exp.la\
     27                                   Kriging.la\
     28                                   Ll2xy.la\
     29                                   NodeConnectivity.la\
     30                                   MeshPartition.la\
     31                                   MeshProfileIntersection.la\
     32                                   PointCloudFindNeighbors.la\
     33                                   PropagateFlagsFromConnectivity.la\
     34                                   Shp2Kml.la\
     35                                   StringToEnum.la\
     36                                   TriaSearch.la\
     37                                   TriMesh.la\
     38                                   TriMeshProcessRifts.la\
     39                                   Scotch.la\
     40                                   Xy2ll.la\
     41                   Chaco.la
    4042endif
    4143#}}}
    4244#Flags and libraries {{{1
    43 LDADD = ../../c/libISSMCore.a ../../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(SPOOLESLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
     45if SHAREDLIBS
     46deps = ../../c/libISSMCore.la ../../c/libISSMModules.la
     47else
     48deps = ../../c/libISSMCore.a ../../c/libISSMModules.a
     49endif
     50
     51deps +=  $(MATHLIB) ${MEXLIB}
     52
     53#$(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(SPOOLESLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
    4454
    4555#Triangle library
     
    4757
    4858#Matlab part
    49 AM_LDFLAGS   = $(MEXLINK)
     59AM_LDFLAGS = $(MEXLINK) -shrext ${EXEEXT} -module
     60if VERSION
     61AM_LDFLAGS +=
     62else
     63AM_LDFLAGS += -avoid-version
     64endif
     65if SHAREDLIBS
     66deps += ../../c/libISSMMatlab.la
     67else
     68deps += ../../c/libISSMMatlab.a
     69AM_LDFLAGS += --no-warnings
     70endif
     71
    5072AM_CXXFLAGS +=  -D_HAVE_MATLAB_MODULES_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
    51 LDADD       += $(MEXLIB) ../../c/libISSMMatlab.a
    52 LDADD       += ../../c/libISSMCore.a
    53 if CIRCULAR_DEPENDENCIES
    54 LDADD       += $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(SPOOLESLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
    55 endif
    56 LDADD       += ../../c/libISSMModules.a
     73
     74######################################################################################
     75# Circular dependencies may not be necessary here.
     76#deps += ../../c/libISSMCore.a
     77#if CIRCULAR_DEPENDENCIES
     78#deps += $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(SPOOLESLIB) $(MUMPSLIB) $(SUPERLULIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
     79#endif
     80######################################################################################
     81
     82if SHAREDLIBS
     83deps +=
     84else
     85deps += ../../c/libISSMModules.a ../../c/libISSMCore.a
     86endif
    5787
    5888#Optimization flags:
    5989AM_CXXFLAGS += $(CXXOPTFLAGS)
    6090#}}}
     91
    6192#Bin sources {{{1
    62 AverageFilter_SOURCES = ../AverageFilter/AverageFilter.cpp\
     93AverageFilter_la_SOURCES = ../AverageFilter/AverageFilter.cpp\
    6394                          ../AverageFilter/AverageFilter.h
    64 
    65 BamgMesher_SOURCES = ../BamgMesher/BamgMesher.cpp\
     95AverageFilter_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     96
     97BamgMesher_la_SOURCES = ../BamgMesher/BamgMesher.cpp\
    6698                                        ../BamgMesher/BamgMesher.h
    67 
    68 BamgConvertMesh_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp\
     99BamgMesher_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     100
     101BamgConvertMesh_la_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp\
    69102                                        ../BamgConvertMesh/BamgConvertMesh.h
    70 
    71 BamgTriangulate_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp\
     103BamgConvertMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     104
     105BamgTriangulate_la_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp\
    72106                                                                  ../BamgTriangulate/BamgTriangulate.h
    73 
    74 Chaco_SOURCES = ../Chaco/Chaco.cpp\
     107BamgTriangulate_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     108
     109Chaco_la_SOURCES = ../Chaco/Chaco.cpp\
    75110                                        ../Chaco/Chaco.h
    76 
    77 ContourToMesh_SOURCES = ../ContourToMesh/ContourToMesh.cpp\
    78                           ../ContourToMesh/ContourToMesh.h
    79 
    80 ContourToNodes_SOURCES = ../ContourToNodes/ContourToNodes.cpp\
     111Chaco_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(CHACOLIB)
     112
     113ContourToMesh_la_SOURCES = ../ContourToMesh/ContourToMesh.cpp\
     114                                       ../ContourToMesh/ContourToMesh.h
     115ContourToMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB)
     116
     117ContourToNodes_la_SOURCES = ../ContourToNodes/ContourToNodes.cpp\
    81118                          ../ContourToNodes/ContourToNodes.h
    82 
    83 ElementConnectivity_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp\
     119ContourToNodes_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     120
     121ElementConnectivity_la_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp\
    84122                          ../ElementConnectivity/ElementConnectivity.h
    85 
    86 EnumToString_SOURCES = ../EnumToString/EnumToString.cpp\
     123ElementConnectivity_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     124
     125EnumToString_la_SOURCES = ../EnumToString/EnumToString.cpp\
    87126                          ../EnumToString/EnumToString.h
    88 
    89 StringToEnum_SOURCES = ../StringToEnum/StringToEnum.cpp\
     127EnumToString_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     128
     129StringToEnum_la_SOURCES = ../StringToEnum/StringToEnum.cpp\
    90130                          ../StringToEnum/StringToEnum.h
    91 
    92 HoleFiller_SOURCES = ../HoleFiller/HoleFiller.cpp\
     131StringToEnum_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     132
     133HoleFiller_la_SOURCES = ../HoleFiller/HoleFiller.cpp\
    93134                          ../HoleFiller/HoleFiller.h
    94 
    95 InternalFront_SOURCES = ../InternalFront/InternalFront.cpp\
     135HoleFiller_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     136
     137InternalFront_la_SOURCES = ../InternalFront/InternalFront.cpp\
    96138                                                                                 ../InternalFront/InternalFront.h
    97 
    98 InterpFromGridToMesh_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp\
     139InternalFront_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     140
     141InterpFromGridToMesh_la_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp\
    99142                          ../InterpFromGridToMesh/InterpFromGridToMesh.h
    100 
    101 InterpFromMeshToMesh2d_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
     143InterpFromGridToMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB)
     144
     145InterpFromMeshToMesh2d_la_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
    102146                                                        ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
    103 
    104 InterpFromMeshToMesh3d_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp\
     147InterpFromMeshToMesh2d_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB)
     148
     149InterpFromMeshToMesh3d_la_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp\
    105150                                                                        ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
    106 
    107 InterpFromMeshToGrid_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp\
     151InterpFromMeshToMesh3d_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     152
     153InterpFromMeshToGrid_la_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp\
    108154                                                                        ../InterpFromMeshToGrid/InterpFromMeshToGrid.h
    109 
    110 InterpFromMesh2d_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp\
     155InterpFromMeshToGrid_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     156
     157InterpFromMesh2d_la_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp\
    111158                                                                        ../InterpFromMesh2d/InterpFromMesh2d.h
    112 
    113 KMLFileRead_SOURCES = ../KMLFileRead/KMLFileRead.cpp\
     159InterpFromMesh2d_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB)
     160
     161KMLFileRead_la_SOURCES = ../KMLFileRead/KMLFileRead.cpp\
    114162                          ../KMLFileRead/KMLFileRead.h
    115 
    116 KMLMeshWrite_SOURCES = ../KMLMeshWrite/KMLMeshWrite.cpp\
     163KMLFileRead_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     164
     165KMLMeshWrite_la_SOURCES = ../KMLMeshWrite/KMLMeshWrite.cpp\
    117166                          ../KMLMeshWrite/KMLMeshWrite.h
    118 
    119 KMLOverlay_SOURCES = ../KMLOverlay/KMLOverlay.cpp\
     167KMLMeshWrite_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     168
     169KMLOverlay_la_SOURCES = ../KMLOverlay/KMLOverlay.cpp\
    120170                          ../KMLOverlay/KMLOverlay.h
    121 
    122 Xy2ll_SOURCES = ../Xy2ll/Xy2ll.cpp\
     171KMLOverlay_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     172
     173Xy2ll_la_SOURCES = ../Xy2ll/Xy2ll.cpp\
    123174                          ../Xy2ll/Xy2ll.h
    124 
    125 Ll2xy_SOURCES = ../Ll2xy/Ll2xy.cpp\
     175Xy2ll_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     176
     177Ll2xy_la_SOURCES = ../Ll2xy/Ll2xy.cpp\
    126178                          ../Ll2xy/Ll2xy.h
    127 
    128 Exp2Kml_SOURCES = ../Exp2Kml/Exp2Kml.cpp\
     179Ll2xy_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     180
     181Exp2Kml_la_SOURCES = ../Exp2Kml/Exp2Kml.cpp\
    129182                          ../Exp2Kml/Exp2Kml.h
    130 
    131 Kml2Exp_SOURCES = ../Kml2Exp/Kml2Exp.cpp\
     183Exp2Kml_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     184
     185Kml2Exp_la_SOURCES = ../Kml2Exp/Kml2Exp.cpp\
    132186                          ../Kml2Exp/Kml2Exp.h
    133 
    134 Kriging_SOURCES = ../Kriging/Kriging.cpp\
     187Kml2Exp_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     188
     189Kriging_la_SOURCES = ../Kriging/Kriging.cpp\
    135190                                                ../Kriging/Kriging.h
    136 
    137 MeshPartition_SOURCES = ../MeshPartition/MeshPartition.cpp\
     191Kriging_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB)
     192
     193MeshPartition_la_SOURCES = ../MeshPartition/MeshPartition.cpp\
    138194                          ../MeshPartition/MeshPartition.h
    139 
    140 MeshProfileIntersection_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp\
     195MeshPartition_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     196
     197MeshProfileIntersection_la_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp\
    141198                          ../MeshProfileIntersection/MeshProfileIntersection.h
    142 
    143 NodeConnectivity_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\
     199MeshProfileIntersection_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     200
     201NodeConnectivity_la_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\
    144202                                                                                ../NodeConnectivity/NodeConnectivity.h
    145 
    146 PointCloudFindNeighbors_SOURCES = ../PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
     203NodeConnectivity_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     204
     205PointCloudFindNeighbors_la_SOURCES = ../PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
    147206                          ../PointCloudFindNeighbors/PointCloudFindNeighbors.h
    148 
    149 PropagateFlagsFromConnectivity_SOURCES = ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp\
     207PointCloudFindNeighbors_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(MULTITHREADINGLIB)
     208
     209PropagateFlagsFromConnectivity_la_SOURCES = ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp\
    150210                          ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
    151 
    152 Scotch_SOURCES = ../Scotch/Scotch.cpp\
    153                           ../Scotch/Scotch.h
    154 
    155 Shp2Kml_SOURCES = ../Shp2Kml/Shp2Kml.cpp\
    156                           ../Shp2Kml/Shp2Kml.h
    157 
    158 TriaSearch_SOURCES = ../TriaSearch/TriaSearch.cpp\
     211PropagateFlagsFromConnectivity_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     212
     213Scotch_la_SOURCES = ../Scotch/Scotch.cpp\
     214                    ../Scotch/Scotch.h
     215Scotch_la_LIBADD = ${deps} $(SCOTCHLIB)
     216
     217Shp2Kml_la_SOURCES = ../Shp2Kml/Shp2Kml.cpp\
     218                     ../Shp2Kml/Shp2Kml.h
     219Shp2Kml_la_LIBADD = ${deps}
     220
     221TriaSearch_la_SOURCES = ../TriaSearch/TriaSearch.cpp\
    159222                          ../TriaSearch/TriaSearch.h
    160 
    161 TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
    162                           ../TriMesh/TriMesh.h
    163 
    164 TriMeshProcessRifts_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp\
     223TriaSearch_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
     224
     225TriMesh_la_SOURCES = ../TriMesh/TriMesh.cpp\
     226                     ../TriMesh/TriMesh.h
     227TriMesh_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(TRIANGLELIB)
     228
     229TriMeshProcessRifts_la_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp\
    165230                          ../TriMeshProcessRifts/TriMeshProcessRifts.h
     231TriMeshProcessRifts_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB)
    166232#}}}
  • issm/branches/trunk-jpl-damage/src/modules/python/Makefile.am

    r12878 r13101  
    1 INCLUDES = @DAKOTAINCL@ @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
     1AM_CPPFLAGS = @DAKOTAINCL@ @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
    22EXEEXT=$(PYTHONWRAPPEREXT)
    33#Bin programs {{{1
    44if MODULES
    55bin_PROGRAMS = ElementConnectivity\
     6                           EnumToString\
    67                           InterpFromMeshToMesh2d \
    78                           NodeConnectivity\
    8                            TriMesh
     9                           StringToEnum\
     10                           TriMesh
    911endif
    1012#}}}
     
    3234                          ../ElementConnectivity/ElementConnectivity.h
    3335
     36EnumToString_SOURCES = ../EnumToString/EnumToString.cpp\
     37                          ../EnumToString/EnumToString.h
     38
    3439InterpFromMeshToMesh2d_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
    3540                                                        ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
     
    3843                                                                                ../NodeConnectivity/NodeConnectivity.h
    3944
     45StringToEnum_SOURCES = ../StringToEnum/StringToEnum.cpp\
     46                          ../StringToEnum/StringToEnum.h
     47
    4048TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
    4149                          ../TriMesh/TriMesh.h
  • issm/branches/trunk-jpl-damage/startup.m

    r12168 r13101  
    2727
    2828%ISSM path
    29 addpath([ISSM_DIR '/src/m/utils/']); %loads recursivepath
     29addpath([ISSM_DIR '/src/m/os/']); %loads recursivepath
    3030addpath([ISSM_DIR '/bin']);
     31addpath([ISSM_DIR '/lib']);
    3132addpath(recursivepath([ISSM_DIR '/src/m']));
    3233addpath(recursivepath([ISSM_DIR '/externalpackages/scotch']));
  • issm/branches/trunk-jpl-damage/test/NightlyRun/IdToName.py

    r12946 r13101  
    6767                234 : 'SquareShelfTranForceNeg2dDakotaSamp',
    6868                235 : 'SquareShelfTranForceNeg2dDakotaLocal',
    69                 236 : 'SquareShelfTranIspddIsdeltaM2d';
    70                 237 : 'SquareShelfTranIspddIsdeltaM3d';
     69                236 : 'SquareShelfTranIspddIsdeltaM2d',
     70                237 : 'SquareShelfTranIspddIsdeltaM3d',
    7171                301 : 'SquareSheetConstrainedDiagM2d',
    7272                302 : 'SquareSheetConstrainedDiagH2d',
  • issm/branches/trunk-jpl-damage/test/NightlyRun/runme.m

    r12878 r13101  
    7272% }}}
    7373%GET ids  {{{1
    74 list=dir;%use dir, as it seems to act OS independent
     74flist=dir;%use dir, as it seems to act OS independent
    7575list_ids=[];
    76 for i=1:numel(list),
    77         if ( strncmp(list(i).name,'test',4) &...                         %File name must start with 'test'
    78                         strncmp(fliplr(list(i).name),fliplr('.m'),2)&...           %File name must end by '.m'
    79                         ~strcmp(list(i).name,'test.m'))                            %File name must be different than 'test.m'
    80                 list_ids(end+1)=eval(list(i).name(5:end-2));                  %Keep test id only (skip 'test' and '.m')
     76for i=1:numel(flist),
     77        if ( strncmp(flist(i).name,'test',4) &...                         %File name must start with 'test'
     78                        strncmp(fliplr(flist(i).name),fliplr('.m'),2)&...           %File name must end by '.m'
     79                        ~strcmp(flist(i).name,'test.m'))                            %File name must be different than 'test.m'
     80                list_ids(end+1)=eval(flist(i).name(5:end-2));                  %Keep test id only (skip 'test' and '.m')
    8181        end
    8282end
  • issm/branches/trunk-jpl-damage/test/NightlyRun/runme.py

    r12878 r13101  
    4242        from parallelrange import parallelrange
    4343        from IdToName import IdToName
     44        from MatlabFuncs import *
    4445
    4546        #Get ISSM_DIR variable
     
    4950        #Process options
    5051        #GET benchmark {{{1
    51         if not benchmark.lower() in ['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing']:
     52        if not ismember(benchmark,['all','nightly','ismip','eismint','thermal','mesh','validation','tranforcing']):
    5253                print "runme warning: benchmark '%s' not supported, defaulting to test 'nightly'." % benchmark
    5354                benchmark='nightly'
    5455        # }}}
    5556        #GET procedure {{{1
    56         if not procedure.lower() in ['check','update']:
     57        if not ismember(procedure,['check','update']):
    5758                print "runme warning: procedure '%s' not supported, defaulting to test 'check'." % procedure
    5859                procedure='check'
    5960        # }}}
    6061        #GET output {{{1
    61         if not output.lower() in ['nightly','daily','none']:
     62        if not ismember(output,['nightly','daily','none']):
    6263                print "runme warning: output '%s' not supported, defaulting to test 'none'." % output
    6364                output='none'
     
    107108
    108109        #Process Ids according to benchmarks {{{1
    109         if   benchmark.lower() == 'nightly':
     110        if   strcmpi(benchmark,'nightly'):
    110111                test_ids=test_ids.intersection(set(range(1,1000)))
    111         elif benchmark.lower() == 'ismip':
     112        elif strcmpi(benchmark,'ismip'):
    112113                test_ids=test_ids.intersection(set(range(1101,1200)))
    113         elif benchmark.lower() == 'eismint':
     114        elif strcmpi(benchmark,'eismint'):
    114115                test_ids=test_ids.intersection(set(range(1201,1300)))
    115         elif benchmark.lower() == 'thermal':
     116        elif strcmpi(benchmark,'thermal'):
    116117                test_ids=test_ids.intersection(set(range(1301,1400)))
    117         elif benchmark.lower() == 'mesh':
     118        elif strcmpi(benchmark,'mesh'):
    118119                test_ids=test_ids.intersection(set(range(1401,1500)))
    119         elif benchmark.lower() == 'validation':
     120        elif strcmpi(benchmark,'validation'):
    120121                test_ids=test_ids.intersection(set(range(1001,2000)))
    121         elif benchmark.lower() == 'tranforcing':
     122        elif strcmpi(benchmark,'tranforcing'):
    122123                test_ids=test_ids.intersection(set(range(1501,1503)))
    123124#       print 'test_ids after benchmark =',test_ids
     
    139140                        #UPDATE ARCHIVE?
    140141                        archive_name='Archive'+str(id)
    141                         if procedure.lower() == 'update':
    142 
    143                                 if not socket.gethostname().lower().split('.')[0] == 'larsen':
     142                        if strcmpi(procedure,'update'):
     143
     144                                if not strcmp(socket.gethostname().lower().split('.')[0],'larsen'):
    144145#                                       raise RuntimeError("Nightly run archives must be saved on 'larsen' (hostname is '"+socket.gethostname()+"').")
    145146                                        print "Nightly run archives must be saved on 'larsen' (hostname is '"+socket.gethostname()+"')."
     
    200201                                                directory=os.getcwd().split('/')    #  not used?
    201202                                                message=me2
    202                                                 if   output.lower() == 'nightly':
     203                                                if   strcmpi(output,'nightly'):
    203204                                                        fid=open(os.path.join(ISSM_DIR,'nightlylog','matlaberror.log'), 'a')
    204205                                                        fid.write('%s' % message)
     
    206207                                                        fid.close()
    207208                                                        print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,fieldname)
    208                                                 elif output.lower() == 'daily':
     209                                                elif strcmpi(output,'daily'):
    209210                                                        fid=open(os.path.join(ISSM_DIR,'dailylog','matlaberror.log'), 'a')
    210211                                                        fid.write('%s' % message)
     
    223224                        directory=os.getcwd().split('/')    #  not used?
    224225                        message=me
    225                         if   output.lower() == 'nightly':
     226                        if   strcmpi(output,'nightly'):
    226227                                fid=open(os.path.join(ISSM_DIR+'nightlylog','matlaberror.log'), 'a')
    227228                                fid.write('%s' % message)
     
    229230                                fid.close()
    230231                                print 'FAILURE difference: N/A test id: %i test name: %s field: %s' % (id,id_string,'N/A')
    231                         elif output.lower() == 'daily':
     232                        elif strcmpi(output,'daily'):
    232233                                fid=open(os.path.join(ISSM_DIR+'dailylog','matlaberror.log'), 'a')
    233234                                fid.write('%s' % message)
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test101.py

    r12946 r13101  
    1414md=setflowequation(md,'macayeal','all')
    1515md.cluster=generic('name',oshostname(),'np',3)
    16 md.diagnostic.requested_outputs=StressTensorEnum
    17 md=solve(md,DiagnosticSolutionEnum)
     16md.diagnostic.requested_outputs=StressTensorEnum()
     17md=solve(md,DiagnosticSolutionEnum())
    1818
    1919#Fields and tolerances to track changes
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test218.m

    r12878 r13101  
    8484
    8585%Fields and tolerances to track changes
    86 md=tres(md,'dakota');
     86md.qmu.results=md.results.dakota;
    8787md.results.dakota.importancefactors=importancefactors(md,'scaled_MaterialsRheologyB','MaxVel')';
    8888field_names     ={'importancefactors'};
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test225.m

    r12878 r13101  
    22md=setmask(md,'all','');
    33md=parameterize(md,'../Par/SquareShelf.par');
     4md.geometry.bed=md.geometry.bed+50; md.geometry.surface=md.geometry.surface+50;
    45md=extrude(md,3,1);
    56md=setflowequation(md,'pattyn','all');
    6 md.geometry.bed=md.geometry.bed+50; md.geometry.surface=md.geometry.surface+50;
    77md.cluster=generic('name',oshostname(),'np',3);
    88md.prognostic.hydrostatic_adjustment='Incremental';
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test234.m

    r12878 r13101  
    5656%solve
    5757md=solve(md,TransientSolutionEnum,'overwrite','y');
    58 md=tres(md,'dakota');
     58md.qmu.results=md.results.dakota;
    5959
    6060%Fields and tolerances to track changes
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test235.m

    r12878 r13101  
    5656%solve
    5757md=solve(md,TransientSolutionEnum,'overwrite','y');
    58 md=tres(md,'dakota');
     58md.qmu.results=md.results.dakota;
    5959
    6060%Fields and tolerances to track changes
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test412.m

    r12878 r13101  
    3636
    3737%Fields and tolerances to track changes
    38 md=tres(md,'dakota');
     38md.qmu.results=md.results.dakota;
    3939md.results.dakota.importancefactors=importancefactors(md,'scaled_FrictionCoefficient','MaxVel')';
    4040field_names     ={'importancefactors'};
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test413.m

    r12878 r13101  
    3737
    3838%Fields and tolerances to track changes
    39 md=tres(md,'dakota');
     39md.qmu.results=md.results.dakota;
    4040md.results.dakota.importancefactors=importancefactors(md,'scaled_FrictionCoefficient','MaxVel')';
    4141field_names     ={'importancefactors'};
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test414.m

    r12878 r13101  
    4949%solve
    5050md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
    51 md=tres(md,'dakota');
     51md.qmu.results=md.results.dakota;
    5252
    5353%Fields and tolerances to track changes
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test417.m

    r12878 r13101  
    5353
    5454%Fields and tolerances to track changes
    55 md=tres(md,'dakota');
     55md.qmu.results=md.results.dakota;
    5656
    5757%ok, mass flux of 3 profiles should be -3 Gt/yr -3 Gt/yr and the sum, which is -6 Gt/yr
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test420.m

    r12878 r13101  
    3333%solve
    3434md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
    35 md=tres(md,'dakota');
     35md.qmu.results=md.results.dakota;
    3636
    3737%test on thickness
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test511.m

    r12878 r13101  
    88md=extrude(md,3,1);
    99md=setflowequation(md,'stokes','all');
    10 md=modelextract(md,md.mask.elementonfloatingice);
     10md=extract(md,md.mask.elementonfloatingice);
    1111
    1212%control parameters
  • issm/branches/trunk-jpl-damage/test/NightlyRun/test613.m

    r12878 r13101  
    66
    77%Ice sheet only
    8 md=modelextract(md,md.mask.elementongroundedice);
     8md=extract(md,md.mask.elementongroundedice);
    99pos=find(md.mesh.vertexonboundary);
    1010md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
  • issm/branches/trunk-jpl-damage/test/Par/SquareShelfConstrained.py

    r12878 r13101  
    22from verbose import *
    33import scipy.io as matio
    4 import InterpFromMeshToMesh2d as im
    5 from   paterson import  *
     4from InterpFromMeshToMesh2d import InterpFromMeshToMesh2d
     5from paterson import  *
    66from SetIceShelfBC import *
    77import inspect
     8import os.path
    89
    910#Start defining model parameters here
     
    2930index=reshape(index.T,(len(index),3),order='F')
    3031
    31 md.initialization.vx = im.InterpFromMeshToMesh2d(index, x, y, vx, md.mesh.x, md.mesh.y)
    32 md.initialization.vy = im.InterpFromMeshToMesh2d(index, x, y, vy, md.mesh.x, md.mesh.y)
     32[md.initialization.vx] = InterpFromMeshToMesh2d(index, x, y, vx, md.mesh.x, md.mesh.y)
     33[md.initialization.vy] = InterpFromMeshToMesh2d(index, x, y, vy, md.mesh.x, md.mesh.y)
    3334md.initialization.vz = zeros(md.mesh.numberofvertices)
    3435md.initialization.pressure = zeros(md.mesh.numberofvertices)
     
    6263#Change name so that no tests have the same name
    6364if len(inspect.stack()) > 2:
    64     md.miscellaneous.name = inspect.stack()[2][1].split('.')[0]
     65        md.miscellaneous.name = os.path.basename(inspect.stack()[2][1]).split('.')[0]
    6566
Note: See TracChangeset for help on using the changeset viewer.