Changeset 12168
- Timestamp:
- 05/01/12 17:28:47 (13 years ago)
- Location:
- issm/branches/trunk-jpl-damage
- Files:
-
- 172 deleted
- 393 edited
- 75 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-jpl-damage ¶
- Property svn:ignore
-
TabularUnified
old new 7 7 config.status 8 8 configure 9 doxygen10 9 ISSM.paf 11 10 ISSM.ppf 12 11 ISSM.ppf_cache 13 12 libtool 14 list15 13 Makefile 16 14 Makefile.in 17 15 stamp-h1 18 16 svn-commit* 19 nightlylog
-
- Property svn:mergeinfo changed
/issm/trunk merged: 11526,11533,11681-11682,11710,11778-11779,11995 /issm/trunk-jpl merged: 11992-11994,11996-12003,12005-12113,12115-12161,12163-12166
- Property svn:ignore
-
issm/branches/trunk-jpl-damage/bin ¶
- Property svn:ignore
-
TabularUnified
old new 11 11 *.bat 12 12 *.rtf 13 *.py
-
- Property svn:ignore
-
TabularUnified issm/branches/trunk-jpl-damage/configs/config-altix64-castor.sh ¶
r11174 r12168 1 1 #!/bin/csh 2 2 3 ./configure --prefix=$ISSM_ TIER --with-serial=no --with-metis-dir=$ISSM_TIER/externalpackages/metis/install --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install --with-mpi-include=/usr/include --with-mpi-lib="-L/usr/lib -lmpi" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install --with-mkl-dir=/opt/intel/mkl/9.1.023/lib/64 --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH/ --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH/ --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH --with-graphics-lib=/usr/X11R6/lib/libX11.so3 ./configure --prefix=$ISSM_DIR --with-serial=no --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=/usr/include --with-mpi-lib="-L/usr/lib -lmpi" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install --with-mkl-dir=/opt/intel/mkl/9.1.023/lib/64 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH --with-graphics-lib=/usr/X11R6/lib/libX11.so -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-cosmos.sh ¶
r11174 r12168 1 1 #!/bin/csh 2 2 3 ./configure --prefix=$ISSM_ TIER --with-serial=no --with-metis-dir=$ISSM_TIER/externalpackages/metis/install --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install --with-mpi-include=/opt/mpich/gm/intel10.1/include --with-mpi-lib="-L/opt/mpich/gm/intel10.1/lib -lmpich -L/usr/local/gm/lib/ -lgm -lpthread -lrt" --with-petsc-arch=$ISSM_ARCH --with-mkl-dir=/opt/intel/mkl/10.0.5.025/lib/32/ --with-plapack-dir="-L$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH/ --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH/ --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH --with-vendor=intel-linux --with-graphics-lib=/usr/X11R6/lib/libX11.so3 ./configure --prefix=$ISSM_DIR --with-serial=no --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=/opt/mpich/gm/intel10.1/include --with-mpi-lib="-L/opt/mpich/gm/intel10.1/lib -lmpich -L/usr/local/gm/lib/ -lgm -lpthread -lrt" --with-petsc-arch=$ISSM_ARCH --with-mkl-dir=/opt/intel/mkl/10.0.5.025/lib/32/ --with-plapack-dir="-L$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH --with-vendor=intel-linux --with-graphics-lib=/usr/X11R6/lib/libX11.so -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-greenplanet.sh ¶
r11381 r12168 5 5 6 6 ./configure \ 7 --prefix=$ISSM_ TIER \8 --with- serial=no \9 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \10 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \11 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \7 --prefix=$ISSM_DIR \ 8 --with-modules=no \ 9 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 10 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 11 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 12 12 --with-mpi-include="/sopt/mpi/openmpi-1.5.4_psm/intel/include/" \ 13 13 --with-mpi-lib="-L/sopt/mpi/openmpi-1.5.4_psm/intel/lib/ -lmpi -lmpi_f77" \ 14 14 --with-petsc-arch=$ISSM_ARCH \ 15 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \15 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 16 16 --with-mkl-dir=/opt/intel/mkl/10.2.4.032/ \ 17 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \18 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \19 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \20 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \21 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \17 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 18 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \ 19 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 20 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 21 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 22 22 --with-graphics-lib=/usr/lib64/libX11.so \ 23 23 --with-cxxoptflags="-O3 -xS" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-linux64-astrid-ad.sh ¶
r11174 r12168 2 2 3 3 ./configure \ 4 --prefix=$ISSM_ TIER \4 --prefix=$ISSM_DIR \ 5 5 --with-serial=no\ 6 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \7 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \8 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \9 --with-mpi-lib="-L$ISSM_ TIER/externalpackages/mpich2/install/lib/ -lmpich" \6 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 7 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 8 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 9 --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" \ 10 10 --with-petsc-arch=$ISSM_ARCH \ 11 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \12 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \13 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \14 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \15 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \16 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \11 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 12 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 13 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \ 14 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 15 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 16 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 17 17 --with-graphics-lib=/usr/lib64/libX11.so \ 18 18 --with-cxxoptflags="-march=opteron -O2" \ 19 19 --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" \ 20 --with-rose-dir=$ISSM_ TIER/externalpackages/rose/install/ \21 --with-adic2-dir=$ISSM_ TIER/externalpackages/adic/install/ \20 --with-rose-dir=$ISSM_DIR/externalpackages/rose/install/ \ 21 --with-adic2-dir=$ISSM_DIR/externalpackages/adic/install/ \ 22 22 --with-numthreads=24 \ 23 23 --without-thermal \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-linux64-astrid-petsc2.sh ¶
r11174 r12168 5 5 #mpich 1.0.2 6 6 7 ./configure --prefix=$ISSM_ TIER --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install --with-metis-dir=$ISSM_TIER/externalpackages/metis/install --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3/$ISSM_ARCH --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" --with-graphics-lib=/usr/lib64/libX11.so --with-cxxoptflags="-march=opteron -O2" --with-numthreads=32 --with-scotch-dir=$ISSM_TIER/externalpackages/scotch/install --with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install --enable-debugging --with-shapelib-dir=$ISSM_TIER/externalpackages/shapelib/install\7 ./configure --prefix=$ISSM_DIR --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3/$ISSM_ARCH --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" --with-graphics-lib=/usr/lib64/libX11.so --with-cxxoptflags="-march=opteron -O2" --with-numthreads=32 --with-scotch-dir=$ISSM_DIR/externalpackages/scotch/install --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install --enable-debugging --with-shapelib-dir=$ISSM_DIR/externalpackages/shapelib/install\ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-linux64-astrid.sh ¶
r11174 r12168 3 3 #External packages versions: 4 4 #petsc 3.1 or 3.2 5 #mpich 1. 0.25 #mpich 1.4 6 6 7 7 ./configure \ 8 --prefix=$ISSM_ TIER \8 --prefix=$ISSM_DIR \ 9 9 --with-matlab-dir=$MATLAB_DIR \ 10 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \11 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \12 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \13 --with-tao-dir=$ISSM_ TIER/externalpackages/tao/install \14 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \15 --with-mpi-lib="-L$ISSM_ TIER/externalpackages/mpich2/install/lib/ -lmpich" \10 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 11 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 12 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 13 --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \ 14 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 15 --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich -lmpl " \ 16 16 --with-petsc-arch=$ISSM_ARCH \ 17 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \18 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \19 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \20 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \21 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \22 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \23 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \24 --with-scotch-dir="$ISSM_ TIER/externalpackages/scotch/install" \25 --with-chaco-dir="$ISSM_ TIER/externalpackages/chaco/install" \26 --with-shapelib-dir="$ISSM_ TIER/externalpackages/shapelib/install" \17 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 18 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 19 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 20 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \ 21 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 22 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 23 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 24 --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \ 25 --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \ 26 --with-shapelib-dir="$ISSM_DIR/externalpackages/shapelib/install" \ 27 27 --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" \ 28 28 --with-graphics-lib=/usr/lib64/libX11.so \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-linux64-murdo-ad.sh ¶
r11174 r12168 2 2 3 3 ./configure \ 4 --prefix=$ISSM_ TIER \4 --prefix=$ISSM_DIR \ 5 5 --with-serial=no\ 6 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \7 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \8 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \9 --with-mpi-lib="-L$ISSM_ TIER/externalpackages/mpich2/install/lib/ -lmpich" \6 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 7 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 8 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 9 --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" \ 10 10 --with-petsc-arch=$ISSM_ARCH \ 11 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \12 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \13 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \14 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \15 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \16 --with-hypre-dir=$ISSM_ TIER/externalpackages/petsc/install/ \17 --with-ml-dir=$ISSM_ TIER/externalpackages/petsc/install/ \18 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \11 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 12 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 13 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \ 14 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 15 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 16 --with-hypre-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 17 --with-ml-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 18 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 19 19 --with-graphics-lib=/usr/lib64/libX11.so \ 20 20 --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\ 21 21 --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ -lg2c /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgfortran.a" \ 22 --with-adic2-dir=$ISSM_ TIER/externalpackages/adic/install/ \22 --with-adic2-dir=$ISSM_DIR/externalpackages/adic/install/ \ 23 23 --with-numthreads=24 \ 24 24 --without-thermal \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-linux64-murdo-nopetsc.sh ¶
r12004 r12168 2 2 3 3 ./configure \ 4 --prefix=$ISSM_ TIER \5 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \6 --with-mpi-lib="-L$ISSM_ TIER/externalpackages/mpich2/install/lib/ -lmpich" \4 --prefix=$ISSM_DIR \ 5 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 6 --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" \ 7 7 --with-matlab-dir=$MATLAB_DIR \ 8 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \9 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \10 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install/lib \8 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 9 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 10 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib \ 11 11 --with-graphics-lib=/usr/lib64/libX11.so \ 12 --with-scotch-dir="$ISSM_ TIER/externalpackages/scotch/install" \13 --with-chaco-dir="$ISSM_ TIER/externalpackages/chaco/install" \12 --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \ 13 --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \ 14 14 --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\ 15 15 --with-numthreads=18 \ 16 16 --enable-debugging \ 17 --with-gsl-dir=$ISSM_ TIER/externalpackages/gsl/install17 --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install 18 18 19 19 20 # --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \20 # --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 21 # --with-petsc-arch=$ISSM_ARCH \ 22 # --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \23 # --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \24 # --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \25 # --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \26 # --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \27 # --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \22 # --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 23 # --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \ 24 # --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 25 # --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 26 # --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 27 # --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-linux64-murdo.sh ¶
r11577 r12168 2 2 3 3 ./configure \ 4 --prefix=$ISSM_ TIER \4 --prefix=$ISSM_DIR \ 5 5 --with-matlab-dir=$MATLAB_DIR \ 6 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \7 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \8 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \9 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \10 --with-mpi-lib="-L$ISSM_ TIER/externalpackages/mpich2/install/lib/ -lmpich" \6 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 7 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 8 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 9 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 10 --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" \ 11 11 --with-petsc-arch=$ISSM_ARCH \ 12 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \13 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \14 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \15 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \16 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \17 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \18 --with-scotch-dir="$ISSM_ TIER/externalpackages/scotch/install" \19 --with-chaco-dir="$ISSM_ TIER/externalpackages/chaco/install" \12 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 13 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 14 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \ 15 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 16 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 17 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 18 --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \ 19 --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \ 20 20 --with-graphics-lib=/usr/lib64/libX11.so \ 21 21 --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\ 22 22 --with-numthreads=18 \ 23 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \23 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 24 24 --enable-debugging 25 25 -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx32-mathieu.sh ¶
r11174 r12168 10 10 11 11 ./configure \ 12 --prefix=$ISSM_ TIER \12 --prefix=$ISSM_DIR \ 13 13 --with-matlab-dir=$MATLAB_DIR \ 14 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \15 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \16 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \17 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \18 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \14 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 15 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 16 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 17 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 18 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 19 19 --with-petsc-arch=$ISSM_ARCH \ 20 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \21 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \22 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \23 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \24 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \25 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \26 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \20 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 21 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 22 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 23 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 24 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 25 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 26 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 27 27 --with-fortran-lib="/usr/local/lib/libgfortran.a" \ 28 28 --with-math-lib="/usr/lib/libm.dylib" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx32-ogive.sh ¶
r11174 r12168 5 5 6 6 ./configure \ 7 --prefix=$ISSM_ TIER \7 --prefix=$ISSM_DIR \ 8 8 --with-matlab-dir=$MATLAB_DIR \ 9 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \10 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \11 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \12 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \13 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \9 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 10 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 11 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 12 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 13 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 14 14 --with-petsc-arch=$ISSM_ARCH \ 15 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \16 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \17 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \18 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \19 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \20 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \21 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \15 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 16 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 17 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 18 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 19 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 20 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 21 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 22 22 --with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \ 23 23 --with-math-lib="/usr/lib/libm.dylib" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx64-larour-ad.sh ¶
r12004 r12168 6 6 ./configure \ 7 7 --with-serial=no\ 8 --prefix=$ISSM_ TIER \9 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \10 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \11 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \8 --prefix=$ISSM_DIR \ 9 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 10 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 11 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 12 12 --without-blas-lapack-dir \ 13 --with-chaco-dir=$ISSM_ TIER/externalpackages/chaco/install \13 --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \ 14 14 --with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \ 15 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \15 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 16 16 --with-math-lib="/usr/lib/libm.dylib" \ 17 17 --with-graphics-lib="/usr/X11/lib/libX11.dylib" \ 18 18 --with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5 -O3 -DNDEBUG -w "\ 19 --with-adic2-dir=$ISSM_ TIER/externalpackages/adic/install/ \20 --with-adolc-dir=$ISSM_ TIER/externalpackages/adolc/install/ \19 --with-adic2-dir=$ISSM_DIR/externalpackages/adic/install/ \ 20 --with-adolc-dir=$ISSM_DIR/externalpackages/adolc/install/ \ 21 21 --with-numthreads=8 \ 22 22 --without-thermal \ … … 34 34 35 35 #--without-prognostic \ 36 #--with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \36 #--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 37 37 #--with-petsc-arch=$ISSM_ARCH \ 38 #--with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \39 #--with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \40 #--with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \41 #--with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \42 #--with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \43 #--with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \38 #--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 39 #--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 40 #--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 41 #--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 42 #--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 43 #--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx64-larour-nopetsc.sh ¶
r12004 r12168 1 1 #!/bin/sh 2 2 3 #petsc 3.2 4 #mpich 1.4 3 pythonversion=3.2 5 4 6 5 ./configure \ 7 --prefix=$ISSM_TIER \ 8 --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include \ 9 --with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \ 6 --prefix=$ISSM_DIR \ 10 7 --with-matlab-dir=$MATLAB_DIR \ 11 --with- triangle-dir=$ISSM_TIER/externalpackages/triangle/install\12 --with- metis-dir=$ISSM_TIER/externalpackages/metis/install\13 --with- chaco-dir=$ISSM_TIER/externalpackages/chaco/install\14 --with- fortran-lib="/usr/local/gfortran/lib/libgfortran.a"\8 --with-python-dir=$ISSM_DIR/externalpackages/python/install\ 9 --with-python-version=$pythonversion \ 10 --with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\ 11 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 15 12 --with-math-lib="/usr/lib/libm.dylib" \ 16 --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/lib \17 13 --with-graphics-lib="/usr/X11/lib/libX11.dylib" \ 18 14 --with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5 -O3 -DNDEBUG -w "\ 19 --with-numthreads=8 \ 20 --with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install 21 # --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \ 22 # --with-petsc-arch=$ISSM_ARCH \ 23 # --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \ 24 # --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \ 25 # --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \ 26 # --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \ 27 # --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ 28 # --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \ 15 --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx64-larour-python.sh ¶
r12004 r12168 5 5 6 6 ./configure \ 7 --prefix=$ISSM_ TIER \8 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \9 --with-python-dir=$ISSM_ TIER/externalpackages/python/install\10 --with-python-numpy-dir=$ISSM_ TIER/externalpackages/python/install/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy\11 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \12 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \13 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \14 --with-chaco-dir=$ISSM_ TIER/externalpackages/chaco/install \7 --prefix=$ISSM_DIR \ 8 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 9 --with-python-dir=$ISSM_DIR/externalpackages/python/install\ 10 --with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy\ 11 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 12 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 13 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 14 --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \ 15 15 --with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \ 16 16 --with-math-lib="/usr/lib/libm.dylib" \ … … 18 18 --with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5 -O3 -DNDEBUG -w "\ 19 19 --with-numthreads=8 \ 20 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \20 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 21 --with-petsc-arch=$ISSM_ARCH \ 22 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \23 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \24 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \25 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \26 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \27 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/28 #--with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \29 #--with-boost-dir=$ISSM_ TIER/externalpackages/boost/install/ \22 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 23 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 24 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 25 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 26 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 27 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ 28 #--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 29 #--with-boost-dir=$ISSM_DIR/externalpackages/boost/install/ \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx64-larour.sh ¶
r12004 r12168 5 5 6 6 ./configure \ 7 --prefix=$ISSM_ TIER \7 --prefix=$ISSM_DIR \ 8 8 --with-matlab-dir=$MATLAB_DIR \ 9 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \10 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \11 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \12 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \13 --with-chaco-dir=$ISSM_ TIER/externalpackages/chaco/install \9 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 10 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 11 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 12 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 13 --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \ 14 14 --with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \ 15 15 --with-math-lib="/usr/lib/libm.dylib" \ … … 17 17 --with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5 -O3 -DNDEBUG -w "\ 18 18 --with-numthreads=8 \ 19 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \19 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 20 20 --with-petsc-arch=$ISSM_ARCH \ 21 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \22 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \23 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \24 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \25 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \26 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/27 #--with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \21 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 22 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 23 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 24 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 25 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 26 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ 27 #--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx64-mathieu.sh ¶
r11174 r12168 5 5 6 6 ./configure \ 7 --prefix=$ISSM_ TIER \7 --prefix=$ISSM_DIR \ 8 8 --with-matlab-dir=$MATLAB_DIR \ 9 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \10 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \11 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \12 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \13 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \9 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 10 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 11 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 12 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 13 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 14 14 --with-petsc-arch=$ISSM_ARCH \ 15 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \16 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \17 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \18 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \19 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \20 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \21 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \15 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 16 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 17 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 18 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 19 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 20 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 21 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 22 22 --with-fortran-lib="/usr/local/lib/libgfortran.a" \ 23 23 --with-math-lib="/usr/lib/libm.dylib" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx64-nicole.sh ¶
r11684 r12168 5 5 6 6 ./configure \ 7 --prefix=$ISSM_ TIER \7 --prefix=$ISSM_DIR \ 8 8 --with-matlab-dir=$MATLAB_DIR \ 9 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \10 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \11 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \12 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \13 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \9 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 10 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 11 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 12 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 13 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 14 14 --with-petsc-arch=$ISSM_ARCH \ 15 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \16 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \17 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install -lPLAPACK" \18 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \19 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install \20 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install \21 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install \22 --with-scotch-dir="$ISSM_ TIER/externalpackages/scotch/install" \23 --with-chaco-dir="$ISSM_ TIER/externalpackages/chaco/install" \15 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 16 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 17 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install -lPLAPACK" \ 18 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 19 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install \ 20 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \ 22 --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \ 23 --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \ 24 24 --with-fortran-lib="/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10/4.6.2/libgfortran.a" \ 25 25 --with-math-lib="/usr/lib/libm.dylib" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx64-ogive.sh ¶
r11174 r12168 9 9 10 10 ./configure \ 11 --prefix=$ISSM_ TIER \11 --prefix=$ISSM_DIR \ 12 12 --with-matlab-dir=$MATLAB_DIR \ 13 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \14 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \15 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \16 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \17 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \13 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 14 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 15 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 16 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 17 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 18 18 --with-petsc-arch=$ISSM_ARCH \ 19 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \20 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \21 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \22 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \23 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \24 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \25 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \19 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 20 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 22 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 23 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 24 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 25 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 26 26 --with-fortran-lib="/usr/local/gfortran/lib/x86_64/libgfortran.a" \ 27 27 --with-math-lib="/usr/lib/libm.dylib" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-macosx64-sophie.sh ¶
r11174 r12168 9 9 10 10 ./configure \ 11 --prefix=$ISSM_ TIER \11 --prefix=$ISSM_DIR \ 12 12 --with-matlab-dir=$MATLAB_DIR \ 13 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \14 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \15 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \16 --with-mpi-include=$ISSM_ TIER/externalpackages/mpich2/install/include \17 --with-mpi-lib=" $ISSM_ TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \13 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 14 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 15 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 16 --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include \ 17 --with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \ 18 18 --with-petsc-arch=$ISSM_ARCH \ 19 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \20 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install \21 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \22 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/include/ " \23 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \24 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \25 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \19 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 20 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \ 21 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 22 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \ 23 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 24 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 25 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 26 26 --with-fortran-lib="/sw/usr/local/lib/x86_64/libgfortran.a" \ 27 27 --with-math-lib="/usr/lib/libm.dylib" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-pleiades-petsc2.sh ¶
r11174 r12168 2 2 3 3 ./configure \ 4 --prefix=$ISSM_ TIER \5 --with- serial=no \6 --with-triangle-dir=$ISSM_ TIER/externalpackages/triangle/install \7 --with-metis-dir=$ISSM_ TIER/externalpackages/metis/install \8 --with-petsc-dir=$ISSM_ TIER/externalpackages/petsc/install \4 --prefix=$ISSM_DIR \ 5 --with-modules=no \ 6 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 7 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 8 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 9 9 --with-mpi-include=/nasa/sgi/mpt/1.25/include \ 10 10 --with-mpi-lib="-L/nasa/sgi/mpt/1.25/lib/ -lmpi -lpthread -lgfortran" \ 11 11 --with-petsc-arch=$ISSM_ARCH \ 12 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \12 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 13 13 --with-mkl-dir=/nasa/intel/mkl/10.0.011/lib/64/ \ 14 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \15 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \16 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \17 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \18 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \14 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 15 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \ 16 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 17 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 18 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 19 19 --with-graphics-lib=/usr/lib64/libX11.so \ 20 20 --with-cxxoptflags="-O3 -xS" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-pleiades.sh ¶
r11174 r12168 2 2 3 3 ./configure \ 4 --prefix=$ISSM_TIER \ 5 --with-serial=no \ 6 --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \ 7 --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \ 8 --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \ 4 --prefix=$ISSM_DIR \ 5 --with-modules=no \ 6 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \ 7 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \ 8 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \ 9 --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \ 9 10 --with-mpi-include=/nasa/sgi/mpt/1.25/include \ 10 11 --with-mpi-lib="-L/nasa/sgi/mpt/1.25/lib/ -lmpi -lpthread -lgfortran" \ 11 12 --with-petsc-arch=$ISSM_ARCH \ 12 --with-dakota-dir=$ISSM_ TIER/externalpackages/dakota/install \13 --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \ 13 14 --with-mkl-dir=/nasa/intel/mkl/10.0.011/lib/64/ \ 14 --with-plapack-lib="-L$ISSM_ TIER/externalpackages/petsc/install/ -lPLAPACK" \15 --with-plapack-include="-I$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \16 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/ \17 --with-scalapack-dir=$ISSM_ TIER/externalpackages/petsc/install/ \18 --with-blacs-dir=$ISSM_ TIER/externalpackages/petsc/install/ \15 --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \ 16 --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \ 17 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 18 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 19 --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \ 19 20 --with-graphics-lib=/usr/lib64/libX11.so \ 20 21 --with-cxxoptflags="-O3 -xS" \ -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-win32-eric.sh ¶
r11174 r12168 4 4 #get configure.sh to pick up the intel compiler 5 5 6 ./configure --prefix=$ISSM_ TIER --with-parallel=no --with-vendor=intel-win --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install --with-metis-dir=$ISSM_TIER/externalpackages/metis/install --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install --with-petsc-arch=$ISSM_ARCH --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/f2cblaslapack/$ISSM_ARCH6 ./configure --prefix=$ISSM_DIR --with-parallel=no --with-vendor=intel-win --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-petsc-arch=$ISSM_ARCH --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/f2cblaslapack/$ISSM_ARCH -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-win7-32.sh ¶
r11577 r12168 2 2 3 3 #Dos style path needed for the windows sdk 7.1 cl compiler: 4 ISSM_ TIER_WIN=`cygpath -m "$ISSM_TIER"`4 ISSM_DIR_WIN=`cygpath -m "$ISSM_DIR"` 5 5 6 6 #get configure.sh to pick up the win7 Visual Studio compiler 7 ./configure --prefix=$ISSM_ TIER \7 ./configure --prefix=$ISSM_DIR \ 8 8 --with-vendor=intel-win7-32 \ 9 9 --with-matlab-dir=$MATLAB_DIR \ 10 --with-triangle-dir="$ISSM_ TIER_WIN/externalpackages/triangle/install" \11 --with-metis-dir="$ISSM_ TIER_WIN/externalpackages/metis/install" \12 --with-petsc-dir="$ISSM_ TIER_WIN/externalpackages/petsc/install" \10 --with-triangle-dir="$ISSM_DIR_WIN/externalpackages/triangle/install" \ 11 --with-metis-dir="$ISSM_DIR_WIN/externalpackages/metis/install" \ 12 --with-petsc-dir="$ISSM_DIR_WIN/externalpackages/petsc/install" \ 13 13 --with-petsc-arch=$ISSM_ARCH \ 14 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install/lib/ \15 --with-mpi-lib="$ISSM_ TIER_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \16 --with-mpi-include="$ISSM_ TIER_WIN/externalpackages/petsc/install/include/mpiuni"14 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib/ \ 15 --with-mpi-lib="$ISSM_DIR_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \ 16 --with-mpi-include="$ISSM_DIR_WIN/externalpackages/petsc/install/include/mpiuni" -
TabularUnified issm/branches/trunk-jpl-damage/configs/config-win7-64.sh ¶
r11577 r12168 2 2 3 3 #Dos style path needed for the windows sdk 7.1 cl compiler: 4 ISSM_ TIER_WIN=`cygpath -m "$ISSM_TIER"`4 ISSM_DIR_WIN=`cygpath -m "$ISSM_DIR"` 5 5 6 6 #get configure.sh to pick up the win7 Visual Studio compiler 7 ./configure --prefix=$ISSM_ TIER \7 ./configure --prefix=$ISSM_DIR \ 8 8 --with-vendor=intel-win7-64 \ 9 9 --with-matlab-dir=$MATLAB_DIR \ 10 --with-triangle-dir="$ISSM_ TIER_WIN/externalpackages/triangle/install" \11 --with-metis-dir="$ISSM_ TIER_WIN/externalpackages/metis/install" \12 --with-petsc-dir="$ISSM_ TIER_WIN/externalpackages/petsc/install" \10 --with-triangle-dir="$ISSM_DIR_WIN/externalpackages/triangle/install" \ 11 --with-metis-dir="$ISSM_DIR_WIN/externalpackages/metis/install" \ 12 --with-petsc-dir="$ISSM_DIR_WIN/externalpackages/petsc/install" \ 13 13 --with-petsc-arch=$ISSM_ARCH \ 14 --with-blas-lapack-dir=$ISSM_ TIER/externalpackages/petsc/install/lib/ \15 --with-mpi-lib="$ISSM_ TIER_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \16 --with-mpi-include="$ISSM_ TIER_WIN/externalpackages/petsc/install/include/mpiuni"14 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib/ \ 15 --with-mpi-lib="$ISSM_DIR_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \ 16 --with-mpi-include="$ISSM_DIR_WIN/externalpackages/petsc/install/include/mpiuni" -
TabularUnified issm/branches/trunk-jpl-damage/configure.ac ¶
r12004 r12168 2 2 3 3 #AUTOCONF 4 AC_INIT([ISSM],[4. 0],[issm@jpl.nasa.gov],[issm],[http://issm.jpl.nasa.gov]) #Initializing configure4 AC_INIT([ISSM],[4.1],[issm@jpl.nasa.gov],[issm],[http://issm.jpl.nasa.gov]) #Initializing configure 5 5 AC_CONFIG_AUX_DIR([./aux-config]) #Put config files in aux-config 6 6 AC_CONFIG_MACRO_DIR([m4]) #m4 macros are located in m4 … … 36 36 AC_CONFIG_FILES([Makefile 37 37 src/Makefile 38 src/c/Makefile 39 src/mex/Makefile 38 src/c/Makefile 39 src/py/Makefile 40 src/py/model/Makefile 41 src/modules/Makefile 42 src/modules/python/Makefile 43 src/modules/matlab/Makefile 40 44 src/m/Makefile 41 45 bin/Makefile]) -
TabularUnified issm/branches/trunk-jpl-damage/cron/configs/linux64_daily ¶
r12004 r12168 6 6 7 7 #ISSM main directory (full paths) 8 ISSM_DIR="/path/to/issm" 9 ISSM_TIER="/path/to/issm/cron/trunk-jpl" 8 ISSM_DIR="/path/to/issm/cron/trunk-jpl" 10 9 11 10 #ISSM Architecture … … 72 71 73 72 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be 74 #sent to the adresses present in $ISSM_ TIER/cron/mailinglist.73 #sent to the adresses present in $ISSM_DIR/cron/mailinglist. 75 74 SKIPMAIL="no" 76 75 -
TabularUnified issm/branches/trunk-jpl-damage/cron/configs/linux64_nightly ¶
r12004 r12168 6 6 7 7 #ISSM main directory (full paths) 8 ISSM_DIR="/path/to/issm" 9 ISSM_TIER="/path/to/issm/cron/trunk-jpl" 8 ISSM_DIR="/path/to/issm/cron/trunk-jpl" 10 9 11 10 #ISSM Architecture … … 72 71 73 72 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be 74 #sent to the adresses present in $ISSM_ TIER/cron/mailinglist.73 #sent to the adresses present in $ISSM_DIR/cron/mailinglist. 75 74 SKIPMAIL="no" 76 75 -
TabularUnified issm/branches/trunk-jpl-damage/cron/configs/macosx64_daily ¶
r12004 r12168 6 6 7 7 #ISSM main directory (full path) 8 ISSM_DIR="/path/to/issm/" 9 ISSM_TIER="/path/to/issm/trunk-jpl/cron/trunk-jpl" 8 ISSM_DIR="/path/to/issm/trunk-jpl/cron/trunk-jpl" 10 9 11 10 #ISSM Architecture … … 72 71 73 72 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be 74 #sent to the adresses present in $ISSM_ TIER/cron/mailinglist.73 #sent to the adresses present in $ISSM_DIR/cron/mailinglist. 75 74 SKIPMAIL="no" 76 75 -
TabularUnified issm/branches/trunk-jpl-damage/cron/configs/macosx64_nightly ¶
r12004 r12168 6 6 7 7 #ISSM main directory (full path) 8 ISSM_DIR="/path/to/issm/" 9 ISSM_TIER="/path/to/issm/trunk-jpl/cron/trunk-jpl" 8 ISSM_DIR="/path/to/issm/trunk-jpl/cron/trunk-jpl" 10 9 11 10 #ISSM Architecture … … 72 71 73 72 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be 74 #sent to the adresses present in $ISSM_ TIER/cron/mailinglist.73 #sent to the adresses present in $ISSM_DIR/cron/mailinglist. 75 74 SKIPMAIL="no" 76 75 -
TabularUnified issm/branches/trunk-jpl-damage/cron/configs/win732 ¶
r12004 r12168 6 6 7 7 #ISSM main directory (full path) 8 ISSM_DIR="/cygdrive/c/issm" 9 ISSM_TIER="/cygdrive/c/issm/trunk-jpl/cron/trunk-jpl" 8 ISSM_DIR="/cygdrive/c/issm-uci/trunk-jpl/cron/trunk-jpl" 10 9 11 10 #ISSM Architecture … … 16 15 17 16 #MATLAB path 18 MATLAB_PATH="C:/MATLAB/R201 1b32/"17 MATLAB_PATH="C:/MATLAB/R2012a/" 19 18 20 19 #COMPILATION CONFIGURATION FILE … … 32 31 # - "none" leave ISSM as is in its directory 33 32 # ->skip to section 3 34 ISSM_INSTALLATION=" none"33 ISSM_INSTALLATION="checkout" 35 34 36 35 #SVN repository … … 38 37 39 38 #execution path used for parallel runs 40 EXECUTION_PATH="/cygdrive/c/issm /ExecutionNightlyRun"39 EXECUTION_PATH="/cygdrive/c/issm-uci/ExecutionNightlyRun" 41 40 42 41 #-----------------------------------# … … 49 48 # - "none" leave external packages as is 50 49 # ->skip to section 4 51 ISSM_EXTERNALPACKAGES=" none"52 EXTERNALPACKAGESDIR="/cygdrive/c/issm /trunk-jpl/externalpackages"50 ISSM_EXTERNALPACKAGES="link" 51 EXTERNALPACKAGESDIR="/cygdrive/c/issm-uci/trunk-jpl/externalpackages" 53 52 54 53 #List of external pakages to be installed … … 66 65 # - "yes" compile ISSM 67 66 # - "no" do not compile ISSM 68 ISSM_COMPILATION=" no"67 ISSM_COMPILATION="yes" 69 68 70 69 #----------------------# … … 73 72 74 73 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be 75 #sent to the adresses present in $ISSM_ TIER/cron/mailinglist.76 SKIPMAIL=" no"74 #sent to the adresses present in $ISSM_DIR/cron/mailinglist. 75 SKIPMAIL="yes" 77 76 78 77 #Sender email address 79 EMAIL_ADRESS="eric.larour@ jpl.nasa.gov"78 EMAIL_ADRESS="eric.larour@gmail.com" 80 79 81 80 #------------------------# … … 85 84 #number of cpus used in ISSM installation and compilation (one is usually 86 85 #safer as some packages are very sensitive to parallel compilation) 87 NUMCPUS_INSTALL= 886 NUMCPUS_INSTALL=1 88 87 89 88 #number of cpus used in the nightly runs. … … 95 94 #ex: "'id',[101 102 103]" 96 95 97 NROPTIONS="'benchmark', 'all'"96 NROPTIONS="'benchmark',102:2:120" 98 97 99 98 #------------------------# 100 99 # 7: Matlab# 101 100 #------------------------# 102 MATLABBIN=/cygdrive/c/MATLAB/R201 1b32/bin/matlab101 MATLABBIN=/cygdrive/c/MATLAB/R2012a/bin/matlab -
TabularUnified issm/branches/trunk-jpl-damage/cron/configs/win764 ¶
r12004 r12168 6 6 7 7 #ISSM main directory (full path) 8 ISSM_DIR="/cygdrive/c/issm" 9 ISSM_TIER="/cygdrive/c/issm/trunk-jpl/cron/trunk-jpl" 8 ISSM_DIR="/cygdrive/c/issm/trunk-jpl/cron/trunk-jpl" 10 9 11 10 #ISSM Architecture … … 73 72 74 73 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be 75 #sent to the adresses present in $ISSM_ TIER/cron/mailinglist.74 #sent to the adresses present in $ISSM_DIR/cron/mailinglist. 76 75 SKIPMAIL="no" 77 76 -
TabularUnified issm/branches/trunk-jpl-damage/cron/configs/winxp32 ¶
r12004 r12168 6 6 7 7 #ISSM main directory (full path) 8 ISSM_DIR="C:/home/issm/trunk-jpl" 9 ISSM_TIER="C:/home/issm/trunk-jpl/cron/trunk-jpl" 8 ISSM_DIR="C:/home/issm/trunk-jpl/cron/trunk-jpl" 10 9 11 10 #ISSM Architecture … … 66 65 67 66 #Mail delivery. If SKIPMAIL="no", the html nightly run report will be 68 #sent to the adresses present in $ISSM_ TIER/cron/mailinglist.67 #sent to the adresses present in $ISSM_DIR/cron/mailinglist. 69 68 SKIPMAIL="no" 70 69 -
TabularUnified issm/branches/trunk-jpl-damage/etc/environment.csh ¶
r8555 r12168 1 #ISSM_ TIER and ISSM_ARCH should have been defined already in your shell settings file (.bashrc, .cshrc, etc ...)2 source $ISSM_ TIER/etc/environment_variables.csh1 #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 3 3 4 4 #Do we have any command line arguments? (such as MATLAB_DIR=otherdirthandefault), source them before exporting the variables … … 10 10 11 11 #CRON utilities 12 setenv PATH {$PATH}:{$ISSM_ TIER}/cron12 setenv PATH {$PATH}:{$ISSM_DIR}/cron 13 13 14 14 #SCRIPTS utilities 15 setenv PATH {$PATH}:{$ISSM_ TIER}/scripts15 setenv PATH {$PATH}:{$ISSM_DIR}/scripts 16 16 17 17 #MATLAB … … 110 110 #AUTOCONF 111 111 setenv AUTOCONF_DIR {$AUTOCONF_DIR} 112 setenv PATH {$ PATH}:{$AUTOCONF_DIR}/bin112 setenv PATH {$AUTOCONF_DIR}/bin:{$PATH} 113 113 114 114 #AUTOMAKE 115 115 setenv AUTOMAKE_DIR {$AUTOMAKE_DIR} 116 setenv PATH {$ PATH}:{$AUTOMAKE_DIR}/bin116 setenv PATH {$AUTOMAKE_DIR}/bin:{$PATH} 117 117 118 118 #BORLAND -
TabularUnified issm/branches/trunk-jpl-damage/etc/environment.sh ¶
r12004 r12168 1 #ISSM_ TIER and ISSM_ARCH should have been defined already in your shell settings file (.bashrc, .cshrc, etc ...)1 #ISSM_DIR and ISSM_ARCH should have been defined already in your shell settings file (.bashrc, .cshrc, etc ...) 2 2 3 3 #Windows compilers: 4 4 if [[ "$ISSM_ARCH" == "cygwin-intel" ]]; then 5 source $ISSM_ TIER/externalpackages/windows/windows_environment.sh5 source $ISSM_DIR/externalpackages/windows/windows_environment.sh 6 6 fi 7 7 8 source $ISSM_ TIER/etc/environment_variables.sh8 source $ISSM_DIR/etc/environment_variables.sh 9 9 10 10 #Do we have any command line arguments? (such as MATLAB_DIR=otherdirthandefault), source them after exporting the variables … … 16 16 17 17 #CRON utilities 18 PATH="$PATH:$ISSM_ TIER/cron"18 PATH="$PATH:$ISSM_DIR/cron" 19 19 20 20 #scripts 21 PATH="$PATH:$ISSM_ TIER/scripts"21 PATH="$PATH:$ISSM_DIR/scripts" 22 22 23 23 ##MATLAB … … 137 137 #export INTEL_DIR 138 138 #PATH="$PATH:$INTEL_DIR" 139 #source $ISSM_ TIER/externalpackages/intel/intel.sh139 #source $ISSM_DIR/externalpackages/intel/intel.sh 140 140 141 141 #SDK … … 242 242 export PATH="$PATH:$ANDROID_NDK_DIR/" 243 243 244 #ANDROID_D EV_DIR245 export ANDROID_D EV_DIR244 #ANDROID_DIR 245 export ANDROID_DIR 246 246 247 247 #ANDROID_SDK … … 259 259 #PYTHON 260 260 export PATH="$PYTHON_DIR/bin:$PATH" 261 export PYTHONPATH="$PYTHONPATH:$ISSM_ TIER/src/mex"262 export LD_LIBRARY_PATH=$ISSM_ TIER/src/mex:$LD_LIBRARY_PATH261 export PYTHONPATH="$PYTHONPATH:$ISSM_DIR/src/modules/python" 262 export LD_LIBRARY_PATH=$ISSM_DIR/src/modules/python:$LD_LIBRARY_PATH 263 263 264 264 #MODELE -
TabularUnified issm/branches/trunk-jpl-damage/etc/environment_variables.csh ¶
r10874 r12168 1 1 # 2 2 # 3 #This routine can only be run if the ISSM_ TIER variable has been correctly set!3 #This routine can only be run if the ISSM_DIR variable has been correctly set! 4 4 # 5 5 # 6 6 7 7 #MATLAB 8 set MATLAB_DIR={$ISSM_ TIER}/externalpackages/matlab/install8 set MATLAB_DIR={$ISSM_DIR}/externalpackages/matlab/install 9 9 10 10 #MPI 11 set MPI_DIR={$ISSM_ TIER}/externalpackages/mpich2/install11 set MPI_DIR={$ISSM_DIR}/externalpackages/mpich2/install 12 12 13 13 #PETSC 14 set PETSC_DIR={$ISSM_ TIER}/externalpackages/petsc/install14 set PETSC_DIR={$ISSM_DIR}/externalpackages/petsc/install 15 15 16 16 #SLEPC 17 set SLEPC_DIR={$ISSM_ TIER}/externalpackages/slepc/install17 set SLEPC_DIR={$ISSM_DIR}/externalpackages/slepc/install 18 18 19 19 #Dakota 20 set DAKOTA_DIR={$ISSM_ TIER}/externalpackages/dakota/install20 set DAKOTA_DIR={$ISSM_DIR}/externalpackages/dakota/install 21 21 22 22 #Qhull 23 set QHULL_DIR={$ISSM_ TIER}/externalpackages/qhull/install23 set QHULL_DIR={$ISSM_DIR}/externalpackages/qhull/install 24 24 25 25 #Doxygen 26 set DOXYGEN_DIR={$ISSM_ TIER}/externalpackages/doxygen/install26 set DOXYGEN_DIR={$ISSM_DIR}/externalpackages/doxygen/install 27 27 28 28 #MTOC 29 set MTOC_DIR={$ISSM_ TIER}/externalpackages/mtoc/install29 set MTOC_DIR={$ISSM_DIR}/externalpackages/mtoc/install 30 30 31 31 #Triangle 32 set TRIANGLE_DIR={$ISSM_ TIER}/externalpackages/triangle/install32 set TRIANGLE_DIR={$ISSM_DIR}/externalpackages/triangle/install 33 33 34 34 #METIS 35 set METIS_DIR={$ISSM_ TIER}/externalpackages/metis/install35 set METIS_DIR={$ISSM_DIR}/externalpackages/metis/install 36 36 37 37 #BLAS 38 set BLAS_DIR={$ISSM_ TIER}/externalpackages/petsc/install/externalexternalpackages/fblaslapack38 set BLAS_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/fblaslapack 39 39 40 40 #LAPACK 41 set LAPACK_DIR={$ISSM_ TIER}/externalpackages/petsc/install/externalexternalpackages/fblaslapack/$ISSM_ARCH41 set LAPACK_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/fblaslapack/$ISSM_ARCH 42 42 43 43 #SCALAPACK 44 set SCALAPACK_DIR={$ISSM_ TIER}/externalpackages/petsc/install/externalexternalpackages/SCALAPACK/$ISSM_ARCH44 set SCALAPACK_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/SCALAPACK/$ISSM_ARCH 45 45 46 46 #PLAPACK 47 set PLAPACK_DIR={$ISSM_ TIER}/externalpackages/petsc/install/externalexternalpackages/PLAPACKR3247 set PLAPACK_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/PLAPACKR32 48 48 49 49 #BLACS 50 set BLACS_DIR={$ISSM_ TIER}/externalpackages/petsc/install/externalexternalpackages/blacs-dev/$ISSM_ARCH50 set BLACS_DIR={$ISSM_DIR}/externalpackages/petsc/install/externalexternalpackages/blacs-dev/$ISSM_ARCH 51 51 52 52 #sowing 53 set SOWING_DIR={$ISSM_ TIER}/externalpackages/sowing/install53 set SOWING_DIR={$ISSM_DIR}/externalpackages/sowing/install 54 54 55 55 #YAMS 56 set YAMS_DIR={$ISSM_ TIER}/externalpackages/yams/install56 set YAMS_DIR={$ISSM_DIR}/externalpackages/yams/install 57 57 58 58 #TEX2IM 59 set TEX2IM_DIR={$ISSM_ TIER}/externalpackages/tex2im/install59 set TEX2IM_DIR={$ISSM_DIR}/externalpackages/tex2im/install 60 60 61 61 #Chaco 62 set CHACO_DIR={$ISSM_ TIER}/externalpackages/chaco/install62 set CHACO_DIR={$ISSM_DIR}/externalpackages/chaco/install 63 63 64 64 #MeshPart 65 set MESHPART_DIR={$ISSM_ TIER}/externalpackages/meshpart/install65 set MESHPART_DIR={$ISSM_DIR}/externalpackages/meshpart/install 66 66 67 67 #SCOTCH 68 set SCOTCH_DIR={$ISSM_ TIER}/externalpackages/scotch/install68 set SCOTCH_DIR={$ISSM_DIR}/externalpackages/scotch/install 69 69 70 70 #Development packages 71 71 #automake 72 set AUTOMAKE_DIR={$ISSM_ TIER}/externalpackages/automake/install72 set AUTOMAKE_DIR={$ISSM_DIR}/externalpackages/automake/install 73 73 74 74 #autoconf 75 set AUTOCONF_DIR={$ISSM_ TIER}/externalpackages/autoconf/install75 set AUTOCONF_DIR={$ISSM_DIR}/externalpackages/autoconf/install 76 76 77 77 #borland … … 79 79 80 80 #ssh 81 set SSH_DIR={$ISSM_ TIER}/externalpackages/ssh81 set SSH_DIR={$ISSM_DIR}/externalpackages/ssh 82 82 83 83 #valgrind 84 set VALGRIND_DIR={$ISSM_ TIER}/externalpackages/valgrind/install/bin84 set VALGRIND_DIR={$ISSM_DIR}/externalpackages/valgrind/install/bin -
TabularUnified issm/branches/trunk-jpl-damage/etc/environment_variables.sh ¶
r12004 r12168 1 1 # 2 2 # 3 #This routine can only be run if the ISSM_ TIER variable has been correctly set!3 #This routine can only be run if the ISSM_DIR variable has been correctly set! 4 4 # 5 5 # 6 6 7 7 #MATLAB 8 MATLAB_DIR="$ISSM_ TIER/externalpackages/matlab/install"8 MATLAB_DIR="$ISSM_DIR/externalpackages/matlab/install" 9 9 10 10 #MPI 11 MPI_DIR="$ISSM_ TIER/externalpackages/mpich2/install"11 MPI_DIR="$ISSM_DIR/externalpackages/mpich2/install" 12 12 13 13 #PETSC 14 PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/install"14 PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" 15 15 16 16 #SLEPC 17 SLEPC_DIR="$ISSM_ TIER/externalpackages/slepc/install"17 SLEPC_DIR="$ISSM_DIR/externalpackages/slepc/install" 18 18 19 19 #Dakota 20 DAKOTA_DIR="$ISSM_ TIER/externalpackages/dakota/install"20 DAKOTA_DIR="$ISSM_DIR/externalpackages/dakota/install" 21 21 22 22 #Qhull 23 QHULL_DIR="$ISSM_ TIER/externalpackages/qhull/install"23 QHULL_DIR="$ISSM_DIR/externalpackages/qhull/install" 24 24 25 25 #Doxygen 26 DOXYGEN_DIR="$ISSM_ TIER/externalpackages/doxygen/install"26 DOXYGEN_DIR="$ISSM_DIR/externalpackages/doxygen/install" 27 27 28 28 #MTOC 29 MTOC_DIR="$ISSM_ TIER/externalpackages/mtoc/install"29 MTOC_DIR="$ISSM_DIR/externalpackages/mtoc/install" 30 30 31 31 #Triangle 32 TRIANGLE_DIR="$ISSM_ TIER/externalpackages/triangle/install"32 TRIANGLE_DIR="$ISSM_DIR/externalpackages/triangle/install" 33 33 34 34 #METIS 35 METIS_DIR="$ISSM_ TIER/externalpackages/metis/install"35 METIS_DIR="$ISSM_DIR/externalpackages/metis/install" 36 36 37 37 #BLAS 38 BLAS_DIR="$ISSM_ TIER/externalpackages/petsc/install/externalpackages/fblaslapack"38 BLAS_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/fblaslapack" 39 39 40 40 #LAPACK 41 LAPACK_DIR="$ISSM_ TIER/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH"41 LAPACK_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH" 42 42 43 43 #SCALAPACK 44 SCALAPACK_DIR="$ISSM_ TIER/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH"44 SCALAPACK_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH" 45 45 46 46 #PLAPACK 47 PLAPACK_DIR="$ISSM_ TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32"47 PLAPACK_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32" 48 48 49 49 #BLACS 50 BLACS_DIR="$ISSM_ TIER/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH"50 BLACS_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH" 51 51 52 52 #sowing 53 SOWING_DIR="$ISSM_ TIER/externalpackages/sowing/install"53 SOWING_DIR="$ISSM_DIR/externalpackages/sowing/install" 54 54 55 55 #BLACS 56 BLACS_DIR="$ISSM_ TIER/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH"56 BLACS_DIR="$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH" 57 57 58 58 #YAMS 59 YAMS_DIR="$ISSM_ TIER/externalpackages/yams/install"59 YAMS_DIR="$ISSM_DIR/externalpackages/yams/install" 60 60 61 61 #BAMG 62 BAMG_DIR="$ISSM_ TIER/externalpackages/bamg/install"62 BAMG_DIR="$ISSM_DIR/externalpackages/bamg/install" 63 63 64 64 #Chaco 65 CHACO_DIR="$ISSM_ TIER/externalpackages/chaco/install"65 CHACO_DIR="$ISSM_DIR/externalpackages/chaco/install" 66 66 67 67 #MeshPart 68 MESHPART_DIR="$ISSM_ TIER/externalpackages/meshpart/install"68 MESHPART_DIR="$ISSM_DIR/externalpackages/meshpart/install" 69 69 70 70 #SCOTCH 71 SCOTCH_DIR="$ISSM_ TIER/externalpackages/scotch/install"71 SCOTCH_DIR="$ISSM_DIR/externalpackages/scotch/install" 72 72 73 73 #Development packages 74 74 #automake 75 AUTOMAKE_DIR="$ISSM_ TIER/externalpackages/automake/install"75 AUTOMAKE_DIR="$ISSM_DIR/externalpackages/automake/install" 76 76 77 77 #libtool 78 LIBTOOL_DIR="$ISSM_ TIER/externalpackages/libtool/install"78 LIBTOOL_DIR="$ISSM_DIR/externalpackages/libtool/install" 79 79 80 80 #autoconf 81 AUTOCONF_DIR="$ISSM_ TIER/externalpackages/autoconf/install"81 AUTOCONF_DIR="$ISSM_DIR/externalpackages/autoconf/install" 82 82 83 83 #borland … … 88 88 89 89 #TEX2IM 90 TEX2IM_DIR="$ISSM_ TIER/externalpackages/tex2im/install"90 TEX2IM_DIR="$ISSM_DIR/externalpackages/tex2im/install" 91 91 92 92 #sdk … … 94 94 95 95 #ssh 96 SSH_DIR="$ISSM_ TIER/externalpackages/ssh"96 SSH_DIR="$ISSM_DIR/externalpackages/ssh" 97 97 98 98 #valgrind 99 VALGRIND_DIR="$ISSM_ TIER/externalpackages/valgrind/install/bin"99 VALGRIND_DIR="$ISSM_DIR/externalpackages/valgrind/install/bin" 100 100 101 101 #graphviz 102 GRAPHVIZ_DIR="$ISSM_ TIER/externalpackages/graphviz/install/bin"102 GRAPHVIZ_DIR="$ISSM_DIR/externalpackages/graphviz/install/bin" 103 103 104 104 #cppcheck 105 CPPCHECK_DIR="$ISSM_ TIER/externalpackages/cppcheck/install"105 CPPCHECK_DIR="$ISSM_DIR/externalpackages/cppcheck/install" 106 106 107 107 #gdal 108 GDAL_DIR="$ISSM_ TIER/externalpackages/gdal/install"108 GDAL_DIR="$ISSM_DIR/externalpackages/gdal/install" 109 109 110 110 #mercurial 111 MERCURIAL_DIR="$ISSM_ TIER/externalpackages/mercurial/install"111 MERCURIAL_DIR="$ISSM_DIR/externalpackages/mercurial/install" 112 112 113 113 #boost 114 BOOST_DIR="$ISSM_ TIER/externalpackages/boost/install"115 BOOSTROOT="$ISSM_ TIER/externalpackages/boost/install"114 BOOST_DIR="$ISSM_DIR/externalpackages/boost/install" 115 BOOSTROOT="$ISSM_DIR/externalpackages/boost/install" 116 116 117 117 #OpenAnalysis 118 OPENANALYSISROOT="$ISSM_ TIER/externalpackages/openanalysis/install"118 OPENANALYSISROOT="$ISSM_DIR/externalpackages/openanalysis/install" 119 119 120 120 #xerces 121 XERCESROOT="$ISSM_ TIER/externalpackages/xerces/install"122 XERCESCROOT="$ISSM_ TIER/externalpackages/xerces/src"121 XERCESROOT="$ISSM_DIR/externalpackages/xerces/install" 122 XERCESCROOT="$ISSM_DIR/externalpackages/xerces/src" 123 123 124 124 #xaifBooster 125 XAIFBOOSTERROOT="$ISSM_ TIER/externalpackages/xaifbooster/"126 XAIF_DIR="$ISSM_ TIER/externalpackages/xaifbooster/xaifBooster"127 XAIFBOOSTER_HOME="$ISSM_ TIER/externalpackages/xaifbooster/xaifBooster"125 XAIFBOOSTERROOT="$ISSM_DIR/externalpackages/xaifbooster/" 126 XAIF_DIR="$ISSM_DIR/externalpackages/xaifbooster/xaifBooster" 127 XAIFBOOSTER_HOME="$ISSM_DIR/externalpackages/xaifbooster/xaifBooster" 128 128 PLATFORM=x86-Linux 129 129 130 130 #angel 131 ANGELROOT="$ISSM_ TIER/externalpackages/angel/angel"131 ANGELROOT="$ISSM_DIR/externalpackages/angel/angel" 132 132 133 133 #java … … 135 135 136 136 #bbftp 137 BBFTP_DIR="$ISSM_ TIER/externalpackages/bbftp/install"137 BBFTP_DIR="$ISSM_DIR/externalpackages/bbftp/install" 138 138 139 139 #adic2 140 ADIC_DIR="$ISSM_ TIER/externalpackages/adic/install"140 ADIC_DIR="$ISSM_DIR/externalpackages/adic/install" 141 141 142 142 #colpack 143 COLPACK_DIR="$ISSM_ TIER/externalpackages/colpack/install"143 COLPACK_DIR="$ISSM_DIR/externalpackages/colpack/install" 144 144 145 145 #eclipse 146 ECLIPSE_DIR="$ISSM_ TIER/externalpackages/eclipse/install"146 ECLIPSE_DIR="$ISSM_DIR/externalpackages/eclipse/install" 147 147 148 148 #flaim 149 FLAIM_DIR="$ISSM_ TIER/externalpackages/flaim/install"149 FLAIM_DIR="$ISSM_DIR/externalpackages/flaim/install" 150 150 151 151 #appscan 152 APPSCAN_DIR="$ISSM_ TIER/externalpackages/appscan"152 APPSCAN_DIR="$ISSM_DIR/externalpackages/appscan" 153 153 154 154 #cppcheck 155 CPPCHECK_DIR="$ISSM_ TIER/externalpackages/cppcheck/install"155 CPPCHECK_DIR="$ISSM_DIR/externalpackages/cppcheck/install" 156 156 157 157 #rats 158 RATS_DIR="$ISSM_ TIER/externalpackages/rats/install"158 RATS_DIR="$ISSM_DIR/externalpackages/rats/install" 159 159 160 160 #dyson 161 DYSON_DIR="$ISSM_ TIER/externalpackages/dyson/"161 DYSON_DIR="$ISSM_DIR/externalpackages/dyson/" 162 162 163 163 #cmake 164 CMAKE_DIR="$ISSM_ TIER/externalpackages/cmake/install"164 CMAKE_DIR="$ISSM_DIR/externalpackages/cmake/install" 165 165 166 166 #shapelib 167 SHAPELIB_DIR="$ISSM_ TIER/externalpackages/shapelib/install"167 SHAPELIB_DIR="$ISSM_DIR/externalpackages/shapelib/install" 168 168 169 169 #cccl 170 CCCL_DIR="$ISSM_ TIER/externalpackages/cccl/install"170 CCCL_DIR="$ISSM_DIR/externalpackages/cccl/install" 171 171 172 172 #packagemaker 173 PACKAGEMAKER_DIR="$ISSM_TIER/externalpackages/packagemaker/install" 173 PACKAGEMAKER_DIR="$ISSM_DIR/externalpackages/packagemaker/install" 174 175 #android-dev-dir 176 ANDROID_DIR="$ISSM_DIR/externalpackages/android" 174 177 175 178 #android-ndk 176 ANDROID_NDK_DIR="$ISSM_TIER/externalpackages/android-ndk/install" 177 178 #android-dev-dir 179 ANDROID_DEV_DIR="$ISSM_TIER/externalpackages/android-dev-dir" 179 ANDROID_NDK_DIR="$ANDROID_DIR/android-ndk/install" 180 180 181 181 #android-sdk 182 ANDROID_SDK_DIR="$ ISSM_TIER/externalpackages/android-sdk/install-sdk"182 ANDROID_SDK_DIR="$ANDROID_DIR/android-sdk/install-sdk" 183 183 184 184 #android-ant 185 ANDROID_ANT_DIR="$ ISSM_TIER/externalpackages/android-sdk/install-ant"185 ANDROID_ANT_DIR="$ANDROID_DIR/android-sdk/install-ant" 186 186 187 187 #gsl 188 GSL_DIR="$ISSM_ TIER/externalpackages/gsl/install"188 GSL_DIR="$ISSM_DIR/externalpackages/gsl/install" 189 189 190 190 #gnu make 191 GMAKE_DIR="$ISSM_ TIER/externalpackages/gmake/install"191 GMAKE_DIR="$ISSM_DIR/externalpackages/gmake/install" 192 192 193 193 #PYTHON 194 PYTHON_DIR="$ISSM_ TIER/externalpackages/python/install"194 PYTHON_DIR="$ISSM_DIR/externalpackages/python/install" 195 195 196 196 #MODELE 197 MODELE_DIR="$ISSM_ TIER/externalpackages/modelE"197 MODELE_DIR="$ISSM_DIR/externalpackages/modelE" -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/adic/install.sh ¶
r11128 r12168 19 19 cd build 20 20 ../source/configure \ 21 --with-rose=$ISSM_ TIER/externalpackages/rose/install \22 --with-openanalysis=$ISSM_ TIER/externalpackages/openanalysis/openanalysis/x86_64-Linux \23 --with-boost=$ISSM_ TIER/externalpackages/boost/install \24 --with-xerces=$ISSM_ TIER/externalpackages/xerces/src \25 --with-xaifbooster=$ISSM_ TIER/externalpackages/xaifbooster/xaifBooster \26 --with-colpack=$ISSM_ TIER/externalpackages/colpack/install\27 --prefix=$ISSM_ TIER/externalpackages/adic/install21 --with-rose=$ISSM_DIR/externalpackages/rose/install \ 22 --with-openanalysis=$ISSM_DIR/externalpackages/openanalysis/openanalysis/x86_64-Linux \ 23 --with-boost=$ISSM_DIR/externalpackages/boost/install \ 24 --with-xerces=$ISSM_DIR/externalpackages/xerces/src \ 25 --with-xaifbooster=$ISSM_DIR/externalpackages/xaifbooster/xaifBooster \ 26 --with-colpack=$ISSM_DIR/externalpackages/colpack/install\ 27 --prefix=$ISSM_DIR/externalpackages/adic/install 28 28 if [ -z $1 ]; then 29 29 make -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/adolc/install.sh ¶
r12004 r12168 20 20 21 21 ./configure \ 22 --prefix=$ISSM_ TIER/externalpackages/adolc/install \22 --prefix=$ISSM_DIR/externalpackages/adolc/install \ 23 23 --enable-sparse \ 24 24 --enable-docexa \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/autoconf/install.sh ¶
r11577 r12168 15 15 #Compile autoconf 16 16 cd src 17 ./configure --prefix="$ISSM_ TIER/externalpackages/autoconf/install"17 ./configure --prefix="$ISSM_DIR/externalpackages/autoconf/install" 18 18 make 19 19 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/automake/install.sh ¶
r11577 r12168 13 13 #Compile automake 14 14 cd src 15 ./configure --prefix="$ISSM_ TIER/externalpackages/automake/install"15 ./configure --prefix="$ISSM_DIR/externalpackages/automake/install" 16 16 make 17 17 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/bbftp/install.sh ¶
r11101 r12168 19 19 #Configure and compile 20 20 cd bbftpc 21 ./configure --prefix=$ISSM_ TIER/externalpackages/bbftp/install21 ./configure --prefix=$ISSM_DIR/externalpackages/bbftp/install 22 22 make 23 23 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/boost/install.sh ¶
r12004 r12168 22 22 cd src 23 23 ./bootstrap.sh \ 24 --prefix="$ISSM_ TIER/externalpackages/boost/install" \24 --prefix="$ISSM_DIR/externalpackages/boost/install" \ 25 25 --with-python=python3.2 \ 26 --with-python-root="$ISSM_ TIER/externalpackages/python/install"26 --with-python-root="$ISSM_DIR/externalpackages/python/install" 27 27 28 28 #Compile boost -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/bsdtar/install-win7.sh ¶
r11577 r12168 13 13 14 14 cd src 15 ./configure --prefix="$ISSM_ TIER/externalpackages/bsdtar/install"15 ./configure --prefix="$ISSM_DIR/externalpackages/bsdtar/install" 16 16 make 17 17 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/cccl/install-win7.orig.sh ¶
r11577 r12168 15 15 16 16 #Compile 17 ./configure --prefix="$ISSM_ TIER/externalpackages/cccl/install"17 ./configure --prefix="$ISSM_DIR/externalpackages/cccl/install" 18 18 19 19 make -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/cmake/install.sh ¶
r11128 r12168 14 14 #Compile cmake 15 15 cd install 16 ./bootstrap --prefix=$ISSM_ TIER/externalpackages/cmake/install16 ./bootstrap --prefix=$ISSM_DIR/externalpackages/cmake/install 17 17 if [ -z $1 ]; then 18 18 make -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/cppcheck/install.sh ¶
r11128 r12168 17 17 make -j $1 18 18 fi 19 make install PREFIX=$ISSM_ TIER/externalpackages/cppcheck/install19 make install PREFIX=$ISSM_DIR/externalpackages/cppcheck/install 20 20 cd .. -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/dakota/install-altix64-cosmos.sh ¶
r11101 r12168 29 29 cd src 30 30 ./configure \ 31 --prefix="$ISSM_ TIER/externalpackages/dakota/install" \31 --prefix="$ISSM_DIR/externalpackages/dakota/install" \ 32 32 --without-graphics \ 33 33 --with-pic \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/dakota/install-linux64-astrid.sh ¶
r11109 r12168 29 29 cd src 30 30 ./configure \ 31 --prefix="$ISSM_ TIER/externalpackages/dakota/install" \31 --prefix="$ISSM_DIR/externalpackages/dakota/install" \ 32 32 --without-graphics \ 33 33 --with-pic \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/dakota/install-linux64-murdo.sh ¶
r11577 r12168 29 29 cd src 30 30 ./configure \ 31 --prefix="$ISSM_ TIER/externalpackages/dakota/install" \31 --prefix="$ISSM_DIR/externalpackages/dakota/install" \ 32 32 --without-graphics \ 33 33 --with-pic \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/dakota/install-macosx64.sh ¶
r11684 r12168 29 29 cd src 30 30 ./configure \ 31 --prefix="$ISSM_ TIER/externalpackages/dakota/install" \31 --prefix="$ISSM_DIR/externalpackages/dakota/install" \ 32 32 --without-graphics \ 33 33 --with-pic \ 34 34 --disable-mpi \ 35 --with-blas="-L$ISSM_ TIER/externalpackages/petsc/install/lib -lfblas " \36 --with-lapack="-L$ISSM_ TIER/externalpackages/petsc/install/lib -lflapack -lPLAPACK "35 --with-blas="-L$ISSM_DIR/externalpackages/petsc/install/lib -lfblas " \ 36 --with-lapack="-L$ISSM_DIR/externalpackages/petsc/install/lib -lflapack -lPLAPACK " 37 37 cd .. 38 38 -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/dakota/install-pleiades.sh ¶
r11101 r12168 29 29 cd src 30 30 ./configure \ 31 --prefix="$ISSM_ TIER/externalpackages/dakota/install" \31 --prefix="$ISSM_DIR/externalpackages/dakota/install" \ 32 32 --without-graphics \ 33 33 --with-pic \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/doxygen/install.sh ¶
r11241 r12168 8 8 9 9 #Configure doxygen 10 cd install && ./configure --prefix "$ISSM_ TIER/externalpackages/doxygen/install"10 cd install && ./configure --prefix "$ISSM_DIR/externalpackages/doxygen/install" 11 11 if [ -z $1 ]; then 12 12 make -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/gdal/install.sh ¶
r11128 r12168 17 17 cd src 18 18 ./configure \ 19 --prefix="$ISSM_ TIER/externalpackages/gdal/install" \19 --prefix="$ISSM_DIR/externalpackages/gdal/install" \ 20 20 --without-python \ 21 21 --with-netcdf=no \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/gmake/install.sh ¶
r11748 r12168 16 16 17 17 #Configure and compile: 18 ./configure --prefix=$ISSM_ TIER/externalpackages/gmake/install18 ./configure --prefix=$ISSM_DIR/externalpackages/gmake/install 19 19 20 20 if [ -z $1 ]; then -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/graphviz/install.sh ¶
r11128 r12168 14 14 #Configure dakota 15 15 cd src 16 ./configure --prefix="$ISSM_ TIER/externalpackages/graphviz/install"16 ./configure --prefix="$ISSM_DIR/externalpackages/graphviz/install" 17 17 cd .. 18 18 -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/gsl/install-linux64-murdo.sh ¶
r11773 r12168 16 16 17 17 ./configure \ 18 --prefix="$ISSM_ TIER/externalpackages/gsl/install"18 --prefix="$ISSM_DIR/externalpackages/gsl/install" 19 19 20 20 #Compile gsl -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/gsl/install-macosx64.sh ¶
r11747 r12168 18 18 19 19 ./configure \ 20 --prefix="$ISSM_ TIER/externalpackages/gsl/install"20 --prefix="$ISSM_DIR/externalpackages/gsl/install" 21 21 22 22 #Compile gsl -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/latex2rtf/install.sh ¶
r11101 r12168 10 10 #Compile 11 11 cd install 12 export PREFIX="$ISSM_ TIER/externalpackages/latex2rtf/install/"12 export PREFIX="$ISSM_DIR/externalpackages/latex2rtf/install/" 13 13 make -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/libtool/install.sh ¶
r11115 r12168 13 13 #Compile libtool 14 14 cd src 15 ./configure --prefix="$ISSM_ TIER/externalpackages/libtool/install"15 ./configure --prefix="$ISSM_DIR/externalpackages/libtool/install" 16 16 make 17 17 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/matlab/install.sh ¶
r12004 r12168 5 5 6 6 #Select or create a new simlink 7 #ln -s /usr/local/pkgs/matlab-7.6/ install7 ln -s /usr/local/pkgs/matlab-7.6/ install 8 8 #ln -s /usr/local/matlab704/ install 9 9 #ln -s /usr/local/matlab711/ install 10 10 ln -s /usr/local/matlab712/ install 11 #ln -s /usr/local/pkgs/matlab-7.6/ install12 11 13 12 # Macintosh (OSX) simlink … … 16 15 #ln -s /Applications/MATLAB_R2010a.app/ install 17 16 #ln -s /Applications/MATLAB_R2012a.app/ install 18 ln -s /Applications/MATLAB*.app/ install17 #ln -s /Applications/MATLAB*.app/ install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/metis/install-5.0.1-linux64.sh ¶
r11128 r12168 17 17 18 18 #Compile metis 19 make config prefix="$ISSM_ TIER/externalpackages/metis/install"19 make config prefix="$ISSM_DIR/externalpackages/metis/install" 20 20 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.0.2-altix64.sh ¶
r11128 r12168 18 18 export FFLAGS="$FFLAGS -fPIC" 19 19 ./configure \ 20 --prefix="$ISSM_ TIER/externalpackages/mpich2/install" \20 --prefix="$ISSM_DIR/externalpackages/mpich2/install" \ 21 21 --enable-sharedlibs=gcc \ 22 22 --enable-f91=gfortran -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.0.2-linux64.sh ¶
r11128 r12168 18 18 export FFLAGS="$FFLAGS -fPIC" 19 19 ./configure \ 20 --prefix="$ISSM_ TIER/externalpackages/mpich2/install" \20 --prefix="$ISSM_DIR/externalpackages/mpich2/install" \ 21 21 --enable-sharedlibs=gcc \ 22 22 --enable-f91=gfortran -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.0.2-macosx32.sh ¶
r11128 r12168 17 17 export CFLAGS=" -m32" 18 18 ./configure \ 19 --prefix="$ISSM_ TIER/externalpackages/mpich2/install" \19 --prefix="$ISSM_DIR/externalpackages/mpich2/install" \ 20 20 --enable-f91=gfortran \ 21 21 --enable-sharedlibs=osx-gcc -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.0.2-win32.sh ¶
r11128 r12168 17 17 export CFLAGS="$CFLAGS -fPIC" 18 18 export FFLAGS="$FFLAGS -fPIC" 19 ./configure --prefix="$ISSM_ TIER/externalpackages/mpich2/install"19 ./configure --prefix="$ISSM_DIR/externalpackages/mpich2/install" 20 20 21 21 #Apply Patch to examples -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.4-linux64.sh ¶
r11128 r12168 17 17 export FFLAGS="$FFLAGS -fPIC" 18 18 ./configure \ 19 --prefix="$ISSM_ TIER/externalpackages/mpich2/install" \19 --prefix="$ISSM_DIR/externalpackages/mpich2/install" \ 20 20 --enable-shared \ 21 21 --enable-sharedlibs=gcc \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.4-macosx32.sh ¶
r11577 r12168 19 19 export CPPFLAGS=" -arch i386" 20 20 ./configure \ 21 --prefix="$ISSM_ TIER/externalpackages/mpich2/install" \21 --prefix="$ISSM_DIR/externalpackages/mpich2/install" \ 22 22 --enable-f91=gfortran \ 23 23 --enable-sharedlibs=osx-gcc \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/mpich2/install-1.4-macosx64.sh ¶
r11128 r12168 19 19 export CXXFLAGS=" -arch x86_64" 20 20 ./configure \ 21 --prefix="$ISSM_ TIER/externalpackages/mpich2/install" \21 --prefix="$ISSM_DIR/externalpackages/mpich2/install" \ 22 22 --enable-f91 \ 23 23 --enable-sharedlibs=osx-gcc \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/ncview/install.sh ¶
r11101 r12168 15 15 cd install 16 16 ./configure \ 17 --prefix "$ISSM_ TIER/externalpackages/ncview/install" \17 --prefix "$ISSM_DIR/externalpackages/ncview/install" \ 18 18 --x-libraries=/usr/X11/lib/ \ 19 19 --x-includes=/usr/X11/include/ \ 20 --with-netcdf_incdir="$ISSM_ TIER/externalpackages/netcdf/install/include/" \21 --with-netcdf_libdir="$ISSM_ TIER/externalpackages/netcdf/install/lib/"20 --with-netcdf_incdir="$ISSM_DIR/externalpackages/netcdf/install/include/" \ 21 --with-netcdf_libdir="$ISSM_DIR/externalpackages/netcdf/install/lib/" 22 22 23 23 make -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/netcdf/install.sh ¶
r11128 r12168 15 15 #Configure and compile 16 16 cd install 17 ./configure --prefix="$ISSM_ TIER/externalpackages/netcdf/install"17 ./configure --prefix="$ISSM_DIR/externalpackages/netcdf/install" 18 18 if [ -z $1 ]; then 19 19 make -
issm/branches/trunk-jpl-damage/externalpackages/nose ¶
- Property svn:ignore
-
TabularUnified
old new 1 1 py3k 2 src-*
-
- Property svn:ignore
-
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/nose/install-macosx64sh ¶
r11841 r12168 1 1 #/bin/bash 2 #Install Python 3nose module2 #Install Python nose module 3 3 4 rm -rf py3k 4 pythonversion=2 5 6 rm -rf src 5 7 6 svn checkout http://python-nose.googlecode.com/svn/branches/py3k 7 cd py3k 8 if [[ $pythonversion == "3" ]];then 8 9 9 python3.2 ./setup.py build 10 python3.2 ./setup.py install 10 svn checkout http://python-nose.googlecode.com/svn/branches/py3k 11 mv py3k src 12 13 cd src 14 python ./setup.py build 15 python ./setup.py install 16 fi 17 18 if [[ $pythonversion == "2" ]];then 19 20 tar -zxvf nose-1.1.2.tar.gz 21 mv nose-1.1.2 src 22 rm -rf nose-1.1.2 23 24 cd src 25 python ./setup.py build 26 python ./setup.py install 27 fi -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/pcre/install.sh ¶
r11128 r12168 13 13 #Configure doxygen 14 14 cd install 15 ./configure --prefix "$ISSM_ TIER/externalpackages/python/install"15 ./configure --prefix "$ISSM_DIR/externalpackages/python/install" 16 16 make 17 17 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-altix64-castor.sh ¶
r11106 r12168 17 17 cd install 18 18 ./config/configure.py \ 19 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \19 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 20 20 --with-batch=1 \ 21 21 --ISSM_ARCH=$ISSM_ARCH \ … … 41 41 cd install 42 42 ./config/configure.py \ 43 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \43 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 44 44 --with-batch=1 \ 45 45 --ISSM_ARCH=$ISSM_ARCH \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-cosmos.sh ¶
r11128 r12168 12 12 #configure 13 13 cd install 14 PETSC_DIR=$ISSM_ TIER/externalpackages/petsc/install14 PETSC_DIR=$ISSM_DIR/externalpackages/petsc/install 15 15 ./config/configure.py \ 16 16 --prefix=$PETSC_DIR \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-linux64-astrid.sh ¶
r11128 r12168 13 13 cd install 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 17 17 --PETSC_ARCH=linux-gnu-amd64 \ 18 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/install" \18 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \ 19 19 --with-fc=gfortran \ 20 20 --with-debugging=1 \ … … 25 25 --download-blas=yes \ 26 26 --download-f-blas-lapack=yes \ 27 --FFLAGS=-I$ISSM_ TIER/externalpackages/mpich2/install/include \27 --FFLAGS=-I$ISSM_DIR/externalpackages/mpich2/install/include \ 28 28 --download-plapack=yes \ 29 29 --COPTFLAGS="-march=opteron -O2" \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-macosx32-eric.sh ¶
r11128 r12168 17 17 cd install 18 18 ./config/configure.py \ 19 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \20 --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \19 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 20 --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 21 21 --PETSC_ARCH=macosx-gnu \ 22 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/install" \22 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \ 23 23 --with-fc=/usr/local/bin/gfortran \ 24 24 --with-debugging=0 \ … … 29 29 --download-blas=yes \ 30 30 --download-f-blas-lapack=yes \ 31 --FFLAGS="-I$ISSM_ TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran -fPIC -arch i386" \31 --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran -fPIC -arch i386" \ 32 32 --download-plapack=yes \ 33 33 --CXXFLAGS=" -fPIC -arch i386" \ … … 43 43 cd install 44 44 ./config/configure.py \ 45 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \46 --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \45 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 46 --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 47 47 --PETSC_ARCH=macosx-gnu \ 48 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/install" \48 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \ 49 49 --with-fc=/usr/local/bin/gfortran \ 50 50 --with-debugging=0 \ 51 51 --with-shared=0 \ 52 --with-mumps-dir=$ISSM_ TIER/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3 \52 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3 \ 53 53 --download-scalapack=yes \ 54 54 --download-blacs=yes \ 55 55 --download-blas=yes \ 56 56 --download-f-blas-lapack=yes \ 57 --FFLAGS="-I$ISSM_ TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran -fPIC -arch i386" \57 --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran -fPIC -arch i386" \ 58 58 --download-plapack=yes \ 59 59 --CXXFLAGS=" -fPIC -arch i386" \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh ¶
r11128 r12168 12 12 #configure 13 13 cd install 14 ./config/configure.py --prefix="$ISSM_ TIER/externalpackages/petsc/install" \15 --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \14 ./config/configure.py --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 15 --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 16 16 --PETSC_ARCH=macosx-gnu \ 17 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/install" \17 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \ 18 18 --with-fc=/usr/local/bin/gfortran \ 19 19 --with-debugging=0 \ … … 24 24 --download-blas=yes \ 25 25 --download-f-blas-lapack=yes \ 26 --FFLAGS="-I$ISSM_ TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran" \26 --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran" \ 27 27 --download-plapack=yes 28 28 -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-macosx64.sh ¶
r12004 r12168 13 13 cd src 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 17 17 --PETSC_ARCH=macosx-gnu \ 18 --with-mpi-dir="$ISSM_ TIER/externalpackages/mpich2/install" \18 --with-mpi-dir="$ISSM_DIR/externalpackages/mpich2/install" \ 19 19 --with-debugging=0 \ 20 20 --with-shared-libraries=0 \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-pleiades.sh ¶
r11106 r12168 17 17 cd install 18 18 ./config/configure.py \ 19 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \19 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 20 20 --with-batch=1 \ 21 21 --PETSC_ARCH=$ISSM_ARCH \ … … 44 44 cd install 45 45 ./config/configure.py \ 46 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \46 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 47 47 --with-batch=1 \ 48 48 --PETSC_ARCH=$ISSM_ARCH \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-win32-eric.sh ¶
r11128 r12168 14 14 ./config/configure.py \ 15 15 --with-parallel-no \ 16 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 17 17 --PETSC_ARCH=cygwin-intel \ 18 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/install" \18 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \ 19 19 --with-debugging=0 \ 20 20 --with-mpi=0 \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-2.3.2-win7.sh ¶
r11386 r12168 14 14 ./config/configure.py \ 15 15 --with-parallel-no \ 16 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 17 17 --PETSC_ARCH=cygwin-intel \ 18 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/install" \18 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \ 19 19 --with-debugging=0 \ 20 20 --with-mpi=0 \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.1-altix64-castor.sh ¶
r11106 r12168 17 17 cd src 18 18 ./config/configure.py \ 19 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \20 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \19 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 20 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 21 21 --ISSM_ARCH=$ISSM_ARCH \ 22 22 --with-debugging=no \ … … 41 41 cd src 42 42 ./config/configure.py \ 43 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \44 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \43 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 44 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 45 45 --with-batch=1 \ 46 46 --ISSM_ARCH=$ISSM_ARCH \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.1-cosmos.sh ¶
r11128 r12168 13 13 cd src 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 17 17 --with-batch=1 \ 18 18 --ISSM_ARCH=$ISSM_ARCH \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.1-linux64-astrid.sh ¶
r11128 r12168 13 13 cd src 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 17 17 --PETSC_ARCH=linux-gnu-amd64 \ 18 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \18 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 19 19 --with-debugging=0 \ 20 20 --with-shared=0 \ … … 25 25 --download-f-blas-lapack=yes \ 26 26 --download-parmetis=yes \ 27 --FFLAGS=-I$ISSM_ TIER/externalpackages/mpich2/install/include \27 --FFLAGS=-I$ISSM_DIR/externalpackages/mpich2/install/include \ 28 28 --download-plapack=yes \ 29 29 --COPTFLAGS="-march=opteron -O2" \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.1-macosx32-mathieu.sh ¶
r11128 r12168 13 13 cd src 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 17 17 --PETSC_ARCH=macosx-gnu \ 18 --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \18 --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 19 19 --with-debugging=0 \ 20 20 --with-shared=0 \ … … 25 25 --download-f-blas-lapack=yes \ 26 26 --download-plapack=yes \ 27 --FFLAGS="-I$ISSM_ TIER/externalpackages/mpich2/install/include -arch i386" \27 --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -arch i386" \ 28 28 --COPTFLAGS="-march=opteron -O2 -arch i386" \ 29 29 --FOPTFLAGS="-march=opteron -O2 -arch i386" \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.1-macosx32-ogive.sh ¶
r11128 r12168 13 13 cd src 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \17 --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 17 --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 18 18 --PETSC_ARCH=macosx-gnu \ 19 19 --with-fc=/usr/local/bin/gfortran \ … … 30 30 --FOPTFLAGS="-march=opteron -O2 " \ 31 31 --CXXOPTFLAGS="-march=opteron -O2 " \ 32 --FFLAGS="-I$ISSM_ TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran "32 --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran " 33 33 34 34 #Compile petsc and install it -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.1-pleiades.sh ¶
r11106 r12168 17 17 cd src 18 18 ./config/configure.py \ 19 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \19 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 20 20 --with-batch=1 \ 21 21 --PETSC_ARCH="$ISSM_ARCH" \ 22 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \22 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 23 23 --with-debugging=no \ 24 24 --with-shared=0 \ … … 44 44 cd src 45 45 ./config/configure.py \ 46 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \46 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 47 47 --with-batch=1 \ 48 48 --PETSC_ARCH="$ISSM_ARCH" \ 49 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \49 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 50 50 --with-debugging=no \ 51 51 --with-shared=0 \ … … 57 57 --download-scalapack=yes \ 58 58 --download-blacs=yes \ 59 --with-plapack-dir=$ISSM_ TIER/externalpackages/petsc/src/$ISSM_ARCH \59 --with-plapack-dir=$ISSM_DIR/externalpackages/petsc/src/$ISSM_ARCH \ 60 60 --download-parmetis=yes \ 61 61 --FFLAGS=-I/usr/include \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.1-win7.sh ¶
r12004 r12168 14 14 ./config/configure.py \ 15 15 --with-parallel-no \ 16 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 17 17 --PETSC_ARCH=cygwin-intel \ 18 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \18 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 19 19 --with-debugging=0 \ 20 20 --with-mpi=0 \ … … 26 26 27 27 #./config/configure.py \ 28 # --prefix="$ISSM_ TIER/externalpackages/petsc/install" \29 # --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \28 # --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 29 # --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 30 30 # --PETSC_ARCH=macosx-gnu \ 31 # --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \31 # --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 32 32 # --with-debugging=0 \ 33 33 # --with-shared=0 \ … … 38 38 # --download-f-blas-lapack=yes \ 39 39 # --download-plapack=yes \ 40 # --FFLAGS="-I$ISSM_ TIER/externalpackages/mpich2/install/include -arch i386" \40 # --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -arch i386" \ 41 41 # --COPTFLAGS="-march=opteron -O2 -arch i386" \ 42 42 # --FOPTFLAGS="-march=opteron -O2 -arch i386" \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.2-greenplanet.sh ¶
r11382 r12168 13 13 cd src 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 17 17 --PETSC_ARCH="$ISSM_ARCH" \ 18 18 --with-batch=1 \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.2-linux64.sh ¶
r11167 r12168 13 13 cd src 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --with-mpi-dir=$ISSM_ TIER/externalpackages/mpich2/install \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \ 17 17 --with-clanguage=C++ \ 18 18 --PETSC_ARCH=linux-gnu-amd64 \ 19 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \19 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 20 20 --with-debugging=0 \ 21 21 --with-shared-libraries=0 \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.2-macosx64.sh ¶
r11128 r12168 13 13 cd src 14 14 ./config/configure.py \ 15 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \16 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \15 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 16 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 17 17 --PETSC_ARCH=macosx-gnu \ 18 --with-mpi-dir="$ISSM_ TIER/externalpackages/mpich2/install" \18 --with-mpi-dir="$ISSM_DIR/externalpackages/mpich2/install" \ 19 19 --with-debugging=0 \ 20 20 --with-shared-libraries=0 \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-3.2-pleiades.sh ¶
r11110 r12168 17 17 cd src 18 18 ./config/configure.py \ 19 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \19 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 20 20 --with-batch=1 \ 21 21 --PETSC_ARCH="$ISSM_ARCH" \ 22 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \22 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 23 23 --with-debugging=0 \ 24 24 --with-shared-libraries=0 \ … … 44 44 cd src 45 45 ./config/configure.py \ 46 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \46 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 47 47 --with-batch=1 \ 48 48 --PETSC_ARCH="$ISSM_ARCH" \ 49 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \49 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 50 50 --with-debugging=0 \ 51 51 --with-shared-libraries=0 \ … … 57 57 --download-scalapack=yes \ 58 58 --download-blacs=yes \ 59 --with-plapack-dir=$ISSM_ TIER/externalpackages/petsc/src/$ISSM_ARCH \59 --with-plapack-dir=$ISSM_DIR/externalpackages/petsc/src/$ISSM_ARCH \ 60 60 --download-parmetis=yes \ 61 61 --FFLAGS=-I/usr/include \ -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/petsc/install-dev-linux64.sh ¶
r12004 r12168 6 6 # Adapted from petsc 3.2. 7 7 # Used Mercurial to get code 8 rm -rf src 8 9 hg clone http://petsc.cs.iit.edu/petsc/petsc-dev src 9 10 cd src … … 25 26 26 27 if [ $STEP -eq 2 ]; then 28 rm -rf install 27 29 cd src 28 30 ./config/configure.py \ 29 --prefix="$ISSM_ TIER/externalpackages/petsc/install" \30 --with-mpi-dir="$ISSM_ TIER/externalpackages/mpich2/install" \31 --prefix="$ISSM_DIR/externalpackages/petsc/install" \ 32 --with-mpi-dir="$ISSM_DIR/externalpackages/mpich2/install" \ 31 33 --with-clanguage=C++ \ 32 34 --PETSC_ARCH=linux-gnu-amd64 \ 33 --PETSC_DIR="$ISSM_ TIER/externalpackages/petsc/src" \35 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \ 34 36 --with-debugging=0 \ 35 37 --with-shared-libraries=0 \ … … 42 44 --download-plapack=yes \ 43 45 --download-parmetis=yes \ 46 --download-spai=yes \ 44 47 --with-pic=1 45 48 -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/python/install.sh ¶
r12004 r12168 20 20 #Configure doxygen 21 21 cd src 22 ./configure --prefix="$ISSM_ TIER/externalpackages/python/install" --enable-framework="$ISSM_TIER/externalpackages/python/install"22 ./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install" 23 23 if [ -z $1 ]; then 24 24 make -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/qhull/install.sh ¶
r11128 r12168 15 15 #Configure qhull 16 16 cd src 17 ./configure --prefix="$ISSM_ TIER/externalpackages/qhull/install"17 ./configure --prefix="$ISSM_DIR/externalpackages/qhull/install" 18 18 make 19 19 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/rats/install.sh ¶
r11128 r12168 12 12 #compile 13 13 cd src 14 ./configure --prefix=$ISSM_ TIER/externalpackages/rats/install14 ./configure --prefix=$ISSM_DIR/externalpackages/rats/install 15 15 make 16 16 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/rose/install.sh ¶
r11128 r12168 15 15 cd build 16 16 ../source/configure \ 17 --prefix=$ISSM_ TIER/externalpackages/rose/install \18 --with-boost=$ISSM_ TIER/externalpackages/boost/install\19 --srcdir=$ISSM_ TIER/externalpackages/rose/source17 --prefix=$ISSM_DIR/externalpackages/rose/install \ 18 --with-boost=$ISSM_DIR/externalpackages/boost/install\ 19 --srcdir=$ISSM_DIR/externalpackages/rose/source 20 20 21 21 if [ -z $1 ]; then -
issm/branches/trunk-jpl-damage/externalpackages/scipy ¶
- Property svn:ignore
-
TabularUnified
old new 1 1 scipy 2 scipy-* 2 3 numpy 4 numpy-*
-
- Property svn:ignore
-
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/scipy/install-macosx64.sh ¶
r11944 r12168 19 19 #install numpy 20 20 cd numpy 21 python 3.2setup.py build22 python 3.2setup.py install21 python setup.py build 22 python setup.py install 23 23 24 24 … … 30 30 #install scipy 31 31 cd scipy 32 python 3.2setup.py build33 python 3.2setup.py install32 python setup.py build 33 python setup.py install 34 34 35 35 elif [[ $install == "3" ]];then -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/swig/install.sh ¶
r11113 r12168 13 13 #Copy pcre prototype in include directory 14 14 cd install 15 #cp $ISSM_ TIER/externalpackages/pcre/install/pcre.h ./Source/Include/16 #cp $ISSM_ TIER/externalpackages/pcre/install/.libs/* ./Source/Include/17 export CFLAGS="$CFLAGS -I$ISSM_ TIER/externalpackages/pcre/install"18 export LDFLAGS="-L$ISSM_ TIER/externalpackages/pcre/install/.libs/"15 #cp $ISSM_DIR/externalpackages/pcre/install/pcre.h ./Source/Include/ 16 #cp $ISSM_DIR/externalpackages/pcre/install/.libs/* ./Source/Include/ 17 export CFLAGS="$CFLAGS -I$ISSM_DIR/externalpackages/pcre/install" 18 export LDFLAGS="-L$ISSM_DIR/externalpackages/pcre/install/.libs/" 19 19 export LIBS="-lpcre" 20 20 #Configure doxygen 21 21 ./configure \ 22 --prefix="$ISSM_ TIER/externalpackages/python/install" \23 --with-pcre-prefix="$ISSM_ TIER/externalpackages/pcre/install" \24 --with-pcre-exec-prefix="$ISSM_ TIER/externalpackages/pcre/install"22 --prefix="$ISSM_DIR/externalpackages/python/install" \ 23 --with-pcre-prefix="$ISSM_DIR/externalpackages/pcre/install" \ 24 --with-pcre-exec-prefix="$ISSM_DIR/externalpackages/pcre/install" 25 25 make 26 26 make install -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/tao/install.sh ¶
r11577 r12168 14 14 rm -rf tao-2.0-p3 15 15 cd install 16 export TAO_DIR="$ISSM_ TIER/externalpackages/tao/install/"16 export TAO_DIR="$ISSM_DIR/externalpackages/tao/install/" 17 17 18 18 #petsc needs to be compiled with --with-clanguage=C++ -
issm/branches/trunk-jpl-damage/externalpackages/triangle ¶
- Property svn:ignore
-
TabularUnified
old new 1 1 install 2 install-matlab 3 install-python
-
- Property svn:ignore
-
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/triangle/configs/android/android-4.0/configure.make ¶
r11989 r12168 11 11 12 12 ANDROID_BIN=$(ISSM_TIER)/src/android/tmp/android-14-toolchain/bin 13 CC=$(ANDROID_D EV_DIR)/tmp/android-linux-4.0/bin/arm-linux-androideabi-gcc14 AR=$(ANDROID_D EV_DIR)/tmp/android-linux-4.0/bin/arm-linux-androideabi-ar15 RANLIB=$(ANDROID_D EV_DIR)/tmp/android-linux-4.0/bin/arm-linux-androideabi-ranlib16 CSWITCHES = $(CFLAGS) -I/usr/X11R6/include -L/usr/X11R6/lib -I$(MATLAB_DIR)/extern/include -fPIC -I$(MATLAB_DIR)/include13 CC=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc 14 AR=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-ar 15 RANLIB=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-ranlib 16 CSWITCHES = $(CFLAGS) 17 17 TRILIBDEFS = -DTRILIBRARY 18 18 OBJ_EXT=o -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/triangle/triangle.c.patch.python ¶
r12004 r12168 5 5 > * double precision activation in exactinit(); The rest is not changed. 6 6 > * We also created the ice_makefile to compile Triangle into a library. */ 7 > #include <mat.h>8 > #include <matrix.h> 7 > /* #include <mat.h> 8 > #include <matrix.h> */ 9 9 > #define ANSI_DECLARATORS 10 10 > #define NO_TIMER -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/valgrind/install-altix64.sh ¶
r11187 r12168 14 14 #configure 15 15 cd install 16 ./configure --prefix="$ISSM_ TIER/externalpackages/valgrind/install"16 ./configure --prefix="$ISSM_DIR/externalpackages/valgrind/install" 17 17 18 18 #Compile valgrind -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/valgrind/install-linux64.sh ¶
r11187 r12168 14 14 #configure 15 15 cd install 16 ./configure --prefix="$ISSM_ TIER/externalpackages/valgrind/install"16 ./configure --prefix="$ISSM_DIR/externalpackages/valgrind/install" 17 17 18 18 #Compile valgrind -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/valgrind/install-macosx32.sh ¶
r11187 r12168 14 14 #configure 15 15 cd install 16 ./configure --prefix="$ISSM_ TIER/externalpackages/valgrind/install" --enable-only32bit16 ./configure --prefix="$ISSM_DIR/externalpackages/valgrind/install" --enable-only32bit 17 17 18 18 #Compile valgrind -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/valgrind/install-macosx64.sh ¶
r11187 r12168 14 14 #configure 15 15 cd install 16 ./configure --prefix="$ISSM_ TIER/externalpackages/valgrind/install" --enable-only64bit16 ./configure --prefix="$ISSM_DIR/externalpackages/valgrind/install" --enable-only64bit 17 17 18 18 #Compile valgrind -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/valgrind/install-win32.sh ¶
r11187 r12168 14 14 #configure 15 15 cd install 16 ./configure --prefix="$ISSM_ TIER/externalpackages/valgrind/install"16 ./configure --prefix="$ISSM_DIR/externalpackages/valgrind/install" 17 17 18 18 #Compile valgrind -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/vim/install.sh ¶
r11128 r12168 19 19 cd src/src 20 20 ./configure \ 21 --prefix "$ISSM_ TIER/externalpackages/vim/install" \21 --prefix "$ISSM_DIR/externalpackages/vim/install" \ 22 22 --with-gcc "/usr/bin/gcc" 23 23 -
TabularUnified issm/branches/trunk-jpl-damage/externalpackages/windows/configs/sdk7.1.win7-64.sh ¶
r12004 r12168 15 15 declare -x LOCALAPPDATA="C:\\Users\\schlegel\\AppData\\Local" 16 16 declare -x MANPATH="/usr/local/man:/usr/share/man:/usr/man:" 17 declare -x PATH="/usr/local/bin:/usr/bin:/usr/include:/cygdrive/c/cygwin/usr/bin:/cygdrive/c/cygwin/usr/include:/cygdrive/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework64/v3.5:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/MATLAB/R201 1b/runtime/win64:/cygdrive/b/MATLAB/R2011b/bin:/cygdrive/c/MATLAB/R2011b/extern/include:/cygdrive/c/MATLAB/R2011a/runtime/win64:/cygdrive/c/MATLAB/R2011a/bin:/cygdrive/c/MATLAB/R2011a/extern/include"17 declare -x PATH="/usr/local/bin:/usr/bin:/usr/include:/cygdrive/c/cygwin/usr/bin:/cygdrive/c/cygwin/usr/include:/cygdrive/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework64/v3.5:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/MATLAB/R2012a/runtime/win64:/cygdrive/c/MATLAB/R2012a/bin:/cygdrive/c/MATLAB/R2012a/extern/include:/cygdrive/c/MATLAB/R2011a/runtime/win64:/cygdrive/c/MATLAB/R2011a/bin:/cygdrive/c/MATLAB/R2011a/extern/include" 18 18 declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" 19 19 declare -x PROCESSOR_ARCHITECTURE="x86" -
TabularUnified issm/branches/trunk-jpl-damage/m4/issm_options.m4 ¶
r12004 r12168 13 13 fi 14 14 dnl }}} 15 dnl Serial build {{{ 16 AC_ARG_WITH([serial], 17 AS_HELP_STRING([--with-serial = value],[serial compilation. ]), 18 [SERIAL_VALUE=$withval],[SERIAL_VALUE="yes"]) 19 AC_MSG_CHECKING(for serial compilation) 20 AM_CONDITIONAL([NOSERIAL], [test $SERIAL_VALUE = no]) 21 AM_CONDITIONAL([SERIAL], [test $SERIAL_VALUE = yes]) 22 AC_MSG_RESULT($SERIAL_VALUE) 23 dnl }}} 24 dnl Parallel build {{{ 25 AC_ARG_WITH([parallel], 26 AS_HELP_STRING([--with-parallel = value], [parallel compilation. ]), 27 [PARALLEL_VALUE=$withval],[PARALLEL_VALUE="yes"]) 28 AC_MSG_CHECKING(for parallel compilation) 29 AM_CONDITIONAL([NOPARALLEL], [test $PARALLEL_VALUE = no]) 30 AM_CONDITIONAL([PARALLEL], [test $PARALLEL_VALUE = yes]) 31 AC_MSG_RESULT($PARALLEL_VALUE) 15 dnl Modules build {{{ 16 AC_ARG_WITH([modules], 17 AS_HELP_STRING([--with-modules = value],[modules compilation. ]), 18 [MODULES_VALUE=$withval],[MODULES_VALUE="yes"]) 19 AC_MSG_CHECKING(for modules compilation) 20 AM_CONDITIONAL([MODULES], [test $MODULES_VALUE = yes]) 21 AC_MSG_RESULT($MODULES_VALUE) 22 dnl }}} 23 dnl Extensions{{{ 32 24 ISSMEXT=".exe" 33 25 AC_SUBST([ISSMEXT]) 34 dnl }}}35 dnl Serial or Parallel check {{{36 dnl Check that at least serial or parallel builds have been requested!37 if test "$SERIAL_VALUE" != "yes" ; then38 if test "$PARALLEL_VALUE" != "yes"; then39 AC_MSG_ERROR([cannot request --with-serial=no and --with-parallel=no at the same time!])40 fi41 fi42 26 dnl }}} 43 27 … … 81 65 export CXXFLAGS=" -O3 -xS -D_INTEL_LINUX_ " 82 66 export CFLAGS=" -O3 -xS -D_INTEL_LINUX_ " 67 elif test $VENDOR = arm-linux; then 68 export CC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-cc 69 export CXX=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-cc 70 83 71 else 84 72 AC_MSG_ERROR([unknow compiler vendor!]) … … 92 80 dnl 1. See if matlab has been provided 93 81 AC_ARG_WITH([matlab-dir], 94 AS_HELP_STRING([--with-matlab-dir =DIR], [matlab root directory. necessary for serial build.]),82 AS_HELP_STRING([--with-matlab-dir=DIR], [matlab root directory. necessary for serial build.]), 95 83 [MATLAB_ROOT=$withval],[MATLAB_ROOT=""]) 96 84 97 AC_MSG_CHECKING([w ether Matlab is enabled])85 AC_MSG_CHECKING([whether matlab is enabled]) 98 86 if test -d "$MATLAB_ROOT"; then 99 87 HAVE_MATLAB=yes … … 109 97 dnl 2. if matlab is provided, get version number 110 98 if test x$HAVE_MATLAB = xyes; then 111 AC_MSG_CHECKING([for Matlab version])99 AC_MSG_CHECKING([for matlab version]) 112 100 MATLAB_VERSION="" 113 101 … … 172 160 173 161 dnl 3. Get Matlab libraries 174 AC_MSG_CHECKING(for Matlab headers and libraries in $MATLAB_ROOT)162 AC_MSG_CHECKING(for matlab headers and libraries in $MATLAB_ROOT) 175 163 MATLABINCL=-I"$MATLAB_ROOT/extern/include"; 176 164 … … 191 179 *darwin*) 192 180 dnl mex -v gives all the flags for compilation of mex files 193 dnl if matlab version is 7. 10or more, we must use mexmaci64 (64 bits)181 dnl if matlab version is 7.9 or more, we must use mexmaci64 (64 bits) 194 182 MEXLINK="-O -Wl,-flat_namespace -undefined suppress -arch i386 -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci/mexFunction.map" 195 183 MEXLIB=" -L$MATLAB_ROOT/bin/maci/ -lmx -lmex -lmat -lstdc++ -largeArrayDims" 196 184 if test $MATLAB_MAJOR -ge 7; then 197 if test $MATLAB_MINOR -ge 10; then185 if test $MATLAB_MINOR -ge 9; then 198 186 MEXLINK="-O -Wl,-flat_namespace -undefined suppress -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci64/mexFunction.map" 199 187 MEXLIB=" -L$MATLAB_ROOT/bin/maci64/ -lmx -lmex -lmat -lstdc++" … … 217 205 AC_SUBST([MATLABINCL]) 218 206 AC_SUBST([MEX]) 219 WRAPPEREXT=$MEXEXT220 AC_SUBST([ WRAPPEREXT])207 MATLABWRAPPEREXT=$MEXEXT 208 AC_SUBST([MATLABWRAPPEREXT]) 221 209 AC_SUBST([MEXLIB]) 222 210 AC_SUBST([MEXLINK]) … … 225 213 dnl triangle {{{ 226 214 AC_ARG_WITH([triangle-dir], 227 AS_HELP_STRING([--with-triangle-dir =DIR], [triangle root directory. necessary for serial build]),215 AS_HELP_STRING([--with-triangle-dir=DIR], [triangle root directory. necessary for serial build]), 228 216 [TRIANGLE_ROOT=$withval],[TRIANGLE_ROOT=""]) 229 AC_MSG_CHECKING(for Triangle headers and libraries)217 AC_MSG_CHECKING(for triangle headers and libraries) 230 218 231 219 if test -d "$TRIANGLE_ROOT"; then … … 266 254 dnl dakota{{{ 267 255 AC_ARG_WITH([dakota-dir], 268 AS_HELP_STRING([--with-dakota-dir =DIR], [dakota root directory. necessary for serial build]),256 AS_HELP_STRING([--with-dakota-dir=DIR], [dakota root directory. necessary for serial build]), 269 257 [DAKOTA_ROOT=$withval],[DAKOTA_ROOT=""]) 270 AC_MSG_CHECKING(for Dakota)258 AC_MSG_CHECKING(for dakota) 271 259 272 260 if test -d "$DAKOTA_ROOT"; then … … 299 287 dnl boost{{{ 300 288 AC_ARG_WITH([boost-dir], 301 AS_HELP_STRING([--with-boost-dir =DIR], [boost root directory.]),289 AS_HELP_STRING([--with-boost-dir=DIR], [boost root directory.]), 302 290 [BOOST_ROOT=$withval],[BOOST_ROOT=""]) 303 AC_MSG_CHECKING(for Boost)291 AC_MSG_CHECKING(for boost) 304 292 305 293 if test -d "$BOOST_ROOT"; then … … 318 306 AC_MSG_RESULT($HAVE_BOOST) 319 307 dnl }}} 308 dnl python-version{{{ 309 AC_ARG_WITH([python-version], 310 AS_HELP_STRING([--with-python-version = PYTHONVERSION],[python version.]), 311 [PYTHONVERSION=$withval],[PYTHONVERSION=""]) 312 AC_MSG_CHECKING(for python version) 313 314 HAVE_PYTHON3="no" 315 316 dnl recover major: 317 PYTHON_MAJOR=${PYTHONVERSION%.*} 318 319 if test x$PYTHON_MAJOR = x3; then 320 dnl are we running python 3? 321 HAVE_PYTHON3="yes" 322 fi 323 AC_DEFINE_UNQUOTED([_PYTHON_MAJOR_],$PYTHON_MAJOR,[python version major]) 324 325 AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes]) 326 AC_MSG_RESULT($PYTHON_MAJOR) 327 dnl }}} 320 328 dnl python{{{ 321 329 AC_ARG_WITH([python-dir], 322 AS_HELP_STRING([--with-python-dir =DIR], [python root directory.]),330 AS_HELP_STRING([--with-python-dir=DIR], [python root directory.]), 323 331 [PYTHON_ROOT=$withval],[PYTHON_ROOT=""]) 324 AC_MSG_CHECKING(for Python)332 AC_MSG_CHECKING(for python) 325 333 326 334 if test -d "$PYTHON_ROOT"; then … … 328 336 HAVE_PYTHON=yes 329 337 PYTHONINCL=-I$PYTHON_ROOT/include 330 PYTHONLIB="-L$PYTHON_ROOT/lib -lpython 3.2"338 PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHONVERSION" 331 339 PYTHONEXT=.so 332 340 PYTHONLINK="-dynamiclib" … … 335 343 AC_SUBST([PYTHONINCL]) 336 344 AC_SUBST([PYTHONLIB]) 337 WRAPPEREXT=$PYTHONEXT338 AC_SUBST([ WRAPPEREXT])345 PYTHONWRAPPEREXT=$PYTHONEXT 346 AC_SUBST([PYTHONWRAPPEREXT]) 339 347 AC_SUBST([PYTHONLINK]) 340 348 else … … 346 354 dnl python-numpy{{{ 347 355 AC_ARG_WITH([python-numpy-dir], 348 AS_HELP_STRING([--with-python-numpy-dir =DIR], [python-numpy root directory.]),356 AS_HELP_STRING([--with-python-numpy-dir=DIR], [python-numpy root directory.]), 349 357 [PYTHON_NUMPY_ROOT=$withval],[PYTHON_NUMPY_ROOT=""]) 350 AC_MSG_CHECKING(for Python-Numpy)358 AC_MSG_CHECKING(for python-numpy) 351 359 352 360 if test -d "$PYTHON_NUMPY_ROOT"; then … … 364 372 dnl chaco{{{ 365 373 AC_ARG_WITH([chaco-dir], 366 AS_HELP_STRING([--with-chaco-dir =DIR], [chaco root directory.]),374 AS_HELP_STRING([--with-chaco-dir=DIR], [chaco root directory.]), 367 375 [CHACO_ROOT=$withval],[CHACO_ROOT=""]) 368 AC_MSG_CHECKING(for Chaco)376 AC_MSG_CHECKING(for chaco) 369 377 370 378 if test -d "$CHACO_ROOT"; then … … 386 394 dnl scotch{{{ 387 395 AC_ARG_WITH([scotch-dir], 388 AS_HELP_STRING([--with-scotch-dir =DIR], [scotch root directory.]),396 AS_HELP_STRING([--with-scotch-dir=DIR], [scotch root directory.]), 389 397 [SCOTCH_ROOT=$withval],[SCOTCH_ROOT=""]) 390 AC_MSG_CHECKING(for Scotch)398 AC_MSG_CHECKING(for scotch) 391 399 392 400 if test -d "$SCOTCH_ROOT"; then … … 408 416 dnl adolc{{{ 409 417 AC_ARG_WITH([adolc-dir], 410 AS_HELP_STRING([--with-adolc-dir =DIR], [adolc root directory.]),418 AS_HELP_STRING([--with-adolc-dir=DIR], [adolc root directory.]), 411 419 [ADOLC_ROOT=$withval],[ADOLC_ROOT="no"]) 412 AC_MSG_CHECKING(for ADOLC)420 AC_MSG_CHECKING(for adolc) 413 421 414 422 if test "x$ADOLC_ROOT" = "xno"; then … … 436 444 dnl adic2{{{ 437 445 AC_ARG_WITH([adic2-dir], 438 AS_HELP_STRING([--with-adic2-dir =DIR], [adic2 root directory.]),446 AS_HELP_STRING([--with-adic2-dir=DIR], [adic2 root directory.]), 439 447 [ADIC2_ROOT=$withval],[ADIC2_ROOT="no"]) 440 AC_MSG_CHECKING(for ADIC2)448 AC_MSG_CHECKING(for adic2) 441 449 442 450 if test "x$ADIC2_ROOT" = "xno"; then … … 464 472 dnl gsl{{{ 465 473 AC_ARG_WITH([gsl-dir], 466 AS_HELP_STRING([--with-gsl-dir =DIR], [gsl root directory.]),474 AS_HELP_STRING([--with-gsl-dir=DIR], [gsl root directory.]), 467 475 [GSL_ROOT=$withval],[GSL_ROOT=""]) 468 AC_MSG_CHECKING(for Gsl)476 AC_MSG_CHECKING(for gsl) 469 477 470 478 if test -d "$GSL_ROOT"; then … … 487 495 dnl rose{{{ 488 496 AC_ARG_WITH([rose-dir], 489 AS_HELP_STRING([--with-rose-dir =DIR], [rose root directory.]),497 AS_HELP_STRING([--with-rose-dir=DIR], [rose root directory.]), 490 498 [ROSE_ROOT=$withval],[ROSE_ROOT=""]) 491 AC_MSG_CHECKING(for Rose)499 AC_MSG_CHECKING(for rose) 492 500 493 501 if test -d "$ROSE_ROOT"; then … … 510 518 dnl metis{{{ 511 519 AC_ARG_WITH([metis-dir], 512 AS_HELP_STRING([--with-metis-dir =DIR],[metis root directory. necessary for serial build]),520 AS_HELP_STRING([--with-metis-dir=DIR],[metis root directory. necessary for serial build]), 513 521 [METIS_ROOT=$withval],[METIS_ROOT=""]) 514 522 515 523 if test -d "$METIS_ROOT"; then 516 524 517 AC_MSG_CHECKING(for Metis headers and libraries in $METIS_ROOT)525 AC_MSG_CHECKING(for metis headers and libraries in $METIS_ROOT) 518 526 519 527 dnl first figure out version of metis: does the VERSION file exist? … … 568 576 HAVE_METIS=no 569 577 fi 570 571 if test $HAVE_METIS = no; then 572 AC_MSG_ERROR([--with-metis-dir missing. Metis is needed to run ISSM]); 573 else 574 AC_MSG_RESULT($HAVE_METIS) 575 fi 578 AM_CONDITIONAL([METIS], [test x$HAVE_METIS = xyes]) 576 579 dnl }}} 577 580 dnl mpi{{{ … … 582 585 583 586 AC_ARG_WITH([mpi-include], 584 AS_HELP_STRING([--with-mpi-include =DIR],[mpi include directory, necessary for parallel build]),587 AS_HELP_STRING([--with-mpi-include=DIR],[mpi include directory, necessary for parallel build]), 585 588 [MPI_INCLUDE=$withval],[MPI_INCLUDE=""]) 586 589 … … 591 594 HAVE_MPI=no 592 595 else 596 HAVE_MPI=yes 593 597 MPIINCL=-I"$MPI_INCLUDE/" 594 598 AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src]) … … 598 602 fi 599 603 fi 600 AC_MSG_RESULT(done) 604 AM_CONDITIONAL([MPI], [test x$HAVE_MPI = xyes]) 605 AC_MSG_RESULT($HAVE_MPI) 601 606 dnl }}} 602 607 dnl petsc{{{ 603 608 AC_ARG_WITH([petsc-dir], 604 AS_HELP_STRING([--with-petsc-dir =DIR],[PETSc root directory, necessary for parallel build]),609 AS_HELP_STRING([--with-petsc-dir=DIR],[PETSc root directory, necessary for parallel build]), 605 610 [PETSC_ROOT=$withval],[PETSC_ROOT=""]) 606 611 607 612 if test -d "$PETSC_ROOT"; then 608 AC_MSG_CHECKING(for PETSc version)613 AC_MSG_CHECKING(for petsc version) 609 614 PETSC_MAJOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MAJOR" | sed 's/#define PETSC_VERSION_MAJOR//' | sed 's/ //g'` 610 615 PETSC_MINOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MINOR" | sed 's/#define PETSC_VERSION_MINOR//' | sed 's/ //g'` … … 614 619 615 620 PETSC_VERSION_DATE_HG=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_DATE_HG" | sed 's/#define PETSC_VERSION_DATE_HG//' | sed 's/ //g' | sed -e 's/\"//g' ` 616 AC_MSG_CHECKING(w ether PETSc is the development version)621 AC_MSG_CHECKING(whether petsc is the development version) 617 622 if test x$PETSC_VERSION_DATE_HG = xunknown; then 618 623 AC_DEFINE([_HAVE_PETSCDEV_],[1],[with PETSc-dev]) … … 624 629 625 630 AC_ARG_WITH([petsc-arch], 626 AS_HELP_STRING([--with-petsc-arch =DIR],[PETSc arch , necessary for parallel build]),631 AS_HELP_STRING([--with-petsc-arch=DIR],[PETSc arch , necessary for parallel build]), 627 632 [PETSC_ARCH=$withval],[PETSC_ARCH=""]) 628 633 629 AC_MSG_CHECKING(for PETSc headers and libraries in $PETSC_ROOT for architecture $PETSC_ARCH)634 AC_MSG_CHECKING(for petsc headers and libraries in $PETSC_ROOT for architecture $PETSC_ARCH) 630 635 631 636 if test -d "$PETSC_ROOT"; then … … 671 676 dnl tao{{{ 672 677 AC_ARG_WITH([tao-dir], 673 AS_HELP_STRING([--with-tao-dir =DIR], [tao root directory.]),678 AS_HELP_STRING([--with-tao-dir=DIR], [tao root directory.]), 674 679 [TAO_ROOT=$withval],[TAO_ROOT=""]) 675 AC_MSG_CHECKING(for Tao)680 AC_MSG_CHECKING(for tao) 676 681 677 682 if test -d "$TAO_ROOT"; then … … 689 694 AC_MSG_RESULT($HAVE_TAO) 690 695 dnl }}} 691 dnl mpiuni{{{692 dnl when running in serial mode, MPI must be ignored, and set to internal petsc mpiuni:693 if test "$PARALLEL_VALUE" = "no" ; then694 HAVE_MPI=yes695 MPIINCL=-I"$PETSC_ROOT/include/mpiuni"696 697 case "${host_os}" in698 *cygwin*)699 dnl MPILIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"700 ;;701 *linux*)702 MPILIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"703 ;;704 *darwin*)705 MPILIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"706 ;;707 esac708 709 AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])710 AC_SUBST([MPIINCL])711 AC_SUBST([MPILIB])712 fi713 dnl }}}714 696 dnl slepc{{{ 715 697 AC_ARG_WITH([slepc-dir], 716 AS_HELP_STRING([--with-slepc-dir =DIR],[slepc root directory]),698 AS_HELP_STRING([--with-slepc-dir=DIR],[slepc root directory]), 717 699 [SLEPC_ROOT=$withval],[SLEPC_ROOT=""]) 718 700 719 AC_MSG_CHECKING(for Slepc headers and libraries in $SLEPC_ROOT)701 AC_MSG_CHECKING(for slepc headers and libraries in $SLEPC_ROOT) 720 702 if test -d "$SLEPC_ROOT"; then 721 703 HAVE_SLEPC=yes … … 733 715 dnl shapelib{{{ 734 716 AC_ARG_WITH([shapelib-dir], 735 AS_HELP_STRING([--with-shapelib-dir =DIR], [shapelib root directory]),717 AS_HELP_STRING([--with-shapelib-dir=DIR], [shapelib root directory]), 736 718 [SHAPELIB_ROOT=$withval],[SHAPELIB_ROOT=""]) 737 719 738 AC_MSG_CHECKING(for Shapelib headers and libraries in $SHAPELIB_ROOT)720 AC_MSG_CHECKING(for shapelib headers and libraries in $SHAPELIB_ROOT) 739 721 if test -d "$SHAPELIB_ROOT"; then 740 722 … … 754 736 dnl scalapack{{{ 755 737 AC_ARG_WITH([scalapack-dir], 756 AS_HELP_STRING([--with-scalapack-dir =DIR],[scalapack root directory]),738 AS_HELP_STRING([--with-scalapack-dir=DIR],[scalapack root directory]), 757 739 [SCALAPACK_ROOT=$withval],[SCALAPACK_ROOT=""]) 758 740 759 AC_MSG_CHECKING(for Scalapack headers and libraries in $SCALAPACK_ROOT)741 AC_MSG_CHECKING(for scalapack headers and libraries in $SCALAPACK_ROOT) 760 742 if test -d "$SCALAPACK_ROOT"; then 761 743 … … 773 755 dnl blas{{{ 774 756 AC_ARG_WITH([blas-lapack-dir], 775 AS_HELP_STRING([--with-blas-lapack-dir =DIR],[blas-lapack root directory]),757 AS_HELP_STRING([--with-blas-lapack-dir=DIR],[blas-lapack root directory]), 776 758 [BLASLAPACK_ROOT=$withval],[BLASLAPACK_ROOT=""]) 777 759 778 AC_MSG_CHECKING(for Blas and Lapack headers and libraries in $BLASLAPACK_ROOT)760 AC_MSG_CHECKING(for blas and lapack headers and libraries in $BLASLAPACK_ROOT) 779 761 if test -d "$BLASLAPACK_ROOT"; then 780 762 … … 806 788 dnl mkl{{{ 807 789 AC_ARG_WITH([mkl-dir], 808 AS_HELP_STRING([--with-mkl-dir =DIR],[mkl root directory]),790 AS_HELP_STRING([--with-mkl-dir=DIR],[mkl root directory]), 809 791 [MKL_ROOT=$withval],[MKL_ROOT=""]) 810 792 … … 825 807 dnl }}} 826 808 dnl plapack{{{ 809 AC_MSG_CHECKING(for plapack) 810 827 811 AC_ARG_WITH([plapack-lib], 828 812 AS_HELP_STRING([--with-plapack-lib = lib],[plapack library]), 829 813 [PLAPACK_LIB=$withval],[PLAPACK_LIB=""]) 830 AC_MSG_CHECKING(for Plapack libraries)831 814 832 815 AC_ARG_WITH([plapack-include], … … 834 817 [plapack include ]), 835 818 [PLAPACK_INCLUDE=$withval],[PLAPACK_INCLUDE=""]) 836 AC_MSG_CHECKING(for Plapack headers)837 819 838 820 if test -n "$PLAPACK_LIB"; then … … 857 839 dnl mumps{{{ 858 840 AC_ARG_WITH([mumps-dir], 859 AS_HELP_STRING([--with-mumps-dir =DIR],[mumps root directory]),841 AS_HELP_STRING([--with-mumps-dir=DIR],[mumps root directory]), 860 842 [MUMPS_ROOT=$withval],[MUMPS_ROOT=""]) 861 843 862 AC_MSG_CHECKING(for Mumps headers and libraries in $MUMPS_ROOT)844 AC_MSG_CHECKING(for mumps headers and libraries in $MUMPS_ROOT) 863 845 if test -d "$MUMPS_ROOT"; then 864 846 … … 882 864 dnl blacs{{{ 883 865 AC_ARG_WITH([blacs-dir], 884 AS_HELP_STRING([--with-blacs-dir =DIR],[blacs root directory]),866 AS_HELP_STRING([--with-blacs-dir=DIR],[blacs root directory]), 885 867 [BLACS_ROOT=$withval],[BLACS_ROOT=""]) 886 868 887 AC_MSG_CHECKING(for Blacs headers and libraries in $BLACS_ROOT)869 AC_MSG_CHECKING(for blacs headers and libraries in $BLACS_ROOT) 888 870 if test -d "$BLACS_ROOT"; then 889 871 … … 903 885 dnl hypre{{{ 904 886 AC_ARG_WITH([hypre-dir], 905 AS_HELP_STRING([--with-hypre-dir =DIR],[hypre root directory]),887 AS_HELP_STRING([--with-hypre-dir=DIR],[hypre root directory]), 906 888 [HYPRE_ROOT=$withval],[HYPRE_ROOT=""]) 907 889 908 AC_MSG_CHECKING(for Hypre headers and libraries in $HYPRE_ROOT)890 AC_MSG_CHECKING(for hypre headers and libraries in $HYPRE_ROOT) 909 891 if test -d "$HYPRE_ROOT"; then 910 892 … … 924 906 dnl ml{{{ 925 907 AC_ARG_WITH([ml-dir], 926 AS_HELP_STRING([--with-ml-dir =DIR],[ml root directory]),908 AS_HELP_STRING([--with-ml-dir=DIR],[ml root directory]), 927 909 [ML_ROOT=$withval],[ML_ROOT=""]) 928 910 929 AC_MSG_CHECKING(for Ml headers and libraries in $ML_ROOT)911 AC_MSG_CHECKING(for ml headers and libraries in $ML_ROOT) 930 912 if test -d "$ML_ROOT"; then 931 913 … … 1229 1211 AC_MSG_CHECKING(consistency between all libraries) 1230 1212 1231 dnl check that if petsc is requested in parallel, mpi should be specified1213 dnl check that if petsc is requested , mpi should be specified 1232 1214 if test "$HAVE_PETSC" = "yes" ; then 1233 1215 if test "$HAVE_MPI" = "NO"; then … … 1236 1218 fi 1237 1219 1238 dnl check that we have either python or matlab support if we only compile serially 1239 if test "$PARALLEL_VALUE" = "no" && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then 1240 AC_MSG_ERROR([need at least python or matlab support to compile only in serial mode!]); 1241 fi 1242 1243 dnl check that we don't have with-matlab and with-python at the same time 1244 if test "$HAVE_PYTHON" = "yes" ; then 1245 if test "$HAVE_MATLAB" = "yes"; then 1246 AC_MSG_ERROR([cannot create matlab and python wrappers simultaneously! Please choose one or the other.]); 1247 fi 1248 fi 1220 dnl check that we have either python or matlab support if we compile the modules 1221 if test "$MODULES_VALUE" = "yes" && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then 1222 AC_MSG_ERROR([need at least python or matlab support to compile modules (or use --with-modules=no)]); 1223 fi 1224 1225 dnl check that we have python version if python compile is specified 1226 if test "$HAVE_PYTHON" = "yes" && test "$PYTHONVERSION" = "" ; then 1227 AC_MSG_ERROR([need python-version if python compile is required!]); 1228 fi 1229 1230 dnl check that if we have MPI, we have metis 1231 if test "$HAVE_METIS" = "yes" && test "$HAVE_MPI" = "no" ; then 1232 AC_MSG_ERROR([need mpi if using the metis partitioner!]); 1233 fi 1234 1235 1236 1237 1249 1238 1250 1239 AC_MSG_RESULT(done) … … 1257 1246 AS_HELP_STRING([--with-cxxoptflags = CXXOPTFLAGS], [optimization using CXX flags, ex: --with-cxxoptflags=-march=opteron -O3]), 1258 1247 [CXXOPTFLAGS=$withval],[CXXOPTFLAGS="-g -O2"]) 1259 AC_MSG_CHECKING(for C++ optimization flags)1248 AC_MSG_CHECKING(for c++ optimization flags) 1260 1249 AC_SUBST([CXXOPTFLAGS]) 1261 1250 AC_MSG_RESULT(done) -
TabularUnified issm/branches/trunk-jpl-damage/scripts/GenerateReferences.sh ¶
r8066 r12168 16 16 \begin{document} 17 17 \nocite{$CITE} 18 \bibliography{$ ISSM_DIR/publications/bibtex/references}18 \bibliography{$JPL_SVN/publications/bibtex/references} 19 19 \end{document} 20 20 END … … 29 29 mv references.bak2 references.bbl 30 30 echo "Converting to rtf" 31 $ISSM_ TIER/externalpackages/latex2rtf/install/latex2rtf -P $ISSM_TIER/externalpackages/latex2rtf/install/cfg/ references31 $ISSM_DIR/externalpackages/latex2rtf/install/latex2rtf -P $ISSM_DIR/externalpackages/latex2rtf/install/cfg/ references 32 32 33 33 #Remove all but rtf file -
TabularUnified issm/branches/trunk-jpl-damage/scripts/archive.sh ¶
r6088 r12168 10 10 11 11 #Cleanup code 12 cd $ISSM_ TIER12 cd $ISSM_DIR 13 13 make clean 14 14 make distclean … … 18 18 19 19 #Create tar file, with today's date in the title; 20 cd $ISSM_ TIER/..20 cd $ISSM_DIR/.. 21 21 today=`today_date` 22 tar zcvf issm-3.0-$today.tar.gz `basename $ISSM_ TIER`22 tar zcvf issm-3.0-$today.tar.gz `basename $ISSM_DIR` -
TabularUnified issm/branches/trunk-jpl-damage/scripts/automakererun.sh ¶
r10863 r12168 4 4 5 5 6 ACLOCAL="$ISSM_ TIER/externalpackages/automake/install/bin/aclocal"7 AUTOCONF="$ISSM_ TIER/externalpackages/autoconf/install/bin/autoconf"8 AUTOHEAD="$ISSM_ TIER/externalpackages/autoconf/install/bin/autoheader"9 AUTOMAKE="$ISSM_ TIER/externalpackages/automake/install/bin/automake"6 ACLOCAL="$ISSM_DIR/externalpackages/automake/install/bin/aclocal" 7 AUTOCONF="$ISSM_DIR/externalpackages/autoconf/install/bin/autoconf" 8 AUTOHEAD="$ISSM_DIR/externalpackages/autoconf/install/bin/autoheader" 9 AUTOMAKE="$ISSM_DIR/externalpackages/automake/install/bin/automake" 10 10 11 11 echo "removing config.cach" -
TabularUnified issm/branches/trunk-jpl-damage/scripts/cloc2html.py ¶
r11241 r12168 4 4 import sys, re, os 5 5 6 ISSM_ TIER=os.getenv('ISSM_TIER');7 if(not ISSM_ TIER): raise NameError('ISSM_TIER undefined')6 ISSM_DIR=os.getenv('ISSM_DIR'); 7 if(not ISSM_DIR): raise NameError('ISSM_DIR undefined') 8 8 9 9 infile = open('temp','r') -
TabularUnified issm/branches/trunk-jpl-damage/scripts/convertmatlabclasses.py ¶
r11226 r12168 4 4 5 5 #get names of all directories to process 6 ISSM_ TIER=os.getenv('ISSM_TIER');7 if(not ISSM_ TIER): raise NameError('ISSM_TIER undefined')8 newclassesdir = ISSM_ TIER + '/src/m/classes/'9 oldclassesdir = ISSM_ TIER + '/src/m/oldclasses/'6 ISSM_DIR=os.getenv('ISSM_DIR'); 7 if(not ISSM_DIR): raise NameError('ISSM_DIR undefined') 8 newclassesdir = ISSM_DIR + '/src/m/classes/' 9 oldclassesdir = ISSM_DIR + '/src/m/oldclasses/' 10 10 11 11 #make new directory -
TabularUnified issm/branches/trunk-jpl-damage/scripts/dailyrun.sh ¶
r6088 r12168 54 54 #Prepare run 55 55 #Windows hack for startup.m {{{1 56 #windows environments: ISSM_ TIER_WIN variable not correctly picked up when using57 #the cron job. just get startup to take the ISSM_ TIER variable as the pwd:56 #windows environments: ISSM_DIR_WIN variable not correctly picked up when using 57 #the cron job. just get startup to take the ISSM_DIR variable as the pwd: 58 58 if [ "$OS" = "winxp32" ] 59 59 then 60 cat startup.m | sed 's/clear status/clear status; ISSM_ TIER=pwd;/g' > startup.m.bak60 cat startup.m | sed 's/clear status/clear status; ISSM_DIR=pwd;/g' > startup.m.bak 61 61 mv startup.m.bak startup.m 62 62 fi 63 63 #}}} 64 64 #create softlink to startup {{{1 65 cd $ISSM_ TIER/test/NightlyRun/66 ln -s $ISSM_ TIER/startup.m .65 cd $ISSM_DIR/test/NightlyRun/ 66 ln -s $ISSM_DIR/startup.m . 67 67 #}}} 68 68 #Create dailylog directory and info.log {{{1 … … 70 70 INSTALL_TIME=$(timer) 71 71 ELAPSED_INSTALL=$(timer $START_TIME) 72 rm -rf $ISSM_ TIER/dailylog73 mkdir $ISSM_ TIER/dailylog74 cat << END > $ISSM_ TIER/dailylog/info.log72 rm -rf $ISSM_DIR/dailylog 73 mkdir $ISSM_DIR/dailylog 74 cat << END > $ISSM_DIR/dailylog/info.log 75 75 today: $(echo $TODAY) 76 76 user: $(echo $USER) … … 95 95 do 96 96 #Launch matlab and the daily run script 97 cat > $ISSM_ TIER/dailylog/matlab_run$i.m << EOF97 cat > $ISSM_DIR/dailylog/matlab_run$i.m << EOF 98 98 warning off %necessary to avoid a info.log of several Go for parallel runs 99 99 try, 100 cd $ISSM_ TIER/test/NightlyRun100 cd $ISSM_DIR/test/NightlyRun 101 101 startup; 102 102 $(if [ "$NROPTIONS" = "" ] … … 111 111 directory=strsplit(pwd,'/'); 112 112 message=getReport(me) 113 fid=fopen([ISSM_ TIER '/dailylog/matlaberror.log'], 'at');113 fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at'); 114 114 fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end}); 115 115 fprintf(fid,'%s',message); … … 121 121 122 122 #Start run from dailylog directory 123 cd $ISSM_ TIER/dailylog/123 cd $ISSM_DIR/dailylog/ 124 124 125 125 #Start test … … 132 132 #}}} 133 133 #concatenate all reports {{{1 134 cd $ISSM_ TIER/dailylog/134 cd $ISSM_DIR/dailylog/ 135 135 mv matlab_log1.log matlab_log.log 136 136 for (( i=2;i<=$NUMCPUS_RUN;i++ )) … … 149 149 ELAPSED_RUN=$(timer $INSTALL_TIME) 150 150 ELAPSED_TOTAL=$(timer $START_TIME) 151 cat << END >> $ISSM_ TIER/dailylog/info.log151 cat << END >> $ISSM_DIR/dailylog/info.log 152 152 elapsed_run: $(echo $ELAPSED_RUN) 153 153 elapsed_total: $(echo $ELAPSED_TOTAL) … … 158 158 #Send Report 159 159 #Build html report {{{1 160 cd $ISSM_ TIER/dailylog/160 cd $ISSM_DIR/dailylog/ 161 161 sh ../scripts/report.sh 162 ln -s $ISSM_ TIER/dailylog/report.html $INIT_PATH163 echo "html report located in $ISSM_ TIER/dailylog/report.html and $INIT_PATH/report.html"162 ln -s $ISSM_DIR/dailylog/report.html $INIT_PATH 163 echo "html report located in $ISSM_DIR/dailylog/report.html and $INIT_PATH/report.html" 164 164 #}}} -
TabularUnified issm/branches/trunk-jpl-damage/scripts/getloc.sh ¶
r11241 r12168 1 1 #!/bin/bash 2 2 #get number of lines of code 3 cloc-1.55.pl $ISSM_ TIER/src $ISSM_TIER/m4 --exclude-dir=.svn --exclude-ext=exp --exclude-lang=make --out=temp3 cloc-1.55.pl $ISSM_DIR/src $ISSM_DIR/m4 --exclude-dir=.svn --exclude-ext=exp --exclude-lang=make --out=temp 4 4 cat temp 5 5 ./cloc2html.py 6 6 rm temp 7 7 8 cat $ISSM_ TIER/src/dox/issm.dox | sed '/<table/,//d' > input19 cat $ISSM_ TIER/src/dox/issm.dox | sed '1,/<\/table>/d' > input210 cat input1 temp.html input2 > $ISSM_ TIER/src/dox/issm.dox8 cat $ISSM_DIR/src/dox/issm.dox | sed '/<table/,//d' > input1 9 cat $ISSM_DIR/src/dox/issm.dox | sed '1,/<\/table>/d' > input2 10 cat input1 temp.html input2 > $ISSM_DIR/src/dox/issm.dox 11 11 rm input1 input2 temp.html 12 12 … … 19 19 #OLDER MANUAL VESION 20 20 #get Matlab number of lines 21 cd $ISSM_ TIER/src/m21 cd $ISSM_DIR/src/m 22 22 M_LOC=$(find . -name "*.m" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}'); 23 23 echo "Matlab code: $M_LOC" 24 24 25 25 #get C/CPP number of lines 26 cd $ISSM_ TIER/src26 cd $ISSM_DIR/src 27 27 CPP_LOC=$(find . -name "*.cpp" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}'); 28 28 echo "C++ code: $CPP_LOC" -
TabularUnified issm/branches/trunk-jpl-damage/scripts/issmconfiguration.sh ¶
r12004 r12168 7 7 presendir=`pwd` 8 8 9 if test -d "$ISSM_ TIER/configs" ; then10 cd $ISSM_ TIER/configs9 if test -d "$ISSM_DIR/configs" ; then 10 cd $ISSM_DIR/configs 11 11 LIST=`ls` 12 12 … … 40 40 echo "" 41 41 42 cd $ISSM_ TIER42 cd $ISSM_DIR 43 43 source ./scripts/automakererun.sh 44 44 source configs/$configurename … … 56 56 57 57 58 #alias aut='a=`pwd` && cd $ISSM_ TIER && ./scripts/automakererun.sh && ./configs/config-macosx64-larour-nopetsc.sh'58 #alias aut='a=`pwd` && cd $ISSM_DIR && ./scripts/automakererun.sh && ./configs/config-macosx64-larour-nopetsc.sh' -
TabularUnified issm/branches/trunk-jpl-damage/scripts/report.sh ¶
r12004 r12168 49 49 50 50 #create some variables 51 if [ $(ls -1 $ISSM_ TIER/bin | wc -l) -le 20 ];51 if [ $(ls -1 $ISSM_DIR/bin | wc -l) -le 20 ]; 52 52 then 53 53 IS_INSTALL=0 -
TabularUnified issm/branches/trunk-jpl-damage/scripts/run.sh ¶
r6088 r12168 6 6 MATLAB_VERSION="7.6" #7.2,7.4,7.6 and 7.8 7 7 #create softlink to startup {{{1 8 cd $ISSM_ TIER/test/NightlyRun/9 ln -s $ISSM_ TIER/startup.m .8 cd $ISSM_DIR/test/NightlyRun/ 9 ln -s $ISSM_DIR/startup.m . 10 10 #}}} 11 11 … … 14 14 do 15 15 #Launch matlab and the daily run script 16 cat > $ISSM_ TIER/dailylog/matlab_run$i.m << EOF16 cat > $ISSM_DIR/dailylog/matlab_run$i.m << EOF 17 17 warning off %necessary to avoid a daily.log of several Go for parallel runs 18 18 try, 19 cd $ISSM_ TIER/test/NightlyRun19 cd $ISSM_DIR/test/NightlyRun 20 20 startup; 21 21 $(if [ "$NROPTIONS" = "" ] … … 30 30 directory=strsplit(pwd,'/'); 31 31 message=getReport(me) 32 fid=fopen([ISSM_ TIER '/dailylog/matlaberror.log'], 'at');32 fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at'); 33 33 fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end}); 34 34 fprintf(fid,'%s',message); … … 39 39 40 40 #Start run from dailylog directory 41 cd $ISSM_ TIER/dailylog/41 cd $ISSM_DIR/dailylog/ 42 42 43 43 #Start test -
TabularUnified issm/branches/trunk-jpl-damage/scripts/windowsbuild.sh ¶
r6555 r12168 11 11 today=`today_date` 12 12 13 cd $ISSM_ TIER/bin13 cd $ISSM_DIR/bin 14 14 15 15 #Filter out .svn files -
TabularUnified issm/branches/trunk-jpl-damage/src/Makefile.am ¶
r11684 r12168 1 EXTRA_DIST = perl pro 2 SUBDIRS = c m ex m1 EXTRA_DIST = perl pro 2 SUBDIRS = c modules m py -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Constraints.cpp ¶
r10522 r12168 48 48 49 49 /*figure out total number of constraints combining all the cpus (no clones here)*/ 50 #ifdef _ PARALLEL_51 MPI_Reduce(&localconstraints,&numberofconstraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );52 MPI_Bcast(&numberofconstraints,1,MPI_INT,0,MPI_COMM_WORLD);50 #ifdef _HAVE_MPI_ 51 MPI_Reduce(&localconstraints,&numberofconstraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 52 MPI_Bcast(&numberofconstraints,1,MPI_INT,0,MPI_COMM_WORLD); 53 53 #else 54 numberofconstraints=localconstraints;54 numberofconstraints=localconstraints; 55 55 #endif 56 56 57 57 58 return numberofconstraints; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/DataSet.cpp ¶
r12004 r12168 84 84 /*}}}*/ 85 85 86 /*I/O*/87 #ifdef _SERIAL_88 /*FUNCTION DataSet::Marshall{{{1*/89 char* DataSet::Marshall(){90 91 vector<Object*>::iterator object;92 int object_size;93 int marshalled_dataset_size=0;94 char* marshalled_dataset=NULL;95 char* old_marshalled_dataset=NULL;96 97 /*First get size of marshalled dataset: */98 object_size=(int)objects.size();99 100 marshalled_dataset_size=MarshallSize();101 102 /*Allocate marshalled dataset: */103 marshalled_dataset=(char*)xmalloc(marshalled_dataset_size*sizeof(char));104 105 /*Keep track of old_marshalled_dataset: */106 old_marshalled_dataset=marshalled_dataset;107 108 /*Store internals of dataset first: */109 memcpy(marshalled_dataset,&object_size,sizeof(int)); marshalled_dataset+=sizeof(int);110 memcpy(marshalled_dataset,&sorted,sizeof(int)); marshalled_dataset+=sizeof(int);111 if(sorted){112 if(object_size)memcpy(marshalled_dataset,sorted_ids,object_size*sizeof(int)); marshalled_dataset+=object_size*sizeof(int);113 if(object_size)memcpy(marshalled_dataset,id_offsets,object_size*sizeof(int)); marshalled_dataset+=object_size*sizeof(int);114 }115 116 for ( object=objects.begin() ; object < objects.end(); object++ ){117 (*object)->Marshall(&marshalled_dataset);118 }119 120 /* Ok, marshalled_dataset now points to the end of the original marshalled_dataset pointer121 * before we started the loop on objects. Get object to point right again: */122 marshalled_dataset-=marshalled_dataset_size;123 124 /*We should be back to old_marshalled_dataset: check and abort if that's not the case,125 * because this is a nasty error: */126 if (marshalled_dataset!=old_marshalled_dataset){127 _error_("final marshalled dataset \"%s\" is different from initial one!",EnumToStringx(enum_type));128 abort();129 }130 131 /*Return: */132 return marshalled_dataset;133 }134 /*}}}*/135 /*FUNCTION DataSet::MarshallSize{{{1*/136 int DataSet::MarshallSize(){137 138 vector<Object*>::iterator object;139 int marshalled_dataset_size=0;140 141 142 for ( object=objects.begin() ; object < objects.end(); object++ ){143 marshalled_dataset_size+= (*object)->MarshallSize();144 }145 146 marshalled_dataset_size+=sizeof(int); //objects size147 marshalled_dataset_size+=sizeof(int); //sorted size148 if(sorted){149 marshalled_dataset_size+=(int)objects.size()*sizeof(int); //sorted ids150 marshalled_dataset_size+=(int)objects.size()*sizeof(int); //id offsets151 }152 153 return marshalled_dataset_size;154 }155 /*}}}*/156 /*FUNCTION DataSet::Demarshall{{{1*/157 DataSet* DataSetDemarshall(char* marshalled_dataset){158 159 return DataSetDemarshallRaw(&marshalled_dataset);160 161 }162 /*}}}*/163 /*FUNCTION DataSet::DemarshallRaw{{{1*/164 DataSet* DataSetDemarshallRaw(char** pmarshalled_dataset){165 166 int i;167 168 DataSet* dataset=NULL;169 int numobjects=0;170 int enum_type;171 Object* object=NULL;172 int sorted;173 int* sorted_ids=NULL;174 int* id_offsets=NULL;175 char* marshalled_dataset=NULL;176 177 /*recover marshalled_dataset pointer: */178 marshalled_dataset=*pmarshalled_dataset;179 180 /*initialize dataset: */181 dataset=new DataSet();182 183 /*Get internals first: */184 memcpy(&numobjects,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);185 memcpy(&sorted,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);186 if(sorted){187 if(numobjects){188 sorted_ids=(int*)xmalloc(numobjects*sizeof(int));189 id_offsets=(int*)xmalloc(numobjects*sizeof(int));190 memcpy(sorted_ids,marshalled_dataset,numobjects*sizeof(int)); marshalled_dataset+=numobjects*sizeof(int);191 memcpy(id_offsets,marshalled_dataset,numobjects*sizeof(int)); marshalled_dataset+=numobjects*sizeof(int);192 }193 dataset->SetSorting(sorted_ids,id_offsets);194 }195 196 for(i=0;i<numobjects;i++){197 198 /*get enum type of object: */199 memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);200 201 switch(enum_type){202 case NodeEnum:{203 Node* node=NULL;204 node=new Node();205 node->Demarshall(&marshalled_dataset);206 dataset->AddObject(node);}207 break;208 case VertexEnum:{209 Vertex* vertex=NULL;210 vertex=new Vertex();211 vertex->Demarshall(&marshalled_dataset);212 dataset->AddObject(vertex);}213 break;214 case DoubleParamEnum:{215 DoubleParam* doubleparam=NULL;216 doubleparam=new DoubleParam();217 doubleparam->Demarshall(&marshalled_dataset);218 dataset->AddObject(doubleparam);}219 break;220 case TriaEnum:{221 Tria* tria=NULL;222 tria=new Tria();223 tria->Demarshall(&marshalled_dataset);224 dataset->AddObject(tria);}225 break;226 case TriaP1InputEnum:{227 TriaP1Input* triavertexinput=NULL;228 triavertexinput=new TriaP1Input();229 triavertexinput->Demarshall(&marshalled_dataset);230 dataset->AddObject(triavertexinput);}231 break;232 #ifdef _HAVE_3D_233 case PentaP1InputEnum:{234 PentaP1Input* pentavertexinput=NULL;235 pentavertexinput=new PentaP1Input();236 pentavertexinput->Demarshall(&marshalled_dataset);237 dataset->AddObject(pentavertexinput);}238 break;239 #endif240 case TransientInputEnum:{241 TransientInput* transientinput=NULL;242 transientinput=new TransientInput();243 transientinput->Demarshall(&marshalled_dataset);244 dataset->AddObject(transientinput);}245 break;246 #ifdef _HAVE_CONTROL_247 case ControlInputEnum:{248 ControlInput* controlinputinput=NULL;249 controlinputinput=new ControlInput();250 controlinputinput->Demarshall(&marshalled_dataset);251 dataset->AddObject(controlinputinput);}252 break;253 #endif254 case DatasetInputEnum:{255 DatasetInput* datasetinputinput=NULL;256 datasetinputinput=new DatasetInput();257 datasetinputinput->Demarshall(&marshalled_dataset);258 dataset->AddObject(datasetinputinput);}259 break;260 case TriaP1ElementResultEnum:{261 TriaP1ElementResult* triavertexelementresult=NULL;262 triavertexelementresult=new TriaP1ElementResult();263 triavertexelementresult->Demarshall(&marshalled_dataset);264 dataset->AddObject(triavertexelementresult);}265 break;266 #ifdef _HAVE_3D_267 case PentaP1ElementResultEnum:{268 PentaP1ElementResult* pentavertexelementresult=NULL;269 pentavertexelementresult=new PentaP1ElementResult();270 pentavertexelementresult->Demarshall(&marshalled_dataset);271 dataset->AddObject(pentavertexelementresult);}272 break;273 case PentaEnum:{274 Penta* penta=NULL;275 penta=new Penta();276 penta->Demarshall(&marshalled_dataset);277 dataset->AddObject(penta);}278 break;279 #endif280 case MaticeEnum:{281 Matice* matice=NULL;282 matice=new Matice();283 matice->Demarshall(&marshalled_dataset);284 dataset->AddObject(matice);}285 break;286 case MatparEnum:{287 Matpar* matpar=NULL;288 matpar=new Matpar();289 matpar->Demarshall(&marshalled_dataset);290 dataset->AddObject(matpar);}291 break;292 case SpcStaticEnum:{293 SpcStatic* spcstatic=NULL;294 spcstatic=new SpcStatic();295 spcstatic->Demarshall(&marshalled_dataset);296 dataset->AddObject(spcstatic);}297 break;298 case SpcDynamicEnum:{299 SpcDynamic* spcdynamic=NULL;300 spcdynamic=new SpcDynamic();301 spcdynamic->Demarshall(&marshalled_dataset);302 dataset->AddObject(spcdynamic);}303 break;304 case SpcTransientEnum:{305 SpcTransient* spctransient=NULL;306 spctransient=new SpcTransient();307 spctransient->Demarshall(&marshalled_dataset);308 dataset->AddObject(spctransient);}309 break;310 case PengridEnum:{311 Pengrid* pengrid=NULL;312 pengrid=new Pengrid();313 pengrid->Demarshall(&marshalled_dataset);314 dataset->AddObject(pengrid);}315 break;316 case PenpairEnum:{317 Penpair* penpair=NULL;318 penpair=new Penpair();319 penpair->Demarshall(&marshalled_dataset);320 dataset->AddObject(penpair);}321 break;322 case IcefrontEnum:{323 Icefront* icefront=NULL;324 icefront=new Icefront();325 icefront->Demarshall(&marshalled_dataset);326 dataset->AddObject(icefront);}327 break;328 case NumericalfluxEnum:{329 Numericalflux* numericalflux=NULL;330 numericalflux=new Numericalflux();331 numericalflux->Demarshall(&marshalled_dataset);332 dataset->AddObject(numericalflux);}333 break;334 #ifdef _HAVE_RIFTS_335 case RiftfrontEnum:{336 Riftfront* riftfront=NULL;337 riftfront=new Riftfront();338 riftfront->Demarshall(&marshalled_dataset);339 dataset->AddObject(riftfront);}340 break;341 #endif342 case DoubleInputEnum:{343 DoubleInput* doubleinput=NULL;344 doubleinput=new DoubleInput();345 doubleinput->Demarshall(&marshalled_dataset);346 dataset->AddObject(doubleinput);}347 break;348 case IntInputEnum:{349 IntInput* intinput=NULL;350 intinput=new IntInput();351 intinput->Demarshall(&marshalled_dataset);352 dataset->AddObject(intinput);}353 break;354 case BoolInputEnum:{355 BoolInput* boolinput=NULL;356 boolinput=new BoolInput();357 boolinput->Demarshall(&marshalled_dataset);358 dataset->AddObject(boolinput);}359 break;360 case IntParamEnum:{361 IntParam* intparam=NULL;362 intparam=new IntParam();363 intparam->Demarshall(&marshalled_dataset);364 dataset->AddObject(intparam);}365 break;366 case BoolParamEnum:{367 BoolParam* boolparam=NULL;368 boolparam=new BoolParam();369 boolparam->Demarshall(&marshalled_dataset);370 dataset->AddObject(boolparam);}371 break;372 case StringParamEnum:{373 StringParam* stringparam=NULL;374 stringparam=new StringParam();375 stringparam->Demarshall(&marshalled_dataset);376 dataset->AddObject(stringparam);}377 break;378 case DoubleVecExternalResultEnum:{379 DoubleVecExternalResult* doublevecexternalresult=NULL;380 doublevecexternalresult=new DoubleVecExternalResult();381 doublevecexternalresult->Demarshall(&marshalled_dataset);382 dataset->AddObject(doublevecexternalresult);}383 break;384 case DoubleExternalResultEnum:{385 DoubleExternalResult* doubleexternalresult=NULL;386 doubleexternalresult=new DoubleExternalResult();387 doubleexternalresult->Demarshall(&marshalled_dataset);388 dataset->AddObject(doubleexternalresult);}389 break;390 #ifdef _HAVE_GROUNDINGLINE_391 case BoolElementResultEnum:{392 BoolElementResult* boolelementresult=NULL;393 boolelementresult=new BoolElementResult();394 boolelementresult->Demarshall(&marshalled_dataset);395 dataset->AddObject(boolelementresult);}396 break;397 #endif398 default:399 _error_("could not recognize enum type: %s",EnumToStringx(enum_type));400 }401 }402 403 /*Assign output pointers:*/404 *pmarshalled_dataset=marshalled_dataset;405 406 return dataset;407 }408 /*}}}*/409 #endif410 411 86 /*Specific methods*/ 412 87 /*FUNCTION DataSet::AddObject{{{1*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/DataSet.h ¶
r9777 r12168 49 49 void Echo(); 50 50 void DeepEcho(); 51 #ifdef _SERIAL_52 char* Marshall();53 int MarshallSize();54 #endif55 51 int AddObject(Object* object); 56 52 int DeleteObject(int id); … … 69 65 }; 70 66 71 /*This routine cannot be object oriented, but need for demarshalling: */72 #ifdef _SERIAL_73 DataSet* DataSetDemarshall(char* marshalled_dataset);74 DataSet* DataSetDemarshallRaw(char** pmarshalled_dataset);75 67 #endif 76 77 78 79 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Elements.cpp ¶
r11708 r12168 124 124 } 125 125 126 #ifdef _PARALLEL_127 126 /*Synchronize across cluster, so as to not end up with different sizes for each patch on each cpu: */ 127 #ifdef _HAVE_MPI_ 128 128 MPI_Reduce (&numvertices,&max_numvertices,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD ); 129 129 MPI_Bcast(&max_numvertices,1,MPI_INT,0,MPI_COMM_WORLD); … … 193 193 194 194 /*Get rank of first cpu that has results*/ 195 #ifdef _HAVE_MPI_ 195 196 if(this->Size()) rank=my_rank; 196 197 else rank=num_procs; 197 198 MPI_Allreduce (&rank,&minrank,1,MPI_INT,MPI_MIN,MPI_COMM_WORLD); 199 #else 200 minrank=my_rank; 201 #endif 198 202 199 203 /*see what the first element of this partition has in stock (this is common to all partitions)*/ … … 203 207 element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults); 204 208 } 209 #ifdef _HAVE_MPI_ 205 210 MPI_Bcast(&numberofresults,1,MPI_DOUBLE,minrank,MPI_COMM_WORLD); 211 #endif 206 212 207 213 /*Get out if there is no results. Otherwise broadcast info*/ 208 214 if(!numberofresults) return; 215 #ifdef _HAVE_MPI_ 209 216 if(my_rank!=minrank){ 210 217 resultsenums=(int*)xmalloc(numberofresults*sizeof(int)); … … 217 224 MPI_Bcast(resultstimes,numberofresults,MPI_DOUBLE,minrank,MPI_COMM_WORLD); 218 225 MPI_Bcast(resultssteps,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD); 226 #endif 219 227 220 228 /*Loop over all results and get nodal vector*/ … … 250 258 251 259 /*Gather onto master cpu 0, if needed: */ 252 #ifdef _PARALLEL_253 260 if(io_gather)patch->Gather(); 254 #endif255 261 256 262 /*create result object and add to results dataset:*/ … … 276 282 int numberofelements; 277 283 278 #ifdef _PARALLEL_279 284 local_nelem=this->Size(); 285 #ifdef _HAVE_MPI_ 280 286 MPI_Allreduce ( (void*)&local_nelem,(void*)&numberofelements,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 281 287 #else 282 numberofelements= this->Size();288 numberofelements=local_nelem; 283 289 #endif 284 290 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Loads.cpp ¶
r10522 r12168 63 63 64 64 /*figure out total number of loads combining all the cpus (no clones here)*/ 65 #ifdef _ PARALLEL_65 #ifdef _HAVE_MPI_ 66 66 MPI_Reduce(&localloads,&numberofloads,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 67 67 MPI_Bcast(&numberofloads,1,MPI_INT,0,MPI_COMM_WORLD); … … 69 69 numberofloads=localloads; 70 70 #endif 71 71 72 72 73 return numberofloads; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Nodes.cpp ¶
r11298 r12168 83 83 * 0. This means the dofs between all the cpus are not unique. We now offset the dofs of eache 84 84 * cpus by the total last dofs of the previus cpu, starting from 0. 85 * First: bet number of dofs for each cpu*/85 * First: get number of dofs for each cpu*/ 86 86 alldofcount=(int*)xmalloc(num_procs*sizeof(int)); 87 #ifdef _HAVE_MPI_ 87 88 MPI_Gather(&dofcount,1,MPI_INT,alldofcount,1,MPI_INT,0,MPI_COMM_WORLD); 88 89 MPI_Bcast(alldofcount,num_procs,MPI_INT,0,MPI_COMM_WORLD); 90 #else 91 alldofcount[0]=dofcount; 92 #endif 89 93 90 94 /* Every cpu should start its own dof count at the end of the dofcount from cpu-1*/ … … 119 123 } 120 124 } 121 MPI_Allreduce ( (void*)truedofs,(void*)alltruedofs,numnodes*maxdofspernode,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 125 126 #ifdef _HAVE_MPI_ 127 MPI_Allreduce((void*)truedofs,(void*)alltruedofs,numnodes*maxdofspernode,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 128 #else 129 for(i=0;i<numnodes*maxdofspernode;i++)alltruedofs[i]=truedofs[i]; 130 #endif 122 131 123 132 /* Now every cpu knows the true dofs of everyone else that is not a clone*/ … … 145 154 int numnodes; 146 155 147 148 156 /*Figure out number of nodes for this analysis: */ 149 157 numnodes=this->NumberOfNodes(analysis_type); … … 162 170 * dealt with by another cpu. We take the minimum because we are going to manage dof assignment in increasing 163 171 * order of cpu rank. This is also why we initialized this array to num_procs.*/ 172 #ifdef _HAVE_MPI_ 164 173 MPI_Allreduce ( (void*)ranks,(void*)minranks,numnodes,MPI_INT,MPI_MIN,MPI_COMM_WORLD); 174 #else 175 for(i=0;i<numnodes;i++)minranks[i]=ranks[i]; 176 #endif 165 177 166 178 /*Now go through all objects, and use minranks to flag which objects are cloned: */ … … 204 216 } 205 217 206 #ifdef _PARALLEL_207 218 /*Grab max of all cpus: */ 219 #ifdef _HAVE_MPI_ 208 220 MPI_Allreduce ( (void*)&max,(void*)&allmax,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 209 221 max=allmax; 210 #endif222 #endif 211 223 212 224 return max; … … 239 251 240 252 /*Gather from all cpus: */ 253 #ifdef _HAVE_MPI_ 241 254 MPI_Allreduce ( (void*)&numdofs,(void*)&allnumdofs,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 255 #else 256 allnumdofs=numdofs; 257 #endif 242 258 return allnumdofs; 243 259 } … … 262 278 263 279 /*Gather from all cpus: */ 280 #ifdef _HAVE_MPI_ 264 281 MPI_Allreduce ( (void*)&numnodes,(void*)&allnumnodes,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 282 #else 283 allnumnodes=numnodes; 284 #endif 265 285 266 286 return allnumnodes; … … 288 308 } 289 309 290 #ifdef _ PARALLEL_291 292 293 294 #endif 310 #ifdef _HAVE_MPI_ 311 MPI_Reduce (&max_sid,&node_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD ); 312 MPI_Bcast(&node_max_sid,1,MPI_INT,0,MPI_COMM_WORLD); 313 max_sid=node_max_sid; 314 #endif 295 315 296 316 if(max_sid==1){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Options.cpp ¶
r12004 r12168 20 20 #include "../shared/shared.h" 21 21 #include "../EnumDefinitions/EnumDefinitions.h" 22 #if _SERIAL_23 22 #include "../io/io.h" 24 #endif25 23 /*}}}*/ 26 24 … … 31 29 } 32 30 /*}}}*/ 33 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)34 /*FUNCTION Options::Options(int istart, int nrhs, const mxArray* prhs[]){{{1*/35 Options::Options(int istart, int nrhs, const mxArray* prhs[]){36 37 int i;38 char *name = NULL;39 Option *option = NULL;40 41 /*loop over each name and value*/42 for (i=istart; i<nrhs; i=i+2){43 if (!mxIsClass(prhs[i],"char")) _error_("Argument %d must be name of option.",i+1);44 45 FetchData(&name,prhs[i]);46 if (i+1 == nrhs) _error_("Argument %d must exist and be value of option \"%s\".",i+2,name);47 48 //_printf_(true," Processing option \"%s\" of class \"%s\".\n",name,mxGetClassName(prhs[i+1]));49 option=(Option*)OptionParse(name,&prhs[i+1]);50 this->AddOption(option);51 option=NULL;52 }53 54 /*echo the dataset */55 //if (this->Size()) for(i=0;i<this->Size();i++) ((Option*)this->GetObjectByOffset(i))->Echo();56 }57 /*}}}*/58 #endif59 31 /*FUNCTION Options::~Options(){{{1*/ 60 32 Options::~Options(){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Options.h ¶
r12004 r12168 15 15 /*constructors, destructors*/ 16 16 Options(); 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 Options(int istart, int nrhs, const mxArray* prhs[]);19 #endif20 17 ~Options(); 21 18 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Results.cpp ¶
r12004 r12168 65 65 /*}}}*/ 66 66 /*FUNCTION Results::Write{{{1*/ 67 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)68 void Results::Write(mxArray** pdataref){69 70 int i,j;71 int count;72 73 /*output: */74 mxArray* dataref=NULL;75 mxArray* processeddataref=NULL;76 mwSize nfields;77 mwSize maxfields;78 mwSize nsteps;79 mwSize step;80 const char **fnames = NULL;81 int *enums = NULL;82 int baseenum;83 mwSize onebyone[2] = {1,1};84 mwSize ndim = 2;85 86 /*How many time steps do we have? : */87 nsteps=0;88 for(i=0;i<this->Size();i++){89 ExternalResult* result=(ExternalResult*)this->GetObjectByOffset(i);90 step=result->GetStep();91 if(step>nsteps)nsteps=step;92 }93 onebyone[0]=nsteps;94 95 /*How many field names do we have. First, figure out how many result types we have: */96 maxfields=(mwSize)this->Size();97 enums=(int*)xmalloc(maxfields*sizeof(int));98 for(i=0;i<maxfields;i++){99 ExternalResult* result=(ExternalResult*)this->GetObjectByOffset(i);100 enums[i]=result->InstanceEnum();101 }102 /*Now, make result types unique: */103 for(i=0;i<maxfields;i++){104 if(enums[i]>=0){//if <0, it means this enum was found to replicate another one previously105 baseenum=enums[i];106 /*is the baseenum repeated later on?:*/107 for(j=i+1;j<maxfields;j++){108 if (enums[j]==baseenum)enums[j]=-1;109 }110 }111 else continue;112 }113 114 /*Now, go through enums, and whatever is not null is a non repeated field name: */115 nfields=0;116 for(i=0;i<maxfields;i++)if(enums[i]>0)nfields++;117 118 /*Add 2 fields for time and step: */119 nfields=nfields+2;120 121 /*Fill the names of the structure field: */122 fnames=(const char**)xmalloc(nfields*sizeof(char*));123 count=0;124 for(i=0;i<maxfields;i++){125 if (enums[i]>0){126 fnames[count]=EnumToStringx(enums[i]);127 count++;128 }129 }130 /*don't forget the extra fields "time" and "step":*/131 fnames[nfields-2]="time";132 fnames[nfields-1]="step";133 134 /*Initialize structure: */135 dataref=mxCreateStructArray( ndim,onebyone,nfields,fnames);136 137 /*Fill each field: */138 for(i=0;i<this->Size();i++){ //do not include the last one used for time139 ExternalResult* result=(ExternalResult*)this->GetObjectByOffset(i);140 result->SetMatlabField(dataref);141 }142 143 /*Now, process the patch in the dataref structure, by calling MatlabProcessPatch.m144 *on the current dataref structure: */145 mexCallMATLAB(1,&processeddataref,1,&dataref, "MatlabProcessPatch");146 147 /*Assign output pointers:*/148 *pdataref=processeddataref;149 }150 #else151 67 void Results::Write(Parameters* parameters){ 152 68 … … 167 83 168 84 } 169 #endif170 85 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Results.h ¶
r12004 r12168 26 26 /*numerics: {{{1*/ 27 27 Results* SpawnTriaResults(int* indices); 28 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)29 void Write(mxArray** pdataref);30 #else31 28 void Write(Parameters* parameters); 32 #endif33 29 /*}}}*/ 34 30 }; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Container/Vertices.cpp ¶
r11298 r12168 61 61 * First: bet number of dofs for each cpu*/ 62 62 alldofcount=(int*)xmalloc(num_procs*sizeof(int)); 63 #ifdef _HAVE_MPI_ 63 64 MPI_Gather(&dofcount,1,MPI_INT,alldofcount,1,MPI_INT,0,MPI_COMM_WORLD); 64 65 MPI_Bcast(alldofcount,num_procs,MPI_INT,0,MPI_COMM_WORLD); 66 #else 67 alldofcount[0]=dofcount; 68 #endif 65 69 66 70 /* Every cpu should start its own dof count at the end of the dofcount from cpu-1*/ … … 85 89 vertex->ShowTrueDofs(truedofs); 86 90 } 91 #ifdef _HAVE_MPI_ 87 92 MPI_Allreduce((void*)truedofs,(void*)alltruedofs,numberofobjects*numberofdofsperobject,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 93 #else 94 for(i=0;i<numberofobjects*numberofdofsperobject;i++)alltruedofs[i]=truedofs[i]; 95 #endif 88 96 89 97 /* Now every cpu knows the true dofs of everyone else that is not a clone*/ … … 121 129 * dealt with by another cpu. We take the minimum because we are going to manage dof assignment in increasing 122 130 * order of cpu rank. This is also why we initialized this array to num_procs.*/ 131 #ifdef _HAVE_MPI_ 123 132 MPI_Allreduce ( (void*)ranks,(void*)minranks,numberofobjects,MPI_INT,MPI_MIN,MPI_COMM_WORLD); 133 #else 134 for(i=0;i<numberofobjects;i++)minranks[i]=ranks[i]; 135 #endif 124 136 125 137 /*Now go through all objects, and use minranks to flag which objects are cloned: */ … … 149 161 } 150 162 151 #ifdef _ PARALLEL_163 #ifdef _HAVE_MPI_ 152 164 MPI_Reduce (&max_sid,&vertex_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD ); 153 165 MPI_Bcast(&vertex_max_sid,1,MPI_INT,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/EnumDefinitions/Synchronize.sh ¶
r11684 r12168 6 6 7 7 #Removed existing files 8 rm $ISSM_ TIER/src/m/enum/*.m9 rm $ISSM_ TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp10 rm $ISSM_ TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp8 rm $ISSM_DIR/src/m/enum/*.m 9 rm $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp 10 rm $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp 11 11 12 12 #Get number of enums … … 15 15 #Build EnumToStringx.cpp {{{1 16 16 #Header 17 cat <<END > $ISSM_ TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp17 cat <<END > $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp 18 18 /* 19 19 * \file EnumToStringx.cpp: … … 35 35 END 36 36 #core 37 cat temp | awk '{print "\t\t" "case " $2" : return \"" substr($2,1,length($2)-4) "\";"}' >> $ISSM_ TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp37 cat temp | awk '{print "\t\t" "case " $2" : return \"" substr($2,1,length($2)-4) "\";"}' >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp 38 38 #Footer 39 cat <<END >> $ISSM_ TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp39 cat <<END >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp 40 40 default : return "unknown"; 41 41 … … 57 57 #Build StringToEnumx.cpp {{{1 58 58 #Header 59 cat <<END > $ISSM_ TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp59 cat <<END > $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp 60 60 /* 61 61 * \file StringToEnumx.cpp: … … 81 81 i2=120; 82 82 for (( i=1 ; i<=100 ; i++ )); do 83 echo " if(stage==$i){" >> $ISSM_ TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp83 echo " if(stage==$i){" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp 84 84 awk -v i1=$i1 -v i2=$i2 '{if(NR>=i1 && NR<=i2) print $0 }' temp | 85 awk '{print "\t" ((NR==1)?" if":" else if") " (strcmp(name,\"" substr($2,1,length($2)-4) "\")==0) return " $2 ";"}' >> $ISSM_ TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp86 echo " else stage=$(($i+1));" >> $ISSM_ TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp87 echo " }" >> $ISSM_ TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp85 awk '{print "\t" ((NR==1)?" if":" else if") " (strcmp(name,\"" substr($2,1,length($2)-4) "\")==0) return " $2 ";"}' >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp 86 echo " else stage=$(($i+1));" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp 87 echo " }" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp 88 88 89 89 if [ $i2 -ge $NUMENUMS ]; then break; fi … … 93 93 94 94 #footer 95 cat <<END >> $ISSM_ TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp95 cat <<END >> $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp 96 96 /*If we reach this point, the string provided has not been found*/ 97 97 _error_("Enum %s not found",name); … … 127 127 #}}} 128 128 #Add case to matlabenum file{{{ 129 cat <<END > $ISSM_ TIER"/src/m/enum/"$(echo $NAMEENUM".m")129 cat <<END > $ISSM_DIR"/src/m/enum/"$(echo $NAMEENUM".m") 130 130 function macro=$(echo $NAMEENUM)() 131 131 %$(echo $NAMEENUM | awk {'print toupper($1)'}) - Enum of $(echo $NAME) -
TabularUnified issm/branches/trunk-jpl-damage/src/c/Makefile.am ¶
r12004 r12168 4 4 5 5 #Library declaration {{{1 6 #Compile serial library, and then try and compile parallel library 7 if NOSERIAL 8 if NOPARALLEL 9 lib_LIBRARIES = 10 else 11 lib_LIBRARIES = libpISSM.a libOverload.a 12 endif 13 else 14 if NOPARALLEL 15 lib_LIBRARIES = libISSM.a libOverload.a 16 else 17 lib_LIBRARIES = libISSM.a libpISSM.a libOverload.a 18 endif 6 lib_LIBRARIES = libISSMCore.a libISSMModules.a libISSMOverload.a 7 if PYTHON 8 lib_LIBRARIES += libISSMPython.a 9 endif 10 if MATLAB 11 lib_LIBRARIES += libISSMMatlab.a 19 12 endif 20 13 #}}} … … 22 15 #sources 23 16 #Core sources{{{1 24 core_sources = ./include/macros.h\ 17 core_sources = ./issm.h\ 18 ./issm-binding.h\ 19 ./include/macros.h\ 25 20 ./include/typedefs.h\ 26 21 ./include/types.h\ … … 211 206 ./shared/Wrapper/ModuleBoot.cpp\ 212 207 ./shared/Wrapper/ModuleEnd.cpp\ 213 ./toolkits/mpi/mpiincludes.h\214 ./toolkits/mpi/patches/mpipatches.h\215 ./toolkits/mpi/patches/DetermineLocalSize.cpp\216 ./toolkits/mpi/patches/MPI_Upperrow.cpp\217 ./toolkits/mpi/patches/MPI_Lowerrow.cpp\218 ./toolkits/mpi/patches/MPI_Boundariesfromrange.cpp\219 208 ./toolkits/metis/metisincludes.h\ 220 209 ./toolkits/issm/issmtoolkit.h\ … … 223 212 ./toolkits/issm/SeqMat.h\ 224 213 ./toolkits/issm/SeqMat.cpp\ 225 ./toolkits/metis/patches/metispatches.h\226 ./toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp\227 214 ./toolkits/triangle/triangleincludes.h\ 228 215 ./toolkitsenums.h\ … … 362 349 ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\ 363 350 ./modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp\ 364 ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h 365 dakota_psources=./modules/Dakotax/SpawnCoreParallel.cpp351 ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\ 352 ./modules/Dakotax/SpawnCoreParallel.cpp 366 353 #}}} 367 354 #Transient sources {{{1 368 transient_sources = ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp 369 transient_psources =./solutions/transient_core.cpp355 transient_sources = ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp \ 356 ./solutions/transient_core.cpp 370 357 #}}} 371 358 #Steadystate sources {{{1 372 steadystate_ psources = ./solutions/steadystate_core.cpp\373 359 steadystate_sources = ./solutions/steadystate_core.cpp\ 360 ./solutions/steadystateconvergence.cpp 374 361 #}}} 375 362 #Prognostic sources {{{1 … … 377 364 ./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\ 378 365 ./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\ 379 ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp 380 prognostic_psources =./solutions/prognostic_core.cpp366 ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp\ 367 ./solutions/prognostic_core.cpp 381 368 #}}} 382 369 #Thermal sources {{{1 … … 395 382 ./modules/ConstraintsStatex/ThermalConstraintsState.cpp\ 396 383 ./modules/ConstraintsStatex/ThermalIsPresent.cpp\ 397 ./modules/ResetConstraintsx/ThermalConstraintsReset.cpp 398 399 thermal_psources = ./solutions/thermal_core.cpp\ 400 ./solutions/enthalpy_core.cpp\ 401 ./solvers/solver_thermal_nonlinear.cpp 384 ./modules/ResetConstraintsx/ThermalConstraintsReset.cpp \ 385 ./solutions/thermal_core.cpp\ 386 ./solutions/enthalpy_core.cpp\ 387 ./solvers/solver_thermal_nonlinear.cpp 402 388 #}}} 403 389 #Control sources {{{1 … … 443 429 ./objects/Inputs/ControlInput.cpp\ 444 430 ./shared/Numerics/BrentSearch.cpp\ 445 ./shared/Numerics/OptimalSearch.cpp\ 446 ./shared/Numerics/OptFunc.cpp 447 448 control_psources=./solutions/control_core.cpp\ 431 ./shared/Numerics/OptimalSearch.cpp \ 432 ./solutions/control_core.cpp\ 449 433 ./solutions/controltao_core.cpp\ 450 434 ./solutions/controlrestart.cpp\ … … 462 446 ./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\ 463 447 ./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\ 464 ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp 465 466 hydrology_psources = ./solutions/hydrology_core.cpp\ 467 ./solutions/hydrology_core_step.cpp 448 ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp \ 449 ./solutions/hydrology_core.cpp\ 450 ./solutions/hydrology_core_step.cpp 468 451 #}}} 469 452 #Diagnostic sources {{{1 … … 480 463 ./modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp \ 481 464 ./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp \ 482 483 484 485 486 ./shared/Elements/TransformSolutionCoord.cpp487 diagnostic_psources =./solutions/diagnostic_core.cpp\488 465 ./shared/Elements/CoordinateSystemTransform.cpp\ 466 ./shared/Elements/TransformLoadVectorCoord.cpp \ 467 ./shared/Elements/TransformStiffnessMatrixCoord.cpp \ 468 ./shared/Elements/TransformInvStiffnessMatrixCoord.cpp \ 469 ./shared/Elements/TransformSolutionCoord.cpp\ 470 ./solutions/diagnostic_core.cpp\ 471 ./solvers/solver_stokescoupling_nonlinear.cpp 489 472 #}}} 490 473 #Balanced sources {{{1 … … 492 475 ./modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp\ 493 476 ./modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp\ 494 ./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp495 balanced_psources =./solutions/balancethickness_core.cpp477 ./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp\ 478 ./solutions/balancethickness_core.cpp 496 479 #}}} 497 480 #Responses sources {{{1 … … 533 516 ./modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp \ 534 517 ./modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp\ 535 ./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp 536 slope_psources =./solutions/surfaceslope_core.cpp\518 ./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp\ 519 ./solutions/surfaceslope_core.cpp\ 537 520 ./solutions/bedslope_core.cpp 538 521 #}}} … … 694 677 ./objects/KML/KMLFileReadUtils.h 695 678 #}}} 696 #Matlab sources {{{1697 matlab_sources= ./toolkits/matlab/matlabincludes.h\698 ./toolkits/matlab/MatlabNArrayToNArray.cpp\699 ./toolkits/double/MatlabVectorToDoubleVector.cpp\700 ./toolkits/double/double.h\701 ./toolkits/double/MatlabMatrixToDoubleMatrix.cpp\702 ./io/Matlab/matlabio.h\703 ./io/Matlab/CheckNumMatlabArguments.cpp\704 ./io/Matlab/mxGetAssignedField.cpp\705 ./io/Matlab/WriteMatlabData.cpp\706 ./io/Matlab/FetchMatlabData.cpp\707 ./io/Matlab/OptionParse.cpp708 #}}}709 #Python sources {{{1710 python_sources= ./io/Python/pythonio.h\711 ./io/Python/WritePythonData.cpp\712 ./io/Python/CheckNumPythonArguments.cpp\713 ./io/Python/FetchPythonData.cpp714 #}}}715 679 #Petsc sources {{{1 716 680 petsc_sources= ./toolkits/petsc\ … … 718 682 ./toolkits/petsc/patches/SolverEnum.h\ 719 683 ./toolkits/petsc/patches/petscpatches.h\ 720 ./toolkits/petsc/patches/MatlabMatrixToPetscMatrix.cpp\721 ./toolkits/petsc/patches/MatlabVectorToPetscVector.cpp\722 ./toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp\723 ./toolkits/petsc/patches/PetscVectorToMatlabVector.cpp\724 684 ./toolkits/petsc/patches/VecTranspose.cpp\ 725 685 ./toolkits/petsc/patches/VecToMPISerial.cpp\ … … 732 692 ./toolkits/petsc/patches/SerialToVec.cpp\ 733 693 ./toolkits/petsc/patches/VecFree.cpp\ 694 ./toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp\ 695 ./toolkits/petsc/patches/PetscVectorToDoubleVector.cpp\ 734 696 ./toolkits/petsc/patches/VecDuplicatePatch.cpp\ 735 697 ./toolkits/petsc/patches/KSPFree.cpp\ … … 754 716 755 717 #}}} 756 #Serialsources {{{1 757 serial_sources= ./objects/Options/Option.cpp\ 718 #Mpi sources {{{1 719 mpi_sources= ./toolkits/mpi/mpiincludes.h\ 720 ./toolkits/mpi/patches/mpipatches.h\ 721 ./toolkits/mpi/patches/DetermineLocalSize.cpp\ 722 ./toolkits/mpi/patches/MPI_Upperrow.cpp\ 723 ./toolkits/mpi/patches/MPI_Lowerrow.cpp\ 724 ./toolkits/mpi/patches/MPI_Boundariesfromrange.cpp 725 #}}} 726 #Metis sources {{{1 727 metis_sources= ./toolkits/metis/patches/metispatches.h\ 728 ./toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp 729 #}}} 730 #Python sources {{{1 731 python_sources= ./python/io/pythonio.h\ 732 ./python/python-binding.h\ 733 ./python/io/WritePythonData.cpp\ 734 ./python/io/CheckNumPythonArguments.cpp\ 735 ./python/io/FetchPythonData.cpp 736 737 #}}} 738 #Matlab sources {{{1 739 matlab_sources= ./toolkits/matlab/matlabincludes.h\ 740 ./matlab/matlab-binding.h\ 741 ./matlab/io/matlabio.h\ 742 ./matlab/io/MatlabNArrayToNArray.cpp\ 743 ./matlab/io/CheckNumMatlabArguments.cpp\ 744 ./matlab/io/mxGetAssignedField.cpp\ 745 ./matlab/io/WriteMatlabData.cpp\ 746 ./matlab/io/FetchMatlabData.cpp\ 747 ./matlab/io/OptionParse.cpp\ 748 ./matlab/io/MatlabMatrixToMatrix.cpp\ 749 ./matlab/io/MatlabVectorToVector.cpp\ 750 ./matlab/io/MatlabVectorToDoubleVector.cpp\ 751 ./matlab/io/MatlabMatrixToDoubleMatrix.cpp\ 752 ./matlab/io/MatlabMatrixToSeqMat.cpp\ 753 ./matlab/io/MatlabVectorToSeqVec.cpp 754 #}}} 755 #Matlab and Petsc sources {{{1 756 matlabpetsc_sources= ./matlab/io/MatlabMatrixToPetscMatrix.cpp\ 757 ./matlab/io/MatlabVectorToPetscVector.cpp 758 759 #}}} 760 #Modules sources{{{1 761 module_sources= ./objects/Options/Option.cpp\ 758 762 ./objects/Options/Option.h\ 759 763 ./objects/Options/OptionDouble.cpp\ … … 769 773 ./objects/Options/OptionUtilities.cpp\ 770 774 ./objects/Options/OptionUtilities.h\ 775 ./shared/Alloc/alloc_module.h\ 776 ./shared/Alloc/alloc_module.cpp\ 771 777 ./shared/Threads/issm_threads.h\ 772 778 ./shared/Threads/LaunchThread.cpp\ … … 790 796 ./modules/Chacox/chaco_seconds.cpp\ 791 797 ./modules/Chacox/user_params.cpp\ 792 ./modules/Dakotax/SpawnCoreSerial.cpp\793 798 ./modules/TriaSearchx/TriaSearchx.h\ 794 799 ./modules/TriaSearchx/TriaSearchx.cpp\ … … 815 820 ./modules/HoleFillerx/HoleFillerx.cpp\ 816 821 ./modules/HoleFillerx/HoleFillerx.h\ 822 ./modules/Krigingx/Krigingx.cpp\ 823 ./modules/Krigingx/Krigingx.h\ 817 824 ./modules/AverageFilterx/AverageFilterx.cpp\ 818 825 ./modules/AverageFilterx/AverageFilterx.h\ … … 841 848 #}}} 842 849 850 #{{{1 Conditional build-up of sources 843 851 #ISSM sources are a combination of core sources and sources related to specific capabilities (which can 844 852 #be activated by autotools conditionals 845 #{{{1 853 846 854 847 855 #First the core 848 856 issm_sources = $(core_sources) 849 issm_psources =850 857 851 858 #Now the optional source 852 859 if DAKOTA 853 860 issm_sources += $(dakota_sources) 854 issm_psources += $(dakota_psources)855 861 endif 856 862 857 863 if PETSC 858 864 issm_sources += $(petsc_sources) 859 issm_psources += $(petsc_psources)860 865 endif 861 866 862 867 if GSL 863 868 issm_sources += $(gsl_sources) 864 issm_psources += $(gsl_psources) 865 endif 866 869 endif 867 870 868 871 if TRANSIENT 869 872 issm_sources += $(transient_sources) 870 issm_psources += $(transient_psources)871 873 endif 872 874 873 875 if STEADYSTATE 874 876 issm_sources += $(steadystate_sources) 875 issm_psources += $(steadystate_psources)876 877 endif 877 878 878 879 if PROGNOSTIC 879 880 issm_sources += $(prognostic_sources) 880 issm_psources += $(prognostic_psources)881 881 endif 882 882 883 883 if THERMAL 884 884 issm_sources += $(thermal_sources) 885 issm_psources += $(thermal_psources)886 885 endif 887 886 888 887 if CONTROL 889 888 issm_sources += $(control_sources) 890 issm_psources += $(control_psources)891 889 endif 892 890 893 891 if HYDROLOGY 894 892 issm_sources += $(hydrology_sources) 895 issm_psources += $(hydrology_psources)896 893 endif 897 894 898 895 if DIAGNOSTIC 899 896 issm_sources += $(diagnostic_sources) 900 issm_psources += $(diagnostic_psources)901 897 endif 902 898 903 899 if BALANCED 904 900 issm_sources += $(balanced_sources) 905 issm_psources += $(balanced_psources)906 901 endif 907 902 … … 912 907 if SLOPE 913 908 issm_sources += $(slope_sources) 914 issm_psources += $(slope_psources)915 909 endif 916 910 … … 926 920 issm_sources += $(threed_sources) 927 921 endif 928 #}}} 929 930 #ISSM serial library {{{1 931 if SERIAL 932 libISSM_a_SOURCES = $(issm_sources) 933 libISSM_a_SOURCES += $(serial_sources) 934 libISSM_a_SOURCES += $(bamg_sources) 935 libISSM_a_SOURCES += $(kml_sources) 936 libISSM_a_CXXFLAGS = -fPIC -D_SERIAL_ -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_ $(CXXFLAGS) $(CXXOPTFLAGS) 937 #libISSM_a_CXXFLAGS = -D_SERIAL_ -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER $(CXXFLAGS) $(CXXOPTFLAGS) 922 923 if MPI 924 issm_sources += $(mpi_sources) 925 endif 926 927 if METIS 928 issm_sources += $(metis_sources) 929 endif 930 931 if PETSC 932 if MATLAB 933 issm_sources += $(matlabpetsc_sources) 934 endif 935 endif 936 937 938 #}}} 939 #Library flags and sources {{{1 940 ALLCXXFLAGS= -fPIC -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_ $(CXXFLAGS) $(CXXOPTFLAGS) 941 942 libISSMCore_a_SOURCES = $(issm_sources) 943 libISSMCore_a_CXXFLAGS = $(ALLCXXFLAGS) 944 945 if MODULES 946 libISSMModules_a_SOURCES = $(module_sources) 947 libISSMModules_a_SOURCES += $(bamg_sources) 948 libISSMModules_a_SOURCES += $(kml_sources) 949 libISSMModules_a_CXXFLAGS = $(ALLCXXFLAGS) 938 950 939 951 if PYTHON 940 libISSM _a_CXXFLAGS+= -DNPY_NO_DEPRECATED_API941 libISSM _a_SOURCES += $(python_sources)952 libISSMPython_a_SOURCES = $(python_sources) 953 libISSMPython_a_CXXFLAGS= $(ALLCXXFLAGS) 942 954 endif 943 955 944 956 if MATLAB 945 libISSM_a_SOURCES += $(matlab_sources) 946 endif 947 948 endif 949 #}}} 950 #ISSM parallel library {{{1 951 if PARALLEL 952 libpISSM_a_SOURCES = $(issm_sources) 953 libpISSM_a_SOURCES += $(issm_psources) 954 libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_ -D_C_ $(CXXFLAGS) $(CXXOPTFLAGS) 957 libISSMMatlab_a_SOURCES = $(matlab_sources) 958 libISSMMatlab_a_CXXFLAGS= $(ALLCXXFLAGS) 959 endif 955 960 endif 956 961 #}}} 957 962 #Overload library, to overload any non-standard symbols. {{{1 958 lib Overload_a_SOURCES = ./shared/String/stricmp.c959 lib Overload_a_CFLAGS = -fPIC -D_PARALLEL_-D_C_ $(COPTFLAGS) $(CFLAGS)963 libISSMOverload_a_SOURCES = ./shared/String/stricmp.c 964 libISSMOverload_a_CFLAGS = -fPIC -D_C_ $(COPTFLAGS) $(CFLAGS) 960 965 #}}} 961 966 962 967 #Executable {{{1 963 if NOPARALLEL964 bin_PROGRAMS =965 else966 968 bin_PROGRAMS = issm 967 endif968 969 969 970 #Standard libraries 970 LDADD = ./lib pISSM.a ./libOverload.a971 LDADD = ./libISSMCore.a ./libISSMOverload.a 971 972 972 973 #External packages … … 974 975 975 976 issm_SOURCES = solutions/issm.cpp 976 issm_CXXFLAGS= -fPIC -D_PARALLEL_$(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS)977 issm_CXXFLAGS= -fPIC $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 977 978 #}}} 978 979 #Automatic differentiation: append this fold to the end of the src/c/Makefile.am to get this Makefile.am {{{ 979 980 if ADIC2 980 lib_LIBRARIES += libAD.a lib pISSMRose.a981 lib_LIBRARIES += libAD.a libISSMRose.a 981 982 982 983 #ADIC2 library, for automatic differentiation 983 984 #libAD_a_SOURCES = ./mini1.ad.c 984 985 libAD_a_SOURCES = 985 libAD_a_CFLAGS = -fPIC -D_PARALLEL_ -D_C_ $(COPTFLAGS) 986 986 libAD_a_CFLAGS = -fPIC -D_C_ $(COPTFLAGS) 987 987 988 988 989 989 #test rose preprocessing 990 990 %.r2cpp.cpp : %.cpp 991 testTranslator -rose:o $@ -rose:skipfinalCompileStep -DHAVE_CONFIG_H -D_ PARALLEL_ -D_C_ -I. -I../.. $(INCLUDES) $<992 lib pISSMRose_a_SOURCES = $(libpISSM_a_SOURCES:.cpp=.r2cpp.cpp)993 lib pISSMRose_a_CXXFLAGS= -fPIC -D_PARALLEL_-D_C_ $(CXXOPTFLAGS)991 testTranslator -rose:o $@ -rose:skipfinalCompileStep -DHAVE_CONFIG_H -D_C_ -I. -I../.. $(INCLUDES) $< 992 libISSMRose_a_SOURCES = $(libISSMCore_a_SOURCES:.cpp=.r2cpp.cpp) 993 libISSMRose_a_CXXFLAGS= -fPIC -D_C_ $(CXXOPTFLAGS) 994 994 995 995 … … 1003 1003 #Executable 1004 1004 bin_PROGRAMS += issmRose.exe 1005 issmRose_exe_LDADD = ./lib pISSMRose.a $(LDADD)1005 issmRose_exe_LDADD = ./libISSMRose.a $(LDADD) 1006 1006 issmRose_exe_SOURCES = solutions/issm.cpp 1007 issmRose_exe_CXXFLAGS= -fPIC -D_PARALLEL_$(CXXOPTFLAGS) $(COPTFLAGS)1007 issmRose_exe_CXXFLAGS= -fPIC $(CXXOPTFLAGS) $(COPTFLAGS) 1008 1008 LDADD += $(ADIC2LIB) 1009 1009 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/include/macros.h ¶
r12004 r12168 40 40 #endif 41 41 /*}}}*/ 42 43 /* MODULEBOOT/MODULEEND {{{1*/ 42 /* ISSMBOOT/ISSMEND {{{1*/ 44 43 45 44 /*The following macros hide the error exception handling in a matlab module. Just put 46 * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions45 * ISSMBOOT(); and ISSMEND(); at the beginning and end of a module, and c++ exceptions 47 46 * will be trapped. Really nifty!*/ 48 47 49 #ifdef _SERIAL_ 50 #ifdef _HAVE_MATLAB_ //{{{2 51 #define MODULEBOOT(); ModuleBoot(); \ 48 #define ISSMBOOT(); \ 52 49 try{ 53 50 54 #define MODULEEND(); ModuleEnd(); }\ 55 catch(ErrorException &exception){\ 56 exception.Report(); \ 57 mexErrMsgTxt(""); \ 58 }\ 59 catch (exception& e) {\ 60 _printf_(true,"Standard exception: %s\n",e.what());\ 61 mexErrMsgTxt(" ");\ 62 } 63 #endif //}}} 64 #ifdef _HAVE_PYTHON_ //{{{2 65 #define MODULEBOOT(); ModuleBoot(); \ 66 PyObject* output = PyTuple_New(NLHS); if (!output) return NULL; 67 68 #define MODULEEND(); ModuleEnd(); \ 69 return output; 70 #endif //}}} 71 #else 72 //{{{2 73 #define MODULEBOOT(); \ 74 try{ 75 76 #define MODULEEND(); }\ 51 #define ISSMEND(); }\ 77 52 catch(ErrorException &exception){\ 78 53 exception.Report(); \ … … 82 57 _printf_(true,"Standard exception: %s\n",e.what());\ 83 58 return 1;\ 59 }\ 60 catch(...){\ 61 _printf_(true,"An unexpected error occurred");\ 84 62 } 85 //}}}86 #endif87 63 /*}}}*/ 88 /* WRAPPER {{{1*/89 #ifdef _HAVE_MATLAB_90 #define WRAPPER(modulename,...) void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])91 #endif92 #ifdef _HAVE_PYTHON_93 #define WRAPPER(modulename,...) \94 \95 static PyObject* modulename(PyObject* self,PyObject* args);\96 static PyMethodDef modulename##_funcs[] = {\97 {#modulename, (PyCFunction)modulename, METH_VARARGS, ""},\98 {NULL,NULL,0,NULL}\99 };\100 \101 static struct PyModuleDef modulename##module= {\102 PyModuleDef_HEAD_INIT,\103 #modulename, /* name of module */\104 NULL, /* module documentation, may be NULL */\105 -1, /* size of per-interpreter state of the module,\106 or -1 if the module keeps state in global variables. */\107 modulename##_funcs\108 };\109 \110 PyMODINIT_FUNC PyInit_##modulename(void){\111 \112 import_array();\113 return PyModule_Create(&modulename##module);\114 }\115 \116 static PyObject* modulename(PyObject* self,PyObject* args)117 64 118 65 #endif 119 120 /*}}}*/121 /* CHECKARGUMENTS {{{1*/122 #ifdef _HAVE_MATLAB_123 #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,functionpointer)124 #endif125 #ifdef _HAVE_PYTHON_126 #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumPythonArguments(args, NRHS,functionpointer)127 #endif128 /*}}}*/129 130 131 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/c/include/types.h ¶
r12004 r12168 16 16 17 17 /*Define abstract type for I/O: */ 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include <mex.h>20 typedef const mxArray* ConstDataHandle; //serially, we are reading data from a matlab array.21 typedef mxArray* DataHandle;22 #else23 typedef FILE* ConstDataHandle; //in parallel, we are reading data from a file.24 typedef FILE* DataHandle;25 #endif26 18 enum param_type { STRING, INTEGER, STRINGARRAY, DOUBLE, DOUBLEVEC, DOUBLEMAT, PETSCVEC, PETSCMAT }; 27 19 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/io/PrintfFunction.cpp ¶
r12004 r12168 8 8 #include "../shared/shared.h" 9 9 #include "../include/include.h" 10 11 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)12 #include "mex.h"13 #endif14 10 15 11 int PrintfFunction(const char* format,...){ … … 53 49 54 50 /*Ok, if we are running in parallel, get node 0 to print*/ 55 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)56 mexPrintf(buffer);57 #else58 51 if(my_rank==0)printf(buffer); 59 #endif60 52 61 53 /*Clean up and return*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/io/io.h ¶
r12004 r12168 15 15 #include "./Disk/diskio.h" 16 16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include "./Matlab/matlabio.h"19 #endif20 21 #if defined(_HAVE_PYTHON_) && defined(_SERIAL_)22 #include "./Python/pythonio.h"23 #endif24 25 17 /*printf: */ 26 18 int PrintfFunction(const char* format,...); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp ¶
r9761 r12168 32 32 } 33 33 34 #ifdef _ PARALLEL_34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); … … 95 95 } 96 96 97 #ifdef _ PARALLEL_97 #ifdef _HAVE_MPI_ 98 98 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 99 99 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); … … 135 135 136 136 /*Is there just one found? that would mean we have frozen! : */ 137 #ifdef _ PARALLEL_137 #ifdef _HAVE_MPI_ 138 138 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD ); 139 139 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); … … 195 195 } 196 196 197 #ifdef _ PARALLEL_197 #ifdef _HAVE_MPI_ 198 198 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 199 199 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); … … 228 228 } 229 229 230 #ifdef _ PARALLEL_230 #ifdef _HAVE_MPI_ 231 231 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 232 232 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); … … 289 289 } 290 290 291 #ifdef _ PARALLEL_291 #ifdef _HAVE_MPI_ 292 292 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 293 293 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); … … 329 329 } 330 330 331 #ifdef _ PARALLEL_331 #ifdef _HAVE_MPI_ 332 332 MPI_Reduce (&max_penetration,&mpi_max_penetration,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 333 333 MPI_Bcast(&mpi_max_penetration,1,MPI_DOUBLE,0,MPI_COMM_WORLD); … … 368 368 } 369 369 370 #ifdef _ PARALLEL_370 #ifdef _HAVE_MPI_ 371 371 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 372 372 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp ¶
r9883 r12168 36 36 } 37 37 38 #ifdef _ PARALLEL_38 #ifdef _HAVE_MPI_ 39 39 MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 40 40 MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp ¶
r9883 r12168 28 28 } 29 29 30 #ifdef _ PARALLEL_30 #ifdef _HAVE_MPI_ 31 31 MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 32 32 MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ContourToMeshx/ContourToMeshx.cpp ¶
r11708 r12168 11 11 #include "./ContourToMeshx.h" 12 12 13 int ContourToMeshx( Vector** pin_nod,Vector** pin_elem, double* index, double* x, double* y, Contour** contours,int numcontours,char* interptype,int nel,int nods, int edgevalue) {13 int ContourToMeshx( Vector** pin_nod,Vector** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) { 14 14 15 15 int noerr=1; … … 37 37 38 38 /*initialize thread parameters: */ 39 gate.numcontours=numcontours;40 39 gate.contours=contours; 41 40 gate.nods=nods; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ContourToMeshx/ContourToMeshx.h ¶
r11708 r12168 13 13 typedef struct{ 14 14 15 int numcontours; 16 Contour** contours; 15 DataSet* contours; 17 16 int nods; 18 17 int edgevalue; … … 25 24 26 25 /* local prototypes: */ 27 int ContourToMeshx( Vector** pin_nods,Vector** pin_elem, double* index, double* x, double* y, Contour** contours,int numcontours,char* interptype,int nel,int nods, int edgevalue);26 int ContourToMeshx( Vector** pin_nods,Vector** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue); 28 27 29 28 void* ContourToMeshxt(void* vContourToMeshxThreadStruct); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp ¶
r11708 r12168 26 26 27 27 /*Contour:*/ 28 Contour* contouri=NULL; 29 int numnodes; 30 double* xc=NULL; 31 double* yc=NULL; 32 28 DataSet* contours=NULL; 33 29 34 30 /*parameters: */ 35 int numcontours;36 Contour** contours=NULL;37 31 int nods; 38 32 int edgevalue; … … 49 43 50 44 /*recover parameters :*/ 51 numcontours=gate->numcontours;52 45 contours=gate->contours; 53 46 nods=gate->nods; … … 61 54 62 55 /*Loop through all contours: */ 63 for (i=0;i<numcontours;i++){ 64 contouri=*(contours+i); 65 numnodes=contouri->nods; 66 xc=contouri->x; 67 yc=contouri->y; 68 IsInPoly(in_nod,xc,yc,numnodes,x,y,i0,i1,edgevalue); 56 for (i=0;i<contours->Size();i++){ 57 Contour* contour=(Contour*)contours->GetObjectByOffset(i); 58 IsInPoly(in_nod,contour->x,contour->y,contour->nods,x,y,i0,i1,edgevalue); 69 59 } 70 60 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ContourToNodesx/ContourToNodesx.cpp ¶
r11708 r12168 38 38 return 1; 39 39 } 40 41 int ContourToNodesx( Vector** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){ 42 43 int i; 44 int m,n; 45 46 /*Contour:*/ 47 Contour* contouri=NULL; 48 int numnodes; 49 double* xc=NULL; 50 double* yc=NULL; 51 double value; 52 53 /*output: */ 54 Vector* flags=NULL; 55 56 flags=new Vector(nods); 57 58 /*Loop through all contours: */ 59 if(contours){ 60 for (i=0;i<contours->Size();i++){ 61 Contour* contour=(Contour*)contours->GetObjectByOffset(i); 62 IsInPoly(flags,contour->x,contour->y,contour->nods,x,y,0,nods,edgevalue); 63 } 64 } 65 66 /*Assemble vector: */ 67 flags->Assemble(); 68 69 /*Assign output pointers: */ 70 *pflags=flags; 71 72 return 1; 73 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ContourToNodesx/ContourToNodesx.h ¶
r11708 r12168 12 12 /* local prototypes: */ 13 13 int ContourToNodesx( Vector** pflags,double* x, double* y, int nods, Contour** contours,int numcontours,int edgevalue); 14 int ContourToNodesx( Vector** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue); 14 15 15 16 #endif /* _CONTOURTONODESX_H */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/Dakotax/Dakotax.cpp ¶
r12004 r12168 51 51 #endif 52 52 53 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)54 void Dakotax(mxArray* femmodel){55 #else56 53 void Dakotax(FemModel* femmodel){ 57 #endif58 54 59 55 … … 69 65 70 66 /*Retrieve parameters: */ 71 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)72 FetchData((Parameters**)¶meters,mxGetField((mxArray*)femmodel,0,"parameters"));73 #else74 67 parameters=femmodel->parameters; 75 #endif76 68 77 69 /*Recover dakota_input_file, dakota_output_file and dakota_error_file, in the parameters dataset in parallel */ … … 80 72 parameters->FindParam(&dakota_error_file,QmuErrNameEnum); 81 73 82 #ifdef _PARALLEL_83 74 if(my_rank==0){ 84 #endif85 75 86 76 // Instantiate/initialize the parallel library and problem description 87 77 // database objects. 88 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) 89 Dakota::ParallelLibrary parallel_lib; //use Dakota's standard library mode constructor 90 #else 91 Dakota::ParallelLibrary parallel_lib("serial"); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0. 92 #endif 78 Dakota::ParallelLibrary parallel_lib("serial"); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0. 93 79 Dakota::ProblemDescDB problem_db(parallel_lib); 94 80 … … 123 109 selected_strategy.run_strategy(); 124 110 125 #ifdef _PARALLEL_126 111 //Warn other cpus that we are done running the dakota iterator, by setting the counter to -1: 127 112 SpawnCore(NULL,0, NULL,NULL,0,femmodel,-1); 128 #endif129 113 130 #ifdef _PARALLEL_131 114 } 132 115 else{ … … 136 119 } 137 120 } 138 #endif //#ifdef _PARALLEL_139 121 140 122 /*Free ressources:*/ … … 143 125 xfree((void**)&dakota_output_file); 144 126 145 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)146 delete parameters;147 #endif148 149 127 #endif //#ifdef _HAVE_DAKOTA_ 150 128 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/Dakotax/Dakotax.h ¶
r12004 r12168 10 10 11 11 /* local prototypes: */ 12 int SpawnCore(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, void* femmodel,int counter);12 int SpawnCore(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, void* femmodel,int counter); 13 13 int DescriptorIndex(char* root, int* pindex,char* descriptor); 14 14 15 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)16 void Dakotax(mxArray* femmodel);17 void SpawnCoreSerial(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, mxArray* femmodel,int counter);18 #else19 15 void Dakotax(FemModel* femmodel); 20 16 void SpawnCoreParallel(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, FemModel* femmodel,int counter); 21 #endif22 17 void DakotaResponses(double* responses,char** responses_descriptors,int numresponses,FemModel* femmodel); 23 18 void DakotaMPI_Bcast(double** pvariables, char*** pvariables_descriptors,int* pnumvariables, int* pnumresponses); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/Dakotax/SpawnCore.cpp ¶
r12004 r12168 21 21 /*Branch into a serial SpawnCore and a parallel SpawnCore: */ 22 22 23 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) 24 SpawnCoreSerial(responses, numresponses, variables, variables_descriptors,numvariables, (mxArray*)femmodel, counter); 25 #else 26 /*Call SpawnCoreParallel unless counter=-1 on cpu0, in which case, bail out and return 0: */ 27 MPI_Bcast(&counter,1,MPI_INT,0,MPI_COMM_WORLD); 28 if(counter==-1)return 0; 29 SpawnCoreParallel(responses, numresponses, variables, variables_descriptors,numvariables, (FemModel*)femmodel,counter); 30 #endif 23 /*Call SpawnCoreParallel unless counter=-1 on cpu0, in which case, bail out and return 0: */ 24 MPI_Bcast(&counter,1,MPI_INT,0,MPI_COMM_WORLD); 25 if(counter==-1)return 0; 26 27 SpawnCoreParallel(responses, numresponses, variables, variables_descriptors,numvariables, (FemModel*)femmodel,counter); 31 28 return 1; 32 29 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp ¶
r8608 r12168 27 27 28 28 /*Sum all J from all cpus of the cluster:*/ 29 #ifdef _HAVE_MPI_ 29 30 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 31 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 31 32 J=J_sum; 33 #endif 32 34 33 35 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ElementResponsex/ElementResponsex.cpp ¶
r10703 r12168 37 37 38 38 /*Broadcast whether we found the element: */ 39 #ifdef _HAVE_MPI_ 39 40 MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 40 41 if(!sumfound)_error_("%s%i%s","could not find material with id",index," to compute ElementResponse"); 42 #endif 41 43 42 44 /*Ok, we found the element, compute responseocity: */ … … 46 48 47 49 /*Broadcast and plug into response: */ 50 #ifdef _HAVE_MPI_ 48 51 MPI_Allreduce ( &cpu_found,&cpu_found,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 49 52 MPI_Bcast(&response,1,MPI_DOUBLE,cpu_found,MPI_COMM_WORLD); 53 #endif 50 54 51 55 *presponse=response; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp ¶
r11577 r12168 61 61 /* read exp file */ 62 62 63 if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp ,true))63 if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp)) 64 64 _error_("Error reading exp file."); 65 65 _printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp ¶
r11708 r12168 156 156 vec_nodes_on_floatingice->Assemble(); 157 157 158 #ifdef _HAVE_MPI_ 158 159 MPI_Allreduce(&local_nflipped,&nflipped,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 159 160 _printf_(VerboseConvergence()," Additional number of vertices allowed to unground: %i\n",nflipped); 161 #else 162 nflipped=local_nflipped; 163 #endif 160 164 161 165 /*Avoid leaks: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/IceVolumex/IceVolumex.cpp ¶
r9880 r12168 19 19 local_ice_volume+=element->IceVolume(); 20 20 } 21 #ifdef _HAVE_MPI_ 21 22 MPI_Reduce(&local_ice_volume,&total_ice_volume,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 22 23 MPI_Bcast(&total_ice_volume,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 24 #else 25 total_ice_volume=local_ice_volume; 26 #endif 23 27 24 28 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/InputConvergencex/InputConvergencex.cpp ¶
r9761 r12168 30 30 31 31 /*In parallel, we need to gather the converged status: */ 32 #ifdef _ PARALLEL_32 #ifdef _HAVE_MPI_ 33 33 MPI_Allreduce ( (void*)&num_notconverged,(void*)&total_notconverged,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 34 34 num_notconverged=total_notconverged; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp ¶
r11708 r12168 14 14 15 15 int InterpFromMeshToMesh2dx(double** pdata_interp,double* index_data,double* x_data,double* y_data,int nods_data,int nels_data, 16 double* data,int data_rows,int data_cols,double* x_interp,double* y_interp,int nods_interp,double* default_values,int num_default_values, Contour** contours, int numcontours){16 double* data,int data_rows,int data_cols,double* x_interp,double* y_interp,int nods_interp,double* default_values,int num_default_values, DataSet* contours){ 17 17 18 18 /*Output*/ … … 36 36 bool skip_bamg=false; 37 37 38 39 38 /*Checks*/ 40 39 if (data_cols<=0){ … … 50 49 /*If default values supplied, figure out which nodes are inside the contour, including the border of the contour: */ 51 50 if(num_default_values){ 52 ContourToNodesx( &vec_incontour,x_interp,y_interp,nods_interp,contours, numcontours,1);51 ContourToNodesx( &vec_incontour,x_interp,y_interp,nods_interp,contours,1); 53 52 incontour=vec_incontour->ToMPISerial(); 54 53 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h ¶
r5032 r12168 10 10 /* local prototypes: */ 11 11 int InterpFromMeshToMesh2dx(double** pdata_interp,double* index_data,double* x_data,double* y_data,int nods_data,int nels_data, 12 double* data,int data_rows,int data_cols,double* x_interp,double* y_interp,int nods_interp,double* default_values,int num_default_values, Contour** contours, int numcontours);12 double* data,int data_rows,int data_cols,double* x_interp,double* y_interp,int nods_interp,double* default_values,int num_default_values,DataSet* contours); 13 13 14 14 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MassFluxx/MassFluxx.cpp ¶
r8263 r12168 59 59 } 60 60 61 #ifdef _ PARALLEL_61 #ifdef _HAVE_MPI_ 62 62 MPI_Allreduce ( (void*)&mass_flux,(void*)&all_mass_flux,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD); 63 63 mass_flux=all_mass_flux; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp ¶
r5870 r12168 31 31 } 32 32 33 #ifdef _PARALLEL_34 33 /*Figure out maximum across the cluster: */ 34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&maxabsvx,&node_maxabsvx,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&node_maxabsvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp ¶
r5871 r12168 32 32 } 33 33 34 #ifdef _PARALLEL_35 34 /*Figure out maximum across the cluster: */ 35 #ifdef _HAVE_MPI_ 36 36 MPI_Reduce (&maxabsvy,&node_maxabsvy,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 37 37 MPI_Bcast(&node_maxabsvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp ¶
r5414 r12168 31 31 } 32 32 33 #ifdef _PARALLEL_34 33 /*Figure out minimum across the cluster: */ 34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&maxabsvz,&node_maxabsvz,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&node_maxabsvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MaxVelx/MaxVelx.cpp ¶
r5414 r12168 32 32 } 33 33 34 #ifdef _PARALLEL_35 34 /*Figure out maximum across the cluster: */ 35 #ifdef _HAVE_MPI_ 36 36 MPI_Reduce (&maxvel,&node_maxvel,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 37 37 MPI_Bcast(&node_maxvel,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MaxVxx/MaxVxx.cpp ¶
r5414 r12168 31 31 } 32 32 33 #ifdef _PARALLEL_34 33 /*Figure out minimum across the cluster: */ 34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&maxvx,&node_maxvx,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&node_maxvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MaxVyx/MaxVyx.cpp ¶
r5414 r12168 31 31 } 32 32 33 #ifdef _PARALLEL_34 33 /*Figure out minimum across the cluster: */ 34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&maxvy,&node_maxvy,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&node_maxvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MaxVzx/MaxVzx.cpp ¶
r5414 r12168 32 32 } 33 33 34 #ifdef _PARALLEL_35 34 /*Figure out minimum across the cluster: */ 35 #ifdef _HAVE_MPI_ 36 36 MPI_Reduce (&maxvz,&node_maxvz,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD ); 37 37 MPI_Bcast(&node_maxvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MeshPartitionx/MeshPartitionx.cpp ¶
r10000 r12168 42 42 /*Partition using Metis:*/ 43 43 if (num_procs>1){ 44 #ifdef _HAVE_METIS_ 44 45 METIS_PartMeshNodalPatch(&numberofelements,&numberofnodes, index, &etype, &numflag, &num_procs, &edgecut, epart, npart); 46 #endif 45 47 } 46 48 else if (num_procs==1){ … … 67 69 /*Partition using Metis:*/ 68 70 if (num_procs>1){ 71 #ifdef _HAVE_METIS_ 69 72 METIS_PartMeshNodalPatch(&numberofelements2d,&numberofnodes2d, index2d, &etype2d, &numflag, &num_procs, &edgecut, epart2d, npart2d); 73 #endif 70 74 } 71 75 else if (num_procs==1){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MeshProfileIntersectionx/SegmentIntersect.cpp ¶
r11112 r12168 6 6 int SegmentIntersect(double* palpha, double* pbeta, double* x1, double* y1, double* x2, double* y2){ 7 7 8 /*See ISSM_ TIER/src/m/utils/Geometry/SegIntersect.m for matlab routine from which we take this routine: */8 /*See ISSM_DIR/src/m/utils/Geometry/SegIntersect.m for matlab routine from which we take this routine: */ 9 9 10 10 /*output: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MinVelx/MinVelx.cpp ¶
r5414 r12168 32 32 } 33 33 34 #ifdef _PARALLEL_35 34 /*Figure out minimum across the cluster: */ 35 #ifdef _HAVE_MPI_ 36 36 MPI_Reduce (&minvel,&node_minvel,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD ); 37 37 MPI_Bcast(&node_minvel,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MinVxx/MinVxx.cpp ¶
r5414 r12168 31 31 } 32 32 33 #ifdef _PARALLEL_34 33 /*Figure out minimum across the cluster: */ 34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&minvx,&node_minvx,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&node_minvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MinVyx/MinVyx.cpp ¶
r5414 r12168 31 31 } 32 32 33 #ifdef _PARALLEL_34 33 /*Figure out minimum across the cluster: */ 34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&minvy,&node_minvy,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&node_minvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/MinVzx/MinVzx.cpp ¶
r5414 r12168 31 31 } 32 32 33 #ifdef _PARALLEL_34 33 /*Figure out minimum across the cluster: */ 34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&minvz,&node_minvz,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&node_minvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp ¶
r9733 r12168 63 63 else elements_width=6; //penta elements 64 64 65 #ifdef _PARALLEL_66 65 /*Determine parallel partitioning of elements: we use Metis for now. First load the data, then partition*/ 67 66 if(dim==2){ … … 79 78 xfree((void**)&elements); 80 79 xfree((void**)&elements2d); 81 82 #else83 /*In serial mode, epart is full of 0: all elements belong to cpu 0: */84 epart=(int*)xcalloc(numberofelements,sizeof(int));85 #endif86 80 87 81 /*Deal with rifts, they have to be included into one partition only, not several: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/NodalValuex/NodalValuex.cpp ¶
r9206 r12168 36 36 37 37 /*Broadcast whether we found the element: */ 38 #ifdef _HAVE_MPI_ 38 39 MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD); 39 40 if(!sumfound)_error_("%s%i%s%s","could not find element with vertex with id",index," to compute nodal value ",EnumToStringx(natureofdataenum)); 41 #endif 40 42 41 43 /*Broadcast and plug into response: */ 44 #ifdef _HAVE_MPI_ 42 45 MPI_Allreduce ( &cpu_found,&cpu_found,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD); 43 46 MPI_Bcast(&value,1,MPI_DOUBLE,cpu_found,MPI_COMM_WORLD); 47 #else 48 value=cpu_found; 49 #endif 44 50 45 51 *pnodalvalue=value; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/OutputResultsx/OutputResultsx.cpp ¶
r12004 r12168 16 16 #include "../../objects/objects.h" 17 17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){20 #else21 18 void OutputResultsx( Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){ 22 #endif23 19 24 20 extern int my_rank; … … 31 27 bool dakota_analysis = false; 32 28 33 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)34 const char **fnames = NULL;35 mwSize onebyone[2] = {0,0};36 mwSize ndim = 2;37 int nfields=0;38 #endif39 40 29 /*retrieve parameters: */ 41 30 parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); … … 43 32 if(dakota_analysis){ 44 33 //no need to output anything, Dakota analysis has different outputs 45 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)46 *pdataref=mxCreateStructArray( ndim,onebyone,nfields,fnames);47 #endif48 34 return; 49 35 } … … 56 42 /*Results do not include the type of solution being run . In parallel, we output results to a filename, 57 43 *therefore, we need to include the solutiontype into the filename: */ 58 #ifdef _PARALLEL_59 44 if(my_rank==0){ 60 45 parameters->FindParam(&solutiontype,SolutionTypeEnum); … … 88 73 parameters->SetParam(fid,OutputFilePointerEnum); 89 74 } 90 #endif91 75 92 /*Write results to disk (in parallel), or to memory (in serial mode): */ 93 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) 94 results->Write(pdataref); 95 #else 96 results->Write(parameters); 97 #endif 76 /*Write results to disk: */ 77 results->Write(parameters); 98 78 99 79 /*Delete and reinitialize results, in parallel: */ 100 #ifdef _PARALLEL_ 101 results->clear(); 80 results->clear(); 102 81 103 /*Close output file? :*/ 104 /*WARNING: issm.cpp is taking care of it for now (quick fix) 105 if((step==1) && (time==0)){ 106 if(io_gather){ 107 if(my_rank==0) pfclose(fid,outputfilename); 108 } 109 else pfclose(fid,cpu_outputfilename); 110 } 111 */ 112 #endif 82 /*Close output file? :*/ 83 /*WARNING: issm.cpp is taking care of it for now (quick fix) 84 if((step==1) && (time==0)){ 85 if(io_gather){ 86 if(my_rank==0) pfclose(fid,outputfilename); 87 } 88 else pfclose(fid,cpu_outputfilename); 89 } 90 */ 113 91 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/OutputResultsx/OutputResultsx.h ¶
r12004 r12168 14 14 #include "../../Container/Container.h" 15 15 16 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)17 #include <mex.h>18 void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, Results* results);19 #else20 16 void OutputResultsx(Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters, Results* results); 21 #endif22 17 23 18 #endif /* _OUTPUTRESULTS_H */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp ¶
r12004 r12168 92 92 } 93 93 94 #ifdef _PARALLEL_95 94 /*Ok, broadcast to other cpus: */ 95 #ifdef _HAVE_MPI_ 96 96 MPI_Bcast(&numanalyses,1,MPI_INT,0,MPI_COMM_WORLD); 97 97 if(my_rank!=0){ … … 100 100 } 101 101 MPI_Bcast(analyses,numanalyses,MPI_DOUBLE,0,MPI_COMM_WORLD); 102 #endif 102 103 for(i=0;i<numanalyses;i++){ 103 104 char* string=strings[i]; … … 106 107 } 107 108 if(my_rank==0)stringlength=(strlen(string)+1)*sizeof(char); 109 #ifdef _HAVE_MPI_ 108 110 MPI_Bcast(&stringlength,1,MPI_INT,0,MPI_COMM_WORLD); 109 111 if(my_rank!=0)string=(char*)xmalloc(stringlength); 110 112 MPI_Bcast(string,stringlength,MPI_CHAR,0,MPI_COMM_WORLD); 111 113 if(my_rank!=0)strings[i]=string; 114 #endif 112 115 } 113 #endif114 116 115 117 /*Ok, out of strings and analyses and numanalyses, create parameters, and plug them into parameters container: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp ¶
r11577 r12168 11 11 12 12 void PositiveDegreeDayx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){ 13 14 Element* element = NULL;15 13 16 for(int i=0;i<elements->Size();i++){ 17 element=(Element*)elements->GetObjectByOffset(i); 18 element->PositiveDegreeDay(); 19 } 14 // void PositiveDegreeDayx(hd,vTempsea,vPrec,agd,Tsurf,ni){ 15 // note "v" prefix means 12 monthly means, ie time dimension 16 // INPUT parameters: ni: working size of arrays 17 // INPUT: surface elevation (m): hd(NA) 18 // monthly mean surface sealevel temperature (degrees C): vTempsea(NA 19 // ,NTIME) 20 // monthly mean precip rate (m/yr water equivalent): vPrec(NA,NTIME) 21 // OUTPUT: mass-balance (m/yr ice): agd(NA) 22 // mean annual surface temperature (degrees C): Tsurf(NA) 20 23 24 int i, it, jj, itm; 25 double DT = 0.02, sigfac, snormfac; 26 double signorm = 5.5; // signorm : sigma of the temperature distribution for a normal day 27 double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm 28 double signormc; // sigma of the temperature distribution for cloudy day 29 double siglimc=0, siglim0, siglim0c; 30 double tstep, tsint, tint, tstepc; 31 int NPDMAX = 1504, NPDCMAX = 1454; 32 //double pdds[NPDMAX]={0}; 33 //double pds[NPDCMAX]={0}; 34 double pddt, pd ; // pd : snow/precip fraction, precipitation falling as snow 35 double PDup, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C) 36 double tstar; // monthly mean surface temp 37 38 double* pdds=NULL; 39 double* pds=NULL; 40 Element* element = NULL; 41 42 pdds=(double*)xmalloc(NPDMAX*sizeof(double)+1); 43 pds=(double*)xmalloc(NPDCMAX*sizeof(double)+1); 44 45 46 // PDD constant 47 siglim = 2.5*signorm; 48 49 // initialize PDD (creation of a lookup table) 50 tstep = 0.1; 51 tsint = tstep*0.5; 52 sigfac = -1.0/(2.0*pow(signorm,2)); 53 snormfac = 1.0/(signorm*sqrt(2.0*acos(-1.0))); 54 siglim = 2.5*signorm; 55 itm = (int)(2*siglim/DT + 1.5); 56 57 if (itm >= NPDMAX){ 58 printf("increase NPDMAX in massBalance.cpp\n"); 59 exit (1); 60 } 61 for (it = 0; it < itm; it++){ 62 // tstar = REAL(it)*DT-siglim; 63 tstar = it*DT-siglim; 64 tint = tsint; 65 pddt = 0; 66 for ( jj = 0; jj < 600; jj++){ 67 if (tint > (tstar+siglim)){break;} 68 pddt = pddt + tint*exp(sigfac*(pow((tint-tstar),2)))*tstep; 69 tint = tint+tstep; 70 } 71 pdds[it] = pddt*snormfac; 72 } 73 pdds[itm+1] = siglim + DT; 74 75 //*********compute PD(T) : snow/precip fraction. precipitation falling as snow 76 tstepc = 0.1; 77 tsint = PDCUT-tstepc*0.5; 78 signormc = signorm - 0.5; 79 sigfac = -1.0/(2.0*pow(signormc,2)); 80 snormfac = 1.0/(signormc*sqrt(2.0*acos(-1.0))); 81 siglimc = 2.5*signormc ; 82 itm = (int)((PDCUT+2.*siglimc)/DT + 1.5); 83 if (itm >= NPDCMAX){ 84 printf("'increase NPDCMAX in p35com'\n"); 85 exit (1); 86 } 87 for (it = 0; it < itm; it++ ){ 88 tstar = it*DT-siglimc; 89 // tstar = REAL(it)*DT-siglimc; 90 tint = tsint; // start against upper bound 91 pd = 0; 92 for (jj = 0; jj < 600; jj++){ 93 if (tint<(tstar-siglimc)) {break;} 94 pd = pd + exp(sigfac*(pow((tint-tstar),2)))*tstepc; 95 tint = tint-tstepc; 96 } 97 pds[it] = pd*snormfac; // gaussian integral lookup table for snow fraction 98 } 99 pds[itm+1] = 0; 100 // *******END initialize PDD 101 102 for(i=0;i<elements->Size();i++){ 103 element=(Element*)elements->GetObjectByOffset(i); 104 element->PositiveDegreeDay(pdds,pds,signorm); 105 } 106 /*free ressouces: */ 107 xfree((void**)&pdds); 108 xfree((void**)&pds); 109 21 110 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp ¶
r8608 r12168 27 27 28 28 /*Sum all J from all cpus of the cluster:*/ 29 #ifdef _HAVE_MPI_ 29 30 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 31 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 31 32 J=J_sum; 33 #endif 32 34 33 35 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/Solverx/Solverx.cpp ¶
r12004 r12168 34 34 35 35 /*In serial mode, the Petsc Options database has not been initialized properly: */ 36 #ifdef _SERIAL_37 parameters->FindParam(&analysis_type,AnalysisTypeEnum);38 PetscOptionsFromAnalysis(parameters,analysis_type);39 #endif40 36 41 37 SolverxPetsc(&uf_vector,Kff->matrix,pf->vector,uf0_vector,df_vector,parameters); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/Solverx/SolverxPetsc.cpp ¶
r11684 r12168 43 43 #endif 44 44 45 46 45 /*Display message*/ 47 46 _printf_(VerboseModule()," Solving\n"); … … 52 51 #endif 53 52 54 /*First, check that f-set is not NULL, i.e. model is fully constrained: {{{*/53 /*First, check that f-set is not NULL, i.e. model is fully constrained:*/ 55 54 _assert_(Kff); 56 55 MatGetSize(Kff,&global_m,&global_n); _assert_(global_m==global_m); … … 58 57 *puf=NULL; return; 59 58 } 60 /*}}}*/ 61 /*Initial guess logic here: {{{1*/59 60 /*Initial guess */ 62 61 /*Now, check that we are not giving an initial guess to the solver, if we are running a direct solver: */ 63 62 #if _PETSC_MAJOR_ >= 3 … … 74 73 MatGetLocalSize(Kff,&local_m,&local_n);uf=NewVec(local_n,fromlocalsize); 75 74 } 76 /*}}}*/ 77 /*Process petsc options to see if we are using special types of external solvers : {{{1*/75 76 /*Process petsc options to see if we are using special types of external solvers*/ 78 77 PetscOptionsDetermineSolverType(&solver_type); 79 78 80 /* In serial mode, the matrices have been loaded as MPIAIJ or AIJ matrices.81 We need to convert them if we are going to run the solvers successfully: */82 #ifdef _SERIAL_83 #if _PETSC_MAJOR_ == 284 if (solver_type==MUMPSPACKAGE_LU){85 /*Convert Kff to MATTAIJMUMPS: */86 MatConvert(Kff,MATAIJMUMPS,MAT_REUSE_MATRIX,&Kff);79 /*Check the solver is available*/ 80 if(solver_type==MUMPSPACKAGE_LU || solver_type==MUMPSPACKAGE_CHOL){ 81 #if _PETSC_MAJOR_ >=3 82 #ifndef _HAVE_MUMPS_ 83 _error_("requested MUMPS solver, which was not compiled into ISSM!\n"); 84 #endif 85 #endif 87 86 } 88 if (solver_type==MUMPSPACKAGE_CHOL){89 /*Convert Kff to MATTSBAIJMUMPS: */90 MatConvert(Kff,MATSBAIJMUMPS,MAT_REUSE_MATRIX,&Kff);91 }92 if (solver_type==SPOOLESPACKAGE_LU){93 /*Convert Kff to MATTSBAIJMUMPS: */94 MatConvert(Kff,MATAIJSPOOLES,MAT_REUSE_MATRIX,&Kff);95 }96 if (solver_type==SPOOLESPACKAGE_CHOL){97 /*Convert Kff to MATTSBAIJMUMPS: */98 MatConvert(Kff,MATSBAIJSPOOLES,MAT_REUSE_MATRIX,&Kff);99 }100 if (solver_type==SUPERLUDISTPACKAGE){101 /*Convert Kff to MATTSBAIJMUMPS: */102 MatConvert(Kff,MATSUPERLU_DIST,MAT_REUSE_MATRIX,&Kff);103 }104 if (solver_type==StokesSolverEnum){105 _error_("Petsc 2 does not support multi-physics solvers");106 }107 #endif108 #endif109 /*}}}*/110 /*Check the solver is available: {{{1*/111 if(solver_type==MUMPSPACKAGE_LU || solver_type==MUMPSPACKAGE_CHOL){112 #if _PETSC_MAJOR_ >=3113 #ifndef _HAVE_MUMPS_114 _error_("requested MUMPS solver, which was not compiled into ISSM!\n");115 #endif116 87 117 #endif 118 } 119 /*}}}*/ 120 /*Prepare solver:{{{1*/ 88 /*Prepare solver*/ 121 89 KSPCreate(MPI_COMM_WORLD,&ksp); 122 90 KSPSetOperators(ksp,Kff,Kff,DIFFERENT_NONZERO_PATTERN); 123 91 KSPSetFromOptions(ksp); 124 92 125 #if defined(_SERIAL_) &&_PETSC_MAJOR_==393 #if _PETSC_MAJOR_==3 126 94 /*Specific solver?: */ 127 95 KSPGetPC(ksp,&pc); … … 133 101 #endif 134 102 } 135 #endif136 103 137 #if defined(_PARALLEL_) && _PETSC_MAJOR_==3138 104 /*Stokes: */ 139 105 if (solver_type==StokesSolverEnum){ … … 155 121 #endif 156 122 157 /*}}}*/ 158 /*If there is an initial guess for the solution, use it, except if we are using the MUMPS direct solver, where any initial guess will crash Petsc: {{{1*/ 123 /*If there is an initial guess for the solution, use it 124 * except if we are using the MUMPS direct solver 125 * where any initial guess will crash Petsc*/ 159 126 if (uf0){ 160 if( 127 if((solver_type!=MUMPSPACKAGE_LU) && (solver_type!=MUMPSPACKAGE_CHOL) && (solver_type!=SPOOLESPACKAGE_LU) && (solver_type!=SPOOLESPACKAGE_CHOL) && (solver_type!=SUPERLUDISTPACKAGE)){ 161 128 KSPSetInitialGuessNonzero(ksp,PETSC_TRUE); 162 129 } 163 130 } 164 /*}}}*/165 166 if(VerboseSolver())KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);167 131 168 132 /*Solve: */ 133 if(VerboseSolver())KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD); 169 134 KSPSolve(ksp,pf,uf); 170 135 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp ¶
r8607 r12168 27 27 28 28 /*Sum all J from all cpus of the cluster:*/ 29 #ifdef _HAVE_MPI_ 29 30 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 31 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 31 32 J=J_sum; 33 #endif 32 34 33 35 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/SurfaceAreax/SurfaceAreax.cpp ¶
r5414 r12168 28 28 29 29 /*Sum all J from all cpus of the cluster:*/ 30 MPI_Reduce (&S,&S_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 #ifdef _HAVE_MPI_ 31 MPI_Reduce (&S,&S_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 31 32 MPI_Bcast(&S_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 32 33 S=S_sum; 34 #endif 33 35 34 36 /*add surface area to element inputs:*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp ¶
r8607 r12168 31 31 32 32 /*Sum all J from all cpus of the cluster:*/ 33 #ifdef _HAVE_MPI_ 33 34 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 34 35 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 35 36 J=J_sum; 37 #endif 36 38 37 39 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp ¶
r8607 r12168 27 27 28 28 /*Sum all J from all cpus of the cluster:*/ 29 #ifdef _HAVE_MPI_ 29 30 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 31 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 31 32 J=J_sum; 33 #endif 32 34 33 35 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp ¶
r8607 r12168 27 27 28 28 /*Sum all J from all cpus of the cluster:*/ 29 #ifdef _HAVE_MPI_ 29 30 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 31 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 31 32 J=J_sum; 33 #endif 32 34 33 35 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp ¶
r8607 r12168 27 27 28 28 /*Sum all J from all cpus of the cluster:*/ 29 #ifdef _HAVE_MPI_ 29 30 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 31 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 31 32 J=J_sum; 33 #endif 32 34 33 35 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAbsGradientx/ThicknessAbsGradientx.cpp ¶
r8608 r12168 27 27 28 28 /*Sum all J from all cpus of the cluster:*/ 29 #ifdef _HAVE_MPI_ 29 30 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 31 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 31 32 J=J_sum; 33 #endif 32 34 33 35 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp ¶
r8607 r12168 27 27 28 28 /*Sum all J from all cpus of the cluster:*/ 29 #ifdef _HAVE_MPI_ 29 30 MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD ); 30 31 MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 31 32 J=J_sum; 33 #endif 32 34 33 35 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/TimeAdaptx/TimeAdaptx.cpp ¶
r6130 r12168 31 31 } 32 32 33 #ifdef _PARALLEL_34 33 /*Figure out minimum across the cluster: */ 34 #ifdef _HAVE_MPI_ 35 35 MPI_Reduce (&min_dt,&node_min_dt,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD ); 36 36 MPI_Bcast(&node_min_dt,1,MPI_DOUBLE,0,MPI_COMM_WORLD); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/TriMeshx/TriMeshx.cpp ¶
r11944 r12168 10 10 #include "../../toolkits/toolkits.h" 11 11 #include "../../EnumDefinitions/EnumDefinitions.h" 12 /*ANSI_DECLARATORS needed to call triangle library: */ 13 #ifndef ANSI_DECLARATORS 14 #define ANSI_DECLARATORS 15 #include "triangle.h" 16 #undef ANSI_DECLARATORS 17 #else 18 #include "triangle.h" 19 #endif 12 20 /*}}}*/ 13 21 14 15 void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,double area,bool order){ 22 void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){ 16 23 17 24 /*indexing: */ … … 28 35 29 36 /*intermediary: */ 30 int counter, backcounter;37 int counter,counter2,backcounter; 31 38 Contour* contour=NULL; 32 39 … … 39 46 for (i=0;i<domain->Size();i++){ 40 47 contour=(Contour*)domain->GetObjectByOffset(i); 48 in.numberofpoints+=contour->nods-1; 49 } 50 for (i=0;i<rifts->Size();i++){ 51 contour=(Contour*)rifts->GetObjectByOffset(i); 41 52 in.numberofpoints+=contour->nods; 42 53 } 54 43 55 /*number of point attributes: */ 44 56 in.numberofpointattributes=1; … … 50 62 for (i=0;i<domain->Size();i++){ 51 63 contour=(Contour*)domain->GetObjectByOffset(i); 64 for (j=0;j<contour->nods-1;j++){ 65 in.pointlist[2*counter+0]=contour->x[j]; 66 in.pointlist[2*counter+1]=contour->y[j]; 67 counter++; 68 } 69 } 70 for (i=0;i<rifts->Size();i++){ 71 contour=(Contour*)rifts->GetObjectByOffset(i); 52 72 for (j=0;j<contour->nods;j++){ 53 73 in.pointlist[2*counter+0]=contour->x[j]; … … 58 78 59 79 /*fill in the point attribute list: */ 60 in.pointattributelist = (REAL *) xmalloc(in.numberofpoints * in.numberofpointattributes *sizeof(REAL));80 in.pointattributelist = (REAL*)xmalloc(in.numberofpoints*in.numberofpointattributes*sizeof(REAL)); 61 81 for (i=0;i<in.numberofpoints;i++) in.pointattributelist[i] = 0.0; 62 82 … … 65 85 for(i=0;i<in.numberofpoints;i++) in.pointmarkerlist[i] = 0; 66 86 67 68 87 /*Build segments. First figure out number of segments: holes and closed outlines have as many segments as vertices: */ 69 88 in.numberofsegments=0; 70 89 for (i=0;i<domain->Size();i++){ 71 90 contour=(Contour*)domain->GetObjectByOffset(i); 72 in.numberofsegments+=contour->nods; 91 in.numberofsegments+=contour->nods-1; 92 } 93 for(i=0;i<rifts->Size();i++){ 94 contour=(Contour*)rifts->GetObjectByOffset(i); 95 /*for rifts, we have one less segment as we have vertices*/ 96 in.numberofsegments+=contour->nods-1; 73 97 } 74 98 … … 79 103 for (i=0;i<domain->Size();i++){ 80 104 contour=(Contour*)domain->GetObjectByOffset(i); 81 for (j=0;j<contour->nods- 1;j++){105 for (j=0;j<contour->nods-2;j++){ 82 106 in.segmentlist[2*counter+0]=counter; 83 107 in.segmentlist[2*counter+1]=counter+1; … … 92 116 backcounter=counter; 93 117 } 94 118 counter2=counter; 119 for (i=0;i<rifts->Size();i++){ 120 contour=(Contour*)rifts->GetObjectByOffset(i); 121 for (j=0;j<(contour->nods-1);j++){ 122 in.segmentlist[2*counter2+0]=counter; 123 in.segmentlist[2*counter2+1]=counter+1; 124 in.segmentmarkerlist[counter2]=2+i; 125 counter2++; 126 counter++; 127 } 128 counter++; 129 } 95 130 96 131 /*Build regions: */ … … 103 138 for (i=0;i<domain->Size()-1;i++){ 104 139 contour=(Contour*)domain->GetObjectByOffset(i+1); 105 GridInsideHole(&in.holelist[2*i+0],&in.holelist[2*i+1],contour->nods ,contour->x,contour->y);140 GridInsideHole(&in.holelist[2*i+0],&in.holelist[2*i+1],contour->nods-1,contour->x,contour->y); 106 141 } 107 142 } 108 143 109 144 /* Make necessary initializations so that Triangle can return a triangulation in `out': */ 110 111 out.pointlist = (REAL *) NULL; 112 out.pointattributelist = (REAL *) NULL; 113 out.pointmarkerlist = (int *) NULL; 114 out.trianglelist = (int *) NULL; 115 out.triangleattributelist = (REAL *) NULL; 116 out.neighborlist = (int *) NULL; 117 out.segmentlist = (int *) NULL; 118 out.segmentmarkerlist = (int *) NULL; 119 out.edgelist = (int *) NULL; 120 out.edgemarkerlist = (int *) NULL; 145 out.pointlist = (REAL*)NULL; 146 out.pointattributelist = (REAL*)NULL; 147 out.pointmarkerlist = (int *)NULL; 148 out.trianglelist = (int *)NULL; 149 out.triangleattributelist = (REAL*)NULL; 150 out.neighborlist = (int *)NULL; 151 out.segmentlist = (int *)NULL; 152 out.segmentmarkerlist = (int *)NULL; 153 out.edgelist = (int *)NULL; 154 out.edgemarkerlist = (int *)NULL; 121 155 122 156 /* Triangulate the points:. Switches are chosen to read and write a */ … … 125 159 /* produce an edge list (e), a Voronoi diagram (v), and a triangle */ 126 160 /* neighbor list (n). */ 127 128 161 sprintf(options,"%s%lf","pQzDq30ia",area); /*replace V by Q to quiet down the logging*/ 129 130 131 162 triangulate(options, &in, &out, NULL); 132 133 163 /*report(&out, 0, 1, 1, 1, 1, 0);*/ 134 135 164 136 165 /*Allocate index, x and y: */ … … 141 170 segmentmarkerlist=(double*)xmalloc(out.numberofsegments*sizeof(double)); 142 171 143 for (i = 0; i 172 for (i = 0; i< out.numberoftriangles; i++) { 144 173 for (j = 0; j < out.numberofcorners; j++) { 145 *(index+3*i+j)=(double)out.trianglelist[i * out.numberofcorners + j]+1; 146 } 147 } 148 for (i = 0; i < out.numberofpoints; i++) { 149 x[i]=out.pointlist[i * 2 + 0]; 150 y[i]=out.pointlist[i * 2 + 1]; 151 } 152 153 for (i = 0; i < out.numberofsegments; i++) { 174 index[3*i+j]=(double)out.trianglelist[i*out.numberofcorners+j]+1; 175 } 176 } 177 for (i = 0; i< out.numberofpoints; i++){ 178 x[i]=out.pointlist[i*2+0]; 179 y[i]=out.pointlist[i*2+1]; 180 } 181 for (i = 0; i<out.numberofsegments;i++){ 154 182 segments[3*i+0]=(double)out.segmentlist[i*2+0]+1; 155 183 segments[3*i+1]=(double)out.segmentlist[i*2+1]+1; … … 157 185 } 158 186 159 160 161 187 /*Associate elements with segments: */ 162 188 AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles); 163 189 164 190 /*Order segments so that their normals point outside the domain: */ 165 if(order){ 166 OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles); 167 } 168 191 OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles); 169 192 170 193 /*Output : */ … … 179 202 *py=new Vector(y,out.numberofpoints); 180 203 *psegmentmarkerlist=new Vector(segmentmarkerlist,out.numberofsegments); 181 182 204 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/TriMeshx/TriMeshx.h ¶
r11880 r12168 6 6 #define _TRIMESHX_H_ 7 7 8 9 10 /*ANSI_DECLARATORS needed to call triangle library: */11 #ifndef ANSI_DECLARATORS12 #define ANSI_DECLARATORS13 #include "triangle.h"14 #undef ANSI_DECLARATORS15 #else16 #include "triangle.h"17 #endif18 19 8 #include "string.h" 20 21 9 #include "../../Container/Container.h" 22 10 #include "../../objects/objects.h" 23 11 24 12 /* local prototypes: */ 25 void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain, double area,bool order);13 void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area); 26 14 27 15 #endif /* _TRIMESHX_H */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/modules/modules.h ¶
r12004 r12168 62 62 #include "./Exp2Kmlx/Exp2Kmlx.h" 63 63 #include "./Kml2Expx/Kml2Expx.h" 64 #include "./Krigingx/Krigingx.h" 64 65 #include "./Shp2Kmlx/Shp2Kmlx.h" 65 66 #include "./MassFluxx/MassFluxx.h" … … 111 112 #include "./TimeAdaptx/TimeAdaptx.h" 112 113 #include "./TriaSearchx/TriaSearchx.h" 113 #ifdef _SERIAL_114 114 #include "./TriMeshx/TriMeshx.h" 115 #endif116 115 #include "./ThicknessAbsMisfitx/ThicknessAbsMisfitx.h" 117 116 #include "./ThicknessAbsGradientx/ThicknessAbsGradientx.h" -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Bamg/BamgGeom.cpp ¶
r12004 r12168 19 19 } 20 20 /*}}}*/ 21 /*FUNCTION BamgGeom::BamgGeom(mxArray* matlab_struct){{{1*/22 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)23 BamgGeom::BamgGeom(mxArray* matlab_struct){24 25 FetchData(&this->Vertices, &this->VerticesSize[0], &this->VerticesSize[1], mxGetAssignedField(matlab_struct,0,"Vertices"));26 FetchData(&this->Edges, &this->EdgesSize[0], &this->EdgesSize[1], mxGetAssignedField(matlab_struct,0,"Edges"));27 this->TangentAtEdgesSize[0]=0, this->TangentAtEdgesSize[1]=0; this->TangentAtEdges=NULL;28 FetchData(&this->Corners, &this->CornersSize[0], &this->CornersSize[1], mxGetAssignedField(matlab_struct,0,"Corners"));29 FetchData(&this->RequiredVertices,&this->RequiredVerticesSize[0],&this->RequiredVerticesSize[1],mxGetAssignedField(matlab_struct,0,"RequiredVertices"));30 FetchData(&this->RequiredEdges, &this->RequiredEdgesSize[0], &this->RequiredEdgesSize[1], mxGetAssignedField(matlab_struct,0,"RequiredEdges"));31 FetchData(&this->CrackedEdges, &this->CrackedEdgesSize[0], &this->CrackedEdgesSize[1], mxGetAssignedField(matlab_struct,0,"CrackedEdges"));32 FetchData(&this->SubDomains, &this->SubDomainsSize[0], &this->SubDomainsSize[1], mxGetAssignedField(matlab_struct,0,"SubDomains"));33 34 }35 #endif36 /*}}}*/37 21 /*FUNCTION BamgGeom::~BamgGeom(){{{1*/ 38 22 BamgGeom::~BamgGeom(){ … … 49 33 } 50 34 /*}}}*/ 51 52 /*Methods*/53 /*FUNCTION BamgGeom::SetMatlabStructureFields{{{1*/54 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)55 void BamgGeom::SetMatlabStructureFields(mxArray** matlab_struct){56 57 /*Intermediary*/58 int i;59 mxArray* output=NULL;60 const int numfields=7;61 const char* fnames[numfields];62 mwSize ndim=2;63 mwSize dimensions[2]={1,1};64 65 /*Initialize field names*/66 i=0;67 fnames[i++] = "Vertices";68 fnames[i++] = "Edges";69 fnames[i++] = "TangentAtEdges";70 fnames[i++] = "RequiredVertices";71 fnames[i++] = "RequiredEdges";72 fnames[i++] = "CrackedEdges";73 fnames[i++] = "SubDomains";74 _assert_(i==numfields);75 76 /*Initialize Matlab structure*/77 output=mxCreateStructArray(ndim,dimensions,numfields,fnames);78 79 /*set each matlab each field*/80 i=0;81 i++; SetMatlabStructureField(output,"Vertices", this->VerticesSize[0], this->VerticesSize[1], this->Vertices);82 i++; SetMatlabStructureField(output,"Edges", this->EdgesSize[0], this->EdgesSize[1], this->Edges);83 i++; SetMatlabStructureField(output,"TangentAtEdges", this->TangentAtEdgesSize[0], this->TangentAtEdgesSize[1], this->TangentAtEdges);84 i++; SetMatlabStructureField(output,"RequiredVertices",this->RequiredVerticesSize[0],this->RequiredVerticesSize[1],this->RequiredVertices);85 i++; SetMatlabStructureField(output,"RequiredEdges", this->RequiredEdgesSize[0], this->RequiredEdgesSize[1], this->RequiredEdges);86 i++; SetMatlabStructureField(output,"CrackedEdges", this->CrackedEdgesSize[0], this->CrackedEdgesSize[1], this->CrackedEdges);87 i++; SetMatlabStructureField(output,"SubDomains", this->SubDomainsSize[0], this->SubDomainsSize[1], this->SubDomains);88 _assert_(i==numfields);89 90 /*Assign output*/91 *matlab_struct=output;92 93 }94 #endif95 /*}}}*/96 /*FUNCTION BamgGeom::SetMatlabStructureField{{{1*/97 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)98 void BamgGeom::SetMatlabStructureField(mxArray* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){99 100 /*Intermediary*/101 int i1,i2;102 mxArray* pfield=NULL;103 mxArray* pfield2=NULL;104 105 /*Copy field*/106 double* fieldcopy=NULL;107 if (fieldrows*fieldcols){108 fieldcopy=(double*)xmalloc(fieldrows*fieldcols*sizeof(double));109 for(i1=0;i1<fieldrows;i1++){110 for(i2=0;i2<fieldcols;i2++){111 fieldcopy[fieldcols*i1+i2]=fieldpointer[fieldcols*i1+i2];112 }113 }114 }115 116 /*Set matlab field*/117 pfield=mxCreateDoubleMatrix(0,0,mxREAL);118 mxSetM(pfield,fieldcols);119 mxSetN(pfield,fieldrows);120 mxSetPr(pfield,fieldcopy);121 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose122 mxSetField(matlab_struct,0,fieldname,pfield2);123 }124 #endif125 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Bamg/BamgGeom.h ¶
r12004 r12168 4 4 #ifndef _BAMGGEOM_H_ 5 5 #define _BAMGGEOM_H_ 6 7 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)8 #include <mex.h>9 #endif10 6 11 7 class BamgGeom{ … … 30 26 31 27 BamgGeom(); 32 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)33 BamgGeom(mxArray* matlab_struct);34 #endif35 28 ~BamgGeom(); 36 37 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)38 void SetMatlabStructureFields(mxArray** matlab_struct);39 void SetMatlabStructureField(mxArray* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);40 #endif41 29 }; 42 30 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Bamg/BamgMesh.cpp ¶
r12004 r12168 18 18 this->CrackedEdgesSize[0]=0, this->CrackedEdgesSize[1]=0; this->CrackedEdges=NULL; 19 19 20 this->VerticesOnGeomVertexSize[0]=0, this->VerticesOnGeomVertexSize[1]=0;this->VerticesOnGeomVertex=NULL;21 this->VerticesOnGeomEdgeSize[0]=0, this->VerticesOnGeomEdgeSize[1]=0;this->VerticesOnGeomEdge=NULL;22 this->EdgesOnGeomEdgeSize[0]=0, this->EdgesOnGeomEdgeSize[1]=0;this->EdgesOnGeomEdge=NULL;20 this->VerticesOnGeomVertexSize[0]=0, this->VerticesOnGeomVertexSize[1]=0; this->VerticesOnGeomVertex=NULL; 21 this->VerticesOnGeomEdgeSize[0]=0, this->VerticesOnGeomEdgeSize[1]=0; this->VerticesOnGeomEdge=NULL; 22 this->EdgesOnGeomEdgeSize[0]=0, this->EdgesOnGeomEdgeSize[1]=0; this->EdgesOnGeomEdge=NULL; 23 23 24 24 this->IssmEdgesSize[0]=0, this->IssmEdgesSize[1]=0; this->IssmEdges=NULL; … … 28 28 this->NodalConnectivitySize[0]=0, this->NodalConnectivitySize[1]=0; this->NodalConnectivity=NULL; 29 29 this->NodalElementConnectivitySize[0]=0, this->NodalElementConnectivitySize[1]=0; this->NodalElementConnectivity=NULL; 30 31 32 30 } 33 /*}}}*/34 /*FUNCTION BamgMesh::BamgMesh(mxArray* matlab_struct){{{1*/35 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)36 BamgMesh::BamgMesh(mxArray* matlab_struct){37 38 int lines,cols;39 40 FetchData(&this->Vertices, &this->VerticesSize[0], &this->VerticesSize[1], mxGetAssignedField(matlab_struct,0,"Vertices"));41 FetchData(&this->Edges, &this->EdgesSize[0], &this->EdgesSize[1], mxGetAssignedField(matlab_struct,0,"Edges"));42 FetchData(&this->Triangles, &this->TrianglesSize[0], &this->TrianglesSize[1], mxGetAssignedField(matlab_struct,0,"Triangles"));43 this->QuadrilateralsSize[0]=0, this->QuadrilateralsSize[1]=0; this->Quadrilaterals=NULL;44 45 this->SubDomainsSize[0]=0, this->SubDomainsSize[1]=0; this->SubDomains=NULL;46 this->SubDomainsFromGeomSize[0]=0, this->SubDomainsFromGeomSize[1]=0; this->SubDomainsFromGeom=NULL;47 this->CrackedVerticesSize[0]=0, this->CrackedVerticesSize[1]=0; this->CrackedVertices=NULL;48 FetchData(&this->CrackedEdges, &this->CrackedEdgesSize[0], &this->CrackedEdgesSize[1], mxGetAssignedField(matlab_struct,0,"CrackedEdges"));49 50 FetchData(&this->VerticesOnGeomEdge, &this->VerticesOnGeomEdgeSize[0], &this->VerticesOnGeomEdgeSize[1], mxGetAssignedField(matlab_struct,0,"VerticesOnGeomEdge"));51 FetchData(&this->VerticesOnGeomVertex,&this->VerticesOnGeomVertexSize[0],&this->VerticesOnGeomVertexSize[1],mxGetAssignedField(matlab_struct,0,"VerticesOnGeomVertex"));52 FetchData(&this->EdgesOnGeomEdge, &this->EdgesOnGeomEdgeSize[0], &this->EdgesOnGeomEdgeSize[1], mxGetAssignedField(matlab_struct,0,"EdgesOnGeomEdge"));53 54 this->IssmEdgesSize[0]=0, this->IssmEdgesSize[1]=0; this->IssmEdges=NULL;55 FetchData(&this->IssmSegments, &this->IssmSegmentsSize[0], &this->IssmSegmentsSize[1], mxGetAssignedField(matlab_struct,0,"IssmSegments"));56 57 this->ElementConnectivitySize[0]=0, this->ElementConnectivitySize[1]=0; this->ElementConnectivity=NULL;58 this->NodalConnectivitySize[0]=0, this->NodalConnectivitySize[1]=0; this->NodalConnectivity=NULL;59 this->NodalElementConnectivitySize[0]=0, this->NodalElementConnectivitySize[1]=0; this->NodalElementConnectivity=NULL;60 61 }62 #endif63 31 /*}}}*/ 64 32 /*FUNCTION BamgMesh::~BamgMesh(){{{1*/ … … 89 57 } 90 58 /*}}}*/ 91 92 /*Methods*/93 /*FUNCTION BamgMesh::SetMatlabStructureFields{{{1*/94 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)95 void BamgMesh::SetMatlabStructureFields(mxArray** matlab_struct){96 97 /*Intermediary*/98 int i;99 mxArray* output=NULL;100 const int numfields=16;101 const char* fnames[numfields];102 mwSize ndim=2;103 mwSize dimensions[2]={1,1};104 105 /*Initialize field names*/106 i=0;107 fnames[i++] = "Triangles";108 fnames[i++] = "Vertices";109 fnames[i++] = "Edges";110 fnames[i++] = "IssmSegments";111 fnames[i++] = "IssmEdges";112 fnames[i++] = "Quadrilaterals";113 fnames[i++] = "VerticesOnGeomVertex";114 fnames[i++] = "VerticesOnGeomEdge";115 fnames[i++] = "EdgesOnGeomEdge";116 fnames[i++] = "SubDomains";117 fnames[i++] = "SubDomainsFromGeom";118 fnames[i++] = "ElementConnectivity";119 fnames[i++] = "NodalConnectivity";120 fnames[i++] = "NodalElementConnectivity";121 fnames[i++] = "CrackedVertices";122 fnames[i++] = "CrackedEdges";123 _assert_(i==numfields);124 125 /*Initialize Matlab structure*/126 output=mxCreateStructArray(ndim,dimensions,numfields,fnames);127 128 /*set each matlab each field*/129 i=0;130 i++; SetMatlabStructureField(output,"Triangles", this->TrianglesSize[0], this->TrianglesSize[1], this->Triangles);131 i++; SetMatlabStructureField(output,"Vertices", this->VerticesSize[0], this->VerticesSize[1], this->Vertices);132 i++; SetMatlabStructureField(output,"Edges", this->EdgesSize[0], this->EdgesSize[1], this->Edges);133 i++; SetMatlabStructureField(output,"IssmSegments", this->IssmSegmentsSize[0], this->IssmSegmentsSize[1], this->IssmSegments);134 i++; SetMatlabStructureField(output,"IssmEdges", this->IssmEdgesSize[0], this->IssmEdgesSize[1], this->IssmEdges);135 i++; SetMatlabStructureField(output,"Quadrilaterals", this->QuadrilateralsSize[0], this->QuadrilateralsSize[1], this->Quadrilaterals);136 i++; SetMatlabStructureField(output,"VerticesOnGeomVertex",this->VerticesOnGeomVertexSize[0],this->VerticesOnGeomVertexSize[1], this->VerticesOnGeomVertex);137 i++; SetMatlabStructureField(output,"VerticesOnGeomEdge", this->VerticesOnGeomEdgeSize[0], this->VerticesOnGeomEdgeSize[1], this->VerticesOnGeomEdge);138 i++; SetMatlabStructureField(output,"EdgesOnGeomEdge", this->EdgesOnGeomEdgeSize[0], this->EdgesOnGeomEdgeSize[1], this->EdgesOnGeomEdge);139 i++; SetMatlabStructureField(output,"SubDomains", this->SubDomainsSize[0], this->SubDomainsSize[1], this->SubDomains);140 i++; SetMatlabStructureField(output,"SubDomainsFromGeom", this->SubDomainsFromGeomSize[0], this->SubDomainsFromGeomSize[1], this->SubDomainsFromGeom);141 i++; SetMatlabStructureField(output,"ElementConnectivity", this->ElementConnectivitySize[0], this->ElementConnectivitySize[1], this->ElementConnectivity);142 i++; SetMatlabStructureField(output,"NodalConnectivity", this->NodalConnectivitySize[0], this->NodalConnectivitySize[1], this->NodalConnectivity);143 i++; SetMatlabStructureField(output,"NodalElementConnectivity", this->NodalElementConnectivitySize[0], this->NodalElementConnectivitySize[1], this->NodalElementConnectivity);144 i++; SetMatlabStructureField(output,"CrackedVertices", this->CrackedVerticesSize[0], this->CrackedVerticesSize[1], this->CrackedVertices);145 i++; SetMatlabStructureField(output,"CrackedEdges", this->CrackedEdgesSize[0], this->CrackedEdgesSize[1], this->CrackedEdges);146 _assert_(i==numfields);147 148 /*Assign output*/149 *matlab_struct=output;150 151 }152 #endif153 /*}}}*/154 /*FUNCTION BamgMesh::SetMatlabStructureField{{{1*/155 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)156 void BamgMesh::SetMatlabStructureField(mxArray* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){157 158 /*Intermediary*/159 int i1,i2;160 mxArray* pfield=NULL;161 mxArray* pfield2=NULL;162 163 /*Copy field*/164 double* fieldcopy=NULL;165 if (fieldrows*fieldcols){166 fieldcopy=(double*)xmalloc(fieldrows*fieldcols*sizeof(double));167 for(i1=0;i1<fieldrows;i1++){168 for(i2=0;i2<fieldcols;i2++){169 fieldcopy[fieldcols*i1+i2]=fieldpointer[fieldcols*i1+i2];170 }171 }172 }173 174 /*Set matlab field*/175 pfield=mxCreateDoubleMatrix(0,0,mxREAL);176 mxSetM(pfield,fieldcols);177 mxSetN(pfield,fieldrows);178 mxSetPr(pfield,fieldcopy);179 mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose180 mxSetField(matlab_struct,0,fieldname,pfield2);181 }182 #endif183 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Bamg/BamgMesh.h ¶
r12004 r12168 4 4 #ifndef _BAMGMESH_H_ 5 5 #define _BAMGMESH_H_ 6 7 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)8 #include <mex.h>9 #endif10 6 11 7 class BamgMesh{ … … 51 47 52 48 BamgMesh(); 53 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)54 BamgMesh(mxArray* matlab_struct);55 #endif56 49 ~BamgMesh(); 57 58 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)59 void SetMatlabStructureFields(mxArray** matlab_struct);60 void SetMatlabStructureField(mxArray* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);61 #endif62 63 50 }; 64 51 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Bamg/BamgOpts.cpp ¶
r12004 r12168 40 40 41 41 } 42 /*}}}*/43 /*FUNCTION BamgOpts::BamgOpts(mxArray* matlab_struct){{{1*/44 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)45 BamgOpts::BamgOpts(mxArray* matlab_struct){46 47 FetchData(&this->anisomax,mxGetField(matlab_struct,0,"anisomax"));48 FetchData(&this->cutoff,mxGetField(matlab_struct,0,"cutoff"));49 FetchData(&this->coeff,mxGetField(matlab_struct,0,"coeff"));50 FetchData(&this->errg,mxGetField(matlab_struct,0,"errg"));51 FetchData(&this->gradation,mxGetField(matlab_struct,0,"gradation"));52 FetchData(&this->Hessiantype,mxGetField(matlab_struct,0,"Hessiantype"));53 FetchData(&this->MaxCornerAngle,mxGetField(matlab_struct,0,"MaxCornerAngle"));54 FetchData(&this->maxnbv,mxGetField(matlab_struct,0,"maxnbv"));55 FetchData(&this->maxsubdiv,mxGetField(matlab_struct,0,"maxsubdiv"));56 FetchData(&this->Metrictype,mxGetField(matlab_struct,0,"Metrictype"));57 FetchData(&this->nbjacobi,mxGetField(matlab_struct,0,"nbjacobi"));58 FetchData(&this->nbsmooth,mxGetField(matlab_struct,0,"nbsmooth"));59 FetchData(&this->omega,mxGetField(matlab_struct,0,"omega"));60 FetchData(&this->power,mxGetField(matlab_struct,0,"power"));61 FetchData(&this->verbose,mxGetField(matlab_struct,0,"verbose"));62 63 FetchData(&this->Crack,mxGetField(matlab_struct,0,"Crack"));64 FetchData(&this->geometricalmetric,mxGetField(matlab_struct,0,"geometricalmetric"));65 FetchData(&this->KeepVertices,mxGetField(matlab_struct,0,"KeepVertices"));66 FetchData(&this->splitcorners,mxGetField(matlab_struct,0,"splitcorners"));67 68 FetchData(&this->hmin,mxGetField(matlab_struct,0,"hmin"));69 FetchData(&this->hmax,mxGetField(matlab_struct,0,"hmax"));70 FetchData(&this->hminVertices,&this->hminVerticesSize[0],&this->hminVerticesSize[1],mxGetField(matlab_struct,0,"hminVertices"));71 FetchData(&this->hmaxVertices,&this->hmaxVerticesSize[0],&this->hmaxVerticesSize[1],mxGetField(matlab_struct,0,"hmaxVertices"));72 FetchData(&this->hVertices,&this->hVerticesSize[0],&this->hVerticesSize[1],mxGetField(matlab_struct,0,"hVertices"));73 FetchData(&this->metric,&this->metricSize[0],&this->metricSize[1],mxGetField(matlab_struct,0,"metric"));74 FetchData(&this->field,&this->fieldSize[0],&this->fieldSize[1],mxGetField(matlab_struct,0,"field"));75 FetchData(&this->err,&this->errSize[0],&this->errSize[1],mxGetField(matlab_struct,0,"err"));76 77 /*Additional checks*/78 this->Check();79 80 }81 #endif82 42 /*}}}*/ 83 43 /*FUNCTION BamgOpts::~BamgOpts() {{{1*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Bamg/BamgOpts.h ¶
r12004 r12168 5 5 #ifndef _BAMGOPTS_H_ 6 6 #define _BAMGOPTS_H_ 7 8 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)9 #include <mex.h>10 #endif11 7 12 8 class BamgOpts{ … … 54 50 55 51 BamgOpts(); 56 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)57 BamgOpts(mxArray* matlab_struct);58 #endif59 52 ~BamgOpts(); 60 53 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Bamg/Metric.h ¶
r9690 r12168 5 5 #include "../../shared/Bamg/shared.h" 6 6 #include "R2.h" 7 #include <math.h> 7 8 8 9 namespace bamg { -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Bamg/QuadTree.h ¶
r9883 r12168 33 33 int Id(){_error_("not implemented yet");}; 34 34 int MyRank(){_error_("not implemented yet");}; 35 #ifdef _SERIAL_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 #endif40 35 int ObjectEnum(){_error_("not implemented yet");}; 41 36 Object* copy(){_error_("not implemented yet");}; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Constraints/SpcDynamic.cpp ¶
r9883 r12168 72 72 } 73 73 /*}}}1*/ 74 #ifdef _SERIAL_75 /*FUNCTION SpcDynamic::Marshall {{{1*/76 void SpcDynamic::Marshall(char** pmarshalled_dataset){77 78 char* marshalled_dataset=NULL;79 int enum_type=0;80 81 /*recover marshalled_dataset: */82 marshalled_dataset=*pmarshalled_dataset;83 84 /*get enum type of SpcDynamic: */85 enum_type=SpcDynamicEnum;86 87 /*marshall enum: */88 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);89 90 /*marshall SpcDynamic data: */91 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);92 memcpy(marshalled_dataset,&nodeid,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);93 memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);94 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);95 memcpy(marshalled_dataset,&isset,sizeof(isset));marshalled_dataset+=sizeof(isset);96 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);97 98 *pmarshalled_dataset=marshalled_dataset;99 return;100 }101 /*}}}1*/102 /*FUNCTION SpcDynamic::MarshallSize {{{1*/103 int SpcDynamic::MarshallSize(){104 105 return sizeof(sid)106 +sizeof(nodeid)107 +sizeof(dof)108 +sizeof(value)109 +sizeof(isset)110 +sizeof(analysis_type)111 +sizeof(int); //sizeof(int) for enum type112 }113 /*}}}1*/114 /*FUNCTION SpcDynamic::Demarshall {{{1*/115 void SpcDynamic::Demarshall(char** pmarshalled_dataset){116 117 char* marshalled_dataset=NULL;118 119 /*recover marshalled_dataset: */120 marshalled_dataset=*pmarshalled_dataset;121 122 /*this time, no need to get enum type, the pointer directly points to the beginning of the123 *object data (thanks to DataSet::Demarshall):*/124 125 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);126 memcpy(&nodeid,marshalled_dataset,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);127 memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);128 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);129 memcpy(&isset,marshalled_dataset,sizeof(isset));marshalled_dataset+=sizeof(isset);130 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);131 132 /*return: */133 *pmarshalled_dataset=marshalled_dataset;134 return;135 }136 /*}}}1*/137 #endif138 74 /*FUNCTION SpcDynamic::ObjectEnum{{{1*/ 139 75 int SpcDynamic::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Constraints/SpcDynamic.h ¶
r9883 r12168 34 34 int Id(); 35 35 int MyRank(); 36 #ifdef _SERIAL_37 void Marshall(char** pmarshalled_dataset);38 int MarshallSize();39 void Demarshall(char** pmarshalled_dataset);40 #endif41 36 int ObjectEnum(); 42 37 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Constraints/SpcStatic.cpp ¶
r9883 r12168 75 75 } 76 76 /*}}}1*/ 77 #ifdef _SERIAL_78 /*FUNCTION SpcStatic::Marshall {{{1*/79 void SpcStatic::Marshall(char** pmarshalled_dataset){80 81 char* marshalled_dataset=NULL;82 int enum_type=0;83 84 /*recover marshalled_dataset: */85 marshalled_dataset=*pmarshalled_dataset;86 87 /*get enum type of SpcStatic: */88 enum_type=SpcStaticEnum;89 90 /*marshall enum: */91 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);92 93 /*marshall SpcStatic data: */94 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);95 memcpy(marshalled_dataset,&nodeid,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);96 memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);97 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);98 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);99 100 *pmarshalled_dataset=marshalled_dataset;101 return;102 }103 /*}}}1*/104 /*FUNCTION SpcStatic::MarshallSize {{{1*/105 int SpcStatic::MarshallSize(){106 107 return sizeof(sid)108 +sizeof(nodeid)109 +sizeof(dof)110 +sizeof(value)111 +sizeof(analysis_type)112 +sizeof(int); //sizeof(int) for enum type113 }114 /*}}}1*/115 /*FUNCTION SpcStatic::Demarshall {{{1*/116 void SpcStatic::Demarshall(char** pmarshalled_dataset){117 118 char* marshalled_dataset=NULL;119 120 /*recover marshalled_dataset: */121 marshalled_dataset=*pmarshalled_dataset;122 123 /*this time, no need to get enum type, the pointer directly points to the beginning of the124 *object data (thanks to DataSet::Demarshall):*/125 126 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);127 memcpy(&nodeid,marshalled_dataset,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);128 memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);129 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);130 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);131 132 /*return: */133 *pmarshalled_dataset=marshalled_dataset;134 return;135 }136 /*}}}1*/137 #endif138 77 /*FUNCTION SpcStatic::ObjectEnum{{{1*/ 139 78 int SpcStatic::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Constraints/SpcStatic.h ¶
r9883 r12168 33 33 int Id(); 34 34 int MyRank(); 35 #ifdef _SERIAL_36 void Marshall(char** pmarshalled_dataset);37 int MarshallSize();38 void Demarshall(char** pmarshalled_dataset);39 #endif40 35 int ObjectEnum(); 41 36 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Constraints/SpcTransient.cpp ¶
r9883 r12168 87 87 } 88 88 /*}}}1*/ 89 #ifdef _SERIAL_90 /*FUNCTION SpcTransient::Marshall {{{1*/91 void SpcTransient::Marshall(char** pmarshalled_dataset){92 93 char* marshalled_dataset=NULL;94 int enum_type=0;95 96 /*recover marshalled_dataset: */97 marshalled_dataset=*pmarshalled_dataset;98 99 /*get enum type of SpcTransient: */100 enum_type=SpcTransientEnum;101 102 /*marshall enum: */103 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);104 105 /*marshall SpcTransient data: */106 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);107 memcpy(marshalled_dataset,&nodeid,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);108 memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);109 memcpy(marshalled_dataset,&nsteps,sizeof(nsteps));marshalled_dataset+=sizeof(nsteps);110 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);111 if(nsteps){112 memcpy(marshalled_dataset,values,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);113 memcpy(marshalled_dataset,times,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);114 }115 116 *pmarshalled_dataset=marshalled_dataset;117 return;118 }119 /*}}}1*/120 /*FUNCTION SpcTransient::MarshallSize {{{1*/121 int SpcTransient::MarshallSize(){122 123 return sizeof(sid)124 +sizeof(nodeid)125 +sizeof(dof)126 +sizeof(nsteps)127 +nsteps*2*sizeof(double)128 +sizeof(analysis_type)129 +sizeof(int); //sizeof(int) for enum type130 }131 /*}}}1*/132 /*FUNCTION SpcTransient::Demarshall {{{1*/133 void SpcTransient::Demarshall(char** pmarshalled_dataset){134 135 char* marshalled_dataset=NULL;136 137 /*recover marshalled_dataset: */138 marshalled_dataset=*pmarshalled_dataset;139 140 /*this time, no need to get enum type, the pointer directly points to the beginning of the141 *object data (thanks to DataSet::Demarshall):*/142 143 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);144 memcpy(&nodeid,marshalled_dataset,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);145 memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);146 memcpy(&nsteps,marshalled_dataset,sizeof(nsteps));marshalled_dataset+=sizeof(nsteps);147 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);148 if(nsteps){149 values=(double*)xmalloc(nsteps*sizeof(double));150 times=(double*)xmalloc(nsteps*sizeof(double));151 memcpy(values,marshalled_dataset,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);152 memcpy(times,marshalled_dataset,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);153 }154 155 /*return: */156 *pmarshalled_dataset=marshalled_dataset;157 return;158 }159 /*}}}1*/160 #endif161 89 /*FUNCTION SpcTransient::ObjectEnum{{{1*/ 162 90 int SpcTransient::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Constraints/SpcTransient.h ¶
r9883 r12168 35 35 int Id(); 36 36 int MyRank(); 37 #ifdef _SERIAL_38 void Marshall(char** pmarshalled_dataset);39 int MarshallSize();40 void Demarshall(char** pmarshalled_dataset);41 #endif42 37 int ObjectEnum(); 43 38 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Contour.cpp ¶
r12004 r12168 79 79 } 80 80 /*}}}*/ 81 #ifdef _SERIAL_82 /*FUNCTION Contour::Marshall{{{1*/83 void Contour::Marshall(char** pmarshalled_dataset){84 85 char* marshalled_dataset=NULL;86 int enum_type=0;87 char* marshalled_inputs=NULL;88 int marshalled_inputssize;89 90 /*recover marshalled_dataset: */91 marshalled_dataset=*pmarshalled_dataset;92 93 /*get enum type of Contour: */94 enum_type=ContourEnum;95 96 /*marshall enum: */97 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);98 99 /*marshall Contour data: */100 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);101 memcpy(marshalled_dataset,&nods,sizeof(nods));marshalled_dataset+=sizeof(nods);102 memcpy(marshalled_dataset,&closed,sizeof(closed));marshalled_dataset+=sizeof(closed);103 memcpy(marshalled_dataset,x,nods*sizeof(double));marshalled_dataset+=nods*sizeof(double);104 memcpy(marshalled_dataset,y,nods*sizeof(double));marshalled_dataset+=nods*sizeof(double);105 106 *pmarshalled_dataset=marshalled_dataset;107 return;108 }109 /*}}}*/110 /*FUNCTION Contour::MarshallSize{{{1*/111 int Contour::MarshallSize(){112 113 return sizeof(id)+114 sizeof(nods)+115 sizeof(closed)+116 2*nods*sizeof(double)+117 sizeof(int); //sizeof(int) for enum type118 }119 /*}}}*/120 /*FUNCTION Contour::Demarshall{{{1*/121 void Contour::Demarshall(char** pmarshalled_dataset){122 123 char* marshalled_dataset=NULL;124 125 /*recover marshalled_dataset: */126 marshalled_dataset=*pmarshalled_dataset;127 128 /*this time, no need to get enum type, the pointer directly points to the beginning of the129 *object data (thanks to DataSet::Demarshall):*/130 131 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);132 memcpy(&nods,marshalled_dataset,sizeof(nods));marshalled_dataset+=sizeof(nods);133 memcpy(&closed,marshalled_dataset,sizeof(closed));marshalled_dataset+=sizeof(closed);134 135 if(nods){136 this->x=(double*)xmalloc(nods*sizeof(double));137 this->y=(double*)xmalloc(nods*sizeof(double));138 memcpy(x,marshalled_dataset,nods*sizeof(double));marshalled_dataset+=nods*sizeof(double);139 memcpy(y,marshalled_dataset,nods*sizeof(double));marshalled_dataset+=nods*sizeof(double);140 }141 142 /*return: */143 *pmarshalled_dataset=marshalled_dataset;144 return;145 }146 /*}}}*/147 #endif148 81 /*FUNCTION Contour::ObjectEnum{{{1*/ 149 82 int Contour::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Contour.h ¶
r12004 r12168 34 34 int Id(void); 35 35 int MyRank(void); 36 #ifdef _SERIAL_37 void Marshall(char** pmarshalled_dataset);38 int MarshallSize(void);39 void Demarshall(char** pmarshalled_dataset);40 #endif41 36 int ObjectEnum(void); 42 37 Object* copy(void); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/DofIndexing.cpp ¶
r9777 r12168 208 208 } 209 209 /*}}}*/ 210 #ifdef _SERIAL_ 211 /*FUNCTION DofIndexing::Marshall{{{1*/ 212 void DofIndexing::Marshall(char** pmarshalled_dataset){ 213 214 char* marshalled_dataset=NULL; 215 int enum_type=0; 216 bool flagdoftype; //to indicate if there are some doftype or if NULL 217 218 /*recover marshalled_dataset: */ 219 marshalled_dataset=*pmarshalled_dataset; 220 221 /*preliminary: */ 222 if(this->doftype)flagdoftype=true; 223 else flagdoftype=false; 224 225 /*get enum type of DofIndexing: */ 226 enum_type=DofIndexingEnum; 227 228 /*marshall enum: */ 229 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type); 230 231 /*marshall DofIndexing data: */ 232 memcpy(marshalled_dataset,&gsize,sizeof(gsize));marshalled_dataset+=sizeof(gsize); 233 memcpy(marshalled_dataset,&fsize,sizeof(fsize));marshalled_dataset+=sizeof(fsize); 234 memcpy(marshalled_dataset,&ssize,sizeof(ssize));marshalled_dataset+=sizeof(ssize); 235 memcpy(marshalled_dataset,&flagdoftype,sizeof(flagdoftype));marshalled_dataset+=sizeof(flagdoftype); 236 memcpy(marshalled_dataset,&clone,sizeof(clone));marshalled_dataset+=sizeof(clone); 237 238 if(this->gsize>0){ 239 memcpy(marshalled_dataset,f_set,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool); 240 memcpy(marshalled_dataset,s_set,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool); 241 memcpy(marshalled_dataset,svalues,gsize*sizeof(double)); marshalled_dataset+=gsize*sizeof(double); 242 if(flagdoftype){ memcpy(marshalled_dataset,doftype,gsize*sizeof(int)); marshalled_dataset+=gsize*sizeof(int); } 243 memcpy(marshalled_dataset,gdoflist,gsize*sizeof(int)); marshalled_dataset+=gsize*sizeof(int); 244 } 245 if(this->fsize>0 && this->fsize!=UNDEF){ memcpy(marshalled_dataset,fdoflist,fsize*sizeof(int)); marshalled_dataset+=fsize*sizeof(int);} 246 if(this->ssize>0 && this->ssize!=UNDEF){ memcpy(marshalled_dataset,sdoflist,ssize*sizeof(int)); marshalled_dataset+=ssize*sizeof(int);} 247 248 *pmarshalled_dataset=marshalled_dataset; 249 return; 250 } 251 /*}}}*/ 252 /*FUNCTION DofIndexing::MarshallSize{{{1*/ 253 int DofIndexing::MarshallSize(){ 254 255 int size=0; 256 257 size+=4*sizeof(int)+sizeof(bool); 258 if(this->gsize>0){ 259 size+= 2*this->gsize*sizeof(bool)+ 260 this->gsize*sizeof(double)+ 261 this->gsize*sizeof(int); 262 if(this->doftype)size+=this->gsize*sizeof(int); 263 } 264 if(this->fsize>0 && this->fsize!=UNDEF)size+=this->fsize*sizeof(int); 265 if(this->ssize>0 && this->ssize!=UNDEF)size+=this->ssize*sizeof(int); 266 267 size+=sizeof(int); //sizeof(int) for enum type 268 269 return size; 270 } 271 /*}}}*/ 272 /*FUNCTION DofIndexing::Demarshall{{{1*/ 273 void DofIndexing::Demarshall(char** pmarshalled_dataset){ 274 275 char* marshalled_dataset=NULL; 276 int enum_type; 277 bool flagdoftype; 278 279 /*recover marshalled_dataset: */ 280 marshalled_dataset=*pmarshalled_dataset; 281 282 /*get enum type of object since DofIndexing is not directly called by DataSet: */ 283 memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int); 284 285 /*easy part: */ 286 memcpy(&gsize,marshalled_dataset,sizeof(gsize));marshalled_dataset+=sizeof(gsize); 287 memcpy(&fsize,marshalled_dataset,sizeof(fsize));marshalled_dataset+=sizeof(fsize); 288 memcpy(&ssize,marshalled_dataset,sizeof(ssize));marshalled_dataset+=sizeof(ssize); 289 memcpy(&flagdoftype,marshalled_dataset,sizeof(flagdoftype));marshalled_dataset+=sizeof(flagdoftype); 290 memcpy(&clone,marshalled_dataset,sizeof(clone));marshalled_dataset+=sizeof(clone); 291 292 /*Allocate: */ 293 if(this->gsize>0){ 294 this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool)); 295 this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool)); 296 this->svalues=(double*)xmalloc(this->gsize*sizeof(double)); 297 if(flagdoftype)this->doftype=(int*)xmalloc(this->gsize*sizeof(int)); 298 else this->doftype=NULL; 299 this->gdoflist=(int*)xmalloc(this->gsize*sizeof(int)); 300 } 301 else{ 302 this->f_set=NULL; 303 this->s_set=NULL; 304 this->svalues=NULL; 305 this->doftype=NULL; 306 this->gdoflist=NULL; 307 } 308 if(this->fsize>0) 309 this->fdoflist=(int*)xmalloc(this->fsize*sizeof(int)); 310 else 311 this->fdoflist=NULL; 312 if(this->ssize>0) 313 this->sdoflist=(int*)xmalloc(this->ssize*sizeof(int)); 314 else 315 this->sdoflist=NULL; 316 317 /*Copy arrays: */ 318 if(this->gsize>0){ 319 memcpy(f_set,marshalled_dataset,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool); 320 memcpy(s_set,marshalled_dataset,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool); 321 memcpy(svalues,marshalled_dataset,gsize*sizeof(double));marshalled_dataset+=gsize*sizeof(double); 322 if(flagdoftype){memcpy(doftype,marshalled_dataset,gsize*sizeof(int));marshalled_dataset+=gsize*sizeof(int); } 323 memcpy(gdoflist,marshalled_dataset,gsize*sizeof(int));marshalled_dataset+=gsize*sizeof(int); 324 } 325 326 if(this->fsize>0 && this->fsize!=UNDEF){ memcpy(this->fdoflist,marshalled_dataset,this->fsize*sizeof(int));marshalled_dataset+=this->fsize*sizeof(int); } 327 if(this->ssize>0 && this->ssize!=UNDEF){ memcpy(this->sdoflist,marshalled_dataset,this->ssize*sizeof(int));marshalled_dataset+=this->ssize*sizeof(int); } 328 329 /*return: */ 330 *pmarshalled_dataset=marshalled_dataset; 331 return; 332 } 333 /*}}}*/ 334 #endif 335 210 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/DofIndexing.h ¶
r9777 r12168 43 43 void Echo(void); 44 44 void DeepEcho(void); 45 #ifdef _SERIAL_46 void Marshall(char** pmarshalled_dataset);47 int MarshallSize();48 void Demarshall(char** pmarshalled_dataset);49 #endif50 45 void copy(DofIndexing* properties); 51 46 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ElementResults/BoolElementResult.cpp ¶
r11708 r12168 64 64 } 65 65 /*}}}*/ 66 #ifdef _SERIAL_67 /*FUNCTION BoolElementResult::Marshall{{{1*/68 void BoolElementResult::Marshall(char** pmarshalled_dataset){69 70 char* marshalled_dataset=NULL;71 int enum_value=0;72 73 /*recover marshalled_dataset: */74 marshalled_dataset=*pmarshalled_dataset;75 76 /*get enum value of BoolElementResult: */77 enum_value=BoolElementResultEnum;78 79 /*marshall enum: */80 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);81 82 /*marshall BoolElementResult data: */83 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);84 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);85 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);86 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);87 88 *pmarshalled_dataset=marshalled_dataset;89 }90 /*}}}*/91 /*FUNCTION BoolElementResult::Demarshall{{{1*/92 void BoolElementResult::Demarshall(char** pmarshalled_dataset){93 94 char* marshalled_dataset=NULL;95 int i;96 97 /*recover marshalled_dataset: */98 marshalled_dataset=*pmarshalled_dataset;99 100 /*this time, no need to get enum type, the pointer directly points to the beginning of the101 *object data (thanks to DataSet::Demarshall):*/102 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);103 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);104 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);105 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);106 107 /*return: */108 *pmarshalled_dataset=marshalled_dataset;109 return;110 }111 /*}}}*/112 /*FUNCTION BoolElementResult::MarshallSize{{{1*/113 int BoolElementResult::MarshallSize(){114 115 return sizeof(value)+116 +sizeof(enum_type)117 +sizeof(time)118 +sizeof(step)119 +sizeof(int); //sizeof(int) for enum value120 }121 /*}}}*/122 #endif123 66 /*FUNCTION BoolElementResult::ObjectEnum{{{1*/ 124 67 int BoolElementResult::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ElementResults/BoolElementResult.h ¶
r11708 r12168 35 35 int Id(); 36 36 int MyRank(); 37 #ifdef _SERIAL_38 void Marshall(char** pmarshalled_dataset);39 int MarshallSize();40 void Demarshall(char** pmarshalled_dataset);41 #endif42 37 int ObjectEnum(); 43 38 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ElementResults/DoubleElementResult.cpp ¶
r9883 r12168 64 64 } 65 65 /*}}}*/ 66 #ifdef _SERIAL_67 /*FUNCTION DoubleElementResult::Marshall{{{1*/68 void DoubleElementResult::Marshall(char** pmarshalled_dataset){69 70 char* marshalled_dataset=NULL;71 int enum_value=0;72 73 /*recover marshalled_dataset: */74 marshalled_dataset=*pmarshalled_dataset;75 76 /*get enum value of DoubleElementResult: */77 enum_value=DoubleElementResultEnum;78 79 /*marshall enum: */80 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);81 82 /*marshall DoubleElementResult data: */83 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);84 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);85 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);86 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);87 88 *pmarshalled_dataset=marshalled_dataset;89 }90 /*}}}*/91 /*FUNCTION DoubleElementResult::Demarshall{{{1*/92 void DoubleElementResult::Demarshall(char** pmarshalled_dataset){93 94 char* marshalled_dataset=NULL;95 int i;96 97 /*recover marshalled_dataset: */98 marshalled_dataset=*pmarshalled_dataset;99 100 /*this time, no need to get enum type, the pointer directly points to the beginning of the101 *object data (thanks to DataSet::Demarshall):*/102 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);103 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);104 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);105 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);106 107 /*return: */108 *pmarshalled_dataset=marshalled_dataset;109 return;110 }111 /*}}}*/112 /*FUNCTION DoubleElementResult::MarshallSize{{{1*/113 int DoubleElementResult::MarshallSize(){114 115 return sizeof(value)+116 +sizeof(enum_type)117 +sizeof(time)118 +sizeof(step)119 +sizeof(int); //sizeof(int) for enum value120 }121 /*}}}*/122 #endif123 66 /*FUNCTION DoubleElementResult::ObjectEnum{{{1*/ 124 67 int DoubleElementResult::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ElementResults/DoubleElementResult.h ¶
r11708 r12168 35 35 int Id(); 36 36 int MyRank(); 37 #ifdef _SERIAL_38 void Marshall(char** pmarshalled_dataset);39 int MarshallSize();40 void Demarshall(char** pmarshalled_dataset);41 #endif42 37 int ObjectEnum(); 43 38 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ElementResults/PentaP1ElementResult.cpp ¶
r11708 r12168 67 67 } 68 68 /*}}}*/ 69 #ifdef _SERIAL_70 /*FUNCTION PentaP1ElementResult::Marshall{{{1*/71 void PentaP1ElementResult::Marshall(char** pmarshalled_dataset){72 73 char* marshalled_dataset=NULL;74 int enum_value=0;75 76 /*recover marshalled_dataset: */77 marshalled_dataset=*pmarshalled_dataset;78 79 /*get enum value of PentaP1ElementResult: */80 enum_value=PentaP1ElementResultEnum;81 82 /*marshall enum: */83 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);84 85 /*marshall PentaP1ElementResult data: */86 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);87 memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);88 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);89 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);90 91 *pmarshalled_dataset=marshalled_dataset;92 }93 /*}}}*/94 /*FUNCTION PentaP1ElementResult::MarshallSize{{{1*/95 int PentaP1ElementResult::MarshallSize(){96 97 return sizeof(values)+98 +sizeof(enum_type)99 +sizeof(time)100 +sizeof(step)101 +sizeof(int); //sizeof(int) for enum value102 }103 /*}}}*/104 /*FUNCTION PentaP1ElementResult::Demarshall{{{1*/105 void PentaP1ElementResult::Demarshall(char** pmarshalled_dataset){106 107 char* marshalled_dataset=NULL;108 int i;109 110 /*recover marshalled_dataset: */111 marshalled_dataset=*pmarshalled_dataset;112 113 /*this time, no need to get enum type, the pointer directly points to the beginning of the114 *object data (thanks to DataSet::Demarshall):*/115 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);116 memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);117 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);118 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);119 120 /*return: */121 *pmarshalled_dataset=marshalled_dataset;122 return;123 }124 /*}}}*/125 #endif126 69 /*FUNCTION PentaP1ElementResult::ObjectEnum{{{1*/ 127 70 int PentaP1ElementResult::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ElementResults/PentaP1ElementResult.h ¶
r11708 r12168 34 34 int Id(); 35 35 int MyRank(); 36 #ifdef _SERIAL_37 void Marshall(char** pmarshalled_dataset);38 int MarshallSize();39 void Demarshall(char** pmarshalled_dataset);40 #endif41 36 int ObjectEnum(); 42 37 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ElementResults/TriaP1ElementResult.cpp ¶
r11708 r12168 66 66 } 67 67 /*}}}*/ 68 #ifdef _SERIAL_69 /*FUNCTION TriaP1ElementResult::Marshall{{{1*/70 void TriaP1ElementResult::Marshall(char** pmarshalled_dataset){71 72 char* marshalled_dataset=NULL;73 int enum_value=0;74 75 76 /*recover marshalled_dataset: */77 marshalled_dataset=*pmarshalled_dataset;78 79 /*get enum value of TriaP1ElementResult: */80 enum_value=TriaP1ElementResultEnum;81 82 /*marshall enum: */83 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);84 85 /*marshall TriaP1ElementResult data: */86 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);87 memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);88 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);89 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);90 91 *pmarshalled_dataset=marshalled_dataset;92 }93 /*}}}*/94 /*FUNCTION TriaP1ElementResult::MarshallSize{{{1*/95 int TriaP1ElementResult::MarshallSize(){96 97 return sizeof(values)98 +sizeof(enum_type)99 +sizeof(time)100 +sizeof(step)101 +sizeof(int); //sizeof(int) for enum value102 }103 /*}}}*/104 /*FUNCTION TriaP1ElementResult::Demarshall{{{1*/105 void TriaP1ElementResult::Demarshall(char** pmarshalled_dataset){106 107 char* marshalled_dataset=NULL;108 int i;109 110 /*recover marshalled_dataset: */111 marshalled_dataset=*pmarshalled_dataset;112 113 /*this time, no need to get enum type, the pointer directly points to the beginning of the114 *object data (thanks to DataSet::Demarshall):*/115 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);116 memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);117 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);118 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);119 120 /*return: */121 *pmarshalled_dataset=marshalled_dataset;122 return;123 }124 /*}}}*/125 #endif126 68 /*FUNCTION TriaP1ElementResult::ObjectEnum{{{1*/ 127 69 int TriaP1ElementResult::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ElementResults/TriaP1ElementResult.h ¶
r11708 r12168 33 33 int Id(); 34 34 int MyRank(); 35 #ifdef _SERIAL_36 void Marshall(char** pmarshalled_dataset);37 int MarshallSize();38 void Demarshall(char** pmarshalled_dataset);39 #endif40 35 int ObjectEnum(); 41 36 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Elements/Element.h ¶
r11708 r12168 71 71 virtual void MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding)=0; 72 72 virtual void PotentialSheetUngrounding(Vector* potential_sheet_ungrounding)=0; 73 virtual void PositiveDegreeDay( void)=0;73 virtual void PositiveDegreeDay(double* pdds,double* pds,double signorm)=0; 74 74 virtual int UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vector* vec_nodes_on_iceshelf,double* nodes_on_iceshelf)=0; 75 75 virtual void ResetCoordinateSystem()=0; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Elements/Penta.cpp ¶
r11984 r12168 142 142 } 143 143 /*}}}*/ 144 145 /*Marshall*/146 #ifdef _SERIAL_147 /*FUNCTION Penta::Marshall {{{1*/148 void Penta::Marshall(char** pmarshalled_dataset){149 150 int i;151 char* marshalled_dataset=NULL;152 int enum_type=0;153 char* marshalled_inputs=NULL;154 int marshalled_inputs_size;155 char* marshalled_results=NULL;156 int marshalled_results_size;157 int flaghook; //to indicate if hook is NULL or exists158 159 /*recover marshalled_dataset: */160 marshalled_dataset=*pmarshalled_dataset;161 162 /*get enum type of Penta: */163 enum_type=PentaEnum;164 165 /*marshall enum: */166 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);167 168 /*marshall Penta data: */169 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);170 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);171 memcpy(marshalled_dataset,&numanalyses,sizeof(numanalyses));marshalled_dataset+=sizeof(numanalyses);172 173 /*Mershall Ref: */174 for(i=0;i<numanalyses;i++){175 memcpy(marshalled_dataset,&element_type_list[i],sizeof(element_type_list[i]));marshalled_dataset+=sizeof(element_type_list[i]);176 }177 178 /*Marshall hooks: */179 for(i=0;i<numanalyses;i++){180 if(hnodes[i]){181 /*Set flag to 1 as there is a hook */182 flaghook=1;183 memcpy(marshalled_dataset,&flaghook,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);184 hnodes[i]->Marshall(&marshalled_dataset);185 }186 else{187 /*Set flag to 0 and do not marshall flag as there is no Hook */188 flaghook=0;189 memcpy(marshalled_dataset,&flaghook,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);190 }191 }192 hmatice->Marshall(&marshalled_dataset);193 hmatpar->Marshall(&marshalled_dataset);194 hneighbors->Marshall(&marshalled_dataset);195 196 /*Marshall inputs and results: */197 marshalled_inputs_size=inputs->MarshallSize();198 marshalled_inputs=inputs->Marshall();199 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));200 marshalled_dataset+=marshalled_inputs_size;201 202 marshalled_results_size=results->MarshallSize();203 marshalled_results=results->Marshall();204 memcpy(marshalled_dataset,marshalled_results,marshalled_results_size*sizeof(char));205 marshalled_dataset+=marshalled_results_size;206 207 /*parameters: don't do anything about it. parameters are marshalled somewhere else!*/208 209 xfree((void**)&marshalled_inputs);210 xfree((void**)&marshalled_results);211 212 /*marshall horizontal neighbors: */213 memcpy(marshalled_dataset,horizontalneighborsids,3*sizeof(int));marshalled_dataset+=3*sizeof(int);214 215 *pmarshalled_dataset=marshalled_dataset;216 return;217 }218 /*}}}*/219 /*FUNCTION Penta::MarshallSize {{{1*/220 int Penta::MarshallSize(){221 222 int i;223 int hnodes_size=0;;224 225 for(i=0;i<numanalyses;i++){226 hnodes_size+=sizeof(int); //Flag 0 or 1227 if (hnodes[i]) hnodes_size+=hnodes[i]->MarshallSize();228 }229 230 return sizeof(id)231 +sizeof(sid)232 +hnodes_size233 +sizeof(numanalyses)234 +numanalyses*sizeof(int) //element_type_lists235 +hmatice->MarshallSize()236 +hmatpar->MarshallSize()237 +hneighbors->MarshallSize()238 +inputs->MarshallSize()239 +results->MarshallSize()240 +3*sizeof(int)241 +sizeof(int); //sizeof(int) for enum type242 }243 /*}}}*/244 /*FUNCTION Penta::Demarshall {{{1*/245 void Penta::Demarshall(char** pmarshalled_dataset){246 247 char* marshalled_dataset=NULL;248 int i;249 int flaghook;250 251 /*recover marshalled_dataset: */252 marshalled_dataset=*pmarshalled_dataset;253 254 /*this time, no need to get enum type, the pointer directly points to the beginning of the255 *object data (thanks to DataSet::Demarshall):*/256 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);257 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);258 memcpy(&numanalyses,marshalled_dataset,sizeof(numanalyses));marshalled_dataset+=sizeof(numanalyses);259 260 /*demarshall Ref: */261 this->element_type_list=(int*)xmalloc(this->numanalyses*sizeof(int));262 for(i=0;i<numanalyses;i++){ memcpy(&element_type_list[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);}263 264 /*allocate dynamic memory: */265 this->hnodes=new Hook*[this->numanalyses];266 /*demarshall hooks: */267 for(i=0;i<numanalyses;i++){268 memcpy(&flaghook,marshalled_dataset,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);269 if(flaghook){ // there is a hook so demarshall it270 hnodes[i]=new Hook();271 hnodes[i]->Demarshall(&marshalled_dataset);272 }273 else hnodes[i]=NULL; //There is no hook so it is NULL274 }275 hmatice=new Hook(); hmatice->Demarshall(&marshalled_dataset);276 hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);277 hneighbors=new Hook(); hneighbors->Demarshall(&marshalled_dataset);278 279 /*pointers are garbage, until configuration is carried out: */280 nodes=NULL;281 matice=NULL;282 matpar=NULL;283 verticalneighbors=NULL;284 285 /*demarshall inputs and results: */286 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);287 results=(Results*)DataSetDemarshallRaw(&marshalled_dataset);288 289 /*parameters: may not exist even yet, so let Configure handle it: */290 this->parameters=NULL;291 292 /*neighbors: */293 memcpy(&this->horizontalneighborsids,marshalled_dataset,3*sizeof(int));marshalled_dataset+=3*sizeof(int);294 295 /*return: */296 *pmarshalled_dataset=marshalled_dataset;297 return;298 }299 /*}}}*/300 #endif301 144 302 145 /*Other*/ … … 2421 2264 /*}}}*/ 2422 2265 /*FUNCTION Penta::PositiveDegreeDay{{{1*/ 2423 void Penta::PositiveDegreeDay(){ 2424 2425 _error_("Not implemented yet"); 2266 void Penta::PositiveDegreeDay(double* pdds,double* pds,double signorm){ 2267 2268 2269 int i,iqj,imonth; 2270 double agd[NUMVERTICES]; // surface and basal 2271 double saccu[NUMVERTICES] = {0}; // yearly surface accumulation 2272 double smelt[NUMVERTICES] = {0}; // yearly melt 2273 double precrunoff[NUMVERTICES]; // yearly runoff 2274 double prect; // total precipitation during 1 year taking into account des. ef. 2275 double water; //water=rain + snowmelt 2276 double runoff; //meltwater only, does not include rain 2277 double sconv; //rhow_rain/rhoi / 12 months 2278 2279 double rho_water,rho_ice,density; 2280 double lapser=6.5/1000, sealev=0; // lapse rate. degrees per meter. 2281 double desfac = 0.5; //desert elevation factor 2282 double s0p[NUMVERTICES]={0}; //should be set to elevation from precip source 2283 double s0t[NUMVERTICES]={0}; //should be set to elevation from temperature source 2284 double st; // elevation between altitude of the temp record and current altitude 2285 double sp; // elevation between altitude of the prec record and current altitude 2286 2287 2288 // PDD and PD constants and variables 2289 double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm 2290 double siglimc=0, siglim0, siglim0c; 2291 double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C) 2292 double DT = 0.02; 2293 double pddt, pd; // pd: snow/precip fraction, precipitation falling as snow 2294 2295 double q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist. 2296 double qm[NUMVERTICES] = {0}; // snow part of the precipitation 2297 double qmt[NUMVERTICES] = {0}; // precipitation without desertification effect adjustment 2298 double qmp[NUMVERTICES] = {0}; // desertification taken into account 2299 double pdd[NUMVERTICES] = {0}; 2300 double frzndd[NUMVERTICES] = {0}; 2301 2302 double tstar; // monthly mean surface temp 2303 double Tsum[NUMVERTICES]= {0}; // average summer (JJA) temperature 2304 double Tsurf[NUMVERTICES] = {0}; // average annual temperature 2305 2306 double h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES] 2307 double t[NUMVERTICES][12],prec[NUMVERTICES][12]; 2308 double deltm=1/12; 2309 int ismon[12]={12,1,2,3,4,5,6,7,8,9,10,11}; 2310 2311 double snwm; // snow that could have been melted in a year. 2312 double snwmf; // ablation factor for snow per positive degree day. 2313 double smf; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002). 2314 2315 double dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr 2316 double supice,supcap,diffndd; 2317 double fsupT=0.5, fsupndd=0.5; // Tsurf mode factors for supice 2318 double pddtj[NUMVERTICES], hmx2; 2319 2320 /*Recover info at the vertices: */ 2321 GetInputListOnVertices(&h[0],ThicknessEnum); 2322 GetInputListOnVertices(&s[0],SurfaceEnum); 2323 GetInputListOnVertices(&ttmp[0],ThermalSpctemperatureEnum); 2324 GetInputListOnVertices(&prectmp[0],SurfaceforcingsPrecipitationEnum); 2325 2326 for(i=0;i<NUMVERTICES;i++) ttmp[i]=ttmp[i]-273.15; // convertion from Kelvin to celcius 2327 2328 for(i=0;i<NUMVERTICES;i++) 2329 for(imonth=0;imonth<12;imonth++){ 2330 t[i][imonth]=ttmp[i]; 2331 prec[i][imonth]=prectmp[i]; 2332 } 2333 2334 /*Get material parameters :*/ 2335 rho_ice=matpar->GetRhoIce(); 2336 rho_water=matpar->GetRhoWater(); 2337 density=rho_ice/rho_water; 2338 2339 sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months 2340 2341 /*PDD constant*/ 2342 siglim = 2.5*signorm; 2343 siglim0 = siglim/DT + 0.5; 2344 siglim0c = siglimc/DT + 0.5; 2345 PDup = siglimc+PDCUT; 2346 2347 // seasonal loop 2348 for (iqj = 0; iqj < 12; iqj++){ 2349 imonth = ismon[iqj]; 2350 for (i = 0; i < NUMVERTICES; i++){ 2351 st=(s[i]-s0t[i])/1000; 2352 tstar = t[i][imonth] - lapser *max(st,sealev); 2353 Tsurf[i] = tstar*deltm+Tsurf[i]; 2354 2355 /*********compute PD ****************/ 2356 if (tstar < PDup){ 2357 pd = 1; 2358 if (tstar >= -siglimc){ pd = pds[int(tstar/DT + siglim0c)];}} 2359 else { 2360 pd = 0;} 2361 2362 /******exp des/elev precip reduction*******/ 2363 sp=(s[i]-s0p[i])/1000; // deselev effect is wrt chng in topo 2364 if (sp>0.0){q = exp(-desfac*sp);} 2365 else {q = 1.0;} 2366 2367 qmt[i]= qmt[i] + prec[i][imonth]*sconv; //*sconv to convert in m of ice equivalent 2368 qmpt= q*prec[i][imonth]*sconv; 2369 qmp[i]= qmp[i] + qmpt; 2370 qm[i]= qm[i] + qmpt*pd; 2371 2372 /*********compute PDD************/ 2373 // ndd(month)=-(tstar-pdd(month)) since ndd+pdd gives expectation of 2374 // gaussian=T_m, so ndd=-(Tsurf-pdd) 2375 if (iqj>6 && iqj<10){ Tsum[i]=Tsum[i]+tstar;} 2376 if (tstar >= siglim) {pdd[i] = pdd[i] + tstar*deltm;} 2377 else if (tstar> -siglim){ 2378 pddsig=pdds[int(tstar/DT + siglim0)]; 2379 pdd[i] = pdd[i] + pddsig*deltm; 2380 frzndd[i] = frzndd[i] - (tstar-pddsig)*deltm;} 2381 else{frzndd[i] = frzndd[i] - tstar*deltm; } 2382 } 2383 } // end of seasonal loop 2384 2385 //****************************************************************** 2386 for(i=0;i<NUMVERTICES;i++){ 2387 saccu[i] = qm[i]; 2388 prect = qmp[i]; // total precipitation during 1 year taking into account des. ef. 2389 Tsum[i]=Tsum[i]/3; 2390 2391 /***** determine PDD factors *****/ 2392 if(Tsum[i]< -1.) { 2393 snwmf=2.65*0.001; // ablation factor for snow per positive degree day.*0.001 to go from mm to m/ppd 2394 smf=17.22*0.001; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002) 2395 } 2396 else if(Tsum[i]< 10){ 2397 snwmf = (0.15*Tsum[i] + 2.8)*0.001; 2398 smf = (0.0067*pow((10.-Tsum[i]),3) + 8.3)*0.001; 2399 } 2400 else{ 2401 snwmf=4.3*0.001; 2402 smf=8.3*0.001; 2403 } 2404 snwmf=0.95*snwmf; 2405 smf=0.95*smf; 2406 2407 /***** compute PDD ablation and refreezing *****/ 2408 pddt = pdd[i] *365; 2409 snwm = snwmf*pddt; // snow that could have been melted in a year 2410 hmx2 = min(h[i],dfrz); // refreeze active layer max depth: dfrz 2411 2412 if(snwm < saccu[i]) { 2413 water=prect-saccu[i] + snwm; //water=rain + snowmelt 2414 // l 2.2= capillary factor 2415 // Should refreezing be controlled by frzndd or by mean annual Tsurf? 2416 // dCovrLm concept is of warming of active layer (thickness =d@=1- 2417 // >2m) 2418 // problem with water seepage into ice: should be sealed after 2419 // refreezing 2420 // so everything needs to be predicated on 1 year scale, except for 2421 // thermal 2422 // conductivity through ice 2423 // also, need to account that melt season has low accum, so what's 2424 // going to 2425 // hold the meltwater around for refreezing? And melt-time will have 2426 // low seasonal frzndd 2427 2428 // Superimposed ice : Pfeffer et al. 1991, Tarasov 2002 2429 2430 supice= min(hmx2*CovrLm*frzndd[i]+2.2*(saccu[i]-snwm), water); // superimposed ice 2431 supcap=min(2.2*(saccu[i]-snwm),water); 2432 runoff=snwm - supice; //meltwater only, does not include rain 2433 } 2434 else { //all snow melted 2435 supice= min(hmx2*CovrLm*frzndd[i], prect ); 2436 runoff= saccu[i] + smf*(pddt-saccu[i]/snwmf) - supice; 2437 supcap=0; 2438 } 2439 // pdd melting doesn't cool Tsurf, so ndd refreeze shouldn't warm it 2440 // except pdd melt heat source is atmosphere, while refreeze is 2441 // ground/ice stored interim 2442 // assume pdd=ndd, then melt should equal refreeze and Tsurf should=0 2443 // assume ndd=2*pdd, then all supice is refrozen, but Tsurf should be 2444 // <0 2445 // assume ndd>pdd, little melt => little supice 2446 // bottom line: compare for Tsurf<0 : supice and no supice case, 2447 // expect Tsurf difference 2448 // except some of cooling flux comes from atmosphere// 2449 // 1 dm supice should not raise Tsurf by 1/dCovrLm = 16.675C 2450 // does supice make sense when H< 0.1m? then d=thermoactive ice layer //// 2451 // < 0.1 2452 2453 // make more sense to just use residual pdd-ndd except that pdd 2454 // residual not clear yet 2455 // frzndd should not be used up by refreezing in snow, so stick in 2456 // supcap. 2457 diffndd=0; 2458 if (frzndd[i]>0) { 2459 diffndd=fsupndd*min((supice-supcap)/dCovrLm ,frzndd[i]); 2460 frzndd[i]=frzndd[i]-diffndd; 2461 } 2462 if(runoff<0){ 2463 saccu[i]= saccu[i] -runoff; 2464 smelt[i] = 0; 2465 precrunoff[i]=prect-saccu[i]; 2466 //here assume pdd residual is 0, => 2467 Tsurf[i]= max(Tsurf[i],-frzndd[i]); 2468 } 2469 else { 2470 smelt[i] = runoff; 2471 precrunoff[i]=prect-max(0.,supice)-saccu[i];} 2472 //here really need pdd balance, try 0.5 fudge factor? 2473 //at least runoff>0 => it's fairly warm, so Tsurf is !<<0, 2474 //yet from site plots, can be ice free with Tsurf=-5.5C 2475 if(Tsurf[i]<0) { 2476 Tsurf[i]= min(Tsurf[i]+fsupT*diffndd , 0.);} 2477 2478 agd[i] = -smelt[i]+saccu[i]; 2479 pddtj[i]=pddt; 2480 2481 /*Update inputs*/ 2482 this->inputs->AddInput(new PentaP1Input(SurfaceforcingsMassBalanceEnum,&agd[0])); ////////verifier le nom 2483 // this->inputs->AddInput(new TriaVertexInput(ThermalSpcTemperatureEnum,&Tsurf[0])); 2484 this->inputs->AddInput(new PentaP1Input(ThermalSpctemperatureEnum,&Tsurf[0])); 2485 2486 } //end of the for loop over the vertices 2426 2487 } 2427 2488 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Elements/Penta.h ¶
r11708 r12168 55 55 int ObjectEnum(); 56 56 int Id(); 57 #ifdef _SERIAL_58 void Marshall(char** pmarshalled_dataset);59 int MarshallSize();60 void Demarshall(char** pmarshalled_dataset);61 #endif62 57 int MyRank(); 63 58 /*}}}*/ … … 112 107 void PatchFill(int* pcount, Patch* patch); 113 108 void PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes); 114 void PositiveDegreeDay( void);109 void PositiveDegreeDay(double* pdds,double* pds,double signorm); 115 110 void ProcessResultsUnits(void); 116 111 void ResetCoordinateSystem(void); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Elements/Tria.cpp ¶
r12004 r12168 122 122 } 123 123 /*}}}*/ 124 125 /*Marshall*/126 #ifdef _SERIAL_127 /*FUNCTION Tria::Marshall {{{1*/128 void Tria::Marshall(char** pmarshalled_dataset){129 130 int i;131 char* marshalled_dataset=NULL;132 int enum_type=0;133 char* marshalled_inputs=NULL;134 int marshalled_inputs_size;135 char* marshalled_results=NULL;136 int marshalled_results_size;137 int flaghook; //to indicate if hook is NULL or exists138 139 /*recover marshalled_dataset: */140 marshalled_dataset=*pmarshalled_dataset;141 142 /*get enum type of Tria: */143 enum_type=TriaEnum;144 145 /*marshall enum: */146 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);147 148 /*marshall Tria data: */149 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);150 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);151 memcpy(marshalled_dataset,&numanalyses,sizeof(numanalyses));marshalled_dataset+=sizeof(numanalyses);152 153 /*Mershall Ref: */154 for(i=0;i<numanalyses;i++){155 memcpy(marshalled_dataset,&element_type_list[i],sizeof(element_type_list[i]));marshalled_dataset+=sizeof(element_type_list[i]);156 }157 158 /*Marshall hooks: */159 for(i=0;i<numanalyses;i++){160 if(hnodes[i]){161 /*Set flag to 1 as there is a hook */162 flaghook=1;163 memcpy(marshalled_dataset,&flaghook,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);164 hnodes[i]->Marshall(&marshalled_dataset);165 }166 else{167 /*Set flag to 0 and do not marshall flag as there is no Hook */168 flaghook=0;169 memcpy(marshalled_dataset,&flaghook,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);170 }171 }172 hmatice->Marshall(&marshalled_dataset);173 hmatpar->Marshall(&marshalled_dataset);174 175 /*Marshall inputs: */176 marshalled_inputs_size=inputs->MarshallSize();177 marshalled_inputs=inputs->Marshall();178 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));179 marshalled_dataset+=marshalled_inputs_size;180 181 /*Marshall results: */182 marshalled_results_size=results->MarshallSize();183 marshalled_results=results->Marshall();184 memcpy(marshalled_dataset,marshalled_results,marshalled_results_size*sizeof(char));185 marshalled_dataset+=marshalled_results_size;186 187 /*parameters: don't do anything about it. parameters are marshalled somewhere else!*/188 189 xfree((void**)&marshalled_inputs);190 xfree((void**)&marshalled_results);191 192 /*marshall horizontal neighbors: */193 memcpy(marshalled_dataset,horizontalneighborsids,3*sizeof(int));marshalled_dataset+=3*sizeof(int);194 195 *pmarshalled_dataset=marshalled_dataset;196 return;197 }198 /*}}}*/199 /*FUNCTION Tria::MarshallSize {{{1*/200 int Tria::MarshallSize(){201 202 int i;203 int hnodes_size=0;;204 205 for(i=0;i<numanalyses;i++){206 hnodes_size+=sizeof(int); //Flag 0 or 1207 if (hnodes[i]) hnodes_size+=hnodes[i]->MarshallSize();208 }209 210 return sizeof(id)211 +sizeof(sid)212 +hnodes_size213 +sizeof(numanalyses)214 +numanalyses*sizeof(int) //element_type_lists215 +hmatice->MarshallSize()216 +hmatpar->MarshallSize()217 +inputs->MarshallSize()218 +results->MarshallSize()219 +3*sizeof(int)220 +sizeof(int); //sizeof(int) for enum type221 }222 /*}}}*/223 /*FUNCTION Tria::Demarshall {{{1*/224 void Tria::Demarshall(char** pmarshalled_dataset){225 226 char* marshalled_dataset=NULL;227 int i;228 int flaghook;229 230 /*recover marshalled_dataset: */231 marshalled_dataset=*pmarshalled_dataset;232 233 /*this time, no need to get enum type, the pointer directly points to the beginning of the234 *object data (thanks to DataSet::Demarshall):*/235 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);236 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);237 memcpy(&numanalyses,marshalled_dataset,sizeof(numanalyses));marshalled_dataset+=sizeof(numanalyses);238 239 /*demarshall Ref: */240 this->element_type_list=(int*)xmalloc(this->numanalyses*sizeof(int));241 for(i=0;i<numanalyses;i++){ memcpy(&element_type_list[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);}242 243 /*allocate dynamic memory: */244 this->hnodes=new Hook*[this->numanalyses];245 /*demarshall hooks: */246 for(i=0;i<numanalyses;i++){247 memcpy(&flaghook,marshalled_dataset,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);248 if(flaghook){ // there is a hook so demarshall it249 hnodes[i]=new Hook();250 hnodes[i]->Demarshall(&marshalled_dataset);251 }252 else hnodes[i]=NULL; //There is no hook so it is NULL253 }254 hmatice=new Hook(); hmatice->Demarshall(&marshalled_dataset);255 hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);256 257 /*pointers are garbabe, until configuration is carried out: */258 nodes=NULL;259 matice=NULL;260 matpar=NULL;261 262 /*demarshall inputs: */263 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);264 results=(Results*)DataSetDemarshallRaw(&marshalled_dataset);265 266 /*parameters: may not exist even yet, so let Configure handle it: */267 this->parameters=NULL;268 269 /*neighbors: */270 memcpy(&this->horizontalneighborsids,marshalled_dataset,3*sizeof(int));marshalled_dataset+=3*sizeof(int);271 272 /*return: */273 *pmarshalled_dataset=marshalled_dataset;274 return;275 }276 /*}}}*/277 #endif278 124 279 125 /*Other*/ … … 2241 2087 /*}}}*/ 2242 2088 /*FUNCTION Tria::PositiveDegreeDay{{{1*/ 2243 void Tria::PositiveDegreeDay(){ 2244 2245 _error_("Not implemented yet"); 2089 void Tria::PositiveDegreeDay(double* pdds,double* pds,double signorm){ 2090 2091 int i,iqj,imonth; 2092 double agd[NUMVERTICES]; // surface and basal 2093 double saccu[NUMVERTICES] = {0}; // yearly surface accumulation 2094 double smelt[NUMVERTICES] = {0}; // yearly melt 2095 double precrunoff[NUMVERTICES]; // yearly runoff 2096 double prect; // total precipitation during 1 year taking into account des. ef. 2097 double water; //water=rain + snowmelt 2098 double runoff; //meltwater only, does not include rain 2099 double sconv; //rhow_rain/rhoi / 12 months 2100 2101 double rho_water,rho_ice,density; 2102 double lapser=6.5/1000, sealev=0; // lapse rate. degrees per meter. 2103 double desfac = 0.5; //desert elevation factor 2104 double s0p[NUMVERTICES]={0}; //should be set to elevation from precip source 2105 double s0t[NUMVERTICES]={0}; //should be set to elevation from temperature source 2106 double st; // elevation between altitude of the temp record and current altitude 2107 double sp; // elevation between altitude of the prec record and current altitude 2108 2109 2110 // PDD and PD constants and variables 2111 double siglim; // sigma limit for the integration which is equal to 2.5 sigmanorm 2112 double siglimc=0, siglim0, siglim0c; 2113 double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C) 2114 double DT = 0.02; 2115 double pddt, pd; // pd: snow/precip fraction, precipitation falling as snow 2116 2117 double q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist. 2118 double qm[NUMVERTICES] = {0}; // snow part of the precipitation 2119 double qmt[NUMVERTICES] = {0}; // precipitation without desertification effect adjustment 2120 double qmp[NUMVERTICES] = {0}; // desertification taken into account 2121 double pdd[NUMVERTICES] = {0}; 2122 double frzndd[NUMVERTICES] = {0}; 2123 2124 double tstar; // monthly mean surface temp 2125 double Tsum[NUMVERTICES]= {0}; // average summer (JJA) temperature 2126 double Tsurf[NUMVERTICES] = {0}; // average annual temperature 2127 2128 double h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES] 2129 double t[NUMVERTICES][12],prec[NUMVERTICES][12]; 2130 double deltm=1/12; 2131 int ismon[12]={12,1,2,3,4,5,6,7,8,9,10,11}; 2132 2133 double snwm; // snow that could have been melted in a year. 2134 double snwmf; // ablation factor for snow per positive degree day. 2135 double smf; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002). 2136 2137 double dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr 2138 double supice,supcap,diffndd; 2139 double fsupT=0.5, fsupndd=0.5; // Tsurf mode factors for supice 2140 double pddtj[NUMVERTICES], hmx2; 2141 2142 /*Recover info at the vertices: */ 2143 GetInputListOnVertices(&h[0],ThicknessEnum); 2144 GetInputListOnVertices(&s[0],SurfaceEnum); 2145 GetInputListOnVertices(&ttmp[0],ThermalSpctemperatureEnum); 2146 GetInputListOnVertices(&prectmp[0],SurfaceforcingsPrecipitationEnum); 2147 2148 for(i=0;i<NUMVERTICES;i++) ttmp[i]=ttmp[i]-273.15; // convertion from Kelvin to celcius 2149 2150 for(i=0;i<NUMVERTICES;i++) 2151 for(imonth=0;imonth<12;imonth++){ 2152 t[i][imonth]=ttmp[i]; 2153 prec[i][imonth]=prectmp[i]; 2154 } 2155 2156 /*Get material parameters :*/ 2157 rho_ice=matpar->GetRhoIce(); 2158 rho_water=matpar->GetRhoWater(); 2159 density=rho_ice/rho_water; 2160 2161 sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months 2162 2163 /*PDD constant*/ 2164 siglim = 2.5*signorm; 2165 siglim0 = siglim/DT + 0.5; 2166 siglim0c = siglimc/DT + 0.5; 2167 PDup = siglimc+PDCUT; 2168 2169 // seasonal loop 2170 for (iqj = 0; iqj < 12; iqj++){ 2171 imonth = ismon[iqj]; 2172 for (i = 0; i < NUMVERTICES; i++){ 2173 st=(s[i]-s0t[i])/1000; 2174 tstar = t[i][imonth] - lapser *max(st,sealev); 2175 Tsurf[i] = tstar*deltm+Tsurf[i]; 2176 2177 /*********compute PD ****************/ 2178 if (tstar < PDup){ 2179 pd = 1; 2180 if (tstar >= -siglimc){ pd = pds[int(tstar/DT + siglim0c)];}} 2181 else { 2182 pd = 0;} 2183 2184 /******exp des/elev precip reduction*******/ 2185 sp=(s[i]-s0p[i])/1000; // deselev effect is wrt chng in topo 2186 if (sp>0.0){q = exp(-desfac*sp);} 2187 else {q = 1.0;} 2188 2189 qmt[i]= qmt[i] + prec[i][imonth]*sconv; //*sconv to convert in m of ice equivalent 2190 qmpt= q*prec[i][imonth]*sconv; 2191 qmp[i]= qmp[i] + qmpt; 2192 qm[i]= qm[i] + qmpt*pd; 2193 2194 /*********compute PDD************/ 2195 // ndd(month)=-(tstar-pdd(month)) since ndd+pdd gives expectation of 2196 // gaussian=T_m, so ndd=-(Tsurf-pdd) 2197 if (iqj>6 && iqj<10){ Tsum[i]=Tsum[i]+tstar;} 2198 if (tstar >= siglim) {pdd[i] = pdd[i] + tstar*deltm;} 2199 else if (tstar> -siglim){ 2200 pddsig=pdds[int(tstar/DT + siglim0)]; 2201 pdd[i] = pdd[i] + pddsig*deltm; 2202 frzndd[i] = frzndd[i] - (tstar-pddsig)*deltm;} 2203 else{frzndd[i] = frzndd[i] - tstar*deltm; } 2204 } 2205 } // end of seasonal loop 2206 2207 //****************************************************************** 2208 for(i=0;i<NUMVERTICES;i++){ 2209 saccu[i] = qm[i]; 2210 prect = qmp[i]; // total precipitation during 1 year taking into account des. ef. 2211 Tsum[i]=Tsum[i]/3; 2212 2213 /***** determine PDD factors *****/ 2214 if(Tsum[i]< -1.) { 2215 snwmf=2.65*0.001; // ablation factor for snow per positive degree day.*0.001 to go from mm to m/ppd 2216 smf=17.22*0.001; // ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002) 2217 } 2218 else if(Tsum[i]< 10){ 2219 snwmf = (0.15*Tsum[i] + 2.8)*0.001; 2220 smf = (0.0067*pow((10.-Tsum[i]),3) + 8.3)*0.001; 2221 } 2222 else{ 2223 snwmf=4.3*0.001; 2224 smf=8.3*0.001; 2225 } 2226 snwmf=0.95*snwmf; 2227 smf=0.95*smf; 2228 2229 /***** compute PDD ablation and refreezing *****/ 2230 pddt = pdd[i] *365; 2231 snwm = snwmf*pddt; // snow that could have been melted in a year 2232 hmx2 = min(h[i],dfrz); // refreeze active layer max depth: dfrz 2233 2234 if(snwm < saccu[i]) { 2235 water=prect-saccu[i] + snwm; //water=rain + snowmelt 2236 // l 2.2= capillary factor 2237 // Should refreezing be controlled by frzndd or by mean annual Tsurf? 2238 // dCovrLm concept is of warming of active layer (thickness =d@=1- 2239 // >2m) 2240 // problem with water seepage into ice: should be sealed after 2241 // refreezing 2242 // so everything needs to be predicated on 1 year scale, except for 2243 // thermal 2244 // conductivity through ice 2245 // also, need to account that melt season has low accum, so what's 2246 // going to 2247 // hold the meltwater around for refreezing? And melt-time will have 2248 // low seasonal frzndd 2249 2250 // Superimposed ice : Pfeffer et al. 1991, Tarasov 2002 2251 2252 supice= min(hmx2*CovrLm*frzndd[i]+2.2*(saccu[i]-snwm), water); // superimposed ice 2253 supcap=min(2.2*(saccu[i]-snwm),water); 2254 runoff=snwm - supice; //meltwater only, does not include rain 2255 } 2256 else { //all snow melted 2257 supice= min(hmx2*CovrLm*frzndd[i], prect ); 2258 runoff= saccu[i] + smf*(pddt-saccu[i]/snwmf) - supice; 2259 supcap=0; 2260 } 2261 // pdd melting doesn't cool Tsurf, so ndd refreeze shouldn't warm it 2262 // except pdd melt heat source is atmosphere, while refreeze is 2263 // ground/ice stored interim 2264 // assume pdd=ndd, then melt should equal refreeze and Tsurf should=0 2265 // assume ndd=2*pdd, then all supice is refrozen, but Tsurf should be 2266 // <0 2267 // assume ndd>pdd, little melt => little supice 2268 // bottom line: compare for Tsurf<0 : supice and no supice case, 2269 // expect Tsurf difference 2270 // except some of cooling flux comes from atmosphere// 2271 // 1 dm supice should not raise Tsurf by 1/dCovrLm = 16.675C 2272 // does supice make sense when H< 0.1m? then d=thermoactive ice layer //// 2273 // < 0.1 2274 2275 // make more sense to just use residual pdd-ndd except that pdd 2276 // residual not clear yet 2277 // frzndd should not be used up by refreezing in snow, so stick in 2278 // supcap. 2279 diffndd=0; 2280 if (frzndd[i]>0) { 2281 diffndd=fsupndd*min((supice-supcap)/dCovrLm ,frzndd[i]); 2282 frzndd[i]=frzndd[i]-diffndd; 2283 } 2284 if(runoff<0){ 2285 saccu[i]= saccu[i] -runoff; 2286 smelt[i] = 0; 2287 precrunoff[i]=prect-saccu[i]; 2288 //here assume pdd residual is 0, => 2289 Tsurf[i]= max(Tsurf[i],-frzndd[i]); 2290 } 2291 else { 2292 smelt[i] = runoff; 2293 precrunoff[i]=prect-max(0.,supice)-saccu[i];} 2294 //here really need pdd balance, try 0.5 fudge factor? 2295 //at least runoff>0 => it's fairly warm, so Tsurf is !<<0, 2296 //yet from site plots, can be ice free with Tsurf=-5.5C 2297 if(Tsurf[i]<0) { 2298 Tsurf[i]= min(Tsurf[i]+fsupT*diffndd , 0.);} 2299 2300 agd[i] = -smelt[i]+saccu[i]; 2301 pddtj[i]=pddt; 2302 2303 /*Update inputs*/ 2304 this->inputs->AddInput(new TriaP1Input(SurfaceforcingsMassBalanceEnum,&agd[0])); ////////verifier le nom 2305 // this->inputs->AddInput(new TriaVertexInput(ThermalSpcTemperatureEnum,&Tsurf[0])); 2306 this->inputs->AddInput(new TriaP1Input(ThermalSpctemperatureEnum,&Tsurf[0])); 2307 2308 } //end of the for loop over the vertices 2246 2309 } 2247 2310 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Elements/Tria.h ¶
r11708 r12168 51 51 int Id(); 52 52 int MyRank(); 53 #ifdef _SERIAL_54 void Marshall(char** pmarshalled_dataset);55 int MarshallSize();56 void Demarshall(char** pmarshalled_dataset);57 #endif58 53 int ObjectEnum(); 59 54 Object* copy(); … … 108 103 int NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units); 109 104 void PotentialSheetUngrounding(Vector* potential_sheet_ungrounding); 110 void PositiveDegreeDay( void);105 void PositiveDegreeDay(double* pdds,double* pds,double signorm); 111 106 void RequestedOutput(int output_enum,int step,double time); 112 107 void ListResultsInfo(int** results_enums,int** results_size,double** results_times,int** results_steps,int* num_results); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/BoolExternalResult.cpp ¶
r12004 r12168 68 68 } 69 69 /*}}}*/ 70 #ifdef _SERIAL_71 /*FUNCTION BoolExternalResult::Marshall{{{1*/72 void BoolExternalResult::Marshall(char** pmarshalled_dataset){73 74 char* marshalled_dataset=NULL;75 int enum_value=0;76 77 /*recover marshalled_dataset: */78 marshalled_dataset=*pmarshalled_dataset;79 80 /*get enum value of BoolExternalResult: */81 enum_value=BoolExternalResultEnum;82 83 /*marshall enum: */84 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);85 86 /*marshall BoolExternalResult data: */87 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);88 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);89 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);90 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);91 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);92 93 *pmarshalled_dataset=marshalled_dataset;94 }95 /*}}}*/96 /*FUNCTION BoolExternalResult::MarshallSize{{{1*/97 int BoolExternalResult::MarshallSize(){98 99 return sizeof(value)+100 +sizeof(id)101 +sizeof(enum_type)102 +sizeof(step)103 +sizeof(time)104 +sizeof(int); //sizeof(int) for enum value105 }106 /*}}}*/107 /*FUNCTION BoolExternalResult::Demarshall{{{1*/108 void BoolExternalResult::Demarshall(char** pmarshalled_dataset){109 110 char* marshalled_dataset=NULL;111 int i;112 113 /*recover marshalled_dataset: */114 marshalled_dataset=*pmarshalled_dataset;115 116 /*this time, no need to get enum type, the pointer directly points to the beginning of the117 *object data (thanks to DataSet::Demarshall):*/118 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);119 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);120 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);121 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);122 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);123 124 /*return: */125 *pmarshalled_dataset=marshalled_dataset;126 return;127 }128 /*}}}*/129 #endif130 70 /*FUNCTION BoolExternalResult::ObjectEnum{{{1*/ 131 71 int BoolExternalResult::ObjectEnum(void){ … … 185 125 } 186 126 /*}}}*/ 187 /*FUNCTION BoolExternalResult::SetMatlabField{{{1*/188 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)189 void BoolExternalResult::SetMatlabField(mxArray* dataref){190 191 char* name=NULL;192 this->GetResultName(&name);193 194 mxSetField( dataref, this->step-1, name,mxCreateDoubleScalar((double)value));195 mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));196 mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));197 }198 #endif199 /*}}}*/200 127 /*FUNCTION BoolExternalResult::GetStep{{{1*/ 201 128 int BoolExternalResult::GetStep(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/BoolExternalResult.h ¶
r12004 r12168 15 15 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 16 16 #endif 17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include <mex.h>20 #endif21 22 17 23 18 #include "./ExternalResult.h" … … 47 42 int Id(); 48 43 int MyRank(); 49 #ifdef _SERIAL_50 void Marshall(char** pmarshalled_dataset);51 int MarshallSize();52 void Demarshall(char** pmarshalled_dataset);53 #endif54 44 int ObjectEnum(); 55 45 Object* copy(); … … 59 49 void WriteData(FILE* fid,bool io_gather); 60 50 void GetResultName(char**); 61 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)62 void SetMatlabField(mxArray* dataref);63 #endif64 51 int GetStep(void); 65 52 /*}}}*/ 66 53 }; 67 #endif /* _BOOLEXTERNALRESULT_H */54 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/DoubleExternalResult.cpp ¶
r12004 r12168 68 68 } 69 69 /*}}}*/ 70 #ifdef _SERIAL_71 /*FUNCTION DoubleExternalResult::Marshall{{{1*/72 void DoubleExternalResult::Marshall(char** pmarshalled_dataset){73 74 char* marshalled_dataset=NULL;75 int enum_value=0;76 77 /*recover marshalled_dataset: */78 marshalled_dataset=*pmarshalled_dataset;79 80 /*get enum value of DoubleExternalResult: */81 enum_value=DoubleExternalResultEnum;82 83 /*marshall enum: */84 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);85 86 /*marshall DoubleExternalResult data: */87 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);88 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);89 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);90 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);91 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);92 93 *pmarshalled_dataset=marshalled_dataset;94 }95 /*}}}*/96 /*FUNCTION DoubleExternalResult::MarshallSize{{{1*/97 int DoubleExternalResult::MarshallSize(){98 99 return sizeof(value)+100 +sizeof(id)101 +sizeof(enum_type)102 +sizeof(step)103 +sizeof(time)104 +sizeof(int); //sizeof(int) for enum value105 }106 /*}}}*/107 /*FUNCTION DoubleExternalResult::Demarshall{{{1*/108 void DoubleExternalResult::Demarshall(char** pmarshalled_dataset){109 110 char* marshalled_dataset=NULL;111 int i;112 113 /*recover marshalled_dataset: */114 marshalled_dataset=*pmarshalled_dataset;115 116 /*this time, no need to get enum type, the pointer directly points to the beginning of the117 *object data (thanks to DataSet::Demarshall):*/118 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);119 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);120 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);121 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);122 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);123 124 /*return: */125 *pmarshalled_dataset=marshalled_dataset;126 return;127 }128 /*}}}*/129 #endif130 70 /*FUNCTION DoubleExternalResult::ObjectEnum{{{1*/ 131 71 int DoubleExternalResult::ObjectEnum(void){ … … 181 121 } 182 122 /*}}}*/ 183 /*FUNCTION DoubleExternalResult::SetMatlabField{{{1*/184 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)185 void DoubleExternalResult::SetMatlabField(mxArray* dataref){186 187 char* name=NULL;188 this->GetResultName(&name);189 mxSetField( dataref,this->step-1, name,mxCreateDoubleScalar(value));190 mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));191 mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));192 193 }194 #endif195 /*}}}*/196 123 /*FUNCTION DoubleExternalResult::GetStep{{{1*/ 197 124 int DoubleExternalResult::GetStep(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/DoubleExternalResult.h ¶
r12004 r12168 14 14 #else 15 15 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 16 #endif17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include <mex.h>20 16 #endif 21 17 … … 48 44 int Id(); 49 45 int MyRank(); 50 #ifdef _SERIAL_51 void Marshall(char** pmarshalled_dataset);52 int MarshallSize();53 void Demarshall(char** pmarshalled_dataset);54 #endif55 46 int ObjectEnum(); 56 47 Object* copy(); … … 60 51 void WriteData(FILE* fid,bool io_gather); 61 52 void GetResultName(char**); 62 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)63 void SetMatlabField(mxArray* dataref);64 #endif65 53 int GetStep(void); 66 54 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp ¶
r12004 r12168 96 96 } 97 97 /*}}}*/ 98 #ifdef _SERIAL_99 /*FUNCTION DoubleMatExternalResult::Marshall{{{1*/100 void DoubleMatExternalResult::Marshall(char** pmarshalled_dataset){101 102 char* marshalled_dataset=NULL;103 int enum_value=0;104 105 /*recover marshalled_dataset: */106 marshalled_dataset=*pmarshalled_dataset;107 108 /*get enum value of DoubleMatExternalResult: */109 enum_value=DoubleMatExternalResultEnum;110 111 /*marshall enum: */112 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);113 114 /*marshall DoubleMatExternalResult data: */115 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);116 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);117 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);118 memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);119 memcpy(marshalled_dataset,values,M*sizeof(double));marshalled_dataset+=M*sizeof(double);120 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);121 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);122 123 *pmarshalled_dataset=marshalled_dataset;124 }125 /*}}}*/126 /*FUNCTION DoubleMatExternalResult::MarshallSize{{{1*/127 int DoubleMatExternalResult::MarshallSize(){128 129 return sizeof(M)130 +sizeof(N)131 +M*N*sizeof(double)132 +sizeof(id)133 +sizeof(enum_type)134 +sizeof(step)135 +sizeof(time)136 +sizeof(int); //sizeof(int) for enum value137 }138 /*}}}*/139 /*FUNCTION DoubleMatExternalResult::Demarshall{{{1*/140 void DoubleMatExternalResult::Demarshall(char** pmarshalled_dataset){141 142 char* marshalled_dataset=NULL;143 int i;144 145 /*recover marshalled_dataset: */146 marshalled_dataset=*pmarshalled_dataset;147 148 /*this time, no need to get enum type, the pointer directly points to the beginning of the149 *object data (thanks to DataSet::Demarshall):*/150 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);151 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);152 153 /*data: */154 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);155 memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);156 values=(double*)xmalloc(M*N*sizeof(double));157 memcpy(values,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=M*N*sizeof(double);158 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);159 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);160 161 /*return: */162 *pmarshalled_dataset=marshalled_dataset;163 return;164 }165 /*}}}*/166 #endif167 98 /*FUNCTION DoubleMatExternalResult::ObjectEnum{{{1*/ 168 99 int DoubleMatExternalResult::ObjectEnum(void){ … … 222 153 } 223 154 /*}}}*/ 224 /*FUNCTION DoubleMatExternalResult::SetMatlabField{{{1*/225 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)226 void DoubleMatExternalResult::SetMatlabField(mxArray* dataref){227 228 mxArray* pfield=NULL;229 mxArray* pfield2=NULL;230 char* name=NULL;231 double* doublemat=NULL;232 233 /*Make a copy of the value, to be used by matlab: */234 doublemat=(double*)xmalloc(M*N*sizeof(double));235 memcpy(doublemat,values,M*N*sizeof(double));236 237 /*recover name: */238 this->GetResultName(&name);239 240 /*create matlab matrix: */241 pfield=mxCreateDoubleMatrix(0,0,mxREAL);242 mxSetM(pfield,N);243 mxSetN(pfield,M);244 mxSetPr(pfield,doublemat);245 246 /*transpose the matrix, from c to matlab format */247 mexCallMATLAB(1,&pfield2, 1, &pfield, "transpose");248 249 /*set tranpose matrix inside the dataref structure: */250 mxSetField( dataref, this->step-1, name,pfield2);251 mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));252 mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));253 254 }255 #endif256 /*}}}*/257 155 /*FUNCTION DoubleMatExternalResult::GetStep{{{1*/ 258 156 int DoubleMatExternalResult::GetStep(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/DoubleMatExternalResult.h ¶
r12004 r12168 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 15 #endif 16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 #endif20 21 16 22 17 #include "./ExternalResult.h" … … 49 44 int Id(); 50 45 int MyRank(); 51 #ifdef _SERIAL_52 void Marshall(char** pmarshalled_dataset);53 int MarshallSize();54 void Demarshall(char** pmarshalled_dataset);55 #endif56 46 int ObjectEnum(); 57 47 Object* copy(); … … 61 51 void WriteData(FILE* fid,bool io_gather); 62 52 void GetResultName(char**); 63 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)64 void SetMatlabField(mxArray* dataref);65 #endif66 53 int GetStep(void); 67 54 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp ¶
r12004 r12168 87 87 } 88 88 /*}}}*/ 89 #ifdef _SERIAL_90 /*FUNCTION DoubleVecExternalResult::Marshall{{{1*/91 void DoubleVecExternalResult::Marshall(char** pmarshalled_dataset){92 93 char* marshalled_dataset=NULL;94 int enum_value=0;95 96 /*recover marshalled_dataset: */97 marshalled_dataset=*pmarshalled_dataset;98 99 /*get enum value of DoubleVecExternalResult: */100 enum_value=DoubleVecExternalResultEnum;101 102 /*marshall enum: */103 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);104 105 /*marshall DoubleVecExternalResult data: */106 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);107 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);108 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);109 memcpy(marshalled_dataset,values,M*sizeof(double));marshalled_dataset+=M*sizeof(double);110 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);111 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);112 113 *pmarshalled_dataset=marshalled_dataset;114 }115 /*}}}*/116 /*FUNCTION DoubleVecExternalResult::MarshallSize{{{1*/117 int DoubleVecExternalResult::MarshallSize(){118 119 return sizeof(M)120 +M*sizeof(double)121 +sizeof(id)122 +sizeof(enum_type)123 +sizeof(step)124 +sizeof(time)125 +sizeof(int); //sizeof(int) for enum value126 }127 /*}}}*/128 /*FUNCTION DoubleVecExternalResult::Demarshall{{{1*/129 void DoubleVecExternalResult::Demarshall(char** pmarshalled_dataset){130 131 char* marshalled_dataset=NULL;132 int i;133 134 /*recover marshalled_dataset: */135 marshalled_dataset=*pmarshalled_dataset;136 137 /*this time, no need to get enum type, the pointer directly points to the beginning of the138 *object data (thanks to DataSet::Demarshall):*/139 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);140 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);141 142 /*data: */143 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);144 values=(double*)xmalloc(M*sizeof(double));145 memcpy(values,marshalled_dataset,M*sizeof(double));marshalled_dataset+=M*sizeof(double);146 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);147 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);148 149 /*return: */150 *pmarshalled_dataset=marshalled_dataset;151 return;152 }153 /*}}}*/154 #endif155 89 /*FUNCTION DoubleVecExternalResult::ObjectEnum{{{1*/ 156 90 int DoubleVecExternalResult::ObjectEnum(void){ … … 206 140 } 207 141 /*}}}*/ 208 /*FUNCTION DoubleVecExternalResult::SetMatlabField{{{1*/209 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)210 void DoubleVecExternalResult::SetMatlabField(mxArray* dataref){211 212 mxArray *pfield = NULL;213 double *doublemat = NULL;214 char *name = NULL;215 double *doublevec = NULL;216 217 /*Make a copy of the value, to be used by matlab: */218 doublevec=(double*)xmalloc(M*sizeof(double));219 memcpy(doublevec,values,M*sizeof(double));220 221 /*recover name: */222 this->GetResultName(&name);223 224 /*create matlab matrix: */225 pfield=mxCreateDoubleMatrix(0,0,mxREAL);226 mxSetM(pfield,M);227 mxSetN(pfield,1);228 mxSetPr(pfield,doublevec);229 230 mxSetField( dataref, this->step-1, name,pfield);231 mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));232 mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));233 }234 #endif235 /*}}}*/236 142 /*FUNCTION DoubleVecExternalResult::GetStep{{{1*/ 237 143 int DoubleVecExternalResult::GetStep(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/DoubleVecExternalResult.h ¶
r12004 r12168 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 15 #endif 16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 #endif20 21 16 22 17 #include "./ExternalResult.h" … … 48 43 int Id(); 49 44 int MyRank(); 50 #ifdef _SERIAL_51 void Marshall(char** pmarshalled_dataset);52 int MarshallSize();53 void Demarshall(char** pmarshalled_dataset);54 #endif55 45 int ObjectEnum(); 56 46 Object* copy(); … … 60 50 void WriteData(FILE* fid,bool io_gather); 61 51 void GetResultName(char**); 62 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)63 void SetMatlabField(mxArray* dataref);64 #endif65 52 int GetStep(void); 66 53 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/ExternalResult.h ¶
r12004 r12168 16 16 #endif 17 17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include <mex.h>20 #endif21 22 18 #include "../Object.h" 23 19 #include "../Node.h" … … 33 29 virtual void WriteData(FILE* fid,bool io_gather)=0; 34 30 virtual void GetResultName(char**)=0; 35 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)36 virtual void SetMatlabField(mxArray* dataref)=0;37 #endif38 31 virtual int GetStep(void)=0; 39 32 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/IntExternalResult.cpp ¶
r12004 r12168 68 68 } 69 69 /*}}}*/ 70 #ifdef _SERIAL_71 /*FUNCTION IntExternalResult::Marshall{{{1*/72 void IntExternalResult::Marshall(char** pmarshalled_dataset){73 74 char* marshalled_dataset=NULL;75 int enum_value=0;76 77 /*recover marshalled_dataset: */78 marshalled_dataset=*pmarshalled_dataset;79 80 /*get enum value of IntExternalResult: */81 enum_value=IntExternalResultEnum;82 83 /*marshall enum: */84 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);85 86 /*marshall IntExternalResult data: */87 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);88 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);89 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);90 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);91 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);92 93 *pmarshalled_dataset=marshalled_dataset;94 }95 /*}}}*/96 /*FUNCTION IntExternalResult::MarshallSize{{{1*/97 int IntExternalResult::MarshallSize(){98 99 return sizeof(value)+100 +sizeof(id)101 +sizeof(enum_type)102 +sizeof(step)103 +sizeof(time)104 +sizeof(int); //sizeof(int) for enum value105 }106 /*}}}*/107 /*FUNCTION IntExternalResult::Demarshall{{{1*/108 void IntExternalResult::Demarshall(char** pmarshalled_dataset){109 110 char* marshalled_dataset=NULL;111 int i;112 113 /*recover marshalled_dataset: */114 marshalled_dataset=*pmarshalled_dataset;115 116 /*this time, no need to get enum type, the pointer directly points to the beginning of the117 *object data (thanks to DataSet::Demarshall):*/118 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);119 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);120 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);121 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);122 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);123 124 /*return: */125 *pmarshalled_dataset=marshalled_dataset;126 return;127 }128 /*}}}*/129 #endif130 70 /*FUNCTION IntExternalResult::ObjectEnum{{{1*/ 131 71 int IntExternalResult::ObjectEnum(void){ … … 185 125 } 186 126 /*}}}*/ 187 /*FUNCTION IntExternalResult::SetMatlabField{{{1*/188 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)189 void IntExternalResult::SetMatlabField(mxArray* dataref){190 191 char* name=NULL;192 this->GetResultName(&name);193 194 mxSetField( dataref, this->step-1, name,mxCreateDoubleScalar(value));195 mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));196 mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));197 198 }199 #endif200 /*}}}*/201 127 /*FUNCTION IntExternalResult::GetStep{{{1*/ 202 128 int IntExternalResult::GetStep(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/IntExternalResult.h ¶
r12004 r12168 14 14 #else 15 15 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 16 #endif17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include <mex.h>20 16 #endif 21 17 … … 46 42 int Id(); 47 43 int MyRank(); 48 #ifdef _SERIAL_49 void Marshall(char** pmarshalled_dataset);50 int MarshallSize();51 void Demarshall(char** pmarshalled_dataset);52 #endif53 44 int ObjectEnum(); 54 45 Object* copy(); … … 58 49 void WriteData(FILE* fid,bool io_gather); 59 50 void GetResultName(char**); 60 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)61 void SetMatlabField(mxArray* dataref);62 #endif63 51 int GetStep(void); 64 52 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/PetscVecExternalResult.cpp ¶
r12004 r12168 80 80 } 81 81 /*}}}*/ 82 #ifdef _SERIAL_83 /*FUNCTION PetscVecExternalResult::Marshall{{{1*/84 void PetscVecExternalResult::Marshall(char** pmarshalled_dataset){85 86 char* marshalled_dataset=NULL;87 int enum_value=0;88 int M;89 double* serial_value=NULL;90 91 /*recover marshalled_dataset: */92 marshalled_dataset=*pmarshalled_dataset;93 94 /*get enum value of PetscVecExternalResult: */95 enum_value=PetscVecExternalResultEnum;96 97 /*marshall enum: */98 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);99 100 /*marshall PetscVecExternalResult data: */101 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);102 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);103 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);104 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);105 106 if(value){107 VecGetSize(value,&M);108 VecToMPISerial(&serial_value,value);109 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);110 memcpy(marshalled_dataset,serial_value,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));111 }112 else{113 M=0;114 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);115 }116 /*Free ressources:*/117 xfree((void**)&serial_value);118 119 /*return:*/120 *pmarshalled_dataset=marshalled_dataset;121 }122 /*}}}*/123 /*FUNCTION PetscVecExternalResult::MarshallSize{{{1*/124 int PetscVecExternalResult::MarshallSize(){125 126 int M=0;127 if(value)VecGetSize(value,&M);128 129 return sizeof(M)+M*sizeof(double)130 +sizeof(id)131 +sizeof(enum_type)132 +sizeof(step)133 +sizeof(time)134 +sizeof(int); //sizeof(int) for enum value135 }136 /*}}}*/137 /*FUNCTION PetscVecExternalResult::Demarshall{{{1*/138 void PetscVecExternalResult::Demarshall(char** pmarshalled_dataset){139 140 char* marshalled_dataset=NULL;141 int i;142 int M;143 double* serial_vec=NULL;144 int* idxm=NULL;145 146 /*recover marshalled_dataset: */147 marshalled_dataset=*pmarshalled_dataset;148 149 /*this time, no need to get enum type, the pointer directly points to the beginning of the150 *object data (thanks to DataSet::Demarshall):*/151 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);152 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);153 154 /*data: */155 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);156 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);157 158 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);159 if(M){160 serial_vec=(double*)xmalloc(M*sizeof(double));161 memcpy(serial_vec,marshalled_dataset,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));162 163 value=NewVec(M);164 idxm=(int*)xmalloc(M*sizeof(int));165 for(i=0;i<M;i++)idxm[i]=i;166 VecSetValues(value,M,idxm,serial_vec,INSERT_VALUES);167 168 VecAssemblyBegin(value);169 VecAssemblyEnd(value);170 171 172 }173 else{174 value=NULL;175 }176 177 /*Free ressources:*/178 xfree((void**)&serial_vec);179 xfree((void**)&idxm);180 181 /*return: */182 *pmarshalled_dataset=marshalled_dataset;183 }184 /*}}}*/185 #endif186 82 /*FUNCTION PetscVecExternalResult::ObjectEnum{{{1*/ 187 83 int PetscVecExternalResult::ObjectEnum(void){ … … 244 140 } 245 141 /*}}}*/ 246 /*FUNCTION PetscVecExternalResult::SetMatlabField{{{1*/247 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)248 void PetscVecExternalResult::SetMatlabField(mxArray* dataref){249 250 mxArray* pfield=NULL;251 char* name=NULL;252 double* doublevec=NULL;253 int M;254 255 VecToMPISerial(&doublevec,value);256 VecGetSize(value,&M);257 this->GetResultName(&name);258 259 pfield=mxCreateDoubleMatrix(0,0,mxREAL);260 mxSetM(pfield,M);261 mxSetN(pfield,1);262 mxSetPr(pfield,doublevec);263 264 mxSetField( dataref, this->step-1, name, pfield);265 mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));266 mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));267 268 }269 #endif270 /*}}}*/271 142 /*FUNCTION PetscVecExternalResult::GetStep{{{1*/ 272 143 int PetscVecExternalResult::GetStep(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/PetscVecExternalResult.h ¶
r12004 r12168 15 15 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 16 16 #endif 17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include <mex.h>20 #endif21 22 17 23 18 #include "./ExternalResult.h" … … 48 43 int Id(); 49 44 int MyRank(); 50 #ifdef _SERIAL_51 void Marshall(char** pmarshalled_dataset);52 int MarshallSize();53 void Demarshall(char** pmarshalled_dataset);54 #endif55 45 int ObjectEnum(); 56 46 Object* copy(); … … 60 50 void WriteData(FILE* fid,bool io_gather); 61 51 void GetResultName(char**); 62 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)63 void SetMatlabField(mxArray* dataref);64 #endif65 52 int GetStep(void); 66 53 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/StringExternalResult.cpp ¶
r12004 r12168 71 71 } 72 72 /*}}}*/ 73 #ifdef _SERIAL_74 /*FUNCTION StringExternalResult::Marshall{{{1*/75 void StringExternalResult::Marshall(char** pmarshalled_dataset){76 77 char* marshalled_dataset=NULL;78 int enum_value=0;79 int stringsize;80 81 /*recover marshalled_dataset: */82 marshalled_dataset=*pmarshalled_dataset;83 84 /*get enum value of StringExternalResult: */85 enum_value=StringExternalResultEnum;86 87 /*marshall enum: */88 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);89 90 /*marshall data: */91 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);92 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);93 stringsize=strlen(this->value)+1;94 95 memcpy(marshalled_dataset,&stringsize,sizeof(stringsize));marshalled_dataset+=sizeof(stringsize);96 memcpy(marshalled_dataset,this->value,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);97 memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);98 memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);99 100 *pmarshalled_dataset=marshalled_dataset;101 }102 /*}}}*/103 /*FUNCTION StringExternalResult::MarshallSize{{{1*/104 int StringExternalResult::MarshallSize(){105 106 int stringsize;107 stringsize=strlen(this->value)+1;108 109 return sizeof(int)+110 +stringsize*sizeof(char)111 +sizeof(id)112 +sizeof(enum_type)113 +sizeof(step)114 +sizeof(time)115 +sizeof(int); //sizeof(int) for enum value116 }117 /*}}}*/118 /*FUNCTION StringExternalResult::Demarshall{{{1*/119 void StringExternalResult::Demarshall(char** pmarshalled_dataset){120 121 char* marshalled_dataset=NULL;122 int i;123 int stringsize;124 125 /*recover marshalled_dataset: */126 marshalled_dataset=*pmarshalled_dataset;127 128 /*this time, no need to get enum type, the pointer directly points to the beginning of the129 *object data (thanks to DataSet::Demarshall):*/130 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);131 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);132 133 memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);134 135 this->value=(char*)xmalloc(stringsize*sizeof(char));136 memcpy(value,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);137 memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);138 memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);139 140 /*return: */141 *pmarshalled_dataset=marshalled_dataset;142 return;143 }144 /*}}}*/145 #endif146 73 /*FUNCTION StringExternalResult::ObjectEnum{{{1*/ 147 74 int StringExternalResult::ObjectEnum(void){ … … 197 124 } 198 125 /*}}}*/ 199 /*FUNCTION StringExternalResult::SetMatlabField{{{1*/200 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)201 void StringExternalResult::SetMatlabField(mxArray* dataref){202 203 char* name=NULL;204 205 this->GetResultName(&name);206 207 mxSetField( dataref, this->step-1, name, mxCreateString(value));208 mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));209 mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));210 211 }212 #endif213 /*}}}*/214 126 /*FUNCTION StringExternalResult::GetStep{{{1*/ 215 127 int StringExternalResult::GetStep(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/ExternalResults/StringExternalResult.h ¶
r12004 r12168 15 15 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 16 16 #endif 17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include <mex.h>20 #endif21 22 17 23 18 #include "./ExternalResult.h" … … 48 43 int Id(); 49 44 int MyRank(); 50 #ifdef _SERIAL_51 void Marshall(char** pmarshalled_dataset);52 int MarshallSize();53 void Demarshall(char** pmarshalled_dataset);54 #endif55 45 int ObjectEnum(); 56 46 Object* copy(); … … 60 50 void WriteData(FILE* fid,bool io_gather); 61 51 void GetResultName(char**); 62 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)63 void SetMatlabField(mxArray* dataref);64 #endif65 52 int GetStep(void); 66 53 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/FemModel.cpp ¶
r11708 r12168 22 22 /*FUNCTION FemModel::constructor {{{1*/ 23 23 FemModel::FemModel(char* inputfilename, char* outputfilename, const int in_solution_type,const int* analyses,const int nummodels){ 24 #ifdef _PARALLEL_25 24 26 25 /*intermediary*/ … … 75 74 /*Add output file name to parameters: */ 76 75 this->parameters->AddObject(new StringParam(OutputfilenameEnum,outputfilename)); 77 78 #endif79 76 80 77 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Hook.cpp ¶
r9777 r12168 118 118 } 119 119 /*}}}*/ 120 #ifdef _SERIAL_121 /*FUNCTION Hook::Marshall{{{1*/122 void Hook::Marshall(char** pmarshalled_dataset){123 124 char* marshalled_dataset=NULL;125 int enum_type=0;126 int i;127 128 /*recover marshalled_dataset: */129 marshalled_dataset=*pmarshalled_dataset;130 131 /*get enum type of Hook: */132 enum_type=HookEnum;133 134 /*marshall enum: */135 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);136 137 /*marshall Hook data: */138 memcpy(marshalled_dataset,&num,sizeof(num));marshalled_dataset+=sizeof(num);139 for(i=0;i<num;i++){140 memcpy(marshalled_dataset,&this->ids[i],sizeof(int));marshalled_dataset+=sizeof(int);141 memcpy(marshalled_dataset,&this->offsets[i],sizeof(int));marshalled_dataset+=sizeof(int);142 }143 144 *pmarshalled_dataset=marshalled_dataset;145 return;146 }147 /*}}}*/148 /*FUNCTION Hook::MarshallSize{{{1*/149 int Hook::MarshallSize(){150 151 return152 sizeof(num)+153 num*sizeof(int)+154 num*sizeof(int)+155 sizeof(int); //sizeof(int) for enum type156 }157 /*}}}*/158 /*FUNCTION Hook::Demarshall{{{1*/159 void Hook::Demarshall(char** pmarshalled_dataset){160 161 char* marshalled_dataset=NULL;162 int i;163 int enum_type;164 165 /*recover marshalled_dataset: */166 marshalled_dataset=*pmarshalled_dataset;167 168 /*get enum type of object since Hook is not directly called by DataSet: */169 memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);170 171 memcpy(&num,marshalled_dataset,sizeof(num));marshalled_dataset+=sizeof(num);172 173 /*allocate: */174 if (num<0){175 _error_("cannot demarshall Hook as num<=0");176 }177 else if (num==0){178 this->ids=NULL;179 this->offsets=NULL;180 this->objects=NULL;181 }182 else{183 184 this->ids=(int*)xmalloc(num*sizeof(int));185 this->offsets=(int*)xmalloc(num*sizeof(int));186 187 /*demarshall allocated ids and offsets: */188 _assert_(num<1000);189 for (i=0;i<num;i++){190 memcpy(&this->ids[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);191 memcpy(&this->offsets[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);192 }193 194 /*nullify object pointers */195 this->objects=(Object**)xmalloc(num*sizeof(Object*));196 for (i=0;i<num;i++){197 this->objects[i]=NULL;198 }199 }200 201 /*return: */202 *pmarshalled_dataset=marshalled_dataset;203 return;204 }205 /*}}}*/206 #endif207 120 /*FUNCTION Hook::copy {{{1*/ 208 121 Object* Hook::copy(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Hook.h ¶
r9777 r12168 34 34 void Echo(void); 35 35 void DeepEcho(void); 36 #ifdef _SERIAL_37 void Marshall(char** pmarshalled_dataset);38 int MarshallSize();39 void Demarshall(char** pmarshalled_dataset);40 #endif41 36 Object* copy(void); 42 37 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/BoolInput.cpp ¶
r11984 r12168 59 59 } 60 60 /*}}}*/ 61 #ifdef _SERIAL_62 /*FUNCTION BoolInput::Marshall{{{1*/63 void BoolInput::Marshall(char** pmarshalled_dataset){64 65 char* marshalled_dataset=NULL;66 int enum_value=0;67 68 /*recover marshalled_dataset: */69 marshalled_dataset=*pmarshalled_dataset;70 71 /*get enum value of BoolInput: */72 enum_value=BoolInputEnum;73 74 /*marshall enum: */75 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);76 77 /*marshall BoolInput data: */78 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);79 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);80 81 *pmarshalled_dataset=marshalled_dataset;82 }83 /*}}}*/84 /*FUNCTION BoolInput::MarshallSize{{{1*/85 int BoolInput::MarshallSize(){86 87 return sizeof(value)+88 +sizeof(enum_type)+89 +sizeof(int); //sizeof(int) for enum value90 }91 /*}}}*/92 /*FUNCTION BoolInput::Demarshall{{{1*/93 void BoolInput::Demarshall(char** pmarshalled_dataset){94 95 char* marshalled_dataset=NULL;96 int i;97 98 /*recover marshalled_dataset: */99 marshalled_dataset=*pmarshalled_dataset;100 101 /*this time, no need to get enum type, the pointer directly points to the beginning of the102 *object data (thanks to DataSet::Demarshall):*/103 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);104 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);105 106 /*return: */107 *pmarshalled_dataset=marshalled_dataset;108 return;109 }110 /*}}}*/111 #endif112 61 /*FUNCTION BoolInput::ObjectEnum{{{1*/ 113 62 int BoolInput::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/BoolInput.h ¶
r11984 r12168 31 31 int Id(); 32 32 int MyRank(); 33 #ifdef _SERIAL_34 void Marshall(char** pmarshalled_dataset);35 int MarshallSize();36 void Demarshall(char** pmarshalled_dataset);37 #endif38 33 int ObjectEnum(); 39 34 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/ControlInput.h ¶
r11984 r12168 36 36 int Id(); 37 37 int MyRank(); 38 #ifdef _SERIAL_39 void Marshall(char** pmarshalled_dataset);40 int MarshallSize();41 void Demarshall(char** pmarshalled_dataset);42 #endif43 38 int ObjectEnum(); 44 39 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/DatasetInput.cpp ¶
r10135 r12168 61 61 } 62 62 /*}}}*/ 63 #ifdef _SERIAL_64 /*FUNCTION DatasetInput::Marshall{{{1*/65 void DatasetInput::Marshall(char** pmarshalled_dataset){66 67 char* marshalled_dataset=NULL;68 char* marshalled_inputs=NULL;69 int marshalled_inputs_size;70 int enum_value=0;71 72 /*recover marshalled_dataset: */73 marshalled_dataset=*pmarshalled_dataset;74 75 /*get enum value of DatasetInput: */76 enum_value=DatasetInputEnum;77 78 /*marshall enum: */79 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);80 81 /*marshall enum_type: */82 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);83 84 /*marshal inputs*/85 marshalled_inputs_size=inputs->MarshallSize();86 marshalled_inputs=inputs->Marshall();87 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));88 marshalled_dataset+=marshalled_inputs_size;89 90 /*clean up and assign output pointer*/91 xfree((void**)&marshalled_inputs);92 *pmarshalled_dataset=marshalled_dataset;93 }94 /*}}}*/95 /*FUNCTION DatasetInput::MarshallSize{{{1*/96 int DatasetInput::MarshallSize(){97 98 int size=0;99 100 size=sizeof(enum_type)+101 +inputs->MarshallSize()102 +sizeof(int); //sizeof(int) for enum value103 104 return size;105 }106 /*}}}*/107 /*FUNCTION DatasetInput::Demarshall{{{1*/108 void DatasetInput::Demarshall(char** pmarshalled_dataset){109 char* marshalled_dataset=NULL;110 111 /*recover marshalled_dataset: */112 marshalled_dataset=*pmarshalled_dataset;113 114 /*this time, no need to get enum type, the pointer directly points to the beginning of the115 *object data (thanks to DataSet::Demarshall):*/116 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);117 118 /*Demarshal values*/119 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);120 121 /*return: */122 *pmarshalled_dataset=marshalled_dataset;123 return;124 }125 /*}}}*/126 #endif127 63 /*FUNCTION DatasetInput::ObjectEnum{{{1*/ 128 64 int DatasetInput::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/DatasetInput.h ¶
r11984 r12168 31 31 int Id(); 32 32 int MyRank(); 33 #ifdef _SERIAL_34 void Marshall(char** pmarshalled_dataset);35 int MarshallSize();36 void Demarshall(char** pmarshalled_dataset);37 #endif38 33 int ObjectEnum(); 39 34 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/DoubleInput.cpp ¶
r11984 r12168 59 59 } 60 60 /*}}}*/ 61 #ifdef _SERIAL_62 /*FUNCTION DoubleInput::Marshall{{{1*/63 void DoubleInput::Marshall(char** pmarshalled_dataset){64 65 char* marshalled_dataset=NULL;66 int enum_value=0;67 68 /*recover marshalled_dataset: */69 marshalled_dataset=*pmarshalled_dataset;70 71 /*get enum value of DoubleInput: */72 enum_value=DoubleInputEnum;73 74 /*marshall enum: */75 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);76 77 /*marshall DoubleInput data: */78 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);79 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);80 81 *pmarshalled_dataset=marshalled_dataset;82 }83 /*}}}*/84 /*FUNCTION DoubleInput::MarshallSize{{{1*/85 int DoubleInput::MarshallSize(){86 87 return sizeof(value)+88 +sizeof(enum_type)+89 +sizeof(int); //sizeof(int) for enum value90 }91 /*}}}*/92 /*FUNCTION DoubleInput::Demarshall{{{1*/93 void DoubleInput::Demarshall(char** pmarshalled_dataset){94 95 char* marshalled_dataset=NULL;96 int i;97 98 /*recover marshalled_dataset: */99 marshalled_dataset=*pmarshalled_dataset;100 101 /*this time, no need to get enum type, the pointer directly points to the beginning of the102 *object data (thanks to DataSet::Demarshall):*/103 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);104 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);105 106 /*return: */107 *pmarshalled_dataset=marshalled_dataset;108 return;109 }110 /*}}}*/111 #endif112 61 /*FUNCTION DoubleInput::ObjectEnum{{{1*/ 113 62 int DoubleInput::ObjectEnum(void){ … … 159 108 /*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{1*/ 160 109 void DoubleInput::GetInputValue(bool* pvalue){ 161 #ifdef _SERIAL_162 *pvalue=(bool)value;163 #else164 110 _error_("Double input of enum %s cannot return a boolean",EnumToStringx(enum_type)); 165 #endif166 111 167 112 } … … 169 114 /*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{1*/ 170 115 void DoubleInput::GetInputValue(int* pvalue){ 171 #ifdef _SERIAL_172 *pvalue=(int)value;173 #else174 116 _error_("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type)); 175 #endif176 117 177 118 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/DoubleInput.h ¶
r11984 r12168 30 30 int Id(); 31 31 int MyRank(); 32 #ifdef _SERIAL_33 void Marshall(char** pmarshalled_dataset);34 int MarshallSize();35 void Demarshall(char** pmarshalled_dataset);36 #endif37 32 int ObjectEnum(); 38 33 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/IntInput.cpp ¶
r11984 r12168 54 54 } 55 55 /*}}}*/ 56 #ifdef _SERIAL_57 /*FUNCTION IntInput::Marshall{{{1*/58 void IntInput::Marshall(char** pmarshalled_dataset){59 60 char* marshalled_dataset=NULL;61 int enum_value=0;62 63 /*recover marshalled_dataset: */64 marshalled_dataset=*pmarshalled_dataset;65 66 /*get enum value of IntInput: */67 enum_value=IntInputEnum;68 69 /*marshall enum: */70 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);71 72 /*marshall IntInput data: */73 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);74 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);75 76 *pmarshalled_dataset=marshalled_dataset;77 }78 /*}}}*/79 /*FUNCTION IntInput::MarshallSize{{{1*/80 int IntInput::MarshallSize(){81 82 return sizeof(value)+83 +sizeof(enum_type)+84 +sizeof(int); //sizeof(int) for enum value85 }86 /*}}}*/87 /*FUNCTION IntInput::Demarshall{{{1*/88 void IntInput::Demarshall(char** pmarshalled_dataset){89 90 char* marshalled_dataset=NULL;91 int i;92 93 /*recover marshalled_dataset: */94 marshalled_dataset=*pmarshalled_dataset;95 96 /*this time, no need to get enum type, the pointer directly points to the beginning of the97 *object data (thanks to DataSet::Demarshall):*/98 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);99 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);100 101 /*return: */102 *pmarshalled_dataset=marshalled_dataset;103 return;104 }105 /*}}}*/106 #endif107 56 /*FUNCTION IntInput::ObjectEnum{{{1*/ 108 57 int IntInput::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/IntInput.h ¶
r11984 r12168 31 31 int Id(); 32 32 int MyRank(); 33 #ifdef _SERIAL_34 void Marshall(char** pmarshalled_dataset);35 int MarshallSize();36 void Demarshall(char** pmarshalled_dataset);37 #endif38 33 int ObjectEnum(); 39 34 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/PentaP1Input.cpp ¶
r11984 r12168 70 70 } 71 71 /*}}}*/ 72 #ifdef _SERIAL_73 /*FUNCTION PentaP1Input::Marshall{{{1*/74 void PentaP1Input::Marshall(char** pmarshalled_dataset){75 76 char* marshalled_dataset=NULL;77 int enum_value=0;78 79 /*recover marshalled_dataset: */80 marshalled_dataset=*pmarshalled_dataset;81 82 /*get enum value of PentaP1Input: */83 enum_value=PentaP1InputEnum;84 85 /*marshall enum: */86 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);87 88 /*marshall PentaP1Input data: */89 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);90 memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);91 92 *pmarshalled_dataset=marshalled_dataset;93 }94 /*}}}*/95 /*FUNCTION PentaP1Input::MarshallSize{{{1*/96 int PentaP1Input::MarshallSize(){97 98 return sizeof(values)+99 +sizeof(enum_type)+100 +sizeof(int); //sizeof(int) for enum value101 }102 /*}}}*/103 /*FUNCTION PentaP1Input::Demarshall{{{1*/104 void PentaP1Input::Demarshall(char** pmarshalled_dataset){105 106 char* marshalled_dataset=NULL;107 int i;108 109 /*recover marshalled_dataset: */110 marshalled_dataset=*pmarshalled_dataset;111 112 /*this time, no need to get enum type, the pointer directly points to the beginning of the113 *object data (thanks to DataSet::Demarshall):*/114 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);115 memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);116 117 /*return: */118 *pmarshalled_dataset=marshalled_dataset;119 return;120 }121 /*}}}*/122 #endif123 72 /*FUNCTION PentaP1Input::ObjectEnum{{{1*/ 124 73 int PentaP1Input::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/PentaP1Input.h ¶
r11984 r12168 31 31 int Id(); 32 32 int MyRank(); 33 #ifdef _SERIAL_34 void Marshall(char** pmarshalled_dataset);35 int MarshallSize();36 void Demarshall(char** pmarshalled_dataset);37 #endif38 33 int ObjectEnum(); 39 34 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/TransientInput.cpp ¶
r11708 r12168 114 114 } 115 115 /*}}}*/ 116 #ifdef _SERIAL_117 /*FUNCTION TransientInput::Marshall{{{1*/118 void TransientInput::Marshall(char** pmarshalled_dataset){119 120 char* marshalled_dataset=NULL;121 char* marshalled_inputs=NULL;122 int marshalled_inputs_size;123 int enum_value=0;124 125 /*recover marshalled_dataset: */126 marshalled_dataset=*pmarshalled_dataset;127 128 /*get enum value of TransientInput: */129 enum_value=TransientInputEnum;130 131 /*marshall enum: */132 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);133 134 /*marshall TransientInput data: */135 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);136 memcpy(marshalled_dataset,&numtimesteps,sizeof(numtimesteps));marshalled_dataset+=sizeof(numtimesteps);137 memcpy(marshalled_dataset,timesteps,numtimesteps*sizeof(double));marshalled_dataset+=numtimesteps*sizeof(double);138 139 /*marshal inputs*/140 marshalled_inputs_size=inputs->MarshallSize();141 marshalled_inputs=inputs->Marshall();142 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));143 marshalled_dataset+=marshalled_inputs_size;144 145 /*clean up and assign output pointer*/146 xfree((void**)&marshalled_inputs);147 *pmarshalled_dataset=marshalled_dataset;148 149 }150 /*}}}*151 /*FUNCTION TransientInput::MarshallSize{{{1*/152 int TransientInput::MarshallSize(){153 154 return155 +sizeof(enum_type)+156 +sizeof(numtimesteps)+157 +inputs->MarshallSize()158 +numtimesteps*sizeof(double)+159 +sizeof(int); //sizeof(int) for enum value160 }161 /*}}}*/162 /*FUNCTION TransientInput::Demarshall{{{1*/163 void TransientInput::Demarshall(char** pmarshalled_dataset){164 165 char* marshalled_dataset=NULL;166 167 /*recover marshalled_dataset: */168 marshalled_dataset=*pmarshalled_dataset;169 170 /*this time, no need to get enum type, the pointer directly points to the beginning of the171 *object data (thanks to DataSet::Demarshall):*/172 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);173 memcpy(&numtimesteps,marshalled_dataset,sizeof(numtimesteps));marshalled_dataset+=sizeof(numtimesteps);174 175 /*allocate: */176 timesteps=(double*)xmalloc(numtimesteps*sizeof(double));177 memcpy(timesteps,marshalled_dataset,numtimesteps*sizeof(double));marshalled_dataset+=numtimesteps*sizeof(double);178 179 /*Demarshal values*/180 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);181 182 /*return: */183 *pmarshalled_dataset=marshalled_dataset;184 return;185 186 }187 /*}}}*/188 #endif189 116 /*FUNCTION TransientInput::ObjectEnum{{{1*/ 190 117 int TransientInput::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/TransientInput.h ¶
r11984 r12168 34 34 int Id(); 35 35 int MyRank(); 36 #ifdef _SERIAL_37 void Marshall(char** pmarshalled_dataset);38 int MarshallSize();39 void Demarshall(char** pmarshalled_dataset);40 #endif41 36 int ObjectEnum(); 42 37 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/TriaP1Input.cpp ¶
r11984 r12168 70 70 } 71 71 /*}}}*/ 72 #ifdef _SERIAL_73 /*FUNCTION TriaP1Input::Marshall{{{1*/74 void TriaP1Input::Marshall(char** pmarshalled_dataset){75 76 char* marshalled_dataset=NULL;77 int enum_value=0;78 79 /*recover marshalled_dataset: */80 marshalled_dataset=*pmarshalled_dataset;81 82 /*get enum value of TriaP1Input: */83 enum_value=TriaP1InputEnum;84 85 /*marshall enum: */86 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);87 88 /*marshall TriaP1Input data: */89 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);90 memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);91 92 *pmarshalled_dataset=marshalled_dataset;93 }94 /*}}}*/95 /*FUNCTION TriaP1Input::MarshallSize{{{1*/96 int TriaP1Input::MarshallSize(){97 98 return sizeof(values)+99 +sizeof(enum_type)+100 +sizeof(int); //sizeof(int) for enum value101 }102 /*}}}*/103 /*FUNCTION TriaP1Input::Demarshall{{{1*/104 void TriaP1Input::Demarshall(char** pmarshalled_dataset){105 106 char* marshalled_dataset=NULL;107 int i;108 109 /*recover marshalled_dataset: */110 marshalled_dataset=*pmarshalled_dataset;111 112 /*this time, no need to get enum type, the pointer directly points to the beginning of the113 *object data (thanks to DataSet::Demarshall):*/114 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);115 memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);116 117 /*return: */118 *pmarshalled_dataset=marshalled_dataset;119 return;120 }121 /*}}}*/122 #endif123 72 /*FUNCTION TriaP1Input::ObjectEnum{{{1*/ 124 73 int TriaP1Input::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Inputs/TriaP1Input.h ¶
r11984 r12168 31 31 int Id(); 32 32 int MyRank(); 33 #ifdef _SERIAL_34 void Marshall(char** pmarshalled_dataset);35 int MarshallSize();36 void Demarshall(char** pmarshalled_dataset);37 #endif38 33 int ObjectEnum(); 39 34 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/IoModel.cpp ¶
r10390 r12168 198 198 /*Ok, we have reached the end of the file. break: */ 199 199 record_code=0; //0 means bailout 200 #ifdef _HAVE_MPI_ 200 201 MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD); /*tell others cpus we are bailing: */ 202 #endif 201 203 break; 202 204 } … … 207 209 fread(&record_code,sizeof(int),1,this->fid); 208 210 211 #ifdef _HAVE_MPI_ 209 212 /*Tell other cpus what we are doing: */ 210 213 MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD); /*tell other cpus what we are going to do: */ … … 213 216 MPI_Bcast(&record_enum,1,MPI_INT,0,MPI_COMM_WORLD); 214 217 MPI_Bcast(&record_length,1,MPI_INT,0,MPI_COMM_WORLD); 218 #endif 215 219 216 217 220 switch(record_code){ 218 221 case 1: 219 222 /*Read the boolean and broadcast it to other cpus:*/ 220 223 if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error_(" could not read boolean "); 224 #ifdef _HAVE_MPI_ 221 225 MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 226 #endif 222 227 223 228 /*create BoolParam: */ … … 228 233 /*Read the integer and broadcast it to other cpus:*/ 229 234 if(fread(&integer,sizeof(int),1,this->fid)!=1) _error_(" could not read integer "); 235 #ifdef _HAVE_MPI_ 230 236 MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 237 #endif 231 238 232 239 /*create IntParam: */ … … 237 244 /*Read the scalar and broadcast it to other cpus:*/ 238 245 if(fread(&scalar,sizeof(double),1,this->fid)!=1) _error_(" could not read scalar "); 246 #ifdef _HAVE_MPI_ 239 247 MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 248 #endif 240 249 241 250 /*create DoubleParam: */ … … 246 255 /*We have to read a string from disk. First read the dimensions of the string, then the string: */ 247 256 if(fread(&string_size,sizeof(int),1,this->fid)!=1) _error_(" could not read length of string "); 257 #ifdef _HAVE_MPI_ 248 258 MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 259 #endif 249 260 250 261 if(string_size){ … … 254 265 /*Read string, then broadcast: */ 255 266 if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error_(" could not read string "); 267 #ifdef _HAVE_MPI_ 256 268 MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 269 #endif 257 270 } 258 271 else{ … … 308 321 } 309 322 } //}}} 323 #ifdef _HAVE_MPI_ 310 324 else{ //cpu ~0 {{{2 311 325 for(;;){ //wait on cpu 0 … … 377 391 } 378 392 } //}}} 393 #endif 379 394 } 380 395 /*}}}*/ … … 399 414 if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_(" could not read boolean "); 400 415 } 416 #ifdef _HAVE_MPI_ 401 417 MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 418 #endif 402 419 403 420 /*cast to bool: */ … … 428 445 } 429 446 447 #ifdef _HAVE_MPI_ 430 448 MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 449 #endif 431 450 432 451 /*Assign output pointers: */ … … 456 475 if(fread(&scalar,sizeof(double),1,fid)!=1)_error_(" could not read scalar "); 457 476 } 477 #ifdef _HAVE_MPI_ 458 478 MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 479 #endif 459 480 460 481 /*Assign output pointers: */ … … 487 508 } 488 509 510 #ifdef _HAVE_MPI_ 489 511 MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 512 #endif 490 513 491 514 /*Now allocate string: */ … … 498 521 if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string "); 499 522 } 523 #ifdef _HAVE_MPI_ 500 524 MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 525 #endif 501 526 } 502 527 else{ … … 538 563 } 539 564 565 #ifdef _HAVE_MPI_ 540 566 MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 567 #endif 541 568 542 569 if(my_rank==0){ 543 570 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 544 571 } 545 MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 572 #ifdef _HAVE_MPI_ 573 MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 574 #endif 546 575 547 576 /*Now allocate matrix: */ … … 554 583 } 555 584 585 #ifdef _HAVE_MPI_ 556 586 MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 587 #endif 557 588 } 558 589 … … 602 633 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix "); 603 634 } 635 #ifdef _HAVE_MPI_ 604 636 MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 637 #endif 605 638 606 639 if(my_rank==0){ 607 640 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 608 641 } 642 #ifdef _HAVE_MPI_ 609 643 MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 644 #endif 610 645 611 646 /*Now allocate matrix: */ … … 617 652 if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix "); 618 653 } 654 #ifdef _HAVE_MPI_ 619 655 MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 656 #endif 620 657 } 621 658 … … 652 689 if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_(" could not read length of string array"); 653 690 } 691 #ifdef _HAVE_MPI_ 654 692 MPI_Bcast(&numstrings,1,MPI_INT,0,MPI_COMM_WORLD); 693 #endif 655 694 656 695 /*Now allocate string array: */ … … 665 704 if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string "); 666 705 } 706 #ifdef _HAVE_MPI_ 667 707 MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 708 #endif 668 709 if(string_size){ 669 710 string=(char*)xmalloc((string_size+1)*sizeof(char)); … … 674 715 if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string "); 675 716 } 717 #ifdef _HAVE_MPI_ 676 718 MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 719 #endif 677 720 } 678 721 else{ … … 717 760 if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array "); 718 761 } 762 #ifdef _HAVE_MPI_ 719 763 MPI_Bcast(&numrecords,1,MPI_INT,0,MPI_COMM_WORLD); 764 #endif 720 765 721 766 if(numrecords){ … … 738 783 if(fread(&M,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of rows in ",i,"th matrix of matrix array"); 739 784 } 785 #ifdef _HAVE_MPI_ 740 786 MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 787 #endif 741 788 742 789 if(my_rank==0){ 743 790 if(fread(&N,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of columns in ",i,"th matrix of matrix array"); 744 791 } 792 #ifdef _HAVE_MPI_ 745 793 MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 794 #endif 746 795 747 796 /*Now allocate matrix: */ … … 754 803 } 755 804 805 #ifdef _HAVE_MPI_ 756 806 MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 807 #endif 757 808 } 758 809 … … 1047 1098 } 1048 1099 } 1100 #ifdef _HAVE_MPI_ 1049 1101 MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 1050 1102 if(!found)_error_("%s %s ","could not find data with name",EnumToStringx(data_enum)); 1103 #endif 1051 1104 1052 1105 /*Broadcast code and vector type: */ 1106 #ifdef _HAVE_MPI_ 1053 1107 MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD); 1054 1108 MPI_Bcast(&vector_type,1,MPI_INT,0,MPI_COMM_WORLD); 1055 1109 if(record_code==5) MPI_Bcast(&vector_type,1,MPI_INT,0,MPI_COMM_WORLD); 1110 #endif 1056 1111 1057 1112 /*Assign output pointers:*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Icefront.cpp ¶
r12004 r12168 163 163 } 164 164 /*}}}*/ 165 #ifdef _SERIAL_166 /*FUNCTION Icefront::Marshall {{{1*/167 void Icefront::Marshall(char** pmarshalled_dataset){168 169 char* marshalled_dataset=NULL;170 int enum_type=0;171 char* marshalled_inputs=NULL;172 int marshalled_inputs_size;173 174 /*recover marshalled_dataset: */175 marshalled_dataset=*pmarshalled_dataset;176 177 /*get enum type of Icefront: */178 enum_type=IcefrontEnum;179 180 /*marshall enum: */181 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);182 183 /*marshall Icefront data: */184 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);185 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);186 187 /*Marshall hooks: */188 hnodes->Marshall(&marshalled_dataset);189 helement->Marshall(&marshalled_dataset);190 hmatpar->Marshall(&marshalled_dataset);191 192 /*Marshall inputs: */193 marshalled_inputs_size=inputs->MarshallSize();194 marshalled_inputs=inputs->Marshall();195 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));196 marshalled_dataset+=marshalled_inputs_size;197 198 /*parameters: don't do anything about it. parameters are marshalled somewhere else!*/199 200 xfree((void**)&marshalled_inputs);201 202 *pmarshalled_dataset=marshalled_dataset;203 }204 /*}}}*/205 /*FUNCTION Icefront::MarshallSize {{{1*/206 int Icefront::MarshallSize(){207 208 return sizeof(id)209 +sizeof(analysis_type)210 +hnodes->MarshallSize()211 +helement->MarshallSize()212 +hmatpar->MarshallSize()213 +inputs->MarshallSize()214 +sizeof(int); //sizeof(int) for enum type215 }216 /*}}}*/217 /*FUNCTION Icefront::Demarshall {{{1*/218 void Icefront::Demarshall(char** pmarshalled_dataset){219 220 char* marshalled_dataset=NULL;221 int i;222 223 /*recover marshalled_dataset: */224 marshalled_dataset=*pmarshalled_dataset;225 226 /*this time, no need to get enum type, the pointer directly points to the beginning of the227 *object data (thanks to DataSet::Demarshall):*/228 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);229 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);230 231 /*demarshall hooks: */232 hnodes=new Hook(); hnodes->Demarshall(&marshalled_dataset);233 helement=new Hook(); helement->Demarshall(&marshalled_dataset);234 hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);235 236 /*pointers are garbabe, until configuration is carried out: */237 nodes=NULL;238 element=NULL;239 matpar=NULL;240 241 /*demarshall inputs: */242 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);243 244 /*parameters: may not exist even yet, so let Configure handle it: */245 this->parameters=NULL;246 247 /*return: */248 *pmarshalled_dataset=marshalled_dataset;249 return;250 }251 /*}}}*/252 #endif253 165 /*FUNCTION Icefront::ObjectEnum{{{1*/ 254 166 int Icefront::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Icefront.h ¶
r12004 r12168 49 49 int Id(); 50 50 int MyRank(); 51 #ifdef _SERIAL_52 void Marshall(char** pmarshalled_dataset);53 int MarshallSize();54 void Demarshall(char** pmarshalled_dataset);55 #endif56 51 int ObjectEnum(); 57 52 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Numericalflux.cpp ¶
r11684 r12168 189 189 } 190 190 /*}}}*/ 191 #ifdef _SERIAL_192 /*FUNCTION Numericalflux::Marshall {{{1*/193 void Numericalflux::Marshall(char** pmarshalled_dataset){194 195 char* marshalled_dataset=NULL;196 int enum_type=0;197 char* marshalled_inputs=NULL;198 int marshalled_inputs_size;199 200 /*recover marshalled_dataset: */201 marshalled_dataset=*pmarshalled_dataset;202 203 /*get enum type of Numericalflux: */204 enum_type=NumericalfluxEnum;205 206 /*marshall enum: */207 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);208 209 /*marshall Numericalflux data: */210 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);211 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);212 213 /*Marshall hooks: */214 hnodes->Marshall(&marshalled_dataset);215 helement->Marshall(&marshalled_dataset);216 217 /*Marshall inputs: */218 marshalled_inputs_size=inputs->MarshallSize();219 marshalled_inputs=inputs->Marshall();220 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));221 marshalled_dataset+=marshalled_inputs_size;222 223 /*parameters: don't do anything about it. parameters are marshalled somewhere else!*/224 225 xfree((void**)&marshalled_inputs);226 227 *pmarshalled_dataset=marshalled_dataset;228 return;229 }230 /*}}}*/231 /*FUNCTION Numericalflux::MarshallSize{{{1*/232 int Numericalflux::MarshallSize(){233 234 return sizeof(id)235 +sizeof(analysis_type)236 +hnodes->MarshallSize()237 +helement->MarshallSize()238 +inputs->MarshallSize()239 +sizeof(int); //sizeof(int) for enum type240 }241 /*}}}*/242 /*FUNCTION Numericalflux::Demarshall {{{1*/243 void Numericalflux::Demarshall(char** pmarshalled_dataset){244 245 char* marshalled_dataset=NULL;246 int i;247 248 /*recover marshalled_dataset: */249 marshalled_dataset=*pmarshalled_dataset;250 251 /*this time, no need to get enum type, the pointer directly points to the beginning of the252 *object data (thanks to DataSet::Demarshall):*/253 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);254 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);255 256 /*demarshall hooks: */257 hnodes=new Hook(); hnodes->Demarshall(&marshalled_dataset);258 helement=new Hook(); helement->Demarshall(&marshalled_dataset);259 260 /*demarshall inputs: */261 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);262 263 /*parameters: may not exist even yet, so let Configure handle it: */264 this->parameters=NULL;265 this->element=NULL;266 this->nodes=NULL;267 268 /*return: */269 *pmarshalled_dataset=marshalled_dataset;270 return;271 }272 /*}}}*/273 #endif274 191 /*FUNCTION Numericalflux::ObjectEnum{{{1*/ 275 192 int Numericalflux::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Numericalflux.h ¶
r11684 r12168 45 45 int Id(); 46 46 int MyRank(); 47 #ifdef _SERIAL_48 void Marshall(char** pmarshalled_dataset);49 int MarshallSize();50 void Demarshall(char** pmarshalled_dataset);51 #endif52 47 int ObjectEnum(); 53 48 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Pengrid.cpp ¶
r11684 r12168 132 132 } 133 133 /*}}}1*/ 134 #ifdef _SERIAL_135 /*FUNCTION Pengrid::Marshall {{{1*/136 void Pengrid::Marshall(char** pmarshalled_dataset){137 138 char* marshalled_dataset=NULL;139 int enum_type=0;140 char* marshalled_inputs=NULL;141 int marshalled_inputs_size;142 143 /*recover marshalled_dataset: */144 marshalled_dataset=*pmarshalled_dataset;145 146 /*get enum type of Tria: */147 enum_type=PengridEnum;148 149 /*marshall enum: */150 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);151 152 /*marshall Tria data: */153 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);154 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);155 memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);156 memcpy(marshalled_dataset,&zigzag_counter,sizeof(zigzag_counter));marshalled_dataset+=sizeof(zigzag_counter);157 158 /*Marshall hooks: */159 hnode->Marshall(&marshalled_dataset);160 helement->Marshall(&marshalled_dataset);161 hmatpar->Marshall(&marshalled_dataset);162 163 /*Marshall inputs: */164 marshalled_inputs_size=inputs->MarshallSize();165 marshalled_inputs=inputs->Marshall();166 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));167 marshalled_dataset+=marshalled_inputs_size;168 169 /*parameters: don't do anything about it. parameters are marshalled somewhere else!*/170 171 xfree((void**)&marshalled_inputs);172 173 *pmarshalled_dataset=marshalled_dataset;174 return;175 }176 /*}}}*/177 /*FUNCTION Pengrid::MarshallSize {{{1*/178 int Pengrid::MarshallSize(){179 180 return sizeof(id)181 +sizeof(analysis_type)182 +sizeof(active)183 +sizeof(zigzag_counter)184 +hnode->MarshallSize()185 +helement->MarshallSize()186 +hmatpar->MarshallSize()187 +inputs->MarshallSize()188 +sizeof(int); //sizeof(int) for enum type189 }190 /*}}}*/191 /*FUNCTION Pengrid::Demarshall {{{1*/192 void Pengrid::Demarshall(char** pmarshalled_dataset){193 194 char* marshalled_dataset=NULL;195 int i;196 197 /*recover marshalled_dataset: */198 marshalled_dataset=*pmarshalled_dataset;199 200 /*this time, no need to get enum type, the pointer directly points to the beginning of the201 *object data (thanks to DataSet::Demarshall):*/202 203 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);204 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);205 memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);206 memcpy(&zigzag_counter,marshalled_dataset,sizeof(zigzag_counter));marshalled_dataset+=sizeof(zigzag_counter);207 208 /*demarshall hooks: */209 hnode=new Hook(); hnode->Demarshall(&marshalled_dataset);210 helement=new Hook(); helement->Demarshall(&marshalled_dataset);211 hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);212 213 /*demarshall inputs: */214 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);215 216 /*parameters: may not exist even yet, so let Configure handle it: */217 this->parameters=NULL;218 this->node=NULL;219 this->element=NULL;220 this->matpar=NULL;221 222 /*return: */223 *pmarshalled_dataset=marshalled_dataset;224 return;225 }226 /*}}}*/227 #endif228 134 /*FUNCTION Pengrid::ObjectEnum{{{1*/ 229 135 int Pengrid::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Pengrid.h ¶
r11684 r12168 50 50 int Id(); 51 51 int MyRank(); 52 #ifdef _SERIAL_53 void Marshall(char** pmarshalled_dataset);54 int MarshallSize();55 void Demarshall(char** pmarshalled_dataset);56 #endif57 52 int ObjectEnum(); 58 53 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Penpair.cpp ¶
r11684 r12168 85 85 } 86 86 /*}}}1*/ 87 #ifdef _SERIAL_88 /*FUNCTION Penpair::Marshall {{{1*/89 void Penpair::Marshall(char** pmarshalled_dataset){90 91 char* marshalled_dataset=NULL;92 int enum_type=0;93 94 /*recover marshalled_dataset: */95 marshalled_dataset=*pmarshalled_dataset;96 97 /*get enum type of Penpair: */98 enum_type=PenpairEnum;99 100 /*marshall enum: */101 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);102 103 /*marshall Penpair data: */104 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);105 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);106 107 /*Marshall hooks*/108 hnodes->Marshall(&marshalled_dataset);109 110 *pmarshalled_dataset=marshalled_dataset;111 return;112 }113 /*}}}1*/114 /*FUNCTION Penpair::MarshallSize {{{1*/115 int Penpair::MarshallSize(){116 117 return sizeof(id)+118 +sizeof(analysis_type)119 +hnodes->MarshallSize()120 +sizeof(int); //sizeof(int) for enum type121 }122 /*}}}1*/123 /*FUNCTION Penpair::Demarshall {{{1*/124 void Penpair::Demarshall(char** pmarshalled_dataset){125 126 int i;127 char* marshalled_dataset=NULL;128 129 /*recover marshalled_dataset: */130 marshalled_dataset=*pmarshalled_dataset;131 132 /*this time, no need to get enum type, the pointer directly points to the beginning of the133 *object data (thanks to DataSet::Demarshall):*/134 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);135 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);136 137 /*demarshall hooks: */138 hnodes=new Hook(); hnodes->Demarshall(&marshalled_dataset);139 140 /*pointers are garbabe, until configuration is carried out: */141 nodes=NULL;142 parameters=NULL;143 144 /*return: */145 *pmarshalled_dataset=marshalled_dataset;146 return;147 }148 /*}}}1*/149 #endif150 87 /*FUNCTION Penpair::ObjectEnum{{{1*/ 151 88 int Penpair::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Penpair.h ¶
r11684 r12168 37 37 int Id(); 38 38 int MyRank(); 39 #ifdef _SERIAL_40 void Marshall(char** pmarshalled_dataset);41 int MarshallSize();42 void Demarshall(char** pmarshalled_dataset);43 #endif44 39 int ObjectEnum(); 45 40 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Riftfront.cpp ¶
r11684 r12168 192 192 } 193 193 /*}}}1*/ 194 #ifdef _SERIAL_195 /*FUNCTION Riftfront::Marshall {{{1*/196 void Riftfront::Marshall(char** pmarshalled_dataset){197 198 char* marshalled_dataset=NULL;199 int enum_type=0;200 char* marshalled_inputs=NULL;201 int marshalled_inputs_size;202 203 /*recover marshalled_dataset: */204 marshalled_dataset=*pmarshalled_dataset;205 206 /*get enum type of Riftfront: */207 enum_type=RiftfrontEnum;208 209 /*marshall enum: */210 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);211 212 /*marshall Riftfront data: */213 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);214 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);215 memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);216 memcpy(marshalled_dataset,&normal,sizeof(normal));marshalled_dataset+=sizeof(normal);217 memcpy(marshalled_dataset,&length,sizeof(length));marshalled_dataset+=sizeof(length);218 memcpy(marshalled_dataset,&fraction,sizeof(fraction));marshalled_dataset+=sizeof(fraction);219 memcpy(marshalled_dataset,&frozen,sizeof(frozen));marshalled_dataset+=sizeof(frozen);220 memcpy(marshalled_dataset,&state,sizeof(state));marshalled_dataset+=sizeof(state);221 memcpy(marshalled_dataset,&counter,sizeof(counter));marshalled_dataset+=sizeof(counter);222 memcpy(marshalled_dataset,&prestable,sizeof(prestable));marshalled_dataset+=sizeof(prestable);223 memcpy(marshalled_dataset,&penalty_lock,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);224 memcpy(marshalled_dataset,&material_converged,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);225 226 /*Marshall hooks: */227 hnodes->Marshall(&marshalled_dataset);228 helements->Marshall(&marshalled_dataset);229 hmatpar->Marshall(&marshalled_dataset);230 231 /*Marshall inputs: */232 marshalled_inputs_size=inputs->MarshallSize();233 marshalled_inputs=inputs->Marshall();234 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));235 marshalled_dataset+=marshalled_inputs_size;236 237 /*parameters: don't do anything about it. parameters are marshalled somewhere else!*/238 239 xfree((void**)&marshalled_inputs);240 241 *pmarshalled_dataset=marshalled_dataset;242 return;243 }244 /*}}}*/245 /*FUNCTION Riftfront::MarshallSize {{{1*/246 int Riftfront::MarshallSize(){247 248 return sizeof(id)249 +sizeof(analysis_type)250 +sizeof(active)251 +sizeof(normal)252 +sizeof(length)253 +sizeof(fraction)254 +sizeof(frozen)255 +sizeof(state)256 +sizeof(counter)257 +sizeof(prestable)258 +sizeof(penalty_lock)259 +sizeof(material_converged)260 +hnodes->MarshallSize()261 +helements->MarshallSize()262 +hmatpar->MarshallSize()263 +inputs->MarshallSize()264 +sizeof(int); //sizeof(int) for enum type265 }266 /*}}}*/267 /*FUNCTION Riftfront::Demarshall {{{1*/268 void Riftfront::Demarshall(char** pmarshalled_dataset){269 270 char* marshalled_dataset=NULL;271 int i;272 273 /*recover marshalled_dataset: */274 marshalled_dataset=*pmarshalled_dataset;275 276 /*this time, no need to get enum type, the pointer directly points to the beginning of the277 *object data (thanks to DataSet::Demarshall):*/278 279 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);280 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);281 memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);282 memcpy(&normal,marshalled_dataset,sizeof(normal));marshalled_dataset+=sizeof(normal);283 memcpy(&length,marshalled_dataset,sizeof(length));marshalled_dataset+=sizeof(length);284 memcpy(&fraction,marshalled_dataset,sizeof(fraction));marshalled_dataset+=sizeof(fraction);285 memcpy(&frozen,marshalled_dataset,sizeof(frozen));marshalled_dataset+=sizeof(frozen);286 memcpy(&state,marshalled_dataset,sizeof(state));marshalled_dataset+=sizeof(state);287 memcpy(&counter,marshalled_dataset,sizeof(counter));marshalled_dataset+=sizeof(counter);288 memcpy(&prestable,marshalled_dataset,sizeof(prestable));marshalled_dataset+=sizeof(prestable);289 memcpy(&penalty_lock,marshalled_dataset,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);290 memcpy(&material_converged,marshalled_dataset,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);291 292 /*demarshall hooks: */293 hnodes=new Hook(); hnodes->Demarshall(&marshalled_dataset);294 helements=new Hook(); helements->Demarshall(&marshalled_dataset);295 hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);296 297 /*pointers are garbabe, until configuration is carried out: */298 nodes=NULL;299 elements=NULL;300 matpar=NULL;301 302 /*demarshall inputs: */303 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);304 305 /*parameters: may not exist even yet, so let Configure handle it: */306 this->parameters=NULL;307 308 /*return: */309 *pmarshalled_dataset=marshalled_dataset;310 }311 /*}}}*/312 #endif313 194 /*FUNCTION Riftfront::ObjectEnum{{{1*/ 314 195 int Riftfront::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Loads/Riftfront.h ¶
r11684 r12168 57 57 int Id(); 58 58 int MyRank(); 59 #ifdef _SERIAL_60 void Marshall(char** pmarshalled_dataset);61 int MarshallSize();62 void Demarshall(char** pmarshalled_dataset);63 #endif64 59 int ObjectEnum(); 65 60 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Materials/Matice.cpp ¶
r12004 r12168 88 88 } 89 89 /*}}}*/ 90 #ifdef _SERIAL_91 /*FUNCTION Matice::Marshall {{{1*/92 void Matice::Marshall(char** pmarshalled_dataset){93 94 /*Intermediaries*/95 char* marshalled_dataset=NULL;96 int enum_type=0;97 char* marshalled_inputs=NULL;98 int marshalled_inputs_size;99 100 /*recover marshalled_dataset: */101 marshalled_dataset=*pmarshalled_dataset;102 103 /*get enum type of Matice: */104 enum_type=MaticeEnum;105 106 /*marshall enum: */107 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);108 109 /*marshall Matice data: */110 memcpy(marshalled_dataset,&mid,sizeof(mid));marshalled_dataset+=sizeof(mid);111 112 /*Marshall hooks: */113 helement->Marshall(&marshalled_dataset);114 115 /*Marshall inputs: */116 marshalled_inputs_size=inputs->MarshallSize();117 marshalled_inputs=inputs->Marshall();118 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));119 marshalled_dataset+=marshalled_inputs_size;120 121 *pmarshalled_dataset=marshalled_dataset;122 123 /*clean up and return*/124 xfree((void**)&marshalled_inputs);125 }126 /*}}}*/127 /*FUNCTION Matice::MarshallSize{{{1*/128 int Matice::MarshallSize(){129 130 return sizeof(mid)131 +helement->MarshallSize()132 +inputs->MarshallSize()133 +sizeof(int); //sizeof(int) for enum type134 }135 /*}}}*/136 /*FUNCTION Matice::Demarshall {{{1*/137 void Matice::Demarshall(char** pmarshalled_dataset){138 139 char* marshalled_dataset=NULL;140 141 /*recover marshalled_dataset: */142 marshalled_dataset=*pmarshalled_dataset;143 144 /*this time, no need to get enum type, the pointer directly points to the beginning of the145 *object data (thanks to DataSet::Demarshall):*/146 memcpy(&mid,marshalled_dataset,sizeof(mid));marshalled_dataset+=sizeof(mid);147 148 /*demarshall hooks: */149 helement=new Hook(); helement->Demarshall(&marshalled_dataset);150 151 /*demarshall inputs: */152 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);153 154 /*return: */155 *pmarshalled_dataset=marshalled_dataset;156 return;157 }158 /*}}}*/159 #endif160 90 /*FUNCTION Matice::ObjectEnum{{{1*/ 161 91 int Matice::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Materials/Matice.h ¶
r11708 r12168 35 35 int Id(); 36 36 int MyRank(); 37 #ifdef _SERIAL_38 void Marshall(char** pmarshalled_dataset);39 int MarshallSize();40 void Demarshall(char** pmarshalled_dataset);41 #endif42 37 int ObjectEnum(); 43 38 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Materials/Matpar.cpp ¶
r11351 r12168 102 102 } 103 103 /*}}}1*/ 104 #ifdef _SERIAL_105 /*FUNCTION Matpar::Marshall {{{1*/106 void Matpar::Marshall(char** pmarshalled_dataset){107 108 char* marshalled_dataset=NULL;109 int enum_type=0;110 111 /*recover marshalled_dataset: */112 marshalled_dataset=*pmarshalled_dataset;113 114 /*get enum type of Matpar: */115 enum_type=MatparEnum;116 117 /*marshall enum: */118 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);119 120 /*marshall Matpar data: */121 memcpy(marshalled_dataset,&mid,sizeof(mid));marshalled_dataset+=sizeof(mid);122 memcpy(marshalled_dataset,&rho_ice,sizeof(rho_ice));marshalled_dataset+=sizeof(rho_ice);123 memcpy(marshalled_dataset,&rho_water,sizeof(rho_water));marshalled_dataset+=sizeof(rho_water);124 memcpy(marshalled_dataset,&mu_water,sizeof(mu_water));marshalled_dataset+=sizeof(mu_water);125 memcpy(marshalled_dataset,&heatcapacity,sizeof(heatcapacity));marshalled_dataset+=sizeof(heatcapacity);126 memcpy(marshalled_dataset,&thermalconductivity,sizeof(thermalconductivity));marshalled_dataset+=sizeof(thermalconductivity);127 memcpy(marshalled_dataset,&latentheat,sizeof(latentheat));marshalled_dataset+=sizeof(latentheat);128 memcpy(marshalled_dataset,&beta,sizeof(beta));marshalled_dataset+=sizeof(beta);129 memcpy(marshalled_dataset,&meltingpoint,sizeof(meltingpoint));marshalled_dataset+=sizeof(meltingpoint);130 memcpy(marshalled_dataset,&referencetemperature,sizeof(referencetemperature));marshalled_dataset+=sizeof(referencetemperature);131 memcpy(marshalled_dataset,&mixed_layer_capacity,sizeof(mixed_layer_capacity));marshalled_dataset+=sizeof(mixed_layer_capacity);132 memcpy(marshalled_dataset,&thermal_exchange_velocity,sizeof(thermal_exchange_velocity));marshalled_dataset+=sizeof(thermal_exchange_velocity);133 memcpy(marshalled_dataset,&g,sizeof(g));marshalled_dataset+=sizeof(g);134 135 *pmarshalled_dataset=marshalled_dataset;136 return;137 }138 /*}}}1*/139 /*FUNCTION Matpar::MarshallSize {{{1*/140 int Matpar::MarshallSize(){141 142 return sizeof(mid)+143 sizeof(rho_ice)+144 sizeof(rho_water)+145 sizeof(mu_water)+146 sizeof(heatcapacity)+147 sizeof(thermalconductivity)+148 sizeof(latentheat)+149 sizeof(beta)+150 sizeof(meltingpoint)+151 sizeof(referencetemperature)+152 sizeof(mixed_layer_capacity)+153 sizeof(thermal_exchange_velocity)+154 sizeof(g)+155 sizeof(int); //sizeof(int) for enum type156 }157 /*}}}1*/158 /*FUNCTION Matpar::Demarshall {{{1*/159 void Matpar::Demarshall(char** pmarshalled_dataset){160 161 char* marshalled_dataset=NULL;162 163 /*recover marshalled_dataset: */164 marshalled_dataset=*pmarshalled_dataset;165 166 /*this time, no need to get enum type, the pointer directly points to the beginning of the167 *object data (thanks to DataSet::Demarshall):*/168 169 memcpy(&mid,marshalled_dataset,sizeof(mid));marshalled_dataset+=sizeof(mid);170 memcpy(&rho_ice,marshalled_dataset,sizeof(rho_ice));marshalled_dataset+=sizeof(rho_ice);171 memcpy(&rho_water,marshalled_dataset,sizeof(rho_water));marshalled_dataset+=sizeof(rho_water);172 memcpy(&mu_water,marshalled_dataset,sizeof(mu_water));marshalled_dataset+=sizeof(mu_water);173 memcpy(&heatcapacity,marshalled_dataset,sizeof(heatcapacity));marshalled_dataset+=sizeof(heatcapacity);174 memcpy(&thermalconductivity,marshalled_dataset,sizeof(thermalconductivity));marshalled_dataset+=sizeof(thermalconductivity);175 memcpy(&latentheat,marshalled_dataset,sizeof(latentheat));marshalled_dataset+=sizeof(latentheat);176 memcpy(&beta,marshalled_dataset,sizeof(beta));marshalled_dataset+=sizeof(beta);177 memcpy(&meltingpoint,marshalled_dataset,sizeof(meltingpoint));marshalled_dataset+=sizeof(meltingpoint);178 memcpy(&referencetemperature,marshalled_dataset,sizeof(referencetemperature));marshalled_dataset+=sizeof(referencetemperature);179 memcpy(&mixed_layer_capacity,marshalled_dataset,sizeof(mixed_layer_capacity));marshalled_dataset+=sizeof(mixed_layer_capacity);180 memcpy(&thermal_exchange_velocity,marshalled_dataset,sizeof(thermal_exchange_velocity));marshalled_dataset+=sizeof(thermal_exchange_velocity);181 memcpy(&g,marshalled_dataset,sizeof(g));marshalled_dataset+=sizeof(g);182 183 /*return: */184 *pmarshalled_dataset=marshalled_dataset;185 return;186 }187 /*}}}1*/188 #endif189 104 /*FUNCTION Matpar::ObjectEnum{{{1*/ 190 105 int Matpar::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Materials/Matpar.h ¶
r11708 r12168 46 46 int Id(); 47 47 int MyRank(); 48 #ifdef _SERIAL_49 void Marshall(char** pmarshalled_dataset);50 int MarshallSize();51 void Demarshall(char** pmarshalled_dataset);52 #endif53 48 int ObjectEnum(); 54 49 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Node.cpp ¶
r11708 r12168 193 193 } 194 194 /*}}}*/ 195 #ifdef _SERIAL_196 /*FUNCTION Node::Marshall{{{1*/197 void Node::Marshall(char** pmarshalled_dataset){198 199 char* marshalled_dataset=NULL;200 int enum_type=0;201 char* marshalled_inputs=NULL;202 int marshalled_inputssize;203 204 /*recover marshalled_dataset: */205 marshalled_dataset=*pmarshalled_dataset;206 207 /*get enum type of Node: */208 enum_type=NodeEnum;209 210 /*marshall enum: */211 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);212 213 /*marshall Node data: */214 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);215 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);216 memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);217 memcpy(marshalled_dataset,&coord_system,9*sizeof(double));marshalled_dataset+=9*sizeof(double);218 219 /*marshall objects: */220 indexing.Marshall(&marshalled_dataset);221 hvertex->Marshall(&marshalled_dataset);222 223 /*Marshall inputs: */224 marshalled_inputssize=inputs->MarshallSize();225 marshalled_inputs=inputs->Marshall();226 memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputssize*sizeof(char));227 marshalled_dataset+=marshalled_inputssize;228 229 /*Free ressources:*/230 xfree((void**)&marshalled_inputs);231 232 *pmarshalled_dataset=marshalled_dataset;233 return;234 }235 /*}}}*/236 /*FUNCTION Node::MarshallSize{{{1*/237 int Node::MarshallSize(){238 239 return sizeof(id)+240 sizeof(sid)+241 indexing.MarshallSize()+242 hvertex->MarshallSize()+243 inputs->MarshallSize()+244 sizeof(analysis_type)+245 9*sizeof(double)+246 sizeof(int); //sizeof(int) for enum type247 }248 /*}}}*/249 /*FUNCTION Node::Demarshall{{{1*/250 void Node::Demarshall(char** pmarshalled_dataset){251 252 char* marshalled_dataset=NULL;253 254 /*recover marshalled_dataset: */255 marshalled_dataset=*pmarshalled_dataset;256 257 /*this time, no need to get enum type, the pointer directly points to the beginning of the258 *object data (thanks to DataSet::Demarshall):*/259 260 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);261 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);262 memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);263 memcpy(&coord_system,marshalled_dataset,9*sizeof(double));marshalled_dataset+=9*sizeof(double);264 265 /*demarshall objects: */266 indexing.Demarshall(&marshalled_dataset);267 hvertex=new Hook(); hvertex->Demarshall(&marshalled_dataset);268 269 /*demarshall inputs: */270 inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);271 272 /*return: */273 *pmarshalled_dataset=marshalled_dataset;274 return;275 }276 /*}}}*/277 #endif278 195 /*FUNCTION Node::ObjectEnum{{{1*/ 279 196 int Node::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Node.h ¶
r11708 r12168 44 44 int Id(); 45 45 int MyRank(); 46 #ifdef _SERIAL_47 void Marshall(char** pmarshalled_dataset);48 int MarshallSize();49 void Demarshall(char** pmarshalled_dataset);50 #endif51 46 int ObjectEnum(); 52 47 Object* copy(){_error_("Not implemented yet (similar to Elements)");}; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Numerics/Matrix.cpp ¶
r12004 r12168 140 140 } 141 141 /*}}}*/ 142 143 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)144 /*FUNCTION Matrix::ToMatlabMatrix{{{1*/145 mxArray* Matrix::ToMatlabMatrix(void){146 147 mxArray* dataref=NULL;148 #ifdef _HAVE_PETSC_149 PetscMatrixToMatlabMatrix(&dataref,this->matrix);150 #else151 dataref=this->matrix->ToMatlabMatrix();152 #endif153 return dataref;154 155 }156 /*}}}*/157 /*FUNCTION MatlabMatrixToMatrix{{{1*/158 Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix){159 160 int dummy;161 Matrix* matrix=NULL;162 163 /*allocate matrix object: */164 matrix=new Matrix();165 166 #ifdef _HAVE_PETSC_167 MatlabMatrixToPetscMatrix(&matrix->matrix,NULL,NULL,mxmatrix);168 #else169 matrix->matrix=MatlabMatrixToSeqMat(mxmatrix);170 #endif171 172 return matrix;173 }174 /*}}}*/175 #endif176 142 /*FUNCTION Matrix::Assemble{{{1*/ 177 143 void Matrix::Assemble(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Numerics/Matrix.h ¶
r12004 r12168 21 21 #endif 22 22 23 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)24 #include "mex.h"25 #endif26 23 class Vector; 27 24 … … 51 48 /*Matrix specific routines {{{1*/ 52 49 void Echo(void); 53 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)54 mxArray* ToMatlabMatrix(void);55 #endif56 50 void Assemble(void); 57 51 double Norm(NormMode norm_type); … … 66 60 67 61 }; 68 /*API: */69 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)70 Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix);71 #endif72 62 73 63 #endif //#ifndef _MATRIX_H_ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Numerics/Vector.cpp ¶
r12004 r12168 132 132 } 133 133 /*}}}*/ 134 135 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)136 /*FUNCTION Vector::ToMatlabVector{{{1*/137 mxArray* Vector::ToMatlabVector(void){138 139 mxArray* dataref=NULL;140 #ifdef _HAVE_PETSC_141 PetscVectorToMatlabVector(&dataref,this->vector);142 #else143 dataref=this->vector->ToMatlabVector();144 #endif145 return dataref;146 147 }148 /*}}}*/149 /*FUNCTION MatlabVectorToVector{{{1*/150 Vector* MatlabVectorToVector(const mxArray* mxvector){151 152 int dummy;153 Vector* vector=NULL;154 155 /*allocate vector object: */156 vector=new Vector();157 158 #ifdef _HAVE_PETSC_159 MatlabVectorToPetscVector(&vector->vector,&dummy,mxvector);160 #else161 vector->vector=MatlabVectorToSeqVec(mxvector);162 #endif163 164 return vector;165 }166 /*}}}*/167 #endif168 134 /*FUNCTION Vector::Assemble{{{1*/ 169 135 void Vector::Assemble(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Numerics/Vector.h ¶
r12004 r12168 21 21 #endif 22 22 23 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)24 #include "mex.h"25 #endif26 27 23 /*}}}*/ 28 24 … … 54 50 /*Vector specific routines {{{1*/ 55 51 void Echo(void); 56 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)57 mxArray* ToMatlabVector(void);58 #endif59 52 void AXPY(Vector *X, double a); 60 53 void AYPX(Vector *X, double a); … … 77 70 }; 78 71 79 /*API: */80 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)81 Vector* MatlabVectorToVector(const mxArray* mxvector);82 #endif83 72 84 73 #endif //#ifndef _VECTOR_H_ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Object.h ¶
r9883 r12168 21 21 virtual int Id()=0; 22 22 virtual int MyRank()=0; 23 #ifdef _SERIAL_24 virtual void Marshall(char** pmarshalled_dataset)=0;25 virtual int MarshallSize()=0;26 virtual void Demarshall(char** pmarshalled_dataset)=0;27 #endif28 23 virtual int ObjectEnum()=0; 29 24 virtual Object* copy()=0; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/OptArgs.h ¶
r12004 r12168 6 6 #define _OPTARGS_H_ 7 7 8 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)9 10 #include "mex.h"11 struct OptArgs{12 char* function_name;13 mxArray* femmodel;14 };15 16 #else17 18 8 class Model; 19 9 struct OptArgs{ 20 10 FemModel* femmodel; 21 11 }; 22 #endif23 12 24 13 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Options/Option.h ¶
r9883 r12168 33 33 int Id(){_error_("Not implemented yet");}; 34 34 int MyRank(){_error_("Not implemented yet");}; 35 #ifdef _SERIAL_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 #endif40 35 int ObjectEnum(){return OptionEnum;}; 41 36 Object* copy(){_error_("Not implemented yet");}; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Options/OptionCell.h ¶
r9883 r12168 30 30 int Id(){_error_("Not implemented yet");}; 31 31 int MyRank(){_error_("Not implemented yet");}; 32 #ifdef _SERIAL_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 #endif37 32 int ObjectEnum(){return OptionCellEnum;}; 38 33 Object* copy(){_error_("Not implemented yet");}; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Options/OptionChar.h ¶
r9883 r12168 30 30 int Id(){_error_("Not implemented yet");}; 31 31 int MyRank(){_error_("Not implemented yet");}; 32 #ifdef _SERIAL_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 #endif37 32 int ObjectEnum(){return OptionCharEnum;}; 38 33 Object* copy(){_error_("Not implemented yet");}; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Options/OptionDouble.h ¶
r9883 r12168 30 30 int Id(){_error_("Not implemented yet");}; 31 31 int MyRank(){_error_("Not implemented yet");}; 32 #ifdef _SERIAL_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 #endif37 32 int ObjectEnum(){return OptionDoubleEnum;}; 38 33 Object* copy(){_error_("Not implemented yet");}; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Options/OptionLogical.h ¶
r9883 r12168 30 30 int Id(){_error_("Not implemented yet");}; 31 31 int MyRank(){_error_("Not implemented yet");}; 32 #ifdef _SERIAL_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 #endif37 32 int ObjectEnum(){return OptionLogicalEnum;}; 38 33 Object* copy(){_error_("Not implemented yet");}; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Options/OptionStruct.h ¶
r9883 r12168 30 30 int Id(){_error_("Not implemented yet");}; 31 31 int MyRank(){_error_("Not implemented yet");}; 32 #ifdef _SERIAL_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 #endif37 32 int ObjectEnum(){return OptionStructEnum;}; 38 33 Object* copy(){_error_("Not implemented yet");}; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/BoolParam.cpp ¶
r12004 r12168 62 62 } 63 63 /*}}}*/ 64 #ifdef _SERIAL_65 /*FUNCTION BoolParam::Marshall{{{1*/66 void BoolParam::Marshall(char** pmarshalled_dataset){67 68 char* marshalled_dataset=NULL;69 int enum_value=0;70 71 /*recover marshalled_dataset: */72 marshalled_dataset=*pmarshalled_dataset;73 74 /*get enum value of BoolParam: */75 enum_value=BoolParamEnum;76 77 /*marshall enum: */78 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);79 80 /*marshall BoolParam data: */81 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);82 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);83 84 *pmarshalled_dataset=marshalled_dataset;85 }86 /*}}}*/87 /*FUNCTION BoolParam::MarshallSize{{{1*/88 int BoolParam::MarshallSize(){89 90 return sizeof(value)+91 +sizeof(enum_type)+92 +sizeof(int); //sizeof(int) for enum value93 }94 /*}}}*/95 /*FUNCTION BoolParam::Demarshall{{{1*/96 void BoolParam::Demarshall(char** pmarshalled_dataset){97 98 char* marshalled_dataset=NULL;99 int i;100 101 /*recover marshalled_dataset: */102 marshalled_dataset=*pmarshalled_dataset;103 104 /*this time, no need to get enum type, the pointer directly points to the beginning of the105 *object data (thanks to DataSet::Demarshall):*/106 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);107 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);108 109 /*return: */110 *pmarshalled_dataset=marshalled_dataset;111 return;112 }113 /*}}}*/114 #endif115 64 /*FUNCTION BoolParam::ObjectEnum{{{1*/ 116 65 int BoolParam::ObjectEnum(void){ … … 134 83 } 135 84 /*}}}*/ 136 /*FUNCTION BoolParam::SetMatlabField{{{1*/137 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)138 void BoolParam::SetMatlabField(mxArray* dataref){139 char* name=NULL;140 this->GetParameterName(&name);141 mxSetField( dataref, 0, name,mxCreateDoubleScalar((double)value));142 }143 #endif144 /*}}}*/145 85 /*FUNCTION BoolParam::UnitConversion{{{1*/ 146 86 void BoolParam::UnitConversion(int direction_enum){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/BoolParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 41 37 int Id(); 42 38 int MyRank(); 43 #ifdef _SERIAL_44 void Marshall(char** pmarshalled_dataset);45 int MarshallSize();46 void Demarshall(char** pmarshalled_dataset);47 #endif48 39 int ObjectEnum(); 49 40 Object* copy(); … … 81 72 82 73 void GetParameterName(char**pname); 83 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)84 void SetMatlabField(mxArray* dataref);85 #endif86 74 /*}}}*/ 87 75 }; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleMatArrayParam.cpp ¶
r12004 r12168 127 127 } 128 128 /*}}}*/ 129 #ifdef _SERIAL_130 /*FUNCTION DoubleMatArrayParam::Marshall{{{1*/131 void DoubleMatArrayParam::Marshall(char** pmarshalled_dataset){132 133 char* marshalled_dataset=NULL;134 int enum_value=0;135 int i;136 137 /*recover marshalled_dataset: */138 marshalled_dataset=*pmarshalled_dataset;139 140 /*get enum value of DoubleMatArrayParam: */141 enum_value=DoubleMatArrayParamEnum;142 143 /*marshall enum: */144 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);145 146 /*marshall DoubleMatArrayParam data: */147 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);148 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);149 if(M){150 memcpy(marshalled_dataset,mdim_array,M*sizeof(int));marshalled_dataset+=M*sizeof(int);151 memcpy(marshalled_dataset,ndim_array,M*sizeof(int));marshalled_dataset+=M*sizeof(int);152 for(i=0;i<M;i++){153 double* matrix=this->array[i];154 int m=this->mdim_array[i];155 int n=this->ndim_array[i];156 memcpy(marshalled_dataset,&m,sizeof(m));marshalled_dataset+=sizeof(m);157 memcpy(marshalled_dataset,&n,sizeof(n));marshalled_dataset+=sizeof(n);158 if(m*n)memcpy(marshalled_dataset,matrix,m*n*sizeof(double));marshalled_dataset+=m*n*sizeof(double);159 }160 }161 162 *pmarshalled_dataset=marshalled_dataset;163 }164 /*}}}*/165 /*FUNCTION DoubleMatArrayParam::MarshallSize{{{1*/166 int DoubleMatArrayParam::MarshallSize(){167 168 int size=0;169 int i;170 171 size+=sizeof(enum_type)+172 sizeof(M)+173 M*sizeof(int)+174 M*sizeof(int);175 176 for(i=0;i<M;i++){177 int m=this->mdim_array[i];178 int n=this->ndim_array[i];179 size+=sizeof(m)+sizeof(n)+m*n*sizeof(double);180 }181 size+=sizeof(int); //sizeof(int) for enum value182 183 return size;184 }185 /*}}}*/186 /*FUNCTION DoubleMatArrayParam::Demarshall{{{1*/187 void DoubleMatArrayParam::Demarshall(char** pmarshalled_dataset){188 189 char* marshalled_dataset=NULL;190 int i;191 double* matrix=NULL;192 int m,n;193 194 /*recover marshalled_dataset: */195 marshalled_dataset=*pmarshalled_dataset;196 197 /*this time, no need to get enum value, the pointer directly points to the beginning of the198 *object data (thanks to DataSet::Demarshall):*/199 200 /*data: */201 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);202 203 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);204 if(M){205 this->mdim_array=(int*)xmalloc(M*sizeof(int));206 this->ndim_array=(int*)xmalloc(M*sizeof(int));207 memcpy(this->mdim_array,marshalled_dataset,M*sizeof(int));marshalled_dataset+=M*sizeof(int);208 memcpy(this->ndim_array,marshalled_dataset,M*sizeof(int));marshalled_dataset+=M*sizeof(int);209 210 this->array=(double**)xmalloc(M*sizeof(double*));211 for(i=0;i<M;i++){212 memcpy(&m,marshalled_dataset,sizeof(m));marshalled_dataset+=sizeof(m);213 memcpy(&n,marshalled_dataset,sizeof(n));marshalled_dataset+=sizeof(n);214 if(m*n){215 matrix=(double*)xmalloc(m*n*sizeof(double));216 memcpy(matrix,marshalled_dataset,m*n*sizeof(double));marshalled_dataset+=m*n*sizeof(double);217 }218 else{219 matrix=NULL;220 }221 this->array[i]=matrix;222 }223 }224 else{225 this->array=NULL;226 this->mdim_array=NULL;227 this->ndim_array=NULL;228 }229 230 /*return: */231 *pmarshalled_dataset=marshalled_dataset;232 return;233 }234 /*}}}*/235 #endif236 129 /*FUNCTION DoubleMatArrayParam::ObjectEnum{{{1*/ 237 130 int DoubleMatArrayParam::ObjectEnum(void){ … … 307 200 EnumToStringx(pname,this->enum_type); 308 201 } 309 /*}}}*/310 /*FUNCTION StringArrayParam::SetMatlabField{{{1*/311 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)312 void DoubleMatArrayParam::SetMatlabField(mxArray* dataref){313 314 int i,m,n;315 double* matrix=NULL;316 double* outmatrix=NULL;317 char* name=NULL;318 mwSize dims[2]={0};319 mxArray* pfield=NULL;320 mxArray* pfield2=NULL;321 mxArray* pfield3=NULL;322 323 this->GetParameterName(&name);324 dims[0]=this->M;325 dims[1]=1;326 pfield=mxCreateCellArray(2,dims);327 328 for(i=0;i<this->M;i++){329 matrix=this->array[i];330 m=this->mdim_array[i];331 n=this->ndim_array[i];332 outmatrix=(double*)xmalloc(m*n*sizeof(double));333 memcpy(outmatrix,matrix,m*n*sizeof(double));334 335 pfield2=mxCreateDoubleMatrix(0,0,mxREAL);336 mxSetM(pfield2,n);337 mxSetN(pfield2,m);338 mxSetPr(pfield2,outmatrix);339 340 //transpose the outmatrix, written directly to matlab! from C to matlab.341 mexCallMATLAB(1,&pfield3, 1, &pfield2, "transpose");342 343 mxSetCell(pfield,i,pfield3);344 }345 346 mxSetField( dataref, 0, name,pfield);347 }348 #endif349 202 /*}}}*/ 350 203 /*FUNCTION DoubleMatArrayParam::SetValue(double** array, int M, int* mdim_array, int* ndim_array){{{1*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleMatArrayParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 44 40 int Id(); 45 41 int MyRank(); 46 #ifdef _SERIAL_47 void Marshall(char** pmarshalled_dataset);48 int MarshallSize();49 void Demarshall(char** pmarshalled_dataset);50 #endif51 42 int ObjectEnum(); 52 43 Object* copy(); … … 84 75 85 76 void GetParameterName(char**pname); 86 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)87 void SetMatlabField(mxArray* dataref);88 #endif89 77 90 78 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleMatParam.cpp ¶
r12004 r12168 78 78 } 79 79 /*}}}*/ 80 #ifdef _SERIAL_81 /*FUNCTION DoubleMatParam::Marshall{{{1*/82 void DoubleMatParam::Marshall(char** pmarshalled_dataset){83 84 char* marshalled_dataset=NULL;85 int enum_value=0;86 87 /*recover marshalled_dataset: */88 marshalled_dataset=*pmarshalled_dataset;89 90 /*get enum value of DoubleMatParam: */91 enum_value=DoubleMatParamEnum;92 93 /*marshall enum: */94 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);95 96 /*marshall DoubleMatParam data: */97 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);98 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);99 memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);100 memcpy(marshalled_dataset,value,M*N*sizeof(double));marshalled_dataset+=M*N*sizeof(double);101 102 *pmarshalled_dataset=marshalled_dataset;103 }104 /*}}}*/105 /*FUNCTION DoubleMatParam::MarshallSize{{{1*/106 int DoubleMatParam::MarshallSize(){107 108 return sizeof(M)109 +sizeof(N)110 +M*N*sizeof(double)111 +sizeof(enum_type)+112 +sizeof(int); //sizeof(int) for enum value113 }114 /*}}}*/115 /*FUNCTION DoubleMatParam::Demarshall{{{1*/116 void DoubleMatParam::Demarshall(char** pmarshalled_dataset){117 118 char* marshalled_dataset=NULL;119 int i;120 121 /*recover marshalled_dataset: */122 marshalled_dataset=*pmarshalled_dataset;123 124 /*this time, no need to get enum type, the pointer directly points to the beginning of the125 *object data (thanks to DataSet::Demarshall):*/126 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);127 128 /*data: */129 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);130 memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);131 value=(double*)xmalloc(M*N*sizeof(double));132 memcpy(value,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=M*N*sizeof(double);133 134 /*return: */135 *pmarshalled_dataset=marshalled_dataset;136 return;137 }138 /*}}}*/139 #endif140 80 /*FUNCTION DoubleMatParam::ObjectEnum{{{1*/ 141 81 int DoubleMatParam::ObjectEnum(void){ … … 169 109 /*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{1*/ 170 110 void DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){ 171 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)172 int* output=NULL;173 int i;174 175 output=(int*)xmalloc((int)(M*N*sizeof(int)));176 for(i=0;i<M*N;i++) output[i]=(int)value[i];177 178 /*Assign output pointers:*/179 if(pM) *pM=M;180 if(pN) *pN=N;181 *pintarray=output;182 #else183 111 _error_("DoubleMat of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type)); 184 #endif185 112 } 186 113 /*}}}*/ … … 189 116 EnumToStringx(pname,this->enum_type); 190 117 } 191 /*}}}*/192 /*FUNCTION DoubleMatParam::SetMatlabField{{{1*/193 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)194 void DoubleMatParam::SetMatlabField(mxArray* dataref){195 196 mxArray* pfield=NULL;197 mxArray* pfield2=NULL;198 double* doublemat=NULL;199 char* name=NULL;200 201 this->GetParameterName(&name);202 this->GetParameterValue(&doublemat,NULL,NULL);203 204 pfield=mxCreateDoubleMatrix(0,0,mxREAL);205 mxSetM(pfield,N);206 mxSetN(pfield,M);207 mxSetPr(pfield,doublemat);208 209 //transpose the matrix, written directly to matlab! from C to matlab.210 mexCallMATLAB(1,&pfield2, 1, &pfield, "transpose");211 mxSetField( dataref, 0, name,pfield2);212 }213 #endif214 118 /*}}}*/ 215 119 /*FUNCTION DoubleMatParam::SetValue{{{1*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleMatParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 43 39 int Id(); 44 40 int MyRank(); 45 #ifdef _SERIAL_46 void Marshall(char** pmarshalled_dataset);47 int MarshallSize();48 void Demarshall(char** pmarshalled_dataset);49 #endif50 41 int ObjectEnum(); 51 42 Object* copy(); … … 84 75 85 76 void GetParameterName(char**pname); 86 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)87 void SetMatlabField(mxArray* dataref);88 #endif89 77 90 78 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleParam.cpp ¶
r12004 r12168 59 59 } 60 60 /*}}}*/ 61 #ifdef _SERIAL_62 /*FUNCTION DoubleParam::Marshall{{{1*/63 void DoubleParam::Marshall(char** pmarshalled_dataset){64 65 char* marshalled_dataset=NULL;66 int enum_value=0;67 68 /*recover marshalled_dataset: */69 marshalled_dataset=*pmarshalled_dataset;70 71 /*get enum value of DoubleParam: */72 enum_value=DoubleParamEnum;73 74 /*marshall enum: */75 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);76 77 /*marshall DoubleParam data: */78 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);79 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);80 81 *pmarshalled_dataset=marshalled_dataset;82 }83 /*}}}*/84 /*FUNCTION DoubleParam::MarshallSize{{{1*/85 int DoubleParam::MarshallSize(){86 87 return sizeof(value)+88 +sizeof(enum_type)+89 +sizeof(int); //sizeof(int) for enum value90 }91 /*}}}*/92 /*FUNCTION DoubleParam::Demarshall{{{1*/93 void DoubleParam::Demarshall(char** pmarshalled_dataset){94 95 char* marshalled_dataset=NULL;96 int i;97 98 /*recover marshalled_dataset: */99 marshalled_dataset=*pmarshalled_dataset;100 101 /*this time, no need to get enum type, the pointer directly points to the beginning of the102 *object data (thanks to DataSet::Demarshall):*/103 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);104 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);105 106 /*return: */107 *pmarshalled_dataset=marshalled_dataset;108 return;109 }110 /*}}}*/111 #endif112 61 /*FUNCTION DoubleParam::ObjectEnum{{{1*/ 113 62 int DoubleParam::ObjectEnum(void){ … … 133 82 /*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{1*/ 134 83 void DoubleParam::GetParameterValue(int* pinteger){ 135 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)136 *pinteger=(int)value;137 #else138 84 _error_("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type)); 139 #endif140 85 } 141 86 /*}}}*/ 142 87 /*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{1*/ 143 88 void DoubleParam::GetParameterValue(bool* pbool){ 144 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)145 146 /*If debugging mode, cheeck that the double is 0 or 1*/147 _assert_(value==0 || value==1);148 *pbool=(bool)value;149 150 #else151 89 _error_("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToStringx(enum_type)); 152 #endif153 90 } 154 91 /*}}}*/ 155 92 /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{1*/ 156 93 void DoubleParam::GetParameterValue(int** pintarray,int* pM){ 157 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)158 int* output=NULL;159 160 output=(int*)xmalloc(1*sizeof(int));161 *output=(int)value;162 163 /*Assign output pointers:*/164 if(pM) *pM=1;165 *pintarray=output;166 #else167 94 _error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type)); 168 #endif169 95 } 170 96 /*}}}*/ 171 97 /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{1*/ 172 98 void DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){ 173 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)174 int* output=NULL;175 176 output=(int*)xmalloc(1*sizeof(int));177 *output=(int)value;178 179 /*Assign output pointers:*/180 if(pM) *pM=1;181 if(pN) *pN=1;182 *pintarray=output;183 #else184 99 _error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type)); 185 #endif186 100 } 187 101 /*}}}*/ 188 102 /*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM){{{1*/ 189 103 void DoubleParam::GetParameterValue(double** pdoublearray,int* pM){ 190 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)191 double* output=NULL;192 193 output=(double*)xmalloc(1*sizeof(double));194 *output=(double)value;195 196 /*Assign output podoubleers:*/197 if(pM) *pM=1;198 *pdoublearray=output;199 #else200 104 _error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type)); 201 #endif202 105 } 203 106 /*}}}*/ 204 107 /*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{1*/ 205 108 void DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){ 206 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)207 double* output=NULL;208 209 output=(double*)xmalloc(1*sizeof(double));210 *output=(double)value;211 212 /*Assign output podoubleers:*/213 if(pM) *pM=1;214 if(pN) *pN=1;215 *pdoublearray=output;216 #else217 109 _error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type)); 218 #endif219 110 } 220 /*}}}*/221 /*FUNCTION DoubleParam::SetMatlabField{{{1*/222 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)223 void DoubleParam::SetMatlabField(mxArray* dataref){224 225 char* name=NULL;226 this->GetParameterName(&name);227 mxSetField( dataref, 0, name,mxCreateDoubleScalar(value));228 }229 #endif230 111 /*}}}*/ 231 112 /*FUNCTION DoubleParam::UnitConversion{{{1*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 42 38 int Id(); 43 39 int MyRank(); 44 #ifdef _SERIAL_45 void Marshall(char** pmarshalled_dataset);46 int MarshallSize();47 void Demarshall(char** pmarshalled_dataset);48 #endif49 40 int ObjectEnum(); 50 41 Object* copy(); … … 82 73 83 74 void GetParameterName(char**pname); 84 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)85 void SetMatlabField(mxArray* dataref);86 #endif87 75 88 76 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleTransientMatParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleVecParam.cpp ¶
r12004 r12168 75 75 } 76 76 /*}}}*/ 77 #ifdef _SERIAL_78 /*FUNCTION DoubleVecParam::Marshall{{{1*/79 void DoubleVecParam::Marshall(char** pmarshalled_dataset){80 81 char* marshalled_dataset=NULL;82 int enum_value=0;83 84 /*recover marshalled_dataset: */85 marshalled_dataset=*pmarshalled_dataset;86 87 /*get enum value of DoubleVecParam: */88 enum_value=DoubleVecParamEnum;89 90 /*marshall enum: */91 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);92 93 /*marshall DoubleVecParam data: */94 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);95 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);96 memcpy(marshalled_dataset,values,M*sizeof(double));marshalled_dataset+=M*sizeof(double);97 98 *pmarshalled_dataset=marshalled_dataset;99 }100 /*}}}*/101 /*FUNCTION DoubleVecParam::MarshallSize{{{1*/102 int DoubleVecParam::MarshallSize(){103 104 return sizeof(M)105 +M*sizeof(double)106 +sizeof(enum_type)+107 +sizeof(int); //sizeof(int) for enum value108 }109 /*}}}*/110 /*FUNCTION DoubleVecParam::Demarshall{{{1*/111 void DoubleVecParam::Demarshall(char** pmarshalled_dataset){112 113 char* marshalled_dataset=NULL;114 int i;115 116 /*recover marshalled_dataset: */117 marshalled_dataset=*pmarshalled_dataset;118 119 /*this time, no need to get enum type, the pointer directly points to the beginning of the120 *object data (thanks to DataSet::Demarshall):*/121 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);122 123 /*data: */124 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);125 values=(double*)xmalloc(M*sizeof(double));126 memcpy(values,marshalled_dataset,M*sizeof(double));marshalled_dataset+=M*sizeof(double);127 128 /*return: */129 *pmarshalled_dataset=marshalled_dataset;130 return;131 }132 /*}}}*/133 #endif134 77 /*FUNCTION DoubleVecParam::ObjectEnum{{{1*/ 135 78 int DoubleVecParam::ObjectEnum(void){ … … 181 124 /*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{1*/ 182 125 void DoubleVecParam::GetParameterValue(int** pintarray,int* pM){ 183 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)184 int* output=NULL;185 int i;186 187 /*Cast values into integers*/188 output=(int*)xmalloc(M*sizeof(int));189 for(i=0;i<M;i++) output[i]=(int)values[i];190 191 /*Assign output pointers:*/192 if(pM) *pM=M;193 *pintarray=output;194 #else195 126 _error_("DoubleVec param of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type)); 196 #endif197 127 } 198 128 /*}}}*/ … … 201 131 EnumToStringx(pname,this->enum_type); 202 132 } 203 /*}}}*/204 /*FUNCTION DoubleVecParam::SetMatlabField{{{1*/205 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)206 void DoubleVecParam::SetMatlabField(mxArray* dataref){207 208 char* name=NULL;209 double* doublevec=NULL;210 mxArray* pfield=NULL;211 212 this->GetParameterValue(&doublevec,NULL);213 this->GetParameterName(&name);214 215 pfield=mxCreateDoubleMatrix(0,0,mxREAL);216 mxSetM(pfield,M);217 mxSetN(pfield,1);218 mxSetPr(pfield,doublevec);219 220 mxSetField( dataref, 0, name, pfield);221 }222 #endif223 133 /*}}}*/ 224 134 /*FUNCTION DoubleVecParam::SetValue{{{1*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/DoubleVecParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 42 38 int Id(); 43 39 int MyRank(); 44 #ifdef _SERIAL_45 void Marshall(char** pmarshalled_dataset);46 int MarshallSize();47 void Demarshall(char** pmarshalled_dataset);48 #endif49 40 int ObjectEnum(); 50 41 Object* copy(); … … 82 73 83 74 void GetParameterName(char**pname); 84 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)85 void SetMatlabField(mxArray* dataref);86 #endif87 75 /*}}}*/ 88 76 }; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/FileParam.cpp ¶
r12004 r12168 62 62 } 63 63 /*}}}*/ 64 #ifdef _SERIAL_65 /*FUNCTION FileParam::Marshall{{{1*/66 void FileParam::Marshall(char** pmarshalled_dataset){67 68 _error_("FileParam is a pointer and cannot be marshalled");69 }70 /*}}}*/71 /*FUNCTION FileParam::MarshallSize{{{1*/72 int FileParam::MarshallSize(){73 _error_("FileParam is a pointer and cannot be marshalled");74 }75 /*}}}*/76 /*FUNCTION FileParam::Demarshall{{{1*/77 void FileParam::Demarshall(char** pmarshalled_dataset){78 _error_("FileParam is a pointer and cannot be marshalled");79 }80 /*}}}*/81 #endif82 64 /*FUNCTION FileParam::ObjectEnum{{{1*/ 83 65 int FileParam::ObjectEnum(void){ … … 101 83 } 102 84 /*}}}*/ 103 /*FUNCTION FileParam::SetMatlabField{{{1*/104 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)105 void FileParam::SetMatlabField(mxArray* dataref){106 107 _error_("FileParam is a pointer and cannot be converted into a matlab object");108 }109 #endif110 /*}}}*/111 85 /*FUNCTION FileParam::UnitConversion{{{1*/ 112 86 void FileParam::UnitConversion(int direction_enum){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/FileParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 41 37 int Id(); 42 38 int MyRank(); 43 #ifdef _SERIAL_44 void Marshall(char** pmarshalled_dataset);45 int MarshallSize();46 void Demarshall(char** pmarshalled_dataset);47 #endif48 39 int ObjectEnum(); 49 40 Object* copy(); … … 81 72 82 73 void GetParameterName(char**pname); 83 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)84 void SetMatlabField(mxArray* dataref);85 #endif86 74 87 75 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/IntMatParam.cpp ¶
r12004 r12168 78 78 } 79 79 /*}}}*/ 80 #ifdef _SERIAL_81 /*FUNCTION IntMatParam::Marshall{{{1*/82 void IntMatParam::Marshall(char** pmarshalled_dataset){83 84 char* marshalled_dataset=NULL;85 int enum_value=0;86 87 /*recover marshalled_dataset: */88 marshalled_dataset=*pmarshalled_dataset;89 90 /*get enum value of IntMatParam: */91 enum_value=IntMatParamEnum;92 93 /*marshall enum: */94 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);95 96 /*marshall IntMatParam data: */97 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);98 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);99 memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);100 memcpy(marshalled_dataset,value,M*N*sizeof(int));marshalled_dataset+=M*N*sizeof(int);101 102 *pmarshalled_dataset=marshalled_dataset;103 }104 /*}}}*/105 /*FUNCTION IntMatParam::MarshallSize{{{1*/106 int IntMatParam::MarshallSize(){107 108 return sizeof(M)109 +sizeof(N)110 +M*N*sizeof(int)111 +sizeof(enum_type)+112 +sizeof(int); //sizeof(int) for enum value113 }114 /*}}}*/115 /*FUNCTION IntMatParam::Demarshall{{{1*/116 void IntMatParam::Demarshall(char** pmarshalled_dataset){117 118 char* marshalled_dataset=NULL;119 int i;120 121 /*recover marshalled_dataset: */122 marshalled_dataset=*pmarshalled_dataset;123 124 /*this time, no need to get enum type, the pointer directly points to the beginning of the125 *object data (thanks to DataSet::Demarshall):*/126 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);127 128 /*data: */129 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);130 memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);131 value=(int*)xmalloc(M*N*sizeof(int));132 memcpy(value,marshalled_dataset,M*N*sizeof(int));marshalled_dataset+=M*N*sizeof(int);133 134 /*return: */135 *pmarshalled_dataset=marshalled_dataset;136 return;137 }138 /*}}}*/139 #endif140 80 /*FUNCTION IntMatParam::ObjectEnum{{{1*/ 141 81 int IntMatParam::ObjectEnum(void){ … … 172 112 } 173 113 /*}}}*/ 174 /*FUNCTION IntMatParam::SetMatlabField{{{1*/175 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)176 void IntMatParam::SetMatlabField(mxArray* dataref){177 178 char *name = NULL;179 double *doublearray = NULL;180 int *intarray = NULL;181 mxArray *pfield = NULL;182 mxArray *pfield2 = NULL;183 184 this->GetParameterValue(&intarray,NULL,NULL);185 this->GetParameterName(&name);186 187 /*cast intarray into doublearray for Matlab*/188 doublearray=(double*)xmalloc(M*N*sizeof(double));189 for(int i=0;i<M*N;i++)doublearray[i]=(double)intarray[i];190 xfree((void**)&intarray);191 192 pfield=mxCreateDoubleMatrix(0,0,mxREAL);193 mxSetM(pfield,M);194 mxSetN(pfield,N);195 mxSetPr(pfield,doublearray);196 197 //transpose the matrix, written directly to matlab! from C to matlab.198 mexCallMATLAB(1,&pfield2, 1, &pfield, "transpose");199 mxSetField( dataref, 0, name,pfield2);200 }201 #endif202 /*}}}*/203 114 /*FUNCTION IntMatParam::SetValue{{{1*/ 204 115 void IntMatParam::SetValue(int* intarray,int in_M,int in_N){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/IntMatParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 43 39 int Id(); 44 40 int MyRank(); 45 #ifdef _SERIAL_46 void Marshall(char** pmarshalled_dataset);47 int MarshallSize();48 void Demarshall(char** pmarshalled_dataset);49 #endif50 41 int ObjectEnum(); 51 42 Object* copy(); … … 83 74 84 75 void GetParameterName(char**pname); 85 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)86 void SetMatlabField(mxArray* dataref);87 #endif88 76 89 77 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/IntParam.cpp ¶
r12004 r12168 62 62 } 63 63 /*}}}*/ 64 #ifdef _SERIAL_65 /*FUNCTION IntParam::Marshall{{{1*/66 void IntParam::Marshall(char** pmarshalled_dataset){67 68 char* marshalled_dataset=NULL;69 int enum_value=0;70 71 /*recover marshalled_dataset: */72 marshalled_dataset=*pmarshalled_dataset;73 74 /*get enum value of IntParam: */75 enum_value=IntParamEnum;76 77 /*marshall enum: */78 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);79 80 /*marshall IntParam data: */81 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);82 memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);83 84 *pmarshalled_dataset=marshalled_dataset;85 }86 /*}}}*/87 /*FUNCTION IntParam::MarshallSize{{{1*/88 int IntParam::MarshallSize(){89 90 return sizeof(value)+91 +sizeof(enum_type)+92 +sizeof(int); //sizeof(int) for enum value93 }94 /*}}}*/95 /*FUNCTION IntParam::Demarshall{{{1*/96 void IntParam::Demarshall(char** pmarshalled_dataset){97 98 char* marshalled_dataset=NULL;99 int i;100 101 /*recover marshalled_dataset: */102 marshalled_dataset=*pmarshalled_dataset;103 104 /*this time, no need to get enum type, the pointer directly points to the beginning of the105 *object data (thanks to DataSet::Demarshall):*/106 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);107 memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);108 109 /*return: */110 *pmarshalled_dataset=marshalled_dataset;111 return;112 }113 /*}}}*/114 #endif115 64 /*FUNCTION IntParam::ObjectEnum{{{1*/ 116 65 int IntParam::ObjectEnum(void){ … … 134 83 } 135 84 /*}}}*/ 136 /*FUNCTION IntParam::SetMatlabField{{{1*/137 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)138 void IntParam::SetMatlabField(mxArray* dataref){139 140 char* name=NULL;141 this->GetParameterName(&name);142 mxSetField( dataref, 0, name,mxCreateDoubleScalar((double)value));143 }144 #endif145 /*}}}*/146 85 /*FUNCTION IntParam::UnitConversion{{{1*/ 147 86 void IntParam::UnitConversion(int direction_enum){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/IntParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 42 38 int Id(); 43 39 int MyRank(); 44 #ifdef _SERIAL_45 void Marshall(char** pmarshalled_dataset);46 int MarshallSize();47 void Demarshall(char** pmarshalled_dataset);48 #endif49 40 int ObjectEnum(); 50 41 Object* copy(); … … 82 73 83 74 void GetParameterName(char**pname); 84 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)85 void SetMatlabField(mxArray* dataref);86 #endif87 75 88 76 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/IntVecParam.cpp ¶
r12004 r12168 91 91 } 92 92 /*}}}*/ 93 #ifdef _SERIAL_94 /*FUNCTION IntVecParam::Marshall{{{1*/95 void IntVecParam::Marshall(char** pmarshalled_dataset){96 97 char* marshalled_dataset=NULL;98 int enum_value=0;99 100 /*recover marshalled_dataset: */101 marshalled_dataset=*pmarshalled_dataset;102 103 /*get enum value of IntVecParam: */104 enum_value=IntVecParamEnum;105 106 /*marshall enum: */107 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);108 109 /*marshall IntVecParam data: */110 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);111 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);112 if(M)memcpy(marshalled_dataset,values,M*sizeof(int));marshalled_dataset+=M*sizeof(int);113 114 *pmarshalled_dataset=marshalled_dataset;115 }116 /*}}}*/117 /*FUNCTION IntVecParam::MarshallSize{{{1*/118 int IntVecParam::MarshallSize(){119 120 return sizeof(M)+121 +M*sizeof(int)122 +sizeof(enum_type)+123 +sizeof(int); //sizeof(int) for enum value124 }125 /*}}}*/126 /*FUNCTION IntVecParam::Demarshall{{{1*/127 void IntVecParam::Demarshall(char** pmarshalled_dataset){128 129 char* marshalled_dataset=NULL;130 int i;131 132 /*recover marshalled_dataset: */133 marshalled_dataset=*pmarshalled_dataset;134 135 /*this time, no need to get enum type, the pointer directly points to the beginning of the136 *object data (thanks to DataSet::Demarshall):*/137 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);138 139 /*data: */140 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);141 if(M) {142 values=(int*)xmalloc(M*sizeof(int));143 memcpy(values,marshalled_dataset,M*sizeof(int));marshalled_dataset+=M*sizeof(int);144 }145 146 /*return: */147 *pmarshalled_dataset=marshalled_dataset;148 return;149 }150 /*}}}*/151 #endif152 93 /*FUNCTION IntVecParam::ObjectEnum{{{1*/ 153 94 int IntVecParam::ObjectEnum(void){ … … 185 126 } 186 127 /*}}}*/ 187 /*FUNCTION IntVecParam::SetMatlabField{{{1*/188 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)189 void IntVecParam::SetMatlabField(mxArray* dataref){190 191 char *name = NULL;192 double *doublevec = NULL;193 int *intvec = NULL;194 mxArray *pfield = NULL;195 196 this->GetParameterValue(&intvec,NULL);197 this->GetParameterName(&name);198 199 /*cast intvec into doublevec for Matlab*/200 if(M){201 doublevec=(double*)xmalloc(M*sizeof(double));202 for(int i=0;i<M;i++)doublevec[i]=(double)intvec[i];203 }204 else doublevec=NULL;205 xfree((void**)&intvec);206 207 pfield=mxCreateDoubleMatrix(0,0,mxREAL);208 mxSetM(pfield,M);209 mxSetN(pfield,1);210 mxSetPr(pfield,doublevec);211 212 mxSetField(dataref, 0, name, pfield);213 }214 #endif215 /*}}}*/216 128 /*FUNCTION IntVecParam::SetValue{{{1*/ 217 129 void IntVecParam::SetValue(int* intarray,int in_M){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/IntVecParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 43 39 int Id(); 44 40 int MyRank(); 45 #ifdef _SERIAL_46 void Marshall(char** pmarshalled_dataset);47 int MarshallSize();48 void Demarshall(char** pmarshalled_dataset);49 #endif50 41 int ObjectEnum(); 51 42 Object* copy(); … … 83 74 84 75 void GetParameterName(char**pname); 85 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)86 void SetMatlabField(mxArray* dataref);87 #endif88 76 /*}}}*/ 89 77 }; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/MatrixParam.cpp ¶
r12004 r12168 70 70 } 71 71 /*}}}*/ 72 #ifdef _SERIAL_73 /*FUNCTION MatrixParam::Marshall{{{1*/74 void MatrixParam::Marshall(char** pmarshalled_dataset){75 76 char* marshalled_dataset=NULL;77 int enum_value=0;78 int M,N;79 double* serial_mat=NULL;80 81 /*recover marshalled_dataset: */82 marshalled_dataset=*pmarshalled_dataset;83 84 /*get enum value of MatrixParam: */85 enum_value=MatrixParamEnum;86 87 /*marshall enum: */88 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);89 90 /*marshall MatrixParam data: */91 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);92 if(value){93 value->GetSize(&M,&N);94 serial_mat=value->ToSerial();95 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);96 memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);97 memcpy(marshalled_dataset,serial_mat,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));98 }99 else{100 M=0;101 N=0;102 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);103 memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);104 }105 106 /*Free ressources:*/107 xfree((void**)&serial_mat);108 109 /*return:*/110 *pmarshalled_dataset=marshalled_dataset;111 }112 /*}}}*/113 /*FUNCTION MatrixParam::MarshallSize{{{1*/114 int MatrixParam::MarshallSize(){115 116 int M=0;117 int N=0;118 if(value)value->GetSize(&M,&N);119 120 return sizeof(M)+121 sizeof(N)+122 M*N*sizeof(double)+123 +sizeof(enum_type)+124 +sizeof(int); //sizeof(int) for enum value125 }126 /*}}}*/127 /*FUNCTION MatrixParam::Demarshall{{{1*/128 void MatrixParam::Demarshall(char** pmarshalled_dataset){129 130 char* marshalled_dataset=NULL;131 int M,N;132 double* serial_mat=NULL;133 134 /*recover marshalled_dataset: */135 marshalled_dataset=*pmarshalled_dataset;136 137 /*this time, no need to get enum type, the pointer directly points to the beginning of the138 *object data (thanks to DataSet::Demarshall):*/139 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);140 141 /*data: */142 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);143 memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);144 if(M!=0 && N!=0){145 serial_mat=(double*)xmalloc(M*N*sizeof(double));146 memcpy(serial_mat,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));147 value=new Matrix(serial_mat,M,N,.001);148 }149 else{150 value=NULL;151 }152 153 /*Free ressources:*/154 xfree((void**)&serial_mat);155 156 /*return: */157 *pmarshalled_dataset=marshalled_dataset;158 }159 /*}}}*/160 #endif161 72 /*FUNCTION MatrixParam::ObjectEnum{{{1*/ 162 73 int MatrixParam::ObjectEnum(void){ … … 190 101 } 191 102 /*}}}*/ 192 /*FUNCTION MatrixParam::SetMatlabField{{{1*/193 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)194 void MatrixParam::SetMatlabField(mxArray* dataref){195 196 char* name=NULL;197 int M,N;198 double* doublemat=NULL;199 mxArray* pfield=NULL;200 201 doublemat=value->ToSerial();202 value->GetSize(&M,&N);203 this->GetParameterName(&name);204 205 pfield=mxCreateDoubleMatrix(0,0,mxREAL);206 mxSetM(pfield,M);207 mxSetN(pfield,N);208 mxSetPr(pfield,doublemat);209 mxSetField( dataref, 0, name, pfield);210 }211 #endif212 /*}}}*/213 103 /*FUNCTION MatrixParam::SetValue{{{1*/ 214 104 void MatrixParam::SetValue(Matrix* matrix){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/MatrixParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 42 38 int Id(); 43 39 int MyRank(); 44 #ifdef _SERIAL_45 void Marshall(char** pmarshalled_dataset);46 int MarshallSize();47 void Demarshall(char** pmarshalled_dataset);48 #endif49 40 int ObjectEnum(); 50 41 Object* copy(); … … 82 73 83 74 void GetParameterName(char**pname); 84 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)85 void SetMatlabField(mxArray* dataref);86 #endif87 75 88 76 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/Param.h ¶
r12004 r12168 14 14 #else 15 15 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 16 #endif17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include <mex.h>20 16 #endif 21 17 … … 60 56 virtual void UnitConversion(int direction_enum)=0; 61 57 virtual void GetParameterName(char**pname)=0; 62 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)63 virtual void SetMatlabField(mxArray* dataref)=0;64 #endif65 58 }; 66 59 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/StringArrayParam.cpp ¶
r12004 r12168 92 92 } 93 93 /*}}}*/ 94 #ifdef _SERIAL_95 /*FUNCTION StringArrayParam::Marshall{{{1*/96 void StringArrayParam::Marshall(char** pmarshalled_dataset){97 98 int i;99 char* marshalled_dataset=NULL;100 int enum_value=0;101 int stringsize;102 char* string=NULL;103 104 /*recover marshalled_dataset: */105 marshalled_dataset=*pmarshalled_dataset;106 107 /*get enum value of StringArrayParam: */108 enum_value=StringArrayParamEnum;109 110 /*marshall enum: */111 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);112 113 /*marshall data: */114 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);115 memcpy(marshalled_dataset,&numstrings,sizeof(numstrings));marshalled_dataset+=sizeof(numstrings);116 for(i=0;i<numstrings;i++){117 string=this->value[i];118 stringsize=strlen(string)+1;119 120 memcpy(marshalled_dataset,&stringsize,sizeof(stringsize));marshalled_dataset+=sizeof(stringsize);121 memcpy(marshalled_dataset,string,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);122 }123 124 *pmarshalled_dataset=marshalled_dataset;125 }126 /*}}}*/127 /*FUNCTION StringArrayParam::MarshallSize{{{1*/128 int StringArrayParam::MarshallSize(){129 130 int i;131 int marshallsize=0;132 int stringsize;133 char* string=NULL;134 135 marshallsize+=sizeof(numstrings);136 137 for(i=0;i<numstrings;i++){138 string=this->value[i];139 stringsize=strlen(string)+1;140 marshallsize+=sizeof(stringsize);141 marshallsize+=stringsize*sizeof(char);142 }143 144 marshallsize+=sizeof(enum_type);145 marshallsize+=sizeof(int); //sizeof(int) for enum value146 147 return marshallsize;148 }149 /*}}}*/150 /*FUNCTION StringArrayParam::Demarshall{{{1*/151 void StringArrayParam::Demarshall(char** pmarshalled_dataset){152 153 char* marshalled_dataset=NULL;154 int i;155 int stringsize;156 char* string=NULL;157 158 /*recover marshalled_dataset: */159 marshalled_dataset=*pmarshalled_dataset;160 161 /*this time, no need to get enum type, the pointer directly points to the beginning of the162 *object data (thanks to DataSet::Demarshall):*/163 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);164 165 memcpy(&numstrings,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);166 if(numstrings){167 this->value=(char**)xmalloc(numstrings*sizeof(char*));168 169 for(i=0;i<numstrings;i++){170 memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);171 172 string=(char*)xmalloc(stringsize*sizeof(char));173 memcpy(string,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);174 175 this->value[i]=string;176 }177 }178 else this->value=NULL;179 180 /*return: */181 *pmarshalled_dataset=marshalled_dataset;182 return;183 }184 /*}}}*/185 #endif186 94 /*FUNCTION StringArrayParam::ObjectEnum{{{1*/ 187 95 int StringArrayParam::ObjectEnum(void){ … … 236 144 } 237 145 /*}}}*/ 238 /*FUNCTION StringArrayParam::SetMatlabField{{{1*/239 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)240 void StringArrayParam::SetMatlabField(mxArray* dataref){241 242 int i;243 char* name=NULL;244 mwSize dims[2]={0};245 mxArray* pfield=NULL;246 247 this->GetParameterName(&name);248 249 dims[0]=this->numstrings;250 dims[1]=1;251 pfield=mxCreateCellArray(2,dims);252 for(i=0;i<this->numstrings;i++){253 char* string=value[i];254 mxSetCell(pfield,i,mxCreateString(string));255 }256 mxSetField( dataref, 0, name,pfield);257 }258 #endif259 /*}}}*/260 146 /*FUNCTION StringArrayParam::SetValue{{{1*/ 261 147 void StringArrayParam::SetValue(char** stringarray,int M){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/StringArrayParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 44 40 int Id(); 45 41 int MyRank(); 46 #ifdef _SERIAL_47 void Marshall(char** pmarshalled_dataset);48 int MarshallSize();49 void Demarshall(char** pmarshalled_dataset);50 #endif51 42 int ObjectEnum(); 52 43 Object* copy(); … … 84 75 85 76 void GetParameterName(char**pname); 86 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)87 void SetMatlabField(mxArray* dataref);88 #endif89 77 /*}}}*/ 90 78 }; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/StringParam.cpp ¶
r12004 r12168 64 64 } 65 65 /*}}}*/ 66 #ifdef _SERIAL_67 /*FUNCTION StringParam::Marshall{{{1*/68 void StringParam::Marshall(char** pmarshalled_dataset){69 70 char* marshalled_dataset=NULL;71 int enum_value=0;72 int stringsize;73 74 /*recover marshalled_dataset: */75 marshalled_dataset=*pmarshalled_dataset;76 77 /*get enum value of StringParam: */78 enum_value=StringParamEnum;79 80 /*marshall enum: */81 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);82 83 /*marshall data: */84 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);85 stringsize=strlen(this->value)+1;86 87 memcpy(marshalled_dataset,&stringsize,sizeof(stringsize));marshalled_dataset+=sizeof(stringsize);88 memcpy(marshalled_dataset,this->value,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);89 90 *pmarshalled_dataset=marshalled_dataset;91 }92 /*}}}*/93 /*FUNCTION StringParam::MarshallSize{{{1*/94 int StringParam::MarshallSize(){95 96 int stringsize;97 stringsize=strlen(this->value)+1;98 99 return sizeof(int)+100 stringsize*sizeof(char)+101 sizeof(enum_type)+102 sizeof(int); //sizeof(int) for enum value103 }104 /*}}}*/105 /*FUNCTION StringParam::Demarshall{{{1*/106 void StringParam::Demarshall(char** pmarshalled_dataset){107 108 char* marshalled_dataset=NULL;109 int i;110 int stringsize;111 112 /*recover marshalled_dataset: */113 marshalled_dataset=*pmarshalled_dataset;114 115 /*this time, no need to get enum type, the pointer directly points to the beginning of the116 *object data (thanks to DataSet::Demarshall):*/117 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);118 119 memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);120 121 this->value=(char*)xmalloc(stringsize*sizeof(char));122 memcpy(this->value,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);123 124 /*return: */125 *pmarshalled_dataset=marshalled_dataset;126 return;127 }128 /*}}}*/129 #endif130 66 /*FUNCTION StringParam::ObjectEnum{{{1*/ 131 67 int StringParam::ObjectEnum(void){ … … 164 100 } 165 101 /*}}}*/ 166 /*FUNCTION StringParam::SetMatlabField{{{1*/167 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)168 void StringParam::SetMatlabField(mxArray* dataref){169 170 char* name=NULL;171 172 this->GetParameterName(&name);173 mxSetField( dataref, 0, name, mxCreateString(value));174 }175 #endif176 /*}}}*/177 102 /*FUNCTION StringParam::SetValue{{{1*/ 178 103 void StringParam::SetValue(char* string){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/StringParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 42 38 int Id(); 43 39 int MyRank(); 44 #ifdef _SERIAL_45 void Marshall(char** pmarshalled_dataset);46 int MarshallSize();47 void Demarshall(char** pmarshalled_dataset);48 #endif49 40 int ObjectEnum(); 50 41 Object* copy(); … … 82 73 83 74 void GetParameterName(char**pname); 84 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)85 void SetMatlabField(mxArray* dataref);86 #endif87 75 88 76 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/VectorParam.cpp ¶
r12004 r12168 72 72 } 73 73 /*}}}*/ 74 #ifdef _SERIAL_75 /*FUNCTION VectorParam::Marshall{{{1*/76 void VectorParam::Marshall(char** pmarshalled_dataset){77 78 char* marshalled_dataset=NULL;79 int enum_value=0;80 int M;81 double* serial_value=NULL;82 83 /*recover marshalled_dataset: */84 marshalled_dataset=*pmarshalled_dataset;85 86 /*get enum value of VectorParam: */87 enum_value=VectorParamEnum;88 89 /*marshall enum: */90 memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);91 92 /*marshall VectorParam data: */93 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);94 if(value){95 value->GetSize(&M);96 serial_value=value->ToMPISerial();97 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);98 memcpy(marshalled_dataset,serial_value,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));99 }100 else{101 M=0;102 memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);103 }104 /*Free ressources:*/105 xfree((void**)&serial_value);106 107 /*return:*/108 *pmarshalled_dataset=marshalled_dataset;109 }110 /*}}}*/111 /*FUNCTION VectorParam::MarshallSize{{{1*/112 int VectorParam::MarshallSize(){113 114 int M=0;115 if(value)value->GetSize(&M);116 117 return sizeof(M)+M*sizeof(double)118 +sizeof(enum_type)+119 +sizeof(int); //sizeof(int) for enum value120 }121 /*}}}*/122 /*FUNCTION VectorParam::Demarshall{{{1*/123 void VectorParam::Demarshall(char** pmarshalled_dataset){124 125 char* marshalled_dataset=NULL;126 int i;127 double* serial_vec=NULL;128 int M;129 130 /*recover marshalled_dataset: */131 marshalled_dataset=*pmarshalled_dataset;132 133 /*this time, no need to get enum type, the pointer directly points to the beginning of the134 *object data (thanks to DataSet::Demarshall):*/135 memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);136 137 /*data: */138 139 memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);140 if(M){141 serial_vec=(double*)xmalloc(M*sizeof(double));142 memcpy(serial_vec,marshalled_dataset,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));143 144 value=new Vector(serial_vec,M);145 }146 else{147 value=NULL;148 }149 150 /*Free ressources:*/151 xfree((void**)&serial_vec);152 153 /*return: */154 *pmarshalled_dataset=marshalled_dataset;155 }156 /*}}}*/157 #endif158 74 /*FUNCTION VectorParam::ObjectEnum{{{1*/ 159 75 int VectorParam::ObjectEnum(void){ … … 188 104 } 189 105 /*}}}*/ 190 /*FUNCTION VectorParam::SetMatlabField{{{1*/191 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)192 void VectorParam::SetMatlabField(mxArray* dataref){193 194 mxArray* pfield=NULL;195 char* name=NULL;196 double* doublevec=NULL;197 int M;198 199 doublevec=value->ToMPISerial();200 value->GetSize(&M);201 this->GetParameterName(&name);202 203 pfield=mxCreateDoubleMatrix(0,0,mxREAL);204 mxSetM(pfield,M);205 mxSetN(pfield,1);206 mxSetPr(pfield,doublevec);207 208 mxSetField( dataref, 0, name, pfield);209 }210 #endif211 /*}}}*/212 106 /*FUNCTION VectorParam::SetValue{{{1*/ 213 107 void VectorParam::SetValue(Vector* vector){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Params/VectorParam.h ¶
r12004 r12168 13 13 #else 14 14 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 15 #endif16 17 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)18 #include <mex.h>19 15 #endif 20 16 … … 42 38 int Id(); 43 39 int MyRank(); 44 #ifdef _SERIAL_45 void Marshall(char** pmarshalled_dataset);46 int MarshallSize();47 void Demarshall(char** pmarshalled_dataset);48 #endif49 40 int ObjectEnum(); 50 41 Object* copy(); … … 82 73 83 74 void GetParameterName(char**pname); 84 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)85 void SetMatlabField(mxArray* dataref);86 #endif87 75 88 76 /*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Patch.cpp ¶
r11399 r12168 120 120 int node_numrows; 121 121 double *total_values = NULL; 122 #ifdef _HAVE_MPI_ 122 123 MPI_Status status; 124 #endif 123 125 124 #ifdef _SERIAL_125 return; //nothing to be done126 #endif127 128 126 /*First, figure out total number of rows combining all the cpus: */ 127 #ifdef _HAVE_MPI_ 129 128 MPI_Reduce(&this->numrows,&total_numrows,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD ); 130 129 MPI_Bcast(&total_numrows,1,MPI_INT,0,MPI_COMM_WORLD); 130 #else 131 total_numrows=this->numrows; 132 #endif 131 133 132 134 /*return if patch empty*/ … … 144 146 145 147 /*Now, ask other nodes to send their values: */ 148 #ifdef _HAVE_MPI_ 146 149 for (i=1;i<num_procs;i++){ 147 150 if (my_rank==i){ … … 155 158 } 156 159 } 160 #endif 157 161 158 162 /*Now, node 0 has total_values, of size total_numrows*this->numcols. Update the fields in the patch, to reflect this new … … 163 167 this->values=total_values; 164 168 } 169 #ifdef _HAVE_MPI_ 165 170 else{ 166 171 this->numrows=0; 167 172 xfree((void**)&this->values); 168 173 } 174 #endif 169 175 }/*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Segment.cpp ¶
r9883 r12168 71 71 } 72 72 /*}}}*/ 73 #ifdef _SERIAL_74 /*FUNCTION Segment::Marshall{{{1*/75 void Segment::Marshall(char** pmarshalled_dataset){76 77 _error_(" not supported yet!");78 }79 /*}}}*/80 /*FUNCTION Segment::MarshallSize{{{1*/81 int Segment::MarshallSize(){82 _error_(" not supported yet!");83 }84 /*}}}*/85 /*FUNCTION Segment::Demarshall{{{1*/86 void Segment::Demarshall(char** pmarshalled_dataset){87 _error_(" not supported yet!");88 }89 /*}}}*/90 #endif91 73 /*FUNCTION Segment::ObjectEnum{{{1*/ 92 74 int Segment::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Segment.h ¶
r9883 r12168 30 30 int Id(); 31 31 int MyRank(); 32 #ifdef _SERIAL_33 void Marshall(char** pmarshalled_dataset);34 int MarshallSize();35 void Demarshall(char** pmarshalled_dataset);36 #endif37 32 int ObjectEnum(); 38 33 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Vertex.cpp ¶
r11708 r12168 92 92 } 93 93 /*}}}*/ 94 #ifdef _SERIAL_95 /*FUNCTION Vertex::Marshall {{{1*/96 void Vertex::Marshall(char** pmarshalled_dataset){97 98 char* marshalled_dataset=NULL;99 int enum_type=0;100 101 /*recover marshalled_dataset: */102 marshalled_dataset=*pmarshalled_dataset;103 104 /*get enum type of Vertex: */105 enum_type=VertexEnum;106 107 /*marshall enum: */108 memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);109 110 /*marshall Vertex data: */111 memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);112 memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);113 memcpy(marshalled_dataset,&x,sizeof(x));marshalled_dataset+=sizeof(x);114 memcpy(marshalled_dataset,&y,sizeof(y));marshalled_dataset+=sizeof(y);115 memcpy(marshalled_dataset,&z,sizeof(z));marshalled_dataset+=sizeof(z);116 memcpy(marshalled_dataset,&sigma,sizeof(sigma));marshalled_dataset+=sizeof(sigma);117 memcpy(marshalled_dataset,&connectivity,sizeof(connectivity));marshalled_dataset+=sizeof(connectivity);118 memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);119 memcpy(marshalled_dataset,&clone,sizeof(clone));marshalled_dataset+=sizeof(clone);120 121 *pmarshalled_dataset=marshalled_dataset;122 return;123 }124 /*}}}*/125 /*FUNCTION Vertex::MarshallSize {{{1*/126 int Vertex::MarshallSize(){127 128 return sizeof(id)+129 sizeof(sid)+130 sizeof(x)+131 sizeof(y)+132 sizeof(z)+133 sizeof(sigma)+134 sizeof(connectivity)+135 sizeof(dof)+136 sizeof(clone)+137 +sizeof(int); //sizeof(int) for enum type138 }139 /*}}}*/140 /*FUNCTION Vertex::Demarshall {{{1*/141 void Vertex::Demarshall(char** pmarshalled_dataset){142 143 char* marshalled_dataset=NULL;144 int i;145 146 /*recover marshalled_dataset: */147 marshalled_dataset=*pmarshalled_dataset;148 149 /*this time, no need to get enum type, the pointer directly points to the beginning of the150 *object data (thanks to DataSet::Demarshall):*/151 152 memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);153 memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);154 memcpy(&x,marshalled_dataset,sizeof(x));marshalled_dataset+=sizeof(x);155 memcpy(&y,marshalled_dataset,sizeof(y));marshalled_dataset+=sizeof(y);156 memcpy(&z,marshalled_dataset,sizeof(z));marshalled_dataset+=sizeof(z);157 memcpy(&sigma,marshalled_dataset,sizeof(sigma));marshalled_dataset+=sizeof(sigma);158 memcpy(&connectivity,marshalled_dataset,sizeof(connectivity));marshalled_dataset+=sizeof(connectivity);159 memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);160 memcpy(&clone,marshalled_dataset,sizeof(clone));marshalled_dataset+=sizeof(clone);161 162 /*return: */163 *pmarshalled_dataset=marshalled_dataset;164 return;165 }166 /*}}}*/167 #endif168 94 /*FUNCTION Vertex::ObjectEnum{{{1*/ 169 95 int Vertex::ObjectEnum(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/objects/Vertex.h ¶
r11708 r12168 47 47 int Id(); 48 48 int MyRank(); 49 #ifdef _SERIAL_50 void Marshall(char** pmarshalled_dataset);51 int MarshallSize();52 void Demarshall(char** pmarshalled_dataset);53 #endif54 49 int ObjectEnum(); 55 50 Object* copy(); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Alloc/alloc.cpp ¶
r12004 r12168 19 19 #endif 20 20 21 #if defined(_SERIAL_) && defined(_HAVE_MATLAB_)22 #include "mex.h"23 #endif24 25 21 #include <stdio.h> 26 22 #include <stdlib.h> … … 37 33 if(!size)_error_(" attempting to 0 size allocation!"); 38 34 39 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)40 /* Use the matlab api to do the allocation: */41 memptr=mxMalloc(size);42 #else43 35 /* Use the c library to do the allocation: */ 44 36 memptr=malloc(size); 45 #endif46 37 if(!memptr) _error_("memory allocation failed!"); 47 38 … … 55 46 if(!size)_error_("attempting to 0 size allocation!"); 56 47 57 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)58 /* Use the matlab api to do the allocation: */59 memptr=mxCalloc(n,size);60 #else61 48 /* Use the c library to do the allocation: */ 62 49 memptr=calloc(n,size); 63 #endif64 50 if(!memptr) _error_("memory allocation failed!"); 65 51 … … 70 56 71 57 if (pv && *pv){ 72 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) 73 mxFree(*pv); 74 #else 75 free(*pv); 76 #endif 58 free(*pv); 77 59 78 60 *pv=NULL; … … 83 65 84 66 if (pv && *pv){ 85 #ifdef _PARALLEL_86 67 /*There is no mxDelete in the Matlab API -> using delete trips up Matlab. So we 87 68 * don't actually free memory in Matlab, we let the memory manager do that. We only 88 69 * free in parallel: */ 89 70 delete *pv; 90 #else91 /*Actually, still get rid of internal Petsc matrix. Quick fix until Matlab handles C++92 * correctly: */93 #ifdef _HAVE_PETSC_94 MatFree(&(*pv)->matrix);95 #endif96 #endif97 71 *pv=NULL; 98 72 } … … 102 76 103 77 if (pv && *pv){ 104 #ifdef _PARALLEL_105 78 /*There is no mxDelete in the Matlab API -> using delete trips up Matlab. So we 106 79 * don't actually free memory in Matlab, we let the memory manager do that. We only 107 80 * free in parallel: */ 108 81 delete *pv; 109 #else110 /*Actually, still get rid of internal Petsc vector. Quick fix until Matlab handles C++111 * correctly: */112 #ifdef _HAVE_PETSC_113 VecFree(&(*pv)->vector);114 #endif115 #endif116 82 *pv=NULL; 117 83 } … … 124 90 125 91 if(!size)_error_("attempting to realloc to zero"); 126 127 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)128 value = (void*)mxRealloc(pv,size);129 #else130 92 value = (void*)realloc(pv,size); 131 #endif132 93 133 94 if (value == NULL) { -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Exceptions/Exceptions.cpp ¶
r12004 r12168 11 11 #include "../shared.h" 12 12 #include "../../include/include.h" 13 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)14 #include "mex.h"15 #endif16 13 17 14 ErrorException::ErrorException(const string &what_arg){ … … 32 29 33 30 ErrorException::~ErrorException() throw(){ 31 extern int num_procs; 32 /*We want the report only for matlab modules, otherwise we get twice the report 33 * We assume that if num_procs==1, it is a module (FIXME)*/ 34 if(num_procs==1) this->Report(); 34 35 } 35 36 … … 40 41 void ErrorException::Report(){ 41 42 extern int my_rank; 43 extern int num_procs; 42 44 43 45 if (function_name=="" || file_line==0){ //WINDOWS … … 45 47 } 46 48 else{ 47 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) 48 mexErrMsgTxt(exprintf("\n??? Error using ==> %s at %i\n%s error message: %s\n", 49 file_name.c_str(),file_line,function_name.c_str(),what())); 50 #else 49 if(num_procs==1){ 50 printf("\n??? Error using ==> %s:%i\n",file_name.c_str(),file_line); 51 printf("%s error message: %s\n\n",function_name.c_str(),what()); 52 } 53 else{ 51 54 printf("\n[%i] ??? Error using ==> %s:%i\n",my_rank,file_name.c_str(),file_line); 52 55 printf("[%i] %s error message: %s\n\n",my_rank,function_name.c_str(),what()); 53 #endif56 } 54 57 } 55 58 return; -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Exceptions/exceptions.h ¶
r11199 r12168 23 23 24 24 public: 25 26 25 ErrorException(const string &what_arg); //for windows 27 26 ErrorException(string what_file,string what_function,int what_line,string what_arg);//UNIX 28 27 ~ErrorException() throw(); 29 30 28 virtual const char *what() const throw(); 31 32 29 void Report(); 33 30 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Exp/DomainOutlineRead.cpp ¶
r12004 r12168 13 13 #include "../../Container/DataSet.h" 14 14 15 int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname,bool whole=true){ 16 15 int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname){ 17 16 18 17 /*indexing: */ … … 102 101 if((x[0]==x[n-1]) && (y[0]==y[n-1])){ 103 102 cl=true; 104 if (!whole) {105 n=n-1;106 }107 103 } 108 104 … … 126 122 } 127 123 128 DataSet* DomainOutlineRead(char* domainname,bool whole=true){ 129 130 /*indexing: */ 131 int i; 124 DataSet* DomainOutlineRead(char* domainname){ 132 125 133 126 /*intermediary: */ 134 int nprof; 135 int* profnvertices=NULL; 136 double** pprofx=NULL; 137 double** pprofy=NULL; 138 139 Contour* contour=NULL; 127 int nprof; 128 int *profnvertices = NULL; 129 double **pprofx = NULL; 130 double **pprofy = NULL; 131 Contour *contour = NULL; 140 132 141 133 /*output: */ 142 134 DataSet* domain=NULL; 143 135 144 /*get domain outline from intermediary function:*/ 145 DomainOutlineRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname,whole); 136 /*If domainname is an empty string, return empty dataset*/ 137 if (strcmp(domainname,"")==0){ 138 nprof=0; 139 } 140 else{ 141 DomainOutlineRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname); 142 } 146 143 147 144 /*now create dataset of contours: */ 148 145 domain=new DataSet(0); 149 146 150 for(i =0;i<nprof;i++){147 for(int i=0;i<nprof;i++){ 151 148 domain->AddObject(new Contour(i,profnvertices[i],pprofx[i],pprofy[i],1)); 152 149 } 153 154 150 return domain; 155 151 } -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Exp/DomainOutlineWrite.cpp ¶
r9320 r12168 11 11 #include "../Exceptions/exceptions.h" 12 12 13 int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname ,bool whole=true){13 int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname){ 14 14 15 15 … … 20 20 /*I/O: */ 21 21 FILE* fid=NULL; 22 23 /*input: */24 // int nprof; //number of profiles in the domainname file25 // int* profnvertices=NULL; //array holding the number of vertices for the nprof profiles26 // double** pprofx=NULL; //array of profiles x coordinates27 // double** pprofy=NULL; //array of profiles y coordinates28 // bool* closed=NULL; //array holding closed flags for the nprof profiles29 22 30 23 /*open domain outline file for writing: */ … … 43 36 44 37 /*Write number of profile vertices: */ 45 if(closed[counter] && !whole) 46 fprintf(fid,"%u %s\n",profnvertices[counter]+1,"1."); 47 else 48 fprintf(fid,"%u %s\n",profnvertices[counter] ,"1."); 38 fprintf(fid,"%u %s\n",profnvertices[counter] ,"1."); 49 39 50 40 /*Write next line: */ … … 55 45 fprintf(fid,"%lf\t%lf\n",pprofx[counter][i],pprofy[counter][i]); 56 46 } 57 58 /*Now check that we are dealing with open contours: */59 if(closed[counter] && !whole)60 fprintf(fid,"%lf\t%lf\n",pprofx[counter][0],pprofy[counter][0]);61 47 62 48 /*Write blank line: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Exp/exp.h ¶
r12004 r12168 13 13 int IsOutsidePoly(Vector* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue); 14 14 int IsInPolySerial(double* in,double* xc,double* yc,int numvertices,double* x,double* y,int nods, int edgevalue); 15 int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname ,bool whole);15 int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname); 16 16 int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue); 17 17 18 int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname ,bool whole);19 DataSet* DomainOutlineRead(char* domainname ,bool whole);18 int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname); 19 DataSet* DomainOutlineRead(char* domainname); 20 20 21 21 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Numerics/OptionsFromAnalysis.cpp ¶
r12004 r12168 30 30 parameters->FindParam(&strings,&numanalyses,PetscOptionsStringsEnum); 31 31 32 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) //do not take this away, because ISSM loads analyses as a Double Param instead of a DoubleVec Param when running with only 1 analysis33 if(numanalyses==1){ analyses=(double*)xmalloc(1*sizeof(double)); parameters->FindParam(analyses,PetscOptionsAnalysesEnum);34 }35 else parameters->FindParam(&analyses,&dummy,PetscOptionsAnalysesEnum);36 #else37 32 parameters->FindParam(&analyses,&dummy,PetscOptionsAnalysesEnum); 38 #endif39 33 40 34 if(numanalyses==0)return NULL; //we did not find petsc options, don't bother. -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Numerics/Synchronize.sh ¶
r11402 r12168 2 2 #Synchronize Verbosity 3 3 #first remove existing files 4 rm $ISSM_ TIER/src/m/shared/Verb*.m4 rm $ISSM_DIR/src/m/shared/Verb*.m 5 5 6 6 echo "Synchronizing Verbosity levels..." … … 29 29 #include "../../include/macros.h" 30 30 #include "../Exceptions/exceptions.h" 31 #ifdef _SERIAL_32 #include <mex.h>33 #endif34 31 /*}}}*/ 35 32 … … 54 51 55 52 #Add Verbosity Matlab file{{{ 56 cat <<END > $ISSM_ TIER"/src/m/shared/"$(echo $FILENAME".m")53 cat <<END > $ISSM_DIR"/src/m/shared/"$(echo $FILENAME".m") 57 54 function bool=$(echo $FILENAME)() 58 55 %$(echo $FILENAME | awk {'print toupper($1)'}) - Return true if $(echo $LEVELNAME | awk {'print tolower($1)'}) level is activated … … 140 137 if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level); 141 138 142 #ifdef _SERIAL_143 144 mxArray* output=NULL;145 mxArray* input=NULL;146 input=mxCreateDoubleScalar((double)level);147 148 mexCallMATLAB(0,&output,1,&input,"SetVerbosityLevel");149 #else150 151 139 verbositylevel = level; 152 140 153 #endif154 141 }/*}}}*/ 155 142 /*FUNCTION GetVerbosityLevel {{{*/ 156 143 int GetVerbosityLevel(void){ 157 #ifdef _SERIAL_158 159 mxArray* output=NULL;160 mxArray* input=NULL;161 double level;162 163 mexCallMATLAB(1,&output,0,&input,"GetVerbosityLevel");164 level=mxGetScalar(output);165 166 verbositylevel = (int)level;167 return verbositylevel;168 169 #else170 171 144 _assert_(verbositylevel>=0); 172 145 return verbositylevel; 173 174 #endif175 146 }/*}}}*/ 176 147 END 177 148 #}}} 178 149 #Complete verbose.m {{{1 179 VERBOSEPATH="$ISSM_ TIER/src/m/classes/verbose.m"150 VERBOSEPATH="$ISSM_DIR/src/m/classes/verbose.m" 180 151 cat $VERBOSEPATH | sed "/%BEGINFIELDS/,$ d" > temp_begin 181 152 cat $VERBOSEPATH | sed "1,/%ENDFIELDS/d" > temp_end -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Numerics/Verbosity.cpp ¶
r12004 r12168 18 18 #include "../../include/macros.h" 19 19 #include "../Exceptions/exceptions.h" 20 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)21 #include <mex.h>22 #endif23 20 /*}}}*/ 24 21 … … 39 36 if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level); 40 37 41 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)42 43 mxArray* output=NULL;44 mxArray* input=NULL;45 input=mxCreateDoubleScalar((double)level);46 47 mexCallMATLAB(0,&output,1,&input,"SetVerbosityLevel");48 #else49 50 38 verbositylevel = level; 51 39 52 #endif53 40 }/*}}}*/ 54 41 /*FUNCTION GetVerbosityLevel {{{*/ 55 42 int GetVerbosityLevel(void){ 56 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)57 58 mxArray* output=NULL;59 mxArray* input=NULL;60 double level;61 62 mexCallMATLAB(1,&output,0,&input,"GetVerbosityLevel");63 level=mxGetScalar(output);64 65 verbositylevel = (int)level;66 return verbositylevel;67 68 #else69 43 70 44 _assert_(verbositylevel>=0); 71 45 return verbositylevel; 72 46 73 #endif74 47 }/*}}}*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp ¶
r12004 r12168 1 #include "../../io/Matlab/matlabio.h"2 1 #include "../Alloc/alloc.h" 3 2 #include "../../include/include.h" 4 3 #include "../Exceptions/exceptions.h" 4 #include "./isnan.h" 5 5 #include <math.h> 6 6 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/TriMesh/SplitMeshForRifts.cpp ¶
r8301 r12168 47 47 segmentmarkerlist=*psegmentmarkerlist; 48 48 49 50 49 /*Establish list of segments that belong to a rift: */ 51 RiftSegmentsFromSegments(&nriftsegs,&riftsegments,nel,index,nsegs,segments); /*riftsegments of size nriftsegsx4 (4 for first element on segment,second element,52 first node and second snode)*/50 /*riftsegments of size nriftsegsx4 (4 for first element on segment,second element,first node and second snode)*/ 51 RiftSegmentsFromSegments(&nriftsegs,&riftsegments,nel,index,nsegs,segments); 53 52 54 53 /*Go through all nodes of the rift segments, and start splitting the mesh: */ … … 57 56 for (j=0;j<2;j++){ 58 57 59 node= *(riftsegments+4*i+j+2);58 node=riftsegments[4*i+j+2]; 60 59 if(flags[node-1]){ 61 60 /*This node was already split, skip:*/ … … 70 69 DetermineGridElementListOnOneSideOfRift(&NumGridElementListOnOneSideOfRift,&GridElementListOnOneSideOfRift,i,nriftsegs,riftsegments,node,index,nel); 71 70 72 /*Summary: we have for node, a list of elements (GridElementListOnOneSideOfRift, of size NumGridElementListOnOneSideOfRift) that all contain node 73 *and that are on the same side of the rift. For all these elements, we clone node into another node, and we swap all instances of node in the triangulation 74 *for those elements, to the new node.*/ 71 /*Summary: we have for node, a list of elements 72 * (GridElementListOnOneSideOfRift, of size 73 * NumGridElementListOnOneSideOfRift) that all contain node 74 *and that are on the same side of the rift. For all these 75 elements, we clone node into another node, and we swap all 76 instances of node in the triangulation *for those elements, to the 77 new node.*/ 75 78 76 79 //augment number of nodes … … 94 97 95 98 /*update segments: they got modified completely by adding new nodes.*/ 96 UpdateSegments(&segments,&segmentmarkerlist, &nsegs,index,x,y,riftsegments,nriftsegs );99 UpdateSegments(&segments,&segmentmarkerlist, &nsegs,index,x,y,riftsegments,nriftsegs,nods,nel); 97 100 98 101 /*Assign output pointers: */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/TriMesh/TriMeshUtils.cpp ¶
r11401 r12168 11 11 12 12 #define RIFTPENALTYPAIRSWIDTH 8 13 /*FUNCTION IsGridOnRift{{{*/ 13 14 int IsGridOnRift(int* riftsegments, int nriftsegs, int node){ 14 15 … … 32 33 return 0; 33 34 } 34 } 35 36 35 }/*}}}*/ 36 /*FUNCTION GridElementsList{{{*/ 37 37 int GridElementsList(int** pGridElements, int* pNumGridElements,int node,double * index,int nel){ 38 38 … … 87 87 *pNumGridElements=NumGridElements; 88 88 return noerr; 89 } 90 91 89 }/*}}}*/ 90 /*FUNCTION IsNeighbor{{{*/ 92 91 int IsNeighbor(int el1,int el2,double* index){ 93 92 /*From a triangulation held in index, figure out if elements 1 and 2 have two nodes in common: */ … … 105 104 return 0; 106 105 } 107 } 108 109 106 }/*}}}*/ 107 /*FUNCTION IsOnRift{{{*/ 110 108 int IsOnRift(int el,int nriftsegs,int* riftsegments){ 111 109 /*From a list of elements segments, figure out if el belongs to it: */ … … 117 115 } 118 116 return 0; 119 } 120 121 122 /****************************************************************************************************************************** 123 RiftSegmentsFromSegments 124 ******************************************************************************************************************************/ 125 117 }/*}}}*/ 118 /*FUNCTION RiftSegmentsFromSegments{{{*/ 126 119 void RiftSegmentsFromSegments(int* pnriftsegs, int** priftsegments, int nel, double* index, int nsegs,double* segments){ 127 120 … … 189 182 *priftsegments=riftsegments; 190 183 *pnriftsegs=nriftsegs; 191 } 192 193 /****************************************************************************************************************************** 194 DetermineGridElementListOnOneSideOfRift 195 ******************************************************************************************************************************/ 196 184 }/*}}}*/ 185 /*FUNCTION DetermineGridElementListOnOneSideOfRift{{{*/ 197 186 int DetermineGridElementListOnOneSideOfRift(int* pNumGridElementListOnOneSideOfRift, int** pGridElementListOnOneSideOfRift, int segmentnumber, int nriftsegs, int* riftsegments, int node,double* index,int nel){ 198 187 … … 257 246 *pGridElementListOnOneSideOfRift=GridElementListOnOneSideOfRift; 258 247 return noerr; 259 } 260 261 /****************************************************************************************************************************** 262 UpdateSegments 263 ******************************************************************************************************************************/ 264 265 int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs){ 248 }/*}}}*/ 249 /*FUNCTION UpdateSegments{{{*/ 250 int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs,int nods,int nel){ 266 251 267 252 int noerr=1; … … 284 269 /*First, update the existing segments to the new nodes :*/ 285 270 for (i=0;i<nriftsegs;i++){ 286 el1= *(riftsegments+4*i+0);287 el2= *(riftsegments+4*i+1);271 el1=riftsegments[4*i+0]; 272 el2=riftsegments[4*i+1]; 288 273 for (j=0;j<nsegs;j++){ 289 if ( *(segments+3*j+2)==(el1+1)){274 if (segments[3*j+2]==(el1+1)){ 290 275 /*segment j is the same as rift segment i.Let's update segments[j][:] using element el1 and the corresponding rift segment. 291 276 *Because riftsegments does not represent a list of rift segments anymore (it got heavily modified in SplitElementsForRifts, … … 293 278 for (k=0;k<3;k++){ 294 279 if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+0)-1])){ 295 *(segments+3*j+0)=*(index+el1*3+k); 280 *(segments+3*j+0)=*(index+el1*3+k); _assert_(segments[3*j+0]<nods+1); 296 281 break; 297 282 } … … 299 284 for (k=0;k<3;k++){ 300 285 if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+1)-1])){ 301 *(segments+3*j+1)=*(index+el1*3+k); 286 *(segments+3*j+1)=*(index+el1*3+k); _assert_(segments[3*j+1]<nods+1); 302 287 break; 303 288 } … … 308 293 for (k=0;k<3;k++){ 309 294 if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+0)-1])){ 310 *(segments+3*(nsegs+i)+0)=*(index+el2*3+k); 295 *(segments+3*(nsegs+i)+0)=*(index+el2*3+k); _assert_(segments[3*(nsegs+i)+0]<nods+1); 311 296 break; 312 297 } … … 314 299 for (k=0;k<3;k++){ 315 300 if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+1)-1])){ 316 *(segments+3*(nsegs+i)+1)=*(index+el2*3+k); 301 *(segments+3*(nsegs+i)+1)=*(index+el2*3+k); _assert_(segments[3*(nsegs+i)+1]<nods+1); 317 302 break; 318 303 } … … 324 309 for (k=0;k<3;k++){ 325 310 if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+0)-1])){ 326 *(segments+3*j+0)=*(index+el2*3+k); 311 *(segments+3*j+0)=*(index+el2*3+k); _assert_(segments[3*j+0]<nods+1); 327 312 break; 328 313 } … … 330 315 for (k=0;k<3;k++){ 331 316 if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+1)-1])){ 332 *(segments+3*j+1)=*(index+el2*3+k); 317 *(segments+3*j+1)=*(index+el2*3+k);_assert_(segments[3*j+1]<nods+1); 333 318 break; 334 319 } … … 339 324 for (k=0;k<3;k++){ 340 325 if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+0)-1])){ 341 *(segments+3*(nsegs+i)+0)=*(index+el1*3+k); 326 *(segments+3*(nsegs+i)+0)=*(index+el1*3+k);_assert_(segments[3*(nsegs+i)+0]<nods+1); 342 327 break; 343 328 } … … 345 330 for (k=0;k<3;k++){ 346 331 if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+1)-1])){ 347 *(segments+3*(nsegs+i)+1)=*(index+el1*3+k); 332 *(segments+3*(nsegs+i)+1)=*(index+el1*3+k);_assert_(segments[3*(nsegs+i)+1]<nods+1); 348 333 break; 349 334 } … … 360 345 361 346 return noerr; 362 } 363 364 /****************************************************************************************************************************** 365 pnpoly 366 ******************************************************************************************************************************/ 347 }/*}}}*/ 348 /*FUNCTION pnpoly{{{*/ 367 349 int pnpoly(int npol, double *xp, double *yp, double x, double y) { 368 350 int i, j, c = 0; … … 374 356 } 375 357 return c; 376 } 377 378 /****************************************************************************************************************************** 379 IsInPoly 380 ******************************************************************************************************************************/ 381 //void IsInPoly(double* in,double* xc,double* yc,int numnodes,double* x,double* y,int nods){ 382 // 383 // int i; 384 // double x0,y0; 385 // 386 // /*Go through all nodes of the mesh:*/ 387 // for (i=0;i<nods;i++){ 388 // if (in[i]){ 389 // /*this node already is inside one of the contours, continue*/ 390 // continue; 391 // } 392 // /*pick up node: */ 393 // x0=x[i]; 394 // y0=y[i]; 395 // if (pnpoly(numnodes,xc,yc,x0,y0)){ 396 // in[i]=1; 397 // } 398 // } 399 //} 400 401 /****************************************************************************************************************************** 402 FindElement 403 ******************************************************************************************************************************/ 404 358 }/*}}}*/ 359 /*FUNCTION FindElement{{{*/ 405 360 int FindElement(double A,double B,double* index,int nel){ 406 361 … … 414 369 } 415 370 return el; 416 } 417 /****************************************************************************************************************************** 418 SplitRiftSegments 419 ******************************************************************************************************************************/ 420 421 int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts){ 371 }/*}}}*/ 372 /*FUNCTION SplitRiftSegments{{{*/ 373 int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts,int nods,int nel){ 422 374 423 375 /*Using segment markers, wring out the rift segments from the segments. Rift markers are … … 461 413 for (i=0;i<numsegs;i++){ 462 414 if (segmentmarkerlist[i]==1){ 463 *(new_segments+3*counter+0)=*(segments+3*i+0);464 *(new_segments+3*counter+1)=*(segments+3*i+1);465 *(new_segments+3*counter+2)=*(segments+3*i+2);415 new_segments[3*counter+0]=segments[3*i+0]; 416 new_segments[3*counter+1]=segments[3*i+1]; 417 new_segments[3*counter+2]=segments[3*i+2]; 466 418 new_segmentmarkers[counter]=segmentmarkerlist[i]; 467 419 counter++; … … 484 436 for (j=0;j<numsegs;j++){ 485 437 if (segmentmarkerlist[j]==(2+i)){ 486 *(riftsegment+3*counter+0)=*(segments+3*j+0);487 *(riftsegment+3*counter+1)=*(segments+3*j+1);488 *(riftsegment+3*counter+2)=*(segments+3*j+2);438 riftsegment[3*counter+0]=segments[3*j+0];_assert_(riftsegment[3*counter+0]<nods+1); 439 riftsegment[3*counter+1]=segments[3*j+1];_assert_(riftsegment[3*counter+1]<nods+1); 440 riftsegment[3*counter+2]=segments[3*j+2];_assert_(riftsegment[3*counter+2]<nel+1); 489 441 counter++; 490 442 } … … 504 456 *priftsnumsegs=riftsnumsegs; 505 457 return noerr; 506 } 507 508 /****************************************************************************************************************************** 509 PairRiftElements 510 ******************************************************************************************************************************/ 511 458 }/*}}}*/ 459 /*FUNCTION PairRiftElements{{{*/ 512 460 int PairRiftElements(int** priftsnumpairs, double*** priftspairs,int numrifts,int* riftsnumsegments, double** riftssegments,double* x,double* y){ 513 461 … … 558 506 559 507 return noerr; 560 } 561 562 563 /****************************************************************************************************************************** 564 RemoveRifts 565 ******************************************************************************************************************************/ 566 567 double dabs(double x){ 568 if (x<0)x=-x; 569 return x; 570 } 508 }/*}}}*/ 509 /*FUNCTION RemoveRifts{{{*/ 571 510 int RemoveRifts(double** pindex,double** px,double** py,int* pnods,double** psegments,int* pnumsegs,int numrifts1,int* rifts1numsegs,double** rifts1segments,double** rifts1pairs,int nel){ 572 511 … … 615 554 if (y[i]<ymin)ymin=y[i]; 616 555 } 617 xmin=xmin- dabs(xmin);618 ymin=ymin- dabs(ymin);556 xmin=xmin-fabs(xmin); 557 ymin=ymin-fabs(ymin); 619 558 620 559 /*Initialize two arrays, one for nodes that are going to be merged, the other with corresponding nodes being merge into: */ … … 751 690 752 691 return noerr; 753 } 754 755 /****************************************************************************************************************************** 756 IsRiftPresent 757 ******************************************************************************************************************************/ 758 692 }/*}}}*/ 693 /*FUNCTION IsRiftPresent{{{*/ 759 694 int IsRiftPresent(int* priftflag,int* pnumrifts, double* segmentmarkerlist,int nsegs){ 760 695 … … 783 718 784 719 return noerr; 785 } 786 787 /****************************************************************************************************************************** 788 OrderRifts 789 ******************************************************************************************************************************/ 790 791 int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y){ 720 }/*}}}*/ 721 /*FUNCTION OrderRifts{{{*/ 722 int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y,int nods,int nels){ 792 723 793 724 int noerr=1; … … 811 742 /*output: */ 812 743 double* riftstips=NULL; 813 814 744 815 745 /*Allocate byproduct of this routine, riftstips: */ … … 822 752 numsegs=riftsnumsegments[i]; 823 753 824 825 754 /*Allocate copy of riftsegments and riftpairs, 826 755 *as well as ordering vector: */ … … 847 776 } 848 777 /* Make sure node3 faces node1 and node4 faces node2: */ 849 if ((x[node1]==x[node4]) && (y[node1]==y[node4])){ 778 _assert_(node1<nods+1 && node4<nods+1); 779 _assert_(node1>0 && node4>0); 780 if ((x[node1-1]==x[node4-1]) && (y[node1-1]==y[node4-1])){ 850 781 /*Swap node3 and node4:*/ 851 782 temp_node=node3; … … 943 874 *priftstips=riftstips; 944 875 return noerr; 945 } 946 947 /****************************************************************************************************************************** 948 PenaltyPairs 949 ******************************************************************************************************************************/ 950 876 }/*}}}*/ 877 /*FUNCTION PenaltyPairs{{{*/ 951 878 int PenaltyPairs(double*** priftspenaltypairs,int** priftsnumpenaltypairs,int numrifts,double** riftssegments, 952 879 int* riftsnumsegs,double** riftspairs,double* riftstips,double* x,double* y){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/TriMesh/trimesh.h ¶
r11401 r12168 6 6 #define _SHARED_TRIMESH_H 7 7 8 9 8 #include <stdio.h> 10 9 #include <math.h> 11 10 12 13 14 11 //#define REAL double //took it out because it may conflict with stdlib.h defines. put back if necessary 15 16 12 int AssociateSegmentToElement(double** psegments,int nseg, double* index,int nel); 17 13 int OrderSegments(double** psegments,int nseg, double* index,int nel); 18 19 14 int GridInsideHole(double* px0,double* py0,int n,double* x,double* y); 20 15 int FindElement(double A,double B,double* index,int nel); 21 22 16 int SplitMeshForRifts(int* pnel,double** pindex,int* pnods,double** px,double** py,int* pnsegs,double** psegments,double** psegmentmarkerlist); 23 24 17 int IsGridOnRift(int* riftsegments, int nriftsegs, int node); 25 18 int GridElementsList(int** pGridElements, int* pNumGridElements,int node,double * index,int nel); … … 28 21 void RiftSegmentsFromSegments(int* pnriftsegs, int** priftsegments, int nel, double* index, int nsegs,double* segments); 29 22 int DetermineGridElementListOnOneSideOfRift(int* pNumGridElementListOnOneSideOfRift, int** pGridElementListOnOneSideOfRift, int segmentnumber, int nriftsegs, int* riftsegments, int node,double* index,int nel); 30 int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs );23 int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs,int nods,int nel); 31 24 int pnpoly(int npol, double *xp, double *yp, double x, double y); 32 25 int FindElement(double A,double B,double* index,int nel); 33 26 int RemoveRifts(double** pindex,double** px,double** py,int* pnods,double** psegments,int* pnumsegs,int numrifts1,int* rifts1numsegs,double** rifts1segments,double** rifts1pairs,int nel); 34 27 int IsRiftPresent(int* priftflag,int* pnumrifts, double* segmentmarkerlist,int nsegs); 35 int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts );36 int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y );28 int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts,int nods,int nels); 29 int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y,int nods,int nels); 37 30 int PenaltyPairs(double*** priftspenaltypairs,int** priftsnumpenaltypairs,int numrifts,double** riftssegments, 38 31 int* riftsnumsegments,double** riftspairs,double* riftstips,double* x,double* y); 39 40 32 int RemoveCornersFromRifts(double** pindex,int* pnel,double** px,double** py,int* pnods, double* segments,double* segmentmarkers,int num_seg); 41 33 int PairRiftElements(int** priftsnumpairs, double*** priftspairs,int numrifts,int* riftsnumsegments, double** riftssegments,double* x,double* y); 42 34 43 44 35 #endif /* _SHARED_TRIMESH_H */ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/Wrapper/wrappershared.h ¶
r11935 r12168 8 8 #include "../../objects/objects.h" 9 9 10 #ifdef _SERIAL_11 10 int ModuleBoot(void); 12 11 int ModuleEnd(void); 13 #endif14 12 15 13 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/c/shared/shared.h ¶
r12004 r12168 8 8 9 9 #include "Alloc/alloc.h" 10 #include "Alloc/alloc_module.h" 10 11 #include "Exceptions/exceptions.h" 11 12 #include "Exp/exp.h" -
TabularUnified issm/branches/trunk-jpl-damage/src/c/solutions/issm.cpp ¶
r12004 r12168 35 35 int ierr; 36 36 37 MODULEBOOT(); 38 39 #ifndef _PARALLEL_ 40 _error_(" parallel executable was compiled without support of parallel libraries!"); 41 #endif 37 ISSMBOOT(); 42 38 43 39 /*Initialize environments: Petsc, MPI, etc...: */ … … 46 42 if(ierr) _error_("Could not initialize Petsc"); 47 43 #else 44 #ifdef _HAVE_MPI_ 48 45 MPI_Init(&argc,&argv); 49 46 #endif 47 #endif 50 48 49 #ifdef _HAVE_MPI_ 51 50 MPI_Barrier(MPI_COMM_WORLD); start=MPI_Wtime(); 51 #else 52 start=(double)clock(); 53 #endif 52 54 53 55 /*Size and rank: */ 56 #ifdef _HAVE_MPI_ 54 57 MPI_Comm_rank(MPI_COMM_WORLD,&my_rank); 55 58 MPI_Comm_size(MPI_COMM_WORLD,&num_procs); 59 #endif 56 60 57 61 /*First process inputs*/ … … 66 70 67 71 /*Create femmodel, using input file: */ 72 #ifdef _HAVE_MPI_ 68 73 MPI_Barrier(MPI_COMM_WORLD); start_init=MPI_Wtime(); 74 #else 75 start_init=(double)clock(); 76 #endif 69 77 femmodel=new FemModel(binfilename,outbinfilename,solution_type,analyses,numanalyses); 70 78 … … 86 94 femmodel->parameters->FindParam(&control_analysis,InversionIscontrolEnum); 87 95 femmodel->parameters->FindParam(&tao_analysis,InversionTaoEnum); 96 #ifdef _HAVE_MPI_ 88 97 MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime(); 98 #else 99 finish_init=(double)clock(); 100 #endif 89 101 90 102 _printf_(true,"call computational core:\n"); 103 #ifdef _HAVE_MPI_ 91 104 MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( ); 105 #else 106 start_core=(double)clock(); 107 #endif 108 92 109 if(dakota_analysis){ 93 110 #ifdef _HAVE_DAKOTA_ … … 110 127 solutioncore(femmodel); 111 128 } 129 #ifdef _HAVE_MPI_ 112 130 MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( ); 113 131 #else 132 finish_core=(double)clock(); 133 #endif 134 114 135 _printf_(true,"write results to disk:\n"); 115 136 OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results); … … 131 152 132 153 /*Get finish time and close*/ 154 #ifdef _HAVE_MPI_ 133 155 MPI_Barrier(MPI_COMM_WORLD); finish = MPI_Wtime( ); 134 156 _printf_(true,"\n %-34s %f seconds \n","FemModel initialization elapsed time:",finish_init-start_init); 135 157 _printf_(true," %-34s %f seconds \n","Core solution elapsed time:",finish_core-start_core); 136 158 _printf_(true,"\n %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600),int(int(finish-start)%3600/60),int(finish-start)%60); 159 #else 160 finish=(double)clock(); 161 _printf_(true,"\n %-34s %f seconds \n","FemModel initialization elapsed time:",(finish_init-start_init)/CLOCKS_PER_SEC); 162 _printf_(true," %-34s %f seconds \n","Core solution elapsed time:",(finish_core-start_core)/CLOCKS_PER_SEC); 163 _printf_(true,"\n %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600/CLOCKS_PER_SEC),int(int((finish-start)/CLOCKS_PER_SEC)%3600/60),(int(finish-start)/CLOCKS_PER_SEC)%60); 164 #endif 137 165 166 138 167 168 #ifdef _HAVE_PETSC_ 139 169 _printf_(true,"closing MPI and Petsc\n"); 140 #ifdef _HAVE_PETSC_141 170 PetscFinalize(); 142 171 #else 172 #ifdef _HAVE_MPI_ 173 _printf_(true,"closing MPI and Petsc\n"); 143 174 MPI_Finalize(); 175 #endif 144 176 #endif 145 177 146 178 /*end module: */ 147 MODULEEND();179 ISSMEND(); 148 180 149 181 return 0; //unix success return; 150 182 } 151 -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/issm/SeqMat.cpp ¶
r11941 r12168 92 92 } 93 93 /*}}}*/ 94 95 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)96 /*FUNCTION SeqMat::ToMatlabMatrix{{{1*/97 mxArray* SeqMat::ToMatlabMatrix(void){98 99 /*Intermediary: */100 double* buffer=NULL;101 mxArray* pfield=NULL;102 103 /*output: */104 mxArray* dataref=NULL;105 106 /*copy vector into a new buffer: */107 if(this->M*this->N){108 buffer=(double*)xmalloc(this->M*this->N*sizeof(double));109 memcpy(buffer,this->matrix,M*N*sizeof(double));110 111 pfield=mxCreateDoubleMatrix(0,0,mxREAL);112 mxSetM(pfield,this->N);113 mxSetN(pfield,this->M);114 mxSetPr(pfield,buffer);115 116 //transpose the matrix, written directly to matlab! from C to matlab.117 mexCallMATLAB(1,&dataref, 1, &pfield, "transpose");118 }119 else dataref=mxCreateDoubleMatrix(0,0,mxREAL);120 121 /*do not erase buffer!: */122 return dataref;123 124 }125 126 127 128 129 /*}}}*/130 /*FUNCTION MatlabMatrixToSeqMat{{{1*/131 SeqMat* MatlabMatrixToSeqMat(const mxArray* dataref){132 133 SeqMat* output=NULL;134 135 output=new SeqMat();136 MatlabMatrixToDoubleMatrix(&output->matrix,&output->M,&output->N,dataref);137 return output;138 139 }140 /*}}}*/141 #endif142 94 /*FUNCTION SeqMat::Assemble{{{1*/ 143 95 void SeqMat::Assemble(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/issm/SeqMat.h ¶
r11941 r12168 15 15 16 16 #include "../toolkitsenums.h" 17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include "mex.h"20 #endif21 17 22 18 /*}}}*/ … … 40 36 /*SeqMat specific routines {{{1*/ 41 37 void Echo(void); 42 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)43 mxArray* ToMatlabMatrix(void);44 #endif45 38 void Assemble(void); 46 39 double Norm(NormMode norm_type); … … 56 49 }; 57 50 58 /*API :*/59 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)60 SeqMat* MatlabMatrixToSeqMat(const mxArray* dataref);61 #endif62 63 51 #endif //#ifndef _SEQMAT_H_ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/issm/SeqVec.cpp ¶
r11861 r12168 66 66 /*}}}*/ 67 67 68 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)69 /*FUNCTION SeqVec::ToMatlabVector{{{1*/70 mxArray* SeqVec::ToMatlabVector(void){71 72 double* buffer=NULL;73 74 mxArray* dataref=NULL;75 76 /*copy vector into a new buffer: */77 if(this->M){78 buffer=(double*)xmalloc(this->M*sizeof(double));79 memcpy(buffer,vector,M*sizeof(double));80 81 dataref = mxCreateDoubleMatrix(0,0,mxREAL);82 mxSetM(dataref,this->M);83 mxSetN(dataref,1);84 mxSetPr(dataref,buffer);85 }86 else dataref = mxCreateDoubleMatrix(0,0,mxREAL);87 88 89 /*do not erase buffer!: */90 return dataref;91 92 }93 /*}}}*/94 /*FUNCTION MatlabVectorToSeqVec{{{1*/95 SeqVec* MatlabVectorToSeqVec(const mxArray* dataref){96 97 SeqVec* output=NULL;98 99 output=new SeqVec();100 MatlabVectorToDoubleVector(&output->vector,&output->M,dataref);101 return output;102 103 }104 /*}}}*/105 #endif106 68 /*FUNCTION SeqVec::Assemble{{{1*/ 107 69 void SeqVec::Assemble(void){ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/issm/SeqVec.h ¶
r11861 r12168 15 15 16 16 #include "../toolkitsenums.h" 17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include "mex.h"20 #endif21 17 22 18 /*}}}*/ … … 37 33 /*SeqVec specific routines {{{1*/ 38 34 void Echo(void); 39 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)40 mxArray* ToMatlabVector(void);41 #endif42 35 void Assemble(void); 43 36 void SetValues(int ssize, int* list, double* values, InsMode mode); … … 59 52 }; 60 53 61 62 /*API :*/63 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)64 SeqVec* MatlabVectorToSeqVec(const mxArray* dataref);65 #endif66 67 54 #endif //#ifndef _SEQVEC_H_ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/MatInvert.cpp ¶
r12004 r12168 55 55 MatAssemblyBegin(inv,MAT_FINAL_ASSEMBLY); 56 56 MatAssemblyEnd(inv,MAT_FINAL_ASSEMBLY); 57 58 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_) 59 MatConvert(inv, MATSEQAIJ,MAT_REUSE_MATRIX,&inv); 60 #else 61 MatConvert(inv, MATMPIAIJ,MAT_REUSE_MATRIX,&inv); 62 #endif 57 58 MatConvert(inv, MATMPIAIJ,MAT_REUSE_MATRIX,&inv); 63 59 64 60 /*Free ressources:*/ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/NewMat.cpp ¶
r12004 r12168 68 68 69 69 #ifdef _HAVE_PETSCDEV_ 70 MatCreateAIJ(MPI_COMM_WORLD,m,n,M,N,d_nz,NULL,o_nz,NULL,&outmatrix); 70 if(sparsity==1){ 71 MatCreateDense(MPI_COMM_WORLD,m,n,M,N,NULL,&outmatrix); 72 } 73 else{ 74 MatCreateAIJ(MPI_COMM_WORLD,m,n,M,N,d_nz,NULL,o_nz,NULL,&outmatrix); 75 } 71 76 #else 72 77 MatCreateMPIAIJ(MPI_COMM_WORLD,m,n,M,N,d_nz,NULL,o_nz,NULL,&outmatrix); -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/petsc/patches/petscpatches.h ¶
r12004 r12168 15 15 16 16 class Parameters; 17 18 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)19 #include "mex.h"20 int MatlabMatrixToPetscMatrix(Mat* matrix,int* prows,int* pcols, const mxArray* mxmatrix);21 int MatlabVectorToPetscVector(Vec* pvector,int* pvector_rows,const mxArray* mxvector);22 int PetscMatrixToMatlabMatrix(mxArray** pdataref,Mat matrix);23 int PetscVectorToMatlabVector(mxArray** pdataref,Vec vector);24 #endif25 17 26 18 Vec NewVec(int size,bool fromlocalsize=false); … … 51 43 MatType ISSMToPetscMatrixType(MatrixType type); 52 44 45 void PetscMatrixToDoubleMatrix(double** pmatrix, int* prows, int* pcols,Mat matrix); 46 void PetscVectorToDoubleVector(double** pvector, int* prows, Vec vector); 47 53 48 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/python/pythonincludes.h ¶
r11974 r12168 7 7 8 8 9 #ifdef HAVE_CONFIG_H 10 #include <config.h> 11 #else 12 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" 13 #endif 14 15 #if _PYTHON_MAJOR_ == 2 16 #undef NPY_NO_DEPRECATED_API 17 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION 18 #else 19 #define NPY_NO_DEPRECATED_API 20 #endif 21 9 22 #include "Python.h" 10 23 #include "arrayobject.h" 11 12 13 24 14 25 #ifdef _HAVE_BOOST_ -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/toolkits.h ¶
r12004 r12168 12 12 #endif 13 13 14 #if defined(_HAVE_PYTHON_) && defined(_SERIAL_)14 #ifdef _HAVE_PYTHON_ 15 15 #include "./python/pythonincludes.h" 16 16 #endif … … 20 20 #endif 21 21 22 #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)23 #include "./m atlab/matlabincludes.h"22 #ifdef _HAVE_MPI_ 23 #include "./mpi/mpiincludes.h" 24 24 #endif 25 25 26 #ifdef _HAVE_METIS_ 27 #include "./metis/metisincludes.h" 28 #endif 26 29 27 #include "./mpi/mpiincludes.h"28 #include "./metis/metisincludes.h"29 30 #include "./triangle/triangleincludes.h" 30 #include "./double/double.h"31 31 #include "./toolkitsenums.h" 32 32 #include "./issm/issmtoolkit.h" -
TabularUnified issm/branches/trunk-jpl-damage/src/c/toolkits/triangle/triangleincludes.h ¶
r2214 r12168 6 6 #define _TRIANGLE_INCLUDES_H_ 7 7 8 #ifdef _SERIAL_9 10 8 #ifdef _C_ //only valid for iso C, not C++ 11 9 /*Triangle includes: */ … … 13 11 #endif //#ifdef _C_ 14 12 15 #endif //ifdef _SERIAL_16 17 13 18 14 #endif -
TabularUnified issm/branches/trunk-jpl-damage/src/dox/issm.dox ¶
r11241 r12168 46 46 </th> 47 47 <tr> 48 <th bgcolor=#FFFFFF style="text-align:left;"> C++ </th><td bgcolor=#FFFFFF style="text-align:right;"> 533</td><td bgcolor=#FFFFFF style="text-align:right;">15491</td><td bgcolor=#FFFFFF style="text-align:right;">17275</td><td bgcolor=#FFFFFF style="text-align:right;">58005</td><td bgcolor=#FFFFFF style="text-align:right;">90771</td>48 <th bgcolor=#FFFFFF style="text-align:left;"> C++ </th><td bgcolor=#FFFFFF style="text-align:right;">499</td><td bgcolor=#FFFFFF style="text-align:right;">14338</td><td bgcolor=#FFFFFF style="text-align:right;">16340</td><td bgcolor=#FFFFFF style="text-align:right;">54651</td><td bgcolor=#FFFFFF style="text-align:right;">85329</td> 49 49 </tr> 50 50 <tr> 51 <th bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td bgcolor=#C6E2FF style="text-align:right;">9 77</td><td bgcolor=#C6E2FF style="text-align:right;">7199</td><td bgcolor=#C6E2FF style="text-align:right;">13702</td><td bgcolor=#C6E2FF style="text-align:right;">31690</td><td bgcolor=#C6E2FF style="text-align:right;">52591</td>51 <th bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td bgcolor=#C6E2FF style="text-align:right;">919</td><td bgcolor=#C6E2FF style="text-align:right;">6875</td><td bgcolor=#C6E2FF style="text-align:right;">13184</td><td bgcolor=#C6E2FF style="text-align:right;">30350</td><td bgcolor=#C6E2FF style="text-align:right;">50409</td> 52 52 </tr> 53 53 <tr> 54 <th bgcolor=#FFFFFF style="text-align:left;"> C/C++ Header </th><td bgcolor=#FFFFFF style="text-align:right;">3 99</td><td bgcolor=#FFFFFF style="text-align:right;">3069</td><td bgcolor=#FFFFFF style="text-align:right;">2727</td><td bgcolor=#FFFFFF style="text-align:right;">10358</td><td bgcolor=#FFFFFF style="text-align:right;">16154</td>54 <th bgcolor=#FFFFFF style="text-align:left;"> C/C++ Header </th><td bgcolor=#FFFFFF style="text-align:right;">366</td><td bgcolor=#FFFFFF style="text-align:right;">2665</td><td bgcolor=#FFFFFF style="text-align:right;">2529</td><td bgcolor=#FFFFFF style="text-align:right;">9400</td><td bgcolor=#FFFFFF style="text-align:right;">14594</td> 55 55 </tr> 56 56 <tr> 57 <th bgcolor=#C6E2FF style="text-align:left;"> m4 </th><td bgcolor=#C6E2FF style="text-align:right;">7</td><td bgcolor=#C6E2FF style="text-align:right;"> 1061</td><td bgcolor=#C6E2FF style="text-align:right;">242</td><td bgcolor=#C6E2FF style="text-align:right;">8941</td><td bgcolor=#C6E2FF style="text-align:right;">10244</td>57 <th bgcolor=#C6E2FF style="text-align:left;"> m4 </th><td bgcolor=#C6E2FF style="text-align:right;">7</td><td bgcolor=#C6E2FF style="text-align:right;">993</td><td bgcolor=#C6E2FF style="text-align:right;">80</td><td bgcolor=#C6E2FF style="text-align:right;">8237</td><td bgcolor=#C6E2FF style="text-align:right;">9310</td> 58 58 </tr> 59 59 <tr> 60 <th bgcolor=#FFFFFF style="text-align:left;"> Objective C </th><td bgcolor=#FFFFFF style="text-align:right;">9</td><td bgcolor=#FFFFFF style="text-align:right;">98</td><td bgcolor=#FFFFFF style="text-align:right;">0</td><td bgcolor=#FFFFFF style="text-align:right;">370</td><td bgcolor=#FFFFFF style="text-align:right;">468</td>60 <th bgcolor=#FFFFFF style="text-align:left;"> Python </th><td bgcolor=#FFFFFF style="text-align:right;">47</td><td bgcolor=#FFFFFF style="text-align:right;">183</td><td bgcolor=#FFFFFF style="text-align:right;">518</td><td bgcolor=#FFFFFF style="text-align:right;">1099</td><td bgcolor=#FFFFFF style="text-align:right;">1800</td> 61 61 </tr> 62 62 <tr> 63 <th bgcolor=#C6E2FF style="text-align:left;"> Bourne Shell </th><td bgcolor=#C6E2FF style="text-align:right;">8</td><td bgcolor=#C6E2FF style="text-align:right;">61</td><td bgcolor=#C6E2FF style="text-align:right;">98</td><td bgcolor=#C6E2FF style="text-align:right;">271</td><td bgcolor=#C6E2FF style="text-align:right;">430</td>63 <th bgcolor=#C6E2FF style="text-align:left;"> Objective C </th><td bgcolor=#C6E2FF style="text-align:right;">9</td><td bgcolor=#C6E2FF style="text-align:right;">98</td><td bgcolor=#C6E2FF style="text-align:right;">0</td><td bgcolor=#C6E2FF style="text-align:right;">370</td><td bgcolor=#C6E2FF style="text-align:right;">468</td> 64 64 </tr> 65 65 <tr> … … 67 67 </tr> 68 68 <tr> 69 <th bgcolor=#C6E2FF style="text-align:left;"> IDL </th><td bgcolor=#C6E2FF style="text-align:right;">1</td><td bgcolor=#C6E2FF style="text-align:right;">18</td><td bgcolor=#C6E2FF style="text-align:right;">4</td><td bgcolor=#C6E2FF style="text-align:right;">124</td><td bgcolor=#C6E2FF style="text-align:right;">146</td>69 <th bgcolor=#C6E2FF style="text-align:left;"> Bourne Shell </th><td bgcolor=#C6E2FF style="text-align:right;">5</td><td bgcolor=#C6E2FF style="text-align:right;">46</td><td bgcolor=#C6E2FF style="text-align:right;">71</td><td bgcolor=#C6E2FF style="text-align:right;">226</td><td bgcolor=#C6E2FF style="text-align:right;">343</td> 70 70 </tr> 71 71 <tr> 72 <th bgcolor=#FFFFFF style="text-align:left;"> C </th><td bgcolor=#FFFFFF style="text-align:right;">2</td><td bgcolor=#FFFFFF style="text-align:right;">3</td><td bgcolor=#FFFFFF style="text-align:right;">3</td><td bgcolor=#FFFFFF style="text-align:right;">24</td><td bgcolor=#FFFFFF style="text-align:right;">30</td>72 <th bgcolor=#FFFFFF style="text-align:left;"> IDL </th><td bgcolor=#FFFFFF style="text-align:right;">1</td><td bgcolor=#FFFFFF style="text-align:right;">18</td><td bgcolor=#FFFFFF style="text-align:right;">4</td><td bgcolor=#FFFFFF style="text-align:right;">124</td><td bgcolor=#FFFFFF style="text-align:right;">146</td> 73 73 </tr> 74 74 <tr> 75 <th bgcolor=#C6E2FF style="text-align:left;"> Python </th><td bgcolor=#C6E2FF style="text-align:right;">2</td><td bgcolor=#C6E2FF style="text-align:right;">1</td><td bgcolor=#C6E2FF style="text-align:right;">4</td><td bgcolor=#C6E2FF style="text-align:right;">13</td><td bgcolor=#C6E2FF style="text-align:right;">18</td>75 <th bgcolor=#C6E2FF style="text-align:left;"> C </th><td bgcolor=#C6E2FF style="text-align:right;">2</td><td bgcolor=#C6E2FF style="text-align:right;">3</td><td bgcolor=#C6E2FF style="text-align:right;">3</td><td bgcolor=#C6E2FF style="text-align:right;">24</td><td bgcolor=#C6E2FF style="text-align:right;">30</td> 76 76 </tr> 77 77 <tr> 78 <th bgcolor=#FFFFFF style="text-align:left;"> SUM: </th><td bgcolor=#FFFFFF style="text-align:right;">1 941</td><td bgcolor=#FFFFFF style="text-align:right;">27022</td><td bgcolor=#FFFFFF style="text-align:right;">34078</td><td bgcolor=#FFFFFF style="text-align:right;">110036</td><td bgcolor=#FFFFFF style="text-align:right;">171136</td>78 <th bgcolor=#FFFFFF style="text-align:left;"> SUM: </th><td bgcolor=#FFFFFF style="text-align:right;">1858</td><td bgcolor=#FFFFFF style="text-align:right;">25240</td><td bgcolor=#FFFFFF style="text-align:right;">32752</td><td bgcolor=#FFFFFF style="text-align:right;">104721</td><td bgcolor=#FFFFFF style="text-align:right;">162713</td> 79 79 </tr> 80 80 </table> -
TabularUnified issm/branches/trunk-jpl-damage/src/m/Makefile.am ¶
r12004 r12168 13 13 ./planet/*.m \ 14 14 ./qmu/*.m \ 15 ./shared/*.m \16 ./solutions/*.m \17 ./solvers/*.m \18 15 ./utils/*.m \ 19 ./utils/Analysis/*.m \20 16 ./utils/Array/*.m \ 21 17 ./utils/BC/*.m \ -
issm/branches/trunk-jpl-damage/src/m/classes ¶
- Property svn:ignore
-
TabularUnified
old new 1 __pycache__ 1 2 Makefile.in 2 3 Makefile
-
- Property svn:ignore
-
issm/branches/trunk-jpl-damage/src/m/classes/clusters ¶
- Property svn:ignore
-
TabularUnified
old new 1 __pycache__ 1 2 Makefile.in 2 3 Makefile
-
- Property svn:ignore
-
TabularUnified issm/branches/trunk-jpl-damage/src/m/classes/clusters/generic.m ¶
r12004 r12168 2 2 % 3 3 % Usage: 4 % cluster=generic('name','astrid',);5 4 % cluster=generic('name','astrid','np',3); 6 5 % cluster=generic('name',oshostname(),'np',3,'login','username'); … … 14 13 port=0; 15 14 interactive=1; 16 codepath=[issm tier() '/bin'];17 executionpath=[issm tier() '/execution'];18 valgrind=[issm tier() '/externalpackages/valgrind/install/bin/valgrind'];19 valgrindlib=[issm tier() '/externalpackages/valgrind/install/lib/libmpidebug.so'];20 valgrindsup=[issm tier() '/externalpackages/valgrind/issm.supp'];15 codepath=[issmdir() '/bin']; 16 executionpath=[issmdir() '/execution']; 17 valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind']; 18 valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so']; 19 valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp']; 21 20 %}}} 22 21 end … … 28 27 29 28 %get name 30 if ~exist(options,'name'), error('option ''name'' has not been provided'); end 31 cluster.name=getfieldvalue(options,'name'); 29 cluster.name=getfieldvalue(options,'name',oshostname()); 32 30 33 31 %initialize cluster using user settings if provided -
TabularUnified issm/branches/trunk-jpl-damage/src/m/classes/clusters/none.m ¶
r12004 r12168 12 12 methods 13 13 function cluster=none(varargin) % {{{1 14 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster); 15 end 16 %}}} 17 function disp(cluster) % {{{1 18 % display the object 19 disp(sprintf('cluster class ''%s'' object ''%s'' = ',class(cluster),inputname(1))); 20 disp(sprintf(' name: %s',cluster.name)); 21 end 22 %}}} 23 function checkconsistency(cluster,md,solution,analyses) % {{{1 24 end 25 %}}} 26 function BuildQueueScript(cluster,md) % {{{1 27 error('none.BuildQueueScript error message: serial cluster cannot build queue script'); 14 error('Cannot assign md.cluster to ''none'': ISSM is not available in serial model anymore'); 28 15 end 29 16 %}}} -
TabularUnified issm/branches/trunk-jpl-damage/src/m/classes/diagnostic.m ¶
r12004 r12168 130 130 fielddisplay(obj,'spcvy','y-axis velocity constraint (NaN means no constraint)'); 131 131 fielddisplay(obj,'spcvz','z-axis velocity constraint (NaN means no constraint)'); 132 fielddisplay(obj,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice ');132 fielddisplay(obj,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice)'); 133 133 134 134 disp(sprintf('\n %s','Rift options:')); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/classes/groundingline.m ¶
r12004 r12168 37 37 end 38 38 pos=find(md.mask.vertexongroundedice); 39 if any( md.geometry.bed(pos)-md.geometry.bathymetry(pos)),39 if any(abs(md.geometry.bed(pos)-md.geometry.bathymetry(pos))>10^-10), 40 40 checkmessage(['bathymetry not equal to bed on grounded ice !']); 41 41 end -
TabularUnified issm/branches/trunk-jpl-damage/src/m/classes/model/model.m ¶
r12004 r12168 382 382 md.solver = addoptions(md.solver,DiagnosticVertAnalysisEnum,iluasmoptions); 383 383 end 384 md.cluster = none();384 md.cluster = generic(); 385 385 md.balancethickness = balancethickness(); 386 386 md.diagnostic = diagnostic(); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/classes/modellist.m ¶
r12004 r12168 7 7 properties (SetAccess=public) 8 8 models = cell(0,1); 9 cluster = none();9 cluster = generic(); 10 10 end 11 11 methods -
TabularUnified issm/branches/trunk-jpl-damage/src/m/classes/solver.m ¶
r12004 r12168 18 18 end 19 19 end % }}} 20 function obj = addoptions(obj,analysis,solveroptions) % {{{1 20 function obj = addoptions(obj,analysis,varargin) % {{{1 21 % Usage example: 22 % md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum,stokesoptions()); 23 % md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum); 21 24 22 25 %Convert analysis from enum to string … … 29 32 30 33 %Add solver options to analysis 31 obj.(analysis) = solveroptions;34 if nargin==3, obj.(analysis) = varargin{1}; end 32 35 end 33 36 %}}} -
TabularUnified issm/branches/trunk-jpl-damage/src/m/kml/README.txt ¶
r8298 r12168 61 61 There are some other utilities that are used in the construction of topological tables for the kml writing. 62 62 63 nodeconnectivity.m - create a node connectivity table (nnodes x mxepg+1)63 kmlnodeconnectivity.m - create a node connectivity table (nnodes x mxepg+1) 64 64 edgeadjacency.m - create an edge adjacency array (elems x edges) 65 65 edgeperimeter.m - create an edge perimeter (edgeper x 2) and element perimeter (edgeper x 1) list -
TabularUnified issm/branches/trunk-jpl-damage/src/m/kml/kml_part_edges.m ¶
r9733 r12168 150 150 elemp=md.mesh.elements(irow,:); 151 151 epartp=epart(irow,:); 152 nodeconp= nodeconnectivity(elemp,md.mesh.numberofvertices);152 nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices); 153 153 [edgeadjp]=edgeadjacency(elemp,nodeconp); 154 154 [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/kml/kml_partitions.m ¶
r9733 r12168 151 151 elemp=md.mesh.elements(irow,:); 152 152 epartp=epart(irow,:); 153 nodeconp= nodeconnectivity(elemp,md.mesh.numberofvertices);153 nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices); 154 154 [edgeadjp]=edgeadjacency(elemp,nodeconp); 155 155 [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/kml/kml_unsh_edges.m ¶
r9733 r12168 74 74 if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ... 75 75 md.qmu.numberofpartitions 76 [edgeadj]=edgeadjacency(md.mesh.elements,md. nodeconnectivity);76 [edgeadj]=edgeadjacency(md.mesh.elements,md.kmlnodeconnectivity); 77 77 [icol,irow]=find(edgeadj'==0); 78 78 edgeuns=zeros(length(irow),2); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/collapse.m ¶
r12004 r12168 30 30 if ~isnan(md.inversion.vel_obs), md.inversion.vel_obs=project2d(md,md.inversion.vel_obs,md.mesh.numberoflayers); end; 31 31 if ~isnan(md.inversion.cost_functions_coefficients), md.inversion.cost_functions_coefficients=project2d(md,md.inversion.cost_functions_coefficients,md.mesh.numberoflayers); end; 32 if ~isnan(md.inversion.min_parameters), md.inversion.min_parameters=project2d(md,md.inversion.min_parameters,md.mesh.numberoflayers); end;33 if ~isnan(md.inversion.max_parameters), md.inversion.max_parameters=project2d(md,md.inversion.max_parameters,md.mesh.numberoflayers); end;32 if numel(md.inversion.min_parameters)>1, md.inversion.min_parameters=project2d(md,md.inversion.min_parameters,md.mesh.numberoflayers); end; 33 if numel(md.inversion.max_parameters)>1, md.inversion.max_parameters=project2d(md,md.inversion.max_parameters,md.mesh.numberoflayers); end; 34 34 if ~isnan(md.surfaceforcings.mass_balance), 35 35 md.surfaceforcings.mass_balance=project2d(md,md.surfaceforcings.mass_balance,md.mesh.numberoflayers); … … 102 102 103 103 %lat long 104 md.mesh.lat=project2d(md,md.mesh.lat,1); 105 md.mesh.long=project2d(md,md.mesh.long,1); 104 if numel(md.mesh.lat)>1, md.mesh.lat=project2d(md,md.mesh.lat,1); end 105 if numel(md.mesh.long)>1, md.mesh.long=project2d(md,md.mesh.long,1); end 106 106 107 107 %Initialize with the 2d mesh -
issm/branches/trunk-jpl-damage/src/m/model/mesh ¶
- Property svn:ignore
-
TabularUnified
old new 1 __pycache__ 1 2 Makefile.in 2 3 Makefile
-
- Property svn:ignore
-
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/mesh/triangle.m ¶
r12004 r12168 38 38 39 39 %Mesh using TriMesh 40 if strcmp(riftname,''), 41 [md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,area,true); 42 else 43 [elements,x,y,segments,segmentmarkers]=TriMeshRifts(domainname,riftname,area,'yes'); 40 [elements,x,y,segments,segmentmarkers]=TriMesh(domainname,riftname,area); 44 41 45 %check that all the created nodes belong to at least one element 46 orphan=find(~ismember([1:length(x)],sort(unique(elements(:))))); 47 for i=1:length(orphan), 48 %get rid of the orphan node i 49 %update x and y 50 x=[x(1:orphan(i)-(i-1)-1); x(orphan(i)-(i-1)+1:end)]; 51 y=[y(1:orphan(i)-(i-1)-1); y(orphan(i)-(i-1)+1:end)]; 52 %update elements 53 pos=find(elements>orphan(i)-(i-1)); 54 elements(pos)=elements(pos)-1; 55 %update segments 56 pos1=find(segments(:,1)>orphan(i)-(i-1)); 57 pos2=find(segments(:,2)>orphan(i)-(i-1)); 58 segments(pos1,1)=segments(pos1,1)-1; 59 segments(pos2,2)=segments(pos2,2)-1; 60 end 42 %check that all the created nodes belong to at least one element 43 orphan=find(~ismember([1:length(x)],sort(unique(elements(:))))); 44 for i=1:length(orphan), 45 disp('WARNING: removing orphans'); 46 %get rid of the orphan node i 47 %update x and y 48 x=[x(1:orphan(i)-(i-1)-1); x(orphan(i)-(i-1)+1:end)]; 49 y=[y(1:orphan(i)-(i-1)-1); y(orphan(i)-(i-1)+1:end)]; 50 %update elements 51 pos=find(elements>orphan(i)-(i-1)); 52 elements(pos)=elements(pos)-1; 53 %update segments 54 pos1=find(segments(:,1)>orphan(i)-(i-1)); 55 pos2=find(segments(:,2)>orphan(i)-(i-1)); 56 segments(pos1,1)=segments(pos1,1)-1; 57 segments(pos2,2)=segments(pos2,2)-1; 58 end 61 59 62 %plug into md 63 md.mesh.x=x; 64 md.mesh.y=y; 65 md.mesh.elements=elements; 66 md.mesh.segments=segments; 67 md.mesh.segmentmarkers=segmentmarkers; 68 end 60 %plug into md 61 md.mesh.x=x; 62 md.mesh.y=y; 63 md.mesh.elements=elements; 64 md.mesh.segments=segments; 65 md.mesh.segmentmarkers=segmentmarkers; 69 66 70 67 %Fill in rest of fields: -
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/modis.m ¶
r9620 r12168 14 14 15 15 %Get path to gdal binaries 16 path_gdal=[issm tier() '/externalpackages/gdal/install/bin/'];16 path_gdal=[issmdir() '/externalpackages/gdal/install/bin/']; 17 17 18 18 %Was gdal compiled? 19 19 if ~exist([path_gdal 'gdal_translate']), 20 error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issm tier() '/externalpackages/gdal to use this routine.']);20 error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issmdir() '/externalpackages/gdal to use this routine.']); 21 21 end 22 22 -
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/petscversion.m ¶
r12004 r12168 8 8 PETSC_VERSION=3; 9 9 10 configfile=[issm tier() '/config.h'];10 configfile=[issmdir() '/config.h']; 11 11 if ~exist(configfile,'file'), 12 12 error(['File ' configfile ' not found. ISSM has not been configured yet!']); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/plot/applyoptions.m ¶
r11683 r12168 229 229 warning on MATLAB:log:logOfZero; 230 230 set(c,'YTickLabel',labels); 231 end 232 if exist(options,'cbYLim'); 233 set(c,'YLim',getfieldvalue(options,'cbYLim')); 231 234 end 232 235 if exist(options,'colorbartitle'), -
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/plot/northarrow.m ¶
r9288 r12168 72 72 73 73 %Text North 74 xN=max([A(1) D(1) E(1) F(1) G(1)])+ratio/3* lengtharrow;74 xN=max([A(1) D(1) E(1) F(1) G(1)])+ratio/3*abs(lengtharrow); 75 75 yN=mean([A(2) F(2) H(2)]); 76 76 text(xN,yN,'North','FontSize',fontsize,'FontWeight','b'); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/plot/plot_gridded.m ¶
r11009 r12168 40 40 data_max=max(data_grid(:)); 41 41 end 42 options=changefieldvalue(options,'cbYLim',[data_min data_max]); 42 43 if whitepos==1, 43 44 white =data_max + (data_max-data_min)/55; -
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/plot/plot_overlay.m ¶
r12004 r12168 96 96 %h_data(find(data_grid>data_mean))=1; 97 97 h_data=1*ones(size(data_grid)); 98 h_data(find(data_grid >data_mean))=0.7;98 h_data(find(data_grid<data_mean))=0.7; 99 99 %saturation (S) 100 100 s_data=max(min(abs(data_grid-data_mean)/(data_max-data_mean) ,1),0); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/model/plot/plot_section.m ¶
r12004 r12168 36 36 37 37 %read contours: 38 profiles=expread(getfieldvalue(options,'sectionvalue') ,1);38 profiles=expread(getfieldvalue(options,'sectionvalue')); 39 39 numprofiles=length(profiles); 40 40 -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/DataProcessing/TracksToMatrix.m ¶
r8298 r12168 26 26 27 27 %Add path to dace 28 addpath([issm tier() '/externalpackages/dace/install'])28 addpath([issmdir() '/externalpackages/dace/install']) 29 29 30 30 %First create the x_m and y_m fot the matrix … … 82 82 83 83 %remove DACE path 84 rmpath([issm tier() '/externalpackages/dace/install']);84 rmpath([issmdir() '/externalpackages/dace/install']); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/Exp/expdisp.m ¶
r2721 r12168 41 41 end 42 42 43 domain=expread(domainoutline ,1);43 domain=expread(domainoutline); 44 44 45 45 figure(figurenumber),hold on -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/Exp/exptool.m ¶
r10138 r12168 71 71 else 72 72 %read file 73 B=expread(filename ,1);73 B=expread(filename); 74 74 %go through all profiles of B 75 75 for i=1:size(B,2) -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/Miscellaneous/issmdoc.m ¶
r11577 r12168 2 2 3 3 %First get ISSM tier: 4 ISSM_ TIER=issmtier;4 ISSM_DIR=issmdir; 5 5 6 6 disp(sprintf('\n%s',' A comprehensive documentation is available on http://issm.jpl.nasa.gov')); 7 7 disp(sprintf('\n%s',' Example: how to create a square ice shelf')); 8 disp(sprintf('%s',' go to ',ISSM_ TIER,'/examples/SquareIceshelf'));8 disp(sprintf('%s',' go to ',ISSM_DIR,'/examples/SquareIceshelf')); 9 9 disp(sprintf('%s',' md=model; %creates a new empty model structure')); 10 10 disp(sprintf('%s',' md=triangle(md,''DomainOutline.exp'',50000); %creates a mesh of the domain outline with a resolution of 50000m')); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/OS/ispetsc.m ¶
r12004 r12168 6 6 7 7 8 configfile=[issm tier() '/bin/config.h']; %should find it in the install target8 configfile=[issmdir() '/bin/config.h']; %should find it in the install target 9 9 if ~exist(configfile,'file'), 10 10 error(['File ' configfile ' not found. ISSM has not been configured yet!']); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/OS/issmscpin.m ¶
r11577 r12168 32 32 %use the putty project pscp.exe: it should be in the path. 33 33 34 %get ISSM_ TIER variable35 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');34 %get ISSM_DIR variable 35 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 36 36 if status, 37 error('scpin error message: could not find ISSM_ TIER_WIN envirnoment variable');37 error('scpin error message: could not find ISSM_DIR_WIN envirnoment variable'); 38 38 end 39 ISSM_ TIER=ISSM_TIER(2:end-2);39 ISSM_DIR=ISSM_DIR(2:end-2); 40 40 41 41 username=input('Username: (quoted string) '); … … 43 43 44 44 for i=1:numel(packages), 45 [status,result]=system([ISSM_ TIER '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' host ':' path '/' packages{i} ' ./']);45 [status,result]=system([ISSM_DIR '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' host ':' path '/' packages{i} ' ./']); 46 46 if status, 47 47 error('scpin error message: could not call putty pscp'); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/OS/issmscpout.m ¶
r9369 r12168 23 23 %use the putty project pscp.exe: it should be in the path. 24 24 25 %get ISSM_ TIER variable26 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');25 %get ISSM_DIR variable 26 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 27 27 if status, 28 error('scpout error message: could not find ISSM_ TIER_WIN envirnoment variable');28 error('scpout error message: could not find ISSM_DIR_WIN envirnoment variable'); 29 29 end 30 ISSM_ TIER=ISSM_TIER(2:end-2);30 ISSM_DIR=ISSM_DIR(2:end-2); 31 31 32 32 username=input('Username: (quoted string) '); … … 34 34 35 35 for i=1:numel(packages), 36 [status,result]=system([ISSM_ TIER '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' packages{i} ' ' host ':' path]);36 [status,result]=system([ISSM_DIR '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' packages{i} ' ' host ':' path]); 37 37 if status, 38 38 error('scpout error message: could not call putty pscp'); -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/OS/issmssh.m ¶
r9369 r12168 15 15 %use the putty project plink.exe: it should be in the path. 16 16 17 %get ISSM_ TIER variable18 [status,ISSM_ TIER]=system('echo [%ISSM_TIER_WIN%]');17 %get ISSM_DIR variable 18 [status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]'); 19 19 if status, 20 error('issmssh error message: could not find ISSM_ TIER_WIN envirnoment variable');20 error('issmssh error message: could not find ISSM_DIR_WIN envirnoment variable'); 21 21 end 22 ISSM_ TIER=ISSM_TIER(2:end-2);22 ISSM_DIR=ISSM_DIR(2:end-2); 23 23 24 24 username=input('Username: (quoted string) '); 25 25 key=input('Key: (quoted string) '); 26 26 27 system([ISSM_ TIER '/externalpackages/ssh/plink.exe -ssh -l "' username '" -pw "' key '" ' host ' "' command '"']);27 system([ISSM_DIR '/externalpackages/ssh/plink.exe -ssh -l "' username '" -pw "' key '" ' host ' "' command '"']); 28 28 29 29 else -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/Shell/flaimdir.m ¶
r11180 r12168 5 5 % FLAIM_DIR=flaimdir() 6 6 7 FLAIM_DIR=[issm tier '/externalpackages/flaim/install'];7 FLAIM_DIR=[issmdir '/externalpackages/flaim/install']; -
TabularUnified issm/branches/trunk-jpl-damage/src/m/utils/Shell/issmdir.m ¶
r11577 r12168 1 1 function ISSM_DIR=issmdir() 2 %ISSMDIR - Get ISSM_DIR environment variable contents.2 %ISSMDIR - Get ISSM_DIR environment variable 3 3 % 4 4 % Usage: … … 9 9 else 10 10 ISSM_DIR =getenv('ISSM_DIR_WIN'); 11 if strcmpi(ISSM_DIR(end),'/') | strcmpi(ISSM_DIR(end),'\'), 12 ISSM_DIR = ISSM_DIR(1:end-1); %shave off the last '/' 13 end 11 14 end 12 15 -
issm/branches/trunk-jpl-damage/src/py ¶
-
Property svn:ignore
set to
Makefile
-
Property svn:ignore
set to
-
issm/branches/trunk-jpl-damage/src/py/model ¶
- Property svn:ignore
-
TabularUnified
old new 1 Makefile 1 2 __pycache__
-
- Property svn:ignore
-
TabularUnified issm/branches/trunk-jpl-damage/startup.m ¶
r12004 r12168 11 11 lastwarn(''); 12 12 13 %Recover ISSM_ TIER , or if on a Windows machine, ISSM_TIER_WIN13 %Recover ISSM_DIR , or if on a Windows machine, ISSM_DIR_WIN 14 14 if ~ispc, 15 ISSM_ TIER=getenv('ISSM_TIER');15 ISSM_DIR=getenv('ISSM_DIR'); 16 16 else 17 ISSM_ TIER=getenv('ISSM_TIER_WIN');18 %ISSM_ TIER='';17 ISSM_DIR=getenv('ISSM_DIR_WIN'); 18 %ISSM_DIR=''; 19 19 end 20 if (isempty(ISSM_ TIER)),21 error('''ISSM_ TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!');20 if (isempty(ISSM_DIR)), 21 error('''ISSM_DIR'' environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!'); 22 22 end 23 23 24 24 %Now add all issm code paths necessary to run issm smoothly. 25 25 %We capture the error output, so that we can warn the user to update 26 %the variable ISSM_ TIER in this file, in case it is not correctly setup.26 %the variable ISSM_DIR in this file, in case it is not correctly setup. 27 27 28 28 %ISSM path 29 addpath([ISSM_ TIER '/src/m/utils/']); %loads recursivepath30 addpath([ISSM_ TIER '/bin']);31 addpath(recursivepath([ISSM_ TIER '/src/m']));32 addpath(recursivepath([ISSM_ TIER '/externalpackages/scotch']));33 addpath(recursivepath([ISSM_ TIER '/externalpackages/canos']));34 addpath(recursivepath([ISSM_ TIER '/externalpackages/kml']));35 addpath(recursivepath([ISSM_ TIER '/externalpackages/export_fig']));36 addpath(recursivepath([ISSM_ TIER '/externalpackages/googleearthtoolbox']));37 addpath(recursivepath([ISSM_ TIER '/externalpackages/cm_and_cb_utilities']));29 addpath([ISSM_DIR '/src/m/utils/']); %loads recursivepath 30 addpath([ISSM_DIR '/bin']); 31 addpath(recursivepath([ISSM_DIR '/src/m'])); 32 addpath(recursivepath([ISSM_DIR '/externalpackages/scotch'])); 33 addpath(recursivepath([ISSM_DIR '/externalpackages/canos'])); 34 addpath(recursivepath([ISSM_DIR '/externalpackages/kml'])); 35 addpath(recursivepath([ISSM_DIR '/externalpackages/export_fig'])); 36 addpath(recursivepath([ISSM_DIR '/externalpackages/googleearthtoolbox'])); 37 addpath(recursivepath([ISSM_DIR '/externalpackages/cm_and_cb_utilities'])); 38 38 39 clear ISSM_ TIER;39 clear ISSM_DIR; 40 40 41 41 %Check on any warning messages that might indicate that the paths were not correct. 42 42 if ~isempty(lastwarn), 43 fprintf('\n Error trying to setup ''ISSM'' code paths. Try and update the ISSM_ TIER variable in your .cshrc or .bashrc!\n');43 fprintf('\n Error trying to setup ''ISSM'' code paths. Try and update the ISSM_DIR variable in your .cshrc or .bashrc!\n'); 44 44 fprintf(' ''ISSM'' will not work at all until this is resolved\n\n'); 45 45 else -
TabularUnified issm/branches/trunk-jpl-damage/startup.py ¶
r12004 r12168 5 5 # before handing over the prompt to the user if the environment variable 6 6 # PYTHONSTARTUP is defined: 7 # export PYTHONSTARTUP=$ISSM_ TIER/startup.py7 # export PYTHONSTARTUP=$ISSM_DIR/startup.py 8 8 # This startup script should be run by users before trying to use ISSM. 9 9 10 10 import os,sys 11 11 12 13 #First check we are running python 3 at least 14 if sys.version_info[0] < 3: 15 print("ISSM can only work in Python 3. Exiting python") 16 sys.exit(1) 17 18 #Recover ISSM_TIER, ISSM_DIR and USERNAME 19 ISSM_TIER=os.getenv('ISSM_TIER') 12 #Recover ISSM_DIR and USERNAME 13 ISSM_DIR=os.getenv('ISSM_DIR') 20 14 USERNAME =os.getenv('USER') 21 if(ISSM_ TIER==None):22 raise NameError('"ISSM_ TIER" environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!')15 if(ISSM_DIR==None): 16 raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!') 23 17 24 18 #Now add all issm code paths necessary to run issm smoothly. 25 19 #We capture the error output, so that we can warn the user to update 26 #the variable ISSM_ TIER in this file, in case it is not correctly setup.20 #the variable ISSM_DIR in this file, in case it is not correctly setup. 27 21 28 22 #ISSM path. Go through src/py and load everything we find that looks like a python file 29 for root,dirs,files in os.walk(ISSM_TIER+ '/src/py'): 23 for root,dirs,files in os.walk(ISSM_DIR+ '/src/py'): 24 for file in files: 25 if file.find(".py") != -1: 26 if file.find(".pyc") == -1: 27 #add to path 28 sys.path.append(root) 29 file=os.path.splitext(file)[0] 30 #__import__(file) 31 32 for root,dirs,files in os.walk(ISSM_DIR+ '/src/m'): 30 33 for file in files: 31 34 if file.find(".py") != -1: … … 36 39 #__import__(file) 37 40 38 sys.path.append(ISSM_ TIER + '/src/mex')41 sys.path.append(ISSM_DIR + '/src/modules/python') 39 42 40 43 #Deal with scipy import: … … 79 82 from miscellaneous import * 80 83 from private import * 81 from TriMesh import * 84 from triangle import * 85 from setmask import * 82 86 83 87 #}}} -
TabularUnified issm/branches/trunk-jpl-damage/test/NightlyRun/runme.m ¶
r11684 r12168 30 30 % md=runme('id',102,'procedure','model'); 31 31 32 %Get ISSM_ TIER variable33 ISSM_ TIER=issmtier();32 %Get ISSM_DIR variable 33 ISSM_DIR=issmdir(); 34 34 35 35 %Check inputs … … 168 168 message=getReport(me2); 169 169 if strcmpi(output,'nightly') 170 fid=fopen([ISSM_ TIER '/nightlylog/matlaberror.log'], 'at');170 fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at'); 171 171 fprintf(fid,'%s',message); 172 172 fprintf(fid,'\n------------------------------------------------------------------\n'); … … 174 174 disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,id_string,fieldname)); 175 175 elseif strcmpi(output,'daily'); 176 fid=fopen([ISSM_ TIER '/dailylog/matlaberror.log'], 'at');176 fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at'); 177 177 fprintf(fid,'%s',message); 178 178 fprintf(fid,'\n------------------------------------------------------------------\n'); … … 193 193 message=getReport(me); 194 194 if strcmpi(output,'nightly') 195 fid=fopen([ISSM_ TIER '/nightlylog/matlaberror.log'], 'at');195 fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at'); 196 196 fprintf(fid,'%s',message); 197 197 fprintf(fid,'\n------------------------------------------------------------------\n'); … … 199 199 disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,id_string,'N/A')); 200 200 elseif strcmpi(output,'daily'); 201 fid=fopen([ISSM_ TIER '/dailylog/matlaberror.log'], 'at');201 fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at'); 202 202 fprintf(fid,'%s',message); 203 203 fprintf(fid,'\n------------------------------------------------------------------\n'); -
TabularUnified issm/branches/trunk-jpl-damage/test/NightlyRun/test448.m ¶
r11014 r12168 3 3 md=parameterize(md,'../Par/SquareSheetShelf.par'); 4 4 md=setflowequation(md,'macayeal','all'); 5 md.cluster=none;6 5 md.initialization.vx(:)=0; 7 6 md.initialization.vy(:)=0; -
TabularUnified issm/branches/trunk-jpl-damage/test/NightlyRun/test450.m ¶
r11014 r12168 3 3 md=parameterize(md,'../Par/SquareSheetShelf.par'); 4 4 md=setflowequation(md,'macayeal','all'); 5 md.cluster=none;6 5 md.initialization.vx(:)=0; 7 6 md.initialization.vy(:)=0; -
TabularUnified issm/branches/trunk-jpl-damage/test/NightlyRun/test452.m ¶
r11096 r12168 2 2 md=setmask(md,'../Exp/SquareShelf.exp',''); 3 3 md=parameterize(md,'../Par/SquareSheetShelf.par'); 4 md.cluster=none;5 4 md.initialization.vx(:)=0; 6 5 md.initialization.vy(:)=0;
Note:
See TracChangeset
for help on using the changeset viewer.