[freefempp] 02/03: Merge branch 'experimental' of ssh://alioth.debian.org/git/debian-science/packages/freefempp into experimental
Dimitrios Eftaxiopoulos
eftaxiop-guest at moszumanska.debian.org
Sun Mar 8 01:19:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
eftaxiop-guest pushed a commit to branch experimental
in repository freefempp.
commit 359f909a8f0cd984d0968c6b382550747ef5ad12
Merge: e5ed43c d7a136b
Author: Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr>
Date: Sun Mar 8 02:51:49 2015 +0200
Merge branch 'experimental' of ssh://alioth.debian.org/git/debian-science/packages/freefempp into experimental
Conflicts:
HISTORY
INNOVATION
Makefile.am
README_MAC
acmacros.m4
acmpi.m4
acoptim.m4
build/download
configure.ac
debian/changelog
debian/patches/configure.patch
debian/patches/examples++-load.patch
debian/patches/examples-bamg.patch
download/Makefile.am
download/getall
download/gmm/cxxflags
download/scotch/Makefile-scotch.inc
examples++-3d/Makefile.am
examples++-load/BinaryIO.cpp
examples++-load/DxWriter.cpp
examples++-load/FreeFemQA.cpp
examples++-load/Makefile.am
examples++-load/MetricKuate.cpp
examples++-load/MetricPk.cpp
examples++-load/NewSolver.cpp
examples++-load/PARDISO.cpp
examples++-load/SuperLu.cpp
examples++-load/VTK_writer.cpp
examples++-load/VTK_writer_3d.cpp
examples++-load/addNewType.cpp
examples++-load/bfstream.cpp
examples++-load/dfft.cpp
examples++-load/ff-Ipopt.cpp
examples++-load/ff-NLopt.cpp
examples++-load/ff-cmaes.cpp
examples++-load/ff-get-dep.in
examples++-load/fflapack.cpp
examples++-load/ffnewuoa.cpp
examples++-load/freeyams.cpp
examples++-load/funcTemplate.cpp
examples++-load/gmsh.cpp
examples++-load/gsl.cpp
examples++-load/ilut.cpp
examples++-load/include.tar.gz
examples++-load/iovtk.cpp
examples++-load/isolineP1.cpp
examples++-load/lapack.cpp
examples++-load/lgbmo.cpp
examples++-load/load.link.in
examples++-load/mat_dervieux.cpp
examples++-load/mat_psi.cpp
examples++-load/medit.cpp
examples++-load/metis.cpp
examples++-load/mmg3d-v4.0.cpp
examples++-load/msh3.cpp
examples++-load/mshmet.cpp
examples++-load/myfunction2.cpp
examples++-load/pcm2rnm.cpp
examples++-load/ppm2rnm.cpp
examples++-load/qf11to25.cpp
examples++-load/scotch.cpp
examples++-load/splitedges.cpp
examples++-load/splitmesh3.cpp
examples++-load/splitmesh6.cpp
examples++-load/symmetrizeCSR.cpp
examples++-load/tetgen.cpp
examples++-load/thresholdings.cpp
examples++-mpi/DDM-Schwarz-macro.idp
examples++-mpi/MPICG.cpp
examples++-mpi/MPIplot.idp
examples++-mpi/MUMPS.cpp
examples++-mpi/MUMPS_FreeFem.cpp
examples++-mpi/Makefile.am
examples++-mpi/Stokes-v1-matrix-mumps.edp
examples++-mpi/complex_SuperLU_DIST_FreeFem.cpp
examples++-mpi/complex_pastix_FreeFem.cpp
examples++-mpi/dSuperLU_DIST.cpp
examples++-mpi/hips_FreeFem.cpp
examples++-mpi/hypre_FreeFem.cpp
examples++-mpi/interfacepastix.cpp
examples++-mpi/mpi-cmaes.cpp
examples++-mpi/parms_FreeFem.cpp
examples++-mpi/real_SuperLU_DIST_FreeFem.cpp
examples++-mpi/real_pastix_FreeFem.cpp
examples++-mpi/schwarz.edp
examples++-tutorial/sparse-cmatrix.edp
examples++-tutorial/sparse-matrix.edp
src/bamg/Makefile.am
src/bamglib/Makefile.am
src/bamglib/Mesh2.cpp
src/bamglib/Mesh2.h
src/bamglib/MeshWrite.cpp
src/bamglib/meshtype.h
src/femlib/BamgFreeFem.cpp
src/femlib/CheckPtr.cpp
src/femlib/GenericMesh.hpp
src/femlib/MatriceCreuse.hpp
src/femlib/MatriceCreuse_tpl.hpp
src/femlib/Mesh3dn.cpp
src/femlib/RNM.hpp
src/fflib/AFunction.cpp
src/fflib/AFunction.hpp
src/fflib/AFunction2.cpp
src/fflib/InitFunct.hpp
src/fflib/Makefile.am
src/fflib/P1IsoValue.cpp
src/fflib/P1IsoValue.hpp
src/fflib/array_tlp.hpp
src/fflib/ffapi.cpp
src/fflib/ffapi.hpp
src/fflib/lex.cpp
src/fflib/lgfem.cpp
src/fflib/lgmat.cpp
src/fflib/load.cpp
src/fflib/problem.cpp
src/fflib/problem.hpp
src/lglib/lg.ypp
src/mpi/parallelempi.cpp
DOC/freefem++doc.pdf | Bin 0 -> 9576121 bytes
HISTORY | 387 +-
HISTORY => HISTORY.orig | 6 +
INNOVATION | 20 -
INNOVATION => INNOVATION.orig | 3 +
Makefile.am | 2 +-
Makefile.am => Makefile.am.orig | 4 +
README_MAC | 4 +-
README_MAC => README_MAC.orig | 6 +-
acmacros.m4 | 6 +-
acmacros.m4 => acmacros.m4.orig | 7 +
acmpi.m4 | 145 +-
acmpi.m4 => acmpi.m4.orig | 98 +
acoptim.m4 | 2 -
acoptim.m4 => acoptim.m4.orig | 3 +
build/download | 2 +-
build/{download => download.orig} | 4 +
config.h.in | 208 +
configure.ac | 162 +-
configure.ac => configure.ac.orig | 98 +
debian/changelog | 6 -
debian/{changelog => changelog.orig} | 3 +
debian/patches/configure.patch | 1 -
.../{configure.patch => configure.patch.orig} | 3 +
debian/patches/examples++-load.patch | 7 +-
...les++-load.patch => examples++-load.patch.orig} | 13 +
debian/patches/examples-bamg.patch | 1 -
...xamples-bamg.patch => examples-bamg.patch.orig} | 3 +
download/Makefile | 903 ++++
download/Makefile.am | 29 +-
download/{Makefile.am => Makefile.am.orig} | 16 +
download/arpack/Makefile | 708 ++++
download/bin/ff-get-dep | 76 +
download/bin/ff-pkg-download | 95 +
download/blas/Makefile | 4322 ++++++++++++++++++++
download/fftw/Makefile | 594 +++
download/getall | 4 +-
download/{getall => getall.orig} | 7 +
download/gmm/cxxflags | 8 +-
download/scotch/Makefile-scotch.inc | 2 +-
...akefile-scotch.inc => Makefile-scotch.inc.orig} | 4 +
download/umfpack/Makefile | 726 ++++
examples++-3d/Makefile.am | 2 +-
examples++-3d/{Makefile.am => Makefile.am.orig} | 4 +
examples++-3d/all.edp | 141 +
examples++-load/._bfstream.cpp | Bin 0 -> 171 bytes
examples++-load/._iovtk.cpp | Bin 0 -> 167 bytes
examples++-load/._lapack.cpp | Bin 0 -> 171 bytes
examples++-load/BinaryIO.cpp | 7 +-
.../{BinaryIO.cpp => BinaryIO.cpp.orig} | 11 +
examples++-load/DxWriter.cpp | 7 +-
.../{DxWriter.cpp => DxWriter.cpp.orig} | 11 +
examples++-load/FreeFemQA.cpp | 7 +-
.../{FreeFemQA.cpp => FreeFemQA.cpp.orig} | 14 +
examples++-load/Makefile.am | 28 +-
examples++-load/{Makefile.am => Makefile.am.orig} | 41 +
examples++-load/MetricKuate.cpp | 19 +-
.../{MetricKuate.cpp => MetricKuate.cpp.orig} | 11 +
examples++-load/MetricPk.cpp | 27 +-
.../{MetricPk.cpp => MetricPk.cpp.orig} | 11 +
examples++-load/NewSolver.cpp | 7 +-
.../{NewSolver.cpp => NewSolver.cpp.orig} | 11 +
examples++-load/PARDISO.cpp | 24 +-
examples++-load/{PARDISO.cpp => PARDISO.cpp.orig} | 28 +
examples++-load/SuperLu.cpp | 10 +-
examples++-load/{SuperLu.cpp => SuperLu.cpp.orig} | 16 +
examples++-load/VTK_writer.cpp | 7 +-
.../{VTK_writer.cpp => VTK_writer.cpp.orig} | 12 +
examples++-load/VTK_writer_3d.cpp | 7 +-
.../{VTK_writer_3d.cpp => VTK_writer_3d.cpp.orig} | 12 +
examples++-load/addNewType.cpp | 7 +-
.../{addNewType.cpp => addNewType.cpp.orig} | 11 +
examples++-load/all.edp | 345 ++
examples++-load/bfstream.cpp | 2 +-
.../{bfstream.cpp => bfstream.cpp.orig} | 4 +
examples++-load/dfft.cpp | 9 +-
examples++-load/{dfft.cpp => dfft.cpp.orig} | 14 +
examples++-load/ff-Ipopt.cpp | 7 +-
.../{ff-Ipopt.cpp => ff-Ipopt.cpp.orig} | 12 +
examples++-load/ff-NLopt.cpp | 7 +-
.../{ff-NLopt.cpp => ff-NLopt.cpp.orig} | 13 +
examples++-load/ff-cmaes.cpp | 7 +-
.../{ff-cmaes.cpp => ff-cmaes.cpp.orig} | 13 +
examples++-load/ff-get-dep.in | 52 +-
examples++-load/ff-get-dep.in.orig | 99 +
examples++-load/fflapack.cpp | 12 +-
examples++-load/{lapack.cpp => fflapack.cpp.orig} | 25 +
examples++-load/ffnewuoa.cpp | 7 +-
.../{ffnewuoa.cpp => ffnewuoa.cpp.orig} | 13 +
examples++-load/freeyams.cpp | 7 +-
.../{freeyams.cpp => freeyams.cpp.orig} | 13 +
examples++-load/funcTemplate.cpp | 7 +-
.../{funcTemplate.cpp => funcTemplate.cpp.orig} | 11 +
examples++-load/gmsh.cpp | 7 +-
examples++-load/{gmsh.cpp => gmsh.cpp.orig} | 13 +
examples++-load/gsl.cpp | 7 +-
examples++-load/{gsl.cpp => gsl.cpp.orig} | 12 +
examples++-load/ilut.cpp | 24 +-
examples++-load/{ilut.cpp => ilut.cpp.orig} | 18 +
examples++-load/include.tar.gz | Bin 2316 -> 1899 bytes
examples++-load/iovtk.cpp | 17 +-
examples++-load/{iovtk.cpp => iovtk.cpp.orig} | 13 +
examples++-load/isolineP1.cpp | 15 +-
.../{isolineP1.cpp => isolineP1.cpp.orig} | 13 +
examples++-load/lapack.cpp | 12 +-
examples++-load/{lapack.cpp => lapack.cpp.orig} | 25 +
examples++-load/lgbmo.cpp | 7 +-
examples++-load/{lgbmo.cpp => lgbmo.cpp.orig} | 13 +
examples++-load/load.link.in | 2 +-
.../{load.link.in => load.link.in.orig} | 4 +
examples++-load/mat_dervieux.cpp | 7 +-
.../{mat_dervieux.cpp => mat_dervieux.cpp.orig} | 11 +
examples++-load/mat_psi.cpp | 8 +-
examples++-load/{mat_psi.cpp => mat_psi.cpp.orig} | 12 +
examples++-load/medit.cpp | 11 +-
examples++-load/{medit.cpp => medit.cpp.orig} | 17 +
examples++-load/metis.cpp | 16 +-
examples++-load/{metis.cpp => metis.cpp.orig} | 18 +
examples++-load/mmg3d-v4.0.cpp | 7 +-
.../{mmg3d-v4.0.cpp => mmg3d-v4.0.cpp.orig} | 13 +
examples++-load/msh3.cpp | 63 +-
examples++-load/{msh3.cpp => msh3.cpp.orig} | 30 +
examples++-load/mshmet.cpp | 7 +-
examples++-load/{mshmet.cpp => mshmet.cpp.orig} | 13 +
examples++-load/myfunction2.cpp | 7 +-
.../{myfunction2.cpp => myfunction2.cpp.orig} | 11 +
examples++-load/pcm2rnm.cpp | 7 +-
examples++-load/{pcm2rnm.cpp => pcm2rnm.cpp.orig} | 12 +
examples++-load/ppm2rnm.cpp | 7 +-
examples++-load/{ppm2rnm.cpp => ppm2rnm.cpp.orig} | 12 +
examples++-load/qf11to25.cpp | 9 +-
.../{qf11to25.cpp => qf11to25.cpp.orig} | 19 +
examples++-load/scotch.cpp | 7 +-
examples++-load/{scotch.cpp => scotch.cpp.orig} | 12 +
examples++-load/splitedges.cpp | 11 +-
.../{splitedges.cpp => splitedges.cpp.orig} | 23 +
examples++-load/splitmesh3.cpp | 9 +-
.../{splitmesh3.cpp => splitmesh3.cpp.orig} | 16 +
examples++-load/splitmesh6.cpp | 9 +-
.../{splitmesh6.cpp => splitmesh6.cpp.orig} | 16 +
examples++-load/symmetrizeCSR.cpp | 6 +-
.../{symmetrizeCSR.cpp => symmetrizeCSR.cpp.orig} | 10 +
examples++-load/tetgen.cpp | 9 +-
examples++-load/{tetgen.cpp => tetgen.cpp.orig} | 13 +
examples++-load/thresholdings.cpp | 9 +-
.../{thresholdings.cpp => thresholdings.cpp.orig} | 17 +
examples++-mpi/._DDM-Schwarz-macro.idp | Bin 0 -> 171 bytes
examples++-mpi/._hips_FreeFem.cpp | Bin 0 -> 171 bytes
examples++-mpi/DDM-Schwarz-macro.idp | 5 +-
...chwarz-macro.idp => DDM-Schwarz-macro.idp.orig} | 10 +
examples++-mpi/MPICG.cpp | 6 +-
examples++-mpi/{MPICG.cpp => MPICG.cpp.orig} | 11 +
examples++-mpi/MPIplot.idp | 3 -
examples++-mpi/{MPIplot.idp => MPIplot.idp.orig} | 6 +
examples++-mpi/MUMPS.cpp.orig | 318 ++
examples++-mpi/MUMPS_FreeFem.cpp | 9 +-
.../{MUMPS_FreeFem.cpp => MUMPS_FreeFem.cpp.orig} | 14 +
examples++-mpi/Makefile.am | 7 +-
examples++-mpi/{Makefile.am => Makefile.am.orig} | 12 +
examples++-mpi/Stokes-v1-matrix-mumps.edp | 2 +-
...x-mumps.edp => Stokes-v1-matrix-mumps.edp.orig} | 4 +
examples++-mpi/complex_SuperLU_DIST_FreeFem.cpp | 12 +-
...m.cpp => complex_SuperLU_DIST_FreeFem.cpp.orig} | 18 +
examples++-mpi/complex_pastix_FreeFem.cpp | 14 +-
...FreeFem.cpp => complex_pastix_FreeFem.cpp.orig} | 15 +
examples++-mpi/dSuperLU_DIST.cpp | 12 +-
.../{dSuperLU_DIST.cpp => dSuperLU_DIST.cpp.orig} | 18 +
examples++-mpi/hips_FreeFem.cpp | 9 +-
.../{hips_FreeFem.cpp => hips_FreeFem.cpp.orig} | 14 +
examples++-mpi/hypre_FreeFem.cpp | 14 +-
.../{hypre_FreeFem.cpp => hypre_FreeFem.cpp.orig} | 18 +
examples++-mpi/interfacepastix.cpp | 14 +-
...nterfacepastix.cpp => interfacepastix.cpp.orig} | 14 +
examples++-mpi/mpi-cmaes.cpp | 8 +-
.../{mpi-cmaes.cpp => mpi-cmaes.cpp.orig} | 13 +
examples++-mpi/parms_FreeFem.cpp | 25 +-
.../{parms_FreeFem.cpp => parms_FreeFem.cpp.orig} | 14 +
examples++-mpi/real_SuperLU_DIST_FreeFem.cpp | 11 +-
...eFem.cpp => real_SuperLU_DIST_FreeFem.cpp.orig} | 18 +
examples++-mpi/real_pastix_FreeFem.cpp | 13 +-
...ix_FreeFem.cpp => real_pastix_FreeFem.cpp.orig} | 14 +
examples++-mpi/schwarz.edp | 116 +-
examples++-mpi/{schwarz.edp => schwarz.edp.orig} | 71 +
examples++-tutorial/sparse-cmatrix.edp | 3 -
...{sparse-cmatrix.edp => sparse-cmatrix.edp.orig} | 8 +-
examples++-tutorial/sparse-matrix.edp | 3 -
.../{sparse-matrix.edp => sparse-matrix.edp.orig} | 8 +-
src/bamg/Makefile.am | 8 +-
src/bamg/{Makefile.am => Makefile.am.orig} | 12 +
src/bamglib/Makefile.am | 2 +-
src/bamglib/{Makefile.am => Makefile.am.orig} | 4 +
src/bamglib/Mesh2.cpp | 8 +-
src/bamglib/{Mesh2.cpp => Mesh2.cpp.orig} | 8 +
src/bamglib/Mesh2.h | 21 +-
src/bamglib/{Mesh2.h => Mesh2.h.orig} | 27 +
src/bamglib/MeshWrite.cpp | 1710 ++++----
src/bamglib/{MeshWrite.cpp => MeshWrite.cpp.orig} | 885 ++++
src/bamglib/meshtype.h | 2 +-
src/bamglib/{meshtype.h => meshtype.h.orig} | 4 +
src/depcomp | 479 +++
src/femlib/._BamgFreeFem.cpp | Bin 0 -> 167 bytes
src/femlib/BamgFreeFem.cpp | 4 +-
.../{BamgFreeFem.cpp => BamgFreeFem.cpp.orig} | 11 +
src/femlib/CheckPtr.cpp | 6 -
src/femlib/{CheckPtr.cpp => CheckPtr.cpp.orig} | 18 +
src/femlib/GenericMesh.hpp | 38 +-
.../{GenericMesh.hpp => GenericMesh.hpp.orig} | 21 +
src/femlib/MatriceCreuse.hpp | 43 +-
.../{MatriceCreuse.hpp => MatriceCreuse.hpp.orig} | 22 +
src/femlib/MatriceCreuse_tpl.hpp | 58 +-
...ceCreuse_tpl.hpp => MatriceCreuse_tpl.hpp.orig} | 33 +
src/femlib/Mesh3dn.cpp | 34 +-
src/femlib/{Mesh3dn.cpp => Mesh3dn.cpp.orig} | 32 +
src/femlib/RNM.hpp | 4 +-
src/femlib/{RNM.hpp => RNM.hpp.orig} | 5 +
src/fflib/._load.cpp | Bin 0 -> 170 bytes
src/fflib/AFunction.cpp | 36 +-
src/fflib/{AFunction.cpp => AFunction.cpp.orig} | 32 +
src/fflib/AFunction.hpp | 10 +-
src/fflib/{AFunction.hpp => AFunction.hpp.orig} | 8 +
src/fflib/AFunction2.cpp | 27 +-
src/fflib/{AFunction2.cpp => AFunction2.cpp.orig} | 32 +
src/fflib/InitFunct.hpp | 2 +-
src/fflib/{InitFunct.hpp => InitFunct.hpp.orig} | 4 +
src/fflib/Makefile.am | 3 +-
src/fflib/{Makefile.am => Makefile.am.orig} | 7 +
src/fflib/P1IsoValue.cpp | 22 +-
src/fflib/{P1IsoValue.cpp => P1IsoValue.cpp.orig} | 35 +
src/fflib/P1IsoValue.hpp | 8 +-
src/fflib/{P1IsoValue.hpp => P1IsoValue.hpp.orig} | 7 +
src/fflib/array_tlp.hpp | 9 +-
src/fflib/{array_tlp.hpp => array_tlp.hpp.orig} | 13 +
src/fflib/ffapi.cpp | 18 +-
src/fflib/{ffapi.cpp => ffapi.cpp.orig} | 11 +
src/fflib/ffapi.hpp | 5 +-
src/fflib/{ffapi.hpp => ffapi.hpp.orig} | 9 +
src/fflib/lex.cpp | 2 +-
src/fflib/{lex.cpp => lex.cpp.orig} | 4 +
src/fflib/lgfem.cpp | 32 +-
src/fflib/{lgfem.cpp => lgfem.cpp.orig} | 13 +
src/fflib/lgmat.cpp | 118 +-
src/fflib/{lgmat.cpp => lgmat.cpp.orig} | 156 +
src/fflib/load.cpp | 157 +-
src/fflib/{load.cpp => load.cpp.orig} | 101 +
src/fflib/problem.cpp | 22 +-
src/fflib/{problem.cpp => problem.cpp.orig} | 22 +
src/fflib/problem.hpp | 4 +-
src/fflib/{problem.hpp => problem.hpp.orig} | 4 +
src/fflib/strversionnumber.cpp | 23 +
src/lglib/lg.tab.cpp | 3472 ++++++++++++++++
src/lglib/lg.tab.hpp | 175 +
src/lglib/lg.ypp | 22 +-
src/lglib/{lg.ypp => lg.ypp.orig} | 38 +
src/mpi/parallelempi.cpp | 23 +-
.../{parallelempi.cpp => parallelempi.cpp.orig} | 25 +
255 files changed, 17197 insertions(+), 2473 deletions(-)
diff --cc HISTORY.orig
index 7166812,0000000..1dcebff
mode 100644,000000..100644
--- a/HISTORY.orig
+++ b/HISTORY.orig
@@@ -1,16172 -1,0 +1,16178 @@@
++<<<<<<< HEAD
+@ changeset: 3168:841250c6ecc4
+| tag: tip
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Feb 16 12:51:05 2015 +0100
+| summary: correct find petsc
+|
+o changeset: 3167:cd84708881af
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 13 19:04:29 2015 +0100
+| summary: correction in caes of no compilion of hpddm
+|
+o changeset: 3166:2ace2a1eda0b
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 13 15:53:04 2015 +0100
+| summary: correct typo in configure output
+|
+o changeset: 3165:45280aa09820
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 13 15:43:25 2015 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3164:0d87a638d273
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 13 15:41:24 2015 +0100
+| summary: put change for hpdmm mlk old. Thank P. Jolivet.
+|
+o changeset: 3163:6510f36c0063
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 13 10:14:01 2015 +0100
+| summary: add reinstall-hpddm targed in downlaod/Makefile
+|
+o changeset: 3162:cd09add72c31
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 12 18:03:19 2015 +0100
+| summary: correct typo in find petsc
+|
+o changeset: 3161:2d75c3267da7
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 12 15:41:22 2015 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3160:07a30279fade
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 12 15:11:48 2015 +0100
+| summary: add notify of petsc
+|
+o changeset: 3159:d71a3cc91c39
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 12 15:04:19 2015 +0100
+| summary: update INNOVATION file
+|
+o changeset: 3158:7ffe24b7a08d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 12 15:02:49 2015 +0100
+| summary: pass to version 3.34-1 for PETSc interface ans schwarz plugins
+|
+o changeset: 3157:83f4a2ab0c5f
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 12 11:20:52 2015 +0100
+| summary: coorect problem on version in PETSc interface and MKL for schawtz.cpp
+|
+o changeset: 3156:651407885920
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 12 10:11:33 2015 +0100
+| summary: correct typo after big change in plugin (now all test works)
+|
+o changeset: 3155:bff13b38aba2
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 12 09:43:26 2015 +0100
+| summary: Change all int of plugins due to bug on somme allpe version
+|
+o changeset: 3154:e8aa9ceccd60
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 10 21:34:10 2015 +0100
+| summary: try of compile schwarz.cpp on all case
+|
+o changeset: 3153:f693d6250f91
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 10 17:23:21 2015 +0100
+| summary: remove plot in MPI
+|
+o changeset: 3152:9cbe00fe0e23
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 10 15:43:46 2015 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3151:e6be9d714829
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 10 15:33:31 2015 +0100
+| summary: remove libiomp5 if non openmp
+|
+o changeset: 3150:fdef3857f8bf
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 10 14:45:06 2015 +0100
+| summary: updet missing file for hpddm
+|
+o changeset: 3149:7a351cbaa77d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 10 14:43:09 2015 +0100
+| summary: coorect pb of compilation of schwarz.cpp plugins in progress.
+|
+o changeset: 3148:f85a44d0ab6d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 10 10:28:55 2015 +0100
+| summary: correct ff-get-dep.in ff-get-dep.awk (pb of new line in awk )
+|
+o changeset: 3147:bb139ebb5e41
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 10 09:28:35 2015 +0100
+| summary: rewrite all automatic search of library in awk ad add no mandatory lib like PETSc
+|
+o changeset: 3146:d23e38b06cd6
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Feb 09 18:06:20 2015 +0100
+| summary: correct missing include seach in ff-get-dep.in for no mandatori libs
+|
+o changeset: 3145:3516b5ecac75
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 06 18:18:00 2015 +0100
+| summary: update download/Makefile.am
+|
+o changeset: 3144:b6ce652f34d1
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 06 18:10:17 2015 +0100
+| summary: add install de hpddm ...
+|
+o changeset: 3143:54b79f51069b
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 06 14:43:16 2015 +0100
+| summary: correct bad LIB_MPI in scotch
+|
+o changeset: 3142:1faabfce37d3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 06 14:07:59 2015 +0100
+| summary: add no mandatoring lib in automatic lib search (WHERE-LIb search)
+|
+o changeset: 3141:d7420bb1718d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 06 11:50:52 2015 +0100
+| summary: do lot of correction for new install version 3.24
+|
+o changeset: 3140:ad567d1f75ac
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 05 21:40:31 2015 +0100
+| summary: correct acmpi for pb sgi mpicc
+|
+o changeset: 3139:d2144a73ee94
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 05 09:47:20 2015 +0100
+| summary: correct problem when find c++11 version in configure
+|
+o changeset: 3138:d777e1cc38d4
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 30 16:02:54 2015 +0100
+| summary: remove a madatory 3d test
+|
+o changeset: 3137:ae6b05ca1182
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 30 15:49:33 2015 +0100
+| summary: continue coorect double free
+|
+o changeset: 3136:d52565e53a04
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 30 15:01:45 2015 +0100
+| summary: correct pb 2 free in bamg
+|
+o changeset: 3135:e2d7867ffd31
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 30 14:51:08 2015 +0100
+| summary: correct typo
+|
+o changeset: 3134:e59974780d33
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 30 14:45:46 2015 +0100
+| summary: remove of pb of 2 free un bamg in case of crossing boundary
+|
+o changeset: 3133:dfe9ee56d630
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 30 14:12:53 2015 +0100
+| summary: change for c++-11 and hdf5 with g++-4.9.1
+|
+o changeset: 3132:d7e83d234408
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 30 09:59:26 2015 +0100
+| summary: correct jn call for c++11
+|
+o changeset: 3131:c1663877ad52
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 30 09:57:04 2015 +0100
+| summary: coorect pow of c++-11 compiler
+|
+o changeset: 3130:e1174bba7a16
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 29 10:31:52 2015 +0100
+| summary: coorect pb with pclose call
+|
+o changeset: 3129:1af654663cff
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 29 10:01:11 2015 +0100
+| summary: add correct of pb compilation undec g++ 4.8.1 c++-11
+|
+o changeset: 3128:084f6138edba
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 16 21:10:43 2015 +0100
+| summary: add schwarz.edp and add AutoGeneratedFile.tar.gz
+|
+o changeset: 3127:4edf8d6dd064
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 16 21:05:34 2015 +0100
+| summary: cadd schwarz.edp test
+|
+o changeset: 3126:40891f8e170d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 16 20:39:09 2015 +0100
+| summary: correct configure.ac to compile plugin schwarz with PETSc
+|
+o changeset: 3125:397a0e0b089f
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jan 16 17:16:29 2015 +0100
+| summary: add petsc in configure (first test)
+|
+o changeset: 3124:695d108081da
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 15 16:54:43 2015 +0100
+| summary: correct pb compile e new schwarz pluging
+|
+o changeset: 3123:84eadda9ec1e
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 15 15:55:21 2015 +0100
+| summary: add schwarz interface
+|
+o changeset: 3122:fb3f97e0b7ad
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 15 15:25:14 2015 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3121:4e9df821cdd8
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 15 15:24:15 2015 +0100
+| summary: add new cpu type on apple
+|
+o changeset: 3120:18f455b5dd91
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 15 15:14:33 2015 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3119:f2a508d27a6d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 15 15:12:02 2015 +0100
+| summary: add cxx11 chech
+|
+o changeset: 3118:89604c8d20bb
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 15 11:04:51 2015 +0100
+| summary: correct build/download to follow link in case of curl usage..
+|
+o changeset: 3117:1356c66b9164
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jan 15 08:22:32 2015 +0100
+| summary: correct pb on depot
+|
+o changeset: 3116:ed9ccb5032ff
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jan 13 22:49:44 2015 +0100
+| summary: coorect examples++-load/include dir construction
+|
+o changeset: 3115:034691a4deff
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jan 13 22:34:43 2015 +0100
+| summary: correct reconstrion for examples++-load/include
+|
+o changeset: 3114:c180b6d013fd
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jan 13 22:01:23 2015 +0100
+| summary: add missing file
+|
+o changeset: 3113:ae32ce3d21c3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jan 13 21:31:46 2015 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3112:3201f396e00c
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jan 13 21:30:17 2015 +0100
+| summary: correct src/bamg/Makefile.am for hdf5 tools
+|
+o changeset: 3111:3cdca031639a
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jan 13 21:19:27 2015 +0100
+| summary: add missing file
+|
+o changeset: 3110:cf15bbc40e87
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jan 13 21:08:20 2015 +0100
+| summary: add hd5 and xml stuff.
+|
+o changeset: 3109:be503a9f1ff3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Dec 15 14:52:58 2014 +0100
+| summary: put modif un lg.ypp not in lg.tab.cpp
+|
+o changeset: 3108:1f630ba53655
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Dec 15 14:17:33 2014 +0100
+| summary: add missing option in plot
+|
+o changeset: 3107:77a71b1b2901
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Sat Dec 13 21:14:08 2014 +0100
+| summary: correct memory leak
+|
+o changeset: 3106:e18aa16a8edf
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Sat Dec 13 14:53:47 2014 +0100
+| summary: correct typo for c++11 >>
+|
+o changeset: 3105:0094d2a7433d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Dec 12 20:53:16 2014 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz and a P. Patch for
+|
+o changeset: 3104:5d5d0f7cbcfc
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Dec 12 10:40:06 2014 +0100
+| summary: correct lot of memory leak in case of
+|
+o changeset: 3103:e7c44e31bf18
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Dec 11 20:48:28 2014 +0100
+| summary: correct memory leack
+|
+o changeset: 3102:768c07a126f7
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Dec 08 09:37:21 2014 +0100
+| summary: add file fore hpddm interface
+|
+o changeset: 3101:fb9b853f36b3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Nov 28 13:43:55 2014 +0100
+| summary: correct ff_finalmize
+|
+o changeset: 3100:b47f510056e4
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Nov 28 12:06:48 2014 +0100
+| summary: add function ff_finalize
+|
+o changeset: 3099:913a0e471dca
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Nov 26 08:18:43 2014 +0100
+| summary: add missing files
+|
+o changeset: 3098:78b5f9947030
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Nov 26 08:13:09 2014 +0100
+| summary: pass to version 3.33
+|
+o changeset: 3097:492928d72946
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Nov 26 08:10:21 2014 +0100
+| summary: begin of PETSc integration
+|
+o changeset: 3096:e5f2eccb8503
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Nov 14 23:03:05 2014 +0100
+| summary: correct bug in periodic B.C ( some time loop)
+|
+o changeset: 3095:3ed7375fbf91
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Nov 14 09:12:19 2014 +0100
+| summary: remove debug call xxxx()
+|
+o changeset: 3094:82be1c76fe42
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Nov 14 09:11:12 2014 +0100
+| summary: correct bug array growing behaves differently on Linux and Mac
+|
+o changeset: 3093:eecf0e60f9f5
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Nov 12 16:28:08 2014 +0100
+| summary: add check on vol tet in readmesh3
+|
+o changeset: 3092:fa4384bf86b4
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Nov 07 14:30:36 2014 +0100
+| summary: correct pb under window in load.cpp (no dlerror)
+|
+o changeset: 3091:0a4c31444a80
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
++=======
++@ changeset: 3091:0a4c31444a80
++| tag: tip
++| user: Frederic Hecht <frederic.hecht at upmc.fr>
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+| date: Tue Nov 04 10:58:24 2014 +0100
+| summary: correct md5 code of OpenBlas.tar.gz
+|
+o changeset: 3090:5da39542e29b
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Nov 03 21:46:43 2014 +0100
+| summary: Added tag 3.28 for changeset af4fbbef4ecd
+|
+o changeset: 3089:02abe57a6937
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Nov 03 21:46:28 2014 +0100
+| summary: Added tag 3.27 for changeset 4c7506b5ac6c
+|
+o changeset: 3088:641a8e0bee7c
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Nov 03 21:44:16 2014 +0100
+| summary: Added tag 3.29 for changeset d7efc421b561
+|
+o changeset: 3087:acd6c3b0c193
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Nov 03 21:42:37 2014 +0100
+| summary: Added tag 3.32 for changeset d324bac28890
+|
+o changeset: 3086:edda4017be2b
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Nov 03 21:40:19 2014 +0100
+| summary: Added tag 3.31-2 for changeset a7eb0c2116df
+|
+o changeset: 3085:94b8a1970489
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Nov 03 21:39:58 2014 +0100
+| summary: Added tag 3.31-3 for changeset 4e164226411d
+|
+o changeset: 3084:248ae9751459
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Oct 30 08:43:56 2014 +0100
+| summary: thanck to V. Huber to take care of the verbosity level.
+|
+o changeset: 3083:4ad6b556e1cb
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Oct 29 19:10:00 2014 +0100
+| summary: passversion to 3.32-1
+|
+o changeset: 3082:2047e74a7fd2
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Oct 29 19:05:50 2014 +0100
+| summary: a compuation of dx,dy in Element_PkEdge
+|
+o changeset: 3081:39d9338aa60a
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Oct 29 17:10:40 2014 +0100
+| summary: coorect plugin
+|
+o changeset: 3080:ab0bad526b7a
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Oct 22 11:47:55 2014 +0200
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3079:adf7ec4e0148
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Oct 22 11:47:16 2014 +0200
+| summary: add correction of P. Jolivet.
+|
+o changeset: 3078:d29757759e08
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Oct 20 21:30:08 2014 +0200
+| summary: add correct launchff++ add ++d parameter for debuggin
+|
+o changeset: 3077:df774c8536bf
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Oct 17 10:54:18 2014 +0200
+| summary: update INNOVATION
+|
+o changeset: 3076:9ad9343d75d5
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Oct 17 10:53:01 2014 +0200
+| summary: correct big big in memory manageemnt of sparse matrix Matrice_Creuse
+|
+o changeset: 3075:7e28b3a59725
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Oct 16 22:42:59 2014 +0200
+| summary: correct pb of factorisation
+|
+o changeset: 3074:a216bad8d511
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Oct 16 22:39:31 2014 +0200
+| summary: correct type add remove file
+|
+o changeset: 3073:89d2902eadca
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Oct 16 22:36:24 2014 +0200
+| summary: correct typo and remove test ..
+|
+o changeset: 3072:d4af5fcecb25
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Oct 16 18:30:25 2014 +0200
+| summary: add check \ escape on string "\z" -> z "\\" -> \ "\"" -> "
+|
+o changeset: 3071:d324bac28890
+| tag: 3.32
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Oct 16 16:33:01 2014 +0200
+| summary: coorect size on arrow in plot ..
+|
+o changeset: 3070:50157156eec4
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Oct 01 16:14:50 2014 +0200
+| summary: correct PARDISO / omp interface un uv100
+|
+o changeset: 3069:828f65161d32
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 17:23:35 2014 +0200
+| summary: coorect type in parms interface
+|
+o changeset: 3068:8d8432eea0df
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 17:01:19 2014 +0200
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3067:0bffd0452ab7
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 16:58:05 2014 +0200
+| summary: add MUMPS plugin as MUMPS_seq plug without mpi
+|
+o changeset: 3066:defe4e954307
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 16:50:45 2014 +0200
+| summary: update getall for davis web site change
+|
+o changeset: 3065:15f28ab62c85
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 16:00:57 2014 +0200
+| summary: update getall ofr change SuiteSparse change web site.
+|
+o changeset: 3064:ec7869984007
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 15:16:41 2014 +0200
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3063:3086bae92306
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 15:15:30 2014 +0200
+| summary: correct environment.cpp and Makefile.am to find and put plugin for mpi
+|
+o changeset: 3062:1dfbc3cec7ed
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 13:57:17 2014 +0200
+| summary: clean return value of /clean_all_installed_ffpp.sh for mac installer
+|
+o changeset: 3061:5f22bdd00e0e
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 13:51:01 2014 +0200
+| summary: add missing chaneg
+|
+o changeset: 3060:3e57363e9da8
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 13:49:36 2014 +0200
+| summary: next step for mpi plugin
+|
+o changeset: 3059:8a87f28ed7f5
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Sep 16 11:22:47 2014 +0200
+| summary: correct MUMPS plugin complex version
+|
+o changeset: 3058:2d9d48374ec8
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Sep 01 14:48:27 2014 +0200
+| summary: add vectoral operator line v/a (resp. a/v- == v_i/a (resp. a/v_i)
+|
+o changeset: 3057:e471d8a2ae32
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Aug 26 11:45:47 2014 +0200
+| summary: missing file in distribution.
+|
+o changeset: 3056:d9e53bbab3af
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Aug 25 17:23:15 2014 +0200
+| summary: crrect pb in chech un window
+|
+o changeset: 3055:f302c03c8ae7
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Aug 25 16:36:06 2014 +0200
+| summary: coorect a bug in buildlayer in case of 0 edge on border...
+|
+o changeset: 3054:d23ac6140622
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Sat Aug 23 08:08:30 2014 +0200
+| summary: pass to ersion 3.31-3
+|
+o changeset: 3053:4e164226411d
+| tag: 3.31-3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Aug 12 23:19:52 2014 +0200
+| summary: coorect of array size in plot
+|
+o changeset: 3052:a7eb0c2116df
+| tag: 3.31-2
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jul 11 21:17:26 2014 +0200
+| summary: correct iter in stop function in CG
+|
+o changeset: 3051:d267356f183c
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Jul 11 14:57:05 2014 +0200
+| summary: add script for installation
+|
+o changeset: 3050:e63d8e10315a
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 22:32:46 2014 +0200
+| summary: chech !!
+|
+o changeset: 3049:3a79062ffe5c
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 22:25:07 2014 +0200
+| summary: coorect typo
+|
+o changeset: 3048:402527913245
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 22:23:35 2014 +0200
+| summary: add missing file
+|
+o changeset: 3047:4b5c501566f6
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 22:00:44 2014 +0200
+| summary: update INNOVATION
+|
+o changeset: 3046:5705d48950bd
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 21:45:46 2014 +0200
+| summary: correct pb ConjuguedGradient introduct this afternoon (kprint==0)
+|
+o changeset: 3045:d3f01b55f65d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 21:23:36 2014 +0200
+| summary: correct bug put in DG formulation (rev 3044)
+|
+o changeset: 3044:010dd06d2876
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 16:59:09 2014 +0200
+| summary: remove template initialisation of stopgc ..
+|
+o changeset: 3043:27a77d0f60c9
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 10:45:24 2014 +0200
+| summary: pass to version 3.31-1
+|
+o changeset: 3042:00d0f665141f
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 10 10:41:50 2014 +0200
+| summary: add stop function for adapted test ... si doc and iNNVATION file
+|
+o changeset: 3041:074b99969ce5
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jul 09 16:31:08 2014 +0200
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3040:5a06d3054622
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jul 09 16:30:03 2014 +0200
+| summary: correct problem whitc zdotc on MacOS
+|
+o changeset: 3039:ae09f5411c83
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jul 09 09:10:01 2014 +0200
+| summary: update INNOVATION
+|
+o changeset: 3038:3eab3ae21140
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jul 09 08:22:07 2014 +0200
+| summary: add function matricx for eigein value
+|
+o changeset: 3037:794839c2a7cd
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 03 18:57:21 2014 +0200
+| summary: end of corecttion of LinearGMRES and AffineGMREs
+|
+o changeset: 3036:371512bac93d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jul 03 13:00:34 2014 +0200
+| summary: correct a big big in LinearGMRES (thank to franco at us.es)
+|
+o changeset: 3035:b412d75b60bd
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jul 02 10:39:35 2014 +0200
+| summary: add missing plugin in MeshSurface.idp
+|
+o changeset: 3034:0888dfd0dc61
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jul 02 10:31:04 2014 +0200
+| summary: correct typo
+|
+o changeset: 3033:bb189e3f0ea3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jul 02 10:29:53 2014 +0200
+| summary: correct misstake in examples++-3d/MeshSurface.idp
+|
+o changeset: 3032:1e34d36052ec
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jul 01 19:19:48 2014 +0200
+| summary: add '=' for pickinhg on macos on medit..
+|
+o changeset: 3031:aadbdf882d72
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jul 01 18:30:28 2014 +0200
+| summary: correct getall add -h parameter ...
+|
+o changeset: 3030:dbde96404949
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Jul 01 15:23:05 2014 +0200
+| summary: add '=' in medit for picking on mac..
+|
+o changeset: 3029:ff74fea8d8e7
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Jun 30 10:03:47 2014 +0200
+| summary: correct bug in jump in case 1d problem
+|
+o changeset: 3028:96d648cf5661
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Sun Jun 29 22:39:20 2014 +0200
+| summary: coorect bug in change in DG matrice construction in case periodic
+|
+o changeset: 3027:28131940d86b
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Jun 26 11:48:52 2014 +0200
+| summary: add new example of C1 approximation witn HCT ...
+|
+o changeset: 3026:b468fda53b82
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jun 25 18:42:56 2014 +0200
+| summary: correct pb with freefem++-nw know no graphic).
+|
+o changeset: 3025:c9f9ed1fd403
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jun 18 22:01:26 2014 +0200
+| summary: correct PARDISO.cpp to compile on Mac.
+|
+o changeset: 3024:c9ebcf863ae0
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jun 18 21:48:29 2014 +0200
+| summary: correct error in gsl.edp
+|
+o changeset: 3023:fe129f0a04a7
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jun 18 21:19:06 2014 +0200
+| summary: correct Makefine.am
+|
+o changeset: 3022:fe328b42b0bf
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jun 18 21:13:42 2014 +0200
+| summary: correct typo (missing ; )
+|
+o changeset: 3021:796a520a31f6
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jun 18 21:09:55 2014 +0200
+| summary: correct INNOVATION.
+|
+o changeset: 3020:09dd923712b9
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Jun 18 21:07:28 2014 +0200
+| summary: add new plugin to make some binary io, will be
+|
+o changeset: 3019:ff55bb4a608f
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri May 16 13:53:06 2014 +0200
+| summary: try correct comile pb on UV100
+|
+o changeset: 3018:9c600978774d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri May 16 13:37:51 2014 +0200
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 3017:2952e5f96558
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri May 16 12:46:05 2014 +0200
+| summary: add levelset integral and pass to version 3.30-1 in 3d
+|
+o changeset: 3016:07b402a63c90
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed May 07 21:21:05 2014 +0200
+| summary: correct pb in BEC plugin ( function denpendint of x,y,z point ..
+|
+o changeset: 3015:1aea517bacce
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed May 07 16:14:10 2014 +0200
+| summary: add new plugins for BEC
+|
+o changeset: 3014:ba2508484995
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Apr 28 14:50:11 2014 +0200
+| summary: remove spurioux cout in ffglut (00)
+|
+o changeset: 3013:bdf2b6da5050
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 10:29:07 2014 +0200
+| summary: add binary mode file type
+|
+o changeset: 3012:525001ac8cfc
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 09:30:04 2014 +0200
+| summary: add rev in innovation
+|
+o changeset: 3011:59412345af2f
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 09:28:09 2014 +0200
+| summary: remove DEBUG print to find a bug in examples++-tutorial/periodic4.edp
+|
+o changeset: 3010:0aef24b50bbc
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 01:41:01 2014 +0200
+| summary: correct typo
+|
+o changeset: 3009:127d0bf1147d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 01:35:04 2014 +0200
+| summary: add dump
+|
+o changeset: 3008:dd22333aaf2a
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 01:25:38 2014 +0200
+| summary: next
+|
+o changeset: 3007:f0183dc26132
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 01:13:09 2014 +0200
+| summary: correct type in dump
+|
+o changeset: 3006:178ac8a66957
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 01:11:06 2014 +0200
+| summary: add dump
+|
+o changeset: 3005:2d95c7cc3a39
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Apr 24 01:02:10 2014 +0200
+| summary: add bug in Builmesh.
+|
+o changeset: 3004:f445e1459c72
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Apr 23 17:30:18 2014 +0200
+| summary: version of the distribution 3.30
+|
+o changeset: 3003:ed040aa51a0a
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Apr 23 16:56:47 2014 +0200
+| summary: coorect type in doc zero -> two in def of nTonEdge
+|
+o changeset: 3002:d3e4511ca0d7
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Apr 23 16:33:00 2014 +0200
+| summary: correct DOC version
+|
+o changeset: 3001:10f137760625
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Apr 23 16:29:23 2014 +0200
+| summary: update the doc for multy border ...
+|
+o changeset: 3000:c9a1eac26e35
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Apr 23 14:34:58 2014 +0200
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 2999:ab3683b70e74
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Apr 23 14:33:22 2014 +0200
+| summary: add multy border , past to version 3.30 ..
+|
+o changeset: 2998:b7cb347b18f3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Apr 22 23:11:38 2014 +0200
+| summary: avant un multy border and comment the test .. in mesh.edp
+|
+o changeset: 2997:03fb3a6a9894
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Apr 22 16:53:26 2014 +0200
+| summary: coorect pb of free not alloc pionter in mmg3d4-0
+|
+o changeset: 2996:6958d44d16e8
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Apr 11 15:15:07 2014 +0200
+| summary: remove cout in RT1 2d Finite elemnt
+|
+o changeset: 2995:57603195ad5d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Apr 09 08:50:57 2014 +0100
+| summary: add tools for Quadrature formular.
+|
+o changeset: 2994:281a9fa7e47e
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 26 09:00:43 2014 +0100
+| summary: remove crazy output in lapack.cpp and fflapack.cpp
+|
+o changeset: 2993:46fd913b30cf
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Mar 24 15:08:45 2014 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 2992:2036c6a948fd
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Mar 21 18:39:08 2014 +0100
+| summary: add tools for integrale with levelset (under ) in 2d ..
+|
+o changeset: 2991:7ded401a2b84
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Mar 20 15:12:23 2014 +0100
+| summary: remve double def of R in P1IsoValue.cpp
+|
+o changeset: 2990:555bf81333d6
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Mar 17 09:27:01 2014 +0100
+| summary: add tool to compute volume under levelset arealevelset , volumelevelset
+|
+o changeset: 2989:935cf6997964
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Mar 17 09:21:26 2014 +0100
+| summary: add tools of mesure doamine def by levelset
+|
+o changeset: 2988:e898b08ccf2f
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Mar 14 17:36:59 2014 +0100
+| summary: correct mistake in include P1IsoValue.hpp
+|
+o changeset: 2987:a7813b0a1b9b
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Mar 14 17:23:34 2014 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 2986:69fe85e411a0
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Mar 14 11:19:22 2014 +0100
+| summary: try empty matrix in MUMPS => dono works ..
+|
+o changeset: 2985:03b6d8003a47
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Mar 14 11:09:15 2014 +0100
+| summary: put empty matrix in set if need
+|
+o changeset: 2984:9afbc88823c8
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Mar 14 10:33:44 2014 +0100
+| summary: correct mistake in MUMPS.cpp (plugin)
+|
+o changeset: 2983:2e43d499a8b3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 12 15:45:02 2014 +0100
+| summary: update rev innovatiop
+|
+o changeset: 2982:5433ef595dd2
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 12 15:43:56 2014 +0100
+| summary: coorect type and memory mistake in fftime function
+|
+o changeset: 2981:5cc256ed2a1b
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 12 15:12:16 2014 +0100
+| summary: add rev in INNOVATIOn
+|
+o changeset: 2980:25666438652f
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 12 15:10:46 2014 +0100
+| summary: add macro generation stuff like Stringification,FILE, LINE si INNIVATION,
+|
+o changeset: 2979:35727886f469
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 12 08:50:41 2014 +0100
+| summary: add int on levelset for sym matrix,
+|
+o changeset: 2978:057aed9a37d3
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Mar 11 21:16:20 2014 +0100
+| summary: rebuild include.tar.gz
+|
+o changeset: 2977:f68fc8801d7c
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Mar 11 21:06:37 2014 +0100
+| summary: add tools to compute int on levelset
+|
+o changeset: 2976:f6777db44f02
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Mar 11 21:04:37 2014 +0100
+| summary: add tool to compute int on levelset
+|
+o changeset: 2975:2384ccefae8e
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Mar 07 13:40:31 2014 +0100
+| summary: add bace cube function .
+|
+o changeset: 2974:9b8b469c4f18
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Mar 07 11:52:08 2014 +0100
+| summary: update INNIVATION
+|
+o changeset: 2973:d7efc421b561
+| tag: 3.29
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Mar 06 17:01:11 2014 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 2972:566f7ef75969
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Mar 06 16:54:04 2014 +0100
+| summary: coorect type compilepkg in arpack makefile
+|
+o changeset: 2971:51d803f66704
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Mar 06 16:07:42 2014 +0100
+| summary: coorect problem we getall script
+|
+o changeset: 2970:be94e3caaa45
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Mar 06 12:11:29 2014 +0100
+| summary: coorect install pb in linux for next distribution
+|
+o changeset: 2969:605daf8c95fd
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Mar 06 11:00:15 2014 +0100
+| summary: missing file in dist lgmesh.hpp
+|
+o changeset: 2968:846a6a5f1192
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Mar 06 09:54:54 2014 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 2967:d95584630180
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Mar 06 09:53:23 2014 +0100
+| summary: correct make dist target in blas ...
+|
+o changeset: 2966:094e01f7c642
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 19:26:11 2014 +0100
+| summary: coorect pb of recomple mmg3d if the patch change
+|
+o changeset: 2965:a209379da038
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 18:45:23 2014 +0100
+| summary: leak mmg3d next step
+|
+o changeset: 2964:e6f8ef801100
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 18:19:57 2014 +0100
+| summary: try memory leal mmg3d v4
+|
+o changeset: 2963:e342d40ce4dd
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 15:40:39 2014 +0100
+| summary: coorect mshmet leak memory problem
+|
+o changeset: 2962:6d042cb544d6
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 13:29:09 2014 +0100
+| summary: correct typo
+|
+o changeset: 2961:52a5fe2df2b2
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 13:17:57 2014 +0100
+| summary: build AutoGeneratedFile.tar.gz
+|
+o changeset: 2960:66c20b1178c9
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 13:17:25 2014 +0100
+| summary: add stuff of get memory storage info on mac and linux
+|
+o changeset: 2959:c3e4ab8a0afa
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 11:13:33 2014 +0100
+| summary: correct mshmet dependec
+|
+o changeset: 2958:cab0cb8d1f99
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 11:10:13 2014 +0100
+| summary: correct typo error
+|
+o changeset: 2957:82ad0bd4632f
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Mar 05 11:06:15 2014 +0100
+| summary: add tool to find memery leak storageused function ..
+|
+o changeset: 2956:a39fe4a9f5b6
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Mon Mar 03 23:44:35 2014 +0100
+| summary: correct memory leak in mshmet inferface
+|
+o changeset: 2955:5628f1212fad
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Sun Mar 02 21:45:36 2014 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 2954:a778070d5256
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Sun Mar 02 21:36:21 2014 +0100
+| summary: add uninstall-ff++ script freefem++
+|
+o changeset: 2953:6f5b01300095
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Sun Mar 02 21:16:32 2014 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 2952:2f5eebee8e67
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Sun Mar 02 21:12:13 2014 +0100
+| summary: correct pb in evalution jump of region number
+|
+o changeset: 2951:f1064e46586e
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Tue Feb 18 14:35:10 2014 +0100
+| summary: change error in warning in message error if missing library.
+|
+o changeset: 2950:cba75b251d6d
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 13 10:55:31 2014 +0100
+| summary: correct in 2d integral on levelset of bilinear form
+|
+o changeset: 2949:8762a49602b5
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Feb 12 18:45:43 2014 +0100
+| summary: coorect type in getall
+|
+o changeset: 2948:10d76bbc862e
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Feb 12 18:39:26 2014 +0100
+| summary: make getall with or without thread depending of pearl install
+|
+o changeset: 2947:934199f05868
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Wed Feb 12 11:26:56 2014 +0100
+| summary: rebuild AutoGeneratedFile.tar.gz
+|
+o changeset: 2946:e0c1f8669ab4
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Fri Feb 07 13:33:03 2014 +0100
+| summary: update configure param to compile
+|
+o changeset: 2945:6f9c41b5a9b1
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 06 22:38:38 2014 +0100
+| summary: coorecct readme
+|
+o changeset: 2944:af4fbbef4ecd
+| tag: 3.28
+| parent: 2937:4c7506b5ac6c
+| user: Frederic Hecht <frederic.hecht at upmc.fr>
+| date: Thu Feb 06 22:30:35 2014 +0100
+| summary: correct small bug in
+|
+| o changeset: 2943:0aa8d880b527
+| | branch: alh-dev
+| | user: Antoine Le Hyaric
+| | date: Thu Feb 06 14:42:15 2014 +0100
+| | summary: partial commit on DebianTesting64 (odyssee)
+| |
+| o changeset: 2942:6ff7e589dcaa
+| | branch: alh-dev
+| | user: Antoine Le Hyaric
+| | date: Wed Feb 05 18:01:38 2014 +0100
+| | summary: partial commit on DebianTesting64 (odyssee)
+| |
+| o changeset: 2941:93032418cfc8
+| | branch: alh-dev
+| | user: Antoine Le Hyaric
+| | date: Tue Feb 04 18:56:55 2014 +0100
+| | summary: partial commit on DebianTesting64 (odyssee)
+| |
+| o changeset: 2940:872c489a2867
+| | branch: alh-dev
+| | user: Antoine Le Hyaric
+| | date: Tue Feb 04 15:53:20 2014 +0100
+| | summary: partial commit on DebianTesting64 (odyssee)
+| |
+| o changeset: 2939:1bc50b3ba773
+| | branch: alh-dev
+| | user: Antoine Le Hyaric
+| | date: Wed Jan 29 18:17:45 2014 +0100
+| | summary: > - New script build/orgindex and file index.org to list all hyperlinks in the FF source in Emacs org-mode format
+| |
+| o changeset: 2938:e78417933ae1
+| | branch: alh-dev
+| | parent: 2935:72d03e2de866
+| | user: Antoine Le Hyaric
+| | date: Wed Jan 29 17:25:13 2014 +0100
+| | summary: partial commit on DebianTesting64 (odyssee)
+| |
+o | changeset: 2937:4c7506b5ac6c
+|\ \ tag: 3.27
+| | | parent: 2936:37691b670f5a
+| | | parent: 2885:d58dea64f3a0
+| | | user: Antoine Le Hyaric
+| | | date: Thu Feb 06 14:41:59 2014 +0100
+| | | summary: Synchronizing FH and ALH trees
+| | |
+| o | changeset: 2936:37691b670f5a
+| |\ \ parent: 2934:2cc59dc4712c
+| | | | parent: 2875:338cb00eff86
+| | | | user: Antoine Le Hyaric
+| | | | date: Tue Jan 28 16:26:27 2014 +0100
+| | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | |
+| | | o changeset: 2935:72d03e2de866
+| | | | branch: alh-dev
+| | | | parent: 2932:6dc37a6b1b61
+| | | | user: Antoine Le Hyaric
+| | | | date: Thu Jan 23 12:21:33 2014 +0100
+| | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | |
+| | o | changeset: 2934:2cc59dc4712c
+| | | | user: Antoine Le Hyaric
+| | | | date: Tue Jan 21 16:53:17 2014 +0100
+| | | | summary: partial commit on MacOS108 (athena)
+| | | |
+| | o | changeset: 2933:d0779fbd3270
+| | | | parent: 2927:05728123cfdd
+| | | | user: Antoine Le Hyaric
+| | | | date: Tue Jan 21 16:26:29 2014 +0100
+| | | | summary: partial commit on MacOS108 (athena)
+| | | |
+| | | o changeset: 2932:6dc37a6b1b61
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Thu Jan 09 14:17:02 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | | o changeset: 2931:3f84037c3f82
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Thu Jan 09 10:45:30 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | | o changeset: 2930:aef9c00fa974
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Thu Jan 09 10:42:48 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | | o changeset: 2929:109fbfe6ae46
+| | |/| branch: alh-dev
+| | | | parent: 2928:5ff83fb295b9
+| | | | parent: 2927:05728123cfdd
+| | | | user: Antoine Le Hyaric
+| | | | date: Thu Jan 09 10:37:20 2014 +0100
+| | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | |
+| | | o changeset: 2928:5ff83fb295b9
+| | | |\ branch: alh-dev
+| | | | | parent: 2902:9f9543a57c4a
+| | | | | parent: 2903:e7454fa79801
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Mon Jan 06 17:18:43 2014 +0100
+| | | | | summary: New FFCS version 14.1 using FF 3.26-3
+| | | | |
+| | o | | changeset: 2927:05728123cfdd
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Jan 08 11:49:43 2014 +0100
+| | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | |
+| | o | | changeset: 2926:6e8b8dee3c7d
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Jan 08 11:47:45 2014 +0100
+| | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | |
+| | o | | changeset: 2925:991bc3308e91
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Jan 08 11:42:40 2014 +0100
+| | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | |
+| | o | | changeset: 2924:731c6e6f7f12
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Jan 08 11:30:20 2014 +0100
+| | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | |
+| | o | | changeset: 2923:b87e6117d8e4
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Jan 08 11:28:37 2014 +0100
+| | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | |
+| | o | | changeset: 2922:d108089c7f41
+| | |\ \ \ parent: 2921:12aa8decef61
+| | | | | | parent: 2920:b025c2cf1fc0
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 11:09:37 2014 +0100
+| | | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | | |
+| | | o | | changeset: 2921:12aa8decef61
+| | | | | | parent: 2917:e54ad4c7dbb5
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 11:09:36 2014 +0100
+| | | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | | |
+| | o | | | changeset: 2920:b025c2cf1fc0
+| | |\ \ \ \ parent: 2918:44aca5b00458
+| | | | | | | parent: 2919:ad120e12b53c
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Wed Jan 08 11:08:00 2014 +0100
+| | | | | | | summary: partial commit on DebianTesting32 (buis)
+| | | | | | |
+| | | o | | | changeset: 2919:ad120e12b53c
+| | | | | | | parent: 2908:ecd21a3c9519
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Tue Jan 07 16:41:24 2014 +0100
+| | | | | | | summary: Compiling FFCS on Windows 64
+| | | | | | |
+| | o---+ | | changeset: 2918:44aca5b00458
+| | | | | | user: Antoine Le Hyaric
+| | / / / / date: Wed Jan 08 11:07:57 2014 +0100
+| | | | | | summary: partial commit on DebianTesting32 (buis)
+| | | | | |
+| | | o | | changeset: 2917:e54ad4c7dbb5
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 11:02:32 2014 +0100
+| | | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | | |
+| | | o | | changeset: 2916:9a46b1c26db3
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 11:00:32 2014 +0100
+| | | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | | |
+| | | o | | changeset: 2915:7561672695dd
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 10:59:10 2014 +0100
+| | | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | | |
+| | | o | | changeset: 2914:098107cd6199
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 10:56:56 2014 +0100
+| | | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | | |
+| | | o | | changeset: 2913:2e4fcaf138a5
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 10:52:19 2014 +0100
+| | | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | | |
+| | | o | | changeset: 2912:6916680747a7
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 10:47:23 2014 +0100
+| | | | | | summary: partial commit on Ubuntu1310-64 (ubu64)
+| | | | | |
+| | | o | | changeset: 2911:866837b2af36
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 10:36:45 2014 +0100
+| | | | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | | | |
+| | | o | | changeset: 2910:ef54830cf6ca
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jan 08 10:20:13 2014 +0100
+| | | | | | summary: Small updates for FFCS release
+| | | | | |
+| | | o | | changeset: 2909:56d37abf1f91
+| | |/ / / user: Antoine Le Hyaric
+| | | | | date: Wed Jan 08 10:00:39 2014 +0100
+| | | | | summary: Small changing for FFCS compilation on Windows
+| | | | |
+| | o | | changeset: 2908:ecd21a3c9519
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jan 07 15:05:11 2014 +0100
+| | | | | summary: Compiling FFCS on Windows 64
+| | | | |
+| | o | | changeset: 2907:1ffe24c32b72
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jan 07 12:42:39 2014 +0100
+| | | | | summary: Compiling FFCS on Windows 64
+| | | | |
+| | o | | changeset: 2906:39530b797474
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jan 07 12:34:17 2014 +0100
+| | | | | summary: Compiling FFCS on Windows 64
+| | | | |
+| | o | | changeset: 2905:f800a6ab9788
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jan 07 09:03:23 2014 +0100
+| | | | | summary: Making FF compile with FFCS on Win32
+| | | | |
+| | o---+ changeset: 2904:fcdbf0cf5077
+| | | | user: Antoine Le Hyaric
+| | / / date: Mon Jan 06 17:21:07 2014 +0100
+| | | | summary: New FFCS version 14.1 using FF 3.26-3
+| | | |
+| | | o changeset: 2903:e7454fa79801
+| | |/| parent: 2873:5ea92a62899b
+| | | | parent: 2902:9f9543a57c4a
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 17:17:08 2014 +0100
+| | | | summary: New FFCS version 14.1 using FF 3.26-3
+| | | |
+| | o | changeset: 2902:9f9543a57c4a
+| | |\| branch: alh-dev
+| | | | parent: 2901:b2c810edffc4
+| | | | parent: 2873:5ea92a62899b
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 17:00:36 2014 +0100
+| | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | |
+| | o | changeset: 2901:b2c810edffc4
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 16:59:33 2014 +0100
+| | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | |
+| | o | changeset: 2900:d174317ebdb4
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 16:52:56 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | o | changeset: 2899:fd9ac165cadb
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 15:38:04 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | o | changeset: 2898:37cc9b9aa118
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 15:28:15 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | o | changeset: 2897:7c15fa116135
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 14:53:49 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | o | changeset: 2896:138744674c16
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 14:21:11 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | o | changeset: 2895:a3105d01c462
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 12:35:35 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | o | changeset: 2894:d5934c1a6b78
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Jan 06 12:11:05 2014 +0100
+| | | | summary: partial commit on Windows (telemos)
+| | | |
+| | o | changeset: 2893:3d92537460f0
+| | |\ \ branch: alh-dev
+| | | | | parent: 2892:80c7cc90e5ed
+| | | | | parent: 2890:741de2d14d63
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Thu Dec 19 16:04:58 2013 +0100
+| | | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | | |
+| | | o | changeset: 2892:80c7cc90e5ed
+| | | | | branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Thu Dec 19 12:03:48 2013 +0100
+| | | | | summary: Incorporating changes from FH (default branch) into ALH developments (alh-dev branch)
+| | | | |
+| | | o | changeset: 2891:707584572e06
+| | | |\ \ branch: alh-dev
+| | | | | | parent: 2888:9c4bf400b221
+| | | | | | parent: 2864:b110654707d1
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Thu Dec 19 12:00:24 2013 +0100
+| | | | | | summary: Incorporating changes from FH (default branch) into ALH developments (alh-dev branch)
+| | | | | |
+| | o---+ | changeset: 2890:741de2d14d63
+| | | | | | branch: alh-dev
+| | | | | | parent: 2889:098e8bb04f23
+| | | | | | parent: 2888:9c4bf400b221
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Dec 18 17:16:03 2013 +0100
+| | | | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | | | |
+| | o | | | changeset: 2889:098e8bb04f23
+| | | | | | branch: alh-dev
+| | | | | | parent: 2887:54388cb94ac9
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Dec 04 17:53:19 2013 +0100
+| | | | | | summary: partial commit on DebianTesting64 (caen)
+| | | | | |
+| | +---o | changeset: 2888:9c4bf400b221
+| | | | / branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Dec 18 16:18:08 2013 +0100
+| | | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | | |
+| | o | | changeset: 2887:54388cb94ac9
+| | | | | branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Thu Nov 28 16:29:19 2013 +0100
+| | | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | | |
+| | o | | changeset: 2886:248f4bd285d0
+| | | | | branch: alh-dev
+| | | | | parent: 2829:4ab97def6ad1
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Nov 27 15:14:05 2013 +0100
+| | | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | | |
+o | | | | changeset: 2885:d58dea64f3a0
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Feb 05 22:18:08 2014 +0100
+| | | | | summary: add AddLayers in 3d
+| | | | |
+o | | | | changeset: 2884:5d1fa9c3c817
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Feb 05 22:01:56 2014 +0100
+| | | | | summary: correct AddLayers
+| | | | |
+o | | | | changeset: 2883:2cf6464d0761
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Feb 05 09:35:50 2014 +0100
+| | | | | summary: at init of full matrix this inverse matrix.
+| | | | |
+o | | | | changeset: 2882:d0965d6036fc
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Feb 02 20:46:22 2014 +0100
+| | | | | summary: rebuild AutoGeneratedFile.tar.gz
+| | | | |
+o | | | | changeset: 2881:4b6af956b8f8
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Feb 02 20:36:02 2014 +0100
+| | | | | summary: correct SplitMesh<R3> function in case of P1b3d display.
+| | | | |
+o | | | | changeset: 2880:11edbb125bdc
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 29 11:37:27 2014 +0100
+| | | | | summary: up AutoGeneratedFile.tar.gz
+| | | | |
+o | | | | changeset: 2879:961332cb7ed2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 29 11:36:20 2014 +0100
+| | | | | summary: correct but in splitsimplex.cpp of P1b 3d case
+| | | | |
+o | | | | changeset: 2878:87a9a56664ef
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Jan 26 21:41:07 2014 +0100
+| | | | | summary: add BuildLayer function i C++
+| | | | |
+o | | | | changeset: 2877:398ffc82c686
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Jan 24 17:38:34 2014 +0100
+| | | | | summary: ajout pour P. jolivet de
+| | | | |
+o | | | | changeset: 2876:798588c5e951
+|/ / / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 16 14:46:52 2014 +0100
+| | | | summary: add hypot c function
+| | | |
+o | | | changeset: 2875:338cb00eff86
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 09 10:45:56 2014 +0100
+| | | | summary: add remark in innovation file
+| | | |
+o-----+ changeset: 2874:7b9c53ac2372
+ | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+ / / / date: Thu Jan 09 10:44:01 2014 +0100
+| | | summary: add missing function in gsl
+| | |
+| | o changeset: 2873:5ea92a62899b
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Dec 30 22:16:52 2013 +0100
+| | | summary: carrect install windows missing files
+| | |
+| | o changeset: 2872:60ef1773b8b2
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Dec 30 22:01:47 2013 +0100
+| | | summary: correct WindowsPackage.m4
+| | |
+| | o changeset: 2871:27002ba88a46
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Dec 30 17:06:52 2013 +0100
+| | | summary: rebuild AutoGeneratedFile.tar.gz
+| | |
+| | o changeset: 2870:897793e4a7f6
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Dec 30 17:05:54 2013 +0100
+| | | summary: correct typo
+| | |
+| | o changeset: 2869:0b17a2cf1ea6
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Dec 30 17:01:27 2013 +0100
+| | | summary: coorect typo
+| | |
+| | o changeset: 2868:324f120c84cf
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Dec 30 16:56:38 2013 +0100
+| | | summary: update gsl interface with random generator
+| | |
+| | o changeset: 2867:ccccd77442c2
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Sun Dec 29 23:21:04 2013 +0100
+| | | summary: add random gsl generator
+| | |
+| | o changeset: 2866:5fc3f1298263
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Sat Dec 28 18:20:31 2013 +0100
+| | | summary: correct doc and pthread on window version
+| | |
+| | o changeset: 2865:adf0cca701c2
+| |/ user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Mon Dec 23 13:41:04 2013 +0100
+| | summary: correct mshmesh under window (no phthread lib)
+| |
+| o changeset: 2864:b110654707d1
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Mon Dec 09 21:34:15 2013 +0100
+| | summary: correct pthread with openblas
+| |
+| o changeset: 2863:3464dead1c8e
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Mon Dec 09 21:32:58 2013 +0100
+| | summary: pass to version 3.26-3
+| |
+| o changeset: 2862:067eda36460c
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Mon Dec 09 21:08:43 2013 +0100
+| | summary: correct link problem of ipopt and blas missing thread libray.
+| |
+| o changeset: 2861:9818994f3093
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Fri Dec 06 09:43:42 2013 +0100
+| | summary: correct lapack interface and simplify the test.
+| |
+| o changeset: 2860:00a25dfebd01
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Dec 04 10:14:50 2013 +0100
+| | summary: add new logo in the doc.
+| |
+| o changeset: 2859:d1e3f4891a08
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Dec 04 09:56:44 2013 +0100
+| | summary: add warning= flags adaptmesh know if the max numbre of vertiex is reach
+| |
+| o changeset: 2858:7abc92ebe5ba
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Fri Nov 29 08:49:54 2013 +0100
+| | summary: correct examples++-mpi/Laplace3d-hips.edp
+| |
+| o changeset: 2857:50d15c3910b7
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 28 15:32:42 2013 +0100
+| | summary: remove blas and lapack from WHERE-lIBRAY-download
+| |
+| o changeset: 2856:60a5720c24d4
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 28 13:11:50 2013 +0100
+| | summary: correct pb with norm
+| |
+| o changeset: 2855:b50b5a5a2336
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 28 11:15:05 2013 +0100
+| | summary: new version
+| |
+| o changeset: 2854:2b5ed56c8b59
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 28 10:59:51 2013 +0100
+| | summary: correct bug in script ff-get-dep
+| |
+| o changeset: 2853:a9464311ddea
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Fri Nov 22 11:03:29 2013 +0100
+| | summary: correct ff-get-dep.in
+| |
+| o changeset: 2852:0592cece2ae9
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Fri Nov 22 10:03:12 2013 +0100
+| | summary: coorect typo
+| |
+| o changeset: 2851:58552a27b112
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Fri Nov 22 09:57:01 2013 +0100
+| | summary: next correctioon
+| |
+| o changeset: 2850:f1f45a267a78
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Fri Nov 22 09:54:21 2013 +0100
+| | summary: coorect ff-get-dep.in of simple bash shell
+| |
+| o changeset: 2849:b13a07b5a6b5
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 21 21:31:19 2013 +0100
+| | summary: correct gnu.mak to rebuild pdf figure.
+| |
+| o changeset: 2848:4743da3cb7d6
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 21:52:07 2013 +0100
+| | summary: correct typo
+| |
+| o changeset: 2847:2fdfe47a6f56
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 21:29:22 2013 +0100
+| | summary: correct for install
+| |
+| o changeset: 2846:30a72fb6ca8e
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 20:44:56 2013 +0100
+| | summary: correct ff-c++ install
+| |
+| o changeset: 2845:12a1482c206f
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 20:38:01 2013 +0100
+| | summary: correct ff-c++ and install version
+| |
+| o changeset: 2844:67fa6ca3d5dd
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 18:22:02 2013 +0100
+| | summary: add EXTRA_DIST= path openbals
+| |
+| o changeset: 2843:07cefac0627d
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 16:21:30 2013 +0100
+| | summary: update INNOVATIO
+| |
+| o changeset: 2842:18d0a28bc820
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 16:19:19 2013 +0100
+| | summary: reome all relative path in WHERE_LIBRARY-config
+| |
+| o changeset: 2841:de838ce6aed7
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 15:58:13 2013 +0100
+| | summary: cooret PB SuperLU
+| |
+| o changeset: 2840:89928d1720be
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 20 15:24:11 2013 +0100
+| | summary: coorect pb with superlu
+| |
+| o changeset: 2839:7ed38d0c562b
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 14 07:22:12 2013 +0100
+| | summary: correct typo
+| |
+| o changeset: 2838:49fb2b403572
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 14 07:08:12 2013 +0100
+| | summary: correct pb in complex number in MPICG.cpp
+| |
+| o changeset: 2837:d705f85f99a8
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 14 06:56:09 2013 +0100
+| | summary: coorect after test on MacOS 10.9
+| |
+| o changeset: 2836:12ab7a082206
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Thu Nov 14 00:11:18 2013 +0100
+| | summary: coorect Makefile fr dist
+| |
+| o changeset: 2835:128efccbdbbe
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 13 23:39:13 2013 +0100
+| | summary: restored examples++-tutorial/Laplace.cpp
+| |
+| o changeset: 2834:12fd7a715267
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 13 23:22:25 2013 +0100
+| | summary: update AutoGeneratedFile.tar.gz
+| |
+| o changeset: 2833:3a5004ce04b1
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 13 23:15:38 2013 +0100
+| | summary: correct clean Makefile not remove pakage source.
+| |
+| o changeset: 2832:3f8bd0dc0696
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 13 19:26:39 2013 +0100
+| | summary: correct some example ???
+| |
+| o changeset: 2831:79ffacff401c
+| | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | date: Wed Nov 13 17:41:08 2013 +0100
+| | summary: pass to version 3.26
+| |
+| o changeset: 2830:769140b8b4b5
+| |\ parent: 2822:f0cf8e4172bc
+| | | parent: 2779:cf1946212db2
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Wed Nov 13 17:39:07 2013 +0100
+| | | summary: merge with ALH version, and FH version
+| | |
+o | | changeset: 2829:4ab97def6ad1
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Thu Nov 07 14:13:31 2013 +0100
+| | | summary: > - Separate download script for all third-party software [[file:download/getall]] (request from FH)
+| | |
+o | | changeset: 2828:12dd3edd272b
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Thu Oct 31 17:20:51 2013 +0100
+| | | summary: > - Separate download script for all third-party software [[file:download/getall]], request from FH
+| | |
+o | | changeset: 2827:f9e5c9cdde3c
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Tue Oct 29 09:16:31 2013 +0100
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+o | | changeset: 2826:7a9fc9218ecc
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Wed Oct 23 17:29:44 2013 +0200
+| | | summary: > - Set all hyperlinks to relative paths to make sure that they work from any location
+| | |
+o | | changeset: 2825:c213ac3c5ddd
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Wed Oct 23 15:30:46 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+o---+ changeset: 2824:80b91b59d758
+| | | branch: alh-dev
+| | | parent: 2823:ac72f4fd3cdf
+| | | parent: 2822:f0cf8e4172bc
+| | | user: Antoine Le Hyaric
+| | | date: Tue Oct 22 17:47:33 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+o | | changeset: 2823:ac72f4fd3cdf
+| | | branch: alh-dev
+| | | parent: 2821:304b9771c959
+| | | user: Antoine Le Hyaric
+| | | date: Mon Oct 21 12:14:40 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
++---o changeset: 2822:f0cf8e4172bc
+| | | parent: 2814:b788f2283f0a
+| | | parent: 2821:304b9771c959
+| | | user: Antoine Le Hyaric
+| | | date: Mon Oct 21 10:54:43 2013 +0200
+| | | summary: Keeping ALH and FH trees in sync
+| | |
+o | | changeset: 2821:304b9771c959
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Mon Oct 21 10:46:00 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+o | | changeset: 2820:f2d70674e0cf
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Thu Oct 17 11:39:56 2013 +0200
+| | | summary: > - split DOC makefiles into Makefile.am and figs.mak to suppress automake warnings about portability
+| | |
+o---+ changeset: 2819:690015709315
+| | | branch: alh-dev
+| | | parent: 2818:fd43eb5d72fd
+| | | parent: 2814:b788f2283f0a
+| | | user: Antoine Le Hyaric
+| | | date: Tue Oct 15 15:16:49 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+o | | changeset: 2818:fd43eb5d72fd
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Tue Oct 15 14:57:20 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+o | | changeset: 2817:7231ea317c6b
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Tue Oct 15 09:38:31 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+o | | changeset: 2816:c82bafbc80ed
+| | | branch: alh-dev
+| | | user: Antoine Le Hyaric
+| | | date: Mon Oct 14 15:48:32 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+o | | changeset: 2815:8ee90b830900
+| | | branch: alh-dev
+| | | parent: 2811:9fe8b47f26fe
+| | | user: Antoine Le Hyaric
+| | | date: Tue Oct 08 16:50:41 2013 +0200
+| | | summary: partial commit on DebianTesting64 (odyssee)
+| | |
+| | o changeset: 2814:b788f2283f0a
+| | | user: Antoine Le Hyaric
+| | | date: Mon Oct 14 10:33:16 2013 +0200
+| | | summary: changed FFCS Fortran MPI configuration for MPICH2
+| | |
+| | o changeset: 2813:91392dc99aa0
+| | |\ parent: 2812:e39696d2e66f
+| | | | parent: 2775:da720285cc20
+| | | | user: Antoine Le Hyaric
+| | | | date: Tue Oct 08 10:50:59 2013 +0200
+| | | | summary: Keeping ALH and FH trees in sync
+| | | |
++-----o changeset: 2812:e39696d2e66f
+| | | | parent: 2782:eb4999ba4ff4
+| | | | parent: 2811:9fe8b47f26fe
+| | | | user: Antoine Le Hyaric
+| | | | date: Tue Oct 08 10:31:31 2013 +0200
+| | | | summary: FFCS version number increased to 13.15
+| | | |
+o | | | changeset: 2811:9fe8b47f26fe
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Oct 02 16:59:53 2013 +0200
+| | | | summary: partial commit on MacOS108 (athena)
+| | | |
+o | | | changeset: 2810:1b93d130a6f3
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Oct 02 16:21:37 2013 +0200
+| | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | |
+o | | | changeset: 2809:0a1b9e514197
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Sep 30 18:09:43 2013 +0200
+| | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | |
+o | | | changeset: 2808:92b03c315566
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Sep 25 12:01:34 2013 +0200
+| | | | summary: partial commit on Ubuntu1204-64 (ubults64)
+| | | |
+o | | | changeset: 2807:c15cd2f03b68
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Sep 25 11:11:44 2013 +0200
+| | | | summary: >
+| | | |
+o | | | changeset: 2806:9c3a101331c6
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Mon Sep 23 09:59:26 2013 +0200
+| | | | summary: partial commit on DebianTesting64 (odyssee)
+| | | |
+o | | | changeset: 2805:f364768a91ad
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Thu Sep 19 11:16:44 2013 +0200
+| | | | summary: partial commit on DebianTesting64 (iliade)
+| | | |
+o | | | changeset: 2804:762acbe43ae9
+| | | | branch: alh-dev
+| | | | user: Antoine Le Hyaric
+| | | | date: Thu Sep 19 11:10:58 2013 +0200
+| | | | summary: partial commit on MacOS108 (athena)
+| | | |
+o | | | changeset: 2803:384865ca600b
+|\ \ \ \ branch: alh-dev
+| | | | | parent: 2802:180cf95c3043
+| | | | | parent: 2801:b4f662e97b98
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Thu Sep 19 11:00:21 2013 +0200
+| | | | | summary: partial commit on MacOS108 (athena)
+| | | | |
+| o | | | changeset: 2802:180cf95c3043
+| | | | | branch: alh-dev
+| | | | | parent: 2800:79c467416c58
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Thu Sep 19 11:00:19 2013 +0200
+| | | | | summary: partial commit on MacOS108 (athena)
+| | | | |
+o | | | | changeset: 2801:b4f662e97b98
+|\| | | | branch: alh-dev
+| | | | | parent: 2794:20715307bd51
+| | | | | parent: 2800:79c467416c58
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Thu Sep 19 10:59:32 2013 +0200
+| | | | | summary: partial commit on DebianTesting64 (iliade)
+| | | | |
+| o | | | changeset: 2800:79c467416c58
+| |\ \ \ \ branch: alh-dev
+| | | | | | parent: 2799:880bc2986524
+| | | | | | parent: 2793:da28c0b1be77
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Thu Sep 19 10:51:05 2013 +0200
+| | | | | | summary: partial commit on MacOS108
+| | | | | |
+| | o | | | changeset: 2799:880bc2986524
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Thu Jul 25 14:44:53 2013 +0200
+| | | | | | summary: Small fixes for MacOS 10.8 compilation
+| | | | | |
+| | o | | | changeset: 2798:318fde8763e3
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Thu Jul 25 14:31:41 2013 +0200
+| | | | | | summary: Small fixes for pastix compilation on MacOS
+| | | | | |
+| | o | | | changeset: 2797:c3e6d188dd64
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Thu Jul 25 14:22:34 2013 +0200
+| | | | | | summary: Small fixes for pastix compilation on MacOS
+| | | | | |
+| | o | | | changeset: 2796:72f90df8325c
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Thu Jul 25 14:15:58 2013 +0200
+| | | | | | summary: Small fixes for pastix compilation on MacOS
+| | | | | |
+| | o | | | changeset: 2795:b3a31b5e5e66
+| | | | | | branch: alh-dev
+| | | | | | parent: 2732:2a814f7c0f1f
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Thu Jul 25 14:06:15 2013 +0200
+| | | | | | summary: Small fixes for MacOS 10.8 compilation
+| | | | | |
+o | | | | | changeset: 2794:20715307bd51
+|/ / / / / branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Thu Sep 19 10:59:30 2013 +0200
+| | | | | summary: partial commit on DebianTesting64 (iliade)
+| | | | |
+o | | | | changeset: 2793:da28c0b1be77
+| | | | | branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Sep 18 17:10:19 2013 +0200
+| | | | | summary: partial commit on DebianTesting64
+| | | | |
+o | | | | changeset: 2792:7847a84effee
+| | | | | branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Sep 18 14:38:49 2013 +0200
+| | | | | summary: partial commit on DebianTesting64
+| | | | |
+o | | | | changeset: 2791:99ff5d7f8b98
+| | | | | branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Sep 18 14:00:35 2013 +0200
+| | | | | summary: partial commit on DebianTesting64
+| | | | |
+o | | | | changeset: 2790:3a3125233c7a
+| | | | | branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Sep 17 18:24:30 2013 +0200
+| | | | | summary: partial commit on DebianTesting64
+| | | | |
+o | | | | changeset: 2789:b4393a12fe7f
+|\ \ \ \ \ branch: alh-dev
+| | | | | | parent: 2788:d9bb255ca068
+| | | | | | parent: 2781:a0a0a2c0d990
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 17 12:33:26 2013 +0200
+| | | | | | summary: partial commit on DebianTesting64
+| | | | | |
+| o | | | | changeset: 2788:d9bb255ca068
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 17 11:52:02 2013 +0200
+| | | | | | summary: partial commit on DebianTesting64
+| | | | | |
+| o | | | | changeset: 2787:52cfe7abccc8
+| |\ \ \ \ \ branch: alh-dev
+| | | | | | | parent: 2784:f3d219682017
+| | | | | | | parent: 2786:de558ef9e916
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Mon Sep 16 15:50:13 2013 +0200
+| | | | | | | summary: partial commit on DebianTesting64
+| | | | | | |
+| | o | | | | changeset: 2786:de558ef9e916
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Mon Sep 16 15:37:42 2013 +0200
+| | | | | | | summary: partial commit on Ubuntu1304
+| | | | | | |
+| | o | | | | changeset: 2785:e60e1b072fb5
+| | |\ \ \ \ \ branch: alh-dev
+| | | | | | | | parent: 2783:af7c913fea2f
+| | | | | | | | parent: 2780:3aec73ae92a6
+| | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | date: Mon Sep 16 14:27:46 2013 +0200
+| | | | | | | | summary: Merged FF default branch into alh-dev branch
+| | | | | | | |
+| o | | | | | | changeset: 2784:f3d219682017
+| | | | | | | | branch: alh-dev
+| | | | | | | | parent: 2763:f103190738d6
+| | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | date: Mon Sep 16 15:50:11 2013 +0200
+| | | | | | | | summary: partial commit on DebianTesting64
+| | | | | | | |
+| +---o | | | | changeset: 2783:af7c913fea2f
+| | | / / / / branch: alh-dev
+| | | | | | | parent: 2763:f103190738d6
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Mon Sep 16 12:07:05 2013 +0200
+| | | | | | | summary: partial commit on DebianTesting32
+| | | | | | |
++-----------o changeset: 2782:eb4999ba4ff4
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 17 18:24:22 2013 +0200
+| | | | | | summary: Small updates for FFCS
+| | | | | |
+o---+ | | | changeset: 2781:a0a0a2c0d990
+| | | | | | parent: 2780:3aec73ae92a6
+| | | | | | parent: 2769:27971516538c
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 17 11:51:05 2013 +0200
+| | | | | | summary: Synchronizing FH and ALH source trees
+| | | | | |
+| | o | | | changeset: 2780:3aec73ae92a6
+| | | | | | parent: 2768:9f9d303a3b9d
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Thu Sep 12 12:30:48 2013 +0200
+| | | | | | summary: Ignoring .htaccess to go through the web server
+| | | | | |
+| | | | o | changeset: 2779:cf1946212db2
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Nov 13 14:37:02 2013 +0100
+| | | | | | summary: pass to version 2.55-1
+| | | | | |
+| | | | o | changeset: 2778:58380ba26f11
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Sat Nov 02 10:25:48 2013 +0100
+| | | | | | summary: coorect pb in norm and real with new version complex in c++-11
+| | | | | |
+| | | | o | changeset: 2777:737a1002ab0a
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Oct 31 21:35:57 2013 +0100
+| | | | | | summary: coorect mistake in download/ipopt/Makefile for blas
+| | | | | |
+| | | | o | changeset: 2776:a34eb2d6108b
+| | | | |/ user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Oct 31 18:41:00 2013 +0100
+| | | | | summary: do correct of MacOS 10.9 , new compiler.
+| | | | |
+| | | | o changeset: 2775:da720285cc20
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Oct 05 08:29:54 2013 +0200
+| | | | | summary: correct mistike in the problme of matrix block
+| | | | |
+| | | | o changeset: 2774:ade6693ffaf4
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Oct 03 18:18:20 2013 +0300
+| | | | | summary: correct problem in block matrix with 0 column or 0 row.
+| | | | |
+| | | | o changeset: 2773:fd3772142d0a
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Sep 26 18:59:58 2013 +0200
+| | | | | summary: add missing test
+| | | | |
+| | | | o changeset: 2772:a8cc2014376f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Sep 26 18:48:45 2013 +0200
+| | | | | summary: correct typo and add new autofiles
+| | | | |
+| | | | o changeset: 2771:a5ad7a4f543a
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Sep 26 18:38:03 2013 +0200
+| | | | | summary: correct doc and fftw3 downlaod compilation
+| | | | |
++-------o changeset: 2770:166bd70dce7c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Sep 26 17:59:26 2013 +0200
+| | | | summary: correct fftw MAkefile.am
+| | | |
+o---+ | changeset: 2769:27971516538c
+| | | | parent: 2719:7ae83b320fea
+| | | | parent: 2768:9f9d303a3b9d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 17 11:42:42 2013 +0200
+| | | | summary: update ffc version and ff++ version
+| | | |
+| | o | changeset: 2768:9f9d303a3b9d
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Sep 11 17:45:42 2013 +0200
+| | | | summary: Updates for FFCS compilation on Windows
+| | | |
+| | o | changeset: 2767:e9ae0c3079fb
+| | |\ \ parent: 2762:98437b4ebf50
+| | | | | parent: 2766:2fbbc949c081
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Sep 11 17:40:38 2013 +0200
+| | | | | summary: partial commit on DebianTesting64
+| | | | |
+| | | o | changeset: 2766:2fbbc949c081
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Sep 10 15:57:17 2013 +0200
+| | | | | summary: Updates for compiling FFCS on Ubuntu
+| | | | |
+| | | o | changeset: 2765:71a8394c29e5
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Sep 10 15:40:07 2013 +0200
+| | | | | summary: Update for compiling FFCS on Ubuntu
+| | | | |
+| | | o | changeset: 2764:55c008ede4ae
+| | | | | parent: 2759:05059715e454
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Sep 10 15:08:11 2013 +0200
+| | | | | summary: Small corrections for FFCS compilation
+| | | | |
+| o | | | changeset: 2763:f103190738d6
+| |\| | | branch: alh-dev
+| | | | | parent: 2752:df47e2e6eed5
+| | | | | parent: 2762:98437b4ebf50
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Sep 11 16:41:06 2013 +0200
+| | | | | summary: partial commit on DebianTesting64
+| | | | |
+| | o | | changeset: 2762:98437b4ebf50
+| | |\ \ \ parent: 2761:16d91a730b0c
+| | | | | | parent: 2760:6abf65bf289f
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Sep 11 10:42:57 2013 +0200
+| | | | | | summary: Updates for FFCS compilation
+| | | | | |
+| | | o | | changeset: 2761:16d91a730b0c
+| | | | | | parent: 2750:c63825bee6e0
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Sep 11 10:42:01 2013 +0200
+| | | | | | summary: Updates for FFCS compilation
+| | | | | |
+| | o---+ | changeset: 2760:6abf65bf289f
+| | | | | user: Antoine Le Hyaric
+| | / / / date: Tue Sep 10 14:19:02 2013 +0200
+| | | | | summary: Small corrections for FFCS compilation
+| | | | |
+| | | o | changeset: 2759:05059715e454
+| | | |\ \ parent: 2758:e3af440f1eb5
+| | | | | | parent: 2757:094eb2bf1ed5
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 10 14:14:04 2013 +0200
+| | | | | | summary: partial commit on Windows
+| | | | | |
+| | | | o | changeset: 2758:e3af440f1eb5
+| | | | | | parent: 2755:66c84a59ec08
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 10 14:12:50 2013 +0200
+| | | | | | summary: Small corrections for cygwin compilation
+| | | | | |
+| | | o | | changeset: 2757:094eb2bf1ed5
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 10 13:55:23 2013 +0200
+| | | | | | summary: Corrections for MacOS 10.6 compilation
+| | | | | |
+| | | o | | changeset: 2756:f6a45d5192d4
+| | | |/ / user: Antoine Le Hyaric
+| | | | | date: Tue Sep 10 13:44:49 2013 +0200
+| | | | | summary: Corrections for scotch compilation
+| | | | |
+| | | o | changeset: 2755:66c84a59ec08
+| | | |\ \ parent: 2754:9c42ed65ca44
+| | | | | | parent: 2717:c64826dc8c81
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 10 11:39:04 2013 +0200
+| | | | | | summary: Keeping ALH and FH trees in sync
+| | | | | |
+| | | | o | changeset: 2754:9c42ed65ca44
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Sep 10 11:16:50 2013 +0200
+| | | | | | summary: Corrected pastix compilation for FFCS on MacOS 10.6
+| | | | | |
+| | +---o | changeset: 2753:da3780f311e8
+| | | | / parent: 2750:c63825bee6e0
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Thu Sep 05 11:39:29 2013 +0200
+| | | | | summary: Corrected mumps-seq makefile
+| | | | |
+| o | | | changeset: 2752:df47e2e6eed5
+| | | | | branch: alh-dev
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Sep 11 10:44:26 2013 +0200
+| | | | | summary: partial commit on DebianTesting32
+| | | | |
+| o | | | changeset: 2751:40f8b19d30da
+| |\| | | branch: alh-dev
+| | | | | parent: 2749:d1afac8f61a9
+| | | | | parent: 2750:c63825bee6e0
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Sep 04 16:48:42 2013 +0200
+| | | | | summary: Merged modifs from FH into alh-dev branch
+| | | | |
+| | o | | changeset: 2750:c63825bee6e0
+| | |\ \ \ parent: 2745:e7875904c41e
+| | | | | | parent: 2710:4341df7bae13
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Sep 04 16:18:14 2013 +0200
+| | | | | | summary: Synchronizing FF and FFCS updates to the Mumps and Umfpack makefiles
+| | | | | |
+| o | | | | changeset: 2749:d1afac8f61a9
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Sep 04 15:22:24 2013 +0200
+| | | | | | summary: partial commit on DebianTesting64
+| | | | | |
+| o | | | | changeset: 2748:ef562c7d8fb7
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Sep 04 15:16:32 2013 +0200
+| | | | | | summary: partial commit on DebianTesting64
+| | | | | |
+| o | | | | changeset: 2747:698f90a62961
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Sep 04 14:48:43 2013 +0200
+| | | | | | summary: partial commit on DebianTesting64
+| | | | | |
+| o---+ | | changeset: 2746:05a30144950f
+| | | | | | branch: alh-dev
+| | | | | | parent: 2743:2e0fd3c00f4f
+| | | | | | parent: 2745:e7875904c41e
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Sep 04 14:20:02 2013 +0200
+| | | | | | summary: merged default branch back into alh-dev
+| | | | | |
+| | | o | | changeset: 2745:e7875904c41e
+| | | |\ \ \ parent: 2744:495eae88dc63
+| | | | | | | parent: 2742:36b98a7a6e7a
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Wed Sep 04 12:22:28 2013 +0200
+| | | | | | | summary: partial commit on DebianTesting64
+| | | | | | |
+| | | | o | | changeset: 2744:495eae88dc63
+| | | | | | | parent: 2708:e50fd5f8a141
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Wed Sep 04 12:19:28 2013 +0200
+| | | | | | | summary: Corrections for FFCS compilation
+| | | | | | |
+| o | | | | | changeset: 2743:2e0fd3c00f4f
+| | | | | | | branch: alh-dev
+| | | | | | | parent: 2741:64de98e105f6
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Thu Aug 01 15:17:00 2013 +0200
+| | | | | | | summary: partial commit on DebianTesting32
+| | | | | | |
+| +---o | | | changeset: 2742:36b98a7a6e7a
+| | | | | | | parent: 2729:e2707ecfe7b7
+| | | | | | | parent: 2741:64de98e105f6
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Thu Aug 01 12:34:02 2013 +0200
+| | | | | | | summary: Committing all changes for FFCS 13.14 back into FF
+| | | | | | |
+| o | | | | | changeset: 2741:64de98e105f6
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Wed Jul 31 14:13:59 2013 +0200
+| | | | | | | summary: Added configuration option --enable-hypre
+| | | | | | |
+| o | | | | | changeset: 2740:2bf0f2c8f9db
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Wed Jul 31 11:32:39 2013 +0200
+| | | | | | | summary: partial commit on DebianTesting64
+| | | | | | |
+| o | | | | | changeset: 2739:33ed198a1694
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Tue Jul 30 15:26:10 2013 +0200
+| | | | | | | summary: Added extra configuration options for metis, parmetis and nlopt
+| | | | | | |
+| o | | | | | changeset: 2738:a8c44e294d36
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Tue Jul 30 14:30:43 2013 +0200
+| | | | | | | summary: partial commit on DebianTesting64
+| | | | | | |
+| o | | | | | changeset: 2737:685af844956b
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Tue Jul 30 14:26:21 2013 +0200
+| | | | | | | summary: Parallelized download/mumps-seq compilation
+| | | | | | |
+| o | | | | | changeset: 2736:1f2cb6cd91e8
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Tue Jul 30 14:04:52 2013 +0200
+| | | | | | | summary: Parallelized MUMPS compilation
+| | | | | | |
+| o | | | | | changeset: 2735:82c740a1f338
+| |\ \ \ \ \ \ branch: alh-dev
+| | | | | | | | parent: 2733:e3d8549335c2
+| | | | | | | | parent: 2734:9e79463c9e48
+| | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | date: Mon Jul 29 18:18:26 2013 +0200
+| | | | | | | | summary: partial commit on DebianTesting32
+| | | | | | | |
+| | o---------+ changeset: 2734:9e79463c9e48
+| | | | | | | branch: alh-dev
+| | / / / / / parent: 2732:2a814f7c0f1f
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Mon Jul 29 18:15:22 2013 +0200
+| | | | | | | summary: Fixes for Win32 compilation
+| | | | | | |
+| o---------+ changeset: 2733:e3d8549335c2
+| | | | | | branch: alh-dev
+| / / / / / user: Antoine Le Hyaric
+| | | | | | date: Mon Jul 29 15:13:01 2013 +0200
+| | | | | | summary: Added configure options --with-[package]-include= and --with-[package]-ldflags=
+| | | | | |
+| | | | | o changeset: 2732:2a814f7c0f1f
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jul 24 16:08:34 2013 +0200
+| | | | | | summary: Fixed DLL compilation on Windows for MUMPS and pARMS
+| | | | | |
+| | | | | o changeset: 2731:36e1cd88de75
+| | | | | | branch: alh-dev
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jul 24 13:41:16 2013 +0200
+| | | | | | summary: Compilation fixes for Windows
+| | | | | |
+| | | | | o changeset: 2730:dca84350a248
+| | | | | | branch: alh-dev
+| | | | | | parent: 2728:577fe9901c85
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Jul 23 16:13:06 2013 +0200
+| | | | | | summary: Small fixes for FFCS release version
+| | | | | |
+| | o | | | changeset: 2729:e2707ecfe7b7
+| | |\ \ \ \ parent: 2724:54b6485a68f0
+| | | | | | | parent: 2706:4cc59f9e5863
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Thu Jul 11 14:37:27 2013 +0200
+| | | | | | | summary: Keeping FH and ALH trees in sync
+| | | | | | |
+| | | | | | o changeset: 2728:577fe9901c85
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Tue Jul 23 13:17:36 2013 +0200
+| | | | | | | summary: partial commit on Windows
+| | | | | | |
+| | | | | | o changeset: 2727:d36610b57655
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Thu Jul 11 17:22:39 2013 +0200
+| | | | | | | summary: partial commit on DebianTesting64
+| | | | | | |
+| | | | | | o changeset: 2726:edcf91fc280c
+| | | | | | | branch: alh-dev
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Thu Jul 11 15:09:44 2013 +0200
+| | | | | | | summary: partial commit on DebianTesting64
+| | | | | | |
+| | | +-----o changeset: 2725:6e0e54be960e
+| | | | | | | branch: alh-dev
+| | | | | | | parent: 2723:dc28f7873452
+| | | | | | | parent: 2724:54b6485a68f0
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Wed Jul 10 15:17:16 2013 +0200
+| | | | | | | summary: Copied updates from the default branch to the alh-dev branch
+| | | | | | |
+| | | o | | | changeset: 2724:54b6485a68f0
+| | | |\ \ \ \ parent: 2702:888a6c206637
+| | | | | | | | parent: 2675:ec7d549934f0
+| | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | date: Wed Jul 10 15:10:10 2013 +0200
+| | | | | | | | summary: Technical commit: synchronizing all HG heads from the default branch
+| | | | | | | |
+| | | | | | | o changeset: 2723:dc28f7873452
+| | | | | | | |\ branch: alh-dev
+| | | | | | | | | parent: 2699:8fc2e7e016aa
+| | | | | | | | | parent: 2722:ed19cfc9dc4a
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Wed Jul 10 15:06:06 2013 +0200
+| | | | | | | | | summary: technical commit: synchronizing draft ALH developments
+| | | | | | | | |
+| | | | | | | | o changeset: 2722:ed19cfc9dc4a
+| | | | | | | | | branch: alh-dev
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Mon Jul 01 09:43:47 2013 +0200
+| | | | | | | | | summary: partial commit on DebianTesting64
+| | | | | | | | |
+| | | | | | | | o changeset: 2721:8a5543705d99
+| | | | | | | | | branch: alh-dev
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Thu Jun 27 12:36:58 2013 +0200
+| | | | | | | | | summary: partial commit on DebianTesting64
+| | | | | | | | |
+| | | | | | | | o changeset: 2720:734e4213f762
+| | | | | | | | | branch: alh-dev
+| | | | | | | | | parent: 2700:4682570a0e2f
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Wed Jun 26 15:41:34 2013 +0200
+| | | | | | | | | summary: Created branch alh-dev for draft ALH developments
+| | | | | | | | |
+o | | | | | | | | changeset: 2719:7ae83b320fea
+| | | | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | | | date: Fri Sep 06 15:34:49 2013 +0200
+| | | | | | | | | summary: coorect mistake in parmetis install files .
+| | | | | | | | |
+o-----------+ | | changeset: 2718:35d438d9bcb2
+ | | | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+ / / / / / / / / date: Fri Sep 06 10:59:36 2013 +0200
+| | | | | | | | summary: coorect for compilation with OpenBlas and a Window versio of sleep.
+| | | | | | | |
+| | | | | o | | changeset: 2717:c64826dc8c81
+| | | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | | date: Thu Sep 05 15:26:31 2013 +0200
+| | | | | | | | summary: add cote in -T MPIDIR
+| | | | | | | |
+| | | | | o | | changeset: 2716:2597949bf544
+| | | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | | date: Thu Sep 05 14:57:31 2013 +0200
+| | | | | | | | summary: correct wget problme in pastis and superludist Makefile
+| | | | | | | |
+| | | | | o | | changeset: 2715:306e42af8aca
+| | | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | | date: Thu Sep 05 10:58:44 2013 +0200
+| | | | | | | | summary: correct typo
+| | | | | | | |
+| | | | | o | | changeset: 2714:2dca3a0b91a8
+| | | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | | date: Thu Sep 05 10:23:15 2013 +0200
+| | | | | | | | summary: correct pb of make stop if no arpack..
+| | | | | | | |
+| | | | | o | | changeset: 2713:8b9576d7d540
+| | | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | | date: Thu Sep 05 09:55:51 2013 +0200
+| | | | | | | | summary: correct problem on skip mpi example in some case
+| | | | | | | |
+| | | | | o | | changeset: 2712:524802dba437
+| | | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | | date: Thu Sep 05 06:28:03 2013 +0200
+| | | | | | | | summary: rebuild AutoGeneratedFile.tar.gz
+| | | | | | | |
++---------o | | changeset: 2711:71a6c203d688
+| | | | | / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Thu Sep 05 06:27:19 2013 +0200
+| | | | | | | summary: correct problem of stop compilation of load example
+| | | | | | |
+o | | | | | | changeset: 2710:4341df7bae13
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Wed Sep 04 15:35:34 2013 +0200
+| | | | | | | summary: correct pb in mpi test remove graphic
+| | | | | | |
+o-------+ | | changeset: 2709:45813df0888a
+ | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+ / / / / / / date: Wed Sep 04 13:31:56 2013 +0200
+| | | | | | summary: add tools to build le list of AutoGeneratedFile.tar.gz
+| | | | | |
+| | | o | | changeset: 2708:e50fd5f8a141
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Tue Aug 27 14:28:25 2013 +0200
+| | | | | | summary: summer correction.
+| | | | | |
++-----o | | changeset: 2707:17f80351763f
+| | | / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Aug 17 22:39:03 2013 +0200
+| | | | | summary: add patch of holiday scotch dolaod with curl; an pb in a*[b,c,d,..]' with complex value
+| | | | |
+o | | | | changeset: 2706:4cc59f9e5863
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jul 11 12:51:07 2013 +0200
+| | | | | summary: add comment for compile
+| | | | |
+o | | | | changeset: 2705:c435a4165181
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jul 11 11:58:27 2013 +0200
+| | | | | summary: correct mmg3d
+| | | | |
+o | | | | changeset: 2704:3bcad8cbbcbe
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jul 10 22:20:05 2013 +0200
+| | | | | summary: correct pb in save make the point is not in tet
+| | | | |
+o---+ | | changeset: 2703:8a3547f7290a
+| | | | | parent: 2702:888a6c206637
+|/ / / / parent: 2675:ec7d549934f0
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jul 10 15:17:49 2013 +0200
+| | | | summary: restore skipcommet example
+| | | |
+| o | | changeset: 2702:888a6c206637
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jul 10 14:44:03 2013 +0200
+| | | | summary: pass to version 3.25 merge ff++ of ALH and FH
+| | | |
+| o---+ changeset: 2701:dd21194cb9f6
+| | | | parent: 2700:4682570a0e2f
+| | | | parent: 2674:7bb139d17bea
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Jul 10 10:04:05 2013 +0200
+| | | | summary: Keeping FH and ALH trees in sync
+| | | |
+| | | o changeset: 2700:4682570a0e2f
+| | | |\ parent: 2697:da86b515293e
+| | | | | parent: 2698:62df716c1320
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Jun 26 15:37:52 2013 +0200
+| | | | | summary: Transferred all FreeFem++ patches from the FreeFem++-cs source tree to the FreeFem++ source tree
+| | | | |
+| | o---+ changeset: 2699:8fc2e7e016aa
+| | | | branch: alh-dev
+| | / / user: Antoine Le Hyaric
+| | | | date: Wed Jun 26 14:52:09 2013 +0200
+| | | | summary: Created branch alh-dev for draft ALH developments
+| | | |
+| | | o changeset: 2698:62df716c1320
+| | | | parent: 2696:791401576c4d
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Jun 26 12:08:39 2013 +0200
+| | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | |
+| | o | changeset: 2697:da86b515293e
+| | |\ \ parent: 2688:3eab88cf4024
+| | | | | parent: 2663:e0d9c72558a1
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jun 25 15:39:07 2013 +0200
+| | | | | summary: Keeping FH and ALH trees in sync
+| | | | |
+| | | | o changeset: 2696:791401576c4d
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Jun 26 11:44:47 2013 +0200
+| | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | |
+| | | | o changeset: 2695:3151480a64b7
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jun 25 15:50:08 2013 +0200
+| | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | |
+| | +---o changeset: 2694:87b46e1b6393
+| | | | | parent: 2693:86ea3e4a8851
+| | | | | parent: 2663:e0d9c72558a1
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jun 25 15:46:25 2013 +0200
+| | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | |
+| | | | o changeset: 2693:86ea3e4a8851
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jun 25 14:49:33 2013 +0200
+| | | | | summary: transferred all patches from the FFCS development tree
+| | | | |
+| | | | o changeset: 2692:97a9606a653d
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Wed Jun 12 17:50:17 2013 +0200
+| | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | |
+| | | | o changeset: 2691:419cee6966bc
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jun 11 18:00:21 2013 +0200
+| | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | |
+| | | | o changeset: 2690:8abb5d66e20f
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jun 11 13:43:22 2013 +0200
+| | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | |
+| | | | o changeset: 2689:3e931c8973b9
+| | | |/| parent: 2687:aa013525fb7e
+| | | | | parent: 2688:3eab88cf4024
+| | | | | user: Antoine Le Hyaric
+| | | | | date: Tue Jun 11 11:20:43 2013 +0200
+| | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | |
+| | | o | changeset: 2688:3eab88cf4024
+| | | |\ \ parent: 2686:4fc31e72cdd0
+| | | | | | parent: 2662:71cafe9dab38
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Tue Jun 11 10:36:23 2013 +0200
+| | | | | | summary: Keeping FH and ALH trees in sync
+| | | | | |
+| | | | | o changeset: 2687:aa013525fb7e
+| | | | |/| parent: 2681:46dd9851ed4d
+| | | | | | parent: 2686:4fc31e72cdd0
+| | | | | | user: Antoine Le Hyaric
+| | | | | | date: Wed Jun 05 16:43:59 2013 +0200
+| | | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | | |
+| | | | o | changeset: 2686:4fc31e72cdd0
+| | | | |\ \ parent: 2685:767efda6e451
+| | | | | | | parent: 2308:f01c1ce34eb3
+| | | | | | | user: Antoine Le Hyaric
+| | | | | | | date: Wed Jun 05 11:19:30 2013 +0200
+| | | | | | | summary: Discarded obsolete head f01c1ce34eb3 (but kept that version in the repository)
+| | | | | | |
+| | | | | o | changeset: 2685:767efda6e451
+| | | | | |\ \ parent: 2684:6b6c8aad96ac
+| | | | | | | | parent: 2101:31c99c85707b
+| | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | date: Wed Jun 05 11:18:45 2013 +0200
+| | | | | | | | summary: Discarded obsolete head 31c99c85707b (but kept that version in the repository)
+| | | | | | | |
+| | | | | | o | changeset: 2684:6b6c8aad96ac
+| | | | | | |\ \ parent: 2683:cb8d4ecbfa92
+| | | | | | | | | parent: 2054:f3cbf7394995
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Wed Jun 05 11:18:16 2013 +0200
+| | | | | | | | | summary: Discarded obsolete head f3cbf7394995 (but kept that version in the repository)
+| | | | | | | | |
+| | | | | | | o | changeset: 2683:cb8d4ecbfa92
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Tue Jun 04 14:36:00 2013 +0200
+| | | | | | | | | summary: Created Doxygen main page and started to document the C++ classes
+| | | | | | | | |
+| | | | | | | o | changeset: 2682:fcd1643fef04
+| | | | | | | | | parent: 2656:77e6f87bfdbf
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Tue Jun 04 14:34:07 2013 +0200
+| | | | | | | | | summary: Created Doxygen main page and started to document the C++ classes
+| | | | | | | | |
+| | | | | | | | o changeset: 2681:46dd9851ed4d
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Wed Jun 05 16:30:09 2013 +0200
+| | | | | | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | | | | | |
+| | | | | | | | o changeset: 2680:2c62f82b7cf1
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Wed Jun 05 08:55:53 2013 +0200
+| | | | | | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | | | | | |
+| | | | | | | | o changeset: 2679:7efba1855838
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Tue Jun 04 18:02:11 2013 +0200
+| | | | | | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | | | | | |
+| | | | | | | | o changeset: 2678:684ae36c47ca
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Tue Jun 04 14:34:01 2013 +0200
+| | | | | | | | | summary: commit for fflibexport
+| | | | | | | | |
+| | | | | | | | o changeset: 2677:be137189177e
+| | | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | | date: Mon Jun 03 17:29:56 2013 +0200
+| | | | | | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | | | | | |
+| | | | | | | | o changeset: 2676:056116d8b9a9
+| | | | | | | |/ parent: 2656:77e6f87bfdbf
+| | | | | | | | user: Antoine Le Hyaric
+| | | | | | | | date: Mon Jun 03 16:53:15 2013 +0200
+| | | | | | | | summary: Modified by Antoine Le Hyaric on DebianTesting64 (machine odyssee)
+| | | | | | | |
+o | | | | | | | changeset: 2675:ec7d549934f0
+|/ / / / / / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Wed Jul 10 10:23:15 2013 +0200
+| | | | | | | summary: add skipcomment in readmesh.edp example
+| | | | | | |
+o | | | | | | changeset: 2674:7bb139d17bea
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Thu Jul 04 18:04:37 2013 +0200
+| | | | | | | summary: put code of index and rindex missing in win32
+| | | | | | |
+o | | | | | | changeset: 2673:93b7627f23fd
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Tue Jul 02 22:44:56 2013 +0300
+| | | | | | | summary: missing xfial Poisson3d.edp
+| | | | | | |
+o | | | | | | changeset: 2672:ad18e7b807c6
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Tue Jul 02 22:43:32 2013 +0300
+| | | | | | | summary: autoreconf
+| | | | | | |
+o | | | | | | changeset: 2671:67a063a1a524
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Tue Jul 02 22:42:53 2013 +0300
+| | | | | | | summary: add xfail test in not tetgen
+| | | | | | |
+o | | | | | | changeset: 2670:bc88752878d2
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Tue Jul 02 22:39:08 2013 +0300
+| | | | | | | summary: autoreconf
+| | | | | | |
+o | | | | | | changeset: 2669:e7e5b1846361
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Tue Jul 02 22:38:23 2013 +0300
+| | | | | | | summary: update list of xfail example
+| | | | | | |
+o | | | | | | changeset: 2668:11b43f1fdbfc
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Thu Jun 27 20:40:53 2013 +0200
+| | | | | | | summary: correct test-driver-ff to set XFAIL (to can fail no sure fail)
+| | | | | | |
+o | | | | | | changeset: 2667:2cdabbc53b17
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Thu Jun 27 20:11:08 2013 +0200
+| | | | | | | summary: correct typo in XFAIL_TESTS automake variable
+| | | | | | |
+o | | | | | | changeset: 2666:d11989c6ff07
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Thu Jun 27 19:55:11 2013 +0200
+| | | | | | | summary: add in pref missing include dir
+| | | | | | |
+o | | | | | | changeset: 2665:b4b2ddd8100f
+| | | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | | date: Thu Jun 27 19:37:44 2013 +0200
+| | | | | | | summary: add the creation of freefem++.pref file in all directory example
+| | | | | | |
+o | | | | | | changeset: 2664:4575cdbc939c
+|/ / / / / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 27 13:17:13 2013 +0200
+| | | | | | summary: coorect missing creation of freefem++.pref file
+| | | | | |
+o | | | | | changeset: 2663:e0d9c72558a1
+|/ / / / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jun 11 21:40:05 2013 +0200
+| | | | | summary: add parameter in ffglut program like -g 1000x500+100+100 -t toto
+| | | | |
+o | | | | changeset: 2662:71cafe9dab38
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Jun 10 20:48:03 2013 +0200
+| | | | | summary: correct pb of auto size of 3d plot
+| | | | |
+o | | | | changeset: 2661:49e7d0ef36a7
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Jun 10 14:15:44 2013 +0200
+| | | | | summary: add -wait "0.1" of ffglut (=> no manuel wait)
+| | | | |
+o | | | | changeset: 2660:4c22c41a9f85
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Jun 09 18:21:51 2013 +0200
+| | | | | summary: correct typo llevelset.edp ->intlevelset.edp
+| | | | |
+o | | | | changeset: 2659:6e4d9f511a3c
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Jun 09 17:16:41 2013 +0200
+| | | | | summary: put correction of Lorenzo.
+| | | | |
+o | | | | changeset: 2658:5f7becf9dbd3
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Jun 07 16:11:08 2013 +0200
+| | | | | summary: add test of pb ?: operator with div / 0.
+| | | | |
+o-------+ changeset: 2657:9641b54129e2
+ | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+ / / / / date: Thu Jun 06 20:57:44 2013 +0200
+| | | | summary: change default solver in bilap.edo example
+| | | |
+| | | o changeset: 2656:77e6f87bfdbf
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Jun 01 10:11:30 2013 +0200
+| | | | summary: correct test test "${SKIP:-no}"
+| | | |
+| | | o changeset: 2655:3b374e87a5a7
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Jun 01 09:52:31 2013 +0200
+| | | | summary: correct TESTing of freefem++
+| | | |
+| | | o changeset: 2654:d9460e4552e0
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri May 31 22:44:45 2013 +0200
+| | | | summary: update automake test of freefem++
+| | | |
+| | | o changeset: 2653:e65c6ce6f363
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed May 29 12:18:37 2013 +0200
+| | | | summary: remove \r in patch file
+| | | |
+| | | o changeset: 2652:379e79e6761b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed May 29 11:48:45 2013 +0200
+| | | | summary: add ff-mpirun on windows distrib.
+| | | |
+| | | o changeset: 2651:a33d824b6777
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed May 29 10:03:44 2013 +0200
+| | | | summary: add quote for windows
+| | | |
+| | | o changeset: 2650:fdbc1f7fc3c6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue May 28 18:59:32 2013 +0200
+| | | | summary: correct typo in doc on operator .*+ and ./=
+| | | |
+| | | o changeset: 2649:9ef12351b744
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 13 21:20:19 2013 +0200
+| | | | summary: correct CheckAll
+| | | |
+| | | o changeset: 2648:e1207c606f45
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 13 21:05:18 2013 +0200
+| | | | summary: correct CheckAll
+| | | |
+| | | o changeset: 2647:1e153d9d7218
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 13 20:55:40 2013 +0200
+| | | | summary: correct getline or \r\n files
+| | | |
+| | | o changeset: 2646:ccdea38daf14
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 06 22:03:44 2013 +0200
+| | | | summary: correct configure.ac for umfpack downlad
+| | | |
+| | | o changeset: 2645:13f113c861c0
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 06 20:42:41 2013 +0200
+| | | | summary: correct pb of compile umfpack if no --enable-download flags
+| | | |
+| | | o changeset: 2644:d68cb17545dc
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 06 20:28:13 2013 +0200
+| | | | summary: correct typo in CheckAll to store result
+| | | |
+| | | o changeset: 2643:f7669c7a10ee
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri May 03 15:10:42 2013 +0200
+| | | | summary: remove dir in Makefile.am glx, std, x11
+| | | |
+| | | o changeset: 2642:134644b820a8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri May 03 12:49:02 2013 +0200
+| | | | summary: version 3.23
+| | | |
+| | | o changeset: 2641:36132ac7c1c1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Apr 27 11:36:36 2013 +0200
+| | | | summary: reomve x11, glx, ... off the compilation prosess
+| | | |
+| | | o changeset: 2640:4628a7908b73
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 19 15:38:16 2013 +0200
+| | | | summary: coorect type in isoline functio,n Area to compute the area of
+| | | |
+| | | o changeset: 2639:d459cc808f30
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 18 20:45:09 2013 +0200
+| | | | summary: change area to Area because area is not a function.
+| | | |
+| | | o changeset: 2638:f70cee1b6a7b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 18 19:02:42 2013 +0200
+| | | | summary: add area of isoline domaine
+| | | |
+| | | o changeset: 2637:af2fae66daf5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 18 18:43:09 2013 +0200
+| | | | summary: coorect bug in close isoline plugin
+| | | |
+| | | o changeset: 2636:ef891424f88b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 18 16:47:38 2013 +0200
+| | | | summary: add Sylvain dans le auteur de FreeFem++
+| | | |
+| | | o changeset: 2635:ca6bcf9490a4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 12 10:18:57 2013 +0200
+| | | | summary: remove graphics in case of -nw flags for batch test
+| | | |
+| | | o changeset: 2634:895803f79633
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 12 09:42:12 2013 +0200
+| | | | summary: correct typo
+| | | |
+| | | o changeset: 2633:9f74073f0c38
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 12 09:39:02 2013 +0200
+| | | | summary: up ./CheckAll of win32
+| | | |
+| | | o changeset: 2632:35d4982c7d87
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 11 10:14:24 2013 +0200
+| | | | summary: add patch of freebsd on mshmet
+| | | |
+| | | o changeset: 2631:88e6ad0b5eae
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Apr 09 08:14:58 2013 +0200
+| | | | summary: cadd message is case of no compile in configure
+| | | |
+| | | o changeset: 2630:b7c3c4a72d2d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Apr 08 23:20:18 2013 +0200
+| | | | summary: try to put error when mesh is un set .
+| | | |
+| | | o changeset: 2629:42e29538cbf1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Apr 08 22:05:45 2013 +0200
+| | | | summary: do gestion on non mesh (0 pointeur)
+| | | |
+| | | o changeset: 2628:bc0e94fb0c28
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Apr 08 20:54:46 2013 +0200
+| | | | summary: add tools to remove interla faces
+| | | |
+| | | o changeset: 2627:19af33493619
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Apr 08 18:01:17 2013 +0200
+| | | | summary: coormit glumesh in 2d of no mesh (ok)
+| | | |
+| | | o changeset: 2626:865b4afb98eb
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Apr 03 21:50:43 2013 +0200
+| | | | summary: update ffglut
+| | | |
+| | | o changeset: 2625:21078f2bcf45
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Apr 03 09:16:57 2013 +0200
+| | | | summary: reput esc in ffglut to stop
+| | | |
+| | | o changeset: 2624:6ee46703380b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Apr 02 11:28:02 2013 +0200
+| | | | summary: coorect stop ffglut in case of bug
+| | | |
+| | | o changeset: 2623:6b417f8e333b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 29 08:59:00 2013 +0100
+| | | | summary: coorect the doc for new graphic option
+| | | |
+| | | o changeset: 2622:d7215ddbcf5a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 28 23:46:05 2013 +0100
+| | | | summary: add new graphic event and multy windows
+| | | |
+| | | o changeset: 2621:8e54a67d70fe
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 28 22:09:35 2013 +0100
+| | | | summary: pass to v 3.22
+| | | |
+| | | o changeset: 2620:7a4a75730418
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 28 21:26:08 2013 +0100
+| | | | summary: update plot for multy windows
+| | | |
+| | | o changeset: 2619:eb24ff98d1d1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Mar 26 23:41:03 2013 +0100
+| | | | summary: solve b off int overflow in gibbs renumbering
+| | | |
+| | | o changeset: 2618:c2fce2359ce2
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Mar 25 16:21:52 2013 +0100
+| | | | summary: add type of real , int , complex in doc
+| | | |
+| | | o changeset: 2617:915914787d79
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 22 23:24:47 2013 +0100
+| | | | summary: correct sheel plug for windows
+| | | |
+| | | o changeset: 2616:2bc25eab7305
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 22 22:25:49 2013 +0100
+| | | | summary: cooret shell for windows
+| | | |
+| | | o changeset: 2615:e4965faa0d98
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 22 21:55:43 2013 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2614:eb0e30cf59c6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 22 21:27:43 2013 +0100
+| | | | summary: correct Makefile for cleanning
+| | | |
+| | | o changeset: 2613:ff917977e3ac
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 22 10:23:58 2013 +0100
+| | | | summary: add getenv in shell plugin
+| | | |
+| | | o changeset: 2612:2411bba1d923
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 16:37:31 2013 +0100
+| | | | summary: end for pardiso on hpc1
+| | | |
+| | | o changeset: 2611:a33781429270
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 16:12:29 2013 +0100
+| | | | summary: next PARDISO mkl hpc1
+| | | |
+| | | o changeset: 2610:e2b27fa668bd
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 15:55:35 2013 +0100
+| | | | summary: blas / mlk hpc1 pb ..
+| | | |
+| | | o changeset: 2609:ddb3de28b4b9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 15:41:14 2013 +0100
+| | | | summary: next step mkl
+| | | |
+| | | o changeset: 2608:b4a043b50359
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 15:31:14 2013 +0100
+| | | | summary: mkl next step ..
+| | | |
+| | | o changeset: 2607:988959bff8b8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 14:21:30 2013 +0100
+| | | | summary: MAJ mlk
+| | | |
+| | | o changeset: 2606:38b95806d70a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 12:02:32 2013 +0100
+| | | | summary: correct mkl seach in autoconf ...
+| | | |
+| | | o changeset: 2605:f742f2600c99
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 10:37:50 2013 +0100
+| | | | summary: add depend mkl to paridiso
+| | | |
+| | | o changeset: 2604:8100a6d971e7
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 10:31:34 2013 +0100
+| | | | summary: REMOVE Mpi from PARDISO
+| | | |
+| | | o changeset: 2603:31e73a49d8f3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 21 09:21:12 2013 +0100
+| | | | summary: correct 3d trunc . and type in CheckPtr
+| | | |
+| | | o changeset: 2602:b0783e4cb2d3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Mar 19 09:02:13 2013 +0100
+| | | | summary: correct pb in gestion of outside flag in case of brute force search of tet contening a point
+| | | |
+| | | o changeset: 2601:090c847ad8c8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 15 18:37:05 2013 +0100
+| | | | summary: coorect typo
+| | | |
+| | | o changeset: 2600:3c995bdf4b50
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 15 16:51:31 2013 +0100
+| | | | summary: v 3.21-1 autoreconf.
+| | | |
+| | | o changeset: 2599:71cd2d5a350f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 15 16:50:34 2013 +0100
+| | | | summary: passe to versioon 3.21-1
+| | | |
+| | | o changeset: 2598:3f9a6c79377a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Mar 05 21:03:03 2013 +0100
+| | | | summary: correct timer for umfpack
+| | | |
+| | | o changeset: 2597:206af6393108
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 20 22:02:06 2013 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2596:8a575742fc6f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 20 21:57:57 2013 +0100
+| | | | summary: change umpack to no version
+| | | |
+| | | o changeset: 2595:9af00b7818c1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Feb 14 08:11:01 2013 -0600
+| | | | summary: coorect ref value of fluidstruct examples
+| | | |
+| | | o changeset: 2594:43b25e32651f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 13 23:13:04 2013 -0600
+| | | | summary: add n, resize of arry of finite element function ...
+| | | |
+| | | o changeset: 2593:54f4ad3d3362
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Feb 12 18:14:19 2013 -0600
+| | | | summary: correct doc for NSUzawaCahouetChabart.edp
+| | | |
+| | | o changeset: 2592:aac1b5aec871
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Feb 04 08:19:25 2013 -0600
+| | | | summary: up. INNOCATION
+| | | |
+| | | o changeset: 2591:f14702ce2e6d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Feb 04 08:18:36 2013 -0600
+| | | | summary: correct typo
+| | | |
+| | | o changeset: 2590:7a3472e50c69
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Jan 28 14:20:28 2013 +0100
+| | | | summary: remove export MACOSX_DEPLOYMENT_TARGET=10.4 on macos (too old stuff)
+| | | |
+| | | o changeset: 2589:a959a31a2912
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Jan 28 09:39:30 2013 +0100
+| | | | summary: coorect in change function the flabel tools.
+| | | |
+| | | o changeset: 2588:f53ea48bdac4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 24 18:23:48 2013 +0100
+| | | | summary: rm bad file
+| | | |
+| | | o changeset: 2587:b1b23c7916a3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jan 23 16:25:01 2013 +0100
+| | | | summary: coorect missing build of quadtree in gmesh 2d case
+| | | |
+| | | o changeset: 2586:dbd8bda95c9c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Jan 21 18:28:55 2013 +0100
+| | | | summary: correct ff-mpirun to make local launch in some cas
+| | | |
+| | | o changeset: 2585:232b71bc7c24
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Jan 20 20:55:49 2013 +0100
+| | | | summary: pass to version 3.20-3
+| | | |
+| | | o changeset: 2584:36c600f16fc4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Jan 18 21:57:09 2013 +0100
+| | | | summary: correct the new mmg3d4
+| | | |
+| | | o changeset: 2583:fc1d1f80a3de
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Jan 15 10:09:22 2013 +0100
+| | | | summary: clean scalapack makefile
+| | | |
+| | | o changeset: 2582:b1d5e28701fc
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Jan 15 09:38:04 2013 +0100
+| | | | summary: coorect scalapack lib without extern blacs add .oo file in lib
+| | | |
+| | | o changeset: 2581:f7c9c3f0e753
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 10 11:26:13 2013 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2580:ff72eeaffa02
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 10 10:59:53 2013 +0100
+| | | | summary: reomve blacs lib now include in scalapack.
+| | | |
+| | | o changeset: 2579:8f891641d4e6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 10 10:50:52 2013 +0100
+| | | | summary: add blacs in scalapack lib .
+| | | |
+| | | o changeset: 2578:3e68b323cae8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 10 10:45:12 2013 +0100
+| | | | summary: correct type in scalapack
+| | | |
+| | | o changeset: 2577:2ebfff8d40ea
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 10 10:41:32 2013 +0100
+| | | | summary: coorect -FPIC compile falgs in scalapack 2.02
+| | | |
+| | | o changeset: 2576:1e1b16af7ef3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Jan 08 15:32:18 2013 +0100
+| | | | summary: correct DOC freefem++ notepad++ launch freefem++ with lauchff++
+| | | |
+| | | o changeset: 2575:45ef0341b9de
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Dec 21 17:04:13 2012 +0100
+| | | | summary: correct def on WGET in scalapack MAKEFILE
+| | | |
+| | | o changeset: 2574:43e587d524f2
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Dec 21 10:05:53 2012 +0100
+| | | | summary: coorect typo
+| | | |
+| | | o changeset: 2573:706b1fb04002
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Dec 06 22:50:24 2012 +0100
+| | | | summary: update pipe.cpp interface add
+| | | |
+| | | o changeset: 2572:75958d95b25a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Nov 29 17:50:38 2012 +0100
+| | | | summary: move PARDISO to example++-load ( not MPI program)
+| | | |
+| | | o changeset: 2571:22c5533569ad
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Nov 29 17:38:03 2012 +0100
+| | | | summary: remove old version ...
+| | | |
+| | | o changeset: 2570:a3e882fd71c3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Nov 29 14:45:38 2012 +0100
+| | | | summary: PASS PARDISO to complex (not test ..)
+| | | |
+| | | o changeset: 2569:e916e4a8e005
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Nov 29 11:51:21 2012 +0100
+| | | | summary: Coorect SetDefaultSolver in all case (now in main)
+| | | |
+| | | o changeset: 2568:73fcad054f91
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Nov 29 10:29:35 2012 +0100
+| | | | summary: update MUMPS mpi complex version
+| | | |
+| | | o changeset: 2567:85a427c2f918
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 28 23:20:46 2012 +0100
+| | | | summary: put compex in MUMPS in progress
+| | | |
+| | | o changeset: 2566:1beb3cf38e1d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 28 22:19:39 2012 +0100
+| | | | summary: add compile MUMPS and PARDISO
+| | | |
+| | | o changeset: 2565:ade7d8e2fd80
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 28 22:16:47 2012 +0100
+| | | | summary: coorect MUMPS.cpp
+| | | |
+| | | o changeset: 2564:820d39a3c8cf
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 28 22:11:16 2012 +0100
+| | | | summary: correct metis Makefile
+| | | |
+| | | o changeset: 2563:284eaf041a4b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 28 21:28:36 2012 +0100
+| | | | summary: type erreur missing Makefile code for camd
+| | | |
+| | | o changeset: 2562:b54f279c8c97
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 28 21:22:21 2012 +0100
+| | | | summary: add new matrix solver interface (see P. Jolivet)
+| | | |
+| | | o changeset: 2561:c9eae98ad5dc
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Nov 02 22:59:13 2012 +0100
+| | | | summary: coorect missing setting nuTriangle
+| | | |
+| | | o changeset: 2560:2eaedd8688ce
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Nov 02 22:36:18 2012 +0100
+| | | | summary: coorect missing of set nuTriangle some time
+| | | |
+| | | o changeset: 2559:ee9c67a82a1d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 30 18:25:43 2012 +0100
+| | | | summary: correct mistak in mmg3d Makefile
+| | | |
+| | | o changeset: 2558:e0792728a848
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 26 16:10:48 2012 +0200
+| | | | summary: coorect change of intallfaces integral
+| | | |
+| | | o changeset: 2557:a134cc81aaf2
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 25 10:03:41 2012 +0200
+| | | | summary: remove const in cblas interface sdot mistake in openblas
+| | | |
+| | | o changeset: 2556:dc973b75b634
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 25 08:04:52 2012 +0200
+| | | | summary: coorect PB with OpenBlas cblas include without const in parameter
+| | | |
+| | | o changeset: 2555:6fa9b9c59829
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 16 17:31:25 2012 +0200
+| | | | summary: add missing compile files
+| | | |
+| | | o changeset: 2554:43560825cafe
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 10 15:21:51 2012 +0200
+| | | | summary: correct pipe.edp example to run under windows.
+| | | |
+| | | o changeset: 2553:395f577c1a69
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Oct 08 11:53:33 2012 +0900
+| | | | summary: add pipe plugin to link with other soft
+| | | |
+| | | o changeset: 2552:db4af2db147e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Oct 07 14:11:44 2012 +0900
+| | | | summary: do small coorection of windows
+| | | |
+| | | o changeset: 2551:d32ffb11bec9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Oct 07 11:18:26 2012 +0900
+| | | | summary: coorect pb to set C io under winder
+| | | |
+| | | o changeset: 2550:f3986a910f80
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Oct 06 22:34:10 2012 +0900
+| | | | summary: type
+| | | |
+| | | o changeset: 2549:f6229d0989bb
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Oct 06 22:30:02 2012 +0900
+| | | | summary: correct mumps compilation
+| | | |
+| | | o changeset: 2548:a1910dbcf7f9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Oct 06 11:50:54 2012 +0900
+| | | | summary: correct pb of segflaut on window atexit when creating the log file
+| | | |
+| | | o changeset: 2547:1626cbdfe5d6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Oct 06 10:51:50 2012 +0900
+| | | | summary: coorect typo
+| | | |
+| | | o changeset: 2546:7a7fba157b77
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Oct 06 10:50:08 2012 +0900
+| | | | summary: add option to remove console output on windows
+| | | |
+| | | o changeset: 2545:b192e8d7cbd3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Oct 06 10:29:16 2012 +0900
+| | | | summary: correct thing of windows porting
+| | | |
+| | | o changeset: 2544:1b485471f601
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 04 16:13:47 2012 +0200
+| | | | summary: coorect pb compile windows
+| | | |
+| | | o changeset: 2543:b0e5ed55fcb8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 03 18:34:29 2012 +0200
+| | | | summary: correct mmg3d with new version
+| | | |
+| | | o changeset: 2542:a2661dc3cf87
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 03 15:01:12 2012 +0200
+| | | | summary: correct pb with drawbdmesh ( not compile now),
+| | | |
+| | | o changeset: 2541:5540ca108c29
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 03 14:38:28 2012 +0200
+| | | | summary: add find root of real poly in gsl plugin
+| | | |
+| | | o changeset: 2540:7fcb20950af8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 26 15:31:46 2012 +0200
+| | | | summary: remove drawbdmesh on windows
+| | | |
+| | | o changeset: 2539:3646196ba7b4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 25 13:16:23 2012 +0200
+| | | | summary: A left scalar mul with formal arry.
+| | | |
+| | | o changeset: 2538:004c3ce519db
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Sep 21 14:52:11 2012 +0200
+| | | | summary: try a build 3.20 version
+| | | |
+| | | o changeset: 2537:4ea423174745
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Sep 21 11:37:23 2012 +0200
+| | | | summary: add levelset integral in 2d..
+| | | |
+| | | o changeset: 2536:3df0231f5788
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 19 15:55:46 2012 +0200
+| | | | summary: coorect cout
+| | | |
+| | | o changeset: 2535:1813e516c73c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 19 15:49:51 2012 +0200
+| | | | summary: correct isoline.cpp hard ...
+| | | |
+| | | o changeset: 2534:d63f9b0d6a90
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 18 21:17:21 2012 +0200
+| | | | summary: correct isoline.cpp bug some time ....
+| | | |
+| | | o changeset: 2533:9a0f4ba5bc83
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 05 22:33:04 2012 +0200
+| | | | summary: do coorect off clang++ compiler
+| | | |
+| | | o changeset: 2532:7268da0a32dd
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 05 21:59:44 2012 +0200
+| | | | summary: correct big problem with clang++ compiler ...
+| | | |
+| | | o changeset: 2531:bf616e104e58
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 05 21:56:56 2012 +0200
+| | | | summary: coorect pb with clang compile, verif strange..
+| | | |
+| | | o changeset: 2530:10fbabb7ca26
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 05 14:55:29 2012 +0200
+| | | | summary: add formal tools Cofact, det 3x3, : on formal array.
+| | | |
+| | | o changeset: 2529:4603f7ce0737
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 04 16:41:21 2012 +0200
+| | | | summary: clang next step.
+| | | |
+| | | o changeset: 2528:18d5c72b3f8b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 04 10:32:46 2012 +0200
+| | | | summary: do correct for clang compiler
+| | | |
+| | | o changeset: 2527:061c058bf92d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Sep 03 16:18:48 2012 +0200
+| | | | summary: correct for c++11
+| | | |
+| | | o changeset: 2526:47944725e009
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Aug 28 14:21:56 2012 +0200
+| | | | summary: update README macos
+| | | |
+| | | o changeset: 2525:d54e7f17997b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Aug 28 12:53:41 2012 +0200
+| | | | summary: add CheckMPIMacLib.sh and CheckMacLib.sh taget in makefile for mac pkg install
+| | | |
+| | | o changeset: 2524:8fde78f05ac0
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 27 16:03:36 2012 +0200
+| | | | summary: remove print in sparse solver
+| | | |
+| | | o changeset: 2523:d6c07fd2ec36
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Aug 26 21:27:19 2012 +0200
+| | | | summary: add missing operator ?: of bool
+| | | |
+| | | o changeset: 2522:e5a90f5a7283
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Aug 16 09:47:15 2012 +0200
+| | | | summary: revome print ...
+| | | |
+| | | o changeset: 2521:91006696c311
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Aug 14 21:17:02 2012 +0200
+| | | | summary: correct mistake find by P. Jolivet.
+| | | |
+| | | o changeset: 2520:ef81308ec4f1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Aug 12 22:07:52 2012 +0200
+| | | | summary: cooorect automatic seach in configire (P Jolivet).
+| | | |
+| | | o changeset: 2519:4422559d360a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 06 23:12:27 2012 +0200
+| | | | summary: add comment of my installation
+| | | |
+| | | o changeset: 2518:27d04b01bb9d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 06 00:14:04 2012 +0200
+| | | | summary: correct Superludist with g++ v 4.8
+| | | |
+| | | o changeset: 2517:08658feae475
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Aug 05 23:37:08 2012 +0200
+| | | | summary: forget files
+| | | |
+| | | o changeset: 2516:c2d91d216c32
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Aug 05 23:31:52 2012 +0200
+| | | | summary: coerect Superlu.cpp of g++ v 4.8 add missong this->
+| | | |
+| | | o changeset: 2515:68577323c46d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Aug 05 15:17:51 2012 +0200
+| | | | summary: change mac compiler gcc version 4.8.0
+| | | |
+| | | o changeset: 2514:ce08661de7d5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jul 12 14:27:34 2012 +0200
+| | | | summary: add example
+| | | |
+| | | o changeset: 2513:efd3db094bcf
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jul 12 14:00:47 2012 +0200
+| | | | summary: add imax, imam, correct sctoch interface not //
+| | | |
+| | | o changeset: 2512:cd465304bca9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jun 13 20:04:15 2012 +0200
+| | | | summary: add compile of shell
+| | | |
+| | | o changeset: 2511:250772fdd061
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jun 13 20:00:36 2012 +0200
+| | | | summary: add shell/unix interface
+| | | |
+| | | o changeset: 2510:bfac9dec081e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jun 13 10:38:55 2012 +0200
+| | | | summary: correct PB of cleanning memory of array real[int][int] ...
+| | | |
+| | | o changeset: 2509:4628b688eeaf
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jun 07 15:12:35 2012 +0200
+| | | | summary: add missing include in some computer unistd.h
+| | | |
+| | | o changeset: 2508:031e9c676174
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jun 07 08:16:38 2012 +0200
+| | | | summary: correct mshmet makefile to force the recompilation
+| | | |
+| | | o changeset: 2507:1839c38ea7dc
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jun 07 08:06:55 2012 +0200
+| | | | summary: chnge version to 3.19-2
+| | | |
+| | | o changeset: 2506:80ae2baf5a8d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jun 07 07:50:29 2012 +0200
+| | | | summary: correct mshmet problem in case of 2 eigen value in Hessian.
+| | | |
+| | | o changeset: 2505:95e33e458008
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed May 30 14:13:26 2012 +0200
+| | | | summary: correct typo in font size in postcript interface
+| | | |
+| | | o changeset: 2504:f2cdbadf6faf
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue May 22 21:15:30 2012 +0200
+| | | | summary: correct clean part of mshmet makefile + add
+| | | |
+| | | o changeset: 2503:bee48e40935e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue May 15 11:48:05 2012 +0200
+| | | | summary: correct missing const in qf11to25.cpp
+| | | |
+| | | o changeset: 2502:0232fb9d45b7
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue May 15 11:39:15 2012 +0200
+| | | | summary: add build of Quadratur formular in qf11to25.cpp plugins
+| | | |
+| | | o changeset: 2501:f20a2f3c7bd6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 14 21:04:26 2012 +0200
+| | | | summary: set fftw to version 3.3.2
+| | | |
+| | | o changeset: 2500:f5c0851c058c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed May 09 22:26:21 2012 +0200
+| | | | summary: update modif of Ernesto Aranda <Ernesto.Aranda at uclm.es> for new version of mmg3d
+| | | |
+| | | o changeset: 2499:de4c315dad33
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed May 09 21:11:04 2012 +0200
+| | | | summary: pass to version 3.19-1
+| | | |
+| | | o changeset: 2498:7ecf46eb253d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed May 09 21:06:07 2012 +0200
+| | | | summary: add Ernesto Aranda <Ernesto.Aranda at uclm.es> change ...
+| | | |
+| | | o changeset: 2497:49f99f157b3c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 07 10:27:41 2012 +0200
+| | | | summary: coorect typo = -> != in configure (mkl sgi)
+| | | |
+| | | o changeset: 2496:f5814395a638
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon May 07 10:14:08 2012 +0200
+| | | | summary: remove of use of MKL scalapack and blacs with sgi MPI
+| | | |
+| | | o changeset: 2495:c3b18fa8f700
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu May 03 19:07:10 2012 +0200
+| | | | summary: remove MKLROOT form configure ( disaper in new mkl configure)
+| | | |
+| | | o changeset: 2494:d7658c0f681b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu May 03 18:28:44 2012 +0200
+| | | | summary: add correct in MUMPS mpi solver
+| | | |
+| | | o changeset: 2493:c5124bde5bc5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu May 03 11:01:00 2012 +0200
+| | | | summary: remove cmake de configure
+| | | |
+| | | o changeset: 2492:83094b26702f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu May 03 11:00:01 2012 +0200
+| | | | summary: add count pour ptr in CheckPtr.cpp
+| | | |
+| | | o changeset: 2491:463c4c448187
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Apr 24 13:25:56 2012 +0200
+| | | | summary: try to count memery pointeur
+| | | |
+| | | o changeset: 2490:66be2ba0ba65
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Apr 23 23:08:13 2012 +0200
+| | | | summary: change version of superlu.
+| | | |
+| | | o changeset: 2489:d2bee8f1b140
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 17:09:00 2012 +0200
+| | | | summary: update mmg3d swapar.o is also compile without optim.
+| | | |
+| | | o changeset: 2488:76e28b509475
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 16:51:03 2012 +0200
+| | | | summary: correct atexit problem in mmg3 v4 ..
+| | | |
+| | | o changeset: 2487:cb2752aee207
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 15:40:23 2012 +0200
+| | | | summary: correct Interface of Ipopt (ff-Ipopt)
+| | | |
+| | | o changeset: 2486:04bbadc57f58
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 14:16:51 2012 +0200
+| | | | summary: carrect un set varable in mmage3d-v4
+| | | |
+| | | o changeset: 2485:e83aa5d378f9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 12:03:38 2012 +0200
+| | | | summary: coorect ff-Ipopt version
+| | | |
+| | | o changeset: 2484:90cf49c9fbb5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 11:33:36 2012 +0200
+| | | | summary: coorect typo in innovation file
+| | | |
+| | | o changeset: 2483:baebf141d983
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 09:27:57 2012 +0200
+| | | | summary: update INNOVATION file
+| | | |
+| | | o changeset: 2482:5ede79cd270b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 09:21:18 2012 +0200
+| | | | summary: correct typo
+| | | |
+| | | o changeset: 2481:0c075c537334
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Apr 20 08:48:58 2012 +0200
+| | | | summary: add isNaN,IsInf,IsNormal FP fonction and
+| | | |
+| | | o changeset: 2480:290972213b56
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 19 22:58:51 2012 +0200
+| | | | summary: add a true scotch example
+| | | |
+| | | o changeset: 2479:c0c3c75dd20a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 19 18:46:00 2012 +0200
+| | | | summary: add sort of integer array
+| | | |
+| | | o changeset: 2478:08b71cf34320
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 19 17:17:10 2012 +0200
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2477:551aa5767d7f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 19 17:12:43 2012 +0200
+| | | | summary: coorect header of plugin
+| | | |
+| | | o changeset: 2476:a6258a786803
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 19 16:46:43 2012 +0200
+| | | | summary: add scotch interface thanks to P. Jolivet
+| | | |
+| | | o changeset: 2475:b7f9353707c0
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 19 16:34:39 2012 +0200
+| | | | summary: Pour P. Jolivet,
+| | | |
+| | | o changeset: 2474:e507d135fbf4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 19 16:28:28 2012 +0200
+| | | | summary: correct bug in macro with operator .*= and ./=
+| | | |
+| | | o changeset: 2473:28d82b742e4e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Apr 16 13:54:02 2012 +0200
+| | | | summary: comment in stable script examples++-3d/Laplace-Adapt-aniso-3d.edp
+| | | |
+| | | o changeset: 2472:f7c9fbfee29e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Apr 15 22:27:49 2012 +0200
+| | | | summary: correct mmg3d new interface.
+| | | |
+| | | o changeset: 2471:67ac6a176e89
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Apr 15 10:36:30 2012 +0200
+| | | | summary: correct build fo missing file during test in ttestio
+| | | |
+| | | o changeset: 2470:be230cbc9bb1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Apr 11 22:46:11 2012 +0200
+| | | | summary: update doc with isoline example
+| | | |
+| | | o changeset: 2469:7b55a13f44bf
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Apr 11 18:15:57 2012 +0200
+| | | | summary: correct type in edp files
+| | | |
+| | | o changeset: 2468:cb455028d3bc
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 05 17:59:05 2012 +0200
+| | | | summary: correct pb plot in 3d-lemen;edp example
+| | | |
+| | | o changeset: 2467:a4495a14cc6f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 05 17:41:19 2012 +0200
+| | | | summary: correct Makefile for dist
+| | | |
+| | | o changeset: 2466:c1c7515b599d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 05 17:38:21 2012 +0200
+| | | | summary: remove assert of generate surface mesh ???
+| | | |
+| | | o changeset: 2465:adf7a32dec37
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 05 17:36:08 2012 +0200
+| | | | summary: add new Ipopt example
+| | | |
+| | | o changeset: 2464:420d59368939
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Apr 05 17:17:53 2012 +0200
+| | | | summary: pass to version 3.19 , and add Ipopt documentation
+| | | |
+| | | o changeset: 2463:684b603bce0f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Apr 03 15:35:04 2012 +0200
+| | | | summary: change the return value of inv in lapack , reture info value
+| | | |
+| | | o changeset: 2462:43d891de7b5c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 30 13:52:21 2012 +0200
+| | | | summary: update IPOPT interface
+| | | |
+| | | o changeset: 2461:ff9197c7215e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 19:02:18 2012 +0100
+| | | | summary: forget all.edp (automatical rebuild)
+| | | |
+| | | o changeset: 2460:5f0193ae54c8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 18:59:23 2012 +0100
+| | | | summary: coorect install plugin
+| | | |
+| | | o changeset: 2459:33407ff589c1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 18:52:47 2012 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2458:da832a4533ec
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 18:51:32 2012 +0100
+| | | | summary: romve use file
+| | | |
+| | | o changeset: 2457:a70d6470d341
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 18:18:18 2012 +0100
+| | | | summary: correct typo
+| | | |
+| | | o changeset: 2456:660e36d76368
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 18:14:56 2012 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2455:d1c7eb0f6226
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 17:48:02 2012 +0100
+| | | | summary: coorect FFLAGS in ippot
+| | | |
+| | | o changeset: 2454:c7e70cac0ced
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 17:45:23 2012 +0100
+| | | | summary: correct ipopt fortran flags
+| | | |
+| | | o changeset: 2453:fa1d39ecf8c5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 17:00:18 2012 +0100
+| | | | summary: correct chanhe of ff-IpOpt in ff-Ipopt
+| | | |
+| | | o changeset: 2452:603891d1341f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 16:58:37 2012 +0100
+| | | | summary: correcrt Ipot name
+| | | |
+| | | o changeset: 2451:abcfed2f161a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 15:24:19 2012 +0100
+| | | | summary: remove build file
+| | | |
+| | | o changeset: 2450:fd47a9cb93e6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 22 14:01:53 2012 +0100
+| | | | summary: correct missing CFLAGS compile flige in ipopt
+| | | |
+| | | o changeset: 2449:9c4f3a731d8f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 15 17:03:46 2012 +0100
+| | | | summary: update freeyams versio
+| | | |
+| | | o changeset: 2448:57268fd78d95
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 15 16:22:26 2012 +0100
+| | | | summary: correct ipopt
+| | | |
+| | | o changeset: 2447:648085c768e2
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Mar 15 15:41:31 2012 +0100
+| | | | summary: carrection iptop interface
+| | | |
+| | | o changeset: 2446:db7e1719d41d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Mar 14 10:03:06 2012 +0100
+| | | | summary: coorect typo the WHERE file building
+| | | |
+| | | o changeset: 2445:9652b407c4d4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Mar 14 09:40:38 2012 +0100
+| | | | summary: correct msh3.cpp see INNOVATION
+| | | |
+| | | o changeset: 2444:0912ecf5b7b6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Mar 13 19:22:46 2012 +0100
+| | | | summary: correct type error
+| | | |
+| | | o changeset: 2443:f73f7abb9628
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Mar 12 20:42:20 2012 +0100
+| | | | summary: add Ipopt interface, seems workinging
+| | | |
+| | | o changeset: 2442:18c51dd3fae0
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 09 22:15:39 2012 +0100
+| | | | summary: add nex example
+| | | |
+| | | o changeset: 2441:d857f8111e76
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 09 22:12:33 2012 +0100
+| | | | summary: add IpOpt interface
+| | | |
+| | | o changeset: 2440:9811138f1bc7
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Mar 09 22:02:20 2012 +0100
+| | | | summary: add Ipopt interface
+| | | |
+| | | o changeset: 2439:939ad2584480
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Mar 07 21:58:28 2012 +0100
+| | | | summary: correct pb of name in lapack in arpack configire variable
+| | | |
+| | | o changeset: 2438:cc334b6ba942
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Mar 07 20:31:44 2012 +0100
+| | | | summary: add -mkl flgs in configure in test ..
+| | | |
+| | | o changeset: 2437:8f1418723ac1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Mar 07 12:53:22 2012 +0100
+| | | | summary: add missing operator A(1:3,3:4) on full matrix
+| | | |
+| | | o changeset: 2436:d8c7a95bab01
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Mar 06 23:13:13 2012 +0100
+| | | | summary: add new example
+| | | |
+| | | o changeset: 2435:e9f77853f86a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Mar 06 22:57:22 2012 +0100
+| | | | summary: add subarrey of full matrix.
+| | | |
+| | | o changeset: 2434:44e45a467771
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Mar 06 22:06:47 2012 +0100
+| | | | summary: add new type of array , array of array.
+| | | |
+| | | o changeset: 2433:ff330cc9ed2a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Feb 24 17:43:14 2012 +0100
+| | | | summary: add ipopt download
+| | | |
+| | | o changeset: 2432:6dd56733d650
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Feb 23 13:07:28 2012 +0100
+| | | | summary: add install of libphread-2.dd or win32
+| | | |
+| | | o changeset: 2431:2fbea8d0c565
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Feb 23 12:07:08 2012 +0100
+| | | | summary: add pthread in mpi mumps
+| | | |
+| | | o changeset: 2430:96c02671ec5c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Feb 23 12:05:52 2012 +0100
+| | | | summary: add pthread in WHERE-LIBARY-config for mumps-seq
+| | | |
+| | | o changeset: 2429:b83672d4b4f9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 22 23:18:22 2012 +0100
+| | | | summary: correct typo in libseq path for mumps-seq compile
+| | | |
+| | | o changeset: 2428:9c218b0575fc
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 22 22:16:57 2012 +0100
+| | | | summary: add MUMPS seq pluging
+| | | |
+| | | o changeset: 2427:e714f05e8c68
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Feb 20 10:02:23 2012 +0100
+| | | | summary: add tag + correct missing file in windows distributiuon
+| | | |
+| | | o changeset: 2426:16116189f9fc
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Feb 20 10:01:42 2012 +0100
+| | | | summary: Added tag 3.18-1 for changeset 7a11ffa1f26e
+| | | |
+| | | o changeset: 2425:7a11ffa1f26e
+| | | | tag: 3.18-1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Feb 17 16:14:54 2012 +0100
+| | | | summary: correct edp ..
+| | | |
+| | | o changeset: 2424:ff06d18097d3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Feb 17 15:21:24 2012 +0100
+| | | | summary: coorect install windows
+| | | |
+| | | o changeset: 2423:5dc5d4a44a0f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Feb 17 15:16:38 2012 +0100
+| | | | summary: correct missing file in makefiles
+| | | |
+| | | o changeset: 2422:297b8d9f6034
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 15 22:00:56 2012 +0100
+| | | | summary: update doc
+| | | |
+| | | o changeset: 2421:fc00fdf10fc8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 15 21:32:56 2012 +0100
+| | | | summary: continuing update
+| | | |
+| | | o changeset: 2420:6cf5db8c5b72
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 15 21:29:17 2012 +0100
+| | | | summary: add .im, .re of array..compile test
+| | | |
+| | | o changeset: 2419:56dc83bd98f5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 15 21:01:22 2012 +0100
+| | | | summary: add re , operator in complex sparce matrix
+| | | |
+| | | o changeset: 2418:04e97610e592
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Feb 14 21:46:23 2012 +0100
+| | | | summary: add convert of im and re parl of complex sparse matrix
+| | | |
+| | | o changeset: 2417:c9503b6ad05c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Feb 14 15:30:45 2012 +0100
+| | | | summary: correct norme lp in RNM thank yo a student.
+| | | |
+| | | o changeset: 2416:17002f8ac1e6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Feb 13 17:12:46 2012 +0100
+| | | | summary: add comment in INNOVATION file
+| | | |
+| | | o changeset: 2415:99a84a69a476
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Feb 13 16:49:40 2012 +0100
+| | | | summary: add error in case of probleme ith periodic
+| | | |
+| | | o changeset: 2414:7e01a75cf0a2
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 08 18:02:06 2012 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2413:7e1ce5867819
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 08 18:01:07 2012 +0100
+| | | | summary: add missing files
+| | | |
+| | | o changeset: 2412:1a9d248b0abe
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 08 17:57:12 2012 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2411:313f2537e2f6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 08 17:52:21 2012 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2410:f809aa7e43f9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 08 17:42:51 2012 +0100
+| | | | summary: add missing files
+| | | |
+| | | o changeset: 2409:124a413008ed
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 08 16:34:17 2012 +0100
+| | | | summary: correct Makefiles
+| | | |
+| | | o changeset: 2408:cbb20473adea
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 08 16:33:04 2012 +0100
+| | | | summary: remove example without new adaptation schema
+| | | |
+| | | o changeset: 2407:9c7b8c0c8096
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Feb 08 16:24:20 2012 +0100
+| | | | summary: add adpt tool for PK aniso adation in 2d
+| | | |
+| | | o changeset: 2406:40df8192a994
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Jan 20 15:36:57 2012 +0100
+| | | | summary: coorect scriot
+| | | |
+| | | o changeset: 2405:9f521b6ad9e9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 19 13:37:05 2012 +0100
+| | | | summary: correct DOC
+| | | |
+| | | o changeset: 2404:5c0462ce1574
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jan 19 09:54:05 2012 +0100
+| | | | summary: add New example in Chap 3.
+| | | |
+| | | o changeset: 2403:4bee3958de18
+| | | |\ parent: 2401:64149fc11869
+| | | | | parent: 2402:6d506087c6af
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 18 21:57:45 2012 +0100
+| | | | | summary: merging with 3.18 (error FH)
+| | | | |
+| | | | o changeset: 2402:6d506087c6af
+| | | | | parent: 2400:9506aca1ea28
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 18 21:36:47 2012 +0100
+| | | | | summary: Added tag v3.18 for changeset 9506aca1ea28
+| | | | |
+| | | o | changeset: 2401:64149fc11869
+| | | |/ user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jan 18 21:34:52 2012 +0100
+| | | | summary: correct file to compile with xcode 4.2
+| | | |
+| | | o changeset: 2400:9506aca1ea28
+| | | | tag: v3.18
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Jan 16 13:08:11 2012 +0100
+| | | | summary: add line ininnovation
+| | | |
+| | | o changeset: 2399:153d0a5015bb
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Jan 16 13:04:13 2012 +0100
+| | | | summary: Correct NSprojection example
+| | | |
+| | | o changeset: 2398:2d9a79b70d5b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Jan 16 11:27:49 2012 +0100
+| | | | summary: add redownload off mmg34 tar gz
+| | | |
+| | | o changeset: 2397:1fd0801dc393
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Jan 16 11:10:33 2012 +0100
+| | | | summary: correct compile of mmg3d v4
+| | | |
+| | | o changeset: 2396:f03a6f977499
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jan 11 21:35:51 2012 +0100
+| | | | summary: add missing file on windows
+| | | |
+| | | o changeset: 2395:5fcad65c5ece
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jan 11 21:04:00 2012 +0100
+| | | | summary: passe to version 3.18
+| | | |
+| | | o changeset: 2394:a8118bf9d0a5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jan 11 12:11:19 2012 +0100
+| | | | summary: update isoline dll.
+| | | |
+| | | o changeset: 2393:d925ce8d8dd6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Jan 10 21:08:06 2012 +0100
+| | | | summary: correct mpigather
+| | | |
+| | | o changeset: 2392:03d927f3dda3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Jan 10 20:50:00 2012 +0100
+| | | | summary: correct parallelempi.cpp mpigather assert
+| | | |
+| | | o changeset: 2391:8898fcd7acce
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Jan 10 18:40:58 2012 +0100
+| | | | summary: change the isolineP1 load file by a isoline file
+| | | |
+| | | o changeset: 2390:b778cdbf73c1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Dec 15 16:05:51 2011 +0100
+| | | | summary: correct pb of offset in readmesh in ffglut
+| | | |
+| | | o changeset: 2389:cf6f4a7feea8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Dec 15 11:41:53 2011 +0100
+| | | | summary: coorect PB de shift of 1 in read .msh in 3d
+| | | |
+| | | o changeset: 2388:8cab02860a3c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 30 15:02:31 2011 +0100
+| | | | summary: correct mistake in mpi interface (wrong assert and correct essai.edp)
+| | | |
+| | | o changeset: 2387:d3f7e78540eb
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 30 14:42:47 2011 +0100
+| | | | summary: corret MPI problem
+| | | |
+| | | o changeset: 2386:1a638fa49fbe
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Nov 17 15:12:11 2011 +0100
+| | | | summary: correct BLACS interface ( mkl and debain case)
+| | | |
+| | | o changeset: 2385:111b11d41665
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Nov 17 13:39:47 2011 +0100
+| | | | summary: coorect pb in blacs lib order in WHERE_LIB
+| | | |
+| | | o changeset: 2384:02fd8c5643f3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 16 22:10:38 2011 +0100
+| | | | summary: correct mshmet
+| | | |
+| | | o changeset: 2383:c7dc28fb1321
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 16 18:30:17 2011 +0100
+| | | | summary: correct configure.ac (remove trick on odl mmg3 version (not use at all)
+| | | |
+| | | o changeset: 2382:f661f9f8e47b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 16 17:56:03 2011 +0100
+| | | | summary: remove double symbloe in freeyam with meshlib
+| | | |
+| | | o changeset: 2381:5732efc58a03
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 16 16:02:42 2011 +0100
+| | | | summary: remove compress tools in scotch by default
+| | | |
+| | | o changeset: 2380:1f7181ed77e3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 16 11:39:39 2011 +0100
+| | | | summary: correct mistake in ymas interface
+| | | |
+| | | o changeset: 2379:f671d72ac333
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 16 11:09:26 2011 +0100
+| | | | summary: uodate to last freeymas version
+| | | |
+| | | o changeset: 2378:b5cf0e99fbc4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Nov 15 17:42:08 2011 +0100
+| | | | summary: correct aprmetis and mmg3d opt version
+| | | |
+| | | o changeset: 2377:c9f68542a064
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Nov 15 16:19:23 2011 +0100
+| | | | summary: add small correct of fratran stuff in ff-c++ et find mpirun in configure
+| | | |
+| | | o changeset: 2376:e475dc98bc5b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Nov 08 22:30:16 2011 +0100
+| | | | summary: add new ffapi.o in src/bin-win32/Makefile
+| | | |
+| | | o changeset: 2375:0f35b35f0203
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Nov 08 22:26:08 2011 +0100
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2374:00b37e15d8b8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Nov 08 22:12:36 2011 +0100
+| | | | summary: make hack for true random number on window (use of mersen randow)
+| | | |
+| | | o changeset: 2373:81725e52c648
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Nov 08 21:33:42 2011 +0100
+| | | | summary: correct typo error and pdate the doc.
+| | | |
+| | | o changeset: 2372:729356646c52
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Nov 08 21:02:28 2011 +0100
+| | | | summary: correct the new auto laod interface ...
+| | | |
+| | | o changeset: 2371:97802e3f5d5e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Nov 06 20:59:48 2011 +0100
+| | | | summary: passe to versio 3.17
+| | | |
+| | | o changeset: 2370:07ee613471d9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sun Nov 06 15:46:21 2011 +0100
+| | | | summary: coorect PB off pluging ( ok may be)
+| | | |
+| | | o changeset: 2369:3a017668777d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Nov 04 18:45:51 2011 +0100
+| | | | summary: correct Typo error in multiple include defence ..
+| | | |
+| | | o changeset: 2368:72f8424630ee
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Nov 04 16:54:48 2011 +0100
+| | | | summary: up innovation
+| | | |
+| | | o changeset: 2367:e0d1eed7452a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Nov 04 16:28:33 2011 +0100
+| | | | summary: update plugin to by compatible with new load schema
+| | | |
+| | | o changeset: 2366:045f330b4eba
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Nov 02 21:43:35 2011 +0100
+| | | | summary: build a work version of mpi on window base of sdk windows hpc
+| | | |
+| | | o changeset: 2365:896119ddcba9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 26 21:50:31 2011 +0200
+| | | | summary: correct missing
+| | | |
+| | | o changeset: 2364:6162056c2706
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 26 13:27:13 2011 +0200
+| | | | summary: pass to v 3.16-1
+| | | |
+| | | o changeset: 2363:bf3e6531f554
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 26 13:12:33 2011 +0200
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2362:f38424524a39
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 26 13:10:05 2011 +0200
+| | | | summary: add patch of Marco Atzeri <marco.atzeri at gmail.com> for cygwin
+| | | |
+| | | o changeset: 2361:392218d17485
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 21 14:47:43 2011 +0200
+| | | | summary: doc is 3.16-1
+| | | |
+| | | o changeset: 2360:174539a666e8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 21 14:44:44 2011 +0200
+| | | | summary: update doc S. Auliac (optim)
+| | | |
+| | | o changeset: 2359:e2bd8b52269f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 21 14:17:20 2011 +0200
+| | | | summary: MAJ INNOVATION
+| | | |
+| | | o changeset: 2358:539aa3bc4a1b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 21 14:13:58 2011 +0200
+| | | | summary: add mpi_cmaes lib and examples
+| | | |
+| | | o changeset: 2357:38c7f4d3ea7b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 20 19:53:57 2011 +0200
+| | | | summary: add NLopt interface and cmaes interce (thank to S. Auliac)
+| | | |
+| | | o changeset: 2356:2edd97964eeb
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 14 14:35:20 2011 +0200
+| | | | summary: add truc to remove 2 init
+| | | |
+| | | o changeset: 2355:408618fc2d14
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 13 23:09:39 2011 +0200
+| | | | summary: correct auto load of mumps
+| | | |
+| | | o changeset: 2354:233a5a7f55c1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 13 23:07:31 2011 +0200
+| | | | summary: correct pb of autoinitsfunct
+| | | |
+| | | o changeset: 2353:09b0580dda3a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 12 15:01:36 2011 +0200
+| | | | summary: add tool to automatique load
+| | | |
+| | | o changeset: 2352:4bf39e36e2aa
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 07 22:10:24 2011 +0200
+| | | | summary: coorect pb of alloaction
+| | | |
+| | | o changeset: 2351:383e5c0deedb
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 07 21:17:54 2011 +0200
+| | | | summary: change testio.edp ttestio.edp
+| | | |
+| | | o changeset: 2350:70f9874ad0e4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 07 17:42:22 2011 +0200
+| | | | summary: coorect example
+| | | |
+| | | o changeset: 2349:b3c7905f858b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 06 17:30:42 2011 +0200
+| | | | summary: coorect type in mmg3v4
+| | | |
+| | | o changeset: 2348:cade5380b91e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 06 17:24:50 2011 +0200
+| | | | summary: correct CFALGS
+| | | |
+| | | o changeset: 2347:70b2d6267d97
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 06 16:55:39 2011 +0200
+| | | | summary: correct typo error
+| | | |
+| | | o changeset: 2346:d48570028111
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 06 13:19:02 2011 +0200
+| | | | summary: correct typo error and warning
+| | | |
+| | | o changeset: 2345:ccd64b80d57f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 06 12:52:17 2011 +0200
+| | | | summary: try to bluid v 3.15
+| | | |
+| | | o changeset: 2344:d47b9dda863c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Oct 06 11:41:48 2011 +0200
+| | | | summary: coorect pb in real[int,int] A, B; B=A' , etc..
+| | | |
+| | | o changeset: 2343:c3dee854061e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 05 18:29:37 2011 +0200
+| | | | summary: come back to metis 4.0 for compatibilite reason
+| | | |
+| | | o changeset: 2342:55e2323587af
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 05 14:44:47 2011 +0200
+| | | | summary: correct pastix patch include (remove .. in patch file)
+| | | |
+| | | o changeset: 2341:50b762415bd3
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 05 14:27:57 2011 +0200
+| | | | summary: correct A=A' for array real[int,int] or complex[int,int]
+| | | |
+| | | o changeset: 2340:70404bc0a76f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Sep 29 21:48:05 2011 +0200
+| | | | summary: correct Paul Cazeaux diff
+| | | |
+| | | o changeset: 2339:e9d61b12fae9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Sep 29 19:25:21 2011 +0200
+| | | | summary: correct install MacOSX
+| | | |
+| | | o changeset: 2338:6a620fc389e1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Sep 29 13:55:16 2011 +0200
+| | | | summary: add freefem++ laucher
+| | | |
+| | | o changeset: 2337:b6eca8cec8e8
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 28 20:29:53 2011 +0200
+| | | | summary: correc configure cmaek typo error
+| | | |
+| | | o changeset: 2336:f98beda3b2a9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 28 20:26:15 2011 +0200
+| | | | summary: try to redo Freefem++.app
+| | | |
+| | | o changeset: 2335:d03364e04423
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 27 18:23:44 2011 +0200
+| | | | summary: correct metis makefile
+| | | |
+| | | o changeset: 2334:fe046f72fb0a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 27 18:07:55 2011 +0200
+| | | | summary: Added tag 3.14-1 for changeset 3d5d2f056b09
+| | | |
+| | | o changeset: 2333:3d5d2f056b09
+| | | | tag: 3.14-1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 27 18:07:22 2011 +0200
+| | | | summary: pass to versiuon 3.14-1
+| | | |
+| | | o changeset: 2332:ee6c761a1250
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 27 17:24:22 2011 +0200
+| | | | summary: correct emtis interface to v. 5.0.1 ( version 4.0 diseaper).
+| | | |
+| | | o changeset: 2331:37137749da6e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 27 15:24:10 2011 +0200
+| | | | summary: correct metis download (version 5.0.1)
+| | | |
+| | | o changeset: 2330:a8aac61cf98b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Sep 22 09:26:49 2011 +0200
+| | | | summary: coorect FreeFem++-CoCoa line 26: [: : integer expression expected
+| | | |
+| | | o changeset: 2329:43229386f981
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Sep 02 09:05:52 2011 +0200
+| | | | summary: correct Missing WHERE buils
+| | | |
+| | | o changeset: 2328:9dc607125215
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Sep 02 08:57:54 2011 +0200
+| | | | summary: add missing file
+| | | |
+| | | o changeset: 2327:6e2de6f927d5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Sep 02 08:53:46 2011 +0200
+| | | | summary: update innovation
+| | | |
+| | | o changeset: 2326:3ea8a0183313
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Sep 01 22:43:12 2011 +0200
+| | | | summary: coorect interface with mmg3d verson 4
+| | | |
+| | | o changeset: 2325:878e5c556d1e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Sep 01 22:40:33 2011 +0200
+| | | | summary: coorect inferface with mmg3d version 4
+| | | |
+| | | o changeset: 2324:6fdc0e5ff2d7
+| | | | parent: 2321:e34f8a052707
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 29 15:11:31 2011 +0200
+| | | | summary: Added tag 3.14-0 for changeset e34f8a052707
+| | | |
+| | | | o changeset: 2323:a2284c53ea2c
+| | | | | branch: alh-autoconf
+| | | | | parent: 2005:815102f120b1
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Aug 29 11:27:42 2011 +0200
+| | | | | summary: close branch incompreansible, plus utiliser
+| | | | |
+| | | | | o changeset: 2322:234fd78ad3c5
+| | | | | | branch: graphical-user-interface-branch
+| | | | | | parent: 1970:44a4659127b5
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Aug 29 11:26:37 2011 +0200
+| | | | | | summary: close branch incompreansible, plus utiliser
+| | | | | |
+| | | o | | changeset: 2321:e34f8a052707
+| | | | | | tag: 3.14-0
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Aug 29 10:21:12 2011 +0200
+| | | | | | summary: correct bug in 3d P1 interpolation
+| | | | | |
+| | | o | | changeset: 2320:8901cfb2463f
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 22:00:34 2011 +0200
+| | | | | | summary: correct mpi exemple
+| | | | | |
+| | | o | | changeset: 2319:117a01a44f20
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 21:38:55 2011 +0200
+| | | | | | summary: correct allGather check
+| | | | | |
+| | | o | | changeset: 2318:e100f2b57094
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 21:15:48 2011 +0200
+| | | | | | summary: correct pb of allignement in sub array send/recv with MPI
+| | | | | |
+| | | o | | changeset: 2317:be0d2368a0f4
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 21:08:19 2011 +0200
+| | | | | | summary: correct missing return in WSEND
+| | | | | |
+| | | o | | changeset: 2316:8f502dfff22e
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 15:05:09 2011 +0200
+| | | | | | summary: recorrect tetger clan makeifle
+| | | | | |
+| | | o | | changeset: 2315:cff15f3375e6
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 15:01:16 2011 +0200
+| | | | | | summary: do autoreconf
+| | | | | |
+| | | o | | changeset: 2314:dfe298c27b76
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 14:57:05 2011 +0200
+| | | | | | summary: restart of 3.14 version (big mistake yesterday)
+| | | | | |
+| | | o | | changeset: 2313:fda9929d138d
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 13:53:31 2011 +0200
+| | | | | | summary: remobe -march=native (bug on allpe)
+| | | | | |
+| | | o | | changeset: 2312:3d541b3d75d1
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 11:46:26 2011 +0200
+| | | | | | summary: correct optim compile flags
+| | | | | |
+| | | o | | changeset: 2311:9a74f723f0ac
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 11:33:30 2011 +0200
+| | | | | | summary: redo second problem
+| | | | | |
+| | | o | | changeset: 2310:bf083bb860bc
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Aug 26 11:18:55 2011 +0200
+| | | | | | summary: correct debug config flags
+| | | | | |
+| | | o | | changeset: 2309:11f8b8770f48
+| | | | | | parent: 2275:76e1708404c5
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Tue May 31 14:03:37 2011 +0200
+| | | | | | summary: coorect msssing lib in freeyam pluging
+| | | | | |
+o | | | | | changeset: 2308:f01c1ce34eb3
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Aug 25 17:54:08 2011 +0200
+| | | | | | summary: coorect defaul compile flags
+| | | | | |
+o | | | | | changeset: 2307:48f6f2dda6f9
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Aug 25 16:04:43 2011 +0200
+| | | | | | summary: coorect intrinc second to secnd2 in arpach (missing function).
+| | | | | |
+o | | | | | changeset: 2306:f1321b98b61b
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Aug 25 11:20:20 2011 +0200
+| | | | | | summary: correct clean taget in Makefile
+| | | | | |
+o | | | | | changeset: 2305:4b313e53fd00
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Aug 25 09:31:50 2011 +0200
+| | | | | | summary: Added tag 3.14 for changeset fbc48e130737
+| | | | | |
+o | | | | | changeset: 2304:fbc48e130737
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Aug 25 09:30:45 2011 +0200
+| | | | | | summary: and add -g in case of --enable-debug
+| | | | | |
+o | | | | | changeset: 2303:572e5649ecf2
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Aug 03 15:55:49 2011 +0200
+| | | | | | summary: correct of lion os.
+| | | | | |
+o | | | | | changeset: 2302:0183fdbeab37
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Jul 06 11:36:12 2011 +0200
+| | | | | | summary: see innovation
+| | | | | |
+o | | | | | changeset: 2301:5aeeb62cc314
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jul 04 21:37:38 2011 +0200
+| | | | | | summary: correct makefile
+| | | | | |
+o | | | | | changeset: 2300:5c0487b0b207
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 23:12:35 2011 +0200
+| | | | | | summary: correct typo
+| | | | | |
+o | | | | | changeset: 2299:b1bfdb1c8d4c
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 16:48:53 2011 +0200
+| | | | | | summary: correct INNOVATION
+| | | | | |
+o | | | | | changeset: 2298:e8247822dc8f
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 16:21:48 2011 +0200
+| | | | | | summary: correct hips solver typo arror in destructor
+| | | | | |
+o | | | | | changeset: 2297:8d0d89f8408a
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 11:17:09 2011 +0200
+| | | | | | summary: pass to version 3.13-3
+| | | | | |
+o | | | | | changeset: 2296:4088be2bb5b0
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 11:12:40 2011 +0200
+| | | | | | summary: add WGET in download/mumps/Makefile-mumps-4.10.0.inc
+| | | | | |
+o | | | | | changeset: 2295:344cbb3584d8
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 11:05:02 2011 +0200
+| | | | | | summary: add missing file
+| | | | | |
+o | | | | | changeset: 2294:21c29dd8cb63
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 11:00:03 2011 +0200
+| | | | | | summary: coorect innovation file
+| | | | | |
+o | | | | | changeset: 2293:2a0706ac5c1b
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 10:57:28 2011 +0200
+| | | | | | summary: coorect hips solver
+| | | | | |
+o | | | | | changeset: 2292:673e2af79b3b
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 30 09:32:00 2011 +0200
+| | | | | | summary: correct HIPS solver
+| | | | | |
+o | | | | | changeset: 2291:d839c2fd8874
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Jun 29 09:30:24 2011 +0200
+| | | | | | summary: upgrade INNOVATION file
+| | | | | |
+o | | | | | changeset: 2290:2809d03f67ce
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Jun 29 09:21:52 2011 +0200
+| | | | | | summary: add interface of New MUMPS version 4.10.0
+| | | | | |
+o | | | | | changeset: 2289:3ed2fe0ff5bf
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Tue Jun 28 09:18:23 2011 +0200
+| | | | | | summary: pass to version 3.13-2
+| | | | | |
+o | | | | | changeset: 2288:70da8688792b
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 27 23:29:05 2011 +0200
+| | | | | | summary: correct gibbs may be algo
+| | | | | |
+o | | | | | changeset: 2287:97bf00ff569f
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 27 22:54:04 2011 +0200
+| | | | | | summary: fing a bug un gibbs algo dur dur
+| | | | | |
+o | | | | | changeset: 2286:447235cc1f35
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 27 21:17:36 2011 +0200
+| | | | | | summary: correct interpolation problem with periodic BC.
+| | | | | |
+o | | | | | changeset: 2285:fab78e8b1f74
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 27 19:20:06 2011 +0200
+| | | | | | summary: correct typo
+| | | | | |
+o | | | | | changeset: 2284:0f2ff71f4833
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 27 19:14:22 2011 +0200
+| | | | | | summary: add mem usage in UMFPACK solver output
+| | | | | |
+o | | | | | changeset: 2283:540832a7ce66
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 27 10:31:44 2011 +0200
+| | | | | | summary: add exemples examples++-tutorial/Laplace-RHS-Dirac.edp
+| | | | | |
+o | | | | | changeset: 2282:49c1c93356a0
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 09 17:48:18 2011 +0200
+| | | | | | summary: correct ambiguity in square func.
+| | | | | |
+o | | | | | changeset: 2281:a92f428fff7f
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Thu Jun 09 12:26:16 2011 +0200
+| | | | | | summary: correct choix of mpimkl
+| | | | | |
+o | | | | | changeset: 2280:5aa51837cdb7
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Tue Jun 07 20:32:50 2011 +0200
+| | | | | | summary: correct install yams
+| | | | | |
+o | | | | | changeset: 2279:214e7ba93af3
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 06 21:51:56 2011 +0200
+| | | | | | summary: correct freeyams
+| | | | | |
+o | | | | | changeset: 2278:41c904b8660c
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 06 20:42:03 2011 +0200
+| | | | | | summary: correct spuriou print
+| | | | | |
+o | | | | | changeset: 2277:fcaee41a91cb
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Mon Jun 06 19:07:24 2011 +0200
+| | | | | | summary: correct freeyams.cpp LD process.
+| | | | | |
+o-----+ | | changeset: 2276:1a6949ae0965
+ | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+ / / / / / date: Mon May 30 15:16:17 2011 +0200
+| | | | | summary: add new example
+| | | | |
+| | o | | changeset: 2275:76e1708404c5
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri May 27 14:40:04 2011 +0200
+| | | | | summary: correct typo in int blas type
+| | | | |
+| | o | | changeset: 2274:beae57ef5319
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri May 27 14:36:03 2011 +0200
+| | | | | summary: correct int for blas variable ..
+| | | | |
+| | o | | changeset: 2273:3f2e931fffc3
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu May 26 15:42:47 2011 +0200
+| | | | | summary: correct typo in doc.
+| | | | |
+| | o | | changeset: 2272:6ba83092a50b
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu May 26 15:15:01 2011 +0200
+| | | | | summary: go v 3.13
+| | | | |
+| | o | | changeset: 2271:27fb12aa07ae
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu May 26 15:13:55 2011 +0200
+| | | | | summary: autoreconf
+| | | | |
+| | o | | changeset: 2270:93499395509f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu May 26 15:11:13 2011 +0200
+| | | | | summary: update doc
+| | | | |
+| | o | | changeset: 2269:55460f8c273e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed May 25 21:07:04 2011 +0200
+| | | | | summary: add final comment on Element_miaxte.cpp file
+| | | | |
+| | o | | changeset: 2268:ab20518693c9
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue May 24 18:21:42 2011 +0200
+| | | | | summary: add RT1, RT1Ortho, DBM1, DBM1Ortho Finite element in Element_Mixte.cpp dynamics libs
+| | | | |
+| | o | | changeset: 2267:b1efdda0703b
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue May 24 17:16:27 2011 +0200
+| | | | | summary: add BDM1 and BDM1Ortho Finite element
+| | | | |
+| | o | | changeset: 2266:b73e6b532325
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri May 20 16:47:08 2011 +0200
+| | | | | summary: in progress TD-NND 1 element
+| | | | |
+| | o | | changeset: 2265:696e7299da62
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri May 20 09:46:32 2011 +0200
+| | | | | summary: end of validation for RT1
+| | | | |
+| | o | | changeset: 2264:0512b6bb56db
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri May 20 09:09:16 2011 +0200
+| | | | | summary: correct RT1 and add RT1Ortho F.E.
+| | | | |
+| | o | | changeset: 2263:b5d879cb17c2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu May 19 15:12:24 2011 +0200
+| | | | | summary: correct Elm_TD-NNS.cpp for RT1 F.E.
+| | | | |
+| | o | | changeset: 2262:13906a499616
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon May 09 08:53:30 2011 +0200
+| | | | | summary: correct lapack
+| | | | |
+| | o | | changeset: 2261:3d579277e4ce
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon May 09 08:02:42 2011 +0200
+| | | | | summary: coorect lapack.cpp add full matrice multiplication
+| | | | |
+| | o | | changeset: 2260:39fb84c4949b
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri May 06 14:56:04 2011 +0200
+| | | | | summary: coorct lapack and New FE element
+| | | | |
+| | o | | changeset: 2259:a02b7f1a9c02
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu May 05 15:47:08 2011 +0200
+| | | | | summary: add New finite in construction
+| | | | |
+| | o | | changeset: 2258:bcfcf356bb8c
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Apr 28 18:30:09 2011 +0200
+| | | | | summary: add splitedges tools of Mghazli Zoubida <mghazli_zoubida at yahoo.com>
+| | | | |
+| | o | | changeset: 2257:294a37023d46
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Apr 18 11:57:40 2011 +0200
+| | | | | summary: coorect load load under win32
+| | | | |
+| | o | | changeset: 2256:4d0308f12e72
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Apr 18 09:57:50 2011 +0200
+| | | | | summary: correct load link pk of " and ' in var
+| | | | |
+| | o | | changeset: 2255:da55768a880d
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Apr 15 22:31:24 2011 +0200
+| | | | | summary: correct configure.Ac
+| | | | |
+| | o | | changeset: 2254:83972e23732a
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Apr 15 21:04:34 2011 +0200
+| | | | | summary: correct configure.ac for mpi under win32
+| | | | |
+| | o | | changeset: 2253:2aca6f1b5497
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Apr 15 20:35:45 2011 +0200
+| | | | | summary: MPI for win32
+| | | | |
+| | o | | changeset: 2252:e145e24f6aa0
+| | |\ \ \ parent: 2251:3d2ff16fa1e5
+| | | | | | parent: 2250:88c8347babf4
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Apr 15 18:28:28 2011 +0200
+| | | | | | summary: coorect Makefile
+| | | | | |
+| | | o | | changeset: 2251:3d2ff16fa1e5
+| | | | | | parent: 2247:246a6ffbd1f1
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Fri Apr 15 18:13:05 2011 +0200
+| | | | | | summary: coorect mpi configure for win32
+| | | | | |
+| | o | | | changeset: 2250:88c8347babf4
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Apr 13 14:14:51 2011 +0200
+| | | | | | summary: updaet Heat3d.idp
+| | | | | |
+| | o | | | changeset: 2249:3c31e2572e2f
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Apr 13 14:10:00 2011 +0200
+| | | | | | summary: correct typ in Heat3d.idp filename
+| | | | | |
+| | o | | | changeset: 2248:6bcbc93c5bca
+| | |/ / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Apr 13 14:07:57 2011 +0200
+| | | | | summary: change Heat3D.idp
+| | | | |
+| | o | | changeset: 2247:246a6ffbd1f1
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Apr 12 22:18:31 2011 +0200
+| | | | | summary: coorect Problem in WHERE quote
+| | | | |
+| | o | | changeset: 2246:bfcbef551c2e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Apr 08 21:47:10 2011 +0200
+| | | | | summary: correct Chaleur
+| | | | |
+| | o | | changeset: 2245:32829734574c
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Apr 08 17:37:22 2011 +0200
+| | | | | summary: correct INNOVATION file
+| | | | |
+| | o | | changeset: 2244:726002c6f090
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Apr 08 17:33:38 2011 +0200
+| | | | | summary: remove suprious dump in superlu dist.
+| | | | |
+| | o | | changeset: 2243:48f3b1e4a098
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Apr 07 12:05:18 2011 +0200
+| | | | | summary: correct change for // computing
+| | | | |
+| | o | | changeset: 2242:a48b9b504aba
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Apr 06 14:50:49 2011 +0200
+| | | | | summary: correct configure to build file
+| | | | |
+| | o | | changeset: 2241:18630017f8c9
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Apr 06 14:49:07 2011 +0200
+| | | | | summary: Added tag 3.12-1 for changeset cd142ee7324d
+| | | | |
+| | o | | changeset: 2240:cd142ee7324d
+| | | | | tag: 3.12-1
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Apr 05 10:21:23 2011 +0200
+| | | | | summary: correct 3d period BC.
+| | | | |
+| | o | | changeset: 2239:a43c08688b7e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 30 13:14:22 2011 +0200
+| | | | | summary: procon gmres remove tgv ????
+| | | | |
+| | o | | changeset: 2238:fff6c5feb7b6
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Mar 29 21:54:33 2011 +0200
+| | | | | summary: gmres precon same
+| | | | |
+| | o | | changeset: 2237:e04f738a5db2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Mar 29 21:39:31 2011 +0200
+| | | | | summary: change precon gmres
+| | | | |
+| | o | | changeset: 2236:c3258922889e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Mar 29 21:13:11 2011 +0200
+| | | | | summary: correct precon gmres
+| | | | |
+| | o | | changeset: 2235:6e138ea49c63
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Mar 24 16:56:02 2011 +0100
+| | | | | summary: correct PB compiel for hypre with blas.
+| | | | |
+| | o | | changeset: 2234:bfe9184061ce
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 23 17:30:48 2011 +0100
+| | | | | summary: cooret typo
+| | | | |
+| | o | | changeset: 2233:ed0bb81df53d
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 23 17:24:34 2011 +0100
+| | | | | summary: add missing MPI_LIB
+| | | | |
+| | o | | changeset: 2232:d23847ce53f2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 23 15:14:33 2011 +0100
+| | | | | summary: add cast of TypeSparseSlve on int for stokes type of solver .
+| | | | |
+| | o | | changeset: 2231:f31959eb8d1f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Mar 22 00:59:18 2011 +0100
+| | | | | summary: correcd DDM examples; tyop error
+| | | | |
+| | o | | changeset: 2230:2c44e0a52112
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Mar 21 21:22:49 2011 +0100
+| | | | | summary: coorect missing lin in mkl whith _rf.so ..
+| | | | |
+| | o | | changeset: 2229:6fc339f2ceff
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 16 14:55:23 2011 +0100
+| | | | | summary: coorect ref test in tutorial
+| | | | |
+| | o | | changeset: 2228:7c7128939c45
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 16 14:21:49 2011 +0100
+| | | | | summary: corect configure for mpi
+| | | | |
+| | o | | changeset: 2227:977b3193fe08
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 16 12:59:13 2011 +0100
+| | | | | summary: correct bug in intersection of metric in adaptmesh in case of given metrix
+| | | | |
+| | o | | changeset: 2226:49d4be4bdab9
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Mar 15 14:55:54 2011 +0100
+| | | | | summary: coorect pb on configure of mpi (hard jos)
+| | | | |
+| | o | | changeset: 2225:b9875e93b847
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Mar 15 14:40:24 2011 +0100
+| | | | | summary: add test for m4 and bison command in configure
+| | | | |
+| | o | | changeset: 2224:7e9e01c6e550
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Mar 15 14:23:06 2011 +0100
+| | | | | summary: update mshmet to version 3.0
+| | | | |
+| | o | | changeset: 2223:417a4450e6f8
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 09 22:22:41 2011 +0100
+| | | | | summary: correct mpi correct of sgi
+| | | | |
+| | o | | changeset: 2222:85735d18b198
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 09 21:51:21 2011 +0100
+| | | | | summary: compile with sgi MPI
+| | | | |
+| | o | | changeset: 2221:7d3bf33d6031
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 09 21:35:02 2011 +0100
+| | | | | summary: add check MPI_DOUBLE_COMPLEX in configure
+| | | | |
+| | o | | changeset: 2220:1d2cb842acb2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 09 11:56:22 2011 +0100
+| | | | | summary: cooret mpi / cpp DOUBLE_COMPLEX
+| | | | |
+| | o | | changeset: 2219:d0223be2ab7b
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 09 10:06:50 2011 +0100
+| | | | | summary: correct missing cflags in generic blas compilation
+| | | | |
+| | o | | changeset: 2218:ed71122c4649
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 09 08:54:14 2011 +0100
+| | | | | summary: corrrect loop in makefile when cleanning
+| | | | |
+| | o | | changeset: 2217:f3f99d1f9f92
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 09 08:39:35 2011 +0100
+| | | | | summary: correct loop in clean target makefiles
+| | | | |
+| | o | | changeset: 2216:8b03d97bb490
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Mar 09 08:36:34 2011 +0100
+| | | | | summary: correct clean in freeyam makefile
+| | | | |
+| | o | | changeset: 2215:5d1babde36d7
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Mar 08 17:57:47 2011 +0100
+| | | | | summary: correct mpi compile flags for sgi computer.
+| | | | |
+| | o | | changeset: 2214:b04fdc8dbf99
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Feb 09 21:03:19 2011 +0100
+| | | | | summary: correct missing in install examples++-load/fig.pgm examples++-load/lg.pgm
+| | | | |
+| | o | | changeset: 2213:0a53c3f15e2e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Feb 09 19:27:59 2011 +0100
+| | | | | summary: add missing file in Makefile dist tag.
+| | | | |
+| | o | | changeset: 2212:bdae2c1318cc
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Feb 09 19:23:36 2011 +0100
+| | | | | summary: coorect MPI_DOUBLE_COMPLEX problem in mpi ...
+| | | | |
+| | o | | changeset: 2211:a16c149daeb4
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Feb 09 18:11:31 2011 +0100
+| | | | | summary: correct mpiReduce complex case ..
+| | | | |
+| | o | | changeset: 2210:94365074e706
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Feb 07 20:58:18 2011 +0100
+| | | | | summary: correct some mistake.
+| | | | |
+| | o | | changeset: 2209:a076fd1237b7
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jan 25 22:11:03 2011 +0100
+| | | | | summary: reomve spuriou dump
+| | | | |
+| | o | | changeset: 2208:f3ce89f615f8
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jan 25 21:48:48 2011 +0100
+| | | | | summary: add mpiAllReduce(umax,dmaxg,comm,mpiMAX); where for real umax,dmaxg;
+| | | | |
+| | o | | changeset: 2207:3a8495a5387a
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jan 25 11:40:33 2011 +0100
+| | | | | summary: add mpiAllReduce on real , long , complex data type
+| | | | |
+| | o | | changeset: 2206:08fcb4d98a99
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Jan 23 14:34:11 2011 +0100
+| | | | | summary: Added tag 3.12-win32 for changeset bea855340647
+| | | | |
+| | o | | changeset: 2205:bea855340647
+| | | | | tag: 3.12-win32
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Jan 23 14:33:52 2011 +0100
+| | | | | summary: update INNOVATION
+| | | | |
+| | o | | changeset: 2204:f6a959c7600c
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Jan 22 21:44:24 2011 +0100
+| | | | | summary: correct configure for win32
+| | | | |
+| | o | | changeset: 2203:e84ba8234183
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 20 13:59:58 2011 +0100
+| | | | | summary: correct typo
+| | | | |
+| | o | | changeset: 2202:09ee2c12edb8
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 20 13:57:40 2011 +0100
+| | | | | summary: correct typo
+| | | | |
+| | o | | changeset: 2201:fb724f3e09a2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 20 13:55:11 2011 +0100
+| | | | | summary: correct install idp file in mpi examples
+| | | | |
+| | o | | changeset: 2200:dd0ca033a004
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 20 13:34:00 2011 +0100
+| | | | | summary: add tag for version 3.12
+| | | | |
+| | o | | changeset: 2199:672e0042f083
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 20 13:29:52 2011 +0100
+| | | | | summary: Added tag 3.12 for changeset 270198a4a293
+| | | | |
+| | o | | changeset: 2198:270198a4a293
+| | | | | tag: 3.12
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 20 13:23:35 2011 +0100
+| | | | | summary: correct HISTORY
+| | | | |
+| | o | | changeset: 2197:e983b6801336
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 20 08:32:41 2011 +0100
+| | | | | summary: coorect type in top Makefile
+| | | | |
+| | o | | changeset: 2196:673a610cc96e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 23:26:38 2011 +0100
+| | | | | summary: correct mpi sover files
+| | | | |
+| | o | | changeset: 2195:daea22ad31ee
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 19:43:33 2011 +0100
+| | | | | summary: correct examples++-mpi/Makefile.am
+| | | | |
+| | o | | changeset: 2194:b5f8a0106cc0
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 19:30:02 2011 +0100
+| | | | | summary: add missing file
+| | | | |
+| | o | | changeset: 2193:06476f221b1e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 18:19:58 2011 +0100
+| | | | | summary: correct medit makefile
+| | | | |
+| | o | | changeset: 2192:9d6b4e63eb04
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 17:28:44 2011 +0100
+| | | | | summary: coorect make for install FreeFem++-CoCoa on MAcOS
+| | | | |
+| | o | | changeset: 2191:60616abdc65f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 17:15:42 2011 +0100
+| | | | | summary: coorect MPI example ...
+| | | | |
+| | o | | changeset: 2190:daa42faa6092
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 16:55:25 2011 +0100
+| | | | | summary: correct MPI example and // solver
+| | | | |
+| | o | | changeset: 2189:0a5cc096d146
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 16:42:28 2011 +0100
+| | | | | summary: correct lot of MPI example
+| | | | |
+| | o | | changeset: 2188:65e69cb8fa59
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 15:19:20 2011 +0100
+| | | | | summary: add missing files
+| | | | |
+| | o | | changeset: 2187:41b69f3e4ffc
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Jan 19 14:00:15 2011 +0100
+| | | | | summary: - correct link proble in hips and hypre under linux
+| | | | |
+| | o | | changeset: 2186:38874c1f5f5f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jan 18 23:39:31 2011 +0100
+| | | | | summary: add new MPI example DDM-Schwarz method
+| | | | |
+| | o | | changeset: 2185:b8dc0377392a
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jan 18 18:59:26 2011 +0100
+| | | | | summary: correct mistake in doc
+| | | | |
+| | o | | changeset: 2184:fb8651ab5956
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jan 18 18:45:59 2011 +0100
+| | | | | summary: see INNOVATION file for all modid
+| | | | |
+| | o | | changeset: 2183:05d86033bc94
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jan 18 13:13:23 2011 +0100
+| | | | | summary: add README_MAC
+| | | | |
+| | o | | changeset: 2182:309f9d972d67
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Jan 17 23:43:41 2011 +0100
+| | | | | summary: correct isolineP1
+| | | | |
+| | o | | changeset: 2181:f8e9984c708d
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Jan 17 23:22:06 2011 +0100
+| | | | | summary: ass isolineP1 dynamic lib to build border form isoline
+| | | | |
+| | o | | changeset: 2180:7d53be5311f3
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Jan 17 08:11:50 2011 +0100
+| | | | | summary: coorect spurious endl
+| | | | |
+| | o | | changeset: 2179:3414092a9ef9
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Jan 17 08:07:34 2011 +0100
+| | | | | summary: remove spurio endl
+| | | | |
+| | o | | changeset: 2178:1d166fa13593
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Jan 17 08:00:50 2011 +0100
+| | | | | summary: remove spurious cout
+| | | | |
+| | o | | changeset: 2177:e413924e153f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Jan 17 00:04:56 2011 +0100
+| | | | | summary: add macro def;
+| | | | |
+| | o | | changeset: 2176:e218c243ce05
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 13 22:18:17 2011 +0100
+| | | | | summary: correct for MINGW load.link
+| | | | |
+| | o | | changeset: 2175:272b85192249
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 13 21:04:05 2011 +0100
+| | | | | summary: correct FLIBS on win32 case
+| | | | |
+| | o | | changeset: 2174:e3f2a110bb91
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Jan 13 17:19:04 2011 +0100
+| | | | | summary: add gsl interface
+| | | | |
+| | o | | changeset: 2173:a06e9ccb53fd
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Jan 04 17:50:50 2011 +0100
+| | | | | summary: add mesure for area of 2d mesh to by compatible this 3d mesh
+| | | | |
+| | o | | changeset: 2172:6e8a3de60010
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Dec 25 09:23:14 2010 +0100
+| | | | | summary: update te doc
+| | | | |
+| | o | | changeset: 2171:d4cbf3a97506
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Dec 25 08:22:35 2010 +0100
+| | | | | summary: see innovation
+| | | | |
+| | o | | changeset: 2170:f2016b3dac72
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Dec 25 07:26:48 2010 +0100
+| | | | | summary: crrect configure.ac to be compatible with new version
+| | | | |
+| | o | | changeset: 2169:65a4886d5bc8
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Dec 23 11:10:04 2010 +0100
+| | | | | summary: Add brute force for seach of poit to be sure
+| | | | |
+| | o | | changeset: 2168:9ccdb108f833
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Dec 21 12:38:05 2010 +0100
+| | | | | summary: add tgv < 0 => no tgv = so we put 0 on line except 1 on dig term on matrix probleme.
+| | | | |
+| | o | | changeset: 2167:42f714837f49
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Dec 12 00:15:38 2010 +0100
+| | | | | summary: mpi win32 suire ...
+| | | | |
+| | o | | changeset: 2166:ba43bd5ae9c2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Dec 12 00:11:57 2010 +0100
+| | | | | summary: mpi win32 suite
+| | | | |
+| | o | | changeset: 2165:18e9fd7513ef
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sun Dec 12 00:05:38 2010 +0100
+| | | | | summary: mpi coorect on win32
+| | | | |
+| | o | | changeset: 2164:4a2a7e6595ab
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Dec 11 23:41:02 2010 +0100
+| | | | | summary: correct parallele version for win32
+| | | | |
+| | o | | changeset: 2163:3956acc41dd1
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Dec 11 21:10:00 2010 +0100
+| | | | | summary: change mpi ef trouth pointer
+| | | | |
+| | o | | changeset: 2162:4aacb445efc2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Dec 11 14:27:23 2010 +0100
+| | | | | summary: correct pb CNOFLAGS (no opt CFLAGS for medir) under windows
+| | | | |
+| | o | | changeset: 2161:34a9d49cc35e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Dec 11 14:11:57 2010 +0100
+| | | | | summary: next step
+| | | | |
+| | o | | changeset: 2160:745e4814c1e2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Sat Dec 11 13:49:26 2010 +0100
+| | | | | summary: correct pb parallele-empty.cpp
+| | | | |
+| | o | | changeset: 2159:a9e710fd658e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Dec 10 23:51:33 2010 +0100
+| | | | | summary: add src/mpi/parallelempi-empty.cpp
+| | | | |
+| | o | | changeset: 2158:ff130a08ed27
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Dec 10 10:14:09 2010 +0100
+| | | | | summary: change default parameter in examples++-mpi/MPIGMRES3D.edp
+| | | | |
+| | o | | changeset: 2157:00ba78e75b34
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Dec 09 19:41:01 2010 +0100
+| | | | | summary: last modif for v 3.11 (may be)
+| | | | |
+| | o | | changeset: 2156:522db0c6b622
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Dec 09 18:16:14 2010 +0100
+| | | | | summary: updeta doc an exp
+| | | | |
+| | o | | changeset: 2155:4932c2907ee9
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Dec 09 17:04:13 2010 +0100
+| | | | | summary: add macro quting
+| | | | |
+| | o | | changeset: 2154:df881e2db1cd
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Dec 09 14:34:07 2010 +0100
+| | | | | summary: coorect type in getany (all int are long in freefem++)
+| | | | |
+| | o | | changeset: 2153:5545e58c84ba
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Dec 09 10:59:03 2010 +0100
+| | | | | summary: correct tetgen set coorect defauft valeu in nbregion, nbhole, ...
+| | | | |
+| | o | | changeset: 2152:143e4c285e2e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Dec 09 10:34:14 2010 +0100
+| | | | | summary: correct doc and mmg3-d interface
+| | | | |
+| | o | | changeset: 2151:ffed0beed0f2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Dec 08 23:54:37 2010 +0100
+| | | | | summary: correct pb picking ffmedit remove -O flags
+| | | | |
+| | o | | changeset: 2150:ee5ac6c2b487
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Dec 08 18:10:50 2010 +0100
+| | | | | summary: update makefie
+| | | | |
+| | o | | changeset: 2149:a01cfcb5089f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Dec 08 17:33:38 2010 +0100
+| | | | | summary: coorect freeeyam mshmet to a-have more clean option
+| | | | |
+| | o | | changeset: 2148:8016ff3a5430
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Dec 07 18:02:17 2010 +0100
+| | | | | summary: update mmg3d interface
+| | | | |
+| | o | | changeset: 2147:54b806e85c3e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Dec 07 16:32:06 2010 +0100
+| | | | | summary: coorect mshmet ..
+| | | | |
+| | o | | changeset: 2146:00ebac7181ed
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Dec 07 14:57:59 2010 +0100
+| | | | | summary: coorect configure.ac pb this blascoorectr freeyam interface with metric
+| | | | |
+| | o | | changeset: 2145:444b58f89a98
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Dec 07 13:36:42 2010 +0100
+| | | | | summary: coorect freeyams aniso
+| | | | |
+| | o | | changeset: 2144:de793b3e90c2
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Dec 03 17:44:00 2010 +0100
+| | | | | summary: add seach of MKL lib in configure (hard job)
+| | | | |
+| | o | | changeset: 2143:baa57509c9cd
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Dec 02 23:17:52 2010 +0100
+| | | | | summary: see INNOVATION correct MPIGMREs[23]d.edp example
+| | | | |
+| | o | | changeset: 2142:c01832c2d91e
+| | |\ \ \ parent: 2141:1ca02db51865
+| | | | | | parent: 2140:bae26bfb0b8c
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Dec 01 16:24:20 2010 +0100
+| | | | | | summary: merge ???
+| | | | | |
+| | | o | | changeset: 2141:1ca02db51865
+| | | | | | parent: 2139:d87b27635075
+| | | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | | date: Wed Dec 01 15:06:40 2010 +0100
+| | | | | | summary: remove file
+| | | | | |
+| | o | | | changeset: 2140:bae26bfb0b8c
+| | |/ / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Dec 01 10:44:59 2010 +0100
+| | | | | summary: correct typo
+| | | | |
+| | o | | changeset: 2139:d87b27635075
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Dec 01 10:38:32 2010 +0100
+| | | | | summary: correct the documenation
+| | | | |
+| | o | | changeset: 2138:9b4cf63d9799
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 30 22:07:42 2010 +0100
+| | | | | summary: add file for mlk lib .
+| | | | |
+| | o | | changeset: 2137:6ebd89576da6
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 30 21:05:05 2010 +0100
+| | | | | summary: correct WHERE_LIBRARY-downlaod creation
+| | | | |
+| | o | | changeset: 2136:9f7e115581d0
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 30 19:17:18 2010 +0100
+| | | | | summary: correct mistake in construction of WHERE.gmm file
+| | | | |
+| | o | | changeset: 2135:d0ec37b43744
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 30 17:50:39 2010 +0100
+| | | | | summary: go version 3.10-3
+| | | | |
+| | o | | changeset: 2134:c00bebf2d35f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 30 15:47:39 2010 +0100
+| | | | | summary: do coorect of periodic boundary condition + MUMPS link order
+| | | | |
+| | o | | changeset: 2133:0ce681a3f66e
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 25 22:06:41 2010 +0100
+| | | | | summary: add missing file
+| | | | |
+| | o | | changeset: 2132:c0a45d4c82a9
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 25 21:50:27 2010 +0100
+| | | | | summary: correct spurious print with verbosity !=0
+| | | | |
+| | o | | changeset: 2131:d0756d2ae8ed
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 25 21:37:14 2010 +0100
+| | | | | summary: remove spurio print
+| | | | |
+| | o | | changeset: 2130:9c81e54436fb
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 25 14:16:34 2010 +0100
+| | | | | summary: correct Laplace-Adapt-3d.edp
+| | | | |
+| | o | | changeset: 2129:d0f9a7e3ce91
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 24 21:20:18 2010 +0100
+| | | | | summary: correct Laplace-Adapt-3d.edp
+| | | | |
+| | o | | changeset: 2128:9628d985d017
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 24 08:55:48 2010 +0100
+| | | | | summary: coorect pb compiel on gnome
+| | | | |
+| | o | | changeset: 2127:934ff69faf4a
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 24 08:39:29 2010 +0100
+| | | | | summary: add err comment in case of mesh with isolated vertex
+| | | | |
+| | o | | changeset: 2126:e05ac461f21d
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 23 13:54:07 2010 +0100
+| | | | | summary: update INNOVATION
+| | | | |
+| | o | | changeset: 2125:5633591673ba
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 23 08:14:13 2010 +0100
+| | | | | summary: correct 3d adaptation , try to build a first true example
+| | | | |
+| | o | | changeset: 2124:76dc4c8a0cbb
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 23 07:17:26 2010 +0100
+| | | | | summary: add function to cast formal array into array [] toZarray,toRarray , toCarray
+| | | | |
+| | o | | changeset: 2123:ecb2452ebe90
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Nov 19 11:37:52 2010 +0100
+| | | | | summary: add getARGV tools
+| | | | |
+| | o | | changeset: 2122:9297b462cd46
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 18 16:31:52 2010 +0100
+| | | | | summary: next step for ff-mpirun install (dur dur)
+| | | | |
+| | o | | changeset: 2121:80914a8bb776
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 18 16:11:24 2010 +0100
+| | | | | summary: coorect makefile for ff-mpirun and add srandomdev by read /dev/random + time
+| | | | |
+| | o | | changeset: 2120:27361d73a03b
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 17 22:04:05 2010 +0100
+| | | | | summary: continung tyoo error ff-mpirun
+| | | | |
+| | o | | changeset: 2119:a4a681882e69
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 17 21:54:25 2010 +0100
+| | | | | summary: correct typo of ff-mpirun in configure.ac
+| | | | |
+| | o | | changeset: 2118:967660b728d5
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 17 21:46:20 2010 +0100
+| | | | | summary: coorect the previous add ff-run
+| | | | |
+| | o | | changeset: 2117:43b0bed1bd5b
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 17 21:13:52 2010 +0100
+| | | | | summary: coorect INNOVATION
+| | | | |
+| | o | | changeset: 2116:993567388442
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 17 21:11:58 2010 +0100
+| | | | | summary: add ff-mpirun to launch freefem++-mpi simply
+| | | | |
+| | o | | changeset: 2115:94e4e901b405
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Wed Nov 17 08:03:01 2010 +0100
+| | | | | summary: correct mistake
+| | | | |
+| | o | | changeset: 2114:d684b3efa24f
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 16 22:37:26 2010 +0100
+| | | | | summary: correct typo error in fftw3 in WHERE_LIBRARY-config
+| | | | |
+| | o | | changeset: 2113:79e95c94d4a5
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 16 20:09:36 2010 +0100
+| | | | | summary: correct mistyping in metis.cpp
+| | | | |
+| | o | | changeset: 2112:09b6d06266af
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 16 19:53:30 2010 +0100
+| | | | | summary: romve cout in metis.cpp
+| | | | |
+| | o | | changeset: 2111:ac951e2d8008
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 16 19:51:00 2010 +0100
+| | | | | summary: remove strange dump
+| | | | |
+| | o | | changeset: 2110:0addf52a6596
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Tue Nov 16 07:34:31 2010 +0100
+| | | | | summary: correct MPI version from gmone machine
+| | | | |
+| | o | | changeset: 2109:18a79ce6b201
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Nov 15 20:36:31 2010 +0100
+| | | | | summary: coorect pb of comute of area of mesh some time
+| | | | |
+| | o | | changeset: 2108:6e7efdc6c4cd
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Mon Nov 15 10:22:02 2010 +0100
+| | | | | summary: crrect atof, blas WHERE_LIBRARY
+| | | | |
+| | o | | changeset: 2107:16dedee619b5
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Fri Nov 05 09:52:22 2010 +0100
+| | | | | summary: add nex example
+| | | | |
+| | o | | changeset: 2106:5e33715c5809
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 04 19:23:41 2010 +0100
+| | | | | summary: correct output stream
+| | | | |
+| | o | | changeset: 2105:ad9c5a3700f3
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 04 18:25:58 2010 +0100
+| | | | | summary: reove test in MPIGRES2D
+| | | | |
+| | o | | changeset: 2104:27f8c8458b71
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 04 18:19:33 2010 +0100
+| | | | | summary: add missing file
+| | | | |
+| | o | | changeset: 2103:3b3bdf3ac0c5
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 04 18:10:55 2010 +0100
+| | | | | summary: clean
+| | | | |
+| | o | | changeset: 2102:b2b101c4208d
+| | | | | parent: 2099:f9822a5aea7a
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 04 18:01:07 2010 +0100
+| | | | | summary: remove pb file
+| | | | |
+o | | | | changeset: 2101:31c99c85707b
+| | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | | date: Thu Nov 04 17:48:49 2010 +0100
+| | | | | summary: add missing idp files
+| | | | |
+o---+ | | changeset: 2100:79615779ae45
+ | | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+ / / / / date: Thu Nov 04 17:48:14 2010 +0100
+| | | | summary: add new MPI example
+| | | |
+| o | | changeset: 2099:f9822a5aea7a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Nov 04 16:50:40 2010 +0100
+| | | | summary: add BinaryIO dynamic lib in example++-load
+| | | |
+| o | | changeset: 2098:530dbd02d812
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 27 14:54:30 2010 +0200
+| | | | summary: change the default size of MPI buf to 1Mo
+| | | |
+| o | | changeset: 2097:74a69bae2f83
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Oct 25 14:10:59 2010 +0200
+| | | | summary: correct MPIGMRES examples
+| | | |
+| o | | changeset: 2096:65da29614162
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 22 21:26:27 2010 +0200
+| | | | summary: correct if (1) ; // trap
+| | | |
+| o | | changeset: 2095:1388d0f67de2
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 22 15:20:08 2010 +0200
+| | | | summary: change configure.ac protect MPICMD flags Tanks to P. gostaff
+| | | |
+| o | | changeset: 2094:d732b07cba51
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 22 15:16:58 2010 +0200
+| | | | summary: reomve peace of cade for AutoDiff not use
+| | | |
+| o | | changeset: 2093:06b5aeacde3c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 22 14:08:30 2010 +0200
+| | | | summary: Add MPI CG/GMRES function for // computing
+| | | |
+| o | | changeset: 2092:ff22b8c7a500
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 08 15:39:32 2010 +0200
+| | | | summary: update INNOVATION
+| | | |
+| o | | changeset: 2091:2d8b5240b671
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 08 14:12:54 2010 +0200
+| | | | summary: correct the bug fing by O. Pantz in expression like ; a(2:)=A^-1*b(1,:)
+| | | |
+| o | | changeset: 2090:0ab0cc381341
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Oct 06 17:02:11 2010 +0200
+| | | | summary: correct make check in 3d examples dir
+| | | |
+| o | | changeset: 2089:3d4959d4b6e1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 18:34:02 2010 +0200
+| | | | summary: add missing file
+| | | |
+| o | | changeset: 2088:3748aed79d1c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 16:34:40 2010 +0200
+| | | | summary: Added tag release_3_10 for changeset f96e7099dbed
+| | | |
+| o | | changeset: 2087:f96e7099dbed
+| | | | tag: release_3_10
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 16:32:09 2010 +0200
+| | | | summary: coorect INNOVATION
+| | | |
+| o | | changeset: 2086:a0a40e1e3132
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 16:02:04 2010 +0200
+| | | | summary: add missing install files
+| | | |
+| o | | changeset: 2085:caf345bbc560
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 15:22:43 2010 +0200
+| | | | summary: correct install mpi dymanics libs
+| | | |
+| o | | changeset: 2084:03ddaceddb3e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 14:50:46 2010 +0200
+| | | | summary: add install of dynamic lin in mpi
+| | | |
+| o | | changeset: 2083:b689c5e0ebb4
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 14:06:32 2010 +0200
+| | | | summary: add "-cd" argument to change current directory to edp script directory
+| | | |
+| o | | changeset: 2082:c0c0d05d486c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 11:30:08 2010 +0200
+| | | | summary: coorect missing compile parameter in pARMS libs
+| | | |
+| o | | changeset: 2081:8626f17af8a6
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 10:49:26 2010 +0200
+| | | | summary: correct configure.ac for automatic download of mmg3d lib.
+| | | |
+| o | | changeset: 2080:672655247fbf
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Oct 05 00:42:30 2010 +0200
+| | | | summary: do modif of g++-4.6
+| | | |
+| o | | changeset: 2079:5b727e03ff94
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 01 16:36:38 2010 +0200
+| | | | summary: mistake in parm makefile
+| | | |
+| o | | changeset: 2078:e0137efef48d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 01 16:10:58 2010 +0200
+| | | | summary: version ok for ubuntu 64
+| | | |
+| o | | changeset: 2077:f43ece160238
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 01 15:47:06 2010 +0200
+| | | | summary: correctr for version 2.10xs
+| | | |
+| o | | changeset: 2076:f0b9786353ec
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 01 15:13:40 2010 +0200
+| | | | summary: coorection fort 3.10 version
+| | | |
+| o | | changeset: 2075:bc78bc18d0b1
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Oct 01 12:46:55 2010 +0200
+| | | | summary: try to close version 3.10
+| | | |
+| o | | changeset: 2074:e2b8cf20c61b
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 29 16:33:21 2010 +0200
+| | | | summary: correct IntallWHERE in gmm makefiel
+| | | |
+| o | | changeset: 2073:10b7a602f98f
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 29 15:38:54 2010 +0200
+| | | | summary: correct parms Makefile
+| | | |
+| o | | changeset: 2072:9440ff46f0ea
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Sep 29 14:19:58 2010 +0200
+| | | | summary: Add missing exemple
+| | | |
+| o | | changeset: 2071:e843df1be44d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 21 22:05:42 2010 +0200
+| | | | summary: correct -fPIC flags un blacs compilation
+| | | |
+| o | | changeset: 2070:39392778a85e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 21 21:24:17 2010 +0200
+| | | | summary: update INNOVATION
+| | | |
+| o | | changeset: 2069:22cc87fe9e3d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 21 19:14:38 2010 +0200
+| | | | summary: corecct MUMPS Makefile (missing CC,FC compile flags -fPIC )
+| | | |
+| o | | changeset: 2068:596ef1aa8971
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 21 15:12:33 2010 +0200
+| | | | summary: do autorecconf for add HAVE_SYS_TIME_H
+| | | |
+| o | | changeset: 2067:ea3d2e60219d
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 21 15:10:08 2010 +0200
+| | | | summary: coorect gmm Makefile for WHERE ...
+| | | |
+| o | | changeset: 2066:e17ed9466e08
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 21 14:13:01 2010 +0200
+| | | | summary: correct pb on download/bin creation (so time it a file not a dir)
+| | | |
+| o | | changeset: 2065:a1c8c12f1363
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 21 12:19:21 2010 +0200
+| | | | summary: correct gmm compile and WHERE def.
+| | | |
+| o | | changeset: 2064:1bed39d421c9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Sep 21 07:55:41 2010 +0200
+| | | | summary: correct PB with echo_edp
+| | | |
+| o | | changeset: 2063:14e807f30896
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Sep 20 22:49:04 2010 +0200
+| | | | summary: coorect Makefile of mmglib download ..
+| | | |
+| o | | changeset: 2062:2005c8d27803
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Sep 20 21:34:12 2010 +0200
+| | | | summary: correct mmg3lib precompile
+| | | |
+| o | | changeset: 2061:77b950c53405
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Sep 20 20:36:40 2010 +0200
+| | | | summary: add new parameter -ne to remove script output
+| | | |
+| o | | changeset: 2060:90c7c0e87652
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Sep 09 15:43:29 2010 +0200
+| | | | summary: add gmm and corretc load.link.in for windows
+| | | |
+| o | | changeset: 2059:04ef78a06b11
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Aug 31 13:18:25 2010 +0200
+| | | | summary: update README
+| | | |
+| o | | changeset: 2058:9f3f911348ff
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Aug 31 13:11:27 2010 +0200
+| | | | summary: corect innovation
+| | | |
+| o | | changeset: 2057:87b6d7922730
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Aug 31 13:10:35 2010 +0200
+| | | | summary: add missing compila of mshmet dynamc lib
+| | | |
+| o | | changeset: 2056:5b51781d6c92
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Aug 31 13:02:05 2010 +0200
+| | | | summary: upate INNOVATION
+| | | |
+| o | | changeset: 2055:1235170c0a9e
+| | | | parent: 2053:0b6fd3c42d32
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Aug 31 12:56:55 2010 +0200
+| | | | summary: correct examples++-load/Makefile.am to recreate examples++-load/WHERE_LIBRARY-download
+| | | |
+o | | | changeset: 2054:f3cbf7394995
+|/ / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Tue Aug 31 12:42:00 2010 +0200
+| | | summary: coorect typo in asssert mmg3d.cpp
+| | |
+o | | changeset: 2053:0b6fd3c42d32
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Tue Aug 31 12:30:33 2010 +0200
+| | | summary: coorech WHERE of mshlib
+| | |
+o | | changeset: 2052:b3e9a365ee44
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Tue Aug 31 12:22:40 2010 +0200
+| | | summary: add build WHERE
+| | |
+o | | changeset: 2051:ac3551adc8c2
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Tue Aug 31 11:31:55 2010 +0200
+| | | summary: coorect mshmet download compile / makefile
+| | |
+o | | changeset: 2050:4d081c4fdc8b
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Tue Aug 31 10:00:33 2010 +0200
+| | | summary: correct problem of -fPIC compile option in NOOPT C ompile setup in superludist
+| | |
+o | | changeset: 2049:b31ed80c5418
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Aug 30 22:52:10 2010 +0200
+| | | summary: coorect INNOVATION and auto compile fftw under win32
+| | |
+o | | changeset: 2048:650bf83f02fc
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Aug 30 22:46:35 2010 +0200
+| | | summary: correct problem of creation download/bin as a file not a dir.
+| | |
+o | | changeset: 2047:f08673def206
+|\ \ \ parent: 2046:d4c390fea2f5
+| | | | parent: 2043:3e424de88d66
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 30 17:30:19 2010 +0200
+| | | | summary: pass to version 3.9-2
+| | | |
+| o | | changeset: 2046:d4c390fea2f5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 30 17:27:51 2010 +0200
+| | | | summary: correct compile of freeyams and mmg3d under win32
+| | | |
+| o | | changeset: 2045:008b77f57a47
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 30 16:39:06 2010 +0200
+| | | | summary: add missing file
+| | | |
+| o | | changeset: 2044:226800ecaa6d
+| | | | parent: 2041:76820d79834a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 30 16:26:41 2010 +0200
+| | | | summary: put c++ maning in eigen.h
+| | | |
+o | | | changeset: 2043:3e424de88d66
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Aug 30 13:56:19 2010 +0200
+| | | | summary: correc mmg3d interface (j. Morice) )
+| | | |
+o | | | changeset: 2042:e6a1f7c85239
+|/ / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Aug 30 13:43:47 2010 +0200
+| | | summary: coorect mmg3d interface
+| | |
+o | | changeset: 2041:76820d79834a
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Mon Aug 30 10:31:52 2010 +0200
+| | | summary: correct DOC and add dep in ilut.cpp
+| | |
+o | | changeset: 2040:6e07fc2d42f8
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Aug 27 17:53:53 2010 +0200
+| | | summary: update INNOVATION remove warning on pastix
+| | |
+o | | changeset: 2039:7cf7e1a0a897
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Aug 27 17:51:18 2010 +0200
+| | | summary: correct problem to compile pastix, scotch undex ubuntu linux.
+| | |
+o | | changeset: 2038:f6214647e5ab
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Aug 27 16:32:55 2010 +0200
+| | | summary: coorect -fPIC option on Fortrn
+| | |
+o | | changeset: 2037:e79df603fcab
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Aug 27 11:17:59 2010 +0200
+| | | summary: coorect fftw Makefie
+| | |
+o | | changeset: 2036:99c51676b313
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Aug 27 11:00:33 2010 +0200
+| | | summary: coorect mpi examples essa.edp an add wiat=1 in all medit call (bug on mac ???)
+| | |
+o | | changeset: 2035:7b14eaf9f3ed
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Aug 27 09:32:47 2010 +0200
+| | | summary: update INNOVATION
+| | |
+o | | changeset: 2034:0692ff74ab24
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Aug 27 09:28:57 2010 +0200
+| | | summary: correct problem of dynamic lib with or without mpi
+| | |
+o | | changeset: 2033:c91026108711
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Thu Aug 26 20:39:46 2010 +0200
+| | | summary: add missing file DOC/plots/multiendmesh.eps
+| | |
+o | | changeset: 2032:e6b7488922a9
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Thu Aug 26 20:37:52 2010 +0200
+| | | summary: add missing file
+| | |
+o | | changeset: 2031:704b3d3af23d
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Thu Aug 26 18:55:46 2010 +0200
+| | | summary: See INNOVATION file for explaination of this change
+| | |
+o | | changeset: 2030:e773af6b91a7
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Aug 06 11:26:27 2010 +0200
+| | | summary: correct configure mpi search when no full path are given (FH).
+| | |
+o | | changeset: 2029:922d59d4af75
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Sat Jul 10 22:06:05 2010 +0200
+| | | summary: correct mistake in download/pastix/Makefile
+| | |
+o | | changeset: 2028:a2bd2ad4e78a
+| | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Fri Jul 09 21:06:22 2010 +0200
+| | | summary: update REDME and INNOVATION
+| | |
+o | | changeset: 2027:14f495eec0bd
+|\ \ \ parent: 2025:6bc312b89041
+| | | | parent: 2026:3b1e208730b0
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Jul 09 19:16:41 2010 +0200
+| | | | summary: coorect MUMPS link liste.
+| | | |
+| o | | changeset: 2026:3b1e208730b0
+| | | | parent: 2015:d14d5fe73ed9
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Jul 09 18:57:24 2010 +0200
+| | | | summary: do change un MUMPS_FreeFem.cpp
+| | | |
+o | | | changeset: 2025:6bc312b89041
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Fri Jul 09 18:51:13 2010 +0200
+| | | | summary: correct a mistake in set metric in adapt mesh, thank to J-F Remarcle.
+| | | |
+o | | | changeset: 2024:e08ce8c8a5d2
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jun 30 22:39:42 2010 +0200
+| | | | summary: correct missing mpi_include flges in superlu-dist makefile
+| | | |
+o | | | changeset: 2023:121ef5fadbf5
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jun 30 18:38:41 2010 +0200
+| | | | summary: update
+| | | |
+o | | | changeset: 2022:e38e2dcabc3c
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jun 30 17:06:08 2010 +0200
+| | | | summary: add missing file and correct download/Makefile.am to remove
+| | | |
+o | | | changeset: 2021:22b443fb5915
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jun 30 15:19:30 2010 +0200
+| | | | summary: correct pastix complex interface
+| | | |
+o | | | changeset: 2020:b469944f3b63
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Tue Jun 29 13:59:08 2010 +0200
+| | | | summary: corret ff-get-dep.in
+| | | |
+o | | | changeset: 2019:7613e18949b0
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Mon Jun 28 10:49:33 2010 +0200
+| | | | summary: remove stupid assert (matrix sym is CG)
+| | | |
+o | | | changeset: 2018:6be89be787cc
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Jun 26 22:02:09 2010 +0200
+| | | | summary: correct hips and pastix interface
+| | | |
+o | | | changeset: 2017:e95f7c430680
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Sat Jun 26 21:59:25 2010 +0200
+| | | | summary: coorect stupid bug (due to remove static).
+| | | |
+o | | | changeset: 2016:4b93ae958d23
+|/ / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Sat Jun 26 21:46:05 2010 +0200
+| | | summary: Correct pastix
+| | |
+o | | changeset: 2015:d14d5fe73ed9
+|\ \ \ parent: 2010:3bcb7b38c34a
+| | | | parent: 2014:7a83a063e59e
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jun 17 10:57:12 2010 +0200
+| | | | summary: update README_HG
+| | | |
+| o | | changeset: 2014:7a83a063e59e
+| | | | user: Antoine Le Hyaric
+| | | | date: Thu Jun 17 09:00:54 2010 +0200
+| | | | summary: Modified by Antoine Le Hyaric on iris.ann.jussieu.fr
+| | | |
+| o | | changeset: 2013:b72032208ab2
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Jun 16 17:13:41 2010 +0200
+| | | | summary: Modified by Antoine Le Hyaric on iris.ann.jussieu.fr
+| | | |
+| o | | changeset: 2012:85e200ee9012
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Jun 16 15:10:12 2010 +0200
+| | | | summary: Modified by Antoine Le Hyaric on iris.ann.jussieu.fr
+| | | |
+| o | | changeset: 2011:8bf4c30f32bf
+| | | | parent: 2007:b47cd9ba79ca
+| | | | user: Antoine Le Hyaric
+| | | | date: Wed Jun 16 10:44:29 2010 +0200
+| | | | summary: converting from CVS to Mercurial
+| | | |
+o | | | changeset: 2010:3bcb7b38c34a
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Thu Jun 17 10:44:16 2010 +0200
+| | | | summary: correct download makefile
+| | | |
+o | | | changeset: 2009:1ba4e27c2764
+| | | | user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | | date: Wed Jun 16 21:16:16 2010 +0200
+| | | | summary: add build .hgrc comment
+| | | |
+o | | | changeset: 2008:7344a2077883
+|/ / / user: Frederic Hecht <frederic.hecht at upmc.fr>
+| | | date: Wed Jun 16 18:53:05 2010 +0200
+| | | summary: try
+| | |
+o | | changeset: 2007:b47cd9ba79ca
+| | | user: Antoine Le Hyaric
+| | | date: Wed Jun 16 10:31:22 2010 +0200
+| | | summary: converting from CVS to Mercurial
+| | |
+o | | changeset: 2006:3bb8e4bb93b7
+| | | parent: 1962:f5cdd2662eb6
+| | | user: convert-repo
+| | | date: Wed Jun 16 07:27:03 2010 +0000
+| | | summary: update tags
+| | |
+| o | changeset: 2005:815102f120b1
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Fri Jun 04 15:26:59 2004 +0200
+| | | summary: Compilation ok sur Hydre.
+| | |
+| o | changeset: 2004:6eb70bcaac52
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Fri Jun 04 12:06:26 2004 +0200
+| | | summary: Compilation ok sur idared
+| | |
+| o | changeset: 2003:ff717298a121
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Thu Jun 03 16:02:58 2004 +0200
+| | | summary: Les bibliothèques BLAS, ARPACK et UMFPACK sont automatiquement téléchargées
+| | |
+| o | changeset: 2002:edf4f99d7e54
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Wed Jun 02 12:39:56 2004 +0200
+| | | summary: Configuration des telechargements en cours
+| | |
+| o | changeset: 2001:06b2ccabec8d
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Wed Jun 02 12:30:30 2004 +0200
+| | | summary: Configuration des telechargements en cours
+| | |
+| o | changeset: 2000:092b0b13310c
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Wed Jun 02 11:34:04 2004 +0200
+| | | summary: Ajout des libs Blas, Arpack et Umfpack en cours sous Windows
+| | |
+| o | changeset: 1999:3fd33de0d94b
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue Jun 01 17:11:53 2004 +0200
+| | | summary: Premiere installation Windows
+| | |
+| o | changeset: 1998:0def60c97d19
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Fri May 28 14:13:19 2004 +0200
+| | | summary: Le rpertoir src/std contient maintenant non plus une version x11 mais
+| | |
+| o | changeset: 1997:2eaf38b528a1
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Thu May 27 17:00:47 2004 +0200
+| | | summary: Toute première version de FreeFem++ compilable sur Windows avec Cygwin,
+| | |
+| o | changeset: 1996:931a8adc93ae
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Wed May 26 11:21:29 2004 +0200
+| | | summary: Clarification de quelques commentaires.
+| | |
+| o | changeset: 1995:6bc565381b22
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue May 25 16:14:21 2004 +0200
+| | | summary: Trois options de configuration manuelle ajoutées:
+| | |
+| o | changeset: 1994:f40848886dac
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue May 25 15:05:32 2004 +0200
+| | | summary: - Modification de la procédure de test pour exécuter les scripts all.edp
+| | |
+| o | changeset: 1993:70dc0e4a4a0a
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue May 25 10:50:09 2004 +0200
+| | | summary: Automake ok pour X11 sur MacOS X.
+| | |
+| o | changeset: 1992:b140ece42b7e
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Mon May 24 19:12:19 2004 +0200
+| | | summary: Ajoute l'extension "-g" à la version debug des programmes en vue
+| | |
+| o | changeset: 1991:eed90ccfb2f9
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Mon May 24 18:19:41 2004 +0200
+| | | summary: Automake ok sur Debian/Testing.
+| | |
+| o | changeset: 1990:75cdc2370b75
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Mon May 24 17:31:34 2004 +0200
+| | | summary: Test de la configuration Automake sur macserv2+X11: compilation ok.
+| | |
+| o | changeset: 1989:746910bc7d39
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Mon May 24 14:57:10 2004 +0200
+| | | summary: Début de configuration de FreeFem++ sur Windows/Cygwin.
+| | |
+| o | changeset: 1988:9e62c7a49ce5
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Mon May 24 11:19:18 2004 +0200
+| | | summary: Intégration de la bibliothèque Umfpack dans la configuration et
+| | |
+| o | changeset: 1987:e413f1a2441f
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Wed May 19 15:46:55 2004 +0200
+| | | summary: Ajoute src/Eigen/eigenvalue.cpp dans la bibliothèque src/fflib/libff.a
+| | |
+| o | changeset: 1986:7c581dff37a2
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Wed May 19 15:06:18 2004 +0200
+| | | summary: Première version de la procédure de test de non-regression.
+| | |
+| o | changeset: 1985:dadd01f5b506
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Wed May 19 13:52:55 2004 +0200
+| | | summary: Amélioration de la gestion des numéros de version.
+| | |
+| o | changeset: 1984:aa87846f7d99
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Wed May 19 11:05:24 2004 +0200
+| | | summary: Automake configuré sur macserv2
+| | |
+| o | changeset: 1983:2f557c31cc18
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue May 18 18:10:17 2004 +0200
+| | | summary: Configuration de la compilation sur MacOSX toujours en cours.
+| | |
+| o | changeset: 1982:f749df09dd6a
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue May 18 18:00:00 2004 +0200
+| | | summary: Configuration de la procédure de compilation sur MacOSX en cours.
+| | |
+| o | changeset: 1981:82ad80a2167a
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue May 18 17:35:36 2004 +0200
+| | | summary: Compilation ok sur Debian/Testing et Debian/Unstable
+| | |
+| o | changeset: 1980:fcd66b328bfb
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue May 18 17:08:36 2004 +0200
+| | | summary: Modification de l'arborescence des répertoires dans src/ afin de placer
+| | |
+| o | changeset: 1979:775f666ab880
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Tue May 18 12:02:34 2004 +0200
+| | | summary: Transformation de la compilation de programmes multiples (-g, -nw, -x11, ...)
+| | |
+| o | changeset: 1978:f8525919fd4c
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Mon May 17 11:46:26 2004 +0200
+| | | summary: Intégration de Arpack et Umfpack en cours sur plusieurs architectures
+| | |
+| o | changeset: 1977:c78650dfe24a
+| | | branch: alh-autoconf
+| | | user: hecht
+| | | date: Mon May 17 11:23:06 2004 +0200
+| | | summary: *** empty log message ***
+| | |
+| o | changeset: 1976:1e1d2a42cfb1
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Fri May 14 11:48:00 2004 +0200
+| | | summary: Test de la présence de mpiCC ajouté (s'il est absent, la version
+| | |
+| o | changeset: 1975:a25dd9092df7
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Fri May 14 10:08:22 2004 +0200
+| | | summary: Extension de la recherche de la bibliothèque BLAS.
+| | |
+| o | changeset: 1974:74d24eef730c
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Thu May 13 14:54:09 2004 +0200
+| | | summary: Quelques nouveaux fichiers installés par la procédure standard Autoreconf -i.
+| | |
+| o | changeset: 1973:dfa4239b5f28
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Thu May 13 14:45:32 2004 +0200
+| | | summary: La procédure Automake + Autoconf a été testée sur Hydre (Debian Testing).
+| | |
+| o | changeset: 1972:a00adb8d7dee
+| | | branch: alh-autoconf
+| | | user: lehyaric
+| | | date: Thu May 13 14:08:11 2004 +0200
+| | | summary: Essai de configuration de autoconf en cours.
+| | |
+| o | changeset: 1971:44cb3e95ebcc
+| | | branch: alh-autoconf
+| | | parent: 0:6d28b8993874
+| | | user: lehyaric
+| | | date: Thu May 13 14:00:37 2004 +0200
+| | | summary: Intégration de Autoconf et Automake dans la procédure de build en cours.
+| | |
+| | o changeset: 1970:44a4659127b5
+| | | branch: graphical-user-interface-branch
+| | | tag: merged_from_gui_branch_to_trunk
+| | | user: lehyaric
+| | | date: Thu Nov 04 17:26:54 2004 +0100
+| | | summary: The zoom facility is operational.
+| | |
+| | o changeset: 1969:5c2f1f4412eb
+| | | branch: graphical-user-interface-branch
+| | | user: lehyaric
+| | | date: Thu Oct 28 18:18:46 2004 +0200
+| | | summary: IDE client currently being debugged. IDE server not connected yet.
+| | |
+| | o changeset: 1968:0b0a37bf6daa
+| | | branch: graphical-user-interface-branch
+| | | user: lehyaric
+| | | date: Wed Oct 27 16:16:51 2004 +0200
+| | | summary: Client/server IDE compiles, but the server process does not run yet.
+| | |
+| | o changeset: 1967:c8afa28839f5
+| | | branch: graphical-user-interface-branch
+| | | user: lehyaric
+| | | date: Mon Oct 25 17:29:43 2004 +0200
+| | | summary: client/server framework done. But the program is still far from compiling.
+| | |
+| | o changeset: 1966:f97ec9365063
+| | | branch: graphical-user-interface-branch
+| | | user: lehyaric
+| | | date: Thu Oct 21 17:19:57 2004 +0200
+| | | summary: Client/server version of FreeFEM++ IDE currently being implemented.
+| | |
+| | o changeset: 1965:958059001887
+| | | branch: graphical-user-interface-branch
+| | | user: lehyaric
+| | | date: Thu Oct 21 10:39:01 2004 +0200
+| | | summary: Reverts object "Global" back to static storage temporarily, while Frederic
+| | |
+| | o changeset: 1964:82cbca1c015f
+| | | branch: graphical-user-interface-branch
+| | | user: lehyaric
+| | | date: Fri Oct 15 16:57:02 2004 +0200
+| | | summary: The IDE is programmed and compiled, but not running yet.
+| | |
+| | o changeset: 1963:510c87bb28bb
+| |/ branch: graphical-user-interface-branch
+| | parent: 0:6d28b8993874
+| | user: lehyaric
+| | date: Fri Oct 08 12:21:58 2004 +0200
+| | summary: First model of an Integrated Development Environment for FreeFem++.
+| |
+o | changeset: 1962:f5cdd2662eb6
+| | user: hecht
+| | date: Fri Jun 04 16:26:08 2010 +0200
+| | summary: coorect sunstring tools
+| |
+o | changeset: 1961:85ef460011b5
+| | user: hecht
+| | date: Fri Jun 04 13:27:24 2010 +0200
+| | summary: add missing cast operator from SubString to string
+| |
+o | changeset: 1960:9d02a34af84e
+| | user: morice
+| | date: Thu Jun 03 11:54:37 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1959:60960c8ea65f
+| | user: morice
+| | date: Wed Jun 02 18:28:54 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1958:7c18ab4a9896
+| | user: hecht
+| | date: Tue May 11 15:27:37 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1957:a54b6ce6a7e3
+| | user: hecht
+| | date: Mon May 10 23:35:08 2010 +0200
+| | summary: continue WHERE configure.ac
+| |
+o | changeset: 1956:1d450f2bff65
+| | user: hecht
+| | date: Mon May 10 22:34:17 2010 +0200
+| | summary: add where seach
+| |
+o | changeset: 1955:7b465c06c9d2
+| | user: hecht
+| | date: Mon May 10 13:41:42 2010 +0200
+| | summary: essai find where for downlaod
+| |
+o | changeset: 1954:395d818be60c
+| | user: hecht
+| | date: Mon May 10 13:37:11 2010 +0200
+| | summary: correct essai
+| |
+o | changeset: 1953:140dcce8e72d
+| | user: hecht
+| | date: Mon May 10 13:35:14 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1952:427b025b4dc9
+| | user: hecht
+| | date: Mon May 10 11:54:05 2010 +0200
+| | summary: essai de generation de WHERE-LIB
+| |
+o | changeset: 1951:6e7c71e22ab1
+| | user: hecht
+| | date: Sat May 08 20:44:14 2010 +0200
+| | summary: change MPI parameter
+| |
+o | changeset: 1950:b924356b1e5b
+| | user: hecht
+| | date: Thu May 06 23:20:39 2010 +0200
+| | summary: try to find mpi with better way
+| |
+o | changeset: 1949:908a3c5af9ad
+| | user: hecht
+| | date: Thu May 06 16:04:20 2010 +0200
+| | summary: update OP
+| |
+o | changeset: 1948:745ef197dbca
+| | user: hecht
+| | date: Thu May 06 16:04:07 2010 +0200
+| | summary: update OP.
+| |
+o | changeset: 1947:96c42270bc55
+| | user: hecht
+| | date: Thu May 06 15:03:39 2010 +0200
+| | summary: correct win32 trick
+| |
+o | changeset: 1946:f7b235f1755a
+| | user: hecht
+| | date: Thu May 06 14:34:18 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1945:9c1e8dcd9100
+| | user: hecht
+| | date: Thu May 06 14:33:58 2010 +0200
+| | summary: co
+| |
+o | changeset: 1944:f081711c3135
+| | user: hecht
+| | date: Fri Apr 30 17:45:19 2010 +0200
+| | summary: change to freeyam
+| |
+o | changeset: 1943:9fadf6558ab1
+| | user: hecht
+| | date: Fri Apr 30 08:25:05 2010 +0200
+| | summary: upat configire.ac
+| |
+o | changeset: 1942:ffa7bb4d488a
+| | user: hecht
+| | date: Thu Apr 29 23:14:40 2010 +0200
+| | summary: add freeyams interface
+| |
+o | changeset: 1941:18f1981049b6
+| | user: hecht
+| | date: Thu Apr 29 23:13:49 2010 +0200
+| | summary: update configure.ac for add MPIRUN
+| |
+o | changeset: 1940:a4a4f315dc9c
+| | user: hecht
+| | date: Wed Apr 28 13:22:09 2010 +0200
+| | summary: a not to bad download directory
+| |
+o | changeset: 1939:9d8173ab1050
+| | user: hecht
+| | date: Tue Apr 27 22:06:49 2010 +0200
+| | summary: mise a jour
+| |
+o | changeset: 1938:23e898259fef
+| | user: hecht
+| | date: Tue Apr 27 14:30:52 2010 +0200
+| | summary: correct mistake in download dir
+| |
+o | changeset: 1937:828fe5ca6699
+| | user: hecht
+| | date: Fri Apr 23 18:34:16 2010 +0200
+| | summary: add new file
+| |
+o | changeset: 1936:55b9e8dbc3ff
+| | user: hecht
+| | date: Fri Apr 23 18:32:39 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1935:49eca60e042b
+| | user: hecht
+| | date: Fri Apr 23 11:24:01 2010 +0200
+| | summary: try to build automaticaly all parallele solver (huge work)
+| |
+o | changeset: 1934:e5293a9cdc8a
+| | user: hecht
+| | date: Thu Apr 22 11:28:45 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1933:fc1f6516d8f0
+| | user: morice
+| | date: Thu Apr 15 16:46:45 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1932:d7e0beb48e5e
+| | user: morice
+| | date: Thu Apr 15 11:22:43 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1931:629f1fe03042
+| | user: morice
+| | date: Thu Apr 15 10:59:20 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1930:0c7899097de2
+| | user: morice
+| | date: Mon Apr 12 15:45:36 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1929:a2b19da7465a
+| | user: morice
+| | date: Mon Apr 12 15:36:54 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1928:86be041b52dd
+| | user: morice
+| | date: Mon Apr 12 15:19:21 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1927:937c2afd093f
+| | user: morice
+| | date: Thu Apr 08 16:43:25 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1926:923abf222ca2
+| | user: hecht
+| | date: Thu Apr 01 21:46:42 2010 +0200
+| | summary: pass to version 3.8-2
+| |
+o | changeset: 1925:aacaad3df8f6
+| | user: morice
+| | date: Thu Apr 01 14:41:54 2010 +0200
+| | summary: orientation for element in movemesh3
+| |
+o | changeset: 1924:11023f67b884
+| | user: hecht
+| | date: Thu Apr 01 10:47:43 2010 +0200
+| | summary: add sphere6.edp
+| |
+o | changeset: 1923:83a1575669f0
+| | user: hecht
+| | date: Wed Mar 31 15:13:12 2010 +0200
+| | summary: correct
+| |
+o | changeset: 1922:04a73c54e6ee
+| | user: hecht
+| | date: Wed Mar 31 14:55:09 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1921:08a259f0ce22
+| | user: morice
+| | date: Wed Mar 31 10:54:59 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1920:e36d5fe8cd03
+| | user: hecht
+| | date: Wed Mar 31 10:50:56 2010 +0200
+| | summary: coorect makefile
+| |
+o | changeset: 1919:55571ba570f9
+| | user: hecht
+| | date: Wed Mar 31 10:31:56 2010 +0200
+| | summary: add new makefile
+| |
+o | changeset: 1918:e781b347a370
+| | user: hecht
+| | date: Tue Mar 30 13:45:47 2010 +0200
+| | summary: update parmetis files
+| |
+o | changeset: 1917:d90c1e2a30f9
+| | user: morice
+| | date: Mon Mar 29 11:58:30 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1916:c4bcfced6f13
+| | user: morice
+| | date: Mon Mar 29 11:19:45 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1915:b80817aa7ee7
+| | user: morice
+| | date: Mon Mar 29 11:07:16 2010 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1914:65fdb04766e3
+| | user: morice
+| | date: Fri Mar 26 17:38:56 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1913:f4000b122243
+| | user: morice
+| | date: Fri Mar 26 16:18:32 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1912:a33e7018c5a9
+| | user: morice
+| | date: Fri Mar 26 15:15:29 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1911:39e22b59029d
+| | user: hecht
+| | date: Mon Mar 22 17:18:27 2010 +0100
+| | summary: correct configure.ac mpicxx whta unset before
+| |
+o | changeset: 1910:2c1683ac514a
+| | user: morice
+| | date: Mon Mar 22 12:24:25 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1909:8740c5457454
+| | user: morice
+| | date: Mon Mar 22 12:19:55 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1908:a3f4d18feef7
+| | user: morice
+| | date: Mon Mar 22 12:13:11 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1907:98cf6430a6d4
+| | user: morice
+| | date: Mon Mar 22 12:09:59 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1906:379861275764
+| | user: morice
+| | date: Fri Mar 19 15:37:02 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1905:b763fb4d6610
+| | user: morice
+| | date: Fri Mar 19 15:27:54 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1904:c86ddaec83d9
+| | user: morice
+| | date: Fri Mar 19 15:05:39 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1903:cd1703be1487
+| | user: morice
+| | date: Fri Mar 19 14:55:59 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1902:296133abf0d2
+| | user: morice
+| | date: Fri Mar 19 14:52:59 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1901:090d8fd21d56
+| | user: morice
+| | date: Fri Mar 19 14:43:48 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1900:8f61eac2a513
+| | user: morice
+| | date: Fri Mar 19 14:41:13 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1899:6747aaf6981a
+| | user: morice
+| | date: Fri Mar 19 14:40:11 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1898:fe5c75d39268
+| | user: morice
+| | date: Fri Mar 19 14:38:29 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1897:67532e425d3c
+| | user: morice
+| | date: Fri Mar 19 14:33:01 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1896:53e8bdd5722a
+| | user: morice
+| | date: Fri Mar 19 14:26:45 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1895:dad309f83d1a
+| | user: morice
+| | date: Fri Mar 19 14:22:24 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1894:42de76dbd6f2
+| | user: morice
+| | date: Fri Mar 19 14:18:40 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1893:6f2006878f1f
+| | user: morice
+| | date: Fri Mar 19 14:16:44 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1892:6aadc8bba606
+| | user: morice
+| | date: Fri Mar 19 13:41:21 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1891:4dc3e10452dd
+| | user: hecht
+| | date: Tue Mar 09 11:08:40 2010 +0100
+| | summary: correct type ilu.cpp -> ilut.cpp in makefile
+| |
+o | changeset: 1890:6f245ceae4ce
+| | user: hecht
+| | date: Sun Mar 07 18:53:45 2010 +0100
+| | summary: add missing file
+| |
+o | changeset: 1889:827ddd73fd36
+| | user: hecht
+| | date: Sun Mar 07 18:27:41 2010 +0100
+| | summary: pass to versio 3.8-1
+| |
+o | changeset: 1888:216ef2fd580b
+| | user: hecht
+| | date: Sun Mar 07 18:16:30 2010 +0100
+| | summary: correct bug in return real[int,int] func
+| |
+o | changeset: 1887:7f1fa00f6f88
+| | user: hecht
+| | date: Thu Feb 25 14:52:51 2010 +0100
+| | summary: add flag in freefem++ command -ffg 'ffg command path' with a traitement of space path.
+| |
+o | changeset: 1886:eb7357e5511a
+| | user: hecht
+| | date: Wed Feb 10 16:30:50 2010 +0100
+| | summary: corct innovation
+| |
+o | changeset: 1885:2542e1d811e8
+| | user: hecht
+| | date: Wed Feb 10 16:21:35 2010 +0100
+| | summary: correct change renum triangle
+| |
+o | changeset: 1884:2436e52254e4
+| | user: hecht
+| | date: Wed Feb 10 13:04:32 2010 +0100
+| | summary: add renumbering of vertex in 2d mesh.
+| |
+o | changeset: 1883:931d93f9ac39
+| | user: hecht
+| | date: Tue Feb 09 15:53:51 2010 +0100
+| | summary: add tellp tellg seekp seekg
+| |
+o | changeset: 1882:4fc2a406c26d
+| | user: hecht
+| | date: Tue Feb 09 11:57:23 2010 +0100
+| | summary: add seekg and teelg
+| |
+o | changeset: 1881:3d1237b0e08f
+| | user: hecht
+| | date: Tue Feb 09 10:00:13 2010 +0100
+| | summary: change all.edp build rule
+| |
+o | changeset: 1880:10c734721deb
+| | user: hecht
+| | date: Mon Feb 08 19:58:31 2010 +0100
+| | summary: correct makefile
+| |
+o | changeset: 1879:e3df8d40fb1c
+| | user: hecht
+| | date: Mon Feb 08 19:23:24 2010 +0100
+| | summary: add missing file
+| |
+o | changeset: 1878:8a8a0b9efed9
+| | user: hecht
+| | date: Mon Feb 08 19:15:35 2010 +0100
+| | summary: correct ' operator in lot of case
+| |
+o | changeset: 1877:29d816db94eb
+| | user: hecht
+| | date: Thu Feb 04 20:30:07 2010 +0100
+| | summary: update INNOVATION
+| |
+o | changeset: 1876:4ecd608b125d
+| | user: hecht
+| | date: Thu Feb 04 20:10:15 2010 +0100
+| | summary: unify lapack and fflapack load interface.
+| |
+o | changeset: 1875:91c414a420a3
+| | user: morice
+| | date: Thu Feb 04 15:20:38 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1874:7af250db5757
+| | user: hecht
+| | date: Thu Feb 04 14:48:24 2010 +0100
+| | summary: correct lapack seack lib.
+| |
+o | changeset: 1873:bf8ac5ac2f55
+| | user: hecht
+| | date: Thu Feb 04 11:15:07 2010 +0100
+| | summary: correct problem of include search path
+| |
+o | changeset: 1872:fb13ee753e57
+| | user: hecht
+| | date: Wed Feb 03 09:22:35 2010 +0100
+| | summary: add 3d schwarz 3d
+| |
+o | changeset: 1871:a422afbf9671
+| | user: hecht
+| | date: Tue Feb 02 20:51:19 2010 +0100
+| | summary: commeit tipo error
+| |
+o | changeset: 1870:fc69c1fef879
+| | user: hecht
+| | date: Tue Feb 02 20:34:51 2010 +0100
+| | summary: add volume
+| |
+o | changeset: 1869:c71bd076f2ec
+| | user: hecht
+| | date: Mon Feb 01 13:45:14 2010 +0100
+| | summary: add tools to get fort wrapper name
+| |
+o | changeset: 1868:f66e3f760562
+| | user: hecht
+| | date: Mon Feb 01 10:50:12 2010 +0100
+| | summary: Update co,figure.ac of MPIF77 , ..., sizeof it, long
+| |
+o | changeset: 1867:0d16ed2eac32
+| | user: hecht
+| | date: Sun Jan 31 17:24:57 2010 +0100
+| | summary: add MPI fortran and CC interface
+| |
+o | changeset: 1866:238d2e7a177d
+| | user: hecht
+| | date: Thu Jan 28 20:38:21 2010 +0100
+| | summary: correct edp to idp dir of search .idp files
+| |
+o | changeset: 1865:769324bb4d73
+| | user: hecht
+| | date: Thu Jan 28 17:44:36 2010 +0100
+| | summary: change refface= en label=
+| |
+o | changeset: 1864:e7899c82f054
+| | user: hecht
+| | date: Mon Jan 25 09:10:25 2010 +0100
+| | summary: correct plot of array of FE with new version
+| |
+o | changeset: 1863:f298bac1900c
+| | user: hecht
+| | date: Mon Jan 25 07:17:34 2010 +0100
+| | summary: a littte improvante in ffglut (visu of 3d mesh)
+| |
+o | changeset: 1862:2b1dc85030ca
+| | user: hecht
+| | date: Mon Jan 25 06:47:11 2010 +0100
+| | summary: ad seekp of ostream file ...
+| |
+o | changeset: 1861:c1e242006cc8
+| | user: hecht
+| | date: Mon Jan 25 06:40:08 2010 +0100
+| | summary: correct topy in 3d plot
+| |
+o | changeset: 1860:bf0657d69e94
+| | user: hecht
+| | date: Mon Jan 25 05:57:40 2010 +0100
+| | summary: remove F77_WRAPPER form configure trap on my mac with fort77
+| |
+o | changeset: 1859:fe7b9cd0f709
+| | user: hecht
+| | date: Mon Jan 25 05:47:31 2010 +0100
+| | summary: pass to version 3.8
+| |
+o | changeset: 1858:a9c19984fadd
+| | user: hecht
+| | date: Thu Jan 14 16:18:03 2010 +0100
+| | summary: coorect computation of eigen value on complex full matrix
+| |
+o | changeset: 1857:f51530740c5c
+| | user: hecht
+| | date: Wed Jan 13 22:41:46 2010 +0100
+| | summary: add possibility to put array in int1d,int2d,int3d,on key word to set
+| |
+o | changeset: 1856:e6130f5019ba
+| | user: hecht
+| | date: Wed Jan 13 18:06:46 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1855:52a7add0311b
+| | user: hecht
+| | date: Wed Jan 13 18:03:59 2010 +0100
+| | summary: for mingw freeglut version ....
+| |
+o | changeset: 1854:b7177e4145d5
+| | user: hecht
+| | date: Wed Jan 13 17:28:33 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1853:6d8ecc9202f5
+| | user: hecht
+| | date: Wed Jan 13 17:24:39 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1852:9bed1f5c517e
+| | user: hecht
+| | date: Wed Jan 13 17:16:01 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1851:5cc23ea21a59
+| | user: hecht
+| | date: Wed Jan 13 16:06:17 2010 +0100
+| | summary: correct typo in configure.ac under win32
+| |
+o | changeset: 1850:2ba47239afb6
+| | user: hecht
+| | date: Wed Jan 13 15:14:59 2010 +0100
+| | summary: correct to must cou
+| |
+o | changeset: 1849:421529d5cb67
+| | user: hecht
+| | date: Wed Jan 13 11:02:08 2010 +0100
+| | summary: correction in bamg for 2d ring shaped sub domaines
+| |
+o | changeset: 1848:795d2400a80a
+| | user: hecht
+| | date: Tue Jan 12 23:38:00 2010 +0100
+| | summary: patch gmsh Christophe Trophime <christophe.trophime at grenoble.cnrs.fr>
+| |
+o | changeset: 1847:03c7f9f5f133
+| | user: hecht
+| | date: Tue Jan 12 21:17:48 2010 +0100
+| | summary: try to build configure for mingw ...
+| |
+o | changeset: 1846:48b1cd3c2e4b
+| | user: morice
+| | date: Tue Jan 12 16:15:59 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1845:f7b3d045a617
+| | user: hecht
+| | date: Tue Jan 12 13:53:05 2010 +0100
+| | summary: add exemple
+| |
+o | changeset: 1844:c603be120d2d
+| | user: atenekeng
+| | date: Mon Jan 11 23:19:32 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1843:07d39562f84d
+| | user: hecht
+| | date: Mon Jan 11 21:02:55 2010 +0100
+| | summary: ass Superlu to version 4.0
+| |
+o | changeset: 1842:9652d9a1931e
+| | user: hecht
+| | date: Mon Jan 11 17:52:18 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1841:735fdff39099
+| | user: hecht
+| | date: Sun Jan 10 22:47:14 2010 +0100
+| | summary: correct spuriou cout
+| |
+o | changeset: 1840:6c1591ad5660
+| | user: morice
+| | date: Tue Jan 05 15:46:48 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1839:3b36b0cdd71f
+| | user: morice
+| | date: Tue Jan 05 14:10:13 2010 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1838:6453b34c9217
+| | user: hecht
+| | date: Sun Dec 27 19:17:04 2009 +0100
+| | summary: correct fortran link edition in case of incompatible g7è/gfortran and g++
+| |
+o | changeset: 1837:5110dfd736f3
+| | user: hecht
+| | date: Sun Dec 27 19:01:36 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1836:6b80ef98c41c
+| | user: hecht
+| | date: Sun Dec 27 18:55:46 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1835:bc55abed1921
+| | user: hecht
+| | date: Sun Dec 27 18:51:04 2009 +0100
+| | summary: coorect gfrotran / lib pb
+| |
+o | changeset: 1834:02bcb3362a47
+| | user: hecht
+| | date: Sun Dec 27 18:43:44 2009 +0100
+| | summary: correct configure un case of gfortran with not same version than gcc.
+| |
+o | changeset: 1833:8ae1bbb6b9e1
+| | user: hecht
+| | date: Sun Dec 27 18:24:51 2009 +0100
+| | summary: correct iovtk.cpp (add tekplot case)
+| |
+o | changeset: 1832:6e3050d3aacf
+| | user: hecht
+| | date: Sun Dec 27 12:09:54 2009 +0100
+| | summary: add build interpolation interpolation matrix in 3d
+| |
+o | changeset: 1831:d117aa62e8d2
+| | user: hecht
+| | date: Fri Dec 18 10:00:30 2009 +0100
+| | summary: pass in version 3.7-1 and correct compilation CFLAGS under 64 architecture.
+| |
+o | changeset: 1830:749462a2fc20
+| | user: hecht
+| | date: Fri Dec 11 14:23:48 2009 +0100
+| | summary: trunc3d.cpp is now in mesh3.cpp
+| |
+o | changeset: 1829:925d3a721e3f
+| | user: hecht
+| | date: Thu Dec 10 21:38:32 2009 +0100
+| | summary: add wait
+| |
+o | changeset: 1828:a2e92cb3e6e3
+| | user: hecht
+| | date: Thu Dec 10 21:34:40 2009 +0100
+| | summary: remove this supite file in cvs
+| |
+o | changeset: 1827:58d02edf2d0e
+| | user: hecht
+| | date: Thu Dec 10 21:33:19 2009 +0100
+| | summary: add trunc mesh in 3d.
+| |
+o | changeset: 1826:dc4d33da9a55
+| | user: morice
+| | date: Thu Dec 10 16:35:06 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1825:6630293ece4e
+| | user: morice
+| | date: Thu Dec 10 16:25:01 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1824:e421852ce6a5
+| | user: morice
+| | date: Thu Dec 10 11:17:49 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1823:fff1817b0b36
+| | user: hecht
+| | date: Thu Dec 10 10:18:37 2009 +0100
+| | summary: change lg.y -> lg.ypp
+| |
+o | changeset: 1822:40b7d100c5d8
+| | user: hecht
+| | date: Tue Dec 08 11:37:48 2009 +0100
+| | summary: suite
+| |
+o | changeset: 1821:56eb1768a904
+| | user: hecht
+| | date: Tue Dec 08 11:36:21 2009 +0100
+| | summary: add info in INNOVATION
+| |
+o | changeset: 1820:f7d8b4e0ae1d
+| | user: hecht
+| | date: Mon Dec 07 22:22:27 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1819:c1c8a95285bb
+| | user: hecht
+| | date: Mon Dec 07 18:17:16 2009 +0100
+| | summary: add example
+| |
+o | changeset: 1818:fed850c6eb0f
+| | user: hecht
+| | date: Mon Dec 07 16:23:19 2009 +0100
+| | summary: do best plt of 3d meshes
+| |
+o | changeset: 1817:c057f46814b0
+| | user: hecht
+| | date: Mon Dec 07 09:01:34 2009 +0100
+| | summary: coorect cube.idp and change 3d plot of mesh
+| |
+o | changeset: 1816:72020a794a9e
+| | user: hecht
+| | date: Sat Dec 05 18:16:25 2009 +0100
+| | summary: remove imtempestive cout.
+| |
+o | changeset: 1815:47a39d936529
+| | user: hecht
+| | date: Fri Dec 04 15:53:33 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1814:db02f8bf3214
+| | user: hecht
+| | date: Fri Dec 04 15:43:18 2009 +0100
+| | summary: correct FFLIGS flags of windows
+| |
+o | changeset: 1813:137e79954fe7
+| | user: hecht
+| | date: Fri Dec 04 15:36:17 2009 +0100
+| | summary: remove copy of header file form download directory
+| |
+o | changeset: 1812:b4e4adbe84a3
+| | user: hecht
+| | date: Fri Dec 04 15:13:50 2009 +0100
+| | summary: add missing file
+| |
+o | changeset: 1811:180008496671
+| | user: hecht
+| | date: Fri Dec 04 15:11:20 2009 +0100
+| | summary: add missing file
+| |
+o | changeset: 1810:d8f3474d197b
+| | user: hecht
+| | date: Fri Dec 04 14:59:43 2009 +0100
+| | summary: correct fortran flag in ff-c++ command
+| |
+o | changeset: 1809:d52e91d99886
+| | user: hecht
+| | date: Fri Dec 04 14:37:58 2009 +0100
+| | summary: add new files for newuao optimiserx
+| |
+o | changeset: 1808:625009875e58
+| | user: hecht
+| | date: Fri Dec 04 13:44:30 2009 +0100
+| | summary: change in innovation
+| |
+o | changeset: 1807:10390fccf8b9
+| | user: hecht
+| | date: Thu Dec 03 10:49:42 2009 +0100
+| | summary: correct problem of free mesh to early in case off gluing
+| |
+o | changeset: 1806:fc93d1454f21
+| | user: hecht
+| | date: Fri Nov 27 11:17:05 2009 +0100
+| | summary: add matrix<int>[int] type in grammar
+| |
+o | changeset: 1805:bb43bba84bdf
+| | user: hecht
+| | date: Fri Nov 20 09:38:23 2009 +0100
+| | summary: remove warning
+| |
+o | changeset: 1804:bff4956d8430
+| | user: hecht
+| | date: Fri Nov 20 09:35:47 2009 +0100
+| | summary: remove some warning
+| |
+o | changeset: 1803:08437a27c2a6
+| | user: hecht
+| | date: Thu Nov 19 22:14:40 2009 +0100
+| | summary: add example
+| |
+o | changeset: 1802:24c6e35d1bda
+| | user: hecht
+| | date: Thu Nov 19 20:41:26 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1801:b22f5fecc9fa
+| | user: hecht
+| | date: Thu Nov 19 20:38:51 2009 +0100
+| | summary: add two examples
+| |
+o | changeset: 1800:ea3546059a3b
+| | user: morice
+| | date: Thu Nov 19 16:49:22 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1799:6828802fdc80
+| | user: hecht
+| | date: Sat Nov 14 22:51:05 2009 +0100
+| | summary: in ffglut remove seg to small ???
+| |
+o | changeset: 1798:416458502277
+| | user: hecht
+| | date: Fri Nov 13 22:32:37 2009 +0100
+| | summary: pass to version 3.7
+| |
+o | changeset: 1797:5009b00a38ce
+| | user: hecht
+| | date: Fri Nov 13 12:19:41 2009 +0100
+| | summary: correct spouriou print
+| |
+o | changeset: 1796:b1f05929d2d8
+| | user: hecht
+| | date: Wed Nov 11 22:46:19 2009 +0100
+| | summary: change
+| |
+o | changeset: 1795:9543c5eca7b7
+| | user: hecht
+| | date: Wed Nov 11 22:45:29 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1794:a736d190fc78
+| | user: hecht
+| | date: Tue Nov 10 20:51:54 2009 +0100
+| | summary: correct install stuff
+| |
+o | changeset: 1793:33efbea32b77
+| | user: hecht
+| | date: Tue Nov 10 20:28:07 2009 +0100
+| | summary: build WHERE_LIBRARY-config file for ff-c++ tools
+| |
+o | changeset: 1792:1564d9e47726
+| | user: hecht
+| | date: Tue Nov 10 15:36:29 2009 +0100
+| | summary: add clapack.h interface
+| |
+o | changeset: 1791:5df6bba70026
+| | user: hecht
+| | date: Tue Nov 10 14:33:50 2009 +0100
+| | summary: correct vtk files
+| |
+o | changeset: 1790:9b3614fade98
+| | user: hecht
+| | date: Mon Nov 09 16:24:48 2009 +0100
+| | summary: passe to version 3.6-1
+| |
+o | changeset: 1789:d4ba4d32c211
+| | user: hecht
+| | date: Mon Nov 09 15:22:29 2009 +0100
+| | summary: add PICHON stuff (for brute force seaching tet )
+| |
+o | changeset: 1788:9066a9a4c83a
+| | user: hecht
+| | date: Mon Nov 09 11:59:11 2009 +0100
+| | summary: correct problem of missing to 2 functions with g++-4.4
+| |
+o | changeset: 1787:c8afce8d6282
+| | user: hecht
+| | date: Mon Nov 09 11:56:46 2009 +0100
+| | summary: correct mistake this g+= 4.4 compiler
+| |
+o | changeset: 1786:c7940961398f
+| | user: morice
+| | date: Fri Nov 06 11:46:05 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1785:5b9105ef4314
+| | user: morice
+| | date: Fri Nov 06 11:44:44 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1784:e8f258f9446a
+| | user: morice
+| | date: Fri Nov 06 11:41:40 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1783:3f117c9abc8d
+| | user: morice
+| | date: Fri Nov 06 10:50:32 2009 +0100
+| | summary: add new tetgen and medit edp file CVS: ----------------------------------------------------------------------
+| |
+o | changeset: 1782:c6eda2a03844
+| | user: hecht
+| | date: Thu Nov 05 11:49:07 2009 +0100
+| | summary: add missing file.
+| |
+o | changeset: 1781:0a6031f38b29
+| | user: hecht
+| | date: Wed Nov 04 12:56:48 2009 +0100
+| | summary: change innovation
+| |
+o | changeset: 1780:8b10917a60ef
+| | user: hecht
+| | date: Tue Nov 03 21:38:30 2009 +0100
+| | summary: add auto stuff
+| |
+o | changeset: 1779:8938281ebc2e
+| | user: hecht
+| | date: Tue Nov 03 21:29:32 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1778:2d9b15732841
+| | user: hecht
+| | date: Tue Nov 03 20:54:39 2009 +0100
+| | summary: passe to version 1.4.3 of tetgen.
+| |
+o | changeset: 1777:d7ff001547be
+| | user: hecht
+| | date: Tue Oct 27 17:22:13 2009 +0100
+| | summary: add eigen value full
+| |
+o | changeset: 1776:c8de02c7971f
+| | user: hecht
+| | date: Sun Oct 25 18:18:58 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1775:abb3258333e5
+| | user: hecht
+| | date: Sun Oct 25 18:03:03 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1774:ad90f689e762
+| | user: hecht
+| | date: Wed Oct 21 22:19:30 2009 +0200
+| | summary: update INNOVATION file
+| |
+o | changeset: 1773:0fca1c94a0b5
+| | user: hecht
+| | date: Wed Oct 21 22:16:24 2009 +0200
+| | summary: passe to version 3.6
+| |
+o | changeset: 1772:961bccd81738
+| | user: hecht
+| | date: Wed Oct 21 22:00:51 2009 +0200
+| | summary: coorect .cpp and simlify
+| |
+o | changeset: 1771:1595300c7f81
+| | user: hecht
+| | date: Wed Oct 21 20:35:47 2009 +0200
+| | summary: New version of funcTemplate.cpp with function with stack + 1 2 et 3 argument
+| |
+o | changeset: 1770:12f4eb1a979a
+| | user: hecht
+| | date: Tue Oct 20 13:32:54 2009 +0200
+| | summary: add tools to read .pcm files for optic-flow computation
+| |
+o | changeset: 1769:d449b7c05ec5
+| | user: hecht
+| | date: Mon Oct 19 22:46:57 2009 +0200
+| | summary: add tools to read pcm opticflow
+| |
+o | changeset: 1768:41a11cfe6bd1
+| | user: hecht
+| | date: Thu Oct 15 23:23:01 2009 +0200
+| | summary: coorect assert error in gmres without preconditionner.
+| |
+o | changeset: 1767:037d651d0a6b
+| | user: hecht
+| | date: Wed Oct 14 23:54:33 2009 +0200
+| | summary: You find a very hard bug to correct s ( a small miss tapping)
+| |
+o | changeset: 1766:3e99aae2de38
+| | user: morice
+| | date: Wed Oct 14 15:25:40 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1765:5adb0c1b49f2
+| | user: morice
+| | date: Tue Oct 13 16:48:58 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1764:66936e3bfe84
+| | user: hecht
+| | date: Tue Oct 13 15:41:03 2009 +0200
+| | summary: correct a very old bug in bamg in case of mesh with internal
+| |
+o | changeset: 1763:0d06bacf7d81
+| | user: morice
+| | date: Fri Oct 09 22:15:38 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1762:2a7535cf3b0c
+| | user: hecht
+| | date: Wed Oct 07 13:06:47 2009 +0200
+| | summary: correct print error
+| |
+o | changeset: 1761:e90b49294374
+| | user: hecht
+| | date: Wed Oct 07 04:54:55 2009 +0200
+| | summary: add chech of size of fr-ortran integer, force fortran integer to by 4 bytes with f2c
+| |
+o | changeset: 1760:a1266eb439fe
+| | user: hecht
+| | date: Tue Oct 06 23:01:26 2009 +0200
+| | summary: correct msitake in complex eigenvalue problem.
+| |
+o | changeset: 1759:8af62e433f06
+| | user: hecht
+| | date: Mon Sep 28 22:53:48 2009 +0200
+| | summary: coorect install problem undex windows and Macos.
+| |
+o | changeset: 1758:2d14d6567664
+| | user: hecht
+| | date: Mon Sep 28 21:24:24 2009 +0200
+| | summary: add __VC__ under windows (cygwin)
+| |
+o | changeset: 1757:b34002c2d4ff
+| | user: hecht
+| | date: Mon Sep 28 18:43:06 2009 +0200
+| | summary: correct miss tapping in fflaunch++exe
+| |
+o | changeset: 1756:4c4dc2c8f823
+| | user: hecht
+| | date: Mon Sep 28 18:02:18 2009 +0200
+| | summary: coorect miss take in launchff++.cpp filename
+| |
+o | changeset: 1755:79cc99cce5ab
+| | user: hecht
+| | date: Mon Sep 28 18:01:21 2009 +0200
+| | summary: corect misstake in filename
+| |
+o | changeset: 1754:ff040fb58b23
+| | user: morice
+| | date: Mon Sep 28 15:46:22 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1753:0b20838e0191
+| | user: hecht
+| | date: Thu Sep 24 16:51:20 2009 +0200
+| | summary: coorect d-Leman.edp deep is under 0... (before all tet a < 0)
+| |
+o | changeset: 1752:f93cbf193dc5
+| | user: hecht
+| | date: Thu Sep 24 16:32:45 2009 +0200
+| | summary: coorect plot of 3d meshes
+| |
+o | changeset: 1751:9b61149decbb
+| | user: hecht
+| | date: Thu Sep 24 14:38:15 2009 +0200
+| | summary: corect a stop test
+| |
+o | changeset: 1750:18c376484a0b
+| | user: hecht
+| | date: Thu Sep 24 14:00:06 2009 +0200
+| | summary: correct big bug in case of 3D fepace with constante number of df / node.
+| |
+o | changeset: 1749:13568ef94d25
+| | user: hecht
+| | date: Wed Sep 23 23:28:35 2009 +0200
+| | summary: continuning array of vect FE func 3d
+| |
+o | changeset: 1748:9ca65f60265e
+| | user: hecht
+| | date: Wed Sep 23 21:53:47 2009 +0200
+| | summary: correct makefile build WHERE-LIB -download
+| |
+o | changeset: 1747:9ad5a70d9da5
+| | user: hecht
+| | date: Wed Sep 23 21:44:43 2009 +0200
+| | summary: add two examples
+| |
+o | changeset: 1746:636e0dacf420
+| | user: hecht
+| | date: Wed Sep 23 21:28:34 2009 +0200
+| | summary: correct set array of vectorail finite element functions
+| |
+o | changeset: 1745:fd499d9e6f28
+| | user: hecht
+| | date: Tue Sep 22 22:59:17 2009 +0200
+| | summary: rebuild makefile
+| |
+o | changeset: 1744:c0f785566dae
+| | user: hecht
+| | date: Tue Sep 22 18:22:10 2009 +0200
+| | summary: add patch filexs
+| |
+o | changeset: 1743:25480c53626d
+| | user: hecht
+| | date: Tue Sep 22 11:09:39 2009 +0200
+| | summary: corct make fo intall
+| |
+o | changeset: 1742:5af770aaac29
+| | user: hecht
+| | date: Tue Sep 22 11:01:06 2009 +0200
+| | summary: correct makefile for metis
+| |
+o | changeset: 1741:e06fc8bfa3e5
+| | user: hecht
+| | date: Tue Sep 22 10:54:59 2009 +0200
+| | summary: remove file from data base
+| |
+o | changeset: 1740:4142e57dd0e6
+| | user: hecht
+| | date: Tue Sep 22 10:54:00 2009 +0200
+| | summary: coorect install makes
+| |
+o | changeset: 1739:76b29386160e
+| | user: hecht
+| | date: Tue Sep 22 10:43:36 2009 +0200
+| | summary: continius ff-c++ auto
+| |
+o | changeset: 1738:0695dbc17cb0
+| | user: hecht
+| | date: Tue Sep 22 10:25:01 2009 +0200
+| | summary: add missing file
+| |
+o | changeset: 1737:a6f7a118aff7
+| | user: hecht
+| | date: Tue Sep 22 10:18:56 2009 +0200
+| | summary: rebuild makefiles
+| |
+o | changeset: 1736:879121c3ec58
+| | user: hecht
+| | date: Tue Sep 22 10:18:19 2009 +0200
+| | summary: change ff-c++ off auto dep. find
+| |
+o | changeset: 1735:7a7c7c8057db
+| | user: hecht
+| | date: Mon Sep 21 22:44:01 2009 +0200
+| | summary: addfile for ff-pkg-download.in
+| |
+o | changeset: 1734:15ae6f084ad1
+| | user: hecht
+| | date: Mon Sep 21 22:43:01 2009 +0200
+| | summary: change movemesh3d to movemesh3
+| |
+o | changeset: 1733:5e49222d0c4d
+| | user: hecht
+| | date: Mon Sep 21 22:38:53 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1732:878dac9dd908
+| | user: morice
+| | date: Wed Sep 16 11:54:52 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1731:4f2fa344dc0b
+| | user: hecht
+| | date: Wed Sep 09 18:17:15 2009 +0200
+| | summary: add missing resize of sparse complex matrix
+| |
+o | changeset: 1730:9d61b8cae5c5
+| | user: hecht
+| | date: Mon Sep 07 09:50:52 2009 +0200
+| | summary: add metis
+| |
+o | changeset: 1729:90e9c94f2793
+| | user: morice
+| | date: Fri Sep 04 11:41:30 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1728:c5dbee61cf58
+| | user: morice
+| | date: Fri Sep 04 11:40:09 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1727:607657f6d2b8
+| | user: hecht
+| | date: Thu Sep 03 09:51:01 2009 +0200
+| | summary: add tools of automatics find libs and include
+| |
+o | changeset: 1726:1ba4ebcbf0d5
+| | user: morice
+| | date: Thu Sep 03 08:26:47 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1725:3de000c981b5
+| | user: hecht
+| | date: Wed Sep 02 21:45:38 2009 +0200
+| | summary: add metis link
+| |
+o | changeset: 1724:260e3f9628d2
+| | user: hecht
+| | date: Wed Sep 02 09:58:04 2009 +0200
+| | summary: add MPI_com in solver prameter
+| |
+o | changeset: 1723:5399bf49daa4
+| | user: morice
+| | date: Tue Sep 01 12:41:02 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1722:a04f554f152e
+| | user: morice
+| | date: Tue Sep 01 12:30:05 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1721:3edc358fb626
+| | user: morice
+| | date: Tue Sep 01 10:28:55 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1720:f7df348e0c24
+| | user: hecht
+| | date: Mon Aug 31 10:59:34 2009 +0200
+| | summary: CORRECT IN CASE OF mpich
+| |
+o | changeset: 1719:4a7c39d7edfb
+| | user: hecht
+| | date: Fri Aug 28 18:11:42 2009 +0200
+| | summary: add missing file to coorect trap tst on ubuntu
+| |
+o | changeset: 1718:2d6aa202da95
+| | user: hecht
+| | date: Fri Aug 28 17:52:20 2009 +0200
+| | summary: coorect README
+| |
+o | changeset: 1717:a9cc7f75566d
+| | user: hecht
+| | date: Fri Aug 28 17:27:12 2009 +0200
+| | summary: add file to remove trap in check of eigen exampel
+| |
+o | changeset: 1716:b33bbe62d06f
+| | user: hecht
+| | date: Fri Aug 28 15:08:18 2009 +0200
+| | summary: coorect INNOVATION
+| |
+o | changeset: 1715:780e891f2505
+| | user: hecht
+| | date: Thu Aug 27 22:00:32 2009 +0200
+| | summary: coorect mistake in parallelempi.cpp
+| |
+o | changeset: 1714:ee657855b460
+| | user: hecht
+| | date: Thu Aug 27 21:55:33 2009 +0200
+| | summary: commit version 3.5 see innvovation for all change
+| |
+o | changeset: 1713:d10318b35b4d
+| | user: hecht
+| | date: Thu Aug 27 16:03:16 2009 +0200
+| | summary: passe to versio 3.5 with a real mpi interface.
+| |
+o | changeset: 1712:f2ac13edc9e2
+| | user: hecht
+| | date: Wed Aug 26 23:02:52 2009 +0200
+| | summary: do a not to bad mpi version
+| |
+o | changeset: 1711:9dcb3988b48a
+| | user: hecht
+| | date: Tue Aug 25 16:06:27 2009 +0200
+| | summary: add mpiBarrier + const of mpiGroup and mpiComm (boggus ???)
+| |
+o | changeset: 1710:728541dd2b77
+| | user: hecht
+| | date: Tue Aug 25 10:06:23 2009 +0200
+| | summary: add Scatter, Gather, etc in mpi
+| |
+o | changeset: 1709:a15319a40921
+| | user: hecht
+| | date: Mon Aug 24 23:40:24 2009 +0200
+| | summary: correct mpi version see innovation for detail
+| |
+o | changeset: 1708:3dc151cd6a93
+| | user: hecht
+| | date: Sat Aug 08 21:23:53 2009 +0200
+| | summary: bmo is boggus and correct mistapping in convect_dervieux
+| |
+o | changeset: 1707:54225cd7c163
+| | user: hecht
+| | date: Sat Aug 08 21:12:14 2009 +0200
+| | summary: correct convect files
+| |
+o | changeset: 1706:ea9ea9efff60
+| | user: hecht
+| | date: Sat Aug 08 20:57:06 2009 +0200
+| | summary: change a little, correct a stop test and do a fast version
+| |
+o | changeset: 1705:5feb310149d3
+| | user: hecht
+| | date: Sat Aug 08 20:08:41 2009 +0200
+| | summary: change INNOVATION
+| |
+o | changeset: 1704:8bdb3c81f330
+| | user: hecht
+| | date: Sat Aug 08 19:11:18 2009 +0200
+| | summary: build version 3.4-2
+| |
+o | changeset: 1703:4b463c647ff0
+| | user: hecht
+| | date: Sat Aug 08 18:25:06 2009 +0200
+| | summary: do new mesh inquire also in 3d
+| |
+o | changeset: 1702:e91332ff3a6a
+| | user: hecht
+| | date: Sat Aug 08 10:53:20 2009 +0200
+| | summary: correct mesh.edp example for new mesh inquiring
+| |
+o | changeset: 1701:eeab886b46aa
+| | user: hecht
+| | date: Fri Aug 07 22:40:17 2009 +0200
+| | summary: add tools to inquire boudnary directly in freefem++
+| |
+o | changeset: 1700:24983130c3d7
+| | user: morice
+| | date: Sun Aug 02 14:50:37 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1699:2a03691fde42
+| | user: morice
+| | date: Thu Jul 30 12:55:18 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1698:77cc1c512479
+| | user: morice
+| | date: Thu Jul 30 07:42:48 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1697:6f77234eaec3
+| | user: morice
+| | date: Tue Jul 28 14:42:14 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1696:2682e3a39f4d
+| | user: morice
+| | date: Tue Jul 28 14:40:47 2009 +0200
+| | summary: :q
+| |
+o | changeset: 1695:80772719f92e
+| | user: hecht
+| | date: Thu Jul 23 12:29:10 2009 +0200
+| | summary: add un first example ..
+| |
+o | changeset: 1694:439fb84bb0eb
+| | user: hecht
+| | date: Thu Jul 23 12:17:04 2009 +0200
+| | summary: rewrite of mpi version ...
+| |
+o | changeset: 1693:a7a22582cfb4
+| | user: hecht
+| | date: Wed Jul 22 22:41:32 2009 +0200
+| | summary: retore good version
+| |
+o | changeset: 1692:b15405b6bd05
+| | user: hecht
+| | date: Wed Jul 22 11:30:29 2009 +0200
+| | summary: correct INNOTION
+| |
+o | changeset: 1691:82f9057773f4
+| | user: hecht
+| | date: Wed Jul 22 11:28:16 2009 +0200
+| | summary: add plot of array of meshes and array of finite element function.
+| |
+o | changeset: 1690:8acf1467c8c9
+| | user: hecht
+| | date: Mon Jul 20 22:30:52 2009 +0200
+| | summary: go to version 3.4-1
+| |
+o | changeset: 1689:6fcd68db92d1
+| | user: hecht
+| | date: Mon Jul 20 18:23:45 2009 +0200
+| | summary: cosmetic in ffglut
+| |
+o | changeset: 1688:d3b315513ffe
+| | user: hecht
+| | date: Mon Jul 20 18:12:06 2009 +0200
+| | summary: update ffglut
+| |
+o | changeset: 1687:5505e8ebf028
+| | user: hecht
+| | date: Fri Jul 10 11:02:37 2009 +0200
+| | summary: correct load.link.in or un test
+| |
+o | changeset: 1686:ae67b591599d
+| | user: hecht
+| | date: Fri Jul 10 10:53:56 2009 +0200
+| | summary: coorect ff-c++ on win3é
+| |
+o | changeset: 1685:f384c5351ff5
+| | user: hecht
+| | date: Fri Jul 10 10:19:05 2009 +0200
+| | summary: correct ff-c++ of windows case and cygwin
+| |
+o | changeset: 1684:321b323db9a5
+| | user: hecht
+| | date: Fri Jul 10 09:36:21 2009 +0200
+| | summary: add BEM.epd and launchff.cpp ( a wrapper for windows)
+| |
+o | changeset: 1683:d2dee6881044
+| | user: hecht
+| | date: Thu Jul 09 18:31:39 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1682:b4e586ac5a72
+| | user: hecht
+| | date: Thu Jul 09 17:50:43 2009 +0200
+| | summary: add -wait parameter for window launchff++ wrapper
+| |
+o | changeset: 1681:38744c349358
+| | user: hecht
+| | date: Thu Jul 09 17:49:50 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1680:c75e3e2fa17e
+| | user: morice
+| | date: Wed Jul 08 17:58:43 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1679:807c14a16f98
+| | user: morice
+| | date: Wed Jul 08 17:22:08 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1678:05f5547c5d1d
+| | user: morice
+| | date: Wed Jul 08 16:55:41 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1677:1e5e278eedaa
+| | user: morice
+| | date: Wed Jul 08 14:36:26 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1676:8d2f6a01f018
+| | user: hecht
+| | date: Tue Jul 07 09:07:24 2009 +0200
+| | summary: correct mpi version
+| |
+o | changeset: 1675:df7b6dab61b1
+| | user: hecht
+| | date: Mon Jul 06 16:33:34 2009 +0200
+| | summary: add mpi tools (in test) and correct buyild matrix interplation
+| |
+o | changeset: 1674:63f2ef1d3223
+| | user: morice
+| | date: Thu Jul 02 18:11:49 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1673:d0503b06c6db
+| | user: hecht
+| | date: Tue Jun 30 21:06:38 2009 +0200
+| | summary: correct PlotStream io in case of array with check.
+| |
+o | changeset: 1672:9a2c7fd9711d
+| | user: hecht
+| | date: Mon Jun 29 18:45:51 2009 +0200
+| | summary: change crimon-freefem++.zip in crimson-freefem++.zip
+| |
+o | changeset: 1671:68133db4e985
+| | user: hecht
+| | date: Mon Jun 29 16:01:42 2009 +0200
+| | summary: p ss to version 3.4
+| |
+o | changeset: 1670:eda4376bbd73
+| | user: hecht
+| | date: Tue Jun 23 18:13:40 2009 +0200
+| | summary: change ffglut to bee more safe (version)
+| |
+o | changeset: 1669:2c7d0aa50098
+| | user: hecht
+| | date: Thu Jun 18 09:45:06 2009 +0200
+| | summary: correct include hpd -> idp
+| |
+o | changeset: 1668:1e5e630dddd5
+| | user: hecht
+| | date: Tue Jun 16 14:42:59 2009 +0200
+| | summary: coorect bug on window
+| |
+o | changeset: 1667:9a28c7cf6052
+| | user: morice
+| | date: Tue Jun 16 11:57:25 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1666:d17316a654b9
+| | user: hecht
+| | date: Tue Jun 16 11:08:06 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1665:e2de216ad22c
+| | user: hecht
+| | date: Tue Jun 16 11:07:49 2009 +0200
+| | summary: add examples++-3d/lac-leman-v4.msh in the distrib
+| |
+o | changeset: 1664:2e25f004c497
+| | user: hecht
+| | date: Tue Jun 16 10:36:46 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1663:c047ea6fb673
+| | user: hecht
+| | date: Tue Jun 16 10:30:42 2009 +0200
+| | summary: before the next version
+| |
+o | changeset: 1662:2932f81e8687
+| | user: hecht
+| | date: Tue Jun 16 10:25:33 2009 +0200
+| | summary: coorect idp file in mortar exemple
+| |
+o | changeset: 1661:822b5c8b04a1
+| | user: hecht
+| | date: Mon Jun 15 22:36:55 2009 +0200
+| | summary: correct bug in makefile
+| |
+o | changeset: 1660:51a37d2faf4a
+| | user: morice
+| | date: Mon Jun 15 18:16:49 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1659:bcb8a1242d1b
+| | user: hecht
+| | date: Fri Jun 12 23:09:42 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1658:83e491da131a
+| | user: hecht
+| | date: Mon Jun 08 13:42:52 2009 +0200
+| | summary: do small correct in 2 member:
+| |
+o | changeset: 1657:2caaa85b26e3
+| | user: morice
+| | date: Mon Jun 08 12:48:34 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1656:19a76fdcdba5
+| | user: morice
+| | date: Mon Jun 08 12:45:41 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1655:9805b179ac69
+| | user: morice
+| | date: Mon Jun 08 12:35:10 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1654:b33eb490c839
+| | user: morice
+| | date: Mon Jun 08 12:03:12 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1653:45466a37654f
+| | user: hecht
+| | date: Mon Jun 08 11:16:23 2009 +0200
+| | summary: add Egde03d and RT03d finite element , correct mistake in
+| |
+o | changeset: 1652:a3e88f63360c
+| | user: morice
+| | date: Fri Jun 05 14:27:05 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1651:e0a2e8d5cfd2
+| | user: hecht
+| | date: Thu Jun 04 12:56:41 2009 +0200
+| | summary: to avec good makefiel
+| |
+o | changeset: 1650:7c00e01ad51b
+| | user: hecht
+| | date: Thu Jun 04 09:58:56 2009 +0200
+| | summary: correct Dxwriter tools
+| |
+o | changeset: 1649:0ad3748de454
+| | user: hecht
+| | date: Thu Jun 04 09:37:14 2009 +0200
+| | summary: add file
+| |
+o | changeset: 1648:a1494782af5b
+| | user: hecht
+| | date: Thu Jun 04 08:35:49 2009 +0200
+| | summary: add RT0 in 3D . 5 first test)
+| |
+o | changeset: 1647:88a17753d10d
+| | user: hecht
+| | date: Wed Jun 03 23:23:51 2009 +0200
+| | summary: try to put RT03d> => correct lot of bug in the finite element (vectoriql)
+| |
+o | changeset: 1646:229d1df51b18
+| | user: atenekeng
+| | date: Tue Jun 02 23:40:49 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1645:442c0aac83f2
+| | user: atenekeng
+| | date: Tue Jun 02 23:33:38 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1644:b6bbb2eb44d0
+| | user: atenekeng
+| | date: Tue Jun 02 23:27:30 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1643:0831c6a1027f
+| | user: atenekeng
+| | date: Tue Jun 02 23:22:36 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1642:a459d624d2f7
+| | user: atenekeng
+| | date: Tue Jun 02 23:12:44 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1641:fc0bd0023280
+| | user: hecht
+| | date: Tue Jun 02 15:40:01 2009 +0200
+| | summary: begin of RT0 in 3D.
+| |
+o | changeset: 1640:00f642dd30c1
+| | user: hecht
+| | date: Mon Jun 01 18:29:48 2009 +0200
+| | summary: add tool to build surfqce mesh.
+| |
+o | changeset: 1639:43b260ee40b7
+| | user: hecht
+| | date: Mon Jun 01 18:28:16 2009 +0200
+| | summary: V 3.3-1 1 juin 2009
+| |
+o | changeset: 1638:dbd423d4d000
+| | user: hecht
+| | date: Fri May 29 13:35:03 2009 +0200
+| | summary: reove unused files
+| |
+o | changeset: 1637:f7079ea8eb23
+| | user: hecht
+| | date: Fri May 29 13:32:54 2009 +0200
+| | summary: add change solver problem on return arry and meshes in function.
+| |
+o | changeset: 1636:9d7dbf3295c1
+| | user: hecht
+| | date: Thu May 28 18:33:25 2009 +0200
+| | summary: begin of clean real array in function.
+| |
+o | changeset: 1635:cf621a076ad3
+| | user: hecht
+| | date: Wed May 27 13:56:54 2009 +0200
+| | summary: correct convect 3d..
+| |
+o | changeset: 1634:a56bc9158f09
+| | user: hecht
+| | date: Tue May 26 18:05:27 2009 +0200
+| | summary: correct -o in find
+| |
+o | changeset: 1633:81f69e584dfb
+| | user: hecht
+| | date: Tue May 26 15:52:04 2009 +0200
+| | summary: correct msh3.hpp and SuperLU.cpp mesh3 volume is 0 some time
+| |
+o | changeset: 1632:3c7db6033cce
+| | user: hecht
+| | date: Tue May 26 15:17:40 2009 +0200
+| | summary: add 3d mas lump quadrature furmula (qfV1, qfV2,qfV5 qfV1lump)
+| |
+o | changeset: 1631:7e03dc459f0e
+| | user: hecht
+| | date: Mon May 25 11:42:53 2009 +0200
+| | summary: version 3.3
+| |
+o | changeset: 1630:ae1868421420
+| | user: atenekeng
+| | date: Mon May 18 02:44:56 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1629:69b580f397be
+| | user: hecht
+| | date: Sun May 17 21:02:40 2009 +0200
+| | summary: add -fPIC flags on 64 achitecture
+| |
+o | changeset: 1628:8ddd25c5ca25
+| | user: hecht
+| | date: Fri May 15 21:02:32 2009 +0200
+| | summary: add 3d eigen value tools
+| |
+o | changeset: 1627:022e89f77648
+| | user: hecht
+| | date: Wed May 13 16:11:46 2009 +0200
+| | summary: correct configure.ac and makefile on window for lapack lib in
+| |
+o | changeset: 1626:a97da324c99e
+| | user: hecht
+| | date: Wed May 13 13:20:28 2009 +0200
+| | summary: put coorect for new sparse matrix intercale
+| |
+o | changeset: 1625:c6cb0b28b7bb
+| | user: hecht
+| | date: Wed May 13 13:19:09 2009 +0200
+| | summary: remove to change in SuperLU.cpp
+| |
+o | changeset: 1624:0c1099452f82
+| | user: hecht
+| | date: Wed May 13 13:10:20 2009 +0200
+| | summary: put correct
+| |
+o | changeset: 1623:70718c5b4084
+| | user: hecht
+| | date: Wed May 13 10:25:44 2009 +0200
+| | summary: add oone output
+| |
+o | changeset: 1622:eb450d4e51f3
+| | user: hecht
+| | date: Wed May 13 09:46:23 2009 +0200
+| | summary: correct the doc (in progress) , coorect the size of text in postscrip driver.
+| |
+o | changeset: 1621:8d5c2e7a6033
+| | user: hecht
+| | date: Wed May 13 09:12:05 2009 +0200
+| | summary: add fig in doc.
+| |
+o | changeset: 1620:8f797289de2b
+| | user: hecht
+| | date: Mon May 11 09:05:58 2009 +0200
+| | summary: add pgm figure exemple file
+| |
+o | changeset: 1619:18f8c66246c7
+| | user: hecht
+| | date: Mon May 11 09:05:29 2009 +0200
+| | summary: add tool to read ppm and pgm image file see ppm2rnm.edp example
+| |
+o | changeset: 1618:08c9e444113a
+| | user: hecht
+| | date: Mon May 11 09:03:08 2009 +0200
+| | summary: add tool to set array like in matlab and scilab
+| |
+o | changeset: 1617:9a32089d27c6
+| | user: hecht
+| | date: Thu Apr 30 10:07:55 2009 +0200
+| | summary: comment change in dump in RNM.hpp
+| |
+o | changeset: 1616:af2b47c9eec9
+| | user: hecht
+| | date: Thu Apr 30 09:52:57 2009 +0200
+| | summary: add sort of array and in parallel int array
+| |
+o | changeset: 1615:d9457f8f8a82
+| | user: morice
+| | date: Wed Apr 29 18:40:30 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1614:d93e87702112
+| | user: morice
+| | date: Wed Apr 29 18:37:15 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1613:58344eff0231
+| | user: hecht
+| | date: Wed Apr 29 09:12:46 2009 +0200
+| | summary: add missing file to inv full matrix.
+| |
+o | changeset: 1612:492aae1c8104
+| | user: hecht
+| | date: Mon Apr 27 23:30:00 2009 +0200
+| | summary: add missing delete
+| |
+o | changeset: 1611:22b1da7215e8
+| | user: hecht
+| | date: Mon Apr 27 23:05:26 2009 +0200
+| | summary: update iNNOVATIO
+| |
+o | changeset: 1610:a0cba860253b
+| | user: hecht
+| | date: Mon Apr 27 23:02:34 2009 +0200
+| | summary: update innovation
+| |
+o | changeset: 1609:4d114f69dcc6
+| | user: hecht
+| | date: Mon Apr 27 21:56:45 2009 +0200
+| | summary: add missing files
+| |
+o | changeset: 1608:65650e9ec1b0
+| | user: hecht
+| | date: Mon Apr 27 21:55:44 2009 +0200
+| | summary: correct example
+| |
+o | changeset: 1607:88667b360b31
+| | user: hecht
+| | date: Mon Apr 27 21:24:59 2009 +0200
+| | summary: add perodic FESpace in 3d
+| |
+o | changeset: 1606:3ef7b85f0698
+| | user: morice
+| | date: Wed Apr 22 18:06:47 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1605:ee777f6df0eb
+| | user: morice
+| | date: Wed Apr 22 17:51:29 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1604:2bd5f0930f42
+| | user: morice
+| | date: Wed Apr 22 11:12:30 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1603:edf35a172e75
+| | user: morice
+| | date: Tue Apr 21 16:16:10 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1602:95da9106cc83
+| | user: morice
+| | date: Tue Apr 21 15:33:13 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1601:998fb4969917
+| | user: morice
+| | date: Tue Apr 21 15:29:16 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1600:87657798c2cb
+| | user: morice
+| | date: Tue Apr 21 15:09:00 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1599:44156c3a14df
+| | user: morice
+| | date: Tue Apr 21 13:51:17 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1598:8e33508e3599
+| | user: morice
+| | date: Tue Apr 21 13:41:11 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1597:664a71a6bf78
+| | user: morice
+| | date: Mon Apr 20 14:07:04 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1596:b875c74a428e
+| | user: morice
+| | date: Mon Apr 20 13:17:47 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1595:04341a068ff7
+| | user: morice
+| | date: Mon Apr 20 13:15:51 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1594:d57fa2584133
+| | user: morice
+| | date: Mon Apr 20 13:13:39 2009 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1593:1bfe35d03d32
+| | user: hecht
+| | date: Fri Apr 17 09:29:40 2009 +0200
+| | summary: to be sur
+| |
+o | changeset: 1592:10c357445573
+| | user: hecht
+| | date: Fri Apr 17 00:50:42 2009 +0200
+| | summary: add dump
+| |
+o | changeset: 1591:915380e22bf9
+| | user: hecht
+| | date: Fri Apr 17 00:30:10 2009 +0200
+| | summary: gros modif dans la gestion des parameters pour le
+| |
+o | changeset: 1590:465673ac5e9d
+| | user: hecht
+| | date: Wed Apr 15 19:17:15 2009 +0200
+| | summary: correct search of lapack lib
+| |
+o | changeset: 1589:9e4275fb2706
+| | user: hecht
+| | date: Wed Apr 15 18:43:46 2009 +0200
+| | summary: correct complie of lapack lib with arpack (buildin in macos)
+| |
+o | changeset: 1588:f2650d954b5e
+| | user: hecht
+| | date: Wed Apr 15 18:21:38 2009 +0200
+| | summary: do autoreconf
+| |
+o | changeset: 1587:9ee6ee15818c
+| | user: hecht
+| | date: Wed Apr 15 18:18:22 2009 +0200
+| | summary: coorect --enable-m64 flags compile
+| |
+o | changeset: 1586:9c12b436f339
+| | user: hecht
+| | date: Wed Apr 15 18:12:04 2009 +0200
+| | summary: correct Makefile-MacOs
+| |
+o | changeset: 1585:df486d895352
+| | user: hecht
+| | date: Wed Apr 15 11:15:40 2009 +0200
+| | summary: passe to version 3.2
+| |
+o | changeset: 1584:d0e8b898a63e
+| | user: hecht
+| | date: Wed Apr 15 11:11:58 2009 +0200
+| | summary: do change for 64 bits on macos.
+| |
+o | changeset: 1583:b43d23573147
+| | user: hecht
+| | date: Tue Mar 31 13:38:09 2009 +0200
+| | summary: add P1b3d
+| |
+o | changeset: 1582:79f9321ebe42
+| | user: morice
+| | date: Fri Mar 20 12:18:43 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1581:89bbe7fed648
+| | user: morice
+| | date: Fri Mar 20 11:25:41 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1580:03b88bc9b368
+| | user: morice
+| | date: Tue Mar 17 11:16:44 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1579:5b219bb5581f
+| | user: morice
+| | date: Mon Mar 16 18:16:41 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1578:3bd564aa3f9f
+| | user: hecht
+| | date: Sat Mar 14 17:27:32 2009 +0100
+| | summary: version 3.1-0
+| |
+o | changeset: 1577:76c7acba2b50
+| | user: hecht
+| | date: Sat Mar 14 17:12:15 2009 +0100
+| | summary: coorect load.link.in for f77 compile.
+| |
+o | changeset: 1576:d1c3f8fd5e7a
+| | user: morice
+| | date: Thu Mar 12 14:32:53 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1575:8b3b4532b68d
+| | user: morice
+| | date: Thu Mar 12 13:43:36 2009 +0100
+| | summary: bug trouver dans Find:
+| |
+o | changeset: 1574:142b82fe9837
+| | user: morice
+| | date: Thu Mar 12 13:39:12 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1573:68e386efcdfa
+| | user: hecht
+| | date: Mon Mar 09 15:00:18 2009 +0100
+| | summary: version 3.1 fist step
+| |
+o | changeset: 1572:41dfdbb8dfa0
+| | user: hecht
+| | date: Thu Mar 05 11:17:23 2009 +0100
+| | summary: correct INNOVATION and remove print
+| |
+o | changeset: 1571:5e26bd093206
+| | user: hecht
+| | date: Wed Mar 04 11:45:32 2009 +0100
+| | summary: correct int2d in 3d. (error on transformation face to Tet)
+| |
+o | changeset: 1570:ae36727a4ce3
+| | user: hecht
+| | date: Mon Mar 02 14:52:15 2009 +0100
+| | summary: make version 3.0-6
+| |
+o | changeset: 1569:758a2e0f2057
+| | user: hecht
+| | date: Thu Feb 12 16:19:41 2009 +0100
+| | summary: correct bmo and extra dump
+| |
+o | changeset: 1568:13d77a1f83c3
+| | user: hecht
+| | date: Thu Feb 12 09:04:47 2009 +0100
+| | summary: version 3.0-6
+| |
+o | changeset: 1567:3537e6e5bd56
+| | user: hecht
+| | date: Thu Feb 12 08:47:20 2009 +0100
+| | summary: add required edges in adaptmesh tools.
+| |
+o | changeset: 1566:0a7a4da722d6
+| | user: hecht
+| | date: Wed Feb 11 16:12:09 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1565:06a842864cd3
+| | user: hecht
+| | date: Wed Feb 11 16:11:22 2009 +0100
+| | summary: add code for lock boundary mesh in adapt process. for JYU ...
+| |
+o | changeset: 1564:ef831f851c3e
+| | user: hecht
+| | date: Wed Feb 11 13:36:20 2009 +0100
+| | summary: add option -nowait for windows.
+| |
+o | changeset: 1563:8e8c47f158db
+| | user: hecht
+| | date: Mon Feb 09 09:41:57 2009 +0100
+| | summary: add 3d color ....
+| |
+o | changeset: 1562:9ef4b48c94e5
+| | user: hecht
+| | date: Fri Feb 06 11:15:24 2009 +0100
+| | summary: correct missing tapping
+| |
+o | changeset: 1561:b1047bd598d2
+| | user: hecht
+| | date: Fri Feb 06 10:50:16 2009 +0100
+| | summary: add a first plot of 3d data witj plot tools.
+| |
+o | changeset: 1560:ff43f245e2f3
+| | user: hecht
+| | date: Thu Feb 05 16:29:09 2009 +0100
+| | summary: add new file for tet siplit.
+| |
+o | changeset: 1559:1498e333f6d9
+| | user: morice
+| | date: Tue Feb 03 17:45:55 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1558:b70b991cd78c
+| | user: morice
+| | date: Tue Feb 03 15:09:59 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1557:b6672aa52178
+| | user: morice
+| | date: Tue Feb 03 15:03:02 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1556:e3dd766cd68b
+| | user: hecht
+| | date: Tue Jan 27 16:11:43 2009 +0100
+| | summary: remove last change (bogus)
+| |
+o | changeset: 1555:4c5377a65671
+| | user: hecht
+| | date: Tue Jan 27 16:09:04 2009 +0100
+| | summary: correct dy(uh) when uh is P13d. (always 0)
+| |
+o | changeset: 1554:ca9caabbe3bc
+| | user: morice
+| | date: Fri Jan 23 16:14:30 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1553:018249cdee99
+| | user: morice
+| | date: Fri Jan 23 16:13:24 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1552:3db53e497a18
+| | user: hecht
+| | date: Wed Jan 21 11:04:10 2009 +0100
+| | summary: correct bin-win32 install exe
+| |
+o | changeset: 1551:7a0f31302d16
+| | user: hecht
+| | date: Wed Jan 21 10:56:45 2009 +0100
+| | summary: correct install bin-win32
+| |
+o | changeset: 1550:91eefe9e3612
+| | user: hecht
+| | date: Wed Jan 21 10:13:06 2009 +0100
+| | summary: remove crazy file
+| |
+o | changeset: 1549:b6835240f938
+| | user: hecht
+| | date: Tue Jan 20 20:56:59 2009 +0100
+| | summary: correct the install on under windows / cygwin
+| |
+o | changeset: 1548:ae5d95f70891
+| | user: hecht
+| | date: Sun Jan 18 19:25:03 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1547:c5083029fcff
+| | user: hecht
+| | date: Sun Jan 18 17:21:33 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1546:9dc587c45dff
+| | user: hecht
+| | date: Fri Jan 16 23:02:59 2009 +0100
+| | summary: correct ffglut.cpp
+| |
+o | changeset: 1545:a0e928ee7675
+| | user: morice
+| | date: Fri Jan 16 11:38:05 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1544:2ccf8785babb
+| | user: morice
+| | date: Fri Jan 16 10:54:55 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1543:6d0a2e03c885
+| | user: morice
+| | date: Fri Jan 16 10:53:39 2009 +0100
+| | summary: ajout de savesurfacemesh
+| |
+o | changeset: 1542:dfed132f264e
+| | user: hecht
+| | date: Thu Jan 15 12:45:37 2009 +0100
+| | summary: pass to version 3.0-5, correct array of 3d finite element function
+| |
+o | changeset: 1541:bb42989cee29
+| | user: hecht
+| | date: Mon Jan 12 00:12:58 2009 +0100
+| | summary: add dx witer and test salalo80 at gmail.com
+| |
+o | changeset: 1540:350a96823dc1
+| | user: hecht
+| | date: Sat Jan 10 22:26:33 2009 +0100
+| | summary: pass to version 3.0-5
+| |
+o | changeset: 1539:0bac5193dd77
+| | user: morice
+| | date: Thu Jan 08 10:41:21 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1538:bb5d8553df2c
+| | user: hecht
+| | date: Wed Jan 07 17:21:59 2009 +0100
+| | summary: add new comment file
+| |
+o | changeset: 1537:e6bc0b8eb690
+| | user: morice
+| | date: Wed Jan 07 12:00:25 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1536:bbe299dedeb9
+| | user: hecht
+| | date: Wed Jan 07 09:55:41 2009 +0100
+| | summary: correct window message in ffglut
+| |
+o | changeset: 1535:df5a030a7a05
+| | user: hecht
+| | date: Wed Jan 07 08:48:03 2009 +0100
+| | summary: correct 3d view setting
+| |
+o | changeset: 1534:172df02611b6
+| | user: hecht
+| | date: Tue Jan 06 23:22:29 2009 +0100
+| | summary: coorect Pvue3
+| |
+o | changeset: 1533:76f34874cc73
+| | user: hecht
+| | date: Tue Jan 06 23:15:13 2009 +0100
+| | summary: add 3d plot
+| |
+o | changeset: 1532:0f8e1829074d
+| | user: hecht
+| | date: Tue Jan 06 20:30:40 2009 +0100
+| | summary: correct
+| |
+o | changeset: 1531:5f9834701ea2
+| | user: morice
+| | date: Tue Jan 06 14:14:35 2009 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1530:2a6f1aec0d48
+| | user: hecht
+| | date: Mon Jan 05 18:20:15 2009 +0100
+| | summary: correct download/tetgen/Makefile more portable
+| |
+o | changeset: 1529:52ee5604e8c2
+| | user: hecht
+| | date: Mon Jan 05 13:26:47 2009 +0100
+| | summary: correct int2d in 3d, makefiles fo tetgen and pb with $(DESTDIR)
+| |
+o | changeset: 1528:7356da4183b8
+| | user: hecht
+| | date: Mon Jan 05 11:26:43 2009 +0100
+| | summary: add test
+| |
+o | changeset: 1527:2251f3d08b88
+| | user: hecht
+| | date: Mon Jan 05 11:25:30 2009 +0100
+| | summary: correct in2d in 3d (missing factor 0.5)
+| |
+o | changeset: 1526:2d4a22506f73
+| | user: hecht
+| | date: Mon Dec 29 17:34:56 2008 +0100
+| | summary: coorect the seach of the include dir
+| |
+o | changeset: 1525:c67a5f5b9730
+| | user: hecht
+| | date: Mon Dec 29 17:18:03 2008 +0100
+| | summary: remove the clean routine variable after return, to much trouble.
+| |
+o | changeset: 1524:a52a4003e09e
+| | user: hecht
+| | date: Sat Dec 27 18:27:41 2008 +0100
+| | summary: coorect Laplace3d.edp plot with medit
+| |
+o | changeset: 1523:f0769f2c0b6a
+| | user: hecht
+| | date: Sat Dec 27 18:27:18 2008 +0100
+| | summary: correct medit.cpp
+| |
+o | changeset: 1522:5b65b33be28d
+| | user: hecht
+| | date: Sat Dec 27 17:19:34 2008 +0100
+| | summary: update INNOVATION
+| |
+o | changeset: 1521:0863f21fe19f
+| | user: hecht
+| | date: Sat Dec 27 17:15:45 2008 +0100
+| | summary: do pretty print correction
+| |
+o | changeset: 1520:9730a238b680
+| | user: hecht
+| | date: Sat Dec 27 16:48:58 2008 +0100
+| | summary: coorect old bug when return of arry
+| |
+o | changeset: 1519:35ab771c1a8b
+| | user: hecht
+| | date: Fri Dec 26 22:50:23 2008 +0100
+| | summary: correct makefile for dist install (change install-sh script)
+| |
+o | changeset: 1518:ec10c2fe4fe9
+| | user: hecht
+| | date: Fri Dec 26 20:31:46 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1517:6896f3fcf127
+| | user: hecht
+| | date: Fri Dec 26 17:38:24 2008 +0100
+| | summary: correct serialeze mesh in 64 mode
+| |
+o | changeset: 1516:7d5c2a818d42
+| | user: hecht
+| | date: Fri Dec 26 17:32:10 2008 +0100
+| | summary: correct serial in 64 bits mode
+| |
+o | changeset: 1515:5d564e4fe7c2
+| | user: hecht
+| | date: Fri Dec 26 17:23:18 2008 +0100
+| | summary: try to correct
+| |
+o | changeset: 1514:2d379f3e299d
+| | user: hecht
+| | date: Fri Dec 26 17:07:27 2008 +0100
+| | summary: correct write string
+| |
+o | changeset: 1513:ae9e13d7244a
+| | user: hecht
+| | date: Fri Dec 26 17:06:12 2008 +0100
+| | summary: correct write / read string
+| |
+o | changeset: 1512:86738eb65d94
+| | user: hecht
+| | date: Fri Dec 26 16:51:33 2008 +0100
+| | summary: correct Serialize Mesh chang long in long long
+| |
+o | changeset: 1511:09a0e9e181ef
+| | user: hecht
+| | date: Fri Dec 26 16:23:31 2008 +0100
+| | summary: correct build of ff-c++ in src/bin-win32/Makefile.am
+| |
+o | changeset: 1510:736a461db53e
+| | user: hecht
+| | date: Fri Dec 26 16:06:40 2008 +0100
+| | summary: now load.lik is bliud from Makefile and load.link.in
+| |
+o | changeset: 1509:28dbac93aec5
+| | user: hecht
+| | date: Fri Dec 26 16:01:48 2008 +0100
+| | summary: correct graphics of curve
+| |
+o | changeset: 1508:cb901fc6fca0
+| | user: hecht
+| | date: Thu Dec 18 10:01:05 2008 +0100
+| | summary: correct Makefile and graphoc stuff
+| |
+o | changeset: 1507:0407685463a7
+| | user: hecht
+| | date: Wed Dec 17 23:52:44 2008 +0100
+| | summary: correct ffglut for zooming y -> y-height ????
+| |
+o | changeset: 1506:503c8ccb098a
+| | user: hecht
+| | date: Tue Dec 16 23:04:47 2008 +0100
+| | summary: coorect makefile for install
+| |
+o | changeset: 1505:10afda2c8acd
+| | user: hecht
+| | date: Tue Dec 16 20:26:47 2008 +0100
+| | summary: add UMPAck solver
+| |
+o | changeset: 1504:20c5e5ffc8c4
+| | user: hecht
+| | date: Tue Dec 16 20:24:46 2008 +0100
+| | summary: change the umpack matrice solver
+| |
+o | changeset: 1503:26bc830cccc5
+| | user: hecht
+| | date: Tue Dec 16 17:48:59 2008 +0100
+| | summary: correct makefiles
+| |
+o | changeset: 1502:9a693aa2371a
+| | user: morice
+| | date: Tue Dec 16 12:07:56 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1501:93ed40d6a6e6
+| | user: hecht
+| | date: Fri Dec 12 15:30:04 2008 +0100
+| | summary: change ../statu.... in.statu (for install on macos)
+| |
+o | changeset: 1500:aca91a335b08
+| | user: hecht
+| | date: Fri Dec 12 15:18:03 2008 +0100
+| | summary: correct configure?ac of ubutu build package
+| |
+o | changeset: 1499:27e5aef742b2
+| | user: hecht
+| | date: Fri Dec 12 15:16:22 2008 +0100
+| | summary: correct missunderstanding of usage of strchr ( return 0 if the search fail).
+| |
+o | changeset: 1498:7299590b0a3c
+| | user: hecht
+| | date: Fri Dec 12 13:42:50 2008 +0100
+| | summary: correct the arpach driver , (pas mal.. FH)
+| |
+o | changeset: 1497:84171470d151
+| | user: hecht
+| | date: Fri Dec 12 00:30:14 2008 +0100
+| | summary: add the mode in eignevalue like in arpack
+| |
+o | changeset: 1496:7d7daf75c3ac
+| | user: hecht
+| | date: Wed Dec 10 10:31:24 2008 +0100
+| | summary: last chnage before version 3.0-2
+| |
+o | changeset: 1495:fe9d0abe1c54
+| | user: hecht
+| | date: Wed Dec 10 10:21:01 2008 +0100
+| | summary: coorect for win32
+| |
+o | changeset: 1494:4d73b3a20b0c
+| | user: hecht
+| | date: Wed Dec 10 09:47:46 2008 +0100
+| | summary: correct conflict with basename (-> baseName)
+| |
+o | changeset: 1493:0f58bb952ae8
+| | user: hecht
+| | date: Wed Dec 10 08:45:20 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1492:ca8c350f70e4
+| | user: hecht
+| | date: Wed Dec 10 08:37:56 2008 +0100
+| | summary: add ff++.hpp include file to simplify life.
+| |
+o | changeset: 1491:5101e82dafe6
+| | user: hecht
+| | date: Wed Dec 10 00:22:58 2008 +0100
+| | summary: correct miss * in pointer
+| |
+o | changeset: 1490:a673c97e0d53
+| | user: hecht
+| | date: Tue Dec 09 23:56:09 2008 +0100
+| | summary: coorect stuff for loadpath on macos.
+| |
+o | changeset: 1489:8ec039547530
+| | user: hecht
+| | date: Tue Dec 09 18:09:20 2008 +0100
+| | summary: coorect install on macos
+| |
+o | changeset: 1488:a7374bf14c69
+| | user: hecht
+| | date: Tue Dec 09 17:03:50 2008 +0100
+| | summary: change == in = miss tapping
+| |
+o | changeset: 1487:e45dff48bbd8
+| | user: hecht
+| | date: Tue Dec 09 16:59:37 2008 +0100
+| | summary: coorect include dir for install
+| |
+o | changeset: 1486:3402eeb91b14
+| | user: hecht
+| | date: Tue Dec 09 16:43:38 2008 +0100
+| | summary: stablization of install process
+| |
+o | changeset: 1485:357c63d481f1
+| | user: hecht
+| | date: Tue Dec 09 16:24:58 2008 +0100
+| | summary: correct on windows to build file in local dir
+| |
+o | changeset: 1484:1d6688c93330
+| | user: morice
+| | date: Tue Dec 09 16:06:48 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1483:beb24a04490c
+| | user: hecht
+| | date: Tue Dec 09 15:05:48 2008 +0100
+| | summary: next
+| |
+o | changeset: 1482:77eb855e58a3
+| | user: hecht
+| | date: Tue Dec 09 15:03:46 2008 +0100
+| | summary: correct binary read on stdin with medit.
+| |
+o | changeset: 1481:d7db611022fb
+| | user: hecht
+| | date: Mon Dec 08 22:55:47 2008 +0100
+| | summary: coorect makefile remove dependance with ff-c++
+| |
+o | changeset: 1480:be591602d2fe
+| | user: hecht
+| | date: Mon Dec 08 22:17:14 2008 +0100
+| | summary: corect pb when plot of const function
+| |
+o | changeset: 1479:51ae281c82c2
+| | user: hecht
+| | date: Mon Dec 08 22:02:19 2008 +0100
+| | summary: corret freefem++ args -fglut trap du to mistake in getprog-unix.hpp
+| |
+o | changeset: 1478:5adb19ceadd5
+| | user: hecht
+| | date: Mon Dec 08 16:23:50 2008 +0100
+| | summary: correct install dir of freefem++ include, load file.
+| |
+o | changeset: 1477:7cc876365ccc
+| | user: hecht
+| | date: Sun Dec 07 23:54:44 2008 +0100
+| | summary: pass tversion 3.0-2
+| |
+o | changeset: 1476:8f0c0241434e
+| | user: hecht
+| | date: Sun Dec 07 23:52:08 2008 +0100
+| | summary: coorect win32 end of prog add a wiat et save the logs
+| |
+o | changeset: 1475:deeabce583a3
+| | user: hecht
+| | date: Sun Dec 07 23:04:26 2008 +0100
+| | summary: cooret of save window console???
+| |
+o | changeset: 1474:7a964fb9cc9f
+| | user: hecht
+| | date: Sun Dec 07 22:51:31 2008 +0100
+| | summary: coorect end freefem, try to save consle text
+| |
+o | changeset: 1473:94e5bfadd2e9
+| | user: hecht
+| | date: Sat Dec 06 23:24:37 2008 +0100
+| | summary: coorect window version add save console at end job
+| |
+o | changeset: 1472:b072e947c473
+| | user: hecht
+| | date: Thu Dec 04 23:31:41 2008 +0100
+| | summary: coorect 3d exampel
+| |
+o | changeset: 1471:cfe19aab6e91
+| | user: hecht
+| | date: Thu Dec 04 23:07:04 2008 +0100
+| | summary: change medit in ffmedit (the freefem++ version of medit)
+| |
+o | changeset: 1470:e3003c8118ec
+| | user: hecht
+| | date: Thu Dec 04 22:08:28 2008 +0100
+| | summary: correct ..
+| |
+o | changeset: 1469:94c6f5128de0
+| | user: hecht
+| | date: Thu Dec 04 21:55:00 2008 +0100
+| | summary: add BLASLIB on SuperLu link
+| |
+o | changeset: 1468:8296e5850e9b
+| | user: hecht
+| | date: Thu Dec 04 21:28:48 2008 +0100
+| | summary: add no compile on pure win32
+| |
+o | changeset: 1467:2ba1cc1df0ce
+| | user: hecht
+| | date: Thu Dec 04 18:13:09 2008 +0100
+| | summary: coorect Makefile
+| |
+o | changeset: 1466:beadf0e06de0
+| | user: hecht
+| | date: Thu Dec 04 18:07:41 2008 +0100
+| | summary: correct Makefile
+| |
+o | changeset: 1465:338221666d53
+| | user: hecht
+| | date: Thu Dec 04 17:49:24 2008 +0100
+| | summary: coorect makefile
+| |
+o | changeset: 1464:7b0eb03791c7
+| | user: hecht
+| | date: Thu Dec 04 17:35:58 2008 +0100
+| | summary: correct pb unzip
+| |
+o | changeset: 1463:604e870e1a68
+| | user: hecht
+| | date: Thu Dec 04 17:31:14 2008 +0100
+| | summary: coorect Makefile for window
+| |
+o | changeset: 1462:e78f4ba9d558
+| | user: hecht
+| | date: Thu Dec 04 16:19:27 2008 +0100
+| | summary: correct Install-MacOS v3
+| |
+o | changeset: 1461:16b7e168e0af
+| | user: hecht
+| | date: Thu Dec 04 16:14:18 2008 +0100
+| | summary: correct of v3
+| |
+o | changeset: 1460:719b338b6647
+| | user: hecht
+| | date: Wed Dec 03 23:39:47 2008 +0100
+| | summary: correct makefile for load compilation
+| |
+o | changeset: 1459:1078ad4956af
+| | user: hecht
+| | date: Tue Dec 02 11:19:25 2008 +0100
+| | summary: correct build medit (compit.date)
+| |
+o | changeset: 1458:5ff7097a0422
+| | user: hecht
+| | date: Mon Dec 01 22:14:26 2008 +0100
+| | summary: correct ffglut.cpp
+| |
+o | changeset: 1457:275696a1143d
+| | user: hecht
+| | date: Sun Nov 30 22:01:37 2008 +0100
+| | summary: change SuperLU.cpp -> SuperLu.cpp
+| |
+o | changeset: 1456:60ee6e9fa734
+| | user: hecht
+| | date: Sun Nov 30 22:00:31 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1455:4638f02095af
+| | user: hecht
+| | date: Sun Nov 30 21:43:24 2008 +0100
+| | summary: correct bmo.cpp on cygwin
+| |
+o | changeset: 1454:5680cb4fc599
+| | user: hecht
+| | date: Sun Nov 30 21:26:42 2008 +0100
+| | summary: correct bmo rand generator for win32
+| |
+o | changeset: 1453:b813c4de5ff9
+| | user: hecht
+| | date: Sat Nov 29 22:38:28 2008 +0100
+| | summary: change rindex -> strrchr under win32
+| |
+o | changeset: 1452:62b7a73e0883
+| | user: hecht
+| | date: Sat Nov 29 21:49:18 2008 +0100
+| | summary: correct the doc
+| |
+o | changeset: 1451:3cedfc02647b
+| | user: hecht
+| | date: Sat Nov 29 21:45:16 2008 +0100
+| | summary: Upgrade the doc
+| |
+o | changeset: 1450:0f2d69e72651
+| | user: hecht
+| | date: Sat Nov 29 19:20:30 2008 +0100
+| | summary: add
+| |
+o | changeset: 1449:f9d27572c59e
+| | user: hecht
+| | date: Sat Nov 29 19:14:43 2008 +0100
+| | summary: add configure --disable-dependency-tracking for universal build (macos)
+| |
+o | changeset: 1448:5972ee9487be
+| | user: hecht
+| | date: Sat Nov 29 19:02:26 2008 +0100
+| | summary: ok a not to bad version
+| |
+o | changeset: 1447:feed975f6576
+| | user: hecht
+| | date: Sat Nov 29 18:24:07 2008 +0100
+| | summary: correct load facily (test if multy load, and load only one time)
+| |
+o | changeset: 1446:3880a683b418
+| | user: hecht
+| | date: Sat Nov 29 18:17:37 2008 +0100
+| | summary: correct load example
+| |
+o | changeset: 1445:c4c1e3ee80a3
+| | user: hecht
+| | date: Sat Nov 29 17:39:46 2008 +0100
+| | summary: change bmo.cpp -> lgbmo.cpp
+| |
+o | changeset: 1444:ae1862b180e5
+| | user: hecht
+| | date: Sat Nov 29 17:34:17 2008 +0100
+| | summary: add bmo stuff)
+| |
+o | changeset: 1443:2607ddbf9df2
+| | user: hecht
+| | date: Sat Nov 29 16:47:49 2008 +0100
+| | summary: remove medit lauching when no graphic
+| |
+o | changeset: 1442:7ff31fce3f84
+| | user: hecht
+| | date: Sat Nov 29 16:36:48 2008 +0100
+| | summary: recorrect
+| |
+o | changeset: 1441:bb346316ad4a
+| | user: hecht
+| | date: Sat Nov 29 16:32:00 2008 +0100
+| | summary: rebuld regtests.edp
+| |
+o | changeset: 1440:c10cf4df8949
+| | user: hecht
+| | date: Sat Nov 29 16:25:31 2008 +0100
+| | summary: remove glumesh.edp form regtest
+| |
+o | changeset: 1439:d0f1c7e9c376
+| | user: hecht
+| | date: Sat Nov 29 16:05:24 2008 +0100
+| | summary: do graphic only on mpirank==0
+| |
+o | changeset: 1438:eee4429533f7
+| | user: hecht
+| | date: Sat Nov 29 15:58:42 2008 +0100
+| | summary: correct bug in eigenvalue part.
+| |
+o | changeset: 1437:0a0f8d8930f9
+| | user: morice
+| | date: Fri Nov 28 12:12:32 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1436:e4c7ffca9ab1
+| | user: morice
+| | date: Fri Nov 28 12:11:03 2008 +0100
+| | summary: Transformation Matrice Morse (stockage ligne) en CCS(compressed column storage)
+| |
+o | changeset: 1435:45be17df8622
+| | user: morice
+| | date: Fri Nov 28 11:43:19 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1434:fd52925b5f2a
+| | user: hecht
+| | date: Fri Nov 28 10:17:32 2008 +0100
+| | summary: miss tappin SuperLU.cpp -> SuperLu.cpp
+| |
+o | changeset: 1433:acf7ea000d8a
+| | user: hecht
+| | date: Fri Nov 28 08:09:14 2008 +0100
+| | summary: correct 3d exemples
+| |
+o | changeset: 1432:b0289a360bb3
+| | user: hecht
+| | date: Wed Nov 26 20:17:04 2008 +0100
+| | summary: correct tetgen
+| |
+o | changeset: 1431:ba4c8e8b1a47
+| | user: hecht
+| | date: Wed Nov 26 19:51:10 2008 +0100
+| | summary: correct missing link pb (tetgen.cpp include msh3.cpp with out int.
+| |
+o | changeset: 1430:d973280bc7af
+| | user: morice
+| | date: Wed Nov 26 16:26:31 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1429:5f00f74d83cd
+| | user: hecht
+| | date: Tue Nov 25 23:03:41 2008 +0100
+| | summary: a last touch before the version...
+| |
+o | changeset: 1428:198f6558aa4d
+| | user: hecht
+| | date: Tue Nov 25 21:41:51 2008 +0100
+| | summary: correct auto compilation of ffw3, superlu, tetgen in cas au enable-download
+| |
+o | changeset: 1427:f0e86c3e6d85
+| | user: hecht
+| | date: Tue Nov 25 18:38:00 2008 +0100
+| | summary: coorect script for freefem++ app
+| |
+o | changeset: 1426:9b1df463725b
+| | user: hecht
+| | date: Tue Nov 25 18:22:54 2008 +0100
+| | summary: coorect install macos
+| |
+o | changeset: 1425:3c52c2253fb7
+| | user: hecht
+| | date: Tue Nov 25 17:27:14 2008 +0100
+| | summary: try to finalise version 3.0-1
+| |
+o | changeset: 1424:6d9de1c4a05d
+| | user: hecht
+| | date: Tue Nov 25 17:09:49 2008 +0100
+| | summary: next
+| |
+o | changeset: 1423:42713d97f36f
+| | user: hecht
+| | date: Tue Nov 25 16:49:48 2008 +0100
+| | summary: correct load examples change popoe.cpp in medit.cpp
+| |
+o | changeset: 1422:779acd0cfbe2
+| | user: hecht
+| | date: Tue Nov 25 14:16:39 2008 +0100
+| | summary: add missing file
+| |
+o | changeset: 1421:e70b14304b98
+| | user: hecht
+| | date: Tue Nov 25 01:05:08 2008 +0100
+| | summary: coorect mistake in use of ffglut (remove if FreeFem++-xxx )
+| |
+o | changeset: 1420:0d19f82c7039
+| | user: hecht
+| | date: Mon Nov 24 23:18:25 2008 +0100
+| | summary: add stuff to save window buff.
+| |
+o | changeset: 1419:f9ae484334fc
+| | user: hecht
+| | date: Mon Nov 24 22:46:20 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1418:9650773d46e0
+| | user: hecht
+| | date: Mon Nov 24 21:31:56 2008 +0100
+| | summary: correct layer.edp
+| |
+o | changeset: 1417:ec0d0e8459b0
+| | user: hecht
+| | date: Mon Nov 24 20:49:58 2008 +0100
+| | summary: coorect glumesh2d load (now in freefem++)
+| |
+o | changeset: 1416:d4c3c0aa5fd8
+| | user: hecht
+| | date: Mon Nov 24 20:20:15 2008 +0100
+| | summary: update to 3.0_1 testing
+| |
+o | changeset: 1415:a29e50390efd
+| | user: hecht
+| | date: Mon Nov 24 20:10:17 2008 +0100
+| | summary: past to version 3.0-1
+| |
+o | changeset: 1414:8ffccb723fd7
+| | user: hecht
+| | date: Mon Nov 24 17:22:44 2008 +0100
+| | summary: correct FreeFem++
+| |
+o | changeset: 1413:cb84d704cd68
+| | user: hecht
+| | date: Mon Nov 24 17:08:38 2008 +0100
+| | summary: correct of missing io
+| |
+o | changeset: 1412:ca6fdf19f43a
+| | user: hecht
+| | date: Mon Nov 24 14:47:12 2008 +0100
+| | summary: coorec tmiss tapping
+| |
+o | changeset: 1411:bf601c202065
+| | user: hecht
+| | date: Mon Nov 24 14:45:02 2008 +0100
+| | summary: add window stuff
+| |
+o | changeset: 1410:069a9f4b35f8
+| | user: hecht
+| | date: Mon Nov 24 14:22:26 2008 +0100
+| | summary: correct sing flags with PCrgraph.cpp
+| |
+o | changeset: 1409:2eff1dc91fa8
+| | user: hecht
+| | date: Mon Nov 24 13:58:45 2008 +0100
+| | summary: correct miss tapping
+| |
+o | changeset: 1408:567bb820c141
+| | user: hecht
+| | date: Mon Nov 24 13:44:40 2008 +0100
+| | summary: add @LIBSNOCONSOLE@ to link freefem++ on windows
+| |
+o | changeset: 1407:a592c340fa42
+| | user: hecht
+| | date: Mon Nov 24 10:15:57 2008 +0100
+| | summary: yntaxe err. )) -> ) line 51
+| |
+o | changeset: 1406:9456f62f1675
+| | user: hecht
+| | date: Mon Nov 24 10:09:54 2008 +0100
+| | summary: do the final (may be ) on no graphics
+| |
+o | changeset: 1405:d33cd9480a19
+| | user: hecht
+| | date: Sun Nov 23 23:24:42 2008 +0100
+| | summary: remove -mwindows flag
+| |
+o | changeset: 1404:92d820fc3689
+| | user: hecht
+| | date: Sun Nov 23 22:56:24 2008 +0100
+| | summary: try to have good version of ffglut
+| |
+o | changeset: 1403:fd3446efd662
+| | user: hecht
+| | date: Sun Nov 23 22:23:51 2008 +0100
+| | summary: correct for win32 api
+| |
+o | changeset: 1402:cd1e9c3a65f2
+| | user: hecht
+| | date: Sun Nov 23 16:40:45 2008 +0100
+| | summary: crrech ff_glut lib under win32
+| |
+o | changeset: 1401:eaf758e3a489
+| | user: hecht
+| | date: Sun Nov 23 16:32:33 2008 +0100
+| | summary: change glut libs under win32 (no cygwin)
+| |
+o | changeset: 1400:854085e2d35f
+| | user: hecht
+| | date: Sun Nov 23 16:21:00 2008 +0100
+| | summary: add new file for win32 comile
+| |
+o | changeset: 1399:95336c8e2c44
+| | user: hecht
+| | date: Sun Nov 23 15:36:58 2008 +0100
+| | summary: update for ffglu and windows
+| |
+o | changeset: 1398:f9100b0bb790
+| | user: hecht
+| | date: Sun Nov 23 14:54:49 2008 +0100
+| | summary: correct of win32
+| |
+o | changeset: 1397:7d704bab6a59
+| | user: hecht
+| | date: Sun Nov 23 14:53:06 2008 +0100
+| | summary: correct PlotStream.hpp for win32
+| |
+o | changeset: 1396:d4bab58e76b7
+| | user: hecht
+| | date: Sun Nov 23 10:11:42 2008 +0100
+| | summary: reomve exeption
+| |
+o | changeset: 1395:7746ed4b6e53
+| | user: hecht
+| | date: Sat Nov 22 20:29:26 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1394:76b21f8a6f07
+| | user: hecht
+| | date: Sat Nov 22 18:16:09 2008 +0100
+| | summary: correct Makefile.am
+| |
+o | changeset: 1393:28088ce8937e
+| | user: hecht
+| | date: Sat Nov 22 18:15:41 2008 +0100
+| | summary: add threads interface of windows
+| |
+o | changeset: 1392:302846277f78
+| | user: hecht
+| | date: Thu Nov 20 14:05:20 2008 +0100
+| | summary: correct configure.ac fo ffglut compie with pthread
+| |
+o | changeset: 1391:04a9b160e8c4
+| | user: hecht
+| | date: Thu Nov 20 13:28:38 2008 +0100
+| | summary: correct int -> GLint in wiewport array type
+| |
+o | changeset: 1390:5b0dea51e3ac
+| | user: hecht
+| | date: Wed Nov 19 14:40:29 2008 +0100
+| | summary: crrect build pkg dir
+| |
+o | changeset: 1389:0e6bc0a93bdd
+| | user: hecht
+| | date: Wed Nov 19 14:38:27 2008 +0100
+| | summary: add super bluid lib
+| |
+o | changeset: 1388:f4ea619db3e9
+| | user: hecht
+| | date: Wed Nov 19 11:55:19 2008 +0100
+| | summary: correct of the download/tetgen/Makefile makefile.
+| |
+o | changeset: 1387:3b6ce28f34f8
+| | user: hecht
+| | date: Tue Nov 18 17:38:31 2008 +0100
+| | summary: add missig file
+| |
+o | changeset: 1386:08adb5c34633
+| | user: hecht
+| | date: Sun Nov 16 16:40:00 2008 +0100
+| | summary: try to put all download in same directory download/pkg
+| |
+o | changeset: 1385:0f9c81225b28
+| | user: hecht
+| | date: Sun Nov 16 12:39:46 2008 +0100
+| | summary: add package you ubuntu
+| |
+o | changeset: 1384:2f8474dc4698
+| | user: hecht
+| | date: Sun Nov 16 11:51:10 2008 +0100
+| | summary: correct the sieze of array to store eigen item (add +1)
+| |
+o | changeset: 1383:b7546bc2390c
+| | user: hecht
+| | date: Sun Nov 16 11:09:58 2008 +0100
+| | summary: remove uninitialiez assert.
+| |
+o | changeset: 1382:ff78c27246d0
+| | user: hecht
+| | date: Sun Nov 16 10:48:56 2008 +0100
+| | summary: coorect libmesh -> libmesh
+| |
+o | changeset: 1381:552ace2fcfc7
+| | user: hecht
+| | date: Sun Nov 16 10:23:09 2008 +0100
+| | summary: coorect Makefile.am dependence to bluid compil.date
+| |
+o | changeset: 1380:0caf8178753d
+| | user: hecht
+| | date: Sun Nov 16 10:02:05 2008 +0100
+| | summary: correct ffmedit Makefile.am missing bluid of ompil.date file
+| |
+o | changeset: 1379:4e8f7f89556a
+| | user: hecht
+| | date: Sun Nov 16 09:43:24 2008 +0100
+| | summary: correct srv/nw/Makefile.am
+| |
+o | changeset: 1378:9516426752a3
+| | user: hecht
+| | date: Sun Nov 16 09:33:36 2008 +0100
+| | summary: add missing file
+| |
+o | changeset: 1377:93b754159849
+| | user: hecht
+| | date: Sun Nov 16 01:06:32 2008 +0100
+| | summary: Huge change in the graphic part.
+| |
+o | changeset: 1376:9f86824cee2c
+| | user: morice
+| | date: Thu Nov 13 16:43:39 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1375:1589ecf1c4b7
+| | user: morice
+| | date: Thu Nov 13 16:40:04 2008 +0100
+| | summary: Removed file
+| |
+o | changeset: 1374:32d14aaa8bc1
+| | user: morice
+| | date: Wed Nov 05 11:15:23 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1373:0781509f872e
+| | user: morice
+| | date: Tue Nov 04 17:18:35 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1372:1faebc041661
+| | user: morice
+| | date: Tue Nov 04 17:16:50 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1371:cf940b88989d
+| | user: morice
+| | date: Thu Oct 30 11:38:03 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1370:472ebd5510b3
+| | user: morice
+| | date: Thu Oct 30 11:29:15 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1369:884b6e24b73b
+| | user: morice
+| | date: Wed Oct 29 16:29:20 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1368:71743a70f477
+| | user: morice
+| | date: Wed Oct 29 15:10:15 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1367:5f666b631f8b
+| | user: morice
+| | date: Wed Oct 29 14:12:46 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1366:5ac0c0b60644
+| | user: morice
+| | date: Wed Oct 29 11:24:56 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1365:d236083ebc43
+| | user: morice
+| | date: Wed Oct 29 11:21:03 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1364:85909104f0c6
+| | user: morice
+| | date: Wed Oct 29 11:09:45 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1363:5cb1c4d257fd
+| | user: morice
+| | date: Mon Oct 27 10:09:44 2008 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1362:cf7b0f1fb9da
+| | user: hecht
+| | date: Mon Oct 20 22:24:33 2008 +0200
+| | summary: add medit to freefem++
+| |
+o | changeset: 1361:41bd8613d841
+| | user: hecht
+| | date: Mon Oct 20 16:11:57 2008 +0200
+| | summary: add medit in ff++
+| |
+o | changeset: 1360:6e76013fe786
+| | user: hecht
+| | date: Sun Oct 19 21:59:21 2008 +0200
+| | summary: -- correct none sym eigen arpack call
+| |
+o | changeset: 1359:97fc195ae7e3
+| | user: hecht
+| | date: Fri Oct 17 10:44:44 2008 +0200
+| | summary: coorect memory misstake in profile matrix.
+| |
+o | changeset: 1358:182ef0dd29d7
+| | user: hecht
+| | date: Thu Oct 16 23:10:19 2008 +0200
+| | summary: correct memory problem with valgrind.
+| |
+o | changeset: 1357:fceafcd3c68a
+| | user: hecht
+| | date: Mon Oct 13 15:58:25 2008 +0200
+| | summary: correct low of precision of geom
+| |
+o | changeset: 1356:a98d4ac7e0c7
+| | user: hecht
+| | date: Mon Oct 06 16:59:07 2008 +0200
+| | summary: load in correct .edp
+| |
+o | changeset: 1355:4de09c7ef69d
+| | user: hecht
+| | date: Mon Oct 06 10:04:30 2008 +0200
+| | summary: correct 3d. convert
+| |
+o | changeset: 1354:6fb475c41e45
+| | user: hecht
+| | date: Mon Oct 06 09:28:36 2008 +0200
+| | summary: correct convect 3D
+| |
+o | changeset: 1353:a31edb97daea
+| | user: hecht
+| | date: Mon Oct 06 09:26:17 2008 +0200
+| | summary: correct convect in 3D.
+| |
+o | changeset: 1352:c17f71265f73
+| | user: morice
+| | date: Thu Sep 25 15:00:32 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1351:e2d0255aa3b7
+| | user: morice
+| | date: Thu Sep 25 14:55:41 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1350:6bad008adbfd
+| | user: morice
+| | date: Thu Sep 18 11:31:12 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1349:fcdbf4222941
+| | user: morice
+| | date: Thu Sep 18 11:24:59 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1348:f577647a6ef8
+| | user: hecht
+| | date: Wed Sep 17 18:25:19 2008 +0200
+| | summary: correct PB on win32 version with P102_1.o (bogus) so remve because not used.
+| |
+o | changeset: 1347:e94555467e80
+| | user: hecht
+| | date: Thu Sep 04 13:18:21 2008 +0200
+| | summary: add NSI3d-carac.edp
+| |
+o | changeset: 1346:fd5ed1df556b
+| | user: hecht
+| | date: Wed Aug 27 17:07:31 2008 +0200
+| | summary: a fist beta version with 3d convect
+| |
+o | changeset: 1345:0e28f1046f82
+| | user: hecht
+| | date: Wed Aug 27 16:13:16 2008 +0200
+| | summary: correct in case of more than 2 proc.
+| |
+o | changeset: 1344:bc6b22ce6c7d
+| | user: hecht
+| | date: Wed Aug 27 15:28:02 2008 +0200
+| | summary: cleanning mpi output
+| |
+o | changeset: 1343:14964c74521c
+| | user: hecht
+| | date: Wed Aug 27 15:18:46 2008 +0200
+| | summary: same
+| |
+o | changeset: 1342:3101fb2fa5a9
+| | user: hecht
+| | date: Wed Aug 27 15:16:55 2008 +0200
+| | summary: improve output of end mpi
+| |
+o | changeset: 1341:c9b452184dc3
+| | user: hecht
+| | date: Wed Aug 27 14:50:58 2008 +0200
+| | summary: output clening
+| |
+o | changeset: 1340:5d9c08ee5b5a
+| | user: hecht
+| | date: Wed Aug 27 14:30:24 2008 +0200
+| | summary: correct MPI dump
+| |
+o | changeset: 1339:761f96cc8fa4
+| | user: hecht
+| | date: Mon Aug 25 16:18:28 2008 +0200
+| | summary: add new test
+| |
+o | changeset: 1338:96837b9d8490
+| | user: hecht
+| | date: Mon Aug 25 16:01:19 2008 +0200
+| | summary: add meditsol.edp test (bugus)
+| |
+o | changeset: 1337:631ca7f3b833
+| | user: hecht
+| | date: Mon Aug 25 15:23:45 2008 +0200
+| | summary: correct popen.cpp
+| |
+o | changeset: 1336:3fae4ab680d1
+| | user: hecht
+| | date: Mon Aug 25 15:00:35 2008 +0200
+| | summary: add popen.cpp of medit link
+| |
+o | changeset: 1335:9a3735113e93
+| | user: hecht
+| | date: Mon Aug 25 10:57:43 2008 +0200
+| | summary: add convect 3D
+| |
+o | changeset: 1334:4fd6a0503885
+| | user: hecht
+| | date: Wed Jul 23 23:00:00 2008 +0200
+| | summary: a beta version of 3d version
+| |
+o | changeset: 1333:634631a624d7
+| | user: hecht
+| | date: Wed Jul 23 22:11:51 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1332:dd46501bfe35
+| | user: hecht
+| | date: Wed Jul 23 22:09:31 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1331:5cadbb291dff
+| | user: hecht
+| | date: Wed Jul 23 14:51:56 2008 +0200
+| | summary: correct CXXFLAGS for load.link
+| |
+o | changeset: 1330:9acc92fffb15
+| | user: hecht
+| | date: Wed Jul 23 14:07:36 2008 +0200
+| | summary: coorect algo.edp
+| |
+o | changeset: 1329:4f3864fced7f
+| | user: hecht
+| | date: Wed Jul 23 14:05:48 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1328:593795622f68
+| | user: hecht
+| | date: Wed Jul 23 13:47:08 2008 +0200
+| | summary: add new 3d exemple
+| |
+o | changeset: 1327:e396a7e86ddf
+| | user: hecht
+| | date: Wed Jul 23 13:03:58 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1326:4101a19ce39b
+| | user: morice
+| | date: Wed Jul 23 12:15:13 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1325:8511165a8c1a
+| | user: morice
+| | date: Wed Jul 23 12:10:59 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1324:a7fbfb69aff9
+| | user: hecht
+| | date: Mon Jul 07 22:39:14 2008 +0200
+| | summary: add big change in pointer cleanning of mesh.
+| |
+o | changeset: 1323:c1c144d0c93e
+| | user: morice
+| | date: Fri Jun 27 10:45:42 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1322:72d5d48de380
+| | user: hecht
+| | date: Fri Jun 27 10:07:39 2008 +0200
+| | summary: remove const char warning
+| |
+o | changeset: 1321:0350e3b8531b
+| | user: hecht
+| | date: Fri Jun 27 10:00:34 2008 +0200
+| | summary: remove tetgen part
+| |
+o | changeset: 1320:ae68e0e4759d
+| | user: hecht
+| | date: Fri Jun 27 09:51:03 2008 +0200
+| | summary: correct FQuadTree construction
+| |
+o | changeset: 1319:dacab2664d74
+| | user: hecht
+| | date: Fri Jun 27 09:50:21 2008 +0200
+| | summary: add constructeur dans FQuadTree
+| |
+o | changeset: 1318:47569a10b553
+| | user: hecht
+| | date: Thu Jun 26 17:46:28 2008 +0200
+| | summary: correct RdtoZd fonction
+| |
+o | changeset: 1317:b286cadc4463
+| | user: morice
+| | date: Thu Jun 26 16:12:33 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1316:bd0a4bc55b82
+| | user: morice
+| | date: Thu Jun 26 14:18:52 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1315:353f0557aeeb
+| | user: hecht
+| | date: Tue Jun 24 13:36:56 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1314:b48bf88426b8
+| | user: hecht
+| | date: Tue Jun 24 11:48:58 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1313:db5f17893fd7
+| | user: hecht
+| | date: Sun Jun 22 20:45:48 2008 +0200
+| | summary: remove of cout
+| |
+o | changeset: 1312:d807bb0388ff
+| | user: hecht
+| | date: Sat Jun 21 14:18:56 2008 +0200
+| | summary: add missing logo
+| |
+o | changeset: 1311:0f16fe410b58
+| | user: hecht
+| | date: Sat Jun 21 14:17:09 2008 +0200
+| | summary: the alpha version. 3.00
+| |
+o | changeset: 1310:f6455cf8648e
+| | user: hecht
+| | date: Sat Jun 21 14:05:00 2008 +0200
+| | summary: add missing files
+| |
+o | changeset: 1309:07e1db73daf0
+| | user: morice
+| | date: Fri Jun 20 16:58:55 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1308:7b7733d0e797
+| | user: hecht
+| | date: Thu Jun 19 23:37:37 2008 +0200
+| | summary: add missing files
+| |
+o | changeset: 1307:3302a94264c3
+| | user: hecht
+| | date: Thu Jun 19 23:22:54 2008 +0200
+| | summary: correct examples++-load/Makefile.am to add dependence to compile glumesh.cpp
+| |
+o | changeset: 1306:6edc84e14d53
+| | user: hecht
+| | date: Thu Jun 19 14:21:08 2008 +0200
+| | summary: un version pas mal
+| |
+o | changeset: 1305:173c659a2f6f
+| | user: hecht
+| | date: Wed Jun 18 13:55:36 2008 +0200
+| | summary: add true random function
+| |
+o | changeset: 1304:3c554295e169
+| | user: hecht
+| | date: Wed Jun 18 11:17:57 2008 +0200
+| | summary: coorect error between R2 and R3 stuff.
+| |
+o | changeset: 1303:8345c9dcffd8
+| | user: hecht
+| | date: Fri Jun 13 12:01:42 2008 +0200
+| | summary: coorect missing patch-lapack in arpack
+| |
+o | changeset: 1302:a8e47b3a6ead
+| | user: hecht
+| | date: Thu Jun 12 23:30:25 2008 +0200
+| | summary: add missing file
+| |
+o | changeset: 1301:8419ef4b5ea6
+| | user: hecht
+| | date: Tue Jun 10 22:19:20 2008 +0200
+| | summary: remove arpack++ from freefem++
+| |
+o | changeset: 1300:5f7e9ae6121c
+| | user: hecht
+| | date: Tue Jun 10 22:17:25 2008 +0200
+| | summary: remove arpack++
+| |
+o | changeset: 1299:47c0d89ac233
+| | user: hecht
+| | date: Tue Jun 10 22:15:11 2008 +0200
+| | summary: remove arpack++
+| |
+o | changeset: 1298:e2fed9f3b434
+| | user: hecht
+| | date: Mon Jun 09 18:36:48 2008 +0200
+| | summary: correction g++ 4.2
+| |
+o | changeset: 1297:cde6b903a078
+| | user: hecht
+| | date: Mon Jun 09 18:36:08 2008 +0200
+| | summary: correction of g++ 4.2
+| |
+o | changeset: 1296:dba2f88087e1
+| | user: morice
+| | date: Mon Jun 09 14:32:52 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1295:a38a0a05c591
+| | user: morice
+| | date: Mon Jun 09 14:15:13 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1294:62223cb51036
+| | user: hecht
+| | date: Wed May 28 21:44:49 2008 +0200
+| | summary: a correct in FEproduct
+| |
+o | changeset: 1293:5725424057d0
+| | user: hecht
+| | date: Wed May 28 17:18:14 2008 +0200
+| | summary: remove dump
+| |
+o | changeset: 1292:8b52cc829a1e
+| | user: hecht
+| | date: Wed May 28 17:16:34 2008 +0200
+| | summary: the first 3d version running all test
+| |
+o | changeset: 1291:6677a3cb311b
+| | user: hecht
+| | date: Mon May 26 17:12:44 2008 +0200
+| | summary: add explicit instenciation E_set_fev3
+| |
+o | changeset: 1290:384cb8fc29ec
+| | user: hecht
+| | date: Mon May 26 16:59:08 2008 +0200
+| | summary: Stokes is working now.
+| |
+o | changeset: 1289:44bcfe697314
+| | user: hecht
+| | date: Mon May 26 09:07:56 2008 +0200
+| | summary: add STokes in 3d
+| |
+o | changeset: 1288:e1870d7093b2
+| | user: hecht
+| | date: Sat May 24 17:05:38 2008 +0200
+| | summary: the first Laplace Operator in 3d work in P13d,P23d finite element.
+| |
+o | changeset: 1287:0601417c00f0
+| | user: hecht
+| | date: Thu May 22 16:05:13 2008 +0200
+| | summary: correct pb in mesure of tet.
+| |
+o | changeset: 1286:13797127fc40
+| | user: hecht
+| | date: Wed May 21 12:41:42 2008 +0200
+| | summary: correct GTree Case methode
+| |
+o | changeset: 1285:25a3f156a803
+| | user: morice
+| | date: Wed May 21 11:05:22 2008 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1284:12639b380533
+| | user: hecht
+| | date: Tue May 20 22:05:36 2008 +0200
+| | summary: pb case sensitive in include
+| |
+o | changeset: 1283:264ad3e9df15
+| | user: hecht
+| | date: Tue May 20 16:44:49 2008 +0200
+| | summary: modif for layer meshes.
+| |
+o | changeset: 1282:eede6e45ca29
+| | user: hecht
+| | date: Tue May 20 12:12:16 2008 +0200
+| | summary: correct layer
+| |
+o | changeset: 1281:9e5802e9e6f2
+| | user: hecht
+| | date: Tue May 20 11:08:56 2008 +0200
+| | summary: add 3 files
+| |
+o | changeset: 1280:25be52991a76
+| | user: hecht
+| | date: Fri May 16 10:07:35 2008 +0200
+| | summary: add int2d on border off 3d mesh
+| |
+o | changeset: 1279:271a0c10b941
+| | user: hecht
+| | date: Fri May 16 00:26:03 2008 +0200
+| | summary: add PBord methode to compute genericaly integrale on border element.
+| |
+o | changeset: 1278:bcf7733f66cf
+| | user: hecht
+| | date: Thu May 15 23:39:14 2008 +0200
+| | summary: correct class Z3 + Save 3d mesh.
+| |
+o | changeset: 1277:7f3efc97d905
+| | user: hecht
+| | date: Thu May 15 23:11:21 2008 +0200
+| | summary: remove strversionnumber.cpp (build by the makefiel)
+| |
+o | changeset: 1276:6846c158476b
+| | user: hecht
+| | date: Thu May 15 23:03:50 2008 +0200
+| | summary: correct win32 mistake double def + PB GQTree R1
+| |
+o | changeset: 1275:9b461360cca1
+| | user: hecht
+| | date: Thu May 15 14:52:25 2008 +0200
+| | summary: correct missing assert def in src/femlib/QuadratureFormular.cpp
+| |
+o | changeset: 1274:59f70178b6a3
+| | user: hecht
+| | date: Thu May 15 14:13:05 2008 +0200
+| | summary: correct
+| |
+o | changeset: 1273:4e1c1f21abc0
+| | user: hecht
+| | date: Thu May 15 13:31:00 2008 +0200
+| | summary: add missing file
+| |
+o | changeset: 1272:1e7c8947e560
+| | user: hecht
+| | date: Thu May 15 13:28:57 2008 +0200
+| | summary: correct include dir
+| |
+o | changeset: 1271:20d19853a704
+| | user: hecht
+| | date: Thu May 15 12:48:33 2008 +0200
+| | summary: add missing file
+| |
+o | changeset: 1270:6375ea25c494
+| | user: hecht
+| | date: Thu May 15 12:05:19 2008 +0200
+| | summary: a fist 3d version, with PB on boundaru contion.
+| |
+o | changeset: 1269:93f976abeabc
+| | user: hecht
+| | date: Thu May 15 00:47:02 2008 +0200
+| | summary: 3d next step
+| |
+o | changeset: 1268:60d306545870
+| | user: hecht
+| | date: Wed May 14 14:48:25 2008 +0200
+| | summary: 3d continuing
+| |
+o | changeset: 1267:051a2b0b8339
+| | user: hecht
+| | date: Wed May 07 16:12:02 2008 +0200
+| | summary: a first 3d version ..
+| |
+o | changeset: 1266:a11672848900
+| | user: hecht
+| | date: Tue Apr 29 22:19:00 2008 +0200
+| | summary: add file
+| |
+o | changeset: 1265:259dcc851d31
+| | user: hecht
+| | date: Tue Apr 29 22:01:24 2008 +0200
+| | summary: correct examples++-load
+| |
+o | changeset: 1264:53db1907af65
+| | user: hecht
+| | date: Tue Apr 29 21:05:36 2008 +0200
+| | summary: pass to version 2.25 (last version before 3.0)
+| |
+o | changeset: 1263:ec6a9046af52
+| | tag: release_2_24_4
+| | user: hecht
+| | date: Wed Apr 23 12:18:12 2008 +0200
+| | summary: correct missing code in DG of term in linear form
+| |
+o | changeset: 1262:e6648830647f
+| | user: hecht
+| | date: Fri Apr 18 08:26:34 2008 +0200
+| | summary: see innovation + correzction in doc
+| |
+o | changeset: 1261:59b6014ebe00
+| | user: hecht
+| | date: Fri Apr 11 16:52:51 2008 +0200
+| | summary: add formal operator .* and ./ on array []
+| |
+o | changeset: 1260:ef82bf406677
+| | user: hecht
+| | date: Fri Apr 11 16:14:11 2008 +0200
+| | summary: correct lex.cpp for parameter macro comma between [].
+| |
+o | changeset: 1259:94fb8bee70ab
+| | user: hecht
+| | date: Wed Apr 09 15:46:19 2008 +0200
+| | summary: correct eigenvalue, (undo remove 1 line)
+| |
+o | changeset: 1258:05b9c0c843e5
+| | user: hecht
+| | date: Wed Apr 09 14:20:41 2008 +0200
+| | summary: ad resid= vector in eigen value (see arpack doc)
+| |
+o | changeset: 1257:d32b839daca5
+| | user: hecht
+| | date: Wed Apr 09 10:03:09 2008 +0200
+| | summary: correct err 21 trp in mshptg (pile trop petit)
+| |
+o | changeset: 1256:3cdb4d96732c
+| | user: hecht
+| | date: Wed Apr 09 09:24:39 2008 +0200
+| | summary: coorect missing trap in case of errror in msgtpg
+| |
+o | changeset: 1255:40aba1424fd5
+| | user: hecht
+| | date: Tue Apr 01 12:05:59 2008 +0200
+| | summary: add Bob Gustafson coorect in the doc.
+| |
+o | changeset: 1254:99c4f39ceb54
+| | user: hecht
+| | date: Thu Mar 27 14:17:50 2008 +0100
+| | summary: correct confire.ac build FLIBS (suite)
+| |
+o | changeset: 1253:7952d7e59157
+| | user: hecht
+| | date: Thu Mar 27 12:17:40 2008 +0100
+| | summary: misa a jour INNOVATION
+| |
+o | changeset: 1252:686b9984089a
+| | user: hecht
+| | date: Thu Mar 27 12:14:26 2008 +0100
+| | summary: correct configre.ac to check FLIBS and test the value of FLIBS and X11_LIBS
+| |
+o | changeset: 1251:7a218e8eb4e4
+| | user: hecht
+| | date: Fri Feb 22 18:10:51 2008 +0100
+| | summary: add missing file
+| |
+o | changeset: 1250:3f6f96956582
+| | user: hecht
+| | date: Fri Feb 22 17:49:19 2008 +0100
+| | summary: pass to 2.24.1 and correct buildmesh trap in case of degenerated border.
+| |
+o | changeset: 1249:466c6cf70d4e
+| | user: hecht
+| | date: Tue Feb 19 21:00:35 2008 +0100
+| | summary: correct periodic condition limite to 1 edge.
+| |
+o | changeset: 1248:292de6acfd0c
+| | user: hecht
+| | date: Fri Feb 15 11:16:44 2008 +0100
+| | summary: correct include.tar.gz
+| |
+o | changeset: 1247:f1ac94ae30f0
+| | user: hecht
+| | date: Thu Feb 14 23:08:44 2008 +0100
+| | summary: add missing file R[123].hpp in Makefile.am for dist
+| |
+o | changeset: 1246:5db85e01658c
+| | user: hecht
+| | date: Thu Feb 14 14:44:20 2008 +0100
+| | summary: rebuild include.tar.gz
+| |
+o | changeset: 1245:6f7beaf98f55
+| | user: hecht
+| | date: Thu Feb 14 14:33:59 2008 +0100
+| | summary: v 2.24
+| |
+o | changeset: 1244:71fc0f351404
+| | user: hecht
+| | date: Thu Feb 07 15:15:32 2008 +0100
+| | summary: add script to download medit on windows
+| |
+o | changeset: 1243:37f9085ca0af
+| | user: hecht
+| | date: Mon Feb 04 15:07:38 2008 +0100
+| | summary: add lazst modification in the doc.
+| |
+o | changeset: 1242:1d53bd6f9e96
+| | user: hecht
+| | date: Fri Feb 01 22:09:10 2008 +0100
+| | summary: add Th=triangule(xx,yy);
+| |
+o | changeset: 1241:c1f45746fb19
+| | user: hecht
+| | date: Tue Jan 29 23:29:12 2008 +0100
+| | summary: add info INNOVATION file
+| |
+o | changeset: 1240:e1d2110881df
+| | user: hecht
+| | date: Tue Jan 29 23:20:52 2008 +0100
+| | summary: correct rare bug in bamg (missing initialisation variable edges[].adj
+| |
+o | changeset: 1239:2d981f5a74aa
+| | user: hecht
+| | date: Thu Jan 24 09:26:32 2008 +0100
+| | summary: correct assert fail in case of no UMFPACK in make check
+| |
+o | changeset: 1238:355795395a28
+| | user: hecht
+| | date: Wed Jan 23 11:04:16 2008 +0100
+| | summary: add mortar (Neuman to Dirichlet ) example in scalar and parallel version
+| |
+o | changeset: 1237:7132e4a552e2
+| | user: hecht
+| | date: Tue Jan 22 17:23:05 2008 +0100
+| | summary: add vectorial operator ( a ? b : c) on array where b and c can be scalar
+| |
+o | changeset: 1236:35c531d0eda6
+| | user: hecht
+| | date: Wed Jan 16 12:37:04 2008 +0100
+| | summary: correct mpi (receive is now synchrone and send is asychrone)
+| |
+o | changeset: 1235:ccbffa0edbc1
+| | user: hecht
+| | date: Fri Jan 11 10:59:18 2008 +0100
+| | summary: nothing
+| |
+o | changeset: 1234:4a5c97ce6af0
+| | user: hecht
+| | date: Wed Jan 09 22:33:15 2008 +0100
+| | summary: correct README of debian and cnfigure.ac of checking umfpack lib.
+| |
+o | changeset: 1233:6dc9e9cff6b7
+| | user: hecht
+| | date: Sat Jan 05 16:50:32 2008 +0100
+| | summary: correct Makefile to build universal executable file on MacOS
+| |
+o | changeset: 1232:5e33a386cfea
+| | user: hecht
+| | date: Wed Dec 26 17:30:04 2007 +0100
+| | summary: cvs ranlib and ar in umfpack compilation process of universal file on apple.
+| |
+o | changeset: 1231:67239ae99bc8
+| | user: hecht
+| | date: Wed Dec 26 16:44:28 2007 +0100
+| | summary: Make big change un configure.ac and makefiel.am to build universal binarie file on apple (ppc and i386)
+| |
+o | changeset: 1230:42ff4f594013
+| | user: hecht
+| | date: Thu Dec 20 13:11:42 2007 +0100
+| | summary: correct freefem++-doc
+| |
+o | changeset: 1229:46601bd22684
+| | user: hecht
+| | date: Tue Dec 18 18:35:55 2007 +0100
+| | summary: missing file
+| |
+o | changeset: 1228:c55ffbf8c297
+| | user: hecht
+| | date: Tue Dec 18 18:19:04 2007 +0100
+| | summary: change ref value correct elastycity.
+| |
+o | changeset: 1227:4264a1078ace
+| | user: hecht
+| | date: Tue Dec 18 18:04:09 2007 +0100
+| | summary: just change in UFconfig_mk.m4 for freebsd for comment
+| |
+o | changeset: 1226:82ca7c0795f4
+| | user: hecht
+| | date: Tue Dec 18 16:43:55 2007 +0100
+| | summary: see innovation correct bug in function with string argument
+| |
+o | changeset: 1225:30b829eb80a6
+| | user: hecht
+| | date: Tue Dec 11 21:18:52 2007 +0100
+| | summary: type correct Pcrgraph
+| |
+o | changeset: 1224:f93b6dc20752
+| | user: hecht
+| | date: Fri Nov 30 13:54:29 2007 +0100
+| | summary: correct error on mpi version
+| |
+o | changeset: 1223:6b813cebfc7e
+| | user: hecht
+| | date: Thu Nov 29 12:20:33 2007 +0100
+| | summary: suite
+| |
+o | changeset: 1222:b31f36430d73
+| | user: hecht
+| | date: Thu Nov 29 12:18:20 2007 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 1221:5a4cf32a8ce0
+| | user: hecht
+| | date: Thu Nov 29 12:15:25 2007 +0100
+| | summary: next
+| |
+o | changeset: 1220:013e64381c12
+| | user: hecht
+| | date: Thu Nov 29 12:11:42 2007 +0100
+| | summary: correct missing preprocessing variable
+| |
+o | changeset: 1219:16f1a0466850
+| | user: hecht
+| | date: Thu Nov 29 07:42:05 2007 +0100
+| | summary: correct configure.ac for umfpack (sometime missng a library)
+| |
+o | changeset: 1218:8c9df5beb3a7
+| | user: hecht
+| | date: Tue Nov 20 16:49:01 2007 +0100
+| | summary: correct missing tapping error in test build drawbdmesh on windows.
+| |
+o | changeset: 1217:8855b0228166
+| | user: hecht
+| | date: Tue Nov 20 16:13:38 2007 +0100
+| | summary: correct bamg on windows missing drawbdmesh.exe
+| |
+o | changeset: 1216:d6d35bd4d912
+| | user: hecht
+| | date: Tue Nov 20 15:38:21 2007 +0100
+| | summary: coorect missing exe extension on bamg program in confure.ac
+| |
+o | changeset: 1215:5140ecde974b
+| | user: hecht
+| | date: Mon Nov 19 21:40:06 2007 +0100
+| | summary: correct mpi for macos leopard,
+| |
+o | changeset: 1214:c958ea8751f6
+| | user: hecht
+| | date: Mon Nov 19 18:13:44 2007 +0100
+| | summary: correct MPI configure.ac
+| |
+o | changeset: 1213:5971ef36e8b0
+| | user: hecht
+| | date: Mon Nov 19 14:41:30 2007 +0100
+| | summary: continuing
+| |
+o | changeset: 1212:1d04be51cbd3
+| | user: hecht
+| | date: Mon Nov 19 14:40:00 2007 +0100
+| | summary: missing mpiprog
+| |
+o | changeset: 1211:87b998a26081
+| | user: hecht
+| | date: Mon Nov 19 14:25:04 2007 +0100
+| | summary: correct configure.ac missing FreeFem++ with X11
+| |
+o | changeset: 1210:8b75110cb5a3
+| | user: hecht
+| | date: Mon Nov 19 14:17:36 2007 +0100
+| | summary: correct configure.ac without x11
+| |
+o | changeset: 1209:311d084c2046
+| | user: hecht
+| | date: Sun Nov 18 13:20:22 2007 +0100
+| | summary: correct documentation for new edition
+| |
+o | changeset: 1208:24706bfcaeff
+| | user: hecht
+| | date: Tue Nov 13 16:40:14 2007 +0100
+| | summary: correct doc,
+| |
+o | changeset: 1207:3d6e666c6d16
+| | user: hecht
+| | date: Wed Oct 24 22:17:06 2007 +0200
+| | summary: see INNOVATION file
+| |
+o | changeset: 1206:7165e6427c0e
+| | user: hecht
+| | date: Mon Oct 22 18:17:22 2007 +0200
+| | summary: add format + - , trace and det of array
+| |
+o | changeset: 1205:4389ca545f46
+| | user: hecht
+| | date: Tue Oct 02 17:55:05 2007 +0200
+| | summary: correct missing parameter SolveGCPrecon and SolveGCDiag
+| |
+o | changeset: 1204:7c01e8973cec
+| | user: hecht
+| | date: Tue Oct 02 16:49:37 2007 +0200
+| | summary: correct miss-spelling
+| |
+o | changeset: 1203:78037197ef80
+| | user: hecht
+| | date: Tue Oct 02 16:07:26 2007 +0200
+| | summary: - add in download automatic generation of f2c and fort77 to get a free fortran compiler
+| |
+o | changeset: 1202:45e43ae71094
+| | user: hecht
+| | date: Sun Sep 30 17:45:11 2007 +0200
+| | summary: Add sparse solver in documentation
+| |
+o | changeset: 1201:05897868c18c
+| | user: hecht
+| | date: Thu Sep 20 21:53:50 2007 +0200
+| | summary: add SuperSolevr
+| |
+o | changeset: 1200:9f9f13a8f113
+| | user: hecht
+| | date: Sun Sep 09 21:17:01 2007 +0200
+| | summary: add f2d in case of no fortran
+| |
+o | changeset: 1199:61b84c52d78d
+| | user: hecht
+| | date: Fri Sep 07 17:09:59 2007 +0200
+| | summary: add f2c download
+| |
+o | changeset: 1198:04efc3f5f54b
+| | user: hecht
+| | date: Fri Sep 07 00:13:17 2007 +0200
+| | summary: recorrect operator += Virtual matrix operator (introduction in august)
+| |
+o | changeset: 1197:ff3f4337d5e3
+| | user: hecht
+| | date: Thu Sep 06 16:23:51 2007 +0200
+| | summary: correct SuperLU and UMFPACK driver + add comparaison
+| |
+o | changeset: 1196:8ae57860389a
+| | user: hecht
+| | date: Thu Sep 06 16:02:24 2007 +0200
+| | summary: add missing files
+| |
+o | changeset: 1195:647ecb3eea6f
+| | user: hecht
+| | date: Thu Sep 06 15:58:49 2007 +0200
+| | summary: correct 2 def defaulttoGMRES
+| |
+o | changeset: 1194:18a530f69d84
+| | user: hecht
+| | date: Thu Sep 06 15:14:13 2007 +0200
+| | summary: correct tool to add other sparse (morse) linear solver with dynamic load
+| |
+o | changeset: 1193:b90d965d48fd
+| | user: hecht
+| | date: Wed Sep 05 23:27:44 2007 +0200
+| | summary: add set sparce solver (morse)
+| |
+o | changeset: 1192:4ce83180909c
+| | user: hecht
+| | date: Wed Sep 05 20:15:55 2007 +0200
+| | summary: correct complex part of superLU
+| |
+o | changeset: 1191:041538d4cb5e
+| | user: hecht
+| | date: Wed Sep 05 18:03:29 2007 +0200
+| | summary: Add tools to change Sparce Linear Solver
+| |
+o | changeset: 1190:6f6d00a9fca5
+| | user: hecht
+| | date: Tue Aug 28 21:57:58 2007 +0200
+| | summary: add N,M in class VirtualMatrix, to correct probleme in RNM class
+| |
+o | changeset: 1189:a5a12103ca64
+| | user: hecht
+| | date: Tue Aug 28 17:16:21 2007 +0200
+| | summary: add missing oiperator in array:
+| |
+o | changeset: 1188:92165ee42a24
+| | user: hecht
+| | date: Fri Aug 24 09:12:38 2007 +0200
+| | summary: update doc comtinuing
+| |
+o | changeset: 1187:da3adb2cfcd8
+| | user: hecht
+| | date: Fri Aug 24 08:27:32 2007 +0200
+| | summary: update the doc.
+| |
+o | changeset: 1186:c5b4f3e3c65d
+| | user: hecht
+| | date: Mon Aug 20 21:29:52 2007 +0200
+| | summary: add missing file
+| |
+o | changeset: 1185:866ce6820edc
+| | user: hecht
+| | date: Mon Aug 20 21:28:18 2007 +0200
+| | summary: correct mean and jump operator in interpolation
+| |
+o | changeset: 1184:ed49097a6267
+| | user: hecht
+| | date: Mon Aug 20 20:07:51 2007 +0200
+| | summary: upgrade INNOVATION
+| |
+o | changeset: 1183:341e9039538a
+| | user: hecht
+| | date: Mon Aug 20 18:07:07 2007 +0200
+| | summary: correct, problem of automatic ptr managenemt in plot::operator()
+| |
+o | changeset: 1182:d10dd6069cd6
+| | user: hecht
+| | date: Sun Aug 19 22:05:05 2007 +0200
+| | summary: pass to version 2.19.
+| |
+o | changeset: 1181:df0e5e08baf6
+| | user: hecht
+| | date: Tue Aug 07 22:05:59 2007 +0200
+| | summary: correct cin on windows and and type on bogus buildmesh.
+| |
+o | changeset: 1180:72d9b455a3a7
+| | user: hecht
+| | date: Thu Jul 19 19:22:48 2007 +0200
+| | summary: correct AdaptResidualErrorIndicator and download/Makefile.am to
+| |
+o | changeset: 1179:a0266c67c331
+| | user: hecht
+| | date: Thu Jul 19 13:19:01 2007 +0200
+| | summary: add missing compile file in example++-load
+| |
+o | changeset: 1178:82f8d3d94641
+| | user: hecht
+| | date: Thu Jul 19 11:41:48 2007 +0200
+| | summary: see INNOVATION file, past version 2.18
+| |
+o | changeset: 1177:df947a9d2fbc
+| | user: hecht
+| | date: Mon Jul 16 14:47:18 2007 +0200
+| | summary: add quantile
+| |
+o | changeset: 1176:eb553aa35dea
+| | user: hecht
+| | date: Fri Jul 13 17:33:23 2007 +0200
+| | summary: add code to sort array
+| |
+o | changeset: 1175:35694b19dc26
+| | user: hecht
+| | date: Fri Jun 29 22:21:50 2007 +0200
+| | summary: xcode projet
+| |
+o | changeset: 1174:7ad52446d9f9
+| | user: hecht
+| | date: Thu Jun 28 22:12:20 2007 +0200
+| | summary: correct compile error with gcc 3.2.2 lgmat.cpp
+| |
+o | changeset: 1173:868c291e09df
+| | user: hecht
+| | date: Thu Jun 21 07:58:39 2007 +0200
+| | summary: correct ../fflib/environment.hpp:41:24: warning: no newline at end of file
+| |
+o | changeset: 1172:542424ec6260
+| | user: hecht
+| | date: Wed Jun 20 22:42:21 2007 +0200
+| | summary: correct bilapMorley.edp add missing term in var. formulation.
+| |
+o | changeset: 1171:3b9e9a1daea3
+| | user: hecht
+| | date: Mon Jun 18 22:58:10 2007 +0200
+| | summary: set 2.17-2
+| |
+o | changeset: 1170:0ea82558902f
+| | user: hecht
+| | date: Mon Jun 18 22:42:38 2007 +0200
+| | summary: add mesh example
+| |
+o | changeset: 1169:17bd8f713142
+| | user: hecht
+| | date: Mon Jun 18 22:20:25 2007 +0200
+| | summary: correct old bug in bamg, in case of bogus boundary (auto crossing)
+| |
+o | changeset: 1168:33fc210a3294
+| | user: hecht
+| | date: Fri Jun 15 13:39:12 2007 +0200
+| | summary: clean the example
+| |
+o | changeset: 1167:d1c701a50c9b
+| | user: hecht
+| | date: Fri Jun 15 11:02:46 2007 +0200
+| | summary: correct FreeFem++-Cocoa to add option -v 0
+| |
+o | changeset: 1166:730dc114f01f
+| | user: hecht
+| | date: Fri Jun 15 10:01:07 2007 +0200
+| | summary: add missing files
+| |
+o | changeset: 1165:ed08ef696a78
+| | user: hecht
+| | date: Fri Jun 15 09:33:06 2007 +0200
+| | summary: end of 2.17-1 modif
+| |
+o | changeset: 1164:2b725188838d
+| | user: hecht
+| | date: Thu Jun 14 23:03:54 2007 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1163:26214451b1ab
+| | user: hecht
+| | date: Thu Jun 14 22:35:37 2007 +0200
+| | summary: next
+| |
+o | changeset: 1162:fcc2dbd3a9ce
+| | user: hecht
+| | date: Thu Jun 14 21:49:13 2007 +0200
+| | summary: add -v xx on pc version
+| |
+o | changeset: 1161:463a69ad8896
+| | user: hecht
+| | date: Thu Jun 14 11:54:03 2007 +0200
+| | summary: suite
+| |
+o | changeset: 1160:5484bd790c1e
+| | user: hecht
+| | date: Thu Jun 14 10:27:06 2007 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1159:9e4f6868ccd9
+| | user: hecht
+| | date: Thu Jun 14 09:51:10 2007 +0200
+| | summary: clear output when verbosity = 0
+| |
+o | changeset: 1158:1584e449a412
+| | user: hecht
+| | date: Mon Jun 11 15:37:51 2007 +0200
+| | summary: correct automatique choose of color in plot of arrow
+| |
+o | changeset: 1157:45091926fd64
+| | user: hecht
+| | date: Sat Jun 09 12:15:24 2007 +0200
+| | summary: add boundary= ... flag in plot fonction.
+| |
+o | changeset: 1156:233789981ccc
+| | user: hecht
+| | date: Thu Jun 07 12:16:52 2007 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1155:fc6ca727714b
+| | user: hecht
+| | date: Thu Jun 07 12:15:23 2007 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1154:730ea632f37b
+| | user: hecht
+| | date: Thu Jun 07 11:52:53 2007 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1153:b2e2ef7ef138
+| | user: hecht
+| | date: Thu Jun 07 10:53:13 2007 +0200
+| | summary: correct mistake in tgamma call
+| |
+o | changeset: 1152:aee96893dd95
+| | user: hecht
+| | date: Thu Jun 07 10:37:29 2007 +0200
+| | summary: correct missing update
+| |
+o | changeset: 1151:22b1fb44a1fd
+| | user: hecht
+| | date: Thu Jun 07 08:17:18 2007 +0200
+| | summary: add bessel function j0, j1, jn, y0, y1, yn -- bessel functions of first and second kind
+| |
+o | changeset: 1150:c506c2721bc1
+| | user: hecht
+| | date: Tue Jun 05 18:02:43 2007 +0200
+| | summary: same for complex eigen value
+| |
+o | changeset: 1149:0f0ac1c8239d
+| | user: hecht
+| | date: Tue Jun 05 17:44:32 2007 +0200
+| | summary: add rawvector= in eigenvector
+| |
+o | changeset: 1148:4bc4aa832c8e
+| | user: hecht
+| | date: Mon Jun 04 23:03:52 2007 +0200
+| | summary: correct qforder= automatic choose in quadature formular in computation of integrale
+| |
+o | changeset: 1147:f83647e00352
+| | user: hecht
+| | date: Wed May 16 00:21:37 2007 +0200
+| | summary: just add missing files
+| |
+o | changeset: 1146:d26722df3ff7
+| | user: hecht
+| | date: Wed May 16 00:09:46 2007 +0200
+| | summary: correct Makefile.am for examples++-load/include missing file
+| |
+o | changeset: 1145:816c2b7c8609
+| | user: hecht
+| | date: Tue May 15 23:48:22 2007 +0200
+| | summary: do autoreconf
+| |
+o | changeset: 1144:ec60d212a134
+| | user: hecht
+| | date: Tue May 15 22:01:55 2007 +0200
+| | summary: coorect mistake with libcblas
+| |
+o | changeset: 1143:d110d5bbf588
+| | user: hecht
+| | date: Thu May 10 12:05:39 2007 +0200
+| | summary: correct very old bug in meshptg in case aligne point
+| |
+o | changeset: 1142:be336c51a337
+| | user: hecht
+| | date: Thu May 03 10:36:34 2007 +0200
+| | summary: correct Makefile.am dans examples++-load
+| |
+o | changeset: 1141:c00cb936f998
+| | user: hecht
+| | date: Wed May 02 17:29:06 2007 +0200
+| | summary: - Add read sparce matrix form a file
+| |
+o | changeset: 1140:f4d3b4252673
+| | user: hecht
+| | date: Wed Apr 25 09:28:12 2007 +0200
+| | summary: coorect splitmesh next step
+| |
+o | changeset: 1139:650460b31c24
+| | user: hecht
+| | date: Tue Apr 24 22:20:08 2007 +0200
+| | summary: coorect meshsplit function
+| |
+o | changeset: 1138:d4553b50a958
+| | user: hecht
+| | date: Tue Apr 24 17:18:50 2007 +0200
+| | summary: correct the variable ff_testideprog="testhighlight${EXEEXT}"
+| |
+o | changeset: 1137:2a10ec7ebf4a
+| | user: hecht
+| | date: Mon Apr 23 17:28:50 2007 +0200
+| | summary: remove dump for debbuging in fem.cpp ( mesh() constructor call splitmesh function)
+| |
+o | changeset: 1136:db9bb253016b
+| | user: hecht
+| | date: Sat Apr 21 11:31:01 2007 +0200
+| | summary: correct miss speeling and fig ref/label
+| |
+o | changeset: 1135:ba3a8c4bb929
+| | user: hecht
+| | date: Fri Apr 20 17:18:59 2007 +0200
+| | summary: remove all compilation in ide dir if --without-fltk configure flags is set.
+| |
+o | changeset: 1134:627db69ed2c1
+| | user: hecht
+| | date: Fri Apr 20 16:01:30 2007 +0200
+| | summary: correct error when writing mesh, in case of different region (sub-domain)
+| |
+o | changeset: 1133:b53c912f5521
+| | user: hecht
+| | date: Fri Apr 20 14:56:06 2007 +0200
+| | summary: do autoreconf
+| |
+o | changeset: 1132:f7b143c68235
+| | user: hecht
+| | date: Fri Apr 20 14:54:29 2007 +0200
+| | summary: - correct mshptg.cpp (add swap) , this is used in case of
+| |
+o | changeset: 1131:8e5261645b5c
+| | user: hecht
+| | date: Wed Apr 18 12:01:45 2007 +0200
+| | summary: correct ligne pof Sun SS -S vss in fem.cpp
+| |
+o | changeset: 1130:0b47aaa265ed
+| | user: hecht
+| | date: Tue Apr 17 22:34:58 2007 +0200
+| | summary: same next
+| |
+o | changeset: 1129:8abeb822514a
+| | user: hecht
+| | date: Tue Apr 17 22:27:49 2007 +0200
+| | summary: same continuing
+| |
+o | changeset: 1128:b06140d1d045
+| | user: hecht
+| | date: Tue Apr 17 22:12:49 2007 +0200
+| | summary: correct fltk configure process on windows
+| |
+o | changeset: 1127:bad3e707f5df
+| | user: hecht
+| | date: Tue Apr 17 21:47:31 2007 +0200
+| | summary: coorect mistake on window akefile+ change fltk dowload install dir
+| |
+o | changeset: 1126:84e2eb1e36b5
+| | user: hecht
+| | date: Tue Apr 17 12:52:28 2007 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1125:e25d8911cc1e
+| | user: hecht
+| | date: Tue Apr 17 12:51:00 2007 +0200
+| | summary: add file
+| |
+o | changeset: 1124:8cf70de5de34
+| | user: hecht
+| | date: Tue Apr 17 12:08:26 2007 +0200
+| | summary: remove umfpack directory form src
+| |
+o | changeset: 1123:86e4e6640342
+| | user: hecht
+| | date: Fri Apr 06 17:42:55 2007 +0200
+| | summary: correct regularity, suite.
+| |
+o | changeset: 1122:27f01e4f3b4e
+| | user: hecht
+| | date: Fri Apr 06 14:53:20 2007 +0200
+| | summary: regularity mistake, suite.
+| |
+o | changeset: 1121:ad34308e20bc
+| | user: hecht
+| | date: Fri Apr 06 13:18:37 2007 +0200
+| | summary: correct impressin of mesh regularity
+| |
+o | changeset: 1120:f1de13b4c5b0
+| | user: hecht
+| | date: Wed Apr 04 21:20:31 2007 +0200
+| | summary: go to version 2.15-1, see innovation file
+| |
+o | changeset: 1119:436c75d9b870
+| | user: hecht
+| | date: Mon Apr 02 11:45:11 2007 +0200
+| | summary: correct examples++-tutorial/sparse-matrix.edp
+| |
+o | changeset: 1118:3619a30b94c4
+| | user: hecht
+| | date: Mon Apr 02 11:36:31 2007 +0200
+| | summary: correct splitmesh with intenals bourdary
+| |
+o | changeset: 1117:30af445f8cdb
+| | user: hecht
+| | date: Sun Mar 25 11:41:56 2007 +0200
+| | summary: correct bug in vectorial operation (a+3.14*b)
+| |
+o | changeset: 1116:89cb2da6046d
+| | user: hecht
+| | date: Thu Mar 22 12:01:50 2007 +0100
+| | summary: Correct integration problem in varf of int1d(Th) .. u_Th1 .. v_Th2 ..
+| |
+o | changeset: 1115:7f0e033977ed
+| | user: hecht
+| | date: Sun Mar 11 21:22:17 2007 +0100
+| | summary: correct licence hearder.
+| |
+o | changeset: 1114:70758153bd21
+| | user: hecht
+| | date: Fri Mar 09 23:10:39 2007 +0100
+| | summary: correct missing speeling in configure.ac mpi++.h -> mpi++.h for mpich.1.2
+| |
+o | changeset: 1113:fc8765cc14d9
+| | user: hecht
+| | date: Wed Mar 07 13:51:33 2007 +0100
+| | summary: see INNOVATION for detail.
+| |
+o | changeset: 1112:52b479bdedc2
+| | user: hecht
+| | date: Wed Feb 14 21:00:18 2007 +0100
+| | summary: correct mistake in bluid matrice from varf with 3 meshes
+| |
+o | changeset: 1111:724be807f3f5
+| | user: hecht
+| | date: Sun Feb 04 12:19:57 2007 +0100
+| | summary: add scalar term in block matrix as 1x1 sub matrix.
+| |
+o | changeset: 1110:c84d01a8cf8c
+| | user: hecht
+| | date: Sat Feb 03 15:17:19 2007 +0100
+| | summary: do autoreconf
+| |
+o | changeset: 1109:1e4907ffb59e
+| | user: hecht
+| | date: Sat Feb 03 14:25:28 2007 +0100
+| | summary: pass to version 2.13 and
+| |
+o | changeset: 1108:421db81aaa4c
+| | user: hecht
+| | date: Wed Jan 24 14:01:39 2007 +0100
+| | summary: correct mistake in function
+| |
+o | changeset: 1107:78da8acfecb9
+| | user: hecht
+| | date: Mon Jan 15 14:13:11 2007 +0100
+| | summary: correct when return a local new pointeur in freefem++ function
+| |
+o | changeset: 1106:0a1b0afe3ade
+| | user: hecht
+| | date: Wed Jan 10 13:12:16 2007 +0100
+| | summary: add comment
+| |
+o | changeset: 1105:07b62b54ccf4
+| | user: hecht
+| | date: Wed Jan 10 11:59:48 2007 +0100
+| | summary: pass to 2-12 et correct mistake in no square block matrix
+| |
+o | changeset: 1104:6c1fa2e746bc
+| | user: hecht
+| | date: Fri Dec 22 13:33:09 2006 +0100
+| | summary: coorect missing spell in configure.ac (ff_libs => ff_flibs) (fortran libs)
+| |
+o | changeset: 1103:561eab096a22
+| | user: hecht
+| | date: Sun Dec 17 09:36:46 2006 +0100
+| | summary: change PPC in PP_C in problem.cpp, because PPC macro is defined
+| |
+o | changeset: 1102:f87ec3ed5e67
+| | user: hecht
+| | date: Fri Dec 01 21:03:37 2006 +0100
+| | summary: coorect LaplaceRT.edp
+| |
+o | changeset: 1101:e7de74fdbf14
+| | user: hecht
+| | date: Thu Nov 30 14:48:47 2006 +0100
+| | summary: correct dependance in examples++-load/Makefile.am
+| |
+o | changeset: 1100:ec4fde559d08
+| | user: hecht
+| | date: Thu Nov 30 14:45:17 2006 +0100
+| | summary: correct build matrices from varf with different mesh in case for mortar mesh.
+| |
+o | changeset: 1099:77648a46d003
+| | user: hecht
+| | date: Tue Nov 28 13:53:02 2006 +0100
+| | summary: correct bug in interpolation fespace Wf(Th,[RT0,P0]) function
+| |
+o | changeset: 1098:7d480ffab837
+| | user: hecht
+| | date: Fri Nov 10 22:09:21 2006 +0100
+| | summary: I correct the problem in arpack (computation of eigen value) under i383 processor.
+| |
+o | changeset: 1097:593603d24fae
+| | user: hecht
+| | date: Mon Nov 06 13:55:03 2006 +0100
+| | summary: correct -Wall continuing
+| |
+o | changeset: 1096:07cd72f527a2
+| | user: hecht
+| | date: Mon Nov 06 09:55:57 2006 +0100
+| | summary: correct all -Wall warning, to try to solve probleme in eigen value computation
+| |
+o | changeset: 1095:be438995d8e4
+| | tag: release_2_10_2_before_Wall
+| | user: hecht
+| | date: Thu Oct 26 15:36:16 2006 +0200
+| | summary: remove debug dump
+| |
+o | changeset: 1094:b591f599d49c
+| | user: hecht
+| | date: Thu Oct 26 14:17:41 2006 +0200
+| | summary: correct mistake in configure
+| |
+o | changeset: 1093:d6b64e445a74
+| | user: hecht
+| | date: Thu Oct 26 14:09:30 2006 +0200
+| | summary: correct error in lapack of arpack (remove div by 0)
+| |
+o | changeset: 1092:3e64d9ef3137
+| | user: hecht
+| | date: Tue Oct 24 21:22:19 2006 +0200
+| | summary: add flags -with-lapack in configure
+| |
+o | changeset: 1091:3b882c3a5cbc
+| | user: hecht
+| | date: Fri Oct 20 11:26:41 2006 +0200
+| | summary: add HIDDEN PARAMETER to fortran route with character parameters
+| |
+o | changeset: 1090:15d919e17d54
+| | user: hecht
+| | date: Thu Oct 19 15:53:21 2006 +0200
+| | summary: coorect 70 in 70.
+| |
+o | changeset: 1089:72ba19f26d06
+| | user: hecht
+| | date: Thu Oct 19 15:13:18 2006 +0200
+| | summary: misa a jour de README_CVS
+| |
+o | changeset: 1088:7c13736478ae
+| | user: hecht
+| | date: Wed Oct 18 21:39:17 2006 +0200
+| | summary: ATTENTION le serveur CVS a change
+| |
+o | changeset: 1087:69aece617a96
+| | user: hecht
+| | date: Wed Oct 18 21:28:11 2006 +0200
+| | summary: correct configure.ac for MacOs compile
+| |
+o | changeset: 1086:c0904d3ddd12
+| | user: hecht
+| | date: Wed Oct 11 18:23:32 2006 +0200
+| | summary: change version 2.10-1
+| |
+o | changeset: 1085:bfc0a8074e1e
+| | user: hecht
+| | date: Tue Oct 10 20:48:02 2006 +0200
+| | summary: add modif in the doc
+| |
+o | changeset: 1084:388005cc5029
+| | user: hecht
+| | date: Tue Oct 10 17:42:15 2006 +0200
+| | summary: QF continuing
+| |
+o | changeset: 1083:7276e657cb50
+| | user: hecht
+| | date: Tue Oct 10 17:35:27 2006 +0200
+| | summary: add QF gauss Legendre 4 and 5 points
+| |
+o | changeset: 1082:b23f3adc267f
+| | user: hecht
+| | date: Fri Sep 29 22:30:15 2006 +0200
+| | summary: change in all source file the LGPL flags. (FH)
+| |
+o | changeset: 1081:f945df94b59a
+| | user: hecht
+| | date: Wed Sep 20 10:23:07 2006 +0200
+| | summary: correct tool with crimson editor under Windows
+| |
+o | changeset: 1080:586e679e834b
+| | user: hecht
+| | date: Wed Sep 20 10:19:13 2006 +0200
+| | summary: coorect comment on crimson editor
+| |
+o | changeset: 1079:ee0cfa566d11
+| | user: hecht
+| | date: Tue Sep 19 22:08:51 2006 +0200
+| | summary: bluid HISTORY files
+| |
+o | changeset: 1078:b224a55c4a5c
+| | user: hecht
+| | date: Tue Sep 19 21:36:43 2006 +0200
+| | summary: correct openmpi trouble (async communication)
+| |
+o | changeset: 1077:11c495eb71a5
+| | user: hecht
+| | date: Tue Sep 19 17:07:07 2006 +0200
+| | summary: update INNIVATION
+| |
+o | changeset: 1076:a03f49afc8f3
+| | user: hecht
+| | date: Tue Sep 19 16:24:13 2006 +0200
+| | summary: change include.tar.gz file
+| |
+o | changeset: 1075:0c543fd2904e
+| | user: hecht
+| | date: Tue Sep 19 16:02:29 2006 +0200
+| | summary: add format output routine
+| |
+o | changeset: 1074:5f55497120c9
+| | user: hecht
+| | date: Tue Sep 19 11:47:20 2006 +0200
+| | summary: correct configure.ac
+| |
+o | changeset: 1073:e174a3df647c
+| | user: hecht
+| | date: Mon Sep 18 17:41:24 2006 +0200
+| | summary: change under windows OS the installed files
+| |
+o | changeset: 1072:3c866007d12c
+| | user: hecht
+| | date: Fri Jul 21 18:35:12 2006 +0200
+| | summary: passe to version 2.8-2
+| |
+o | changeset: 1071:11a7f799060e
+| | user: hecht
+| | date: Fri Jul 21 17:02:18 2006 +0200
+| | summary: correct bug with mpi (MPICH-2)
+| |
+o | changeset: 1070:67582bf9db8d
+| | user: hecht
+| | date: Fri Jun 30 11:16:30 2006 +0200
+| | summary: add print in arpack error
+| |
+o | changeset: 1069:9d5182230173
+| | user: hecht
+| | date: Wed Jun 28 18:01:28 2006 +0200
+| | summary: add missing file in make dist process
+| |
+o | changeset: 1068:7ac9ef62d6ea
+| | user: hecht
+| | date: Wed Jun 28 17:50:29 2006 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 1067:7a7da3aac6d0
+| | user: hecht
+| | date: Wed Jun 28 17:49:40 2006 +0200
+| | summary: add missing file
+| |
+o | changeset: 1066:e8c85aa01607
+| | user: hecht
+| | date: Wed Jun 28 17:46:39 2006 +0200
+| | summary: add tool to remove cadna in ./configure -without-cadna
+| |
+o | changeset: 1065:1cdc9b656cbd
+| | user: hecht
+| | date: Tue Jun 27 23:24:41 2006 +0200
+| | summary: do correction for openmpi but the
+| |
+o | changeset: 1064:2a1df2d56b69
+| | user: hecht
+| | date: Tue Jun 27 23:14:28 2006 +0200
+| | summary: version 2.6-1
+| |
+o | changeset: 1063:83aaaf11d8e4
+| | user: hecht
+| | date: Fri Jun 16 16:04:45 2006 +0200
+| | summary: correct doc netx step.
+| |
+o | changeset: 1062:c9d7a4cbb447
+| | user: hecht
+| | date: Fri Jun 16 13:49:56 2006 +0200
+| | summary: coorect lame.edp in chap 3 of the doc.
+| |
+o | changeset: 1061:63490a1bc9e2
+| | user: hecht
+| | date: Mon Jun 12 21:15:22 2006 +0200
+| | summary: add correction from christophe.trophime at grenoble.cnrs.fr
+| |
+o | changeset: 1060:56035a847644
+| | user: hecht
+| | date: Thu Jun 01 09:28:29 2006 +0200
+| | summary: add h flag to: Don't write symlinks as symlinks; write the data of the files
+| |
+o | changeset: 1059:c34152d230f8
+| | user: hecht
+| | date: Tue May 30 15:37:52 2006 +0200
+| | summary: correct OpenGL flag under MacOS configure.ac
+| |
+o | changeset: 1058:fa234b7279ba
+| | user: hecht
+| | date: Fri May 26 16:57:12 2006 +0200
+| | summary: correct FLIBS in configure.ac
+| |
+o | changeset: 1057:9f5e47d47b0b
+| | user: hecht
+| | date: Wed May 24 22:25:02 2006 +0200
+| | summary: correct configure.ac
+| |
+o | changeset: 1056:ee44b7d37064
+| | user: hecht
+| | date: Fri May 19 19:53:09 2006 +0200
+| | summary: cleanning FLIBS configure variable in case of g77
+| |
+o | changeset: 1055:7d8c1d27e6a5
+| | user: hecht
+| | date: Thu May 18 16:48:17 2006 +0200
+| | summary: correct small error for New macOS install
+| |
+o | changeset: 1054:d3077251497e
+| | user: hecht
+| | date: Thu May 18 14:04:09 2006 +0200
+| | summary: correct for lam mpi
+| |
+o | changeset: 1053:a5ae3f5ad14a
+| | user: hecht
+| | date: Thu May 18 13:59:15 2006 +0200
+| | summary: add missing file
+| |
+o | changeset: 1052:271e5d7d4887
+| | user: hecht
+| | date: Thu May 18 13:57:25 2006 +0200
+| | summary: correct INNOVATION
+| |
+o | changeset: 1051:689c1b6bc221
+| | user: hecht
+| | date: Thu May 18 13:51:17 2006 +0200
+| | summary: Correct bug in case of vectorial problem with same FE space.
+| |
+o | changeset: 1050:2d93d1eb482c
+| | user: hecht
+| | date: Wed May 17 15:35:19 2006 +0200
+| | summary: add missing file in distribution
+| |
+o | changeset: 1049:a35c824f162c
+| | user: hecht
+| | date: Tue May 16 15:09:18 2006 +0200
+| | summary: remove missing speel in configure.ac
+| |
+o | changeset: 1048:31194b511eee
+| | user: hecht
+| | date: Tue May 16 15:00:12 2006 +0200
+| | summary: try to correct X11 link problem on Linux 64bits architecture
+| |
+o | changeset: 1047:669f743b8424
+| | user: hecht
+| | date: Mon May 15 20:01:01 2006 +0200
+| | summary: correct pb on 64bits achitecture in file src/fflib/AnyType.hpp
+| |
+o | changeset: 1046:5c045c7b0278
+| | user: hecht
+| | date: Fri May 05 22:55:05 2006 +0200
+| | summary: do correction geometric data base with RequiredEdge.
+| |
+o | changeset: 1045:240f50061d02
+| | user: hecht
+| | date: Wed Apr 26 14:15:13 2006 +0200
+| | summary: correct configure.ac :
+| |
+o | changeset: 1044:68823e1bad2c
+| | user: hecht
+| | date: Sat Apr 15 18:05:11 2006 +0200
+| | summary: correct missing spellibg line 920
+| |
+o | changeset: 1043:a57bd667419c
+| | user: hecht
+| | date: Sat Apr 15 12:00:58 2006 +0200
+| | summary: correct probele when compioling with g++ 3.2
+| |
+o | changeset: 1042:6d6e6646b914
+| | user: hecht
+| | date: Thu Apr 13 18:36:42 2006 +0200
+| | summary: correct the mpi version for macos lam mpi
+| |
+o | changeset: 1041:4c5e3347dc7a
+| | user: hecht
+| | date: Thu Apr 13 13:39:58 2006 +0200
+| | summary: pass to version 2.7 and correct missing file in mpi Makefile.am
+| |
+o | changeset: 1040:b08ffa6fe703
+| | user: hecht
+| | date: Thu Apr 13 10:27:20 2006 +0200
+| | summary: coorect misstake in rc/femlib/FESpace.cpp
+| |
+o | changeset: 1039:2cad75a9fee1
+| | user: hecht
+| | date: Thu Apr 13 08:37:40 2006 +0200
+| | summary: correct trouble in Boundary condition when we mixte some
+| |
+o | changeset: 1038:9c495e402881
+| | user: hecht
+| | date: Wed Apr 12 14:03:02 2006 +0200
+| | summary: remove check suffix .edp to be compatible with drawbdmesh.exe
+| |
+o | changeset: 1037:e763b1a14153
+| | user: hecht
+| | date: Wed Apr 12 12:59:38 2006 +0200
+| | summary: add line un INNOTAVION
+| |
+o | changeset: 1036:56eae42c7434
+| | user: hecht
+| | date: Wed Apr 12 11:31:03 2006 +0200
+| | summary: add bamg example an correct problem beetween bamg and freefem graphic
+| |
+o | changeset: 1035:5a7b04e99f63
+| | user: hecht
+| | date: Wed Apr 12 07:38:59 2006 +0200
+| | summary: correct load.link under windows with new list of .dll files.
+| |
+o | changeset: 1034:9b67a868ae97
+| | user: hecht
+| | date: Tue Apr 11 23:26:57 2006 +0200
+| | summary: correct load.link script (change list of ff++ dll)
+| |
+o | changeset: 1033:705dfea6c6f4
+| | user: hecht
+| | date: Tue Apr 11 22:06:44 2006 +0200
+| | summary: Now the all.edp of tutorial run under winder (very hard word). FH
+| |
+o | changeset: 1032:2baa47074ee1
+| | user: hecht
+| | date: Tue Apr 11 21:57:50 2006 +0200
+| | summary: correct bug under window in Mesh:Find (very rare)
+| |
+o | changeset: 1031:6c3bf2dfe726
+| | user: hecht
+| | date: Tue Apr 11 13:52:41 2006 +0200
+| | summary: change for window free/delete pair
+| |
+o | changeset: 1030:3c1196a7980c
+| | user: hecht
+| | date: Tue Apr 11 10:46:39 2006 +0200
+| | summary: the new version of the dll file begin to work on windows (no trap in alloction)
+| |
+o | changeset: 1029:4e24126f9014
+| | user: hecht
+| | date: Mon Apr 10 22:53:34 2006 +0200
+| | summary: next.
+| |
+o | changeset: 1028:a15790716999
+| | user: hecht
+| | date: Mon Apr 10 22:51:52 2006 +0200
+| | summary: dur dur Windows,
+| |
+o | changeset: 1027:254d30ab0f69
+| | user: hecht
+| | date: Mon Apr 10 06:59:46 2006 +0200
+| | summary: continuing malloc/free for window
+| |
+o | changeset: 1026:a5c82bb112b0
+| | user: hecht
+| | date: Sun Apr 09 22:19:13 2006 +0200
+| | summary: suite??
+| |
+o | changeset: 1025:5a8765108bc6
+| | user: hecht
+| | date: Sun Apr 09 21:50:04 2006 +0200
+| | summary: suite, ..
+| |
+o | changeset: 1024:ef63561dbb98
+| | user: hecht
+| | date: Sun Apr 09 20:56:27 2006 +0200
+| | summary: in progress malloc/free ??
+| |
+o | changeset: 1023:7c8d3752a8c5
+| | user: hecht
+| | date: Sun Apr 09 20:38:50 2006 +0200
+| | summary: try find pair of malloc /free for windows .dll
+| |
+o | changeset: 1022:d0b18f8d6670
+| | user: hecht
+| | date: Sun Apr 09 18:13:49 2006 +0200
+| | summary: make change for windows dll because the pair malloc and free
+| |
+o | changeset: 1021:d76874c0f85f
+| | user: hecht
+| | date: Fri Apr 07 08:38:09 2006 +0200
+| | summary: correct missing delete pointeur in a=vmass(0,Vh); where vmass in a varf
+| |
+o | changeset: 1020:02ee34e0fedd
+| | user: hecht
+| | date: Fri Apr 07 08:35:18 2006 +0200
+| | summary: CheckPtr add flag when deleting after cleanning
+| |
+o | changeset: 1019:f22016768b22
+| | user: hecht
+| | date: Thu Apr 06 18:19:09 2006 +0200
+| | summary: remove impression
+| |
+o | changeset: 1018:eea8603b5314
+| | user: hecht
+| | date: Thu Apr 06 16:59:16 2006 +0200
+| | summary: add cfloat include
+| |
+o | changeset: 1017:c31a741e4f51
+| | user: hecht
+| | date: Thu Apr 06 16:53:29 2006 +0200
+| | summary: add missing include climits in src/femlib/fem.cpp
+| |
+o | changeset: 1016:c8c3fd920434
+| | user: hecht
+| | date: Thu Apr 06 16:49:04 2006 +0200
+| | summary: correct mistake in interpolation procedure, (in Mesh::Find methode)
+| |
+o | changeset: 1015:20172ab21d1e
+| | user: hecht
+| | date: Tue Apr 04 23:31:14 2006 +0200
+| | summary: correct bug in freeboundary;edp (trap on windows some time )
+| |
+o | changeset: 1014:d2487f969c54
+| | user: hecht
+| | date: Tue Apr 04 11:25:56 2006 +0200
+| | summary: coorect consistance beetween movmesh and checkmovemesh
+| |
+o | changeset: 1013:a8b6b14521b4
+| | user: hecht
+| | date: Tue Apr 04 09:11:39 2006 +0200
+| | summary: add CR at end of file src/fflib/ffstack.hpp
+| |
+o | changeset: 1012:4f0626a95678
+| | user: hecht
+| | date: Mon Apr 03 22:39:59 2006 +0200
+| | summary: correct misspelling
+| |
+o | changeset: 1011:a4f1420b9b02
+| | user: hecht
+| | date: Mon Apr 03 22:11:53 2006 +0200
+| | summary: pass to 2.5-1
+| |
+o | changeset: 1010:dd65ef6ffe6a
+| | user: hecht
+| | date: Mon Apr 03 22:09:30 2006 +0200
+| | summary: correct randon error on window
+| |
+o | changeset: 1009:17557d78d867
+| | user: hecht
+| | date: Sun Apr 02 21:59:22 2006 +0200
+| | summary: add bamg.exe, cvmsh2.exe and drawbdmesh.exe in Inno setup package
+| |
+o | changeset: 1008:3c9f1d10e3fa
+| | user: hecht
+| | date: Sun Apr 02 21:53:41 2006 +0200
+| | summary: and bamg and string_def.o files
+| |
+o | changeset: 1007:41d7de398a7a
+| | user: hecht
+| | date: Sat Apr 01 17:41:34 2006 +0200
+| | summary: add new example AdaptResidualErrorIndicator in the doc
+| |
+o | changeset: 1006:33c7dcaed492
+| | user: hecht
+| | date: Fri Mar 31 23:15:22 2006 +0200
+| | summary: add ResidualErrorIndicor example
+| |
+o | changeset: 1005:c50260b490c6
+| | user: hecht
+| | date: Fri Mar 31 20:41:41 2006 +0200
+| | summary: add 2 files
+| |
+o | changeset: 1004:0a924b0705c0
+| | user: hecht
+| | date: Fri Mar 31 18:26:21 2006 +0200
+| | summary: add string method and correct bug une string parameter.
+| |
+o | changeset: 1003:6d7e5f19e5d2
+| | user: hecht
+| | date: Thu Mar 30 08:50:11 2006 +0200
+| | summary: some optimization on new auto free ptr.
+| |
+o | changeset: 1002:ccabf7cb7fc8
+| | user: hecht
+| | date: Wed Mar 29 19:29:33 2006 +0200
+| | summary: add missing clear language ptr in while and for loops.
+| |
+o | changeset: 1001:b6f1f5a20727
+| | user: hecht
+| | date: Wed Mar 29 14:49:33 2006 +0200
+| | summary: pass to version 2.5-0
+| |
+o | changeset: 1000:05c49f7d003b
+| | user: hecht
+| | date: Wed Mar 29 14:47:52 2006 +0200
+| | summary: * add automatic gestion of free language pointeur to correct
+| |
+o | changeset: 999:fc85bf0ec864
+| | tag: release_2_4_3
+| | user: hecht
+| | date: Mon Mar 27 23:21:48 2006 +0200
+| | summary: add mode for mo text editor on MacOs see the freefem++-doc.pdf for full detail
+| |
+o | changeset: 998:2fc2e01af985
+| | user: hecht
+| | date: Mon Mar 27 22:34:13 2006 +0200
+| | summary: add freefem++ mode for mi editor on macos http://www.mimikaki.net/en/
+| |
+o | changeset: 997:a7c4994c838c
+| | user: hecht
+| | date: Mon Mar 27 21:25:40 2006 +0200
+| | summary: * add lot missing vectorial operation with sub array
+| |
+o | changeset: 996:2a1d5b8a2972
+| | user: hecht
+| | date: Mon Mar 20 18:10:38 2006 +0100
+| | summary: add init of array with a linear form.
+| |
+o | changeset: 995:8286c03feec4
+| | user: hecht
+| | date: Fri Mar 17 23:18:34 2006 +0100
+| | summary: add missing operator on sub array (type KN_<R>)
+| |
+o | changeset: 994:4d77a303b202
+| | user: hecht
+| | date: Fri Mar 17 10:45:16 2006 +0100
+| | summary: add new operator on complex array to get real or imag part
+| |
+o | changeset: 993:a10bc8411406
+| | user: hecht
+| | date: Fri Mar 17 07:36:20 2006 +0100
+| | summary: add x=exp(y); when x,y are array for exp;log,sin,tan , ....
+| |
+o | changeset: 992:2900e40c201d
+| | user: hecht
+| | date: Thu Mar 16 11:40:10 2006 +0100
+| | summary: add new kind on interplate matrix
+| |
+o | changeset: 991:45069205c1fe
+| | user: hecht
+| | date: Mon Mar 13 14:40:55 2006 +0100
+| | summary: correct freefem-doc.tex until page 29 example 6.
+| |
+o | changeset: 990:83997a02688c
+| | user: hecht
+| | date: Sun Mar 12 12:10:39 2006 +0100
+| | summary: do autoreconf
+| |
+o | changeset: 989:29e852c9228c
+| | user: hecht
+| | date: Sun Mar 12 10:47:07 2006 +0100
+| | summary: change version number
+| |
+o | changeset: 988:248eeefa3fb8
+| | user: hecht
+| | date: Sat Mar 11 18:47:41 2006 +0100
+| | summary: array of matrix work now.
+| |
+o | changeset: 987:88eabcc9bac4
+| | user: hecht
+| | date: Sat Mar 11 09:45:02 2006 +0100
+| | summary: correct error in build array of sparce matrix.
+| |
+o | changeset: 986:28000cfb291d
+| | user: hecht
+| | date: Fri Mar 10 18:35:23 2006 +0100
+| | summary: pl with matrix arry -> remove
+| |
+o | changeset: 985:c4d7606f1b7c
+| | user: hecht
+| | date: Fri Mar 10 17:46:28 2006 +0100
+| | summary: make big change in the DOC with O. Kavian
+| |
+o | changeset: 984:0c0790f9714e
+| | user: hecht
+| | date: Tue Mar 07 20:10:30 2006 +0100
+| | summary: tag release_2_4
+| |
+o | changeset: 983:260fea6042e2
+| | tag: release_2_4
+| | user: hecht
+| | date: Tue Mar 07 20:05:46 2006 +0100
+| | summary: pass to to version 2.4.0
+| |
+o | changeset: 982:1063ba890e3c
+| | user: hecht
+| | date: Tue Mar 07 17:49:56 2006 +0100
+| | summary: same as previous commit (just on the top dir)
+| |
+o | changeset: 981:14a915d04752
+| | user: hecht
+| | date: Tue Mar 07 17:48:47 2006 +0100
+| | summary: add new operator outer product, change the doc, ....
+| |
+o | changeset: 980:796f9d95bf8a
+| | user: hecht
+| | date: Fri Mar 03 23:29:06 2006 +0100
+| | summary: add matric operator like in matlab mat(I,J) where I,J are
+| |
+o | changeset: 979:06e185f16d44
+| | user: hecht
+| | date: Fri Mar 03 13:21:39 2006 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 978:c3cf679cbfe9
+| | user: hecht
+| | date: Fri Mar 03 13:15:15 2006 +0100
+| | summary: add an exemple with 1D lagrange multiplier.
+| |
+o | changeset: 977:bbe075e51532
+| | user: hecht
+| | date: Wed Mar 01 23:15:55 2006 +0100
+| | summary: add out product of 2 vectors to build full matrix
+| |
+o | changeset: 976:049d52a39d27
+| | user: lehyaric
+| | date: Tue Feb 28 10:18:03 2006 +0100
+| | summary: Debian packaging for version 2.3-2
+| |
+o | changeset: 975:b0579ae35da0
+| | user: hecht
+| | date: Wed Feb 22 18:12:33 2006 +0100
+| | summary: correct exec on PC
+| |
+o | changeset: 974:1a6c2c83fa7a
+| | user: hecht
+| | date: Tue Feb 21 15:08:22 2006 +0100
+| | summary: tag release_2_3_2
+| |
+o | changeset: 973:5036f8596f19
+| | tag: release_2_3_2
+| | user: hecht
+| | date: Mon Feb 20 18:15:56 2006 +0100
+| | summary: Correct missing sub domain problem when
+| |
+o | changeset: 972:2d1acc85e77e
+| | user: lehyaric
+| | date: Fri Feb 10 10:41:17 2006 +0100
+| | summary: Improved "make clean", which did not seem to be cleaning correctly anymore.
+| |
+o | changeset: 971:4a048322f1ac
+| | user: hecht
+| | date: Thu Feb 09 16:32:06 2006 +0100
+| | summary: add configure examples un README files
+| |
+o | changeset: 970:8853516f2694
+| | user: hecht
+| | date: Thu Feb 09 15:11:50 2006 +0100
+| | summary: correct miss spelling, and error in configure.ac
+| |
+o | changeset: 969:d3384dd2cf15
+| | user: hecht
+| | date: Tue Feb 07 21:32:36 2006 +0100
+| | summary: reglage in the doc,
+| |
+o | changeset: 968:5512562ea7e2
+| | user: hecht
+| | date: Tue Feb 07 20:25:58 2006 +0100
+| | summary: add new example
+| |
+o | changeset: 967:87d1748924cd
+| | user: hecht
+| | date: Tue Feb 07 20:25:25 2006 +0100
+| | summary: Correct missing free memory in case of exception in problem.
+| |
+o | changeset: 966:d72debe05e74
+| | user: hecht
+| | date: Fri Feb 03 16:18:46 2006 +0100
+| | summary: add exception in freefem++ language, the first test is working
+| |
+o | changeset: 965:646090715f8a
+| | user: hecht
+| | date: Fri Jan 27 22:47:48 2006 +0100
+| | summary: add conf flag in README_WINDOWS
+| |
+o | changeset: 964:c396c1d7a8ff
+| | user: hecht
+| | date: Fri Jan 27 22:33:41 2006 +0100
+| | summary: correct missing bluid of lapack in ARPACK if no lapack
+| |
+o | changeset: 963:09bf146e6970
+| | user: hecht
+| | date: Fri Jan 27 21:07:55 2006 +0100
+| | summary: correct missing include and link order under pure win32 architecture.
+| |
+o | changeset: 962:8167e2ba058c
+| | user: hecht
+| | date: Fri Jan 27 18:24:30 2006 +0100
+| | summary: correct PB optim on G4
+| |
+o | changeset: 961:10303c0ceeac
+| | user: hecht
+| | date: Fri Jan 27 16:43:49 2006 +0100
+| | summary: correct PB optim on G5
+| |
+o | changeset: 960:f0af0d499a0e
+| | user: hecht
+| | date: Fri Jan 27 15:59:08 2006 +0100
+| | summary: correct pb in configure to find wget or curl for download
+| |
+o | changeset: 959:27b51c168d7d
+| | user: hecht
+| | date: Fri Jan 27 13:57:18 2006 +0100
+| | summary: remove highlight test is no ide
+| |
+o | changeset: 958:7a51becb5c7c
+| | user: hecht
+| | date: Fri Jan 27 11:33:28 2006 +0100
+| | summary: correct pb in installing apple version (zcat -> gunzip -c)
+| |
+o | changeset: 957:f8c6b851cd72
+| | user: hecht
+| | date: Fri Jan 27 10:58:21 2006 +0100
+| | summary: take account of mac intel
+| |
+o | changeset: 956:a3ac2888e73b
+| | user: hecht
+| | date: Thu Jan 26 10:16:47 2006 +0100
+| | summary: add comment in configure.ac
+| |
+o | changeset: 955:5b4eee4361a3
+| | user: hecht
+| | date: Mon Jan 23 22:13:34 2006 +0100
+| | summary: correct small problem in configure.ac to build freefem on mac intel
+| |
+o | changeset: 954:2b768b55bef2
+| | user: hecht
+| | date: Wed Jan 11 22:22:32 2006 +0100
+| | summary: correct xcode projet + warning
+| |
+o | changeset: 953:892542425842
+| | user: hecht
+| | date: Wed Jan 11 21:13:09 2006 +0100
+| | summary: add xcode 2.2 build project for macos (see README_XCODE)
+| |
+o | changeset: 952:a3feaa34b941
+| | user: hecht
+| | date: Mon Jan 09 15:42:41 2006 +0100
+| | summary: small correct to use xcode of macos and to build bamg shell command
+| |
+o | changeset: 951:a4bcb6afa861
+| | user: lehyaric
+| | date: Fri Jan 06 11:28:38 2006 +0100
+| | summary: Changed ARPACK library reference for static compiling
+| |
+o | changeset: 950:f4a233463d32
+| | user: lehyaric
+| | date: Fri Jan 06 10:51:44 2006 +0100
+| | summary: Changed Debian packages documentation format from PS to PDF to reflect
+| |
+o | changeset: 949:1ae1db6e007a
+| | user: hecht
+| | date: Fri Jan 06 10:00:32 2006 +0100
+| | summary: add building of bamg and cvsmsh2 command
+| |
+o | changeset: 948:2203e08d58df
+| | user: hecht
+| | date: Thu Jan 05 15:43:34 2006 +0100
+| | summary: merging the source of bamg and the the bamg freefem++ part
+| |
+o | changeset: 947:a9d0713b4381
+| | user: hecht
+| | date: Wed Jan 04 11:37:34 2006 +0100
+| | summary: add read bamg geometry file with buildmesh function.
+| |
+o | changeset: 946:51f2fa717070
+| | user: hecht
+| | date: Wed Jan 04 11:27:06 2006 +0100
+| | summary: add build mesh from bamg geometry
+| |
+o | changeset: 945:71e91a1c79b1
+| | user: lehyaric
+| | date: Wed Jan 04 10:18:26 2006 +0100
+| | summary: New Debian package.
+| |
+o | changeset: 944:24ff5d45228e
+| | user: hecht
+| | date: Fri Dec 30 21:13:41 2005 +0100
+| | summary: add forget file distribution
+| |
+o | changeset: 943:23e9c0f0a896
+| | user: hecht
+| | date: Fri Dec 30 15:37:14 2005 +0100
+| | summary: correct pb under Windows change environment to ffenvironment (Global variable)
+| |
+o | changeset: 942:d3e15f0496c5
+| | user: hecht
+| | date: Fri Dec 30 12:23:06 2005 +0100
+| | summary: pb global.cpp
+| |
+o | changeset: 941:893de561be72
+| | user: hecht
+| | date: Fri Dec 30 12:02:47 2005 +0100
+| | summary: correct compile error
+| |
+o | changeset: 940:8e45bd25850f
+| | user: hecht
+| | date: Fri Dec 30 11:53:15 2005 +0100
+| | summary: correct pb uneder Windows with environment, put the def in Global.cpp
+| |
+o | changeset: 939:fe79bc21aee6
+| | user: hecht
+| | date: Fri Dec 30 10:57:24 2005 +0100
+| | summary: The search directory of load and include seems ok.
+| |
+o | changeset: 938:dd01c3dcc4cf
+| | user: hecht
+| | date: Fri Dec 30 08:34:34 2005 +0100
+| | summary: correct environment.cpp under Windows (Pure) and add to bin-win32/Makefile
+| |
+o | changeset: 937:6eaa175ac89e
+| | user: hecht
+| | date: Thu Dec 29 17:30:49 2005 +0100
+| | summary: add 3 environments varialbe FF_VERBOSITY, FF_INCLUDEPATH, FF_LOADPATH
+| |
+o | changeset: 936:ab89a4c85ef9
+| | user: hecht
+| | date: Thu Dec 29 08:00:51 2005 +0100
+| | summary: reman NSP1BR.edp in NSP2BRP0.edp
+| |
+o | changeset: 935:a0a4be528978
+| | user: hecht
+| | date: Thu Dec 29 07:59:09 2005 +0100
+| | summary: correct load.link (return compile compile error).
+| |
+o | changeset: 934:299e4f9ebabb
+| | user: hecht
+| | date: Thu Dec 29 07:46:23 2005 +0100
+| | summary: add missing files
+| |
+o | changeset: 933:f07b38bd1772
+| | user: hecht
+| | date: Wed Dec 28 15:00:04 2005 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 932:ae8b837389cf
+| | user: hecht
+| | date: Wed Dec 28 14:49:11 2005 +0100
+| | summary: I make a huge cleanning in the figure of the DOC
+| |
+o | changeset: 931:8f09f074b924
+| | user: hecht
+| | date: Tue Dec 27 22:26:40 2005 +0100
+| | summary: correct the example++-load test
+| |
+o | changeset: 930:6406dda79272
+| | user: hecht
+| | date: Tue Dec 27 17:32:25 2005 +0100
+| | summary: Add two new finite element in examples++-load and change the doc
+| |
+o | changeset: 929:52e7e6fc6a98
+| | user: hecht
+| | date: Tue Dec 27 07:54:01 2005 +0100
+| | summary: add new Finite Element Bernardi-Raugel for Stokes or Navier-Stokes
+| |
+o | changeset: 928:4668e8f2bf42
+| | user: hecht
+| | date: Mon Dec 26 17:28:50 2005 +0100
+| | summary: Correct problem in boundary edge (lossing label numbers) in adapated mesh, savemesh,
+| |
+o | changeset: 927:b64cea081b9c
+| | user: lehyaric
+| | date: Tue Dec 13 13:44:58 2005 +0100
+| | summary: Added first support for Doxygen documentation. Inline comments still need
+| |
+o | changeset: 926:16d64c61d6ed
+| | user: lehyaric
+| | date: Mon Dec 12 16:46:01 2005 +0100
+| | summary: Changed --with-suffix configuration in configure.ac to avoid adding
+| |
+o | changeset: 925:6b38eb0bdbfb
+| | user: hecht
+| | date: Fri Dec 09 15:09:43 2005 +0100
+| | summary: do autoreconf
+| |
+o | changeset: 924:93ba5ee1504b
+| | user: hecht
+| | date: Fri Dec 09 15:08:02 2005 +0100
+| | summary: correct CCFLAGS in umfpack for test
+| |
+o | changeset: 923:7b3b757e62c9
+| | user: hecht
+| | date: Fri Dec 09 11:34:49 2005 +0100
+| | summary: add number of parameter in OneOperator class to 10
+| |
+o | changeset: 922:aebb631a6aa3
+| | user: lehyaric
+| | date: Fri Dec 09 10:20:36 2005 +0100
+| | summary: <cr> symbols still showed in the Cygwin (not Mingw) version. This is now
+| |
+o | changeset: 921:db9963c894a5
+| | user: hecht
+| | date: Fri Dec 09 09:36:19 2005 +0100
+| | summary: add missing files in DOPC dist
+| |
+o | changeset: 920:16437453406f
+| | user: lehyaric
+| | date: Thu Dec 08 16:56:36 2005 +0100
+| | summary: New Debian package version 2.1-1.
+| |
+o | changeset: 919:c838c9300480
+| | user: lehyaric
+| | date: Thu Dec 08 10:01:47 2005 +0100
+| | summary: Removed option --disable-tagging from configure.ac since @TAGGINGDEPEND@
+| |
+o | changeset: 918:13204148cc8d
+| | user: hecht
+| | date: Thu Dec 08 07:59:02 2005 +0100
+| | summary: correct LIBRARY problem for umfpack Demo
+| |
+o | changeset: 917:302b77b19c5c
+| | user: hecht
+| | date: Wed Dec 07 21:40:02 2005 +0100
+| | summary: * correct mistake in quadarture formule in integral computation (nota
+| |
+o | changeset: 916:1280844b35e8
+| | user: hecht
+| | date: Wed Dec 07 17:43:37 2005 +0100
+| | summary: correct problem in umfpack with cblas
+| |
+o | changeset: 915:e89bd0a8d2d1
+| | user: hecht
+| | date: Tue Dec 06 22:10:33 2005 +0100
+| | summary: correct mistake in cblas on configure.ac
+| |
+o | changeset: 914:3383a8fb2e59
+| | user: hecht
+| | date: Tue Dec 06 16:56:31 2005 +0100
+| | summary: add new file
+| |
+o | changeset: 913:34d33d0493a1
+| | user: hecht
+| | date: Tue Dec 06 16:55:19 2005 +0100
+| | summary: Use umfpack 4.4, and correct some mistake in configure.ac
+| |
+o | changeset: 912:834165e44b24
+| | user: lehyaric
+| | date: Tue Dec 06 12:18:56 2005 +0100
+| | summary: Now compiles with gcc (GCC) 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
+| |
+o | changeset: 911:239106833256
+| | user: hecht
+| | date: Fri Dec 02 11:02:00 2005 +0100
+| | summary: Add the generation of an error if you try to set a solver on none square matrix,
+| |
+o | changeset: 910:589d0d1b27de
+| | user: hecht
+| | date: Wed Nov 30 13:18:19 2005 +0100
+| | summary: /tmp/cvsBIs12d
+| |
+o | changeset: 909:8ea662ae978c
+| | user: lehyaric
+| | date: Tue Nov 29 11:45:03 2005 +0100
+| | summary: Now dlopen() works even when ARPACK is downloaded
+| |
+o | changeset: 908:4e7335506261
+| | user: hecht
+| | date: Mon Nov 28 16:28:25 2005 +0100
+| | summary: add optimization of a*b expression if a ou b is zero.
+| |
+o | changeset: 907:88031075ba05
+| | user: hecht
+| | date: Wed Nov 23 22:02:27 2005 +0100
+| | summary: add roland correction in the doc.
+| |
+o | changeset: 906:c8d1e446dddd
+| | user: lehyaric
+| | date: Wed Nov 23 10:40:26 2005 +0100
+| | summary: Added examples++-chapt3/all.edp into cleanregen.sh
+| |
+o | changeset: 905:3db52fd808f9
+| | user: hecht
+| | date: Tue Nov 22 16:34:11 2005 +0100
+| | summary: correct problem in algo and Newtow exemple (forgot 1/2 and 2) coef
+| |
+o | changeset: 904:788c50b38101
+| | user: lehyaric
+| | date: Tue Nov 22 10:10:30 2005 +0100
+| | summary: Arbitrary "wget" commands and parameters can be defined through the
+| |
+o | changeset: 903:ff51ba4da75e
+| | user: hecht
+| | date: Sat Nov 19 21:53:41 2005 +0100
+| | summary: I just try autoreconf on my new mac.
+| |
+o | changeset: 902:4a6864be0e52
+| | user: hecht
+| | date: Sat Nov 19 21:46:32 2005 +0100
+| | summary: remove the wrong BlackShocle.edp example
+| |
+o | changeset: 901:aafe6f18031a
+| | user: hecht
+| | date: Wed Nov 16 11:56:55 2005 +0100
+| | summary: correct the following trouble
+| |
+o | changeset: 900:2998977bc121
+| | user: hecht
+| | date: Mon Nov 14 22:00:41 2005 +0100
+| | summary: correct probleme when resize of full matrix, before the coef of the matrix
+| |
+o | changeset: 899:79398b5c2b4c
+| | user: lehyaric
+| | date: Wed Nov 09 15:13:15 2005 +0100
+| | summary: New Debian packaging
+| |
+o | changeset: 898:af9a5fae5106
+| | user: lehyaric
+| | date: Wed Nov 09 15:11:45 2005 +0100
+| | summary: Changed Debian dependency from libfltk1.1c102 to libfltk1.1
+| |
+o | changeset: 897:a87ee751e538
+| | user: hecht
+| | date: Tue Nov 08 11:26:28 2005 +0100
+| | summary: change in grammar lg.y misplaced ternary operator
+| |
+o | changeset: 896:6c6798e0e726
+| | user: hecht
+| | date: Sun Nov 06 20:36:35 2005 +0100
+| | summary: uodate INNOVATION file
+| |
+o | changeset: 895:e0176cafeeca
+| | user: hecht
+| | date: Sun Nov 06 20:26:24 2005 +0100
+| | summary: change the tolerance value un mshptg form 2^-15 to 2^-30 if the computation in long long
+| |
+o | changeset: 894:76b1f65a3b90
+| | user: hecht
+| | date: Wed Nov 02 22:29:12 2005 +0100
+| | summary: add files
+| |
+o | changeset: 893:04dd48fbf3d6
+| | user: hecht
+| | date: Wed Nov 02 22:06:12 2005 +0100
+| | summary: addinf missing files
+| |
+o | changeset: 892:b32338c130bd
+| | user: hecht
+| | date: Wed Nov 02 22:04:13 2005 +0100
+| | summary: correct small mistake in the doc
+| |
+o | changeset: 891:af006f72e7b8
+| | user: lehyaric
+| | date: Wed Nov 02 10:46:14 2005 +0100
+| | summary: New Debian packages
+| |
+o | changeset: 890:a3a685d549f6
+| | user: hecht
+| | date: Tue Nov 01 17:52:59 2005 +0100
+| | summary: correct windows install file and load.link under windows
+| |
+o | changeset: 889:991fc4be5f2b
+| | user: hecht
+| | date: Tue Nov 01 17:08:57 2005 +0100
+| | summary: correct problem in array operator /=
+| |
+o | changeset: 888:c32a725f21b6
+| | user: hecht
+| | date: Tue Nov 01 16:55:32 2005 +0100
+| | summary: correct src/bin-win32 Makefile.am
+| |
+o | changeset: 887:3ef99e3bd6ae
+| | user: hecht
+| | date: Tue Nov 01 14:14:07 2005 +0100
+| | summary: split AFunction3.cpp in 3 files array_{long,real,double}.cpp
+| |
+o | changeset: 886:92f491c4331f
+| | user: hecht
+| | date: Mon Oct 31 22:34:02 2005 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 885:d8267da311f1
+| | user: hecht
+| | date: Mon Oct 31 17:45:53 2005 +0100
+| | summary: - Correction de bug UMFPACK resolution complex problem
+| |
+o | changeset: 884:6c4e84a1a8ac
+| | user: hecht
+| | date: Sun Oct 30 17:26:35 2005 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 883:0028bacc3e62
+| | user: hecht
+| | date: Sun Oct 30 17:06:33 2005 +0100
+| | summary: correct problem in eigen value computation
+| |
+o | changeset: 882:706ef465f936
+| | user: lehyaric
+| | date: Thu Oct 27 19:09:00 2005 +0200
+| | summary: Change MPI package name to keep up with Debian Unstable
+| |
+o | changeset: 881:72a8fd466c6f
+| | user: lehyaric
+| | date: Thu Oct 27 18:22:43 2005 +0200
+| | summary: Places examples++-other last because it contains speed tests which
+| |
+o | changeset: 880:0dde809ed55f
+| | user: lehyaric
+| | date: Thu Oct 27 17:51:19 2005 +0200
+| | summary: - Improved the way configure finds libXxf86vm.a
+| |
+o | changeset: 879:c085ef504236
+| | user: hecht
+| | date: Fri Oct 21 18:18:09 2005 +0200
+| | summary: Try to correct problem in win32 version
+| |
+o | changeset: 878:aa56fd6dc7ba
+| | user: hecht
+| | date: Fri Oct 21 17:27:42 2005 +0200
+| | summary: add .edp file in example++-eigen dir
+| |
+o | changeset: 877:d45005b94b3d
+| | user: lehyaric
+| | date: Thu Oct 20 16:22:05 2005 +0200
+| | summary: Compiling with the Cygwin DLL is now OK again
+| |
+o | changeset: 876:6f055a07e3c3
+| | user: lehyaric
+| | date: Thu Oct 20 15:46:22 2005 +0200
+| | summary: configure.ac now dynamically checks for libXxf86vm.a
+| |
+o | changeset: 875:32d5c81f8e05
+| | user: lehyaric
+| | date: Thu Oct 20 11:56:16 2005 +0200
+| | summary: New manual included in Debian packages
+| |
+o | changeset: 874:c4f11df6192f
+| | user: hecht
+| | date: Wed Oct 19 16:05:20 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 873:ba8e3a039026
+| | user: hecht
+| | date: Wed Oct 19 16:01:24 2005 +0200
+| | summary: correct doc file in Mac vercion
+| |
+o | changeset: 872:97c5169b06d6
+| | user: hecht
+| | date: Wed Oct 19 15:27:56 2005 +0200
+| | summary: add link on Desktop to example
+| |
+o | changeset: 871:ee0c20283445
+| | user: lehyaric
+| | date: Wed Oct 19 15:23:03 2005 +0200
+| | summary: HISTORY update
+| |
+o | changeset: 870:87b7436af068
+| | user: lehyaric
+| | date: Wed Oct 19 15:22:56 2005 +0200
+| | summary: Packaging version 2.
+| |
+o | changeset: 869:3663c2fee3a6
+| | user: hecht
+| | date: Wed Oct 19 14:31:19 2005 +0200
+| | summary: correct misspelling in previous modif
+| |
+o | changeset: 868:0bd5255c4bd5
+| | user: hecht
+| | date: Wed Oct 19 14:20:39 2005 +0200
+| | summary: coorect PB LogoUMPC
+| |
+o | changeset: 867:2e63a3e9ca9e
+| | user: hecht
+| | date: Wed Oct 19 14:14:17 2005 +0200
+| | summary: correct overflow in elem mat when assembling skyline matrix
+| |
+o | changeset: 866:adc2ee0d01fe
+| | user: hecht
+| | date: Tue Oct 18 17:27:16 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 865:5373ad791840
+| | user: hecht
+| | date: Tue Oct 18 13:41:20 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 864:d801079ba411
+| | user: hecht
+| | date: Tue Oct 18 13:29:44 2005 +0200
+| | summary: add .cpp in load.link command in example++-load/Makefile.am
+| |
+o | changeset: 863:0bb65f785e1f
+| | user: hecht
+| | date: Tue Oct 18 13:14:21 2005 +0200
+| | summary: correct return type probleme LinearCG
+| |
+o | changeset: 862:af063a43f41d
+| | user: hecht
+| | date: Tue Oct 18 11:56:38 2005 +0200
+| | summary: correct same problem when passing array as argument.
+| |
+o | changeset: 861:15a2ea7f7e31
+| | user: pironnea
+| | date: Mon Oct 17 09:54:27 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 860:c484b5dfde1d
+| | user: hecht
+| | date: Mon Oct 17 07:26:43 2005 +0200
+| | summary: DOC upgrading
+| |
+o | changeset: 859:c0e097480736
+| | user: hecht
+| | date: Sun Oct 16 19:48:40 2005 +0200
+| | summary: correct small listake in window version
+| |
+o | changeset: 858:053d6a1895bd
+| | user: hecht
+| | date: Sat Oct 15 16:28:49 2005 +0200
+| | summary: in configure in case off --enable_download don't locat to find an arpack library
+| |
+o | changeset: 857:46f7d68bc496
+| | user: hecht
+| | date: Fri Oct 14 11:52:34 2005 +0200
+| | summary: doc book continuing
+| |
+o | changeset: 856:12c305f56de6
+| | user: hecht
+| | date: Thu Oct 13 16:23:46 2005 +0200
+| | summary: change the title page of the doc for publishing
+| |
+o | changeset: 855:d3e62fa2a587
+| | user: pironnea
+| | date: Thu Oct 13 11:48:28 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 854:5313bf2fd39a
+| | user: pironnea
+| | date: Thu Oct 13 11:34:36 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 853:128f45f7d2c2
+| | user: hecht
+| | date: Wed Oct 12 22:22:47 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 852:221e441ef33a
+| | user: hecht
+| | date: Wed Oct 12 21:20:57 2005 +0200
+| | summary: add forgotten files
+| |
+o | changeset: 851:47f4d245d855
+| | user: hecht
+| | date: Wed Oct 12 21:09:23 2005 +0200
+| | summary: update HISTORY
+| |
+o | changeset: 850:0a5d2156274e
+| | user: hecht
+| | date: Wed Oct 12 21:08:29 2005 +0200
+| | summary: Add makefile to build automaticaly the FreeFem++ version with dll
+| |
+o | changeset: 849:09368a95147b
+| | user: pironnea
+| | date: Wed Oct 12 18:20:27 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 848:9b451b2bff88
+| | user: hecht
+| | date: Wed Oct 12 17:50:50 2005 +0200
+| | summary: coorect freefem++doc.tex
+| |
+o | changeset: 847:60473c6ec0a3
+| | user: hecht
+| | date: Wed Oct 12 16:09:25 2005 +0200
+| | summary: just add mising eps file
+| |
+o | changeset: 846:7053f50276e4
+| | user: hecht
+| | date: Wed Oct 12 15:42:06 2005 +0200
+| | summary: do correct in the manual, make big change in the dynamic load, see the maunal
+| |
+o | changeset: 845:3cb796a22b5d
+| | user: hecht
+| | date: Tue Oct 04 20:31:41 2005 +0200
+| | summary: correct small mistake in load.cpp i -> j
+| |
+o | changeset: 844:2a1740f12cd1
+| | user: hecht
+| | date: Tue Oct 04 18:17:48 2005 +0200
+| | summary: change the version number to build new window version.
+| |
+o | changeset: 843:1d5169284e4c
+| | user: hecht
+| | date: Tue Oct 04 17:26:58 2005 +0200
+| | summary: correct overflow integer array in elementary martix
+| |
+o | changeset: 842:cd2ddded3fe8
+| | user: hecht
+| | date: Tue Oct 04 11:44:01 2005 +0200
+| | summary: correct small proble in load.cpp
+| |
+o | changeset: 841:83c6f67e8571
+| | user: hecht
+| | date: Tue Sep 27 22:35:41 2005 +0200
+| | summary: correct load.cpp to change suffix and prefix
+| |
+o | changeset: 840:86a63de90bd6
+| | user: hecht
+| | date: Mon Sep 26 18:03:57 2005 +0200
+| | summary: small correction for buildng the Window version
+| |
+o | changeset: 839:8d1d0e79e8f2
+| | user: hecht
+| | date: Mon Sep 26 14:42:40 2005 +0200
+| | summary: add bin-win32 dir to bluid win32 executable with .dll files
+| |
+o | changeset: 838:478cefc531be
+| | user: hecht
+| | date: Fri Sep 23 17:11:31 2005 +0200
+| | summary: version 1.48-1
+| |
+o | changeset: 837:00683068609c
+| | user: lehyaric
+| | date: Thu Sep 22 12:01:49 2005 +0200
+| | summary: FreeFem++ works on Linux (Debian Testing) thanks to the following
+| |
+o | changeset: 836:3c745b9c0391
+| | user: hecht
+| | date: Wed Sep 21 21:04:58 2005 +0200
+| | summary: correct bug in set array of array to array of reverse
+| |
+o | changeset: 835:d08a7fe8d64b
+| | user: lehyaric
+| | date: Wed Sep 21 14:52:28 2005 +0200
+| | summary: Added new examples++-chapt3 directory to Windows distribution
+| |
+o | changeset: 834:37968b5d3aa4
+| | user: hecht
+| | date: Fri Sep 09 15:27:40 2005 +0200
+| | summary: change the reconstruction of strversionnumber.cpp
+| |
+o | changeset: 833:5ed4006dc572
+| | user: hecht
+| | date: Fri Sep 09 15:19:14 2005 +0200
+| | summary: create ref.edp file (empty today)
+| |
+o | changeset: 832:541c3f59571d
+| | user: hecht
+| | date: Fri Sep 09 15:17:10 2005 +0200
+| | summary: add examples++-chapt3 stuff
+| |
+o | changeset: 831:d0b4babe44bc
+| | user: hecht
+| | date: Fri Sep 09 14:30:50 2005 +0200
+| | summary: add new include file
+| |
+o | changeset: 830:ec7cf2a5bb56
+| | user: hecht
+| | date: Fri Sep 09 13:45:37 2005 +0200
+| | summary: correct missing .esp file in Makefile.am
+| |
+o | changeset: 829:385fa7cb90cf
+| | user: hecht
+| | date: Fri Sep 09 13:27:16 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 828:17e148260e7d
+| | user: hecht
+| | date: Fri Sep 09 13:25:55 2005 +0200
+| | summary: add threehsv.eps file
+| |
+o | changeset: 827:561442bc79b4
+| | user: hecht
+| | date: Wed Aug 31 15:53:14 2005 +0200
+| | summary: add new arithmetic if expression ( (a ? b : c) like in c++
+| |
+o | changeset: 826:908ddb527637
+| | user: hecht
+| | date: Tue Aug 30 16:56:27 2005 +0200
+| | summary: correct unmissing print in case of verbosity = 0 .
+| |
+o | changeset: 825:0a55e1d02298
+| | user: hecht
+| | date: Tue Aug 30 14:58:44 2005 +0200
+| | summary: correct color in window version
+| |
+o | changeset: 824:f54ced8e4821
+| | user: hecht
+| | date: Tue Aug 30 13:36:53 2005 +0200
+| | summary: Add tool to change the color table of plot:
+| |
+o | changeset: 823:95d85c693298
+| | user: hecht
+| | date: Thu Aug 25 14:23:19 2005 +0200
+| | summary: add new freefem++ documentation freefem++doc.pdf ( from O. Pironneau)
+| |
+o | changeset: 822:6ac1c6bfc617
+| | user: lehyaric
+| | date: Fri Jul 15 14:11:49 2005 +0200
+| | summary: Removed "restricted" option from FreeFem++-cs (the Web service does
+| |
+o | changeset: 821:8508a9315ab1
+| | user: lehyaric
+| | date: Wed Jul 13 13:40:51 2005 +0200
+| | summary: Removed references to undefined class "TheSubFMortars"
+| |
+o | changeset: 820:546ff9fb4445
+| | user: hecht
+| | date: Wed Jul 13 12:10:21 2005 +0200
+| | summary: OK, we can make dll under window. first test
+| |
+o | changeset: 819:4f9e6ba028ac
+| | user: hecht
+| | date: Tue Jul 12 11:22:20 2005 +0200
+| | summary: Big modif to buil .dll under window ( it's hard)
+| |
+o | changeset: 818:5e1096ec1eb9
+| | user: hecht
+| | date: Thu Jul 07 09:50:47 2005 +0200
+| | summary: find a new bug in cas if we declare new variable after a break, continue or a return
+| |
+o | changeset: 817:e03e5f78e5fe
+| | user: hecht
+| | date: Tue Jul 05 16:24:31 2005 +0200
+| | summary: correct problem in meshsplit function in case of final mesh with hole and
+| |
+o | changeset: 816:5fc7ff0dcbe0
+| | user: hecht
+| | date: Tue Jul 05 13:11:24 2005 +0200
+| | summary: change version to 1.47-3
+| |
+o | changeset: 815:f62d00cabf0e
+| | user: lehyaric
+| | date: Tue Jul 05 11:48:44 2005 +0200
+| | summary: Tuning scripts for Debian amd64 packaging
+| |
+o | changeset: 814:e74d584065c5
+| | user: lehyaric
+| | date: Mon Jul 04 17:29:41 2005 +0200
+| | summary: Re-enables PDF and PS documentation in Windows packaging after finding the
+| |
+o | changeset: 813:e9430e4f4bac
+| | user: lehyaric
+| | date: Mon Jul 04 16:42:49 2005 +0200
+| | summary: Removed wrong dynamic linking option bug from configure.ac
+| |
+o | changeset: 812:edd3b1cd9f6d
+| | user: lehyaric
+| | date: Mon Jul 04 16:26:14 2005 +0200
+| | summary: Added "-fPIC" in compilation options for 64 bit Linux
+| |
+o | changeset: 811:e5e1da1b1bfe
+| | user: hecht
+| | date: Mon Jul 04 15:55:23 2005 +0200
+| | summary: correct problem in antype castting under window
+| |
+o | changeset: 810:1cb5cd176bfb
+| | user: lehyaric
+| | date: Mon Jul 04 14:57:26 2005 +0200
+| | summary: Removed documentation from Windows executable package because PDF and PS
+| |
+o | changeset: 809:b91b4cb1848d
+| | user: lehyaric
+| | date: Mon Jul 04 13:59:34 2005 +0200
+| | summary: Changed Debian package dependency from "arpack++" to "libarpack++2-dev"
+| |
+o | changeset: 808:152b0171eb45
+| | user: lehyaric
+| | date: Mon Jul 04 13:30:16 2005 +0200
+| | summary: Changing packaging procedure to include new FreeFem++-cs binaries
+| |
+o | changeset: 807:e18fc97ba94a
+| | user: lehyaric
+| | date: Mon Jul 04 13:28:59 2005 +0200
+| | summary: Changing packaging procedure to include FreeFem++-cs binaries.
+| |
+o | changeset: 806:6e6d817fee3d
+| | user: lehyaric
+| | date: Fri Jul 01 17:04:59 2005 +0200
+| | summary: Added 64bit debian package (amd64)
+| |
+o | changeset: 805:bf4bd6f52606
+| | user: lehyaric
+| | date: Fri Jul 01 15:21:40 2005 +0200
+| | summary: Changed makefile to be able to run the Debian packaging procedure.
+| |
+o | changeset: 804:13a708e99d11
+| | user: lehyaric
+| | date: Fri Jul 01 14:23:32 2005 +0200
+| | summary: Minor modifications in 'clean' goal.
+| |
+o | changeset: 803:3973b9916156
+| | user: lehyaric
+| | date: Fri Jul 01 12:08:40 2005 +0200
+| | summary: New package (1.47-2) currently being built
+| |
+o | changeset: 802:93740702390d
+| | user: lehyaric
+| | date: Fri Jul 01 11:59:51 2005 +0200
+| | summary: Building a new package
+| |
+o | changeset: 801:507bab956933
+| | user: hecht
+| | date: Fri Jul 01 11:43:15 2005 +0200
+| | summary: correct problem with splitmesh with internal boundary
+| |
+o | changeset: 800:d450da38d40c
+| | user: lehyaric
+| | date: Fri Jul 01 10:57:28 2005 +0200
+| | summary: Test examples++-tutorial/freeboundary-weak also disabled from regression
+| |
+o | changeset: 799:447f53a0dbac
+| | user: lehyaric
+| | date: Fri Jul 01 10:34:10 2005 +0200
+| | summary: Disabling example examples++-tutorial/freeboundary.edp from regression tests
+| |
+o | changeset: 798:5b0c1d07bccd
+| | user: lehyaric
+| | date: Thu Jun 30 12:22:20 2005 +0200
+| | summary: Configuration procedure updated with new Cygin/Mingw parameters
+| |
+o | changeset: 797:93549d7d0176
+| | user: lehyaric
+| | date: Thu Jun 30 12:08:30 2005 +0200
+| | summary: Standard libraries locations have changed under Cygwin/Mingw
+| |
+o | changeset: 796:8a5fb70aa981
+| | user: hecht
+| | date: Thu Jun 30 08:10:30 2005 +0200
+| | summary: add FE-medit.edp example to show plot of FE a basis function (FH)
+| |
+o | changeset: 795:bfa6725fe254
+| | user: hecht
+| | date: Wed Jun 29 21:40:48 2005 +0200
+| | summary: Add a new finite element P0edge to build new error indicator
+| |
+o | changeset: 794:907fe04bf4f0
+| | user: lehyaric
+| | date: Wed Jun 29 15:00:05 2005 +0200
+| | summary: configure.ac now checks whether flex is compatible with bison. Otherwise
+| |
+o | changeset: 793:4058e691fedf
+| | user: lehyaric
+| | date: Wed Jun 29 13:59:35 2005 +0200
+| | summary: Added some comments inside lex files about producing bison-compatible lexers
+| |
+o | changeset: 792:62d20e3691fe
+| | user: lehyaric
+| | date: Wed Jun 29 11:57:36 2005 +0200
+| | summary: Options bison-bridge and bison-locations are not recognized undef cygwin
+| |
+o | changeset: 791:ca53d6b490fb
+| | user: lehyaric
+| | date: Wed Jun 29 11:52:45 2005 +0200
+| | summary: At the moment, FreeFem++ does not compile under Cygwin because of problems
+| |
+o | changeset: 790:a78f87e4a2f0
+| | user: lehyaric
+| | date: Wed Jun 29 10:10:33 2005 +0200
+| | summary: Added a new configure option "--disable-tagging" to speed up
+| |
+o | changeset: 789:f4101f1de341
+| | user: hecht
+| | date: Tue Jun 28 11:44:33 2005 +0200
+| | summary: add instruction to copy sub array in array
+| |
+o | changeset: 788:a0c72c4364df
+| | user: lehyaric
+| | date: Tue Jun 28 11:27:01 2005 +0200
+| | summary: Color-coding in FreeFem++-cs now colors multi-line comments (/*
+| |
+o | changeset: 787:d9dae2e4a837
+| | user: lehyaric
+| | date: Tue Jun 28 11:07:36 2005 +0200
+| | summary: FreeFem++-cs no longer crashes under Windows when loading a second EDP program
+| |
+o | changeset: 786:07e403bc9c4d
+| | user: hecht
+| | date: Tue Jun 28 10:23:24 2005 +0200
+| | summary: correct trouble in block matrix with transpiose sub matrix
+| |
+o | changeset: 785:77dc6490a932
+| | user: hecht
+| | date: Mon Jun 27 16:23:51 2005 +0200
+| | summary: add tools to build bock matrices like
+| |
+o | changeset: 784:a8b2df79833e
+| | user: hecht
+| | date: Thu Jun 23 13:27:55 2005 +0200
+| | summary: to add Highlighting Patterns for nedit editor of .edp file., do
+| |
+o | changeset: 783:8801d1801347
+| | user: hecht
+| | date: Sun Jun 19 21:09:11 2005 +0200
+| | summary: Add way to bluid matrix with varf on different meshes.
+| |
+o | changeset: 782:96d9ef496911
+| | user: hecht
+| | date: Fri Jun 10 16:33:43 2005 +0200
+| | summary: coorect error in add
+| |
+o | changeset: 781:bbebd79e4d3d
+| | user: hecht
+| | date: Fri Jun 10 16:23:11 2005 +0200
+| | summary: correct some spelling error
+| |
+o | changeset: 780:51598cdf173d
+| | user: hecht
+| | date: Thu Jun 09 15:48:48 2005 +0200
+| | summary: add computation of eigen value for complex matrix
+| |
+o | changeset: 779:5a11859ad82a
+| | user: hecht
+| | date: Thu Jun 02 15:56:06 2005 +0200
+| | summary: correct une function name in Pcrgraph.cpp
+| |
+o | changeset: 778:60033de30615
+| | user: hecht
+| | date: Thu Jun 02 15:02:09 2005 +0200
+| | summary: try to build a dll file continuing.
+| |
+o | changeset: 777:3a9aa1ef97c4
+| | user: hecht
+| | date: Thu Jun 02 13:58:02 2005 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 776:ed24b0f0f4df
+| | user: hecht
+| | date: Thu Jun 02 13:56:57 2005 +0200
+| | summary: correct doible name (CodeAlloc.cpp) in fflib/Makefile.am
+| |
+o | changeset: 775:615a4b420050
+| | user: hecht
+| | date: Thu Jun 02 13:54:33 2005 +0200
+| | summary: continuing solve problem to make a dll file of freefem
+| |
+o | changeset: 774:4cca7ee6dfc1
+| | user: hecht
+| | date: Wed Jun 01 22:52:42 2005 +0200
+| | summary: Do big modification in rgraph.hpp:
+| |
+o | changeset: 773:200f008bc381
+| | user: hecht
+| | date: Thu May 12 11:16:59 2005 +0200
+| | summary: correct problem of CFMessagePort: bootstrap_register()
+| |
+o | changeset: 772:6f30a07c0403
+| | user: hecht
+| | date: Wed May 11 15:17:06 2005 +0200
+| | summary: cosmetic change in PC version
+| |
+o | changeset: 771:12b8179f350f
+| | user: hecht
+| | date: Wed May 11 11:21:00 2005 +0200
+| | summary: correct problem in acoptim.m4 (g++-4 and -fast optim flags)
+| |
+o | changeset: 770:5864a10636d1
+| | user: hecht
+| | date: Wed May 11 10:09:40 2005 +0200
+| | summary: add CXX and CC setting in fltk configure parameters
+| |
+o | changeset: 769:d9d6bd29c106
+| | user: hecht
+| | date: Tue May 10 21:19:18 2005 +0200
+| | summary: add include <errno.hpp> in some ide files (FH)
+| |
+o | changeset: 768:de52b6df4ea1
+| | user: hecht
+| | date: Wed May 04 22:29:42 2005 +0200
+| | summary: add examples++tutorial/xyf file in window distribution
+| |
+o | changeset: 767:ec5efeca8fb4
+| | user: hecht
+| | date: Wed May 04 22:04:25 2005 +0200
+| | summary: add aile.msh in window distribution
+| |
+o | changeset: 766:b753e46694a8
+| | user: hecht
+| | date: Wed May 04 21:59:52 2005 +0200
+| | summary: correct line endding in aile.msh file (make as unix file)
+| |
+o | changeset: 765:054a01ff942d
+| | user: hecht
+| | date: Wed May 04 21:13:44 2005 +0200
+| | summary: correct DOC/Makefile.am
+| |
+o | changeset: 764:62ed86008444
+| | user: hecht
+| | date: Wed May 04 21:01:05 2005 +0200
+| | summary: correct the DOC directory and do autoreconf
+| |
+o | changeset: 763:00dacf8de9d8
+| | user: hecht
+| | date: Wed May 04 19:56:36 2005 +0200
+| | summary: clean the DOC directory to build manual-full and
+| |
+o | changeset: 762:4d0d7644df80
+| | user: hecht
+| | date: Wed May 04 14:26:02 2005 +0200
+| | summary: rebuil all.edp in examples++-tutorial (to remove ref to bug.edp)
+| |
+o | changeset: 761:810491481429
+| | user: hecht
+| | date: Wed May 04 13:09:15 2005 +0200
+| | summary: do autoreconf to rebuild Makefile.in files
+| |
+o | changeset: 760:8aca6e010f53
+| | user: hecht
+| | date: Wed May 04 13:06:48 2005 +0200
+| | summary: add 10^10 and 10.^10 operator (due to error in sphere .edp)
+| |
+o | changeset: 759:70c5c7c03926
+| | user: hecht
+| | date: Tue May 03 16:25:39 2005 +0200
+| | summary: remove pascal in "\p " macos version
+| |
+o | changeset: 758:ec2b000b022c
+| | user: hecht
+| | date: Tue May 03 15:12:06 2005 +0200
+| | summary: try to compile with de idm compiler xlc++
+| |
+o | changeset: 757:379de2f9fa7d
+| | user: hecht
+| | date: Mon May 02 10:57:59 2005 +0200
+| | summary: do correction for g++-4.0
+| |
+o | changeset: 756:fdaaafdd2726
+| | user: hecht
+| | date: Wed Apr 27 14:23:44 2005 +0200
+| | summary: do correction for g++ version 4.0 (new apple compiler on Tiger)
+| |
+o | changeset: 755:f90afd98be49
+| | user: lehyaric
+| | date: Fri Apr 22 11:58:39 2005 +0200
+| | summary: Debug checks are ok on Debian Testing
+| |
+o | changeset: 754:25358d1c2fac
+| | user: hecht
+| | date: Sun Apr 17 18:44:03 2005 +0200
+| | summary: add page to explain how to bluid weak form with Robin / Neumann coundary condition
+| |
+o | changeset: 753:5dec2ffefbd4
+| | user: hecht
+| | date: Sat Apr 16 21:36:09 2005 +0200
+| | summary: add tool to solve variationnal inequality
+| |
+o | changeset: 752:95a33493c392
+| | user: hecht
+| | date: Fri Apr 15 22:06:03 2005 +0200
+| | summary: add tools to solve variationnal inequality
+| |
+o | changeset: 751:b9a7054a3c47
+| | user: lehyaric
+| | date: Wed Apr 13 11:58:49 2005 +0200
+| | summary: IDE compiles again under MingW (an include file was missing)
+| |
+o | changeset: 750:3cba4b225729
+| | user: hecht
+| | date: Tue Apr 12 18:37:37 2005 +0200
+| | summary: add Modification Kohji Ohtsuka in a manual
+| |
+o | changeset: 749:1097a5ea6a9b
+| | user: hecht
+| | date: Tue Apr 12 12:07:29 2005 +0200
+| | summary: add flags to build unionkjack mesh on square
+| |
+o | changeset: 748:80ebe655fe59
+| | user: lehyaric
+| | date: Tue Apr 05 15:08:18 2005 +0200
+| | summary: FreeFem+-ide compiles on MacOS X
+| |
+o | changeset: 747:dd5a71e36e2b
+| | user: lehyaric
+| | date: Tue Apr 05 14:33:49 2005 +0200
+| | summary: First version of FreeFem++-ide without sockets compiles under Linux
+| |
+o | changeset: 746:74899325800e
+| | user: hecht
+| | date: Wed Mar 30 11:38:14 2005 +0200
+| | summary: correct name of example blakschol.edp in BlackSchole.edp
+| |
+o | changeset: 745:d4ef47df5261
+| | user: lehyaric
+| | date: Wed Mar 30 11:02:34 2005 +0200
+| | summary: Not regenerating HISTORY if not in a CVS working area
+| |
+o | changeset: 744:8f628e467da3
+| | user: hecht
+| | date: Wed Mar 30 10:42:49 2005 +0200
+| | summary: correct some mistake in Makefile.am (in: examples++-load/, src/ide/)
+| |
+o | changeset: 743:9ead41b56331
+| | user: hecht
+| | date: Wed Mar 30 09:31:27 2005 +0200
+| | summary: adding 2 new files for allocation (forgot in previous commit)
+| |
+o | changeset: 742:5bed47d8b18c
+| | user: hecht
+| | date: Tue Mar 29 23:13:16 2005 +0200
+| | summary: Big change in code generation alloc (work in progress)
+| |
+o | changeset: 741:24711fe2923e
+| | user: hecht
+| | date: Fri Mar 25 17:59:22 2005 +0100
+| | summary: correct bug in trunc function:
+| |
+o | changeset: 740:73864219f12e
+| | user: lehyaric
+| | date: Fri Mar 25 14:54:25 2005 +0100
+| | summary: Compiling ok on Linux
+| |
+o | changeset: 739:a76f21b1ab1e
+| | user: lehyaric
+| | date: Fri Mar 25 12:37:07 2005 +0100
+| | summary: Client and server merged into one unique executable to make sure that the client can find its server program, even through symbolic links.
+| |
+o | changeset: 738:1bbb4cafbb9b
+| | user: lehyaric
+| | date: Thu Mar 17 14:15:31 2005 +0100
+| | summary: Included src/lglib/lg.tab.?pp in cleanregen.sh
+| |
+o | changeset: 737:8d7e1b3ebe28
+| | user: lehyaric
+| | date: Thu Mar 17 14:13:42 2005 +0100
+| | summary: Replaced sem_getvalue() with a separate counter on MacOSX.
+| |
+o | changeset: 736:a92e3f968ecc
+| | user: hecht
+| | date: Wed Mar 16 22:28:55 2005 +0100
+| | summary: add tool to get number of mesh triangle contening a point (x,y)
+| |
+o | changeset: 735:31983afb5ba0
+| | user: hecht
+| | date: Wed Mar 16 15:37:32 2005 +0100
+| | summary: correct prototype of StrVersionNumber in macrgraf
+| |
+o | changeset: 734:f1c10c96352d
+| | user: lehyaric
+| | date: Wed Mar 16 15:05:14 2005 +0100
+| | summary: Updates to the no-F77 no-C configuration
+| |
+o | changeset: 733:c6b1f76c3c5f
+| | user: lehyaric
+| | date: Wed Mar 16 14:41:57 2005 +0100
+| | summary: Fortran and C compilers are now optional (if they are missing,
+| |
+o | changeset: 732:e6c08627d1d6
+| | user: hecht
+| | date: Wed Mar 16 12:08:00 2005 +0100
+| | summary: correct error in prototype of StrVersionNumber and
+| |
+o | changeset: 731:8f0890d47a88
+| | user: hecht
+| | date: Sun Mar 13 16:32:09 2005 +0100
+| | summary: correct compilation problem in RNM (resize) with g++3.4 (add this->)
+| |
+o | changeset: 730:52c5da835984
+| | user: lehyaric
+| | date: Wed Mar 02 11:50:19 2005 +0100
+| | summary: Correcting compilation problem on RedHat
+| |
+o | changeset: 729:d2dfa98a26fd
+| | user: lehyaric
+| | date: Wed Mar 02 11:29:12 2005 +0100
+| | summary: New packaging including FreeFem++-cs features: fast graphics, grammar highlighting, error-line display
+| |
+o | changeset: 728:4125f650c69b
+| | user: lehyaric
+| | date: Wed Mar 02 11:22:00 2005 +0100
+| | summary: FreeFem++-cs MinGW bug corrected: does not crash anymore when reading a file name from the command line
+| |
+o | changeset: 727:59c2e9b5f8a2
+| | user: lehyaric
+| | date: Tue Mar 01 16:06:32 2005 +0100
+| | summary: Removed unnecessary #includes
+| |
+o | changeset: 726:b476e6a9aa5a
+| | user: lehyaric
+| | date: Tue Mar 01 14:21:52 2005 +0100
+| | summary: Segmentation violation error while loading a file from the command line in FreeFem++-cs. Debugging in progress.
+| |
+o | changeset: 725:73070a97038f
+| | user: lehyaric
+| | date: Mon Feb 28 11:40:10 2005 +0100
+| | summary: Now compiling fine on MinGW
+| |
+o | changeset: 724:9ad116514e1c
+| | user: lehyaric
+| | date: Fri Feb 25 16:14:13 2005 +0100
+| | summary: FreeFem++-cs: compile-time or runtime errors are now highlighted in the
+| |
+o | changeset: 723:a963794aad0d
+| | user: lehyaric
+| | date: Fri Feb 25 13:10:25 2005 +0100
+| | summary: More coherency checks in configure.ac for a correct MPI installation.
+| |
+o | changeset: 722:5b390b867211
+| | user: lehyaric
+| | date: Fri Feb 25 10:50:26 2005 +0100
+| | summary: Added new "resize" reserved word into the highlighting grammar.
+| |
+o | changeset: 721:fb36b11fd57c
+| | user: hecht
+| | date: Thu Feb 24 21:27:23 2005 +0100
+| | summary: correct the documentation
+| |
+o | changeset: 720:b8fb25f14bbb
+| | user: hecht
+| | date: Thu Feb 24 20:44:20 2005 +0100
+| | summary: correct mistake in return type in complex mean and jump new function (FH)
+| |
+o | changeset: 719:347d7fdaf605
+| | user: hecht
+| | date: Thu Feb 24 15:33:21 2005 +0100
+| | summary: resize of array and matrices, continuing
+| |
+o | changeset: 718:05352247ee60
+| | user: hecht
+| | date: Thu Feb 24 15:32:36 2005 +0100
+| | summary: add resize of int,real and complex array or matrices, exemple:
+| |
+o | changeset: 717:237af51c2d16
+| | user: hecht
+| | date: Thu Feb 24 09:44:21 2005 +0100
+| | summary: correct bug in array of complex FE function like
+| |
+o | changeset: 716:0b0233d67ebb
+| | user: lehyaric
+| | date: Wed Feb 23 15:51:03 2005 +0100
+| | summary: Highlighting test procedure not ready for regression tests yet: disabled
+| |
+o | changeset: 715:d6cd82cad75c
+| | user: lehyaric
+| | date: Wed Feb 23 15:22:05 2005 +0100
+| | summary: "testhighlight" regression tests now work up to (but not including) array.edp
+| |
+o | changeset: 714:fb6575626cdc
+| | user: lehyaric
+| | date: Wed Feb 23 14:50:49 2005 +0100
+| | summary: Added highlighting grammar files into CVS, in case the compiling environment
+| |
+o | changeset: 713:81e3198dfed6
+| | user: lehyaric
+| | date: Wed Feb 23 13:44:31 2005 +0100
+| | summary: The HISTORY file is now created from CVS logs thanks to "cvs2cl".
+| |
+o | changeset: 712:349dc15fb839
+| | user: lehyaric
+| | date: Wed Feb 23 12:45:15 2005 +0100
+| | summary: FreeFem++-cs: grammar-driven syntax highlighting works on
+| |
+o | changeset: 711:8871b1b4c0bb
+| | user: hecht
+| | date: Wed Feb 23 10:49:35 2005 +0100
+| | summary: add jump and mean of complex function.
+| |
+o | changeset: 710:c7e0c39689ca
+| | user: lehyaric
+| | date: Fri Feb 18 20:13:24 2005 +0100
+| | summary: FreeFem++-cs syntax highlighting is now highlights keywords based on their
+| |
+o | changeset: 709:6b9cc14429a3
+| | user: hecht
+| | date: Fri Feb 18 18:00:08 2005 +0100
+| | summary: ajoute d'un test d'erreur
+| |
+o | changeset: 708:c442c6ae9737
+| | user: lehyaric
+| | date: Thu Feb 17 16:02:34 2005 +0100
+| | summary: Added new developments
+| |
+o | changeset: 707:051b3deb6ac4
+| | user: lehyaric
+| | date: Thu Feb 17 15:05:22 2005 +0100
+| | summary: Compiles on MacOS X.
+| |
+o | changeset: 706:b93878dc57dd
+| | user: lehyaric
+| | date: Thu Feb 17 14:27:03 2005 +0100
+| | summary: First working version of syntax highlighting through grammar file in
+| |
+o | changeset: 705:ed842e9da7aa
+| | user: hecht
+| | date: Wed Feb 16 18:13:38 2005 +0100
+| | summary: 3D continuing + truc
+| |
+o | changeset: 704:9b85196f1bca
+| | user: lehyaric
+| | date: Wed Feb 16 13:44:24 2005 +0100
+| | summary: Socket buffering is now limited to avoid random communication errors.
+| |
+o | changeset: 703:ca5e14fc546c
+| | user: lehyaric
+| | date: Mon Feb 14 17:22:24 2005 +0100
+| | summary: Socket communication between client and server in FreeFem++-cs has been
+| |
+o | changeset: 702:caeeecdd92b9
+| | user: hecht
+| | date: Fri Feb 11 22:20:32 2005 +0100
+| | summary: complet DOC
+| |
+o | changeset: 701:10f42008bce2
+| | user: hecht
+| | date: Fri Feb 11 18:00:16 2005 +0100
+| | summary: add 2 new quadrature formular qf7pT and qf9pT with respectively 15 and 21 points
+| |
+o | changeset: 700:c2f60527abb5
+| | user: hecht
+| | date: Tue Feb 08 17:26:15 2005 +0100
+| | summary: add 3D stuff in quadtree
+| |
+o | changeset: 699:42115bed3c70
+| | user: lehyaric
+| | date: Tue Feb 08 16:52:02 2005 +0100
+| | summary: Updated TODO list for FreeFem++-cs
+| |
+o | changeset: 698:1cbe06a20efc
+| | user: lehyaric
+| | date: Tue Feb 08 16:18:08 2005 +0100
+| | summary: Dynamic loading is now disabled if dlopen() does not link properly
+| |
+o | changeset: 697:b17a41e40e1b
+| | user: hecht
+| | date: Tue Feb 08 15:18:51 2005 +0100
+| | summary: add buildmesh example with nbvx= named parameter
+| |
+o | changeset: 696:662cf549f14b
+| | user: lehyaric
+| | date: Tue Feb 08 14:23:24 2005 +0100
+| | summary: New Debian package
+| |
+o | changeset: 695:ef360bad2ed9
+| | user: lehyaric
+| | date: Fri Feb 04 16:47:21 2005 +0100
+| | summary: Now checks that FLTK is compiled with threads before accepting it.
+| |
+o | changeset: 694:3b58d5c49afb
+| | user: lehyaric
+| | date: Fri Feb 04 16:24:44 2005 +0100
+| | summary: Patchs de configuration proposés par Thierry Thomas pour FreeBSD intégrés.
+| |
+o | changeset: 693:9af00658c499
+| | user: hecht
+| | date: Fri Feb 04 15:30:49 2005 +0100
+| | summary: beginning of 3D version
+| |
+o | changeset: 692:3dd198f1df06
+| | user: lehyaric
+| | date: Tue Feb 01 16:49:04 2005 +0100
+| | summary: New script to remove generated files (in order to prevent CVS conflicts)
+| |
+o | changeset: 691:7a29cfe029e6
+| | user: lehyaric
+| | date: Tue Feb 01 16:04:54 2005 +0100
+| | summary: FreeFem++-cs compiling and running on Windows with fully blocking sockets
+| |
+o | changeset: 690:2fabec51e87c
+| | user: lehyaric
+| | date: Tue Feb 01 14:38:02 2005 +0100
+| | summary: FreeFem++-cs works with fully-blocking sockets on Linux.
+| |
+o | changeset: 689:f0ac462be8a7
+| | user: lehyaric
+| | date: Tue Feb 01 12:20:38 2005 +0100
+| | summary: Reverting FreeFem++-cs to blocking IO because of Microsoft Windows problems
+| |
+o | changeset: 688:010fbaa0c385
+| | user: lehyaric
+| | date: Mon Jan 31 15:21:05 2005 +0100
+| | summary: New version number in makefiles.
+| |
+o | changeset: 687:f06a10e19b98
+| | user: lehyaric
+| | date: Mon Jan 31 15:17:51 2005 +0100
+| | summary: Default version number now includes package number.
+| |
+o | changeset: 686:c9b8132a2529
+| | user: lehyaric
+| | date: Mon Jan 31 14:07:13 2005 +0100
+| | summary: Problem with busy waiting under Windows solved.
+| |
+o | changeset: 685:da3d8c2394e2
+| | user: hecht
+| | date: Sat Jan 29 09:56:58 2005 +0100
+| | summary: correct some compile error with g++ 3.4
+| |
+o | changeset: 684:4082bdc8cf45
+| | user: lehyaric
+| | date: Fri Jan 28 13:27:49 2005 +0100
+| | summary: Windows packaging for new improved socket implementation
+| |
+o | changeset: 683:b94d16aa1620
+| | user: lehyaric
+| | date: Fri Jan 28 11:28:07 2005 +0100
+| | summary: Still trying to resolve discrepancies between Linux and Windows sockets.
+| |
+o | changeset: 682:d572b516a5ff
+| | user: hecht
+| | date: Thu Jan 27 19:01:24 2005 +0100
+| | summary: correct ; placement in if ...
+| |
+o | changeset: 681:e67edeab0092
+| | user: hecht
+| | date: Thu Jan 27 18:30:17 2005 +0100
+| | summary: pour mettre les makefile.in ok
+| |
+o | changeset: 680:e48d92cee32c
+| | user: hecht
+| | date: Thu Jan 27 18:15:48 2005 +0100
+| | summary: mac install continuing
+| |
+o | changeset: 679:6a216a159e0c
+| | user: hecht
+| | date: Thu Jan 27 18:14:20 2005 +0100
+| | summary: mac install continuing
+| |
+o | changeset: 678:915751728e29
+| | user: hecht
+| | date: Thu Jan 27 18:07:16 2005 +0100
+| | summary: continuing coorect of macos application installation
+| |
+o | changeset: 677:69466588b4f3
+| | user: lehyaric
+| | date: Thu Jan 27 17:16:54 2005 +0100
+| | summary: Reorganising socket communication in FreeFem++-cs because of instabilities
+| |
+o | changeset: 676:132579c00f77
+| | user: lehyaric
+| | date: Thu Jan 27 10:59:01 2005 +0100
+| | summary: Drag'n'drop works with Mozilla Firefox for Windows.
+| |
+o | changeset: 675:f7b2a8606369
+| | user: hecht
+| | date: Wed Jan 26 23:34:28 2005 +0100
+| | summary: add .app.tgz of macos application
+| |
+o | changeset: 674:25c49da9166e
+| | user: hecht
+| | date: Wed Jan 26 23:31:21 2005 +0100
+| | summary: correct pb dvi pdf in manual.tex
+| |
+o | changeset: 673:d0c77c71561b
+| | user: hecht
+| | date: Wed Jan 26 23:25:09 2005 +0100
+| | summary: correct stuff in dist generation
+| |
+o | changeset: 672:7df608534c4b
+| | user: hecht
+| | date: Wed Jan 26 23:22:59 2005 +0100
+| | summary: correct problem dvi and pdf chose
+| |
+o | changeset: 671:29bf3dda976d
+| | user: hecht
+| | date: Wed Jan 26 17:50:13 2005 +0100
+| | summary: coorect macos X application)
+| |
+o | changeset: 670:0e3142ee3a33
+| | user: lehyaric
+| | date: Wed Jan 26 13:58:41 2005 +0100
+| | summary: In configure.ac, PACKAGE_VERSION is already used by autoconf, so we
+| |
+o | changeset: 669:9cc276a2e325
+| | user: hecht
+| | date: Mon Jan 24 11:28:11 2005 +0100
+| | summary: add named parameter nbtx=.. in buildmesh function to change the default
+| |
+o | changeset: 668:537fe1f99bce
+| | user: hecht
+| | date: Thu Jan 20 20:10:32 2005 +0100
+| | summary: Correct a segfault if second derivative of test function exist in
+| |
+o | changeset: 667:28c10d87f954
+| | user: hecht
+| | date: Thu Jan 20 10:39:37 2005 +0100
+| | summary: correct parameter passing () in macro argument
+| |
+o | changeset: 666:1fe91a34d57d
+| | user: hecht
+| | date: Mon Jan 10 22:19:58 2005 +0100
+| | summary: change c i C in speedtest.sh to get Cholesky cpu time
+| |
+o | changeset: 665:83ad7c4f24b2
+| | user: hecht
+| | date: Mon Jan 10 14:03:31 2005 +0100
+| | summary: add forgotten file .pdf
+| |
+o | changeset: 664:7e72fe09da35
+| | user: hecht
+| | date: Mon Jan 10 12:07:32 2005 +0100
+| | summary: window problem continue
+| |
+o | changeset: 663:b54ebd871dac
+| | user: hecht
+| | date: Mon Jan 10 10:41:17 2005 +0100
+| | summary: correct ???? configure.ac under window
+| |
+o | changeset: 662:f9abd9543d11
+| | user: hecht
+| | date: Fri Jan 07 17:05:48 2005 +0100
+| | summary: correct expand string in macro
+| |
+o | changeset: 661:cb5b6ce9fa18
+| | user: hecht
+| | date: Fri Jan 07 15:55:01 2005 +0100
+| | summary: add config.h.in
+| |
+o | changeset: 660:71ef61f93962
+| | user: lehyaric
+| | date: Fri Jan 07 12:25:23 2005 +0100
+| | summary: Cosmetic change
+| |
+o | changeset: 659:1454bcfaa242
+| | user: hecht
+| | date: Fri Jan 07 11:50:08 2005 +0100
+| | summary: correct initialisation in solve in case of un set variable
+| |
+o | changeset: 658:944f60fe0af4
+| | user: hecht
+| | date: Thu Jan 06 21:58:33 2005 +0100
+| | summary: rewrite the macro generation tool to be more to suppress some bug
+| |
+o | changeset: 657:27abad54b320
+| | user: hecht
+| | date: Wed Jan 05 23:10:20 2005 +0100
+| | summary: update HISTORY file
+| |
+o | changeset: 656:4de99db8c363
+| | user: hecht
+| | date: Wed Jan 05 21:50:59 2005 +0100
+| | summary: correct segmentation violation error if
+| |
+o | changeset: 655:6a65a4351cc6
+| | user: hecht
+| | date: Tue Jan 04 16:58:02 2005 +0100
+| | summary: continuing int1d(Th,3,qfe=qf1pElump)(
+| |
+o | changeset: 654:bb8f41ed79bf
+| | user: hecht
+| | date: Tue Jan 04 16:45:19 2005 +0100
+| | summary: add qf1pElump new quadrature formular in int1d() ...
+| |
+o | changeset: 653:75e427064019
+| | user: hecht
+| | date: Wed Dec 29 11:16:11 2004 +0100
+| | summary: add concat operator in macro generation #
+| |
+o | changeset: 652:8dfd9dc97215
+| | user: hecht
+| | date: Tue Dec 21 18:24:43 2004 +0100
+| | summary: add mkff-html.pl file to update the web page.
+| |
+o | changeset: 651:be477b2a559c
+| | user: lehyaric
+| | date: Fri Dec 17 17:22:52 2004 +0100
+| | summary: Windows package including correction for Mingw -mthreads bug
+| |
+o | changeset: 650:eb12e1fe86d0
+| | user: lehyaric
+| | date: Fri Dec 17 15:40:30 2004 +0100
+| | summary: Bug solved: Random crashes in Windows GUI
+| |
+o | changeset: 649:8b2c0dc489c5
+| | user: lehyaric
+| | date: Fri Dec 17 11:17:27 2004 +0100
+| | summary: Change naming conventions in package numbering
+| |
+o | changeset: 648:2e4307b2394c
+| | user: lehyaric
+| | date: Thu Dec 16 10:30:07 2004 +0100
+| | summary: Added files to "clean-gen" goal
+| |
+o | changeset: 647:aeba339ce574
+| | user: lehyaric
+| | date: Thu Dec 16 10:21:45 2004 +0100
+| | summary: Added goal "clean-gen" to clean generated files which are included in the
+| |
+o | changeset: 646:59b4aded663b
+| | user: lehyaric
+| | date: Wed Dec 15 17:42:56 2004 +0100
+| | summary: Postscript output in FreeFem++-cs corrected.
+| |
+o | changeset: 645:576d59fb636f
+| | tag: release_1_44
+| | user: hecht
+| | date: Sat Dec 11 15:25:14 2004 +0100
+| | summary: add one examples and load ide/makefile.in file
+| |
+o | changeset: 644:587836032d0c
+| | user: hecht
+| | date: Tue Dec 07 17:26:16 2004 +0100
+| | summary: put manual-full.pdf and remove manual-full.ps.gz in dist files
+| |
+o | changeset: 643:5915ca34cea8
+| | user: hecht
+| | date: Tue Dec 07 17:19:47 2004 +0100
+| | summary: adding change
+| |
+o | changeset: 642:272bdb376315
+| | user: hecht
+| | date: Tue Dec 07 16:47:49 2004 +0100
+| | summary: correct missing file in dist target in ide/Makefile.am
+| |
+o | changeset: 641:943560ba14cb
+| | user: hecht
+| | date: Tue Dec 07 15:46:54 2004 +0100
+| | summary: add pdfsync.sty
+| |
+o | changeset: 640:574e16fa4580
+| | user: hecht
+| | date: Tue Dec 07 15:46:54 2004 +0100
+| | summary: add pdfsync.sty
+| |
+o | changeset: 639:40a0aa5074d2
+| | user: hecht
+| | date: Tue Dec 07 14:40:55 2004 +0100
+| | summary: correct bug in LinearGC
+| |
+o | changeset: 638:ce9d4f35ccbe
+| | user: hecht
+| | date: Tue Dec 07 14:40:55 2004 +0100
+| | summary: correct bug in LinearGC
+| |
+o | changeset: 637:5e92e098a84c
+| | user: hecht
+| | date: Tue Dec 07 14:40:55 2004 +0100
+| | summary: correct bug in LinearGC
+| |
+o | changeset: 636:c503ab82d448
+| | user: hecht
+| | date: Tue Dec 07 14:40:55 2004 +0100
+| | summary: correct bug in LinearGC
+| |
+o | changeset: 635:df1fe243e312
+| | user: hecht
+| | date: Tue Dec 07 14:40:55 2004 +0100
+| | summary: correct bug in LinearGC
+| |
+o | changeset: 634:5992289e53d9
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 633:bac8aeda8d02
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 632:16ec15ff429e
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 631:5b20a0a70ed3
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 630:6d565e845748
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 629:8c4834a72c8d
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 628:3a567543a457
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 627:1e538d357736
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 626:14c9bd5aa671
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 625:d3e8ab784f54
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 624:078931338411
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 623:6989fe9dcf00
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 622:5850f2541f28
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 621:c1b6502dda0e
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 620:d42824334848
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 619:e3fb8b67aedd
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 618:5231ac489b29
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 617:1ffe14f7e205
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 616:e0e061f7cc0f
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 615:b02e93ab648f
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 614:3826ba342268
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 613:bfe77a690f22
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 612:8a623501ed79
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 611:5eb3d7779ba5
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 610:47890a9320f0
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 609:09fa91db7015
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 608:958a113e64f8
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 607:2550dc877a9e
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 606:0a9e0d2f235a
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 605:5a1f44c2fed5
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 604:fc0a897c0231
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 603:5270118bb4b3
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 602:b8f75296d692
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 601:6405ed03c906
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 600:66d5401897b2
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 599:646706f655fb
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 598:209e45a646c0
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 597:90fd37db4500
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 596:ea886dc74445
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 595:f30855db023a
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 594:01cbb9cc6471
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 593:db32e3dcb9e6
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 592:d2c95b00caa9
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 591:5dd5a8b892c5
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 590:b530f0e60945
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 589:aace165d8a5b
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 588:e7c461ccdd5e
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 587:c43a94efd8d0
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 586:04ca3feeb78f
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 585:0ff5c636ce04
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 584:301f2066aa9e
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 583:5a12dc4f399c
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 582:b7adf373f4fc
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 581:504550d55b8a
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 580:891870d5e48e
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 579:f7ba38e32a59
+| | user: lehyaric
+| | date: Mon Dec 06 16:17:29 2004 +0100
+| | summary: "make dist" does not try and include BLAS source files any more
+| |
+o | changeset: 578:131067ca69b4
+| | user: lehyaric
+| | date: Fri Dec 03 15:27:32 2004 +0100
+| | summary: Include kernel and libc versions in linux static package name
+| |
+o | changeset: 577:950a1b1dc850
+| | user: lehyaric
+| | date: Fri Dec 03 15:27:32 2004 +0100
+| | summary: Include kernel and libc versions in linux static package name
+| |
+o | changeset: 576:dd814ba4d987
+| | user: lehyaric
+| | date: Fri Dec 03 11:48:53 2004 +0100
+| | summary: Wording change
+| |
+o | changeset: 575:698d11505ca5
+| | user: lehyaric
+| | date: Thu Dec 02 13:51:32 2004 +0100
+| | summary: New package for Windows done
+| |
+o | changeset: 574:eda5ab893d90
+| | user: lehyaric
+| | date: Thu Dec 02 13:51:32 2004 +0100
+| | summary: New package for Windows done
+| |
+o | changeset: 573:655782a256ca
+| | user: lehyaric
+| | date: Thu Dec 02 13:51:32 2004 +0100
+| | summary: New package for Windows done
+| |
+o | changeset: 572:7fe59ebb535e
+| | user: lehyaric
+| | date: Thu Dec 02 13:26:30 2004 +0100
+| | summary: Changed reference value for regression tests
+| |
+o | changeset: 571:1e0b5bb8a88a
+| | user: lehyaric
+| | date: Thu Dec 02 13:26:30 2004 +0100
+| | summary: Changed reference value for regression tests
+| |
+o | changeset: 570:28917d41479d
+| | user: lehyaric
+| | date: Thu Dec 02 13:26:30 2004 +0100
+| | summary: Changed reference value for regression tests
+| |
+o | changeset: 569:f4933536ffc4
+| | user: lehyaric
+| | date: Thu Dec 02 12:34:13 2004 +0100
+| | summary: Regression tests suite was not running. Corrected.
+| |
+o | changeset: 568:e9f9444f4eec
+| | user: lehyaric
+| | date: Thu Dec 02 12:34:13 2004 +0100
+| | summary: Regression tests suite was not running. Corrected.
+| |
+o | changeset: 567:5c4ed3b5dd9d
+| | user: lehyaric
+| | date: Thu Dec 02 12:34:13 2004 +0100
+| | summary: Regression tests suite was not running. Corrected.
+| |
+o | changeset: 566:d8c0ddc9c049
+| | user: lehyaric
+| | date: Thu Dec 02 12:24:17 2004 +0100
+| | summary: FreeFem++-cs works on MacOSX (uses named semaphores)
+| |
+o | changeset: 565:9ab9aa52b004
+| | user: lehyaric
+| | date: Thu Dec 02 11:40:45 2004 +0100
+| | summary: X11 shared libraries dependencies removed on Mac OS X
+| |
+o | changeset: 564:a878e8d06b91
+| | user: lehyaric
+| | date: Thu Dec 02 11:40:45 2004 +0100
+| | summary: X11 shared libraries dependencies removed on Mac OS X
+| |
+o | changeset: 563:fcce285846eb
+| | user: lehyaric
+| | date: Thu Dec 02 10:12:21 2004 +0100
+| | summary: Added FreeFem++-cs to visual regression tests
+| |
+o | changeset: 562:d740179bde14
+| | user: lehyaric
+| | date: Thu Dec 02 10:12:21 2004 +0100
+| | summary: Added FreeFem++-cs to visual regression tests
+| |
+o | changeset: 561:26808676972f
+| | user: lehyaric
+| | date: Wed Dec 01 18:10:45 2004 +0100
+| | summary: - Tuned regression tests in examples++-tutorial (convect-apt.edp case)
+| |
+o | changeset: 560:83c213085ce7
+| | user: lehyaric
+| | date: Wed Dec 01 18:10:45 2004 +0100
+| | summary: - Tuned regression tests in examples++-tutorial (convect-apt.edp case)
+| |
+o | changeset: 559:053dbd4ba446
+| | user: lehyaric
+| | date: Wed Dec 01 18:10:45 2004 +0100
+| | summary: - Tuned regression tests in examples++-tutorial (convect-apt.edp case)
+| |
+o | changeset: 558:8139a67a3970
+| | user: lehyaric
+| | date: Wed Dec 01 18:10:45 2004 +0100
+| | summary: - Tuned regression tests in examples++-tutorial (convect-apt.edp case)
+| |
+o | changeset: 557:9f492b691c47
+| | user: lehyaric
+| | date: Wed Dec 01 18:10:45 2004 +0100
+| | summary: - Tuned regression tests in examples++-tutorial (convect-apt.edp case)
+| |
+o | changeset: 556:2ab99a6f771a
+| | user: hecht
+| | date: Tue Nov 30 22:00:45 2004 +0100
+| | summary: remove operation g - A*x -b ; => bug in opt version
+| |
+o | changeset: 555:b9e70adbbe36
+| | user: lehyaric
+| | date: Tue Nov 30 17:18:15 2004 +0100
+| | summary: Application icons now work on Windows
+| |
+o | changeset: 554:8fc116e186d6
+| | user: hecht
+| | date: Tue Nov 30 17:08:59 2004 +0100
+| | summary: change 1 un 1. du to complex varf (ambiguity)
+| |
+o | changeset: 553:8838777e7a31
+| | user: hecht
+| | date: Tue Nov 30 17:00:57 2004 +0100
+| | summary: correct small compile error
+| |
+o | changeset: 552:c187b5186fe1
+| | user: lehyaric
+| | date: Tue Nov 30 13:43:12 2004 +0100
+| | summary: Added X-Windows icon to FreeFem++-cs
+| |
+o | changeset: 551:b157b8570234
+| | user: hecht
+| | date: Mon Nov 29 22:23:28 2004 +0100
+| | summary: Correction dans matrixinterpole
+| |
+o | changeset: 550:cb5e794dd229
+| | user: hecht
+| | date: Mon Nov 29 22:23:28 2004 +0100
+| | summary: Correction dans matrixinterpole
+| |
+o | changeset: 549:f3c219716b61
+| | user: hecht
+| | date: Mon Nov 29 22:23:28 2004 +0100
+| | summary: Correction dans matrixinterpole
+| |
+o | changeset: 548:38b6ad03bc0a
+| | user: hecht
+| | date: Mon Nov 29 22:23:28 2004 +0100
+| | summary: Correction dans matrixinterpole
+| |
+o | changeset: 547:aaa46419f2f2
+| | user: hecht
+| | date: Mon Nov 29 22:23:28 2004 +0100
+| | summary: Correction dans matrixinterpole
+| |
+o | changeset: 546:a1b12d942392
+| | user: lehyaric
+| | date: Fri Nov 26 16:54:09 2004 +0100
+| | summary: New debian package (1.44-8)
+| |
+o | changeset: 545:5afcd79492c7
+| | user: lehyaric
+| | date: Fri Nov 26 16:52:47 2004 +0100
+| | summary: Remove -mpich version from Debian packages since mpich Debian unstable
+| |
+o | changeset: 544:decd403ecbfc
+| | user: lehyaric
+| | date: Fri Nov 26 15:18:49 2004 +0100
+| | summary: Windows packaging modified to improve icons management
+| |
+o | changeset: 543:2bd172a33dc9
+| | user: lehyaric
+| | date: Fri Nov 26 15:18:49 2004 +0100
+| | summary: Windows packaging modified to improve icons management
+| |
+o | changeset: 542:a204e168b37a
+| | user: lehyaric
+| | date: Fri Nov 26 11:15:21 2004 +0100
+| | summary: Including FreeFem++-cs in the Windows packaging
+| |
+o | changeset: 541:4392d747f871
+| | user: lehyaric
+| | date: Thu Nov 25 16:25:05 2004 +0100
+| | summary: FreeFem++-cs compiles on Windows _without_ Cygwin
+| |
+o | changeset: 540:16055790185c
+| | user: lehyaric
+| | date: Thu Nov 25 10:35:48 2004 +0100
+| | summary: Recompiled on Linux (Debian unstable).
+| |
+o | changeset: 539:c9b0bf01408e
+| | user: lehyaric
+| | date: Wed Nov 24 14:46:42 2004 +0100
+| | summary: FreeFem++-cs currently being compiled without Cygwin (because of license problems)
+| |
+o | changeset: 538:434fa9c44e79
+| | user: lehyaric
+| | date: Wed Nov 24 14:46:42 2004 +0100
+| | summary: FreeFem++-cs currently being compiled without Cygwin (because of license problems)
+| |
+o | changeset: 537:052a46e28339
+| | user: lehyaric
+| | date: Tue Nov 23 16:51:22 2004 +0100
+| | summary: We need cygwin1.dll for FreeFem++-cs
+| |
+o | changeset: 536:e51479949d96
+| | user: lehyaric
+| | date: Tue Nov 23 16:39:56 2004 +0100
+| | summary: FreeFem++-cs works on Windows
+| |
+o | changeset: 535:c842a897de0b
+| | user: lehyaric
+| | date: Tue Nov 23 11:06:29 2004 +0100
+| | summary: Cosmetic changes
+| |
+o | changeset: 534:e1be96666c98
+| | user: lehyaric
+| | date: Mon Nov 22 17:00:15 2004 +0100
+| | summary: New binary package for Linux, containing static executables (configure option
+| |
+o | changeset: 533:c5565ad73ac7
+| | user: lehyaric
+| | date: Mon Nov 22 17:00:15 2004 +0100
+| | summary: New binary package for Linux, containing static executables (configure option
+| |
+o | changeset: 532:2366c7044750
+| | user: lehyaric
+| | date: Mon Nov 22 17:00:15 2004 +0100
+| | summary: New binary package for Linux, containing static executables (configure option
+| |
+o | changeset: 531:c4392eca0236
+| | user: lehyaric
+| | date: Mon Nov 22 15:09:18 2004 +0100
+| | summary: New Linux binary package
+| |
+o | changeset: 530:537a21528272
+| | user: lehyaric
+| | date: Mon Nov 22 14:11:11 2004 +0100
+| | summary: Added new configure option --enable-static to have no shared library
+| |
+o | changeset: 529:13717f3277b3
+| | user: lehyaric
+| | date: Mon Nov 22 14:11:11 2004 +0100
+| | summary: Added new configure option --enable-static to have no shared library
+| |
+o | changeset: 528:7960aa03c7c8
+| | user: lehyaric
+| | date: Mon Nov 22 14:11:11 2004 +0100
+| | summary: Added new configure option --enable-static to have no shared library
+| |
+o | changeset: 527:84887e26fa7d
+| | user: lehyaric
+| | date: Fri Nov 19 15:41:21 2004 +0100
+| | summary: Renamed MPI Debian package from -mpi to -mpich to reflect the fact that
+| |
+o | changeset: 526:271f7c1e38d5
+| | user: lehyaric
+| | date: Fri Nov 19 15:41:21 2004 +0100
+| | summary: Renamed MPI Debian package from -mpi to -mpich to reflect the fact that
+| |
+o | changeset: 525:48e68d852cb9
+| | user: lehyaric
+| | date: Fri Nov 19 12:29:07 2004 +0100
+| | summary: Added rules to create a Debian package with mpich
+| |
+o | changeset: 524:824d648c04a3
+| | user: lehyaric
+| | date: Fri Nov 19 12:29:07 2004 +0100
+| | summary: Added rules to create a Debian package with mpich
+| |
+o | changeset: 523:a5edb3078853
+| | user: lehyaric
+| | date: Fri Nov 19 10:57:49 2004 +0100
+| | summary: More precise build dependencies for Debian package
+| |
+o | changeset: 522:59f57df9fae0
+| | user: lehyaric
+| | date: Thu Nov 18 11:05:11 2004 +0100
+| | summary: Added profiling option for configure.ac
+| |
+o | changeset: 521:316f11a303d2
+| | user: lehyaric
+| | date: Thu Nov 18 11:03:39 2004 +0100
+| | summary: Added possibility to create separate packages for Debian testing and unstable.
+| |
+o | changeset: 520:f0095131b64f
+| | user: lehyaric
+| | date: Thu Nov 18 11:03:39 2004 +0100
+| | summary: Added possibility to create separate packages for Debian testing and unstable.
+| |
+o | changeset: 519:718ca74c8d16
+| | user: lehyaric
+| | date: Thu Nov 18 11:03:39 2004 +0100
+| | summary: Added possibility to create separate packages for Debian testing and unstable.
+| |
+o | changeset: 518:9d89d076190d
+| | user: lehyaric
+| | date: Wed Nov 17 15:37:02 2004 +0100
+| | summary: Default Debian package set to -x11
+| |
+o | changeset: 517:bdf44e6aba20
+| | user: lehyaric
+| | date: Wed Nov 17 14:28:50 2004 +0100
+| | summary: Updated IDE TODO list
+| |
+o | changeset: 516:517c1471cf2e
+| | user: lehyaric
+| | date: Wed Nov 17 12:13:22 2004 +0100
+| | summary: Debian package (unstable) for FreeFem++ is ready
+| |
+o | changeset: 515:eaeb26d2dac2
+| | user: lehyaric
+| | date: Wed Nov 17 12:13:22 2004 +0100
+| | summary: Debian package (unstable) for FreeFem++ is ready
+| |
+o | changeset: 514:721ef4ae9791
+| | user: lehyaric
+| | date: Tue Nov 16 17:18:16 2004 +0100
+| | summary: Debian packages curently being built. Not fully operational yet.
+| |
+o | changeset: 513:48d1d0bda2c4
+| | user: lehyaric
+| | date: Tue Nov 16 15:39:50 2004 +0100
+| | summary: Makes doc up-to-date with IDE.
+| |
+o | changeset: 512:8ab392a78e7a
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 511:37b96d6a550d
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 510:e9b15663d36a
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 509:210bc8bca680
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 508:580ba532e342
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 507:edb464296e7d
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 506:ada7b140218e
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 505:fafcb50f4e5b
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 504:bcc41dd3fa8d
+| | user: lehyaric
+| | date: Tue Nov 16 15:21:14 2004 +0100
+| | summary: Changed macro LONG_LONG to BAMG_LONG_LONG to avoid any interference with MPI.
+| |
+o | changeset: 503:afbb5a9e4183
+| | user: hecht
+| | date: Tue Nov 16 09:25:12 2004 +0100
+| | summary: correct problem in integration of complex valued function
+| |
+o | changeset: 502:2b8521a98d74
+| | user: lehyaric
+| | date: Mon Nov 15 15:50:42 2004 +0100
+| | summary: A paragraph about FreeFem++-cs has been added in the documentation.
+| |
+o | changeset: 501:12cd26fb848f
+| | user: lehyaric
+| | date: Mon Nov 15 15:50:42 2004 +0100
+| | summary: A paragraph about FreeFem++-cs has been added in the documentation.
+| |
+o | changeset: 500:892e3010d175
+| | user: lehyaric
+| | date: Mon Nov 15 15:50:42 2004 +0100
+| | summary: A paragraph about FreeFem++-cs has been added in the documentation.
+| |
+o | changeset: 499:e32593c3ce18
+| | user: lehyaric
+| | date: Mon Nov 15 13:56:11 2004 +0100
+| | summary: FreeFem++-cs compiles on Cedre (Red-Hat Enterprise)
+| |
+o | changeset: 498:928f4a1766a4
+| | user: lehyaric
+| | date: Mon Nov 15 10:27:44 2004 +0100
+| | summary: Added TODO list for client/server IDE.
+| |
+o | changeset: 497:ea21be00cbe5
+| | user: hecht
+| | date: Mon Nov 15 09:56:56 2004 +0100
+| | summary: orthographe in manual-full
+| |
+o | changeset: 496:74b4301aac83
+| | user: hecht
+| | date: Fri Nov 12 08:31:27 2004 +0100
+| | summary: cadna intergration continuing.
+| |
+o | changeset: 495:0be17e76a91f
+| | user: hecht
+| | date: Fri Nov 12 08:31:26 2004 +0100
+| | summary: cadna intergration continuing.
+| |
+o | changeset: 494:a3d87f2b073c
+| | user: hecht
+| | date: Fri Nov 12 08:31:26 2004 +0100
+| | summary: cadna intergration continuing.
+| |
+o | changeset: 493:e43f5465f202
+| | user: hecht
+| | date: Fri Nov 12 08:31:26 2004 +0100
+| | summary: cadna intergration continuing.
+| |
+o | changeset: 492:30be56d8661d
+| | user: lehyaric
+| | date: Thu Nov 11 19:45:49 2004 +0100
+| | summary: Progressively debugging the IDE and making it usable.
+| |
+o | changeset: 491:e2c6e9ede5d9
+| | user: lehyaric
+| | date: Wed Nov 10 20:12:16 2004 +0100
+| | summary: Some corrections for Cygwin configuration of the IDE.
+| |
+o | changeset: 490:eb18a25a60ea
+| | user: lehyaric
+| | date: Wed Nov 10 12:38:16 2004 +0100
+| | summary: Integrating Windows+Cygwin changes back into Linux.
+| |
+o | changeset: 489:11ff79651895
+| | user: lehyaric
+| | date: Wed Nov 10 10:48:49 2004 +0100
+| | summary: *** empty log message ***
+| |
+o | changeset: 488:62a7ee053207
+| | user: lehyaric
+| | date: Tue Nov 09 16:54:04 2004 +0100
+| | summary: There was a problem with downloaded BLAS source: it was included in
+| |
+o | changeset: 487:5d76a60fb602
+| | user: hecht
+| | date: Tue Nov 09 16:23:12 2004 +0100
+| | summary: add interface with cadna
+| |
+o | changeset: 486:17496d99e45f
+| | user: lehyaric
+| | date: Tue Nov 09 15:47:10 2004 +0100
+| | summary: Windows version of FreeFem++ client/server IDE currently being
+| |
+o | changeset: 485:6290d8ecd8c1
+| | user: lehyaric
+| | date: Tue Nov 09 15:47:10 2004 +0100
+| | summary: Windows version of FreeFem++ client/server IDE currently being
+| |
+o | changeset: 484:f926e0479ac8
+| | user: lehyaric
+| | date: Tue Nov 09 15:47:10 2004 +0100
+| | summary: Windows version of FreeFem++ client/server IDE currently being
+| |
+o | changeset: 483:6d4dfaef560c
+| | user: lehyaric
+| | date: Mon Nov 08 17:21:45 2004 +0100
+| | summary: FreeFem++ compiles on MacOSX. But it has not been tested yet.
+| |
+o | changeset: 482:a7750c9f311e
+| | user: lehyaric
+| | date: Mon Nov 08 17:21:45 2004 +0100
+| | summary: FreeFem++ compiles on MacOSX. But it has not been tested yet.
+| |
+o | changeset: 481:fb4eebbf4886
+| | user: lehyaric
+| | date: Mon Nov 08 15:02:28 2004 +0100
+| | summary: First stable version for the Integrated Development Environment
+| |
+o | changeset: 480:3c1e6d4bc2a2
+| | user: lehyaric
+| | date: Mon Nov 08 15:02:28 2004 +0100
+| | summary: First stable version for the Integrated Development Environment
+| |
+o | changeset: 479:6a6dfeccf617
+| | user: lehyaric
+| | date: Mon Nov 08 15:02:28 2004 +0100
+| | summary: First stable version for the Integrated Development Environment
+| |
+o | changeset: 478:fca74d661274
+| | user: lehyaric
+| | date: Mon Nov 08 15:02:28 2004 +0100
+| | summary: First stable version for the Integrated Development Environment
+| |
+o | changeset: 477:6f5f852316f2
+| | user: lehyaric
+| | date: Mon Nov 08 15:02:28 2004 +0100
+| | summary: First stable version for the Integrated Development Environment
+| |
+o | changeset: 476:2a9e2f6e8da4
+| | user: hecht
+| | date: Fri Nov 05 20:58:24 2004 +0100
+| | summary: coorect bug in FreeFem++.app the plist file was wrong.x
+| |
+o | changeset: 475:2130890a279c
+| | user: hecht
+| | date: Fri Nov 05 20:58:24 2004 +0100
+| | summary: coorect bug in FreeFem++.app the plist file was wrong.x
+| |
+o | changeset: 474:15a22358864b
+| | user: hecht
+| | date: Fri Nov 05 17:22:45 2004 +0100
+| | summary: rm ./FreeFem++.app/Contents/Resources/Contents/Info.plist
+| |
+o | changeset: 473:78d50e8ca9b3
+| | user: hecht
+| | date: Fri Nov 05 15:01:51 2004 +0100
+| | summary: add install www files
+| |
+o | changeset: 472:deb301bad9ed
+| | user: hecht
+| | date: Fri Nov 05 15:01:51 2004 +0100
+| | summary: add install www files
+| |
+o | changeset: 471:d329085d2ad9
+| | user: hecht
+| | date: Fri Nov 05 15:01:51 2004 +0100
+| | summary: add install www files
+| |
+o | changeset: 470:b469c835a383
+| | user: hecht
+| | date: Thu Nov 04 11:05:46 2004 +0100
+| | summary: small modif for the look
+| |
+o | changeset: 469:ab1f51259bd0
+| | user: hecht
+| | date: Thu Nov 04 10:38:27 2004 +0100
+| | summary: corret small problem in LinearCG LinearGMRES
+| |
+o | changeset: 468:1acbc778abf2
+| | user: hecht
+| | date: Thu Nov 04 10:38:27 2004 +0100
+| | summary: corret small problem in LinearCG LinearGMRES
+| |
+o | changeset: 467:0ab12962b0fd
+| | user: hecht
+| | date: Thu Nov 04 10:38:27 2004 +0100
+| | summary: corret small problem in LinearCG LinearGMRES
+| |
+o | changeset: 466:f7e922b5c47b
+| | user: hecht
+| | date: Thu Nov 04 10:38:27 2004 +0100
+| | summary: corret small problem in LinearCG LinearGMRES
+| |
+o | changeset: 465:7538f84816f9
+| | user: hecht
+| | date: Thu Nov 04 10:38:27 2004 +0100
+| | summary: corret small problem in LinearCG LinearGMRES
+| |
+o | changeset: 464:c7ebd094ec65
+| | user: hecht
+| | date: Mon Nov 01 17:05:20 2004 +0100
+| | summary: continuing regtest
+| |
+o | changeset: 463:11e517877eef
+| | user: hecht
+| | date: Mon Nov 01 17:00:51 2004 +0100
+| | summary: correct stability of regtest
+| |
+o | changeset: 462:dd06f300568d
+| | user: hecht
+| | date: Mon Nov 01 16:29:42 2004 +0100
+| | summary: correct regtest in examples++
+| |
+o | changeset: 461:1683f7035054
+| | user: hecht
+| | date: Mon Nov 01 15:22:16 2004 +0100
+| | summary: correct sensibility problem in regtest value
+| |
+o | changeset: 460:390f8dccddda
+| | user: hecht
+| | date: Mon Nov 01 15:22:16 2004 +0100
+| | summary: correct sensibility problem in regtest value
+| |
+o | changeset: 459:3267ae14952a
+| | user: hecht
+| | date: Mon Nov 01 14:34:06 2004 +0100
+| | summary: beginning of 1.44 version
+| |
+o | changeset: 458:2e4939dc785d
+| | tag: release_1_43
+| | user: hecht
+| | date: Sun Oct 31 21:45:57 2004 +0100
+| | summary: correct probleme in periodic adapted mesh.
+| |
+o | changeset: 457:207421f2a7e8
+| | user: hecht
+| | date: Sun Oct 31 21:45:57 2004 +0100
+| | summary: correct probleme in periodic adapted mesh.
+| |
+o | changeset: 456:200a55791940
+| | user: hecht
+| | date: Fri Oct 22 22:53:17 2004 +0200
+| | summary: correct the sparce-cmatrix.edp problem (bug in copy construct of
+| |
+o | changeset: 455:7e279b9438e3
+| | user: hecht
+| | date: Fri Oct 22 22:53:17 2004 +0200
+| | summary: correct the sparce-cmatrix.edp problem (bug in copy construct of
+| |
+o | changeset: 454:d6da0ddeb280
+| | user: hecht
+| | date: Fri Oct 22 22:13:10 2004 +0200
+| | summary: correct plus in copy of real matrix to complex Z
+| |
+o | changeset: 453:b8318a5e063d
+| | user: hecht
+| | date: Fri Oct 22 20:55:10 2004 +0200
+| | summary: try correct probleme with sparce_cmatrix.edp on hydre
+| |
+o | changeset: 452:ee654e2bf51f
+| | user: hecht
+| | date: Fri Oct 22 17:40:01 2004 +0200
+| | summary: track a bug in complex matrix
+| |
+o | changeset: 451:1ec19015b7a7
+| | user: hecht
+| | date: Fri Oct 22 13:17:13 2004 +0200
+| | summary: correct spelling in Makefile.am
+| |
+o | changeset: 450:81af913867db
+| | user: hecht
+| | date: Fri Oct 22 13:13:57 2004 +0200
+| | summary: correct missing file in dist TARGET
+| |
+o | changeset: 449:4ebc66387841
+| | user: hecht
+| | date: Thu Oct 21 23:30:26 2004 +0200
+| | summary: correct LD_LIBRARY_PATH in regtests.sh
+| |
+o | changeset: 448:ae67b79318c9
+| | user: hecht
+| | date: Thu Oct 21 19:53:59 2004 +0200
+| | summary: correct compilation probleme with g++-3.4
+| |
+o | changeset: 447:210d3e06f92d
+| | user: hecht
+| | date: Thu Oct 21 11:04:46 2004 +0200
+| | summary: olve pb of case in filename if figure dir
+| |
+o | changeset: 446:b5fa749a5bc9
+| | user: hecht
+| | date: Thu Oct 21 11:04:46 2004 +0200
+| | summary: olve pb of case in filename if figure dir
+| |
+o | changeset: 445:76207b73fd90
+| | user: hecht
+| | date: Thu Oct 21 11:04:46 2004 +0200
+| | summary: olve pb of case in filename if figure dir
+| |
+o | changeset: 444:bd6dac9e9094
+| | user: hecht
+| | date: Thu Oct 21 10:51:25 2004 +0200
+| | summary: add info in README_CVS update -d
+| |
+o | changeset: 443:3454b8d74eb1
+| | user: hecht
+| | date: Thu Oct 21 10:47:18 2004 +0200
+| | summary: full manual continuing
+| |
+o | changeset: 442:425302deea0d
+| | user: hecht
+| | date: Thu Oct 21 10:37:25 2004 +0200
+| | summary: change default manual to manual-full
+| |
+o | changeset: 441:930731f1e671
+| | user: hecht
+| | date: Thu Oct 21 09:56:57 2004 +0200
+| | summary: add forgetted file
+| |
+o | changeset: 440:90b421243e49
+| | user: hecht
+| | date: Thu Oct 21 09:55:46 2004 +0200
+| | summary: correct ps generation n tag
+| |
+o | changeset: 439:054a6408443f
+| | user: hecht
+| | date: Thu Oct 21 08:26:40 2004 +0200
+| | summary: correct problem AssembleVarForm compile with -O3 in hydre
+| |
+o | changeset: 438:10d97062e606
+| | user: lehyaric
+| | date: Wed Oct 20 17:26:48 2004 +0200
+| | summary: Updates for building debian packages.
+| |
+o | changeset: 437:6b4d454f052c
+| | user: hecht
+| | date: Wed Oct 20 13:52:12 2004 +0200
+| | summary: correct print in UMFPack driver
+| |
+o | changeset: 436:5d7b015d6b6a
+| | user: hecht
+| | date: Wed Oct 20 12:01:16 2004 +0200
+| | summary: add inquire of FE space connectivite (see HISTRY file)
+| |
+o | changeset: 435:77ee9f17989a
+| | user: hecht
+| | date: Wed Oct 20 12:01:16 2004 +0200
+| | summary: add inquire of FE space connectivite (see HISTRY file)
+| |
+o | changeset: 434:645fa4d8d41e
+| | user: hecht
+| | date: Wed Oct 20 12:01:16 2004 +0200
+| | summary: add inquire of FE space connectivite (see HISTRY file)
+| |
+o | changeset: 433:fe1cf8c01674
+| | user: hecht
+| | date: Tue Oct 19 23:31:24 2004 +0200
+| | summary: correct bug in UMFPACK driver
+| |
+o | changeset: 432:db150de11f10
+| | user: hecht
+| | date: Tue Oct 19 23:31:24 2004 +0200
+| | summary: correct bug in UMFPACK driver
+| |
+o | changeset: 431:086194a0bc97
+| | user: hecht
+| | date: Tue Oct 19 23:31:24 2004 +0200
+| | summary: correct bug in UMFPACK driver
+| |
+o | changeset: 430:143a3895671e
+| | user: hecht
+| | date: Tue Oct 19 23:31:24 2004 +0200
+| | summary: correct bug in UMFPACK driver
+| |
+o | changeset: 429:68b5cd5a87d4
+| | user: hecht
+| | date: Tue Oct 19 23:31:24 2004 +0200
+| | summary: correct bug in UMFPACK driver
+| |
+o | changeset: 428:8e95b761bae5
+| | user: hecht
+| | date: Wed Oct 13 21:49:56 2004 +0200
+| | summary: correct line numbering probleme (lose the first line)
+| |
+o | changeset: 427:25a98f711d0b
+| | user: hecht
+| | date: Wed Oct 13 21:49:56 2004 +0200
+| | summary: correct line numbering probleme (lose the first line)
+| |
+o | changeset: 426:144820ccdbd5
+| | user: hecht
+| | date: Wed Oct 13 18:12:27 2004 +0200
+| | summary: remove accent in GC routine
+| |
+o | changeset: 425:1732ce8c01d8
+| | user: hecht
+| | date: Wed Oct 13 18:12:27 2004 +0200
+| | summary: remove accent in GC routine
+| |
+o | changeset: 424:1b5098389948
+| | user: hecht
+| | date: Tue Oct 12 21:38:18 2004 +0200
+| | summary: reput previous version (wrong test)
+| |
+o | changeset: 423:5638a3f80a88
+| | user: hecht
+| | date: Tue Oct 12 20:59:32 2004 +0200
+| | summary: correct probleme in A*x for full matrix
+| |
+o | changeset: 422:94c1cfab9672
+| | user: hecht
+| | date: Tue Oct 12 07:28:35 2004 +0200
+| | summary: add file src/fflib/lgmat.cpp
+| |
+o | changeset: 421:e63cf99645a9
+| | user: hecht
+| | date: Mon Oct 11 21:31:47 2004 +0200
+| | summary: complex pde , FE complex function, add complex matrix , first test is
+| |
+o | changeset: 420:9cab4d0aa69c
+| | user: hecht
+| | date: Mon Oct 11 21:31:47 2004 +0200
+| | summary: complex pde , FE complex function, add complex matrix , first test is
+| |
+o | changeset: 419:515fd7b96b9f
+| | user: hecht
+| | date: Mon Oct 11 21:31:47 2004 +0200
+| | summary: complex pde , FE complex function, add complex matrix , first test is
+| |
+o | changeset: 418:79b744606bae
+| | user: hecht
+| | date: Mon Oct 11 21:31:47 2004 +0200
+| | summary: complex pde , FE complex function, add complex matrix , first test is
+| |
+o | changeset: 417:5bd8386dcd01
+| | user: hecht
+| | date: Mon Oct 11 21:31:47 2004 +0200
+| | summary: complex pde , FE complex function, add complex matrix , first test is
+| |
+o | changeset: 416:97e71f66af70
+| | user: hecht
+| | date: Fri Oct 08 18:39:13 2004 +0200
+| | summary: complex matrix continuing
+| |
+o | changeset: 415:f137b9a8fc5c
+| | user: hecht
+| | date: Fri Oct 08 18:39:13 2004 +0200
+| | summary: complex matrix continuing
+| |
+o | changeset: 414:ebfebb1ac5fc
+| | user: hecht
+| | date: Fri Oct 08 18:39:13 2004 +0200
+| | summary: complex matrix continuing
+| |
+o | changeset: 413:04eb8a6f2984
+| | user: hecht
+| | date: Fri Oct 08 18:39:13 2004 +0200
+| | summary: complex matrix continuing
+| |
+o | changeset: 412:a22c9b627343
+| | user: hecht
+| | date: Wed Oct 06 22:24:56 2004 +0200
+| | summary: add a pde complex example
+| |
+o | changeset: 411:a4b5781ae40c
+| | user: hecht
+| | date: Wed Oct 06 22:22:05 2004 +0200
+| | summary: pde complex , continuing: first test is now working
+| |
+o | changeset: 410:bcac253cb61b
+| | user: hecht
+| | date: Wed Oct 06 22:22:05 2004 +0200
+| | summary: pde complex , continuing: first test is now working
+| |
+o | changeset: 409:8979601bdc85
+| | user: hecht
+| | date: Tue Oct 05 21:29:04 2004 +0200
+| | summary: complex pde probleme ( first test) no validation
+| |
+o | changeset: 408:256c59f10590
+| | user: hecht
+| | date: Tue Oct 05 21:29:04 2004 +0200
+| | summary: complex pde probleme ( first test) no validation
+| |
+o | changeset: 407:7d2cf3182e76
+| | user: hecht
+| | date: Tue Oct 05 21:29:04 2004 +0200
+| | summary: complex pde probleme ( first test) no validation
+| |
+o | changeset: 406:e95d0ba6b7e3
+| | user: hecht
+| | date: Tue Oct 05 21:29:04 2004 +0200
+| | summary: complex pde probleme ( first test) no validation
+| |
+o | changeset: 405:70e5cbe6ea2d
+| | user: hecht
+| | date: Tue Oct 05 21:29:04 2004 +0200
+| | summary: complex pde probleme ( first test) no validation
+| |
+o | changeset: 404:44a92d96dedf
+| | user: hecht
+| | date: Tue Oct 05 21:29:04 2004 +0200
+| | summary: complex pde probleme ( first test) no validation
+| |
+o | changeset: 403:d6f723e155cb
+| | user: hecht
+| | date: Tue Oct 05 21:29:04 2004 +0200
+| | summary: complex pde probleme ( first test) no validation
+| |
+o | changeset: 402:3c4ce746b967
+| | user: lehyaric
+| | date: Tue Oct 05 15:30:13 2004 +0200
+| | summary: Added reduced compilation goal "quick" for development purposes.
+| |
+o | changeset: 401:b2003bc088ca
+| | user: hecht
+| | date: Mon Oct 04 10:22:29 2004 +0200
+| | summary: add complex edp (continued)
+| |
+o | changeset: 400:397c36b4b309
+| | user: hecht
+| | date: Thu Sep 30 14:50:25 2004 +0200
+| | summary: add complex FE function
+| |
+o | changeset: 399:887c12889698
+| | user: hecht
+| | date: Thu Sep 30 14:50:25 2004 +0200
+| | summary: add complex FE function
+| |
+o | changeset: 398:2f52a8427674
+| | user: hecht
+| | date: Thu Sep 30 14:50:25 2004 +0200
+| | summary: add complex FE function
+| |
+o | changeset: 397:e83e3edd173f
+| | user: hecht
+| | date: Thu Sep 30 14:50:25 2004 +0200
+| | summary: add complex FE function
+| |
+o | changeset: 396:a5d848d61a8c
+| | user: hecht
+| | date: Thu Sep 30 14:50:25 2004 +0200
+| | summary: add complex FE function
+| |
+o | changeset: 395:54aee94d12a5
+| | user: hecht
+| | date: Thu Sep 30 14:50:25 2004 +0200
+| | summary: add complex FE function
+| |
+o | changeset: 394:82ccf1be8da9
+| | user: hecht
+| | date: Thu Sep 30 14:50:25 2004 +0200
+| | summary: add complex FE function
+| |
+o | changeset: 393:8057e10dedca
+| | user: hecht
+| | date: Tue Sep 28 10:58:41 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 392:6af43ced4bae
+| | user: hecht
+| | date: Tue Sep 28 10:58:41 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 391:567799ab94cb
+| | user: hecht
+| | date: Tue Sep 28 10:58:41 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 390:abb85c03c031
+| | user: hecht
+| | date: Tue Sep 28 10:58:41 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 389:fe223eb326cd
+| | user: hecht
+| | date: Tue Sep 28 10:58:40 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 388:4ca7990a291d
+| | user: hecht
+| | date: Tue Sep 28 10:58:40 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 387:933bb1d0a477
+| | user: hecht
+| | date: Tue Sep 28 10:58:40 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 386:5a2434bfc31b
+| | user: hecht
+| | date: Tue Sep 28 10:58:40 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 385:72b317a18586
+| | user: hecht
+| | date: Tue Sep 28 10:58:40 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 384:01a48ef68149
+| | user: hecht
+| | date: Tue Sep 28 10:58:40 2004 +0200
+| | summary: add new manual call manual-full
+| |
+o | changeset: 383:dc00fa274e76
+| | user: lehyaric
+| | date: Fri Sep 17 17:29:29 2004 +0200
+| | summary: More information about CVS commands.
+| |
+o | changeset: 382:3d5b35158b27
+| | user: lehyaric
+| | date: Fri Sep 17 16:55:03 2004 +0200
+| | summary: Regression tests pass with reduced optimization options on PowerPC G5, fast
+| |
+o | changeset: 381:fc7c2126f5c4
+| | user: lehyaric
+| | date: Fri Sep 17 16:13:25 2004 +0200
+| | summary: Regression tests pass again on Macintosh PPC (generic mode).
+| |
+o | changeset: 380:6735dad5752c
+| | user: lehyaric
+| | date: Fri Sep 17 15:14:21 2004 +0200
+| | summary: Make regression tests work again on Macintosh PowerPC (debug mode).
+| |
+o | changeset: 379:1f9b0349c49d
+| | user: lehyaric
+| | date: Fri Sep 17 15:14:21 2004 +0200
+| | summary: Make regression tests work again on Macintosh PowerPC (debug mode).
+| |
+o | changeset: 378:ff90d81ab89d
+| | user: lehyaric
+| | date: Fri Sep 17 15:14:21 2004 +0200
+| | summary: Make regression tests work again on Macintosh PowerPC (debug mode).
+| |
+o | changeset: 377:f7482dd869e3
+| | user: lehyaric
+| | date: Fri Sep 17 15:14:21 2004 +0200
+| | summary: Make regression tests work again on Macintosh PowerPC (debug mode).
+| |
+o | changeset: 376:bfab63278f19
+| | user: lehyaric
+| | date: Thu Sep 16 17:24:11 2004 +0200
+| | summary: Still trying to find appropriate optimization options for PowerPC G5
+| |
+o | changeset: 375:0507c2ba4f1e
+| | user: lehyaric
+| | date: Thu Sep 16 10:43:46 2004 +0200
+| | summary: G5 optimization options reverted to G4 because of segmentation fault
+| |
+o | changeset: 374:cd70efe472da
+| | user: hecht
+| | date: Wed Sep 15 21:50:30 2004 +0200
+| | summary: split AFunction.cpp in 2 files and remove optim option on ppc G5
+| |
+o | changeset: 373:5da1312b3ef9
+| | user: hecht
+| | date: Wed Sep 15 21:50:30 2004 +0200
+| | summary: split AFunction.cpp in 2 files and remove optim option on ppc G5
+| |
+o | changeset: 372:72e9cd4aa1b8
+| | user: hecht
+| | date: Wed Sep 15 21:50:30 2004 +0200
+| | summary: split AFunction.cpp in 2 files and remove optim option on ppc G5
+| |
+o | changeset: 371:1ad31634c74e
+| | user: hecht
+| | date: Tue Sep 14 14:28:57 2004 +0200
+| | summary: correct pb set var CXX in load.sh call in exampelle++-Makefile.am
+| |
+o | changeset: 370:8483d008a226
+| | user: lehyaric
+| | date: Tue Sep 14 13:51:23 2004 +0200
+| | summary: Enables load.link work even when $CXX is not defined.
+| |
+o | changeset: 369:3b19cf768802
+| | user: lehyaric
+| | date: Tue Sep 14 11:39:15 2004 +0200
+| | summary: Corrected bug preventing examples++-tutorial/regtests.m4 from being
+| |
+o | changeset: 368:fe3f3906e950
+| | user: lehyaric
+| | date: Tue Sep 14 11:20:40 2004 +0200
+| | summary: More updates for FreeBSD compilation
+| |
+o | changeset: 367:c4a119ca5c9a
+| | user: lehyaric
+| | date: Mon Sep 13 16:05:19 2004 +0200
+| | summary: Modification proposée par Thierry Thomas pour FreeBSD
+| |
+o | changeset: 366:8493ed2b0f1e
+| | user: hecht
+| | date: Mon Sep 13 15:33:27 2004 +0200
+| | summary: correct plist version
+| |
+o | changeset: 365:18b4482e75b8
+| | user: hecht
+| | date: Mon Sep 13 15:33:27 2004 +0200
+| | summary: correct plist version
+| |
+o | changeset: 364:afb03f91b7e1
+| | user: hecht
+| | date: Mon Sep 13 15:27:09 2004 +0200
+| | summary: C++ encapsulte cblas.h in src/femlib/MatriceCreuse_tpl.hpp for freebsd OS
+| |
+o | changeset: 363:613c6ccc0c5f
+| | user: hecht
+| | date: Tue Sep 07 17:43:34 2004 +0200
+| | summary: corret of window install
+| |
+o | changeset: 362:8540f099b3ce
+| | user: hecht
+| | date: Tue Sep 07 16:47:58 2004 +0200
+| | summary: add file for MacOS application
+| |
+o | changeset: 361:7dae94479be9
+| | user: lehyaric
+| | date: Tue Sep 07 10:37:27 2004 +0200
+| | summary: Regression tests in examples++ directory re-implemented using regtests.m4
+| |
+o | changeset: 360:2d87ce153e15
+| | user: lehyaric
+| | date: Tue Sep 07 10:37:27 2004 +0200
+| | summary: Regression tests in examples++ directory re-implemented using regtests.m4
+| |
+o | changeset: 359:2784c4a0bd47
+| | user: hecht
+| | date: Tue Sep 07 09:45:39 2004 +0200
+| | summary: correct with-blas=.... tags
+| |
+o | changeset: 358:cf165daa0d0f
+| | user: hecht
+| | date: Tue Sep 07 09:36:07 2004 +0200
+| | summary: add if previous download of blas reuse it
+| |
+o | changeset: 357:3eb4c46dcfe9
+| | user: hecht
+| | date: Tue Sep 07 09:36:07 2004 +0200
+| | summary: add if previous download of blas reuse it
+| |
+o | changeset: 356:76b709dff400
+| | user: hecht
+| | date: Tue Sep 07 09:36:07 2004 +0200
+| | summary: add if previous download of blas reuse it
+| |
+o | changeset: 355:5e3635850187
+| | user: hecht
+| | date: Tue Sep 07 09:36:07 2004 +0200
+| | summary: add if previous download of blas reuse it
+| |
+o | changeset: 354:31bc7672aa7c
+| | user: hecht
+| | date: Tue Sep 07 09:36:07 2004 +0200
+| | summary: add if previous download of blas reuse it
+| |
+o | changeset: 353:bd84364412fe
+| | user: hecht
+| | date: Mon Sep 06 16:03:02 2004 +0200
+| | summary: add missing file regtest.m4 in dist make target in examples++-tutorial
+| |
+o | changeset: 352:fca5bc988b28
+| | user: hecht
+| | date: Mon Sep 06 14:00:11 2004 +0200
+| | summary: Add -enable-generic_blas Download generic blas (implie --enable-download)
+| |
+o | changeset: 351:44f079ca1e54
+| | user: hecht
+| | date: Fri Sep 03 10:45:06 2004 +0200
+| | summary: empty SOURCESS variable in download/blas/Makefile.am because
+| |
+o | changeset: 350:1e46b370a8e8
+| | user: hecht
+| | date: Thu Sep 02 16:04:15 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 349:aa868ed8a653
+| | user: hecht
+| | date: Thu Sep 02 16:04:15 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 348:ea558c405714
+| | user: hecht
+| | date: Thu Sep 02 16:04:15 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 347:e93fad9806ee
+| | user: hecht
+| | date: Thu Sep 02 16:04:15 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 346:699d36073a62
+| | user: hecht
+| | date: Wed Sep 01 13:51:05 2004 +0200
+| | summary: correct string[string] undelete pointer
+| |
+o | changeset: 345:3630bf06e805
+| | user: hecht
+| | date: Wed Sep 01 13:51:05 2004 +0200
+| | summary: correct string[string] undelete pointer
+| |
+o | changeset: 344:1f080b312de7
+| | user: hecht
+| | date: Wed Sep 01 13:51:05 2004 +0200
+| | summary: correct string[string] undelete pointer
+| |
+o | changeset: 343:2207149cc212
+| | user: hecht
+| | date: Wed Sep 01 09:33:21 2004 +0200
+| | summary: expand macro problem , suite (et fin?)
+| |
+o | changeset: 342:7f3e2e94c5dd
+| | user: hecht
+| | date: Wed Sep 01 09:33:21 2004 +0200
+| | summary: expand macro problem , suite (et fin?)
+| |
+o | changeset: 341:5155e427a87d
+| | user: hecht
+| | date: Wed Sep 01 07:41:07 2004 +0200
+| | summary: correct pb in macro generation (not finish)
+| |
+o | changeset: 340:c43b8c2be26a
+| | user: hecht
+| | date: Tue Aug 31 17:35:35 2004 +0200
+| | summary: correct bug in macro expansion
+| |
+o | changeset: 339:ffcff5636f12
+| | user: hecht
+| | date: Mon Aug 30 17:10:10 2004 +0200
+| | summary: remove blas call on MacOS 9
+| |
+o | changeset: 338:531a39f19f63
+| | user: hecht
+| | date: Mon Aug 30 15:56:07 2004 +0200
+| | summary: add blas call in choleski and LU solver
+| |
+o | changeset: 337:4fbef75b9c75
+| | user: hecht
+| | date: Mon Aug 30 15:56:07 2004 +0200
+| | summary: add blas call in choleski and LU solver
+| |
+o | changeset: 336:411e79c1f3d1
+| | user: hecht
+| | date: Mon Aug 30 15:56:07 2004 +0200
+| | summary: add blas call in choleski and LU solver
+| |
+o | changeset: 335:db4ae64b21ff
+| | user: hecht
+| | date: Mon Aug 30 14:13:24 2004 +0200
+| | summary: add blas in choleski
+| |
+o | changeset: 334:a2136058155e
+| | user: hecht
+| | date: Mon Aug 30 14:13:24 2004 +0200
+| | summary: add blas in choleski
+| |
+o | changeset: 333:3026860a14e7
+| | user: hecht
+| | date: Mon Aug 30 14:13:24 2004 +0200
+| | summary: add blas in choleski
+| |
+o | changeset: 332:adae49e68467
+| | user: hecht
+| | date: Mon Aug 30 14:03:27 2004 +0200
+| | summary: correct mpi/Makefile.am for compilation with g++-3.4
+| |
+o | changeset: 331:d25cf7233e27
+| | user: hecht
+| | date: Mon Aug 30 13:40:48 2004 +0200
+| | summary: correction to by compatible wiath g++-3.4
+| |
+o | changeset: 330:2053e59afe11
+| | user: hecht
+| | date: Mon Aug 30 13:40:48 2004 +0200
+| | summary: correction to by compatible wiath g++-3.4
+| |
+o | changeset: 329:de5ee8de0427
+| | user: hecht
+| | date: Fri Aug 27 17:42:26 2004 +0200
+| | summary: correct g++-3.4 compilation probleme
+| |
+o | changeset: 328:5a1f1387f099
+| | user: hecht
+| | date: Thu Aug 26 16:51:56 2004 +0200
+| | summary: optimize cpu times on choleski and crout
+| |
+o | changeset: 327:c28bfd60ba97
+| | user: hecht
+| | date: Thu Aug 26 15:04:49 2004 +0200
+| | summary: correct divide by zero in plot
+| |
+o | changeset: 326:82e0b4315486
+| | user: hecht
+| | date: Thu Aug 26 15:04:49 2004 +0200
+| | summary: correct divide by zero in plot
+| |
+o | changeset: 325:cf3cb8ac4aff
+| | user: hecht
+| | date: Thu Aug 26 15:04:49 2004 +0200
+| | summary: correct divide by zero in plot
+| |
+o | changeset: 324:03ff6dc560d5
+| | user: hecht
+| | date: Thu Aug 26 15:04:49 2004 +0200
+| | summary: correct divide by zero in plot
+| |
+o | changeset: 323:1a52cee5c2df
+| | user: hecht
+| | date: Thu Aug 26 15:04:49 2004 +0200
+| | summary: correct divide by zero in plot
+| |
+o | changeset: 322:0aa1b06eb0ef
+| | user: lehyaric
+| | date: Fri Jul 16 14:40:18 2004 +0200
+| | summary: Windows package for Version 1.41 complete.
+| |
+o | changeset: 321:1fe712bb592c
+| | user: lehyaric
+| | date: Fri Jul 16 14:40:18 2004 +0200
+| | summary: Windows package for Version 1.41 complete.
+| |
+o | changeset: 320:def90fb6ed3d
+| | user: lehyaric
+| | date: Fri Jul 16 14:40:18 2004 +0200
+| | summary: Windows package for Version 1.41 complete.
+| |
+o | changeset: 319:bf9d235a46b3
+| | user: lehyaric
+| | date: Fri Jul 16 14:40:18 2004 +0200
+| | summary: Windows package for Version 1.41 complete.
+| |
+o | changeset: 318:85f578ad260e
+| | user: lehyaric
+| | date: Fri Jul 16 14:40:18 2004 +0200
+| | summary: Windows package for Version 1.41 complete.
+| |
+o | changeset: 317:6628af52db2b
+| | user: lehyaric
+| | date: Thu Jul 15 10:32:08 2004 +0200
+| | summary: Regression tests ok on an Athlon 1.2 GHz.
+| |
+o | changeset: 316:53712bc8f199
+| | user: lehyaric
+| | date: Tue Jul 13 14:20:36 2004 +0200
+| | summary: Regression tests pass on cygwin.
+| |
+o | changeset: 315:8ea214d54ae7
+| | user: lehyaric
+| | date: Tue Jul 13 11:13:06 2004 +0200
+| | summary: Small comment change.
+| |
+o | changeset: 314:64a1e1e70dac
+| | user: lehyaric
+| | date: Tue Jul 13 11:12:29 2004 +0200
+| | summary: Downloaded generic BLAS now work on cedre (redhat, pentium 4).
+| |
+o | changeset: 313:1faecf8849ea
+| | user: lehyaric
+| | date: Tue Jul 13 11:12:29 2004 +0200
+| | summary: Downloaded generic BLAS now work on cedre (redhat, pentium 4).
+| |
+o | changeset: 312:d2475c116bac
+| | user: lehyaric
+| | date: Tue Jul 13 11:01:50 2004 +0200
+| | summary: Optimized BLAS replaced with generic BLAS for generic compilation.
+| |
+o | changeset: 311:9d99b39cf9d4
+| | user: lehyaric
+| | date: Tue Jul 13 10:29:57 2004 +0200
+| | summary: Duplicates xerbla.f when downloading generic blas.
+| |
+o | changeset: 310:71ed69bf1371
+| | user: lehyaric
+| | date: Mon Jul 12 17:38:15 2004 +0200
+| | summary: Uses generic BLAS for generic compilation, because it is faster to compile
+| |
+o | changeset: 309:4223a25835b8
+| | user: lehyaric
+| | date: Mon Jul 12 17:38:15 2004 +0200
+| | summary: Uses generic BLAS for generic compilation, because it is faster to compile
+| |
+o | changeset: 308:b9a134a6f6e2
+| | user: lehyaric
+| | date: Fri Jul 09 18:10:16 2004 +0200
+| | summary: New script to upload Debian packages.
+| |
+o | changeset: 307:db4e0b9fb8e6
+| | user: lehyaric
+| | date: Fri Jul 09 18:10:16 2004 +0200
+| | summary: New script to upload Debian packages.
+| |
+o | changeset: 306:fcea44571ff4
+| | user: darrasse
+| | date: Fri Jul 09 16:52:17 2004 +0200
+| | summary: Mise à jour de la liste des auteurs
+| |
+o | changeset: 305:a518d55630cf
+| | user: lehyaric
+| | date: Fri Jul 09 10:04:55 2004 +0200
+| | summary: Binary ATLAS download disabled for the moment.
+| |
+o | changeset: 304:e8c7b5754d95
+| | user: hecht
+| | date: Thu Jul 08 15:31:42 2004 +0200
+| | summary: install-www in progress
+| |
+o | changeset: 303:7af6fdba37a9
+| | user: lehyaric
+| | date: Thu Jul 08 15:22:13 2004 +0200
+| | summary: The precompiled ATLAS library is now correctly downloaded and uncompressed,
+| |
+o | changeset: 302:193850ffeebf
+| | user: lehyaric
+| | date: Thu Jul 08 15:22:13 2004 +0200
+| | summary: The precompiled ATLAS library is now correctly downloaded and uncompressed,
+| |
+o | changeset: 301:1a7ea2e9e383
+| | user: lehyaric
+| | date: Thu Jul 08 15:22:13 2004 +0200
+| | summary: The precompiled ATLAS library is now correctly downloaded and uncompressed,
+| |
+o | changeset: 300:470d4053c3da
+| | user: hecht
+| | date: Thu Jul 08 15:21:08 2004 +0200
+| | summary: correct install-www
+| |
+o | changeset: 299:7cd6515116e5
+| | user: lehyaric
+| | date: Thu Jul 08 13:15:48 2004 +0200
+| | summary: Reference values for regression tests with and without UMFPACK merged.
+| |
+o | changeset: 298:fcf594999fd7
+| | user: lehyaric
+| | date: Thu Jul 08 13:15:48 2004 +0200
+| | summary: Reference values for regression tests with and without UMFPACK merged.
+| |
+o | changeset: 297:3dce3e57c22a
+| | user: lehyaric
+| | date: Thu Jul 08 13:15:48 2004 +0200
+| | summary: Reference values for regression tests with and without UMFPACK merged.
+| |
+o | changeset: 296:b5573d38d3fd
+| | user: lehyaric
+| | date: Thu Jul 08 12:02:10 2004 +0200
+| | summary: Option to download a precompiled version of ATLAS programmed in, but not
+| |
+o | changeset: 295:fefc602af266
+| | user: lehyaric
+| | date: Thu Jul 08 10:44:43 2004 +0200
+| | summary: Debian binary packages created, but not tested yet.
+| |
+o | changeset: 294:2269542083d4
+| | user: lehyaric
+| | date: Wed Jul 07 17:42:54 2004 +0200
+| | summary: Debian packaging in progress.
+| |
+o | changeset: 293:5fa437bd58d9
+| | user: lehyaric
+| | date: Wed Jul 07 17:42:54 2004 +0200
+| | summary: Debian packaging in progress.
+| |
+o | changeset: 292:3c887a990870
+| | user: hecht
+| | date: Wed Jul 07 16:25:04 2004 +0200
+| | summary: correction on macosX version
+| |
+o | changeset: 291:a2af1c655832
+| | user: hecht
+| | date: Wed Jul 07 16:25:04 2004 +0200
+| | summary: correction on macosX version
+| |
+o | changeset: 290:e6ecf315812d
+| | user: hecht
+| | date: Wed Jul 07 16:25:04 2004 +0200
+| | summary: correction on macosX version
+| |
+o | changeset: 289:c51cd2b05332
+| | user: hecht
+| | date: Wed Jul 07 15:56:15 2004 +0200
+| | summary: correct pb in freefem++.app on macosX
+| |
+o | changeset: 288:e142da063d15
+| | user: hecht
+| | date: Wed Jul 07 15:13:27 2004 +0200
+| | summary: correct install-www script
+| |
+o | changeset: 287:ab379a17cf2e
+| | user: hecht
+| | date: Wed Jul 07 14:40:01 2004 +0200
+| | summary: add native9 make target for Mac9 version
+| |
+o | changeset: 286:6aaa1a3f395f
+| | user: hecht
+| | date: Wed Jul 07 14:29:05 2004 +0200
+| | summary: correct pb in MACOSX version and instal-www file
+| |
+o | changeset: 285:28ea7398dafd
+| | user: hecht
+| | date: Wed Jul 07 14:24:10 2004 +0200
+| | summary: correct path of FreeFem++-CoCoa file in install
+| |
+o | changeset: 284:8609cad81843
+| | user: hecht
+| | date: Wed Jul 07 14:05:51 2004 +0200
+| | summary: Add COPYRIGHT file
+| |
+o | changeset: 283:1525c53ec559
+| | user: hecht
+| | date: Wed Jul 07 13:58:17 2004 +0200
+| | summary: Add INSTALL-MacOS file
+| |
+o | changeset: 282:94e900430e00
+| | user: lehyaric
+| | date: Wed Jul 07 12:51:55 2004 +0200
+| | summary: Debian packaging in progress.
+| |
+o | changeset: 281:f5220090d815
+| | user: lehyaric
+| | date: Wed Jul 07 12:51:55 2004 +0200
+| | summary: Debian packaging in progress.
+| |
+o | changeset: 280:421a0c5540ec
+| | user: hecht
+| | date: Wed Jul 07 12:41:05 2004 +0200
+| | summary: mal change in epsilon for regtest (on idared)
+| |
+o | changeset: 279:0f1c9dc9f21f
+| | user: hecht
+| | date: Wed Jul 07 12:09:31 2004 +0200
+| | summary: correct pb in m4 parameter for building regtests.edp
+| |
+o | changeset: 278:669fb7802b66
+| | user: hecht
+| | date: Wed Jul 07 11:32:55 2004 +0200
+| | summary: add install-www to set web server
+| |
+o | changeset: 277:ce3021db6c88
+| | tag: release_1_41_before_packaging
+| | user: lehyaric
+| | date: Mon Jul 05 14:38:47 2004 +0200
+| | summary: Remove debugging information
+| |
+o | changeset: 276:7a4a883326b9
+| | user: lehyaric
+| | date: Thu Jul 01 16:13:29 2004 +0200
+| | summary: Improvements on regression tests on Idared, but still a segmentation fault
+| |
+o | changeset: 275:82325608c7fa
+| | user: lehyaric
+| | date: Thu Jul 01 16:04:09 2004 +0200
+| | summary: All regression tests ok on Cedre.
+| |
+o | changeset: 274:9f94970bb44b
+| | user: lehyaric
+| | date: Thu Jul 01 16:04:09 2004 +0200
+| | summary: All regression tests ok on Cedre.
+| |
+o | changeset: 273:2d7625db8ce9
+| | user: lehyaric
+| | date: Thu Jul 01 16:04:09 2004 +0200
+| | summary: All regression tests ok on Cedre.
+| |
+o | changeset: 272:7be0ae88c080
+| | user: lehyaric
+| | date: Thu Jul 01 15:33:45 2004 +0200
+| | summary: All regression tests ok on Hydre.
+| |
+o | changeset: 271:df58e4bd4eda
+| | user: lehyaric
+| | date: Thu Jul 01 15:33:45 2004 +0200
+| | summary: All regression tests ok on Hydre.
+| |
+o | changeset: 270:0757f6282056
+| | user: lehyaric
+| | date: Thu Jul 01 15:33:45 2004 +0200
+| | summary: All regression tests ok on Hydre.
+| |
+o | changeset: 269:bd99d82ae56e
+| | user: lehyaric
+| | date: Thu Jul 01 15:33:45 2004 +0200
+| | summary: All regression tests ok on Hydre.
+| |
+o | changeset: 268:2e6c9c4611a5
+| | user: lehyaric
+| | date: Thu Jul 01 14:26:01 2004 +0200
+| | summary: More updates to make parallel regression tests work.
+| |
+o | changeset: 267:43dffe189376
+| | user: lehyaric
+| | date: Thu Jul 01 14:26:01 2004 +0200
+| | summary: More updates to make parallel regression tests work.
+| |
+o | changeset: 266:2934f663b1f6
+| | user: lehyaric
+| | date: Thu Jul 01 14:26:01 2004 +0200
+| | summary: More updates to make parallel regression tests work.
+| |
+o | changeset: 265:03a2012d998f
+| | user: lehyaric
+| | date: Thu Jul 01 14:18:33 2004 +0200
+| | summary: Correcting some problems with parallel regressions tests.
+| |
+o | changeset: 264:5659084d9b60
+| | user: lehyaric
+| | date: Thu Jul 01 14:15:43 2004 +0200
+| | summary: Separate set of reference values when UMFPACK is not available.
+| |
+o | changeset: 263:be8728bf6836
+| | user: lehyaric
+| | date: Thu Jul 01 13:21:41 2004 +0200
+| | summary: More tests on the parallel version (FreeFem++-mpi)
+| |
+o | changeset: 262:d6eeb2d1500d
+| | user: lehyaric
+| | date: Wed Jun 30 15:47:51 2004 +0200
+| | summary: Regression tests installed in examples++-tutorial, with a separate file
+| |
+o | changeset: 261:2b2296d0b03d
+| | user: lehyaric
+| | date: Wed Jun 30 14:29:48 2004 +0200
+| | summary: New file configure.param containing configure parameters.
+| |
+o | changeset: 260:74d8cc71c4ba
+| | user: lehyaric
+| | date: Wed Jun 30 10:47:20 2004 +0200
+| | summary: Describes how to compile FreeFem++ on Windows.
+| |
+o | changeset: 259:f5b3a2abcf03
+| | user: lehyaric
+| | date: Wed Jun 30 10:45:28 2004 +0200
+| | summary: Because of the way return codes are handled inside shell pipe "|" commands,
+| |
+o | changeset: 258:dc3cf3b8e5f1
+| | user: lehyaric
+| | date: Tue Jun 29 18:41:14 2004 +0200
+| | summary: More upgrades to make the source tar file compilable on most architectures.
+| |
+o | changeset: 257:93336381edc4
+| | user: lehyaric
+| | date: Tue Jun 29 18:41:14 2004 +0200
+| | summary: More upgrades to make the source tar file compilable on most architectures.
+| |
+o | changeset: 256:e511f057ffa7
+| | user: lehyaric
+| | date: Tue Jun 29 18:41:14 2004 +0200
+| | summary: More upgrades to make the source tar file compilable on most architectures.
+| |
+o | changeset: 255:3be4e4e86327
+| | user: lehyaric
+| | date: Tue Jun 29 18:41:14 2004 +0200
+| | summary: More upgrades to make the source tar file compilable on most architectures.
+| |
+o | changeset: 254:3a93a6f5e3fb
+| | user: lehyaric
+| | date: Tue Jun 29 18:41:14 2004 +0200
+| | summary: More upgrades to make the source tar file compilable on most architectures.
+| |
+o | changeset: 253:413fa728d595
+| | user: lehyaric
+| | date: Tue Jun 29 18:41:14 2004 +0200
+| | summary: More upgrades to make the source tar file compilable on most architectures.
+| |
+o | changeset: 252:95739d9cec9c
+| | user: hecht
+| | date: Mon Jun 28 22:02:09 2004 +0200
+| | summary: correct double echo in macro expansion
+| |
+o | changeset: 251:c787dfc0af48
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 250:fbad8a94c9fe
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 249:23513d2a05c2
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 248:b46fb2019dd4
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 247:cceac60d1b66
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 246:bbba443f4309
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 245:33d98ebd3407
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 244:7ebb82020029
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 243:cb7d05e66ca1
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 242:ce4ed3033dda
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 241:ccf83b55c405
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 240:c880a524e281
+| | user: lehyaric
+| | date: Mon Jun 28 19:26:56 2004 +0200
+| | summary: .tar.gz packages currently being tested and improved. Testing architectures
+| |
+o | changeset: 239:491d91e180a6
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 238:1a92d214e4e9
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 237:18d9f46d6956
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 236:6dbd1f92fe78
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 235:9f6dc3d57397
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 234:c4b6d34b9c58
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 233:15448ffdb476
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 232:ad9b66078f50
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 231:244e10acad9f
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 230:a061edaca896
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 229:5f042d9e08c1
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 228:51b52fdc0699
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 227:9cf12e9fcc6a
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 226:b39368025dc3
+| | user: lehyaric
+| | date: Mon Jun 28 12:36:53 2004 +0200
+| | summary: Gathering all regression check in one location (regtests.edp) to let
+| |
+o | changeset: 225:8be6dcc104ac
+| | user: lehyaric
+| | date: Mon Jun 28 11:07:54 2004 +0200
+| | summary: Cleaning and improving the MacOS version.
+| |
+o | changeset: 224:e98a86d4e84a
+| | user: lehyaric
+| | date: Mon Jun 28 11:07:54 2004 +0200
+| | summary: Cleaning and improving the MacOS version.
+| |
+o | changeset: 223:4fe29fbcb591
+| | user: lehyaric
+| | date: Mon Jun 28 11:07:53 2004 +0200
+| | summary: Cleaning and improving the MacOS version.
+| |
+o | changeset: 222:11ea2dc80fda
+| | user: hecht
+| | date: Mon Jun 28 09:41:41 2004 +0200
+| | summary: small correct
+| |
+o | changeset: 221:803825852848
+| | user: hecht
+| | date: Mon Jun 28 09:33:07 2004 +0200
+| | summary: FH correct pb in file name
+| |
+o | changeset: 220:49f933c9d7c5
+| | user: hecht
+| | date: Mon Jun 28 09:29:04 2004 +0200
+| | summary: Correct small thing in DOC and add losed figure
+| |
+o | changeset: 219:b0b3f7597046
+| | user: hecht
+| | date: Mon Jun 28 09:29:04 2004 +0200
+| | summary: Correct small thing in DOC and add losed figure
+| |
+o | changeset: 218:260856bae4be
+| | user: hecht
+| | date: Mon Jun 28 09:29:04 2004 +0200
+| | summary: Correct small thing in DOC and add losed figure
+| |
+o | changeset: 217:d8ebe140a004
+| | user: hecht
+| | date: Sun Jun 27 17:18:35 2004 +0200
+| | summary: FH modif .plist file for MacOS application
+| |
+o | changeset: 216:274201b08277
+| | user: hecht
+| | date: Sun Jun 27 17:18:35 2004 +0200
+| | summary: FH modif .plist file for MacOS application
+| |
+o | changeset: 215:b34523490134
+| | user: hecht
+| | date: Sun Jun 27 17:18:35 2004 +0200
+| | summary: FH modif .plist file for MacOS application
+| |
+o | changeset: 214:1abaf5e80c5b
+| | user: lehyaric
+| | date: Fri Jun 25 18:39:04 2004 +0200
+| | summary: Added a new scheme for checking numerical results in each example
+| |
+o | changeset: 213:d345132caf0d
+| | user: hecht
+| | date: Fri Jun 25 18:31:20 2004 +0200
+| | summary: FH: add bug example
+| |
+o | changeset: 212:ed255a0ab2b9
+| | user: hecht
+| | date: Fri Jun 25 18:30:14 2004 +0200
+| | summary: FH: compile FLAG optimization on MACOS
+| |
+o | changeset: 211:952ea771ea45
+| | user: hecht
+| | date: Fri Jun 25 17:54:02 2004 +0200
+| | summary: FH: correct the -fast compilation flag on MACOS (remove -malign-natural)
+| |
+o | changeset: 210:ee742b18566c
+| | user: hecht
+| | date: Fri Jun 25 17:54:02 2004 +0200
+| | summary: FH: correct the -fast compilation flag on MACOS (remove -malign-natural)
+| |
+o | changeset: 209:566f15d34ead
+| | user: lehyaric
+| | date: Fri Jun 25 17:30:51 2004 +0200
+| | summary: Making "make visualcheck" work.
+| |
+o | changeset: 208:830668a369ab
+| | user: lehyaric
+| | date: Fri Jun 25 15:46:10 2004 +0200
+| | summary: POSIX system calls times() and sysconf() are not defined in Mingw system
+| |
+o | changeset: 207:5f265a041999
+| | user: lehyaric
+| | date: Fri Jun 25 14:18:35 2004 +0200
+| | summary: Displays test output as well as recording it during regression tests.
+| |
+o | changeset: 206:2a8140e574cd
+| | user: hecht
+| | date: Fri Jun 25 14:13:56 2004 +0200
+| | summary: add a forgottent & in toString Complex)
+| |
+o | changeset: 205:1a8af1b6cc4e
+| | user: hecht
+| | date: Fri Jun 25 14:04:48 2004 +0200
+| | summary: change toString to remove problem of optimisation flag -fast on MacOS
+| |
+o | changeset: 204:cdda0f23627e
+| | user: lehyaric
+| | date: Fri Jun 25 13:53:20 2004 +0200
+| | summary: Avoids the gcc option "-rdynamic" (used for dlopen()) on MacOS.
+| |
+o | changeset: 203:50b0a79472d0
+| | user: lehyaric
+| | date: Fri Jun 25 13:42:27 2004 +0200
+| | summary: Still more corrections to make regtests.sh work.
+| |
+o | changeset: 202:7350e7f03cb7
+| | user: lehyaric
+| | date: Fri Jun 25 12:21:00 2004 +0200
+| | summary: Corrected bug where FreeFem++ command was not correctly constructed
+| |
+o | changeset: 201:1a97c5f8dae3
+| | user: hecht
+| | date: Fri Jun 25 12:17:20 2004 +0200
+| | summary: add periodic adaptmesh stuff
+| |
+o | changeset: 200:bf6116bf6e14
+| | user: hecht
+| | date: Fri Jun 25 12:17:20 2004 +0200
+| | summary: add periodic adaptmesh stuff
+| |
+o | changeset: 199:f9a372018d4d
+| | user: hecht
+| | date: Fri Jun 25 12:17:20 2004 +0200
+| | summary: add periodic adaptmesh stuff
+| |
+o | changeset: 198:173890d6cffd
+| | user: hecht
+| | date: Fri Jun 25 12:17:20 2004 +0200
+| | summary: add periodic adaptmesh stuff
+| |
+o | changeset: 197:1ea692423a96
+| | user: hecht
+| | date: Fri Jun 25 12:17:20 2004 +0200
+| | summary: add periodic adaptmesh stuff
+| |
+o | changeset: 196:eafde84d3182
+| | user: hecht
+| | date: Fri Jun 25 12:17:20 2004 +0200
+| | summary: add periodic adaptmesh stuff
+| |
+o | changeset: 195:36fad8e658ca
+| | user: hecht
+| | date: Fri Jun 25 12:17:20 2004 +0200
+| | summary: add periodic adaptmesh stuff
+| |
+o | changeset: 194:84be95355842
+| | user: hecht
+| | date: Fri Jun 25 12:17:20 2004 +0200
+| | summary: add periodic adaptmesh stuff
+| |
+o | changeset: 193:cc913a248488
+| | user: lehyaric
+| | date: Fri Jun 25 12:12:19 2004 +0200
+| | summary: Corrected bug where file examples++-other/speedtest.out was not updated
+| |
+o | changeset: 192:5eb924283df1
+| | user: lehyaric
+| | date: Fri Jun 25 11:55:15 2004 +0200
+| | summary: Replaced all occurrences of regtests.pl with regtests.sh
+| |
+o | changeset: 191:5f334f30cf3d
+| | user: lehyaric
+| | date: Fri Jun 25 11:05:41 2004 +0200
+| | summary: Correcting the definition of VersionFreeFemDate and VersionFreeFempp
+| |
+o | changeset: 190:46b1668643d5
+| | user: lehyaric
+| | date: Fri Jun 25 10:59:16 2004 +0200
+| | summary: More documentation for config-version.h generation.
+| |
+o | changeset: 189:63d0c3f29db0
+| | user: lehyaric
+| | date: Fri Jun 25 10:55:37 2004 +0200
+| | summary: - Restructuring the regression tests suite to run all non windowed tests
+| |
+o | changeset: 188:05d5f79cdebc
+| | user: lehyaric
+| | date: Fri Jun 25 10:55:37 2004 +0200
+| | summary: - Restructuring the regression tests suite to run all non windowed tests
+| |
+o | changeset: 187:dd9823784d74
+| | user: lehyaric
+| | date: Fri Jun 25 10:55:37 2004 +0200
+| | summary: - Restructuring the regression tests suite to run all non windowed tests
+| |
+o | changeset: 186:28349aab8571
+| | user: lehyaric
+| | date: Fri Jun 25 10:55:37 2004 +0200
+| | summary: - Restructuring the regression tests suite to run all non windowed tests
+| |
+o | changeset: 185:18a8cf3b1821
+| | user: lehyaric
+| | date: Fri Jun 25 10:55:37 2004 +0200
+| | summary: - Restructuring the regression tests suite to run all non windowed tests
+| |
+o | changeset: 184:4f7f186b636b
+| | user: darrasse
+| | date: Thu Jun 24 18:09:06 2004 +0200
+| | summary: Ajout du packet freefem++-doc contenant la documentation
+| |
+o | changeset: 183:e7ca62ae4d11
+| | user: darrasse
+| | date: Thu Jun 24 18:09:06 2004 +0200
+| | summary: Ajout du packet freefem++-doc contenant la documentation
+| |
+o | changeset: 182:0e82b2a232ce
+| | user: darrasse
+| | date: Thu Jun 24 18:09:06 2004 +0200
+| | summary: Ajout du packet freefem++-doc contenant la documentation
+| |
+o | changeset: 181:66f445bf7317
+| | user: lehyaric
+| | date: Thu Jun 24 17:08:22 2004 +0200
+| | summary: Some commands (like make speedtest and doc) are more thoroughly documented.
+| |
+o | changeset: 180:c2c2f1bc0b5d
+| | user: lehyaric
+| | date: Thu Jun 24 16:49:17 2004 +0200
+| | summary: Give a value to LD_LIBRARY_PATH for the examples++-load regression tests.
+| |
+o | changeset: 179:b4d6436c35bf
+| | user: lehyaric
+| | date: Thu Jun 24 16:05:39 2004 +0200
+| | summary: Regression tests for the parallel version are ok.
+| |
+o | changeset: 178:089de7eb3548
+| | user: darrasse
+| | date: Thu Jun 24 14:44:46 2004 +0200
+| | summary: Changement de priorité des alternatives. x11 est prioritaire à glx.
+| |
+o | changeset: 177:6b4f77f9d655
+| | user: lehyaric
+| | date: Thu Jun 24 13:50:15 2004 +0200
+| | summary: examples++-load now works on Cedre (Red Hat), with debug options.
+| |
+o | changeset: 176:13a795a47cb0
+| | user: lehyaric
+| | date: Thu Jun 24 13:50:15 2004 +0200
+| | summary: examples++-load now works on Cedre (Red Hat), with debug options.
+| |
+o | changeset: 175:fe0ca2334cad
+| | user: lehyaric
+| | date: Thu Jun 24 12:27:06 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 174:50971f3da918
+| | user: lehyaric
+| | date: Thu Jun 24 12:27:06 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 173:e5c1f7c7ce17
+| | user: lehyaric
+| | date: Thu Jun 24 11:52:52 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 172:1d1b041dabfc
+| | user: darrasse
+| | date: Thu Jun 24 11:48:27 2004 +0200
+| | summary: Ajout de plusieurs this-> pour la compilation avec g++-3.4
+| |
+o | changeset: 171:04867a5d5213
+| | user: lehyaric
+| | date: Thu Jun 24 10:44:31 2004 +0200
+| | summary: GLX version was not compiled on MacOS X. Corrected.
+| |
+o | changeset: 170:7e35f0a71ca8
+| | user: lehyaric
+| | date: Thu Jun 24 09:46:04 2004 +0200
+| | summary: examples++-load is being worked on. It still poses problems.
+| |
+o | changeset: 169:9ac236b0dd89
+| | user: lehyaric
+| | date: Thu Jun 24 09:46:04 2004 +0200
+| | summary: examples++-load is being worked on. It still poses problems.
+| |
+o | changeset: 168:579a83fef807
+| | user: hecht
+| | date: Thu Jun 24 08:09:48 2004 +0200
+| | summary: modif to bee compatible with g++ 3.4
+| |
+o | changeset: 167:530be6b2021c
+| | user: darrasse
+| | date: Thu Jun 24 04:12:48 2004 +0200
+| | summary: Nouvel ajout de this-> pour la compilation avec g++-3.4
+| |
+o | changeset: 166:91dcaa97dd82
+| | user: darrasse
+| | date: Thu Jun 24 03:37:52 2004 +0200
+| | summary: Ajout de quelques this-> pour la compilation avec g++ 3.4
+| |
+o | changeset: 165:f80016364270
+| | user: darrasse
+| | date: Thu Jun 24 02:16:48 2004 +0200
+| | summary: Ajout d'une page man générique, obligatoire pour Debian.
+| |
+o | changeset: 164:8861a5960357
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 163:c6f04faebb32
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 162:2eae0e0f0869
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 161:34d7f2a2a9f1
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 160:a94d47551f62
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 159:704f142ac8a6
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 158:462a19c6fd35
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 157:14490711226c
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 156:ecd8d9f031c5
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 155:39009c82f388
+| | user: darrasse
+| | date: Thu Jun 24 02:12:43 2004 +0200
+| | summary: Insertion du dossier debian contenant les fichiers nécessaires pour la
+| |
+o | changeset: 154:4c9e9eaee438
+| | user: lehyaric
+| | date: Wed Jun 23 17:05:33 2004 +0200
+| | summary: The regression tests have been checked up to examples++-load not included
+| |
+o | changeset: 153:cd34c9818fdd
+| | user: lehyaric
+| | date: Wed Jun 23 15:47:48 2004 +0200
+| | summary: Problem with AGL on MasOSX solved: it was not selected for compilation
+| |
+o | changeset: 152:56ce98e3dd00
+| | user: lehyaric
+| | date: Wed Jun 23 14:04:06 2004 +0200
+| | summary: Regression tests are currently being checked.
+| |
+o | changeset: 151:0629efd36bdf
+| | user: lehyaric
+| | date: Wed Jun 23 14:04:06 2004 +0200
+| | summary: Regression tests are currently being checked.
+| |
+o | changeset: 150:d74e4f965d34
+| | user: lehyaric
+| | date: Wed Jun 23 14:04:06 2004 +0200
+| | summary: Regression tests are currently being checked.
+| |
+o | changeset: 149:ef13ddf7a19d
+| | user: lehyaric
+| | date: Wed Jun 23 11:36:17 2004 +0200
+| | summary: Mise à jour de la configuration de UMFPACK
+| |
+o | changeset: 148:8c35b9bd5a21
+| | user: lehyaric
+| | date: Tue Jun 22 18:44:09 2004 +0200
+| | summary: Bug preventing the separate compilation of src/fflib/lex.cpp corrected.
+| |
+o | changeset: 147:b83c3d850f19
+| | user: lehyaric
+| | date: Tue Jun 22 18:25:26 2004 +0200
+| | summary: New 'speedtest' goal to run FreeFem++-nw on examples++-other/lap3-cpu.edp
+| |
+o | changeset: 146:b4100d9e3db7
+| | user: lehyaric
+| | date: Tue Jun 22 17:12:59 2004 +0200
+| | summary: Optimization ok on PowerPC G5 (Idared)
+| |
+o | changeset: 145:9f310e0c592f
+| | user: lehyaric
+| | date: Tue Jun 22 15:38:05 2004 +0200
+| | summary: Optimized version ok on cedre (Intel Xeon + gcc + Red Hat Linux)
+| |
+o | changeset: 144:5835fb842952
+| | user: lehyaric
+| | date: Tue Jun 22 15:38:05 2004 +0200
+| | summary: Optimized version ok on cedre (Intel Xeon + gcc + Red Hat Linux)
+| |
+o | changeset: 143:3228d62729ed
+| | user: lehyaric
+| | date: Tue Jun 22 15:38:05 2004 +0200
+| | summary: Optimized version ok on cedre (Intel Xeon + gcc + Red Hat Linux)
+| |
+o | changeset: 142:5a7bc526e492
+| | user: darrasse
+| | date: Tue Jun 22 15:32:22 2004 +0200
+| | summary: correction de la détection de UMFPACK
+| |
+o | changeset: 141:668587ef4273
+| | user: lehyaric
+| | date: Tue Jun 22 12:05:59 2004 +0200
+| | summary: Correction minime de l'explication de --enable-debug.
+| |
+o | changeset: 140:76886e6c7a58
+| | user: lehyaric
+| | date: Mon Jun 21 17:06:16 2004 +0200
+| | summary: Optimization ok on Debian/Testing.
+| |
+o | changeset: 139:06ec58be4aa1
+| | user: hecht
+| | date: Mon Jun 21 16:56:55 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 138:93b07446f4c5
+| | user: hecht
+| | date: Mon Jun 21 16:49:06 2004 +0200
+| | summary: le fichier fflib/lg.tab.hpp est dans de dir lglib et genere par bison
+| |
+o | changeset: 137:ba2a49602ec0
+| | user: lehyaric
+| | date: Mon Jun 21 16:24:54 2004 +0200
+| | summary: Parallel version modified to use downloaded UMFPACK if available.
+| |
+o | changeset: 136:7dd82d676d0d
+| | user: lehyaric
+| | date: Mon Jun 21 15:53:15 2004 +0200
+| | summary: Some corrections for the "generic" optimization mode.
+| |
+o | changeset: 135:154e95f0efb4
+| | user: lehyaric
+| | date: Mon Jun 21 15:31:16 2004 +0200
+| | summary: Hardware-dependant optimization options currently being selected.
+| |
+o | changeset: 134:2fc65e06c099
+| | user: hecht
+| | date: Mon Jun 21 11:08:16 2004 +0200
+| | summary: add example of test the optimised version
+| |
+o | changeset: 133:41b3e409ce8d
+| | user: hecht
+| | date: Mon Jun 21 11:08:16 2004 +0200
+| | summary: add example of test the optimised version
+| |
+o | changeset: 132:aa3b6d5dea5a
+| | user: hecht
+| | date: Mon Jun 21 11:08:16 2004 +0200
+| | summary: add example of test the optimised version
+| |
+o | changeset: 131:ee15f9879bb0
+| | user: lehyaric
+| | date: Sun Jun 20 19:58:38 2004 +0200
+| | summary: Optimiztion for Pentium III added.
+| |
+o | changeset: 130:07ffea2fef49
+| | user: lehyaric
+| | date: Sun Jun 20 19:30:28 2004 +0200
+| | summary: Configuration of compiler optimization flags still being developed.
+| |
+o | changeset: 129:5e6217c43c12
+| | user: lehyaric
+| | date: Sun Jun 20 13:26:50 2004 +0200
+| | summary: acmacros.m4 and acoptim.m4 will centralize all the necessary treatments
+| |
+o | changeset: 128:49ecc5ec76f1
+| | user: hecht
+| | date: Sat Jun 19 14:23:20 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 127:27909cc2efe4
+| | user: hecht
+| | date: Fri Jun 18 17:50:43 2004 +0200
+| | summary: add modif compilation avec gcc 3.4
+| |
+o | changeset: 126:eb38cdcad258
+| | user: lehyaric
+| | date: Fri Jun 18 10:31:16 2004 +0200
+| | summary: Documentation proofreading ok up to §3.6 included
+| |
+o | changeset: 125:eebea7c8bada
+| | user: lehyaric
+| | date: Thu Jun 17 14:34:49 2004 +0200
+| | summary: - Documentation proofreading ok up to §3.6 included
+| |
+o | changeset: 124:de5ab079f924
+| | user: lehyaric
+| | date: Wed Jun 16 14:47:48 2004 +0200
+| | summary: - Removing emacs backup files
+| |
+o | changeset: 123:f8b658a60f71
+| | user: hecht
+| | date: Wed Jun 16 14:36:50 2004 +0200
+| | summary: add projet codewarrior dans la base CVS en mode Binaire
+| |
+o | changeset: 122:4365bece55ed
+| | user: hecht
+| | date: Wed Jun 16 14:35:38 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 121:b1c8e1f1fbfa
+| | user: hecht
+| | date: Wed Jun 16 14:32:24 2004 +0200
+| | summary: correction of string argument in macro processing
+| |
+o | changeset: 120:e8a577e435c5
+| | user: hecht
+| | date: Wed Jun 16 14:32:24 2004 +0200
+| | summary: correction of string argument in macro processing
+| |
+o | changeset: 119:2b3e676ae747
+| | user: hecht
+| | date: Wed Jun 16 14:32:24 2004 +0200
+| | summary: correction of string argument in macro processing
+| |
+o | changeset: 118:3c790a15669c
+| | user: hecht
+| | date: Wed Jun 16 14:32:24 2004 +0200
+| | summary: correction of string argument in macro processing
+| |
+o | changeset: 117:4223b571b7a2
+| | user: hecht
+| | date: Wed Jun 16 14:32:24 2004 +0200
+| | summary: correction of string argument in macro processing
+| |
+o | changeset: 116:6d4f0efd7290
+| | user: hecht
+| | date: Wed Jun 16 14:32:24 2004 +0200
+| | summary: correction of string argument in macro processing
+| |
+o | changeset: 115:8830c3e6a420
+| | user: hecht
+| | date: Wed Jun 16 14:25:41 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 114:15154662ef97
+| | user: lehyaric
+| | date: Tue Jun 15 12:08:37 2004 +0200
+| | summary: Proofreading ok up to §2.3 included.
+| |
+o | changeset: 113:f3859d20ff80
+| | user: lehyaric
+| | date: Thu Jun 10 10:16:17 2004 +0200
+| | summary: - Relecture Anglais documentation: chapitre I ok.
+| |
+o | changeset: 112:5dfaf78878eb
+| | user: lehyaric
+| | date: Thu Jun 10 10:16:17 2004 +0200
+| | summary: - Relecture Anglais documentation: chapitre I ok.
+| |
+o | changeset: 111:d602db40f9df
+| | user: lehyaric
+| | date: Thu Jun 10 10:16:17 2004 +0200
+| | summary: - Relecture Anglais documentation: chapitre I ok.
+| |
+o | changeset: 110:85d80f2e6265
+| | user: lehyaric
+| | date: Wed Jun 09 10:09:10 2004 +0200
+| | summary: More help on CVS and automake.
+| |
+o | changeset: 109:66de63c37bce
+| | user: lehyaric
+| | date: Tue Jun 08 16:10:19 2004 +0200
+| | summary: Relecture anglais doc arrivé au § 1.3
+| |
+o | changeset: 108:93fa37e6dc7e
+| | user: lehyaric
+| | date: Mon Jun 07 16:34:17 2004 +0200
+| | summary: Première relecture des fichiers README et associés.
+| |
+o | changeset: 107:828ba65d9130
+| | user: lehyaric
+| | date: Mon Jun 07 16:34:17 2004 +0200
+| | summary: Première relecture des fichiers README et associés.
+| |
+o | changeset: 106:d76a5467a2c6
+| | user: lehyaric
+| | date: Mon Jun 07 16:34:17 2004 +0200
+| | summary: Première relecture des fichiers README et associés.
+| |
+o | changeset: 105:b58a786980f6
+| | user: lehyaric
+| | date: Mon Jun 07 16:34:17 2004 +0200
+| | summary: Première relecture des fichiers README et associés.
+| |
+o | changeset: 104:83b96ae3f863
+| | user: lehyaric
+| | date: Mon Jun 07 16:34:17 2004 +0200
+| | summary: Première relecture des fichiers README et associés.
+| |
+o | changeset: 103:23de4ddd9d39
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 102:99d43ca61439
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 101:ab16a232f526
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 100:c59fb66f9425
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 99:0bfd80be1c8c
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 98:a12e2d2e0631
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 97:3874c0fba853
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 96:502d1784ed2e
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 95:4dcb9aa0c74e
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 94:37cfd09bf134
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 93:e648a1bfdd58
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 92:dae695622eac
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 91:27cd79875601
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 90:c8bda48c4105
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 89:eb18bcf09a34
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 88:a820a6c27662
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 87:2658627dd95d
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 86:2eb5adcc8f3b
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 85:5c4c5a9817fa
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 84:d7c50a038a79
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 83:e0934bf79429
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 82:60ee4abf02ca
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 81:2bfb83f8a44d
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 80:1b42fd3b13ff
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 79:dfbcaf6116ec
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 78:c990f2f011b2
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 77:2522953f44a9
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 76:d6250e981cf3
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 75:b1d17073cf16
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 74:d524e9ab1f96
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 73:c34a8b43dbb8
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 72:266eeb6a5ad6
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 71:3039d27ef299
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 70:425fc26308ae
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 69:958cf52ec0ae
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 68:7f82309eca0d
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 67:5056a0adbdc9
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 66:db1bcf6b5777
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 65:bb600795df63
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 64:f81592709735
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:25 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 63:2a6417d3e573
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 62:f25428415d3c
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 61:49f2a29fb46e
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 60:c69b6f268006
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 59:9e03261e3434
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 58:1ec7cc14da21
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 57:19c0a9c331c9
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 56:13019879f42e
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 55:c9fab124321e
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 54:a0ae934447f2
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 53:2c37fdc607e9
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 52:fbd4411abda7
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 51:0f97c8037b88
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 50:104bb1f450ad
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 49:23d20c1baebb
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 48:62334abc40ee
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 47:d8836d2bd9f6
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 46:c42f18e39eb4
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 45:5343bcf3d526
+| | user: lehyaric
+| | date: Fri Jun 04 16:06:24 2004 +0200
+| | summary: Les modifications faites dans la branche "alh-autoconf" sont réintégrées
+| |
+o | changeset: 44:3572cd801d80
+| | user: hecht
+| | date: Fri Jun 04 15:22:02 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 43:7baa4c3c41ef
+| | user: hecht
+| | date: Fri Jun 04 15:22:02 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 42:68e784364499
+| | user: hecht
+| | date: Wed May 26 22:22:36 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 41:db5375fde77a
+| | user: hecht
+| | date: Wed May 26 22:00:26 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 40:399fdf624955
+| | user: hecht
+| | date: Wed May 26 21:58:43 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 39:00b51a05f198
+| | user: lehyaric
+| | date: Wed May 26 11:10:01 2004 +0200
+| | summary: manual.tex est réinitialisé à sa version 1.6, car les modifications
+| |
+o | changeset: 38:4f307cbfc41a
+| | user: hecht
+| | date: Tue May 25 13:51:07 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 37:9c04976869b2
+| | user: ly
+| | date: Tue May 25 12:31:17 2004 +0200
+| | summary: Chaque exemple a ete reecrit dans un fichier tex separe, et inclus dans le
+| |
+o | changeset: 36:00d12a962282
+| | user: ly
+| | date: Tue May 25 12:31:17 2004 +0200
+| | summary: Chaque exemple a ete reecrit dans un fichier tex separe, et inclus dans le
+| |
+o | changeset: 35:e67f5d108cb8
+| | user: ly
+| | date: Tue May 25 12:31:17 2004 +0200
+| | summary: Chaque exemple a ete reecrit dans un fichier tex separe, et inclus dans le
+| |
+o | changeset: 34:fcaf81e18093
+| | user: ly
+| | date: Tue May 25 12:31:17 2004 +0200
+| | summary: Chaque exemple a ete reecrit dans un fichier tex separe, et inclus dans le
+| |
+o | changeset: 33:6e952764275e
+| | user: ly
+| | date: Tue May 25 12:31:17 2004 +0200
+| | summary: Chaque exemple a ete reecrit dans un fichier tex separe, et inclus dans le
+| |
+o | changeset: 32:7d38e62303a8
+| | user: lehyaric
+| | date: Fri May 14 15:46:33 2004 +0200
+| | summary: Début de la relecture de l'anglais de la doc.
+| |
+o | changeset: 31:25279b0696ab
+| | user: lehyaric
+| | date: Fri May 14 10:58:43 2004 +0200
+| | summary: manual.pdf and manual.ps.gz are automaticalle regenerated, so they should
+| |
+o | changeset: 30:86ccde355d34
+| | user: lehyaric
+| | date: Fri May 14 10:43:34 2004 +0200
+| | summary: Récupération des Makefiles (depuis l'archive de la version 1.40) qui
+| |
+o | changeset: 29:63564e1a54d8
+| | user: lehyaric
+| | date: Thu May 13 14:07:13 2004 +0200
+| | summary: Séparation d'une branche spéciale pour les essais de autoconf.
+| |
+o | changeset: 28:0e192a3be805
+| | user: lehyaric
+| | date: Thu May 13 14:00:37 2004 +0200
+| | summary: Intégration de Autoconf et Automake dans la procédure de build en cours.
+| |
+o | changeset: 27:33eb5379f1b1
+| | user: lehyaric
+| | date: Thu May 13 09:54:49 2004 +0200
+| | summary: Ajout progressif de tous les fichiers à ignorer.
+| |
+o | changeset: 26:c5f6979dfddd
+| | user: hecht
+| | date: Wed May 12 21:32:42 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 25:4bf5a81958af
+| | user: lehyaric
+| | date: Wed May 12 14:34:39 2004 +0200
+| | summary: Fichier regénéré à la compilation
+| |
+o | changeset: 24:343d50721685
+| | user: ly
+| | date: Wed May 12 13:21:45 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 23:86eda52226a7
+| | user: ly
+| | date: Wed May 12 13:21:44 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 22:4aa14c3200dc
+| | user: hecht
+| | date: Wed May 12 12:10:56 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 21:52c723e3b5d2
+| | user: hecht
+| | date: Wed May 12 12:10:56 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 20:df833d6233c6
+| | user: hecht
+| | date: Wed May 12 12:10:56 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 19:a4fb91c7bf52
+| | user: hecht
+| | date: Wed May 12 12:06:10 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 18:67575fb8c75b
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 17:416a46105dbb
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 16:857518acb793
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 15:ab21c2321e56
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 14:861633b13870
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 13:e92228f45751
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 12:e311b6dcae4a
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 11:7485d6e98966
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 10:c54fd00d722d
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 9:aed0c05275f3
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 8:e322689b6e92
+| | user: hecht
+| | date: Wed May 12 11:35:31 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 7:ef03e67b3e10
+| | user: hecht
+| | date: Wed May 12 11:35:30 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 6:d46f9d0308fb
+| | user: hecht
+| | date: Wed May 12 11:35:30 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 5:cf149a2e8fec
+| | user: hecht
+| | date: Wed May 12 11:35:30 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 4:f449141657dd
+| | user: hecht
+| | date: Wed May 12 11:35:30 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 3:f22e3359ec26
+| | user: ly
+| | date: Tue May 11 17:37:36 2004 +0200
+| | summary: *** empty log message ***
+| |
+o | changeset: 2:fa41e8fddceb
+| | user: lehyaric
+| | date: Mon Apr 26 12:08:47 2004 +0200
+| | summary: Mise à jour de la documentation enregistrée dans CVS à partir de la
+| |
+o | changeset: 1:1fcb4737d85b
+|/ user: lehyaric
+| date: Mon Apr 26 12:08:46 2004 +0200
+| summary: Mise à jour de la documentation enregistrée dans CVS à partir de la
+|
+o changeset: 0:6d28b8993874
+ tag: FREEFEM_1_38
+ user: lehyaric
+ date: Mon Apr 26 11:58:47 2004 +0200
+ summary: Initial revision
+
diff --cc INNOVATION.orig
index 45ede95,0000000..54d8848
mode 100644,000000..100644
--- a/INNOVATION.orig
+++ b/INNOVATION.orig
@@@ -1,1214 -1,0 +1,1217 @@@
++<<<<<<< HEAD
+version 3.34-1
+ - correct lot of mistake for simple compilation of
+ hpddm interface ..
+ - add no mandatory lib for petsc
+ write the WHERE-LIBRARY search lib in awk (more simple )
+ version 3.24
+ - configure : 6/02/ 2015
+ correct mpi for sgi uv computer
+ find gsl lib
+ add find petsc (in progress)
+ add missing file in distrubuteion
+ - correct for compilation with g++-4.9.1 -std=c++11 ( without downlaod)
+ - add hd5 interface (13/01/2015)
+ Thank to Mathieu Cloirec CINES - http://www.cines.fr
+ voir example iohd5-beam-2d.edp iohd5-beam-3d.edp
+ - add find of libgsl in configure script
+ - correct pb of memory leak in case
+ matrix A = ...; in loop ( this occur in lot of case, tanks to P. Jolivet )
+ correct small memory leak in use of routine due to debugstack.
+ - correct bug in periodic condition in case common dof with periodic.
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ - correct big bug in memory gestion of sparse matrix
+ version 3.32
+ - correct of problem of plugin and mpi,
+ build all dynamics lib with and without mpi,
+ the mpi version is install dir lib/mpi
+ - correct of plugin MUMPS.cpp for complex value.
+ - add vectorial operator a/v and v/a where a est scalar and v vector like real[int], ...
+ version 3.31-3 (rev 3053:4e164226411d 12 Aug 2014)
+ - correct the problem of size of arrow in 2d plot
+ version 3.31-2 (rev 3052, 11 july 2014)
+ - correct stop test function in LinearGC (for zuqi.tang at inria.fr)
+ build tar.gz distribution (rev 3050)
+ build version MacOs 3.31-1
+ - correct bug put in DG formulation (rev 3044)
+ jump, mean , was wrong from Sun Jun 29 22:39:20 2014 +0200 rev 3028
+ version 3.31-1 (rev 3042, 10 july 2014)
+ - function to put your stop test in LinearGC and NLGC
+ the prototype is
+ func bool stop(int iter,real[int] u,real[int] g) ;
+ { return g.linfty < 1e-5 || iter > 15;}
+ LinearCG(DJ,u,eps=1.e-15,nbiter=20,precon=matId,verbosity=50,stop=stop);
+
+
+ - add functionnal interface to arpack (Eingen Value)
+
+ func real[int] FA(real[int] & u) { real[int] Au=A^-1*u;return Au;}
+ func real[int] FB(real[int] & u) { real[int] Au=B*u;return Au;}
+ int k=EigenValue(n,FA,FB,sym=true,sigma=sigma,value=ev,vector=eV,tol=1e-10,maxit=0,ncv=0);
+
+ see examples++-eigen/LapEigenValueFunc.edp for a true example
+
+
+version 3.31 (rev 3037, 1 july 2014)
+ - re-add tan function for complex number
+ - correct a big mistake in LinearGMRES , the resulat are complity wrong,
+ correct also the algo.edp
+ - add sqr functon of O. Pironneau
+ - correct update of mercurial depot (rev 3034, 1 july 2014)
+ - correct misstake in examples++-3d/MeshSurface.idp
+ about computation metric in function build surface Sphere mesh
+ and add a function to build Ellipsoide surface mesh
+ func mesh3 Ellipsoide (real RX,real RY, real RZ,real h,int L,int orientation)
+ - correct a bug the DG with periodic boundary condition with only one
+ layer of element.
+ - add pluging "bfstream" to write and read in binary file (long, double, complex<double> and array)
+ see bfstream.edp for an example.
+version 3.30-1 may/2014 ( hg rev: 3017)
+ - add levelset integral on 3d case ( on levelset and under level set)
+ - correct problem with Ipopt / lapack configure ...
+ - add BEC plugin of Bose-Enstein Optimisation
+ - standardisation movemesh3 -> movemesh ( same parameter of 2d version )
+ - correct jump in basic integrale to be compatible with varf definition
+ jump is not zero on boundary, it is - boundary value ..
+ fespace Ph(Th,P0);u= 1;int1d(Th)( jump(u) ) = - length border .
+
+version 3.30. ( for windows hg rev : 3013)
+ - add binary ios:mode constant, to open file in binary mode under window
+ to solve pb of seekg under windows
+ - add multy border april 23 2014 , (hg rev : 3004)
+ syntaxe example:
+ // i is the index of the the multy index
+ // the number of sub border is given by teh size if the array to set the number of seg on the border ..
+ // so for multy border the number of seg of the border , must be in int[int] array
+ real[int] RC=[ 0.1, 0.05, 0.05, 0.1],
+ XC= [0.2,0.8,0.2,0.8],
+ YC= [0.2,0.8,0.8,0.2];
+ int[int] NC=[-10,-11,-12,13];
+
+ border bb(t=0,1;i)
+ {
+ // cout << " i = " << i << endl;
+ int ii = (i+1)%4; real t1 = 1-t;
+ x = xx[i]*t1 + xx[ii]*t;
+ y = yy[i]*t1 + yy[ii]*t;
+ label = 0; ;
+ }
+ border cc(t=0,2*pi;i)
+{
+ x = RC[i]*cos(t)+XC[i];
+ y = RC[i]*sin(t)+YC[i];
+ label = i+1;
+}
+ int[int] nn=[4,4,5,7];
+ plot(bb(nn),cc(NC),wait=1);
+ mesh th= buildmesh(bb(nn)+cc(NC)) ;
+ plot(th,wait=1);
+
+ - add ltime() (rev 2982) function returns the value of time in seconds
+ since 0 hours, 0 minutes, 0 seconds, January 1, 1970, (int)
+ - add new macro tool like in C (rev 2980)
+ FILE,LINE,Stringification() to get line number and edp filename,
+ add quote to a parameter after macro generation …
+ Like in
+ cout << "in " << FILE << " line " << LINE << " -- '"
+ << Stringification( "zzz" aa () {} + /* */ bb cc) << "'" << endl;
+ add new int2d on levelset in 3d (int test)
+ add basic func mesh3 Cube(int nx,int ny,int nz) in cube.idp file.
+version 3.29 (hg rev 2973)
+ - add int storagetotal(); and int storageused(); function
+ to get static of malloc ( memory storage usage)
+
+ - correct problem of region evalution in jump and mean function
+version 3.28 ( merge with freefem++-cs tool)
+ - add download/getall perl script to download all related soft
+ - add int1d on isoline for matrix ...
+
+version 3.27
+ - correct bug in display of P1b finite element in 3d
+ error in SplitMesh<R3> function (Thank to O. Pironneau)
+ - add AddLayers(Th,suppi[],sizeoverlaps,unssd[]);
+ - add tool to trunc to get element numbering for Thn to Tho
+ int[int] In2o(1),Io2n(1);
+ Tho = trunc(Tho, x<0, new2old=In2o, old2new=Io2n);
+ - add restrict function for get dof numbering old to new
+ fespace Vnh(Thn,Pk), Voh(Tho,Pk);
+ int[int] n2o=restrict(Vnh,Voh,n2ok);
+ - correct mistake in gsl interface random number (9/1/14)
+ missing all random distribution ..
+ - add interface with gsl random number generation in test ..
+ - correct pb of compilation under window (mingw32/msys)
+6/1/14 (ALH)
+ - Creating documentation hyperlinks (in emacs orgtime and in Doxygen format)
+ - New script build/orgindex and file index.org list all hyperlinks in the FF source in Emacs org-mode format
+ - Set all hyperlinks to relative paths to make sure that they work from any location
+ - Separate download script for all third-party software [[file:download/getall]] (request from FH)
+ - created common makefile goals in [[file:download/common.mak]] for all downloaded packages (request from FH)
+ - changed [[file:download/arpack/Makefile.am]] to make use of [[file:download/common.mak]]
+ - done for [[file:download/blas/Makefile.am]] as well
+ - added option --enable-mkl-mlt in [[file:configure.ac::enable_mkl_mlt]] to allow FF to be linked with the
+ multithreaded MKL when an external library requires it (request from Atsushi Suzuki)
+version 3.26-3 09/12/2013
+ correct problem with openblas need pthread lib
+01/12/13
+ install dowload lib
+ update lapack interface in examples.
+ add WHERE_LIBRARY-file in install
+ change the order of seach lib with WHERE_LIBRARY-download
+ WHERE_LIBRARY-config WHERE_LIBRARY
+ remove all relative in WHERE_LIBRARY-config
+ correct of superlu compile problem
+13/11/203 Pass to version 3.26 ...
+ - correct pb of ambiguity with new complex lib
+31/10/2013 compilation on MacOS 10.9 with compile of xcode 5.0.1
+ - correct the pipe.cpp to compile with clang-500.2.79
+ - remove of warning message genrate by clang++ -std=c++11 (version clang-500.2.79)
+ - correct also compilation problem
+ - correct error in case of block matrix with block of 0 row or 0 column.
+21/10/2013 (ALH)
+ - umfpack configuration cleanup (request from Fred)
+ - blas configuration cleanup (request from Cico)
+ - configuration option --enable-generic-blas has no effect anymore, removed
+ - Atlas compilation directives have no effect anymore, removed
+ - Moved OpenBLAS compilation from FFCS source tree to FF source tree
+ - Added configure option --disable-system-fftw to skip any default FFTW library installed on the system
+ - Changed location of lapack WHERE-library setup in [[file:configure.ac::WHERE_lapack]] to insure that it is always
+ defined (request from Fred)
+ - changed FFCS Fortran MPI configuration for MPICH2
+ - split DOC makefiles into Makefile.am and figs.mak to suppress automake warnings about portability
+ - moved build/download script from FFCS to FF before reorganizing FF downloads (request from FH)
+10/9/2013 (ALH)
+ - Corrected pastix compilation for FFCS on MacOS 10.6
+ - Removed dependency from lg.ypp to lg.tab.?pp in [[file:src/lglib/Makefile.am::lg.tab.?pp]] to avoid automatically
+ generated conflicts
+05/09/2013 put version .tar.gz on the web
+ - correct makefile wget in pastis and superludist
+ - correct compile of load example : paradiso, gsl automaticaly
+ - add AutoGeneratedFile.tar.gz a file contening all
+ file build by autoreconf in case of non automake tools (1.13)
+ - add missing file in dist or in mercurial distribution
+ - correct download of scotch un curl
+ - correct problem in a*[b,c, ... ]' in case of complex value
+5/9/2013 (ALH)
+ - force Umfpack build to run sequentially (parallel make crashes with "pipe from processes is a directory"?)
+ - pARMS download URL changed to http://www-users.cs.umn.edu/~saad/software/pARMS/pARMS_2.2.php (thanks Fred)
+ - corrected download/mumps parallel compilation (WHERE was not built properly)
+ - Removed all Mercurial-tracked files from .hgignore
+ - added options --with-[package]-include= and --with-[package]-ldflags= to avoid downloading existing packages
+ - Parallelized MUMPS compilation in download/mumps (and mumps-seq)
+ - Applied a patch from Fred for compiling SuiteSparse on Slackware64-14.0
+ - Added configuration option --enable-hypre (disabled by default, contrary to other tools)
+ - Deactivate FFTW download when a local version is found (request from Helmut Jarausch)
+10/7/2013 (version 3.25)
+ - remove of Makefile.in configure for the hg distrubion
+ use : autoreconf -i # too build Makefile.in
+ before to configure
+ need automake version 1.13 ...
+ - merge FFCS (ALH) version and ff++ version (FH) of freefem++ programs
+ - remove all automake file form the hg data base
+
+ - add new parameter to ffglut for demo of freefem++
+ ffglut [-nv|-v|-vv|-vvv] [-wait 0.5] [-g 512x300+10+10] [-t title] [file]
+ all number can be change the wait is in second 0 is default value nowait bewteew plot
+ -g 512x300+10+10 is the geometry of the graphic window
+ -t the title of the windows
+26/6/2013 (ALH)
+ - created a build/ subdirectory for build tools
+ - enabled parallel make ("make -j")
+ - created a separate file (acmpi.m4) for complex MPI configuration options
+ - added configuration option --enable-ffcs to make the FF source compatible with FFCS
+ - backported all current FreeFem++ patches for FreeFem++-cs into the FreeFem++
+ - started main doxygen page mainpage.dox
+9/06/2013
+ - correct extract function of mesh Lo Sala <salalo80 at gmail.com>
+ - correct int2d on levelset see example intlevelset.edp
+ - correct automake TESTING part (in progress)
+ - correct typo on the doc with .*= ./= operator
+ - correct bug in RT0 3d , code in the construction of the DOF.
+ the bug is all dof on border face of same elemnt have same dof number.
+ thank to Laurent Bernard <laurent.bernard at lgep.supelec.fr>
+version 3.23
+ - do cleanning in version remove x11, glx, std : freefem++
+ clean compile option for clang and clang++ compiler
+
+ - add flags to remove internal boundary in 2d,3d in function change
+ rmInternalEdges=1
+ - correct glumesh in case of no mesh in 2d
+version 3.22
+ - add multi windows graphics ; WindowIndex=0 in plot function
+ add new event in graphic windows
+ * to set/unset default graphics stat to previoux plot
+ - add getenv, setenv , unsetenv function in shell plugins for gestion of environnemnt variable for
+ openmp.
+ - correct pb un trunc for 3d mesh with too flat element (sliver) , and cleanning code .
+ - correct bug in gestion off outsite flag is 3d in case of bute force (searchMethod>0)
+version 3.21-1
+ - correct bug a=b' ; of full matrix
+ - bug in assert on 3d mesh of huge dimension with periodic condition.
+ - correct build Delaunay 3d mesh of set of point.
+ see examples++-load/convexehull3d.edp
+version 3.21 frev 2013
+ - n, resize in array of finite element function ...
+ see edp array.edp file
+ - correct pb of compilation of Ipopt with clang++ -std=c++11
+ - correct une NSCahouetChabart.epd examples , and correct un doc.
+ this is a complete rewritting. FH. 12/02/2013.
+ - correct in change function the "flabel=" parameter in 2d and 3d
+version 3.20-3
+ - add master= in solver of MUMPS interface to set the master mpirank
+ <0 => distributed matrix.
+ - correct problem in label generation in freeyams (18/01/2013)
+ all label border was set on 1 before.
+version 3.20-2
+ - add MUMPS parallel version (in test)
+ - add paradiso seq solver ..
+version 3.20
+ - correct isoline plug in case of sadlle point
+ - change the compilation tools under windows gcc 4/7 + freeglut / ...)
+ - change the compile tools on mac pass to clang++
+ - compile ok of c++11 compiler
+ - add formal tools on array [] or matrix [[],[],] for elasitic problem.
+ let A a formal array
+ if A is matrix 2x2 or 3x3 : trace(A) , det(A) , Cofactor(A) ;
+ A:A = sum_ij A_ij * A_ij
+ 2*A, A*2 // muliplication by a scalar
+
+ -add integration on levelset line (in test)
+
+version 3.19-2
+ - correct pb of C in/output in pluging (in test)
+ - correct bugs mshmet pluging in case of double eigen value in eigen
+ - correct typo poblem (string size) when a change the default
+ window size in postscrip in version 3.19-1 to have more
+ precise postscript plot
+version 3.19-1
+ - add tool to create Quadrature formlar 1d,2d,3d with
+ plugind: load "qf11to25"
+ real[int,int] tab1(np,2),tab2(np,3),tab3(np,4);
+ QF1 qfe1(norder,tab1);// 1d
+ QF2 qfe1(norder,tab2);// 2D
+ QF3 qfe1(norder,tab3);// 3D
+ where tab(0,i) = weigth , tab(j,i) = j coord, norder order of the
+ quadrature
+ see examples++-load/LaplaceP4.edp for example
+ - correct download auto compile of
+ mmg3d, mshmet, scotch, ...
+version 3.19 (20 april 2012)
+ - scotch partionner interface see scotch.edp in examples++-load
+ - add isNaN(x), isInf(x), IsNormal(x) function to check floating point
+ of real value x, see ISO C99.
+ - add function : NaN() and NaN("") to build NaN real number (double in C) .
+ - correct error in macro with operator ./= and .*=
+ - add Ipopt doc (thanks to Sylvain Auliac)
+ - add Ipopt interface (thanks to Sylvain Auliac)
+ - correct 3d trunc bug in case of internal boundary
+ thank to Yoshihiro Tomita <tomita.yoshihiro at gmail.com>.
+ - add new type of array , array of array
+ see taboftab:edp in examples++-tuturial
+ real[int] a;
+ real[int,int][int] m(10);
+ real[int][int] v(10);
+ not well tested.
+version 3.18-2
+ - add plugins with sequentiel mumps without mpi
+ - add conversion of re and im part of complex sparse matrix
+ A = C.im;
+ A = C.re;
+version 3.18-1
+ - correct Typo error in example
+ - add generation of error in case of periodic boundary condition
+ non scalar problem.
+ - add tools for adaptation of P2 and P3 finite elements with metrics
+ see APk-AdaptEpsDeltaPk.edp APk-FreeFemQA.edp APk-MetricPk.edp
+ APk-ExplicitPkTest.edp APk-LaplaceDirac.edp
+
+ - New example in in Chapter 3 Navier Stokes Newton NSNewton.edp
+ - add cod to build matrix and vector form varf in 3d in case of
+ different meshes (in test )
+ - correct NSprojection.edp chap3 example (PB in out flow BC.)
+ - correct compile of mmg3d v4 plugins (small change un distrib archive)
+v 3.18 (11/01/2012)
+ - rewrite the isoline-P1 plugins (new name isoline.{dll,so,dylib} )
+ see example Leman-mesh.edp and isoline.edp in
+ examples++-load directory
+ - correct bug in cas of resize of array with 2 index (full matrix)
+ - correct assert in MPI in gather and scatter
+ - correct bug in case of return in loop for or while.
+ - correct a=int2d(Th,l)(1) in case simple expression when l is a array.
+ - build a pkg under macos for distribution .
+v 3.17 (17/11/2011)
+ - correct PB of pugins: MUMPS, parmetis, metis, mmg34, mshmet
+ - the new load interface (for more safe IO)
+ - build mpi for windows with msmpi ( begin)
+ memory error after end ..
+ - remove add by default $LIB_MPI in ff-c++
+ - change the way add thing in freefem++ in case of dynamics load
+ to be compatible plugin with freefem++cs ( solve pb with
+ cin,cout, cerr in dll may be..).
+ LOADINIT(Init); // where init is a class
+or do
+ addingInitFunct FFinit(100,ffinit,"MUMPS_FreeFem"); // where ffinit the init function ...
+v 3.16-1
+ - cmaes interface in scalar and MPI case (thank to S. Auliac)
+ see doc and examples : cmaes-mpi-VarIneq.edp , cmaes--VarIneq.edp
+ - add NLopt interface (thank to S. Auliac)
+v 3.16
+ technical stuff:
+ - correct auto load of mumps
+ - add tool to do automatic load or static load (for testing)
+ see MUMPS_*cpp example
+v 3.15
+ - correct all examples++ load and 3d rebuilde the all.edp
+ and test this examples.
+ - correct version old bug when full matrix (arry)
+ A=A;' is now correct (set and initialization )
+ and add A+=A'; A-=A';
+
+ - reput metis 4.0 form netlib ... (pb of compatibilite with other // soft hips)
+v 3.14-1
+ - change interface with metis 5.0.1
+ - Complete writing of mmg3d interface with version 4 of mmg3d
+ le plugin is "mmg3d-v4.0", the parametre are the same have
+ command line mmg3d , execpt the file name are not given.
+ - remove old bug 3D in interpolation P1 operator
+ correct bug 29/08/2011 (thanks to rychet at fzu.cz)
+ remove wrong bulid of KHat (memory out of bound)
+
+v 3.14
+ - correct in configure remove the default -O2 -g autoconf value
+ and add -g in case of --enable-debug
+ - a very old error in the on() functionnal
+ the bug is with a vectorial finite element like RT0, ..
+ the name of vectorial must be in lexicographic order
+ so u1,u2 is ok but v,u is wrong
+ is correct in version 3.14 the 24/08/2011
+
+ - correct trap in check convect-apt.edp example
+ - add the existance of patch in configure
+v 3.13-3 ( 30 june 2011 Seville)
+ - correct the Hips interface (not to bad , in test)
+ load "hips_FreeFem"
+ int[int] iparm(1);real[int] dparm(1);
+ HipsDefaults(iparm,dparm);) // set def option
+ ( limit to 100 Hips active linear system ).
+ - add interface with MUMPS_4.10.0 version (with automatic download )
+ - add P1dc3d finite element in pluging "Element_P1dc1"
+ - correct bug in gibbs renumbering in 1 case veru sample mesh)
+ - correct bug in interpolation operator with periodic BC
+ mesh Th1=square(2,1), Th2=square(2,2);
+ fespace Vh2(Th2, P1),Ph2(Th&,P1,periodic=[[1,x],[3,x]]);// une couche
+ matrix Jh=interpolate(Vh2,Ph2,op=0,inside=0);
+ Ph2 w=1.;Vh2 wi; wi[]= Jh*w; // wi must be 1, now this ok.
+v 3.13-1
+ - correct compilation problem on fedora 13 WITH MPI
+v 3.13 (25 may 2011)
+ - update the finite element list in documention
+ - add (load "Element-Mixte") NEW FINITE ELEMENT 2D
+ TDNSS1 sym matrix 2x2 conforme in $\{H(div div) / div(div s)) \in H^{-1} \}$
+ RT1 and BDM1 conforme in H(div) Raviert Thomas of Degre 1 and Bezzi, Douglas, Marini
+ RT1 and BDM1ortho conforme in H(curl) 2 Nedelec Finite Elemeny
+v 3.12-3
+ - new finite element in 2d for elasticity in test. TD-NSS0 (see these of Astrid Sabine Sinwel)
+ A New Family of Mixed Finite Elements for Elasticity
+
+ - add matrice matric multy in lapck interface
+ - add tool to change the region and label number
+ change(Th,fregion= integer function to set the region number )
+ - nuTriangle now given the tet number in 3D.
+ - add mpireduce of matrix to build parallele matrix
+v 3.12-1 april/2011
+ see remove examples++-mpi/chaleur3D-superludist.edp
+ - correct the precond of gmres algo in A^-1 : (29 mars 2011) to build a correct Navier-Stokes
+ - add cast TypeOfSolver on int to parametrize the choise of linear solver.
+ - correct intersection of given metrix in adaptmesh (bug introduc in 07/10 verion 3.9
+ in case of convect-apt example
+v 3.12-1 10 10 fevr 2011
+ - add VTK write for paraview, examples++-load/VTK_writer.cpp examples++-load/VTK_writer_3d.cpp (see source for moe details)
+ - put comment in the documentation about negative tgv
+ - correct pb blacs mkl (unde with mumps)
+ - correct mpiReduce for complex and real data.
+ - add mpiAllReduce(umax,dmaxg,comm,mpiMAX); where for real umax,dmaxg;
+ - add tag verson 3.12-win32
+ - add inferface for mpi in win32 architecture (form 32 version)
+v 3.12 17 jan 2011
+ - correct probleme of comm world on SuperLuDist (complex version)
+ - correct medit Makefile.am in case of no compilation of medit ..
+ - correct a lot of MPI parallel solver example
+ a bug pastix interface ???
+ MUMPS, superludist, hypre , hips works
+ - correct link proble in hips and hypre under linux
+ - Add thresholdings.cpp thresholdings.edp in examples++-load to remove to small coef
+ in a matrix .
+ - Add lots of DDM Schwarz GMRES precondionned with a coarse grid solver por overlapping :
+ DDM-Schwarz-Lame-2d.edp DDM-Schwarz-Lap-2dd.edp DDM-Schwarz-Stokes-2d.edp
+ DDM-funcs-v2.idp DDM-Schwarz-Lame-3d.edp DDM-Schwarz-Lap-3d.edp
+ DDM-Schwarz-macro.idp
+ I will add the explanation in the doc in the future;
+
+
+ - Add a true exemple to buld mesh form a image (lg.pgm) , Leman-mesh.edp
+ - Add New syntaxe in macro generation
+ NewMacro a(i)
+ EndMacro
+ with // comment and macro definition, first trik
+ - Add interface with special function og gls http://www.gnu.org/software/gsl/
+ the full list is in the example examples++-loal/gsl.edp
+
+v 3.11-1 25 dec 2010
+ - Add coarse preconditioner in MPIGMRES[23]d.edp (to be optimal)
+ now the number of iteration is close to 10.
+ - Show ff++ line number in case of assertion in RNM class.
+ - add Coarse Preconditionner for MPIGMRES[23]d.edp (Good)
+ - solve bug For MPIGMRES2D.edp due to interpolation bug in rare case
+ by Add brute force for seach of point in 2d like in 3d in the seach in find ouside
+ set global variable : searchMethod=1; // more safe seach algo (can be expensive in case of lot of ouside point)
+ - add hack of ILU precond, if tgv is < 0 then
+ we remove all the line and put 1 on the diag term ..
+v 3.11 9 dec 2010
+ - update the documentation of 3d adaption process
+ and / correct freeyams,mshmet, mmg3d interface and associaded example
+ - configure is compatible with MKL lib (on gnome)
+ - add quoting argument in macro argument with { } for mpi plot ..
+v 3.10-2
+ - try to compile with MKL libs.
+ - correct MPIGMRES[23]d.edp example
+ add doc on this example.
+v 3.10-2
+ - add operator to inverse permuation to set or initial int[int] array
+ I=J^-1;
+ if J is a permuation of 0:n-1 then we have : I[j[i]]=i
+ - correct comment problem of periodic bounary condition in 3D
+ see examples++-3d/periodic-3d.edp
+ - correct configure to scotch compilation on gnone (phtread)
+v 3.10-1
+ - at convection function form formal array to int,real,complex array
+ (resp. toZarray, toRarray, toCarray)
+ - correct ffrandom.cpp to read /dev/random to get a true random seed
+ srandomdev
+ - add ff-mpirun script to simplify the launch of FreeFem++-mpi version
+ - correct MPI for MPI icc on gnome
+ - correct pb of computation of area, lenbord in mesh type in some case .
+ - correct WHERE_LIBRARY-config for blas find in configure
+ - correct atof
+v 3.10
+ - add true Domain Decomposition example in 2d and 3d.
+ see MPIGMRES2D.edp MPIGMRES3D.edp in MPI examples
+ - add mpi Isend/Irevd for complex struct like matix, meshes
+ for send/recv Huge objet
+ - add named parameter verbosity= in add GMRES and GC function
+ for show algo evolution .
+ - add MPIGC dynamic LIB for // GC and GMRES , add fully // scharwz RAS
+ in MPIGMRES2d.edp
+ - correct problem of a=A^-1*b when a, or b is not consecutive array
+ ie. expression like M(2,:)
+ - correct problem of Makefile in download clean,install,WHERE target
+v 3.10 ( 5 oct 2010)
+ - add install of missing MPI dynamics lib.
+ add argument "-cd" to FreeFem++ command to change current directory to edp script directory
+ - clean configure.ac
+ - do correction for g++-4.6 compiler (lambda expressions , and trap ..)
+ - add MPICG for Parallel Conjugate Gradient for full split matrix
+ see MPICG
+ - correct Makefiles in download ( add WHERE interface)
+ - remove wait option in medit because the code is wrong , always waiting now
+ - correct bug renumbering of matrix : B= A(I,J),
+ the last term N,M was force to zero =+ -> += (line 1885 of file lgmat.cpp)
+ where N= I.max, M=J.max
+v 3.9-3
+ - correct compilation of gmm, mumps on linux
+ - add parameter -ne in FreeFem++ commands to remove edp script print
+ - correct mistake in --enable-m64 or --enable-m32 (suppress the confugure warning)
+ - correct of ff-c++ script if whith space in path (for windows)
+ - add compilation of gmm library
+v 3.9-2
+ - correct compilation of mshmet dynamic library
+ - correct pb of compile of superludist ( add CNOFLAGS no optimze CFLAGS)
+ - correction of lib on win32 for freeyams and mmg3d
+ - correction download/Makefile.am to be sure than bin is a directory.
+ - add fftw of win32
+
+v 3.9-1
+ - correction mmg3d interface (J Morice)
+ - correct of mmg3d and freeyams under wind32 (ld problom)
+v 3.9-1 August 2009 (For FreeFem++ days )
+ - correct configure (find lapack lib change $ll_lapack_libs in $ll_lapack_lib)
+ - correct mistake in mpi
+ add: gatherv, allgatherv, scatterv, alltoallv
+ and complex data type in: allgather, gather, scatter, alltoall, ..
+ correction bug : gather, scatter
+ correct essai.edp mpi example
+ - correct problem of compatibility of dynamic lib with and without MPI
+ change ff-cc++ to add all MPI libs if MPI version exist.
+ - correct default region number in square build mesh function now 0 , (2 beetween v3.8 -- 3.9)
+ - change in all example reffacexx= in labelxx= ..., etc to be correct with v 3.8 change.
+ - correct a mistake of type region= parameter in tetgen all functions.
+ - correct the mpi configure seach tool
+ miss when no full path are given ( only change in configure.ac)
+v 3.9 July 2009.
+ - add lots of automatic compilation of download soffware,
+
+ tetgen superlu fftw metis yams mshmet
+ blacs parmetis scalapack scotch superludist MUMPS pastix hypre hips
+
+ For the link with mmg3d software put the tar.gz archive in .../dowload/pgk directory.
+ add interface with freeyams, mmg3d, mshmet (3d mesh adatation) software,
+ add automatique compilation of // solver with
+ flags -auto in ff-c++ commands
+
+
+v 3.8-2
+ - add cast operator from SubString to String
+ - correct the SubString tools
+v 3.8
+ - add in change mesh2 tool to make a renumbering of vertex for periodic 3d mesh.
+ Th= change(Th,renumv=old2new);
+ - correct ' operator do alway in complex case the conj and trans (Hermissian stuff)
+ in formal array with [ ]'
+ in linear comb of complex matrix
+ now A + (-1)*A' is zero is A is hermisian .
+ in varf term (a*dx(u)*dy(v) )' <=> a' dx(u)*dy(v)
+ now you can [a*dx(v),dy(v)] ' *[a*dx(u),dy(u)] in complex case..
+ - plot of complex field and 3d vector ..
+ - upgrade the documentation in 3d mesh example
+ - change configure.ac for mpifc, mpif77, mpicc, ...
+ - correct include seach path
+ - uniformize named parameter in change, movemesh, in load "msh" , glumesh, ...
+ add synonyme:
+ refface= -> label=
+ reftet= -> region=
+ in buildlayer:
+ labebup=
+ labebdown=
+ labelmib=
+ - writing schwarz-nm-3d.edp examples
+ - add array of 3d mesh
+ - add word volume to get the volume of the current tet element
+ - correct metis.cpp in 3d case
+ - correct in fflapack.cpp (example++-load, computation of eigenvalue of complex matrix)
+ -llapack search in configure.ac
+ and unify fflapack.cpp lapack.cpp are the same file.
+ - add seekp, tellp method on ostream type
+ seekg, teeg method on istream type
+ see examples++-tutorial/readmesh.edp examples
+v 3.7-1 13 jan 2010..
+ - EqPoisson.edp (SOlve Poison equation in 3d fish)
+ - add possibility to put array (int[int] ) to set a set of label/region in
+ in integral (int1d,int2d,int3d) or "on" key word
+ example : int[int] l=[1,2,3] , ... on(l,u=1);
+ - add tool to compile under mingw/msys under windows 32 (freefem++-nw works,
+ - add bug (random trap) in bamg in sub domain computation in case of
+ internal edge in same region (fist time in 15 years).
+ - add bug in varf interpertation in complex case (miss some convertion)
+ - add build interpolation matrix in 3d (see examples++-3d/mat_interpole.edp)
+ - correct CFLAGS (add -fFIP) in superlu , umfpack under 64 architecture.
+v 3.7 8 december 2009
+ add 3d beam examples examples++-3d/beam.edp
+ correct install problem due to metis directory
+ add dynamic load interface with newuoa fortran optimizer without derivative
+ see ffnewuoa.edp example ins examples++-load
+ correct problem of free of mesh in case of gluing meshes
+ Th= Tha+Thb; // now just the ref counter on Th is decrease
+ // and before Th is delete
+ add .im, .real method on complex [int,int] matrix array
+ add missing matrix<complex>[int] type in grammar.
+
+ correct mistake in genertion of file WHERE_LIBRARY-config
+ add initialization of scalar variable at zero
+ add warning in case of use of variable with hide freefem++ name
+ add missing file in download version
+
+v 3.6.1
+ correct font problem in documetation
+ lot of mistake in examples++-load
+ add tool to compile all examples
+ add PICHON stuff for brute force seach point
+ add umpack long interface to by pass the 32bit limits
+ see UMFPACK64.cpp and LapUmfpack64.edp in examples++-load.
+ add some interface with lapack (inverse of full matrix,
+ eigenvalue of full matrix)
+ correct ::Draw undef ref. ubuntu 10. (gcc 4.4)
+ correct typo error image tools
+ see UMPACK64 (code and example in examples++-load)
+v 3.6 (4 nov 2009)
+ change the version of tetgen to 1.4.3 download
+ correct in ffglut max value of arrow
+ add examples of function with stack parameter in
+ examples++-load/funcTemplate.cpp load facility
+ and
+ examples++-load/funcTemplate.edp
+ add tools to read .pcm files for optic-flow computation (pcm2rnm.cpp)
+ see http://www.cs.otago.ac.nz/research/vision/Research/OpticalFlow/pcm.html
+ correct bug in GMRES without preconditionner asset error.
+ correct a rare and ramdomly bug in the interpolation 2d process when the
+ the element 0 touch the boundary
+ correct on versy old bug in bamg in case of internal boundary edge with
+ two extremity in true boundary (symptome FillHoleInMesh trap).
+ correct operator subsript a:b:c operator (in some case the last value was miss)
+ correct the ?: operator in case of constant array
+ - add -enable-m32 floag to build 32bits freefem++ on 64 architecture computer
+ - correct eigenvalue.cpp in case of complex finite element
+v 3.5-2 (28 sept. 2009)
+ - correct install problem under windows (metis.dll do not compile)
+ - correct MacOS install missing /usr/local/lib/ff++/3.xx-yy link
+v 3.5-1 (24 sept. 2009) not to bad ...
+
+ - add interface to mestis
+ - correct display of 3d mesh (with light doday)
+ - add trap in case of mesh with negative volume
+ - correct bug in case 3d finite element with constant number of df / node
+ example fespace Vh(Th2,[P1,P1]); or fespace Wh(Th3,[P0,P0,P0 ])
+
+ - correct problem with tetgen under windows and ubuntu
+ (remove optimisation during compilation of the library)
+
+ - correct setting array of vectorial finite element Wh
+ Wh[int] [u,v](10); // array of 10 value
+ u[1] or v[1] 2 componante function for indice 1.
+ [u[2],v[2]] = [1,2]; // set the function for indice 2.
+ - correct in matrix size of matrix B=A(I,J) to I.n x I.m
+ where I, J are array of int
+
+ - add resize of complex sparse matrix
+ - Add inferface with metis in examples++-load (metis.cpp, metis.edp)
+v 3.5 (27 aug. 2009)
+ Complet writing to MPI interface, tested with Open MPI 1.2.3 and mpich 2.1
+ see chapter 10, page 229, of the freefem++doc.pdf and
+ see example++-mpi/essai.edp.
+
+ correct
+ operator a(:)= 1:4; // before change a copy of a and so do nothing
+ string[string] s;
+ s[i]; // before trap (two delete)
+v 3.4-2
+ add boundary mesh inqure in 2d and 3d
+ Th.nbe ; // return the number of boundary element
+ Th.be(k); // return the boundary element k $\in \{0,...,Th.nbe-1\}$
+ Th.be(k)[l]; // return the vertices l $\in \{0,1\}$ of boundary elmt k
+ Th.be(k).Element ; // return the triangle contening the boundary elmt k
+ Th.be(k).whoinElement ; // return the edge/face number of element contening the boundary elmt k
+ Th[k].adj(e) ; // return adjacent element to k by edge/face e, and change
+ // the value of e to the corresponding edge in the adjacent element
+ Th[k] == Th[k].adj(e) // non adjacent element
+ Th[k] != Th[k].adj(e) // true adjacent element
+
+ do small change in msh3.cpp file
+
+v 3.4-1
+ rewrite of the mpi interface in vue of use group and comunicator
+ now we only use mpi.h and not mpi++.h
+ add plot of array of mesh and array of finite element functions
+ add new command in ffglut graphic interface
+ n,N,i,I to change the number of isovalue and to set the min,max value to the
+ graphic
+ add left button motion to zoom , and + alt to translate
+V 3.4
+ add in parallel version mpi send, receive and broadcasr of 3d mesh and matrix ( sparse matrix).
+ build a 3d mpi schwarz example (see example++-mpi/schwarz-3.edp)
+ make a wrapper (launchff++.exe) to launch freefem++ under windows/OS in the edp file directory.
+ correct in interpolation matrix ( unset variable in case of same mesh
+ => missing some term in the matrix)
+
+V 3.3-3
+ add missing file in distribution examples++-load/DxWriter.cpp
+V 3.3-2 8 june 2009
+ add 2 new finite element:
+ Edge03d : the Nedelec 3d Edge finite elements.
+ RT03d : the Raviart-Thomas 3d finite elements
+ correct the size of anytype for 64 bits architecture.
+ install the new .idp file (include of edp file) in
+ directory idp
+V 3.3-1 1 june 2009
+ to correct the problem of the destruction of parameter in case:
+ func real[int] a2(real[int] a) {a[0]=2; return a;}
+ so now the parameter cast to KN_<double> so the array is not
+ duplicate like in C++, and the value of the parameter is change.
+
+ - simplify the internal (C++) definition of array now of 2 type
+ KN<> * of variable (left expression)
+ and KN_<> of right expression
+ - correct UnRef<A,B> where B ~ A*
+v 3.3 29 may 2009
+ - correct some problem in return in function :
+ the following function prototype now work without memory fault.
+
+ func real[int] a1(int n) {real[int] a(n);return a;}
+ func real[int] a2(real[int] &a) { return a;}
+ real[int] G=[7,8,9];
+ func real[int] a3(real[int] &a) { return G;}
+ func mesh carre(int n) { mesh th=square(n,n); return th;}
+ (lot of change, warning: now KN<K> is not a freefem++ internal type).
+ warning :
+ - in int3d flag qfV= a 3d quadrature formula
+ the 3d quadrature formula are
+ qfV1 , qfV1lump, qfV2 , qfV5 (where the number is the ordre of the quadrature)
+ - correct sign of the normal in 3d (now the normal is exterior)
+ -------------------------------------------------------------
+ - correct in adapted mesh the flag splitin2= (no tested)
+ - correct the convect operator in 3d
+ - add EigenValue tool for 3d case May 15, 2009.
+v 3.2
+ - add tools to set array like in matlab/scilab
+ real[int] a(1:2:10), def a to 1,3,.. 10.
+ int[int] I(0:n-1) , set array of size n to 0, .., n-1
+ real[int] b(0.1:0.5:9.99) , set 0.1, 0.6, 1.1,..., 9.6
+ add : b.n == (9.99-0.1)/0.5 +1
+ - sort(a,p); // sort a is and array and p in parallel
+ where is a integer array same size of a.
+
+ - add interface with MUMPS parallel solver (in progress)
+ http://graal.ens-lyon.fr/MUMPS/
+
+ - rename movemesh2D3Dsurf in movemesh23 and change named
+ parameter normal= in orientation=
+
+ - add periodic boundary in condition like in 2d
+ example for a cube with label face numbering
+ 1 : ( x == xmin) 2 : ( x == xmax)
+ 3 : ( y == ymin) 4 : ( y == ymax)
+ 5 : ( z == zmin) 6 : ( z == zmax)
+ fespace Vh(Th,P2,periodic=[[1,y,z],[2,y,z],[3,x,z],[4,x,z],[5,x,y],[6,x,y]]);
+
+ - automatic: Finite element name conversion beetween 2d and 3d
+ old : fespace(Th3,P13d);
+ new : fespace(Th3,P1);
+ - add complete rewrite of the way to set parameter of the sparse solver
+ for parallel solver ( no progress)
+ - add --enable-m64 for 64 bit compilation flags
+ - correct f2c of take the -m64 flags
+ - build the universal f2c library with 4 architecture ppc i386 ppc64 x86_64
+v 3.1-1
+ - add resize of sparse matrix ( only morse matrix)
+ - add new 3d finite element P1b3d (P1 bulle 3d)
+ - add new option in int1d function in case for build matrix with different meshes
+ mortar=1 ( do not remove integration point if the point is outside of the domain)
+ to make no to bad integration on same curve with different meshes.
+v 3.1
+ -correct compile order missing libMesh
+ - add lighting in ffglut (key l) for 3d isovalue
+v 3.0-6
+ - correct int2d in 3d. bug in Face -> tet mapping (PBord method) March 5 2009
+ change the postscript plot dimension to be in A4 paper.
+ nuTriangle given the tet number in 3d case (5 march 2009)
+ area given the area of the triangle on 3d border integral.
+ - add tool to required edge in adaptmesh with label of edges.
+ - correct dy(uh) (always 0) for P13d finite element (27 jan 2009)
+ op==op_dy => op==op_dy line 97 P012_3D.cpp
+v 3.0-5 (20 jan 2009)
+ - correct array 3D FE function + missing function in 3D (not finish)
+ - correct the install on under windows / cygwin
+ add src/Graphics/ff-win32.cpp missing file in tar.gz under windows
+ correct ff-c++ under cygwin compile (fist test)
+ - automatic compilation of BLAS, suppress the automatic compilation of BLAS atlas (to long)
+ - ffglut improvement
+ - now save 10 graphic states and use "p" key to show previous graphic
+ - do automatic z rescale on Z direction the 3d plot
+v 3.0-4 (05 jan 2009)
+ - correct int2d in 3d case: all this integral was multiply by 2.
+ - add 3d viewing in plot (in test)
+v 3.0-3 (27 dec 2008)
+ - build a not to bad version
+ - remove so crazy print
+ - change the ffglut io with freefem++ ( to be more universal independant of the architecture an more universal)
+ - correct ffglut in case of plot of array and when the plot is empty.
+ remark ffglut is not compatible with previous version (sorry)
+ the filename create with option w is ffglut_xxxx.ppm (window dump)
+ correct int2d on 3d mesh3d for Neuman Boundary condition
+v 3.0-2 ( 9 dec 2008)
+ - ff-c++ to dynamic load program (add ff++.hpp file with all include, may be)
+ - correct the Makefiles et load-link,
+ - correct ffmedit (binary read /win32)
+ - cosmetic change in ffglut + stabilization
+v 3.0-1 (4 dec 2008)
+ - complete change of the graphic (freefem++ is now the old freefem++-nw )
+ - add medit (a visualisator software by P. Frey) inside freefem++
+ with a name ffmedit
+ - suppress the ide version
+ see page: http://www.ann.jussieu.fr/~lehyaric/ffcs
+ - We put a client-server architecture
+ (freefem++,freefem++-nw) <-> ffglut
+ - freefem++-nw and freefem++ is now the same file
+ - ffglut is the visualisator in glut library (run on linux, mac, win32)
+ how to use now:
+ freefem++ file.dp # by default load ffglut (so ffglut must be in the PATH).
+ freefem++ -glut ffglut-path file.edp # change ffglut command
+ freefem++ -fglut saveglutfile file.edp # save data plot
+ ffglut saveglutfile # plot a data file
+ freefem++ -nw file.edp # freefem++ with graphics
+ ffmedit # used medit in freefem
+
+
+ - now glumesh2D dynamics tool is in freefem++
+ add operator + beetween meshes with glu
+ examples++-tutorial/glumesh.edp
+
+ - add 3 meshing tools in msh3.{so,dll,dylib}
+ operator + between mesh3
+ add freefem++ function:
+ movemesh2D3Dsurf movemesh3D buildlayers
+ see:
+ examples++-load/buildlayermesh.edp
+ examples++-load/glumesh3D.edp
+ examples++-load/refinesphere.edp
+ examples++-load/tetgenholeregion.edp
+
+
+ - add interface with tetgen 3d mesher (tetgen.{so,dll,dylib})
+ add freefem++ function:
+ tetgconvexhull tetgtransfo tetg tetgreconstruction
+ see:
+ examples++-load/buildlayermesh.edp
+ examples++-load/refinesphere.edp
+ examples++-load/tetgencube.edp
+ examples++-load/tetgenholeregion.edp
+
+ - add interface with medit (medit is now in freefem++ this call
+ ffmedit in medit.{so,dll,dylib}
+ add freefem++ function medit savesol (2d , 3d medit plot)
+
+ - correct ?: operator with array and real.
+ - correct memory erreur with valgrind tool (19 oct 2008)
+ In ~ConstructDataFElement() change counter after free
+ nosym eigen call to neupp missing +1 in size of array
+ - correct gestion of the counter of ConstructDataFElement class (09/2008)
+ in Valladolid spain.
+ - add 3D FINITE ELEMENT P0,P1,P2
+ mesh3 Th("toto.mesh")
+ int3d(Th) , int2d(Th)
+ see examples++-3d/first.edp example
+
+v 2.25
+ - add tool to change lab in mesh see glumesh.edp examples++-load
+v 2.24-4
+ - add missing code in case of DG (jump or average) of test function in
+ linear form
+ - add tools to glu meshes (not well test) see glumesh.edp in load examples.
+ - change definition pour interpolation point for P1dc and P2dc (P-G)*c+G
+ now all interpolation point are fully inside the triangle
+v 2.24-3
+ - add option resid= in eigenvalue function (see arpack doc)
+ - add formal operator ./ .* between two [ a , b , c ] array
+v 2.24-2
+ - correct convect explain in documentation.
+ - correct configure.ac build FLIBS and add check of FLIBS, X11_LIBS value
+ - correct buildmesh trap when degenerate border is create by error.
+v 2.24-1
+ - correct periodic condition in case of one edge
+ - correct doc file
+v 2.24
+ - bug with border and func
+ this kind of code now works
+ func abc= a(6) + b(4) + c(4) ;
+ func def = d(4) + e(4) + f(6);
+ func bbb= abc + def;
+ plot(bbb); mesh Th=buildmesh(bbb);
+ whare : a,c,b,c,d,e,d are border.
+
+ - correct bug in periodic Boundary Condition( find by Alexandre Masserey <masserey at ycoorsystems.com>)
+ mistake in abscisse choose.
+ sometime assert fail (loop).
+ add option to the buildmesh that the boundary is fixe (fixeborder=true)
+ see : examples++-tutorial/periodic4bis.edp
+ - and R1.hpp, R2.hpp, R3.hpp files for the 3d version.
+v 2.23-2
+ - correct trap in adapdmesh (in mortar-DN-4.edp) in very rare case
+ du to intialized adj of edges on geometry (very old bug)
+ in case of multi points.
+ with vebosity=10; you get this message:
+ -- Begin of insertion process
+ bug 2
+ Bug double points in
+....
+ Fatal error in the meshgenerator 5
+....
+
+v 2.23-1
+ - correct assert fail in check in case of no UMFPACK
+v 2.23
+ - add new edge finite element (P1 to P5)
+ in examples++-load/Element_PkEdge.cpp examples++-load/testFE-PkEdge.edp
+ - preconditionned mortar example Neuman -> Dirichet in scalar and parallele
+ see examples++-mpi/mortar-DN-4-mpi.edp examples++-tutorial/mortar-DN-4.edp
+ - add vectorial operator d= a ? b : c where d,a is a array, and b,c can be array or scalar
+ usefull for boundary condition
+ - correct probleme in mpi recive message
+ - correct load dynamic on MacOs (bug in fortran find library) in configure.ac
+v 2.22-2
+ - small change in configure.ac of find libumfpack on debain systeme
+ - correct checking code in probleme to same the mesh must be unique in problem of solve definition.
+v 2.22-1
+ - make change in Makefile to build universal binary on MacOS
+ - change the README file for compilation on ubuntu Linux.
+v 2.22 (december, 18, 2007)
+ - correct problem of string argument in function
+ - correct all elasticity problem (missing sqrt(2) )
+ - correct save of log file under Windows XP, ..
+v 2.21 (november, 18, 2007)
+ - correct documentation for new edition
+ - correct configure for no X11 and UMFPACK in sparsesuite
+v 2.20-1 (october, 24, 2007)
+ - correct compilation problem without umfpack
+ - add formal operator for vectorial operator in variationnal form
+ +, - on [ ] array
+ trace operator matrix like [ [ ... ], .., [... ] ]
+ take element of an array [ ...][2]
+v 2.20 (october, 2, 2007)
+ - add in download automatic generation of f2c and fort77 to get a free fortran compiler
+ just go in
+ (download/f2d;make install)
+ - add automatic find of libf2c in case of F77=fort77 (driver of f2c) in configure
+ - add tools to change the sparse linear solver with load dynamic, see doc and SuperLu example
+ in examles++-load
+v 2.19 (august, 19 2007)
+ - correct buildmesh from geometry file and add nbvx= named parameter
+ to infore the maximal number of verter in a mesh.
+ - add Th[k].area to get the area of the k-th triangle of Th.
+ - add Th[k].region to get the region number (label) of the k-th triangle of Th.
+ - correct string delete in plot of border (mesh.edp)
+ - correct mean and jump in interpolation operator.
+v 2.18-1 (august, 2007)
+ - correct old bug under Windows: the std input stream now works (cin)
+v 2.18 (july, 19, 2007)
+ - add sort of real array or int array, syntaxe:
+ a.sort, and we have : a[i-1] <= a[i] for i =0 to a.n-1
+ - add v=a.quantile(p) ; statisticial function and commute v such than
+ #{ i / a[i] < v } = r*a.n <=> v = a[r*n] when the array is sorted.
+ - correct P4nc, P4 finite element
+v 2.17-2 (19 june 2007)
+ - correct double $(BLASLIB) in configure.ac (one more)
+ - correct old bug in bamg, in case of bogus boundary (auto
+ crossing)and add code to handle this error correctly with exception
+ (see "test to catch bogus boundary" of example++-tutorial/mesh.edp).
+v 2.17-1
+ - add the command line parameter [-v nn] in all freefem++ program to set
+ the level of verbosity to nn before all, and if nn == 0 then theoriticaly no more
+ spurious output.
+ - correct automatique choose of color in plot of arrow.
+v 2.17
+ - add bessel function j0, j1, jn, y0, y1, yn -- bessel
+ functions of first and second kind
+ - add erf, erfc -- error function operators
+ - add tgamma, lgamma -- gamma and log of gamma
+ - add tool set and get line,colunm and value of a sparse matrix
+ [I,J,C]=A; // resizing array I,J,C
+ A=[I,J,C] ;
+ where
+ int[int] I(k),J(k); real[int] C(k);
+ - add in tools to get eigen vector of None FE problem
+ like:
+ int nev=5; // number of computed eigen valeu close to sigma
+ real[int] ev(nev); // to store nev eigein value
+ real[int,int] eV(AA.n,nev); // to store nev eigen vector
+ int k=EigenValue(AA,BB,sym=true,11value=ev,rawvector=eV);
+
+ - correct the quadrature formular automatic choose with the qforder= field
+ by default the order is correct until order 10 (so exact for P9 polynomals)
+ to add new Quadrature formalur up two order 26 add dynamic load qf11to25
+v 2.16-2
+ correct configure.ac for windows ide compile
+ correct meshsplit, trunc function
+v 2.16 april 17 2007
+ Change umfpack download version to the last one
+ add string input from file or cin
+ add Compressible Neo-Hookean Materials exemple
+v 2.15-1
+ Correct mistake in cas of splitmesh with internal boundary (assert)
+ Add dump of the mesh regulary (pesonnal work, FH)
+v 2.15 (27 mars 2007)
+ The blas.tgz file change on http://www.netlib.org/blas/blas.tgz
+ correct the makefile (remove BLAS dir)
+v 2.14-3 (24 mars 2007)
+ Correct bug in vectorial operation of type (b - 3.14*d) (Thanks to F. Dortu)
+v 2.14-2 (22 mars 2007)
+ correct integration problem on none classical mesh (mesh of curve of mortar technique)
+ the mesh::Find methode is boggus of the kind on meshes, i make an optimisation to remove
+ this call in case build matrix with varf int1d(Th)( u*v) , in case of Th, u or v is def.
+ on same meshes.
+v 2.14-1 (0 mars 2007)
+ correct missing speeling in configure.ac mpi++.h -> mpi++.h for mpich.1.2
+ add computing linear form of 2 meshes (ex. v on mesh Th1, and compute int2d(Th1)(v) )
+v 2.14 (7 mars 2007)
+ make correction for solaris bluid
+ add P3,P4 and new quadrature formular on triangle up degree 25
+ with dynamics load. See examples++-load/*P[43]*.edp
+ correct mistake when we build matrix from varf with 3 meshes (FH).
+v 2.13
+ Add formal operator * and ' (to day just transpose)
+ on vector [ .. ] and matrix [ [],..., []]
+ so we can write
+ macro grad(u) [ dx(u),dy(u)] // EOM
+ int2d(Th)( grad(u)'*grad(v) )
+ add scalar term in block matrix as 1x1 matrix.
+v 2.12-2
+ correct problem in splitmesh and trunc
+ trunc build always a part of a subdivision mesh
+ splitmesh given more pretty mesh, before if we split 2 adjacent
+ triangle resp in 3 and 4, before we put 2+3 points on the common edge
+ now the put 3 points.
+v 2.12-1 (jan 15,2007)
+ correct early delete of return pointeur in freefem++ function (trap in string.edp under windows )
+v 2.12 ( jan 10,2007)
+ correct mistake in none square block matrix
+v 2.11-2 (nov 29,2006)
+ correct integration problem on none classical mesh (mesh of curve of mortar technique)
+ the mesh::Find methode is boggus of the kind on meshes, i make an optimisation to remove
+ this call in case build matrix with varf int..(Th)( u*v) , in case of Th, u or v is def.
+ on same meshes.
+v 2.11-1 (nov 28,2006)
+ Correct bug in interpolation, we building fespace Wf(Th,[RT0,P0]);
+v 2.11 (nov 10,2006)
+ Correction of the problem in arpack (eigenvalue computation) under i383 processor.
+ After 2 week of hard work, a found the bug.
+ In new version of LAPACK second is a real function
+ and in ARPACK second is a subroutine (Thank the fortran).
+ So I change the Makefile to change the name of function second into secnd2.
+ How to find the bug, in this case the stack of the floatting register (info float under gdb)
+ are growing. So after any real function can return a NaN (one time) due to stack float register
+ overflow. A big Thank to D. Bernardi of the help (Merci au fortran et Merci au i383).
+
+v 2.10 (oct 26, 2006)
+ correct problem with eigen value on window and some linux distrubition (Fedora)
+ add a patch of two functions in lapack see arpack/arpack-patch-lapack.tar.gz
+
+v 2.9 (sept 19, 2006 FH)
+ change Send and Recv in mpi to Isend and Irecv to make async communication
+ so now freefem++-mpi work with openmpi.
+
+V 2.8-3
+ correct freefem++-cs trap under windows (install the static version)
+ add tools to format ostream ( file or cout)
+
+V 2.8-2
+ (july)
+ use f2c as a fortran compiler on MacIntel architecture,
+ correct mistake in mpi.
+ (june 2006)
+ add nint, and correct mistake in ceil function
+ add configure flag to remove cadna --without-cadna
+V2.8
+ Correct mistake in OtherMacOsLib.tgz store file and not link (after 1 june)
+ * Correct bug in vectorial problem with same approximation, some time
+ we do a renumbering of the previous approximation space (a pointer mistake).
+V2.7-1
+ * change size of data in 64 bits architecture (in file AnyType.hpp)
+V2.7
+ * correct mpi Makefile
+ * correct bug in construction of recursive composite finite element (see HISTORY)
+ remark: the finite elemnt struct, so all dynamic library must be recompile.
+V2.6-1
+ * add the examples-bamg directory in freefem++ and correct bamg graphic
+V2.6
+ * Huge work (more than a full week) to improve the windows version
+ change all the .dll construction
+ remove lots of trap. All example run without graphics
+V2.5.1
+ * change nbve= to nev= in EigenValue function (to be compatible with the doc)
+ * newtow to newton (to correct misspelling)
+ * change in AnyType to remove da randow bug on windows.
+ * vim color syntax from Richard MICHEL (vim_highlighting_for_FF++.tar.gz)
+
+V2.5-0
+ * add C++ string operator : int i; string s = "....";
+ i=s.length ; i=s.size;
+ i=s.find("qsdqs");i=s.rfind("sqs"); i=s.find("qsq",2);
+ s(3:4)="sdfffsf"; // replace from char 3 to 4 by
+ // s[3] not alloued to day (char type is not well type in freefem++).
+ getline(cin,s);
+ * Correct bug when passing parameter string in function
+ * add freefem++ mode for mi editor on macos http://www.mimikaki.net/en/
+ store in mode-mi-edp.zip archive (unzip and put in the Folder openned with the
+ mi "Option->Open Mode Folder" menu and set "mi" is the Default application
+ for all the .edp file).
+
+V2.4-2
+ * add lot missing vectorial operation with sub array
+ * if u is a complex array (i.e. complex[int u] ..;)
+ then u.re (resp u.im) are the real array of the real (resp. imag )
+ part of the vector u
+ * in block matrix add utilisation of array to build the block matrix
+ see new Laplace-lagrange-mult.edp file to have an example
+V2.3-3
+ * add outer product to set matrix or full real or complex 2D array
+ A = 2*a*b'; // where A is a "real[int,int]", b and c a "real[int]".
+ A += 2*a*b'; or A = 2*a*b';
+ add matrix and array renumbering (see sec. 4.8 of freefem++.doc for all details)
+
+V2.3-0
+ * add three key word for future use try,catch throw
+ a exception handling (no memory management.)
+ try { code ; }
+ catch (...) { code ; }
+ * use tolpivot= to set the pivottol in LU, crout, cholesky factorization
+V2.2-1
+ * Add init file to set verbosity, includepath , loadpath and
+ add preload (dynamic link file)
+ the file are under unix and MacOs
+ /etc/freefem++.pref
+ /Users/hecht/.freefem++.pref
+ freefem++.pref
+ under windows
+ freefem++.pref
+ and the syntaxe of the files is
+
+ verbosity= 5
+ loadpath += "/Library/FreeFem++/lib"
+ loadpath += "/Users/hecht/Library/FreeFem++/lib"
+ includepath += "/Library/FreeFem++/edp"
+ includepath += "/Users/hecht/Library/FreeFem++/edp"
+ # comment
+ load += "funcTemplate"
+ load += "myfunction"
+
+ * Add search directory for include, and load under Unix and Windows
+ Just on the shell sh set environment variable
+ export FF_VERBOSITY=50
+ export FF_INCLUDEPATH="dir;;dir2"
+ export FF_LOADPATH="dir;;dir3""
+ remark the separtor of directory is ";" and not ":" because ":" is use under Windows.
+ * Examples of Add new Finite element with dynamic link/load, Morley and Bernardi Raugel
+ see examples++-load
+V2.1-2
+ * add more example of dynamic load example (thank to F. Dortu)
+ * correct mistake in simple integral computation (not in variationnal
+ form) before we alway use a quadrature formula of order 3,
+ now we can change the quadrature formula and the defaut is of order 5.
+V2.0-4
+ * change in mshptg the size of the small possible edge from
+ 1/32000 to 1/1 000 000 000, this mesher is use in trunc,
+ splitmesh, and triangulate functions.
+
+V2.0-3
+ * correct operator x =/, it does nothing before. (v2.0-3)
+ see end examples++-tutorial/array.edp for all array operator
+ = + - * / .* ./ += -= /= *= : .l1 .l2 .linfty .sum .max .min '
+
+ * correct bug when solving complex linear system with UMFPACK
+ before we solve the system when the conjugate matrix
+
+
+Major Change previous version
+-----------------------------
+ * add ternary C expression
+ Symbol Example Explanation
+ ?: a?b:c ternary operation
+
+ * add
+ sparse matrix computation,
+ block matrix construction
+ interpolation construction
+ see
+ examples++-tutorial/sparse-cmatrix.edp
+ examples++-tutorial/sparse-matrix.edp
+ examples++-tutorial/mat_interpol.edp
+ not so well tested, but could be worse.
+
+ * add example to solve vartionnal inequation. VI.edp
+
+ * add possibility to build matrix where the 3 meshes
+ the integrale mesh, unkwon FE mesh, test FE function
+ can be different. You must use varf to build the matrix
+ is not a standard porblem.
+
+ * Improvement of dynamic loading facility under the 3 systems
+ add a fast fourier transform with dynamic loading
+ see examples++-load/dfft.edp
+
diff --cc Makefile.am.orig
index 3170a0d,0000000..68b55eb
mode 100644,000000..100644
--- a/Makefile.am.orig
+++ b/Makefile.am.orig
@@@ -1,261 -1,0 +1,265 @@@
+# Makefile for FreeFem++, adapted to Automake
+# -------------------------------------------
+
+# Adaptation to Automake: Antoine Le Hyaric - LJLL Paris 6 -
+# lehyaric at ann.jussieu.fr - 13/5/04
+
+# $Id$
+
+SUBDIRS=download src examples++-tutorial examples++ \
+ examples++-eigen examples++-load examples++-mpi \
+ examples++-bug examples++-chapt3 examples++-other \
+ examples++-3d DOC
+
+EXTRA_DIST=test-driver-ff regtests.sh config-wrapper.h \
+FreeFem++.mcp HISTORY HISTORY_BEFORE_2005 BUGS TODO regtests.m4 \
+INSTALL INSTALL-MacOSX INNOVATION \
+WindowsPackage.m4 README README_ARPACK README_WINDOWS README_MAC \
+logo.ico copysharedlibs.sh COPYRIGHT edp.nedit reconfigure \
++<<<<<<< HEAD
+mode-mi-edp.zip aclocal.m4 acmacros.m4 acoptim.m4 ax_lib_hdf5.m4 \
++=======
++mode-mi-edp.zip aclocal.m4 acmacros.m4 acoptim.m4 \
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+freefem++.spec crimson-freefem++.zip \
+Install-MacOS.command.in \
+examples-bamg/NACA012/naca.awk examples-bamg/quadloop/dotest.pl \
+examples-bamg/square/*_g.* examples-bamg/square/do* examples-bamg/NACA012/[adp]* \
+examples-bamg/test/dotest*.pl 0ldUserReadMe.txt CheckAllEdp CheckAll \
+WHERE_LIBRARY-mkl FreeFem++-CoCoa \
+uninstall-ff++ \
+./build/cleancrlf ./build/download ./build/links2files ./build/orgindex
+
+
+FF_MAC_PREFIX=FreeFem++v$(VERSION)$(ADD_PACKAGE_NAME)
+
+FF_EXAMPLES_FILES = COPYRIGHT HISTORY HISTORY_BEFORE_2005 README README_WINDOWS README_MAC BUGS TODO INSTALL INSTALL-MacOSX INNOVATION \
+mode-mi-edp.zip \
+examples++-tutorial/aile.msh examples++-tutorial/xyf \
+examples++-3d/dodecaedre01.mesh \
+examples++-3d/lac-leman-v4.msh \
+examples++-load/load.link \
+examples++-load/fig.pgm examples++-load/lg.pgm \
+./examples++-mpi/regtests.sh ./examples++-other/speedtest.sh \
+./download/fftw/Makefile ./download/fftw/Makefile.am \
+examples++*/*.[ie]dp CheckAllEdp
+
+
+# Creates a file named "ChangeLog" containing the chronology of all
+# modifications to the source files. Needs "cvs2cl" to be installed.
+
+changelog:
+ cvs2cl
+
+# History before 2005 is stored in the file "HISTORY_BEFORE_2005"
+all-local:: @HISTORY@
+
+# try and avoid running this under fakeroot (otherwise we may face
+# problems trying to connect to CVS as pseudo-root). Debian packaging
+# uses fakeroot.
+history:
+ if test "$$FAKED_MODE" = ""; then\
+ hg log >HISTORY ;\
+ fi
+
+documentation:
+ cd DOC && $(MAKE) $(AM_MAKEFLAGS) documentation
+
+DOC/freefem++doc.pdf:
+ cd $(@D) && $(MAKE) $(AM_MAKEFLAGS) $(@F)
+
+clean-local::
+ -find . \( -name '*~' -or -name ListOfUnAllocPtr.bin \) |xargs rm
+ -rm examples*/*.eps
+
+# "dist" targets
+clean-local::
+ -rm freefem++-*.tar.gz freefem++-*.zip
+ -rm Output/FreeFem++-*.exe
+
+# Reduced compilation
+# -------------------
+
+quick:
+ cd src/libMesh && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/lglib && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/fflib && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/std && $(MAKE) $(AM_MAKEFLAGS)
+
+nw:
+ cd src/libMesh && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/lglib && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/fflib && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/nw && $(MAKE) $(AM_MAKEFLAGS)
+
+bamg:
+ cd src/libMesh && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/lglib && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/fflib && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/bamg && $(MAKE) $(AM_MAKEFLAGS)
+
+ide:
+ cd src/libMesh && $(MAKE) $(AM_MAKEFLAGS)
+ cd download && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/lglib && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/fflib && $(MAKE) $(AM_MAKEFLAGS)
+ cd src/ide && $(MAKE) $(AM_MAKEFLAGS) FreeFem++-cs$(EXEEXT)
+
+# Cleaning generated files which are stored in the CVS repository, to
+# avoid technical CVS conflicts.
+clean-gen:
+ ./cleanregen.sh
+
+# Testing
+# -------
+
+# The standard automake goal "make check" is also valid. It just does
+# not run any test that could prevent the user from working on its
+# machine (because of unexpected windows opening right in the middle
+# of the workspace).
+
+visualcheck: all
+ $(MAKE) $(AM_MAKEFLAGS) check VISUALCHECK=yes
+
+speedtest: all
+ cd examples++-other && $(MAKE) $(AM_MAKEFLAGS) check
+
+# Windows package
+# ---------------
+
+# Windows package script (for Inno Setup). We extract version
+# information from the Debian Changelog to get the package release
+# number as well.
+win32:WindowsPackage.iss
+ cd examples++-load;tar zxvf include.tar.gz;mkdir include-tmp;cp -Lr *.h include/* include-tmp
+WindowsPackage.iss: WindowsPackage.m4 configure.ac Makefile.am
+ m4 -DVERSION='$(VERSION)$(ADD_PACKAGE_NAME)' \
+ -DMPIPROG='$(MPIPROG)' WindowsPackage.m4 > WindowsPackage.iss
+
+# Debian package
+# --------------
+
+deb:
+ dpkg-buildpackage -rfakeroot
+ @echo Now run CopyToServer.sh in debian subdirectory
+
+# Build all versions
+# ------------------
+
+
+nativeX: $(FF_MAC_PREFIX)_MacOsX.tgz
+ echo "done"
+MacOsX:
+ -rm -rf OsXxx
+ mkdir -p OsXxx/Applications/
+ make install DESTDIR="`pwd`/OsXxx"
+ tar zxvf FreeFem++.app.tgz -C OsXxx/Applications/
+ cd OsXxx;tar cvfz ../$(FF_MAC_PREFIX)_MacOsX.tgz .
+ rm -rf OsXxx
+clean-local::
+ -rm freefem++-$(VERSION).tar.gz
+ -rm -rf FreeFem++v*_MacOS
+
+# Native MacOS packaging
+# ----------------------
+install-exec-local::
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(pkgdatadir)/$(VERSION)
+ tar cvf - $(FF_EXAMPLES_FILES)| (cd $(DESTDIR)$(pkgdatadir)/$(VERSION); tar xvf -)
+ $(mkinstalldirs) -m 755 $(DESTDIR)${bindir}
+ -test `uname` = Darwin && $(INSTALL_SCRIPT) FreeFem++-CoCoa $(DESTDIR)${bindir}
+
+
+ListFiles-natives: .FORCE
+ echo $(FF_EXAMPLES_FILES) >$@
+ echo ./download/fftw/Makefile ./download/fftw/Makefile.am >>$@
+ find . -name '*.[ei]dp' -o -name '*.h*' -o -name '*.cpp' -o -name '*.pgm' |egrep '[.]/examples++' >>$@
+ find . -name '*.h*' -o -name '*.cpp' |egrep '[.]/examples++' >>$@
+List-agl-dylib: src/nw/FreeFem++
+ otool -L src/nw/FreeFem++|egrep -v '/System/Library/|/usr/lib/'|awk '/.dylib/ {print $$1}' >$@
+CheckMacLib.sh: src/nw/FreeFem++
+ echo "for i in `otool -L src/nw/FreeFem++|egrep -v '/System/Library/|/usr/lib/'|awk '/.dylib/ {printf($$1.OFS) }'` ; do test ! -f $$i && exit 1; done; exit 0" >$@
+ chmod a+x $@
+CheckMPIMacLib.sh: src/mpi/FreeFem++-mpi
+ echo "for i in `otool -L src/mpi/FreeFem++-mpi|egrep -v '/System/Library/|/usr/lib/'|awk '/.dylib/ {printf($$1.OFS) }'` ; do test ! -f $$i && exit 1; done; exit 0" >$@
+ chmod a+x $@
+.FORCE:
+
+$(FF_MAC_PREFIX)_Macos:documentation ListFiles-natives
+ -mkdir $@
+ cat ListFiles-natives|xargs tar chf - | (cd $@ ; tar xf - )
+ /Developer/Tools/CpMac "FreeFem++(Carbon)" $@/FreeFem++
+ cp DOC/freefem++-doc.pdf $@
+
+$(FF_MAC_PREFIX)_MacOsX: all documentation ListFiles-natives List-agl-dylib
+ -mkdir $@
+ cp DOC/freefem++doc.pdf $@
+ cat ListFiles-natives|xargs tar chf - | (cd $@ ; tar xf - )
+ cd $@ ; tar zxf ../src/agl/FreeFem++.app.tgz
+ sed <src/agl/Info-plist.am >$@/FreeFem++.app/Contents/Info.plist \
+ -e "s/@VVERSION@/$(VERSION)$(ADD_PACKAGE_NAME)/g" \
+ -e "s/@DATE@/`date`/g"
+ cp src/nw/FreeFem++ $@/FreeFem++.app/Contents/bin
+ cp src/nw/ffglut $@/FreeFem++.app/Contents/bin
+ cp src/medit/ffmedit $@/FreeFem++.app/Contents/bin
+ cp examples++-load/ff-get-dep $@/FreeFem++.app/Contents/bin
+ cp examples++-load/ff-pkg-download $@/FreeFem++.app/Contents/bin
+ sed <examples++-load/ff-c++ > $@/FreeFem++.app/Contents/bin/ff-c++ -e 's;FFAPPLI_INC;$@/FreeFem++.app/Contents/include;'
+ chmod a+x $@/FreeFem++.app/Contents/bin/ff-c++
+ -mkdir $@/FreeFem++.app/Contents/include
+ -mkdir $@/FreeFem++.app/Contents/idp
+ cp examples++-load/include/* $@/FreeFem++.app/Contents/include
+ cp examples++-load/*.dylib $@/FreeFem++.app/Contents/lib
+ cp examples++-*/*.idp $@/FreeFem++.app/Contents/idp
+ -if [ -s List-agl-dylib ]; then tar zchvf $@/OtherMacOsLib.tgz `cat List-agl-dylib`; fi;
+ ./config.status --file=$@/Install-MacOS.command:Install-MacOS.command.in
+ chmod a+rx $@/Install-MacOS.command
+ -mkdir $@/FreeFem++.app/Contents/etc
+ echo loadpath += \"./\" >$@/FreeFem++.app/Contents/etc/freefem++.pref
+ echo loadpath += \"$(ff_prefix_dir)/lib\" >>$@/FreeFem++.app/Contents/etc/freefem++.pref
+ echo includepath += \"$(ff_prefix_dir)/edp\" >>$@/FreeFem++.app/Contents/etc/freefem++.pref
+ echo includepath += \"$(ff_prefix_dir)/idp\" >>$@/FreeFem++.app/Contents/etc/freefem++.pref
+
+
+$(FF_MAC_PREFIX)_MacOsX.tgz: $(FF_MAC_PREFIX)_MacOsX
+ tar zcvf $(FF_MAC_PREFIX)_MacOsX.tgz $(FF_MAC_PREFIX)_MacOsX
+
+# Linux binary-only package
+# -------------------------
+
+# Include kernel and libc version in static package name
+PACKAGE_NAME=FreeFem++v$(VERSION)_linux-$(KERNEL_VERSION)_$(LIBC_VERSION)$(OPTIM_TYPE)
+
+linux-package: $(PACKAGE_NAME).tgz
+
+# No direct dependency to "all" to be able to debug the packaging
+# procedure on its own.
+
+$(PACKAGE_NAME): ListFiles-natives
+ cat ListFiles-natives|xargs tar cfh - | (cd $@ ; tar xf - )
+ -mkdir $@
+ cp src/std/FreeFem++ $@
+ ./copysharedlibs.sh src/std/FreeFem++ $@
+ cp src/nw/FreeFem++-nw $@
+ ./copysharedlibs.sh src/nw/FreeFem++-nw $@
+ cp src/ide/FreeFem++-cs $@
+ ./copysharedlibs.sh src/ide/FreeFem++-cs $@
+ cp src/ide/FreeFem++-server $@
+ ./copysharedlibs.sh src/ide/FreeFem++-server $@
+ cp src/ide/FreeFem++-client $@
+ ./copysharedlibs.sh src/ide/FreeFem++-client $@
+ -cp src/glx/FreeFem++-glx $@
+ -./copysharedlibs.sh src/glx/FreeFem++-glx $@
+ -cp src/mpi/FreeFem++-mpi $@
+ -./copysharedlibs.sh src/mpi/FreeFem++-mpi $@
+
+
+$(PACKAGE_NAME).tgz: $(PACKAGE_NAME)
+ tar cvzf $@ $<
+
+clean-local::
+ -rm -r $(PACKAGE_NAME) $(PACKAGE_NAME).tgz
+autofiles:AutoGeneratedFile.tar.gz
+
+AutoGeneratedFile.tar.gz:configure List_generate_file Makefile.in Makefile.am configure.ac
+ tar cvfz $@ `cat List_generate_file`
+
diff --cc README_MAC.orig
index 6e3f02e,0000000..8d55bf7
mode 100644,000000..100644
--- a/README_MAC.orig
+++ b/README_MAC.orig
@@@ -1,103 -1,0 +1,107 @@@
+To compile a full version of FreeFem++ under MacOS
+---------------------------------------------------
+
+Under Mavericks (10.9) 2012 ( xcode 5.0.2 form scratch)
+-------------------------------------------------
+ remark: All line beginning by # are shell command in terminal.
+
+
+ 1) install xcode 5.0.2 , and the xcode command line tools
+ xcode
+ install Auxiliary Tools for Xcode (for PackageMaker)
+ 2) install xcode command line (xcode 5.0.2 bug ???? )
+ # xcode-select --install
+ 2) install gcc-4.9 form http://hpc.sourceforge.net
+ # curl -O http://prdownloads.sourceforge.net/hpc/gfortran-4.9-bin.tar.gz?download
+ # sudo tar zxvf gfortran-4.9-bin.tar.gz -C /
+ 3) autoconf and automake now not in xcode
+ I use the macport distribution form http://www.macports.org
+ # sudo port install autoconfo
+ # sudo port install automake
+ Or with brew tool ...
+ 4) install tex from ctan
+ http://mirrors.ctan.org/systems/mac/mactex/MacTeX.pkg
+ 5) install openmpi form the source
+ http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.bz2
+ # ./configure 'CC=clang' 'CXX=clang++' 'FC=gfortran' 'F77=gfortran' --enable-ltdl-convenience
+ # make
+ # sudo make install
+ 6) install gsl
+ # curl -O http://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz
+ # tar zxvf gsl-1.15.tar.gz
+ # cd gsl-1.15.
+ #./configure CC=clang
+ # make
+ # sudo make install
+ 7) install mecurial from the web http://mercurial.selenic.com
+
+ 8) download
+ # hg clone http://www.freefem.org/ff++/ff++
+ 9) compilation of freefem++
+ # cd ff++
+ # ./configure '-with-suffix=macos-10.9' '-without-fltk' '--enable-download' '--enable-optim' 'MPIRUN=/usr/local/bin/mpirun' '--enable-m64' '--without-x' 'CC=clang' 'CXXFLAGS=-std=c++11' 'CXX=clang++' 'F77=/usr/local/bin/gfortran' 'FC=/usr/local/bin/gfortran' 'MPICXX=/usr/local/bin/mpic++' 'MPICC=/usr/local/bin/mpicc' 'MPIFC=/usr/local/bin/mpif90' 'MPIF77=/usr/local/bin/mpif90' '--enable-maintainer-mode'
+
+ # make
+ # make
+ # make
+ # sudo make install
+
+to bluid the version of 10.8 the version compilation (fev. 2014)
+
+./configure '-with-suffix=macos-10.8' '-without-fltk' '--enable-download' '--enable-optim' 'MPIRUN=/usr/local/bin/mpirun' '--enable-m64' '--without-x' 'CC=clang -isysroot /Applications/Xcode.app//Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk' 'CXXFLAGS=-mmacosx-version-min=10.8' 'CXX=clang++ -std=c++11 -isysroot /Applications/Xcode.app//Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk' 'CFLAGS=-mmacosx-version-min=10.8' 'F77=/usr/lo [...]
+
+------------
+Under Snow Leopard. Jan 2011
+
+The major problem is take a good f90 to compile new // solver like MUMPS.
+
+Do the follow instalation process:
+0) Install the developper tools form the apple DVD's.
+
+1) get macport for http://www.macports.org/ and installation:
+
+ sudo port selfupdate
+ sudo port install g95
+ sudo port install wget
+
+2) get and install mercurial form
+ http://mercurial.selenic.com/
+
+3) to compile openmpi with fortran interface and install
+ do :
+
+wget http://www.open-mpi.org/software/ompi/v1.4/downloads/openmpi-1.4.3.tar.bz2
+
+remark, I have test with version 1.4.1 , but I thing no problem acure with this new version
+
+ tar zxvf openmpi-1.4.3.tar.bz2
+ cd openmpi-1.4.3
+ ./configure FC=/opt/local/bin/g95 F77=/opt/local/bin/g95
+ sudo make install
+
+4) get Tex/laTex for the documention build
+form http://www.tug.org/mactex/
+and install
+
+5) to get download the last freefem++ version , do
+
+hg clone http://www.freefem.org/ff++/ff++
+cd ff++
+
+./configure '-with-suffix=snow-leopard' '--enable-download' 'F77=/opt/local/bin/g95' '-with-mpi=/usr/local/bin/mpic++' '--enable-m64' 'FLIBS=/opt/local/lib/g95/x86_64-apple-darwin10/4.2.4/libf95.a' 'MPIF77=/usr/local/bin/mpif77' 'MPICC=/usr/local/bin/mpicc' 'MPIFC=/usr/local/bin/mpif90' 'MPI_INC_DIR=/usr/local/include' 'MPICXX=/usr/local/bin/mpic++'
+
+make
+make install
+
+Good Luck, and if I miss something sorry,
+ try to add missing tools with
+sudo port install missing-tool
+like for exemple:
+
++<<<<<<< HEAD
+sudo port install gnuplot
+
- sudo install_name_tool -change /Users/hecht/ff/ff-MacOS-10.9/download/PETSc/petsc-3.5.2/arch-darwin-c-debug/lib/libparmetis.dylib /usr/local/petsc/lib/libparmetis.dylib libpetsc.3.5.dylib
++sudo install_name_tool -change /Users/hecht/ff/ff-MacOS-10.9/download/PETSc/petsc-3.5.2/arch-darwin-c-debug/lib/libparmetis.dylib /usr/local/petsc/lib/libparmetis.dylib libpetsc.3.5.dylib
++=======
++sudo port install gnuplot
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc acmacros.m4.orig
index 2e24467,0000000..c9fcbd9
mode 100644,000000..100644
--- a/acmacros.m4.orig
+++ b/acmacros.m4.orig
@@@ -1,39 -1,0 +1,46 @@@
+# Checks whether a compiler accepts a given flag
+# ----------------------------------------------
+
+# $1 = compiler name
+# $2 = flag
+# $3 = make macro containing flags for that compiler
++<<<<<<< HEAD
+# $4 = exec is true ..
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+# Note: changes AC_LANG()
+
+AC_DEFUN([CHECK_COMPILE_FLAG],
+ [AC_MSG_CHECKING(whether the $1 compiler accepts $2)
+ check_save_flags="$$3"
+ AC_LANG_PUSH($1)
+ $3="$$3 $2"
+
+ # The program needs to contain something for the test source
+ # file to be created by autoconf.
+
+ # Some options really need to be linked (not only compiled) to
+ # check whether they work.
+
+ AC_LINK_IFELSE([ifelse($1,Fortran 77,
+[ program x
+ end],
+ [AC_LANG_PROGRAM])],
+ check_flag_ok=yes,
+ check_flag_ok=no)
+ AC_MSG_RESULT($check_flag_ok)
+ if test "$check_flag_ok" = no;
+ then
+ $3="$check_save_flags"
+ fi
++<<<<<<< HEAD
+ if test -n "$4" ;
+ then
+ $4="$check_flag_ok"
+ fi
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ AC_LANG_POP($1)
+])
diff --cc acmpi.m4.orig
index d1a466b,0000000..76c67d5
mode 100644,000000..100644
--- a/acmpi.m4.orig
+++ b/acmpi.m4.orig
@@@ -1,331 -1,0 +1,429 @@@
+# Checking wether we can produce a parallel version
+# -------------------------------------------------
+
+dnl m4_include(ax_mpi.m4)
+ff_save_path="$PATH"
+# We need to choose between mpich, openmpi and lam for the Debian package
+AC_ARG_WITH(mpipath,[ --with-mpipath= the path of mpich under windows (no command mpic++, ... )])
+AC_ARG_WITH(mpilibs,[ --with-mpilibs= the libs to add to c++,fc, ... (to link with c++ - ex: -L/usr/local/lib -lmpi_f90 -lmpi_cxx -lmpi -lopen-rte -lopen-pal -lutil) ])
+AC_ARG_WITH(mpilibsc,[ --with-mpilibsc= the libs to add to c ... (to link with cc (for pastix lib) ex: -L/usr/local/lib -lmpi -lopen-rte -lopen-pal -lutil) ])
+AC_ARG_WITH(mpiinc,[ --with-mpiinc= the include directory directive and preprocess directive (no mpicc++, just use the compiler)) ])
+AC_ARG_WITH(mpi,[ --with-mpi=[yes|no|mpic++|lam|mpich|openmpi|/usr/local/bin/mpic++|... ] or --without-mpi Choose MPI implementation (default is mpic++)])
+if test "$with_mpi" != no ; then
+#if test "$with_mpi" != no ; then
+#AX_MPI(with_mpi=yes, with_mpi=no)
+#fi
+
+# Default is mpic++
+ff_mpi_suffix="";
+if test "$with_mpi" = yes -o -z "$with_mpi"
+then
+ ff_mpicxx=mpic++
+else
+ case "$with_mpi" in
+ lam|mpich|openmpi) ff_mpi_suffix=.$with_mpi;ff_mpicxx=mpic++.$with_mpi;;
+ *) ff_mpicxx="$with_mpi" ;;
+ esac
+fi
+
+dnl AC_MSG_NOTICE([ xxxxxxxxxxxxxxxxxxxx --$with_mpilibs--]);
+if test -n "$with_mpiinc" -a "$with_mpiinc" != no ; then
+ if test "$with_mpi" = 'no' ; then with_mpi='yes'; fi
+ ff_MPI_INCLUDE="$with_mpiinc"
+fi
+if test -n "$with_mpilibs" -a "$with_mpilibs" != no ; then
+ ff_MPI_LIB="$with_mpilibs"
+ ff_MPI_LIBC="$with_mpilibs"
+ ff_MPI_LIBFC="$with_mpilibs"
+ MPICXX="$CXX $ff_MPI_INCLUDE"
+ MPIF77="$F77 $ff_MPI_INCLUDE"
+ MPIFC="$FC $ff_MPI_INCLUDE"
+ MPICC="$CC $ff_MPI_INCLUDE"
+ AC_MSG_NOTICE([ --- set all MPI compile to compiler: $MPICC , $MPIF77, $MPIFC, $MPICC ])
+fi
+
+if test -n "$with_mpilibsc" -a "$with_mpilibsc" != no ; then
+ ff_MPI_LIBC="$with_mpilibsc"
+fi
+
+AC_ARG_VAR(MPIRUN,[MPI run command ])
+AC_MSG_CHECKING(for MPIRUN)
+
+if test -z "$MPIRUN" ; then
+ AC_PATH_PROGS(MPIRUN,mpirun mpiexec mpiexec.exe,no)
+ if test "$MPIRUN" = no
+ then
+ ff_mpi=no
+ fi
+fi
+AC_MSG_RESULT($MPIRUN)
+
+AC_MSG_CHECKING(for mpipath )
+
++<<<<<<< HEAD
+if test "$with_mpi" != no -a ! -d "$with_mpipath" -a "$MPIRUN" != no ; then
+# if "$MPIRUN" != no ; tehn
+ with_mpipath=`AS_DIRNAME(["$MPIRUN"])`
+ with_mpipath=`AS_DIRNAME(["$with_mpipath"])`
+# echo " ***** with_mpipath $with_mpipath \n"
+
++=======
++if test "$with_mpi" != no -a ! -d "$with_mpipath" -a "$ff_win32" = yes -a "$MPIRUN" != no ; then
++# if "$MPIRUN" != no ; tehn
++ with_mpipath=`AS_DIRNAME(["$MPIRUN"])`
++ with_mpipath=`AS_DIRNAME(["$with_mpipath"])`
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+# else
+# for i in '/c/Program Files (x86)/MPICH2' '/c/Program Files/MPICH2' 'c:\Program Files (x86)\MPICH2' 'c:\Program Files\MPICH2' ; do
+# test -d "$i" && with_mpipath="$i" && break
+# done
+# fi
+fi
++<<<<<<< HEAD
+#echo "**** with_mpipath '$with_mpipath' $MPIRUN *****"
+dnl if test "$with_mpilibs" != "no" ; then
+dnl fi
+case "$MPIRUN" in
+ */sgi/mpt/*)
+ ff_MPI_INCLUDE_DIR=
+ ff_MPI_LIB_DIR=
+ test -f "$with_mpipath/include/mpif.h" && ff_MPI_INCLUDE_DIR="$with_mpipath/include"
+ test -f "$with_mpipath/lib/libmpi.so" && ff_MPI_LIB_DIR="$with_mpipath/lib"
+ if test -n "$ff_MPI_INCLUDE_DIR" -a -n "$ff_MPI_LIB_DIR" ; then
+ ff_MPI_INCLUDE="-I'$ff_MPI_INCLUDE_DIR' "
+ with_mpiinc="$ff_MPI_INCLUDE"
+ ff_MPI_LIBC="-L'$ff_MPI_LIB_DIR' -lmpi"
+ ff_MPI_LIB="-L'$ff_MPI_LIB_DIR' -lmpi++ -lmpi"
+ ff_MPI_LIBFC="-L'$ff_MPI_LIB_DIR' -lmpi"
+ ff_mpitype=sgi
+ test -z "$MPICXX" && MPICXX="$CXX $ff_MPI_INCLUDE"
+ test -z "$MPIF77" && MPIF77="$F77 $ff_MPI_INCLUDE"
+ test -z "$MPIFC" && MPIFC="$FC $ff_MPI_INCLUDE"
+ test -z "$MPICC" && MPICC="$CC $ff_MPI_INCLUDE"
+# echo " *** MPI sgi ..... "
+ fi
+ ;;
+esac
++=======
++
++dnl if test "$with_mpilibs" != "no" ; then
++dnl fi
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+if test -d "$with_mpipath" -a "$ff_win32" = yes ; then
+# sed -e "s?@MPIDIR@?$with_mpipath?" -e "s?@F77@?$F77?" -e "s?@CC@?$CC?" -e "s?@CXX@?$CXX?" -e "s?@FC@?$FC?" <mpic++.in >mpic++
+ # chmod a+rx mpic++
+ # for i in mpicc mpif90 mpifc mpif77 ; do cp mpic++ $i; done
+# ff_pwd=`pwd`
+ # with_mpi="$ff_pwd"/mpic++
+ # MPICXX="$ff_pwd/mpic++"
+ # MPIF77="$ff_pwd/mpif77"
+ # MPIFC="$ff_pwd/mpif90"
+ # MPICC="$ff_pwd/mpicc" zzzzzzzzzzz
+ if with_mpilibs=`which msmpi.dll`
+ then
+ case "$ff_size_ptr" in
+ 4) with_mpipathlib="$with_mpipath/Lib/i386";;
+ 8) with_mpipathlib="$with_mpipath/Lib/amd64";;
+ *) with_mpipath=no;;
+ esac
+
+
+ test -d "$with_mpipath/Inc" && ff_MPI_INCLUDE_DIR="$with_mpipath/Inc"
+ test -d "$with_mpipath/Include" && ff_MPI_INCLUDE_DIR="$with_mpipath/Include"
+ ff_MPI_INCLUDE="-I'$ff_MPI_INCLUDE_DIR' '-D_MSC_VER' '-D__int64=long long'"
+ with_mpiinc="$ff_MPI_INCLUDE"
+ test -z "$MPIRUN" && MPIRUN="$with_mpipath/bin/mpiexe.exe"
+ ff_MPI_LIBC="$with_mpilibs"
+ ff_MPI_LIB="$with_mpilibs"
+ ff_MPI_LIBFC="$with_mpilibs"
+ test -z "$MPICXX" && MPICXX="$CXX $ff_MPI_INCLUDE"
+ test -z "$MPIF77" && MPIF77="$F77 $ff_MPI_INCLUDE"
+ test -z "$MPIFC" && MPIFC="$FC $ff_MPI_INCLUDE"
+ test -z "$MPICC" && MPICC="$CC $ff_MPI_INCLUDE"
+ else
+ echo " #### no msmpi.dll => no mpi under windows .... (FH) " >&AS_MESSAGE_LOG_FD
+ echo " #### no msmpi.dll => no mpi under windows .... (FH) " >&AS_MESSAGE_FD
+ with_mpipath=no
+ with_mpi=no
+ fi
+else
+ with_mpipath=no
+fi
+
+
+AC_MSG_RESULT($ff_mpi_path)
+
+
+
+
+dnl correct ff_mpi_path august 2010 -- FH ...
+
+
+ff_save_cxx="$CXX"
+ff_save_libs="$LIBS"
+
+
+if test "$with_mpi" != no
+then
+ ff_mpi_path=`AS_DIRNAME(["$MPIRUN"])`
++<<<<<<< HEAD
+ dnl echo "ff_mpi_path '$ff_mpi_path' .............."
+ case "$ff_mpi_path" in
+ .|"") ff_mpi_path="$PATH";ff_defmpicxx="$ff_mpicxx";;
+ *) ff_mpi_path="$ff_mpi_path";ff_defmpicxx=`expr "//$ff_mpicxx" : '.*/\(.*\)'`;;
+ dnl if also add $PATH they could be missing some different mpi version...
++=======
++dnl echo "ff_mpi_path '$ff_mpi_path' .............."
++ case "$ff_mpi_path" in
++ .|"") ff_mpi_path="$PATH";ff_defmpicxx="$ff_mpicxx";;
++ *) ff_mpi_path="$ff_mpi_path";ff_defmpicxx=`expr "//$ff_mpicxx" : '.*/\(.*\)'`;;
++dnl if also add $PATH they could be missing some different mpi version...
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ esac
+ AC_ARG_VAR(MPICXX,[MPI C++ compiler command])
+ if test -z "$MPICXX" ; then
+ AC_PATH_PROGS(MPICXX,$ff_defmpicxx mpic++$ff_mpi_suffix mpicxx$ff_mpi_suffix mpiCC$ff_mpi_suffix mpCC hcp mpxlC mpxlC_r cmpic++,no,$ff_mpi_path)
+ AC_MSG_CHECKING(for MPICXX)
+ fi
+ ff_mpicxx="eval $MPICXX"
+ CXX=$ff_mpicxx
+ LIBS="$LIBS $ff_MPI_LIB"
++<<<<<<< HEAD
+ test -z "$ff_mpi" && ff_mpi=yes
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([
++=======
++
++ AC_LINK_IFELSE(
++[AC_LANG_SOURCE([
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+#include <mpi.h>
+#include <stdio.h>
+int main(int argc,char **argv){
+ char name[[BUFSIZ]];
+ int length;
+
+ MPI_Init(&argc, &argv);
+ MPI_Get_processor_name(name, &length);
+ printf("%s: hello world\n", name);
+ MPI_Finalize();
+ return 0;
++<<<<<<< HEAD
+}])],ff_mpi=yes,ff_mpi=no)
++=======
++}])],
++ff_mpi=yes,
++ff_mpi=no)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ AC_MSG_RESULT($ff_mpi)
+
+ # Also check that mpirun is there. If it isn't, then MPI is
+ # not fully installed.
+
+
+ if test "$ff_mpi" = yes;
+ then
+
+AC_MSG_CHECKING( MPI_DOUBLE_COMPLEX)
+
+ AC_COMPILE_IFELSE(
+[AC_LANG_SOURCE([
+#include <mpi.h>
+MPI_Datatype xxxx=MPI_DOUBLE_COMPLEX;
+])],
+ff_mpi_double_complex=yes,
+ff_mpi_double_complex=no)
+ AC_MSG_RESULT($ff_mpi_double_complex)
+if test "$ff_mpi_double_complex" = yes ; then
+AC_DEFINE(HAVE_MPI_DOUBLE_COMPLEX,1, mpi_double_complex)
+fi
+
+
+ echo "MPI CC $ff_mpi" >config_LIB_INFO
+
+ # We do not AC_DEFINE any special flag for parallel
+ # computation here, because it must only be set when the
+ # parallel program is compiled (see src/mpi/Makfile.am)
+ ff_mpiprog="FreeFem++-mpi${EXEEXT}"
+ AC_SUBST(MPIPROG,"$ff_mpiprog")
+ AC_SUBST(MPISCRIPT,"ff-mpirun")
+ AC_SUBST(MPIRUN,$MPIRUN)
+ AC_SUBST(MPICXX,$MPICXX)
+ else
+ AC_SUBST(MPICXX,$ff_save_cxx)
+ fi
+
+ if test "$ff_mpi" = yes;
+ then
+ if test "$enable_fortran" != no
+ then
+
+ AC_ARG_VAR(MPIF77,[MPI Fortran 77 compiler command])
+ if test -z "$MPIF77" ; then
+ AC_PATH_PROGS(MPIF77, mpif90$ff_mpi_suffix mpif77$ff_mpi_suffix hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c, "",$ff_mpi_path)
+ fi
+ AC_SUBST(MPIF77)
+ AC_ARG_VAR(MPIFC,[MPI Fortran 90 compiler command])
+ if test -z "$MPIFC" ; then
+ AC_PATH_PROGS(MPIFC, mpif90$ff_mpi_suffix mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c, "",$ff_mpi_path)
+ fi
+ AC_SUBST(MPIFC)
+ fi
+
++<<<<<<< HEAD
+ echo " ********************ffmpi= '$ff_mpi' ************* "
+ ff_MPI_INCLUDE="$with_mpiinc"
+ if test -z "$ff_mpitype" ; then
+ ff_mpishow=`$MPICXX -show` 2>/dev/null
+ ff_mpicshow=`$MPICC -show` 2>/dev/null
+ ff_mpifcshow=`$MPIFC -show` 2>/dev/null
+ if test "$with_mpilibs" = no -o -z "$with_mpilibs" ; then
+ [ff_MPI_INCLUDE=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-[^WLlOgp]|^-Wp,'|tr '\n' ' '`]
+ ff_MPI_LIB_DIRS=""
+ [ff_MPI_LIB=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`]
+ [ff_MPI_LIBC=`echo $ff_mpicshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`]
+ [ff_MPI_LIBFC=`echo $ff_mpifcshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|grep -v 'commons,use_dylibs' |tr '\n' ' '`]
+ [ff_mpi_idir=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include']
+ fi
+ [ff_mpi_idir=`echo $ff_MPI_INCLUDE|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include']
+ [ff_mpi_ldir=`echo $ff_MPI_LIB|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|sed -e 's/^-[Llp]//' -e 's/^-Wl,]//' |tr '\n' ' '`' /usr/lib']
+
+ if test -z "$ff_MPI_INCLUDE_DIR" ; then
+ for i in $ff_mpi_idir; do
+ if test -f "$i/mpi.h" -a -z "$ff_MPI_INCLUDE_DIR" ;then
+ ff_MPI_INCLUDE_DIR=$i
+ fi
+ done
+ fi
+ for i in $ff_mpi_ldir; do
+ ff_tmp=`ls $i/libmpi.*|head -1`
+ if test -f "$ff_tmp" -a -z "$ff_MPI_LIB_DIRS" ;then
+ ff_MPI_LIB_DIRS=$i
+ fi
+ done
+ fi
+ AC_SUBST(MPICXX,$MPICXX)
+ AC_ARG_VAR(MPICC,[MPI C compiler command in $ff_mpi_path])
+ if test -z "$MPICC" ; then
+ AC_PATH_PROGS(MPICC,mpicc$ff_mpi_suffix hcc mpcc mpcc_r mpxlc cmpicc, "",$ff_mpi_path)
+ fi
+ AC_SUBST(MPICC,$MPICC)
+ AC_SUBST(PASTIX_HOSTARCH,$ff_HOSTARCH_pastix)
+
+ if test ! -f "$ff_MPI_INCLUDE_DIR/mpif.h" ; then
+ AC_MSG_NOTICE([ MPI without fortran no file "$ff_MPI_INCLUDE_DIR/mpif.h" ])
+ else
+ if test -n "$MPIFC" ; then
+ AC_FF_ADDWHERELIB(mpifc,$ff_MPI_LIBFC,$ff_MPI_INCLUDE)
+ AC_FF_ADDWHERELIB(mpif77,$ff_MPI_LIBFC,$ff_MPI_INCLUDE)
++=======
++
++ ff_MPI_INCLUDE="$with_mpiinc"
++ ff_mpishow=`$MPICXX -show` 2>/dev/null
++ ff_mpicshow=`$MPICC -show` 2>/dev/null
++ ff_mpifcshow=`$MPIFC -show` 2>/dev/null
++ if test "$with_mpilibs" = no -o -z "$with_mpilibs" ; then
++ [ff_MPI_INCLUDE=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-[^WLlOgp]|^-Wp,'|tr '\n' ' '`]
++ ff_MPI_LIB_DIRS=""
++ [ff_MPI_LIB=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`]
++ [ff_MPI_LIBC=`echo $ff_mpicshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|tr '\n' ' '`]
++ [ff_MPI_LIBFC=`echo $ff_mpifcshow|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|grep -v 'commons,use_dylibs' |tr '\n' ' '`]
++ [ff_mpi_idir=`echo $ff_mpishow|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include']
++ fi
++ [ff_mpi_idir=`echo $ff_MPI_INCLUDE|tr ' ' '\n'| grep -E '^-I'|sed s/^-I//|tr '\n' ' '`' /usr/include']
++ [ff_mpi_ldir=`echo $ff_MPI_LIB|tr ' ' '\n'| grep -E '^-[Llp]|^-Wl,'|sed -e 's/^-[Llp]//' -e 's/^-Wl,]//' |tr '\n' ' '`' /usr/lib']
++
++ if test -z "$ff_MPI_INCLUDE_DIR" ; then
++ for i in $ff_mpi_idir; do
++ if test -f "$i/mpi.h" -a -z "$ff_MPI_INCLUDE_DIR" ;then
++ ff_MPI_INCLUDE_DIR=$i
++ fi
++ done
++ fi
++ for i in $ff_mpi_ldir; do
++ ff_tmp=`ls $i/libmpi.*|head -1`
++ if test -f "$ff_tmp" -a -z "$ff_MPI_LIB_DIRS" ;then
++ ff_MPI_LIB_DIRS=$i
++ fi
++ done
++
++ AC_SUBST(MPICXX,$MPICXX)
++ AC_ARG_VAR(MPICC,[MPI C compiler command in $ff_mpi_path])
++ if test -z "$MPICC" ; then
++ AC_PATH_PROGS(MPICC,mpicc$ff_mpi_suffix hcc mpcc mpcc_r mpxlc cmpicc, "",$ff_mpi_path)
++ fi
++ AC_SUBST(MPICC,$MPICC)
++ AC_SUBST(PASTIX_HOSTARCH,$ff_HOSTARCH_pastix)
++
++ if test ! -f "$ff_MPI_INCLUDE_DIR/mpif.h" ; then
++ AC_MSG_NOTICE([ MPI without fortran no file "$ff_MPI_INCLUDE_DIR/mpif.h" ])
++ else
++ if test -n "$MPIFC" ; then
++ AC_FF_ADDWHERELIB(mpifc,$ff_MPI_LIBFC,$ff_MPI_INCLUDE)
++ AC_FF_ADDWHERELIB(mpif77,$ff_MPI_LIBFC,$ff_MPI_INCLUDE)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+dnl [echo mpifc LD "'$ff_MPI_LIBFC'" >>$ff_where_lib_conf ]
+dnl [echo mpifc INCLUDE "'$ff_MPI_INCLUDE'" >>$ff_where_lib_conf ]
+dnl [echo mpif77 LD "'$ff_MPI_LIBFC'" >>$ff_where_lib_conf ]
+dnl [echo mpif77 INCLUDE "'$ff_MPI_INCLUDE'" >>$ff_where_lib_conf ]
++<<<<<<< HEAD
+ fi
+ fi
+ if test -n "$MPICXX" ; then
+ AC_FF_ADDWHERELIB(mpi,$ff_MPI_LIB,$ff_MPI_INCLUDE)
+dnl [echo mpi LD "'$ff_MPI_LIB'" >>$ff_where_lib_conf ]
+dnl [echo mpi INCLUDE "'$ff_MPI_INCLUDE'" >>$ff_where_lib_conf ]
+ fi
+ AC_SUBST(MPI_INC_DIR,$ff_MPI_INCLUDE_DIR)
+ AC_SUBST(MPI_INCLUDE,$ff_MPI_INCLUDE)
+ AC_SUBST(MPI_LIB_DIRS,$ff_MPI_LIB_DIRS)
+ AC_SUBST(MPI_LIB,$ff_MPI_LIB)
+ AC_SUBST(MPI_LIBC,$ff_MPI_LIBC)
+ AC_SUBST(MPI_LIBFC,$ff_MPI_LIBFC)
+ AC_SUBST(SKIP_TESTS_MPI,"no")
++=======
++ fi
++ fi
++ if test -n "$MPICXX" ; then
++ AC_FF_ADDWHERELIB(mpi,$ff_MPI_LIB,$ff_MPI_INCLUDE)
++dnl [echo mpi LD "'$ff_MPI_LIB'" >>$ff_where_lib_conf ]
++dnl [echo mpi INCLUDE "'$ff_MPI_INCLUDE'" >>$ff_where_lib_conf ]
++ fi
++ AC_SUBST(MPI_INC_DIR,$ff_MPI_INCLUDE_DIR)
++ AC_SUBST(MPI_INCLUDE,$ff_MPI_INCLUDE)
++ AC_SUBST(MPI_LIB_DIRS,$ff_MPI_LIB_DIRS)
++ AC_SUBST(MPI_LIB,$ff_MPI_LIB)
++ AC_SUBST(MPI_LIBC,$ff_MPI_LIBC)
++ AC_SUBST(MPI_LIBFC,$ff_MPI_LIBFC)
++ AC_SUBST(SKIP_TESTS_MPI,"no")
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ fi
+ CXX="$ff_save_cxx"
+ LIBS="$ff_save_libs"
+fi
+fi
+## clean on MPI variable if not MPI ...
+if test "$ff_mpi" != yes ; then
+
+ AC_SUBST(MPIRUN,"")
+ AC_SUBST(MPICC,"")
+ AC_SUBST(MPICXX,"")
+ AC_SUBST(MPIF77,"")
+ AC_SUBST(MPIFC,"")
+ AC_SUBST(MPI_INCLUDE,"")
+ AC_SUBST(MPI_LIB_DIRS,"")
+ AC_SUBST(MPI_LIB,"")
+ AC_SUBST(MPI_LIBC,"")
+ AC_SUBST(MPI_LIBFC,"")
+ AC_SUBST(SKIP_TESTS_MPI,"yes")
+ ff_mpi=no
+
+fi
+
+# Local Variables:
+# mode:shell-script
+# ispell-local-dictionary:"british"
+# coding:utf-8
+# End:
diff --cc acoptim.m4.orig
index 15b5f63,0000000..87bd0ad
mode 100644,000000..100644
--- a/acoptim.m4.orig
+++ b/acoptim.m4.orig
@@@ -1,255 -1,0 +1,258 @@@
+# Choosing debugging and/or optimization flags for compilation
+# ------------------------------------------------------------
+
+AC_ARG_ENABLE(profiling,[ --enable-profiling Turn on profiling])
+if test "$enable_profiling" = yes
+then
+ CXXFLAGS="$CXXFLAGS -pg"
+ LDFLAGS="$LDFLAGS -pg"
+fi
+
+if test "$enable_m64" = yes -a "$enable_m32"
+then
+ AC_MSG_ERROR([ Choose 32 or 64 architecture not the both ],1);
+fi
+AC_ARG_ENABLE(m64,[ --enable-m64 Turn on 64 bits architecture])
+if test "$enable_m64" = yes
+then
+ ff_m64=-m64
+ CHECK_COMPILE_FLAG(C,$ff_m64,CFLAGS)
+ CHECK_COMPILE_FLAG(C,$ff_m64,CNOFLAGS)
+ CHECK_COMPILE_FLAG(C++,$ff_m64,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,$ff_m64,FFLAGS)
+# add -fPIC on on 64 architecture
+ CHECK_COMPILE_FLAG(C,-fPIC,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-fPIC,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-fPIC,FFLAGS)
+
+fi
+AC_ARG_ENABLE(m32,[ --enable-m32 Turn on 32 bits architecture])
+if test "$enable_m32" = yes
+then
+ ff_m32=-m32
+ CHECK_COMPILE_FLAG(C,$ff_m32,CFLAGS)
+ CHECK_COMPILE_FLAG(C,$ff_m32,CNOFLAGS)
+ CHECK_COMPILE_FLAG(C++,$ff_m32,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,$ff_m32,FFLAGS)
+# add -fPIC on on 64 architecture
+# CHECK_COMPILE_FLAG(C,-fPIC,CFLAGS)
+# CHECK_COMPILE_FLAG(C++,-fPIC,CXXFLAGS)
+# CHECK_COMPILE_FLAG(Fortran 77,-fPIC,FFLAGS)
+
+fi
+
+# Debug mode (no optimisation)
+# ----------------------------
+
+AC_MSG_CHECKING(whether to generate debugging information)
+
+AC_ARG_ENABLE(debug,[ --enable-debug Turn on debug versions of FreeFem++])
+AC_ARG_ENABLE(optim,[ --enable-optim Turn on compiler optimization])
+
+if test "$enable_debug" = yes;
+then
+
+ AC_MSG_RESULT(yes)
+ CFLAGS="`echo $CFLAGS | sed 's/-O2//g'`"
+ FFLAGS="`echo $FFLAGS | sed 's/-O2//g'`"
+ CXXFLAGS="`echo $CXXFLAGS | sed 's/-O2//g'`"
+ CHECK_COMPILE_FLAG(C,-g,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-g,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-g,FFLAGS)
+
+else
+ AC_MSG_RESULT(no)
+
+ # No debugging information in optimized code
+
+ CFLAGS="$CFLAGS -DNDEBUG"
+ FFLAGS="$FFLAGS -DNDEBUG"
+ CXXFLAGS="$CXXFLAGS -DNDEBUG"
+fi
+
+# Hardware-independant optimization
+# ---------------------------------
+
+if test "$enable_debug" != yes -a "$enable_optim" != no;
+then
+ CHECK_COMPILE_FLAG(C,-O3,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-O3,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-O3,FFLAGS)
+fi
+
+AC_ARG_ENABLE(generic,
+[ --enable-generic Turn off hardware-dependant optimization options])
+
+# FFCS: remove "-mcpu=common" to allow other hardware-dependant values of cpu for PowerPC - thank you Fred (20/02/11)
+
+if test $enable_ffcs = yes
+then
+ # Generic code
+ if test "$enable_debug" != yes \
+ -a "$enable_optim" != no \
+ -a "$enable_generic" = yes
+ then
+ CHECK_COMPILE_FLAG(C,-mcpu=common,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-mcpu=common,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-mcpu=common,FFLAGS)
+ fi
+fi
+
+# Hardware-dependant optimization
+# -------------------------------
+
+if test "$enable_debug" != yes \
+ -a "$enable_optim" != no \
+ -a "$enable_generic" != yes
+then
+
+# Autoconf always chooses -O2. -O2 in gcc makes some functions
+# disappear. This is not ideal for debugging. And when we optimize, we
+# do not use -O2 anyway.
+
+CFLAGS="`echo $CFLAGS | sed 's/-O2//g'`"
+FFLAGS="`echo $FFLAGS | sed 's/-O2//g'`"
+CXXFLAGS="`echo $CXXFLAGS | sed 's/-O2//g'`"
+
+ # MacOS X Darwin
+ if test -x /usr/bin/hostinfo
+ then
+
+
+ # If we are on MacOS X to choise the optimisaztion
+ AC_MSG_CHECKING(GCC version)
+
+ ff_gcc4=`$CC --version |awk ' NR==1 {print $3}'|sed -e 's/\..*$//'`
+ ff_clang=`$CC --version |awk '/clang/ {print $4}'`
+ if test -n "$ff_clang" ; then ff_gcc4="llvm"; fi
+ AC_MSG_RESULT($ff_gcc4)
+
+ # At the moment, we do not know how to produce correct
+ # optimizated code on G5.
+ AC_MSG_CHECKING(PowerPC architecture)
+ ff_machine=`/usr/bin/machine`
+ ff_fast="-O3"
+ if test -n "$ff_clang" ; then
+ ff_fast='-O3 -fPIC'
+ elif test `uname` = Darwin
+ then
+ # Optimization flags: -fast option do not work because the
+ # -malign-natural flags create wrong IO code
+ if test "$ff_gcc4" -eq 4
+ then
+ ff_fast='-fast -fPIC'
+ else
+ ff_fast='-fPIC -O3 -funroll-loops -fstrict-aliasing -fsched-interblock -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-jumps-max-skip=15 -falign-loops-max-skip=15 -ffast-math -mpowerpc-gpopt -force_cpusubtype_ALL -fstrict-aliasing -mpowerpc64 '
+ fi
+ fi
+
+
+ # CPU detection
+
+ case $ff_machine in
+ ppc7450) # G4
+ ff_fast="$ff_fast -mtune=G4 -mcpu=G4";;
+ ppc970) # G5
+ # remove -fstrict-aliasing on G5 to much optim the
+ # code cash in GC
+ ff_fast="`echo $ff_fast -mtune=G5 -mcpu=G5| sed 's/-fstrict-aliasing //g'`";;
+ ppc*) # G3 ????
+ ff_fast="-O3";;
+ i486)
+ ff_fast="-O3 $ff_fast";;
++<<<<<<< HEAD
+ x86_64*)
+ ff_fast="-O3 $ff_fast";;
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ *)
+ AC_MSG_ERROR(cannot determine apple cpu type )
+ ff_fast="-O3";;
+ esac
+
+
+ AC_MSG_RESULT($ff_fast)
+
+ CHECK_COMPILE_FLAG(C,$ff_fast,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,$ff_fast,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,$ff_fast,FFLAGS)
+
+
+ # Linux
+ elif test -f /proc/cpuinfo
+ then
+
+ # Specific processors
+ proc_type=unknown
+ ff_optim_type=
+ if test `grep 'Pentium III (Coppermine)' /proc/cpuinfo|wc -l` -gt 0
+ then
+ proc_type=pentium3
+ ff_optim_type=-P3
+ elif test `grep 'Intel(R) Pentium(R) III ' /proc/cpuinfo|wc -l` -gt 0
+ then
+ proc_type=pentium3
+ ff_optim_type=-P3
+ elif test `grep 'Intel(R) Pentium(R) 4 ' /proc/cpuinfo|wc -l` -gt 0
+ then
+ proc_type=pentium4
+ ff_optim_type=-P4
+ elif test `grep 'Intel(R) Xeon(TM) CPU' /proc/cpuinfo|wc -l` -gt 0
+ then
+ proc_type=pentium4
+ ff_optim_type=-P4
+ elif test `grep 'AMD Athlon(tm) Processor' /proc/cpuinfo|wc -l` -gt 0
+ then
+ proc_type=athlon
+ ff_optim_type=-Athlon
+ elif test `grep 'AMD Athlon(tm) XP' /proc/cpuinfo|wc -l` -gt 0
+ then
+ proc_type=athlon-xp
+ ff_optim_type=-AthlonXP
+ fi
+
+ if test "$proc_type" != unknown
+ then
+ CHECK_COMPILE_FLAG(C,-march=$proc_type,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-march=$proc_type,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-march=$proc_type,FFLAGS)
+ fi
+
+ # If we did not find a processor type (this happens with
+ # cygwin), try and select separate capabilities instead.
+
+ if test "$proc_type" = unknown
+ then
+ if test `grep -e '^flags.*mmx' /proc/cpuinfo|wc -l` -gt 0
+ then
+ CHECK_COMPILE_FLAG(C,-mmmx,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-mmmx,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-mmmx,FFLAGS)
+ fi
+ if test `grep -e '^flags.*sse ' /proc/cpuinfo|wc -l` -gt 0
+ then
+ CHECK_COMPILE_FLAG(C,-msse,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-msse,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-msse,FFLAGS)
+ fi
+ if test `grep -e '^flags.*sse2' /proc/cpuinfo|wc -l` -gt 0
+ then
+ CHECK_COMPILE_FLAG(C,-msse2,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-msse2,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-msse2,FFLAGS)
+ fi
+ if test `grep -e '^flags.*3dnow' /proc/cpuinfo|wc -l` -gt 0
+ then
+ CHECK_COMPILE_FLAG(C,-m3dnow,CFLAGS)
+ CHECK_COMPILE_FLAG(C++,-m3dnow,CXXFLAGS)
+ CHECK_COMPILE_FLAG(Fortran 77,-m3dnow,FFLAGS)
+ fi
+ fi
+ fi
+fi
+
+# Defines a variable containing the optimization type, to be used in
+# binary archive names. It may be empty if only generic optimization
+# is used.
+
+AC_SUBST(OPTIM_TYPE,$ff_optim_type)
diff --cc build/download.orig
index 1409dab,0000000..c701ce5
mode 100755,000000..100755
--- a/build/download.orig
+++ b/build/download.orig
@@@ -1,78 -1,0 +1,82 @@@
+#!/bin/bash -e
+# ======================================================================
+# Written by Antoine Le Hyaric
+# Laboratoire Jacques-Louis Lions
+# Université Pierre et Marie Curie-Paris6, UMR 7598, Paris, F-75005 France
+# http://www.ljll.math.upmc.fr/lehyaric
+# ======================================================================
+# This file is part of Freefem++
+#
+# Freefem++ is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# Freefem++ is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Freefem++; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+# ======================================================================
+# headeralh freefem shellxe start=21/10/10 upmc
+
+# Download a file by whatever means available
+# -------------------------------------------
+
+# $1=url
+# $2=local name
+# $3=BAD_CERT if the SSL certificate of the web server is wrong
+
+if test -x /usr/bin/wget || test -x /opt/local/bin/wget
+then
+
+ opts=
+ if test "$3" = BAD_CERT
+ then
+ opts=--no-check-certificate
+ fi
+
+ # use no-verbose to avoid mixing several wget outputs together when called concurrently in
+ # [[file:../download/getall]]
+
+ wget "$1" --output-document="$2" --no-verbose $opts
+ ret=$?
+elif test -x /usr/bin/curl
+then
++<<<<<<< HEAD
+ curl -L "$1" --output "$2"
++=======
++ curl "$1" --output "$2"
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ ret=$?
+
+elif test -x /usr/bin/GET
+then
+ GET "$1" > "$2"
+ ret=$?
+else
+ echo FF download: No way to download files from the web
+ echo FF download: Please install wget or curl or GET
+exit 1
+fi
+if test "$ret" -eq 0
+then
+ case `file $2` in
+ *zip*) exit 0 ;;
+ *) echo " incorrect file type => remove " $3;
+ rm $3;
+ exit 1 ;;
+ esac
+fi
+echo "Error download $3" ;
+exit $ret
+
+# Local Variables:
+# mode:shell-script
+# ispell-local-dictionary:"british"
+# coding:utf-8
+# End:
diff --cc configure.ac.orig
index f807bca,0000000..ee4a075
mode 100644,000000..100644
--- a/configure.ac.orig
+++ b/configure.ac.orig
@@@ -1,1984 -1,0 +1,2082 @@@
++<<<<<<< HEAD
++=======
++# Configuration script using Automake + Autoconf for FreeFem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+# ------------------------------------------------------------
+
+# Antoine Le Hyaric - LJLL Paris 6 - lehyaric at ann.jussieu.fr - 13/5/04
+# $Id: configure.ac,v 1.338 2010/05/10 21:35:07 hecht Exp $
+
+# Version numbering: x.xx-pp where "pp" is the package version (when
+# the same FreeFem++ version is packaged several times). For
+# coherency, this should have the same value as the top-most package
+# number in debian/changelog.
+
+
++<<<<<<< HEAD
+AC_INIT(FreeFem++,3.34-1,hecht at ann.jussieu.fr,freefem++)
++=======
++AC_INIT(FreeFem++,3.32-1,hecht at ann.jussieu.fr,freefem++)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+dnl : ${CFLAGS=""}
+dnl : ${CXXFLAGS=""}
+dnl : ${FCFLAGS=""}
+dnl : ${FFLAGS=""}
+
+# progg test expact under windows
+ff_TEST_FFPP="../src/nw/FreeFem++"
+
+AC_PREREQ(2.50) dnl for AC_LANG_CASE
+dnl AC_CONFIG_SRCDIR(src/FreeFem++-CoCoa)
+
+# Automake 1.11 is too old for check ...
+
+# ALH - 10/9/13 - FFCS needs to skip this automake version requirement when compiling on older platforms (eg cygwin or
+# last Ubuntu LTS). So we fix a low hardcoded requirement and test for higher versions when not in FFCS.
+
+AM_INIT_AUTOMAKE(1.11 dist-zip)
+
+if test "$enable_ffcs" != yes
+then
+ if test `echo $am__api_version|awk '{if($1>1.13)print "ok";}'` != ok
+ then
+ AC_MSG_ERROR([Automake version needs to be 1.13 or later to enable "make check"])
+ fi
+fi
+
+AC_CONFIG_HEADERS(config.h)
+AC_PROG_MAKE_SET
+dnl AM_COLOR_TESTS=always
+AC_PROG_RANLIB
+
+ff_where_lib_conf=examples++-load/WHERE_LIBRARY-config
+dnl search of associad software
+m4_define([AC_FF_ADDWHERELIB],
+ [ if test -z "$ff_where_lib_conf_$1" ; then
+ echo "$1 LD $2" >>$ff_where_lib_conf
+ test -n "$3" && echo "$1 INCLUDE $3 " >>$ff_where_lib_conf
+ ff_where_lib_conf_$1=1
+ AC_MSG_NOTICE([ ++ add $1 : $2 $3 in $ff_where_lib_conf "])
+ else
+ AC_MSG_NOTICE([ -- do not add $1 : $2 $3 in $ff_where_lib_conf "])
+ fi
+]) dnl
+m4_define([AC_FF_WHERELIB],
+ [ if test -z "$ff_where_lib_conf_$1" ; then
+ AC_MSG_CHECKING(check $1)
+ ff_save_libs=$LIBS
+ LIBS="$LIBS $2 $4"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([m4_if($3,,,[#include <$3>])],[])], [ff_WHERE=yes],[ff_WHERE=no])
+ if test "$ff_WHERE" = "yes" ; then
+ echo "$1 LD $2" >>$ff_where_lib_conf
+ ff_WHERE_INC=`AS_DIRNAME(["$3"])`
+ case "$ff_WHERE_INC" in
++<<<<<<< HEAD
+ /*) echo "$1 INCLUDE -I$ff_WHERE_INC" >>$ff_where_lib_conf ;;
++=======
++ /*)e cho "$1 INCLUDE -I$ff_WHERE_INC" >>$ff_where_lib_conf ;;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ esac
+ fi
+ AC_MSG_RESULT($ff_WHERE)
+
+ ff_where_lib_conf_$1=1
+ LIBS=$ff_save_libs
+ fi
+ ])dnl end m4_define AC_FF_WHERELIB
+
+
+ff_HOSTARCH_pastix=
+echo "# Build with freefem++ with ./configure " `date` >$ff_where_lib_conf
+# To allow anonymous CVS version to contain a "./configure" and
+# Makefiles
+
+AM_MAINTAINER_MODE
+
+echo >config_LIB_INFO
+
+# Necessary compilers
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_LANG(C++)
++<<<<<<< HEAD
+if test `uname` != Darwin; then
+ ff_ldeg="-Wl,--end-group"
+ ff_ldbg="-Wl,--start-group"
+fi
+
+
+
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+AC_CHECK_PROG(ff_m4,m4,yes,no)
+AC_CHECK_PROG(ff_bison,bison,yes,no)
+dnl AC_CHECK_PROG(ff_cmake,cmake,yes,no)
+AC_CHECK_PROG(ff_patch,patch,yes,no)
+case "$ff_m4 $ff_bison $ff_patch " in
+*no*)
+ AC_MSG_NOTICE([ to install missing package under debian or ubuntu, try: sudo apt-get install m4 bison patch cmake ])
+ AC_MSG_ERROR([ Sorry missing m4,bison,patch command !]);;
+esac
+
+
+if test -z "$CXX"; then
+ AC_MSG_NOTICE( [ fatal error : c++ compiler ! ] );
+ AC_MSG_ERROR([ Sorry no c++ compiler !])
+fi
+
+AC_COMPUTE_INT(ff_size_long,[sizeof(long)])
+AC_COMPUTE_INT(ff_size_int,[sizeof(int)])
+AC_COMPUTE_INT(ff_size_ptr,[sizeof(int*)])
+
+AC_SUBST(SIZEOF_LONG,$ff_size_long)
+AC_SUBST(SIZEOF_INT,$ff_size_int)
+AC_SUBST(SIZEOF_PTR,$ff_size_ptr)
+if test "$ff_size_ptr" -eq 4 ;then
+ AC_SUBST(SIZEOF_PTRINBIT,32)
+elif test "$ff_size_ptr" -eq 8 ;then
+ AC_SUBST(SIZEOF_PTRINBIT,64)
+else
+ AC_MSG_NOTICE( [ fatal error : sizeof pointer $ff_size_ptr ! or no c++ compiler: $CXX] );
+ AC_MSG_ERROR([ Sorry sizeof c++ pointer $ff_size_ptr are not 4 or 8 ])
+fi
+
+# FFCS - build the code for FreeFem++-cs
+AC_ARG_ENABLE(ffcs,AC_HELP_STRING([--enable-ffcs],[build FreeFem++ for use by FreeFem++-cs]))
+if test "$enable_ffcs" = yes
+then
+ AC_DEFINE_UNQUOTED(ENABLE_FFCS,$enable_ffcs,[build FreeFem++ for use by FreeFem++-cs])
+else
+ enable_ffcs=no
+fi
+AC_SUBST(ENABLE_FFCS,"$enable_ffcs")
+AM_CONDITIONAL([ENABLE_FFCS],[test $enable_ffcs = yes])
+
+# dur dur car sous MacOsX le fortran n'est pas standard.
+ff_AR="ar"
+ff_ARFLAGS="rv"
+ff_RANLIB="ranlib"
+AC_ARG_ENABLE(fortran,AC_HELP_STRING([--disable-fortran],[No Fortran compiler available ( ARPACK need it)]))
+
+ff_g2c_lib="";
+if test "$enable_fortran" != no
+then
+
+ # ALH-FFCS-2/3/10: add gfortran-mp-4.4 for MacPorts on MacOS 10.6
+ AC_PROG_FC(gfortran f90 xlf90 g95 gfortran-mp-4.4)
+ AC_PROG_F77(gfortran f90 xlf xlf90 g95 f77 fort77 "$FC" gfortran-mp-4.4)
+
+# if test -n "$F77"
+# then
+ ff_flibs=""
+ # modif FH
+ AC_F77_LIBRARY_LDFLAGS
+ dnl AC_F77_WRAPPERS
+ # correct pb of double def under macos
+ case $F77 in
+ *fort77)
+ if test -z "$FLIBS" ; then
+# FLIBS=`fort77 -v a.out 2>&1|awk '/a.out/ && /fort77/ { print $(NF-2),$(NF-1)}'`
+# FH to remove " "
+ FLIBS=`fort77 -v a.out 2>&1|awk '/a.out/ && /fort77/ { print "echo",$(NF-2),$(NF-1)}'|sh`
+
+ AC_MSG_WARN([ fort77 FLIBS : $FLIBS ])
+ fi
+ ;;
+ *g77)
+ for i in $FLIBS; do
+ case $i in
+# save last directory of the list
+ -L*)
+ d=`expr $i : '-L\(.*\)'`;
+ echo " try $d "
+ if test -e "$d/libg2c.so" ; then
+ ff_flibs="$d/libg2c.so"
+ elif test -e "$d/libg2c.dylib" ; then
+ ff_flibs="$d/libg2c.dylib"
+ elif test -e "$d/libg2c.a" ; then
+ ff_flibs="$d/libg2c.a"
+ elif test -e $d/libg2c.so -o -e $d/libg2c.a ; then
+ ff_flibs="$i"
+ fi;;
+ esac
+ done
+ if test -e "$ff_flibs" ;then
+ FLIBS="$ff_flibs"
+ else
+ FLIBS="$ff_flibs -lg2c"
+ fi
+ AC_MSG_WARN([ get dir of -lg2c FLIBS : $FLIBS ])
+ ;;
+# add FH sep 2006 / modif 2009
+ *gfortran)
+ for i in $FLIBS; do
+ case $i in
+ -L*)
+ d=`expr $i : '-L\(.*\)'`;
+ if test -e "$d/libgfortran.so" ; then
+ ff_flibs="$d/libgfortran.so"
+ elif test -e "$d/libgfortran.dylib" ; then
+ ff_flibs="$d/libgfortran.dylib"
+ elif test -e "$d/libgfortran.a" ; then
+ ff_flibs="$d/libgfortran.a"
+ elif test -e $d/libgfortran.so -o -e $d/libgfortran.a -o -e $d/libgfortran.dylib ; then
+ ff_flibs="$i"
+ fi;;
+ esac
+ done
+ if test -e "$ff_flibs" ;then
+ FLIBS="$ff_flibs"
+ else
+ FLIBS="$ff_flibs -lgfortran"
+ fi
+ AC_MSG_WARN([ get dir of -lgfortran FLIBS : $FLIBS ])
+ ;;
+ esac
+ AC_ARG_WITH(flib,[ --with-flib= the fortran library ])
+# correct FH sep 2006 -o -> -a
+ if test "$with_flib" != no -a -n "$with_flib"
+ then
+ ff_g2c_lib="$with_flib"
+ FLIBS="$with_flib"
+ fi
+# add FH oct 2007 for download f2c
+ if test -z "$F77" ; then
+ ff_f77=`pwd`/download/bin/fort77
+ ff_flibs=`pwd`/download/lib/libf2c.a
+ if test -x $ff_f77 -a -f $ff_flibs ; then
+ AC_MSG_WARN([ no fortran, but find download f2c/fort]);
+ F77=$ff_f77
+ FLIBS=$ff_flibs
+ else
+ AC_MSG_NOTICE( [ fatal error : no fortran ] );
+ AC_MSG_NOTICE( [add --disable-fortran ] );
+ AC_MSG_NOTICE( [or try to compile f2c in directory download/f2c ] );
+ AC_MSG_NOTICE( [ just do: make install ] );
+ AC_MSG_ERROR([ Fatal error No Fortran compiler . ],1);
+ fi
+ fi
+# check if the FLIBS is correct
+ ff_libs="$LIBS"
+ LIBS="$ff_libs $FLIBS"
+ AC_TRY_LINK_FUNC(exit,ff_err=,ff_err=ok);
+ if test "$ff_err" = "ok" ; then AC_MSG_ERROR([ Fatal FLIBS: $FLIBS is incorrect. ],1); fi
+ LIBS="$ff_libs"
+ echo "F77 LD $ff_libs" >config_LIB_INFO
+
+ AC_MSG_CHECKING([ Size of fortran 77 integer ])
+
+
+
+## AC_LANG(fortran);
+ AC_LANG_PUSH([Fortran 77])
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ program test
+ integer p,i
+ p=1024*1024
+ i= p*p
+ open(7,file="conftest.out")
+ if (i>0) then
+ write(7,*) 8
+ else
+ write(7,*) 4
+ endif
+ close(7)
+ end
+ ]])] ,ff_f77intsize=`cat conftest.out`,ff_f77intsize=4,ff_f77intsize=4)
+## AC_LANG(C++)
+ AC_LANG_POP([Fortran 77])
+ AC_MSG_RESULT($ff_f77intsize)
+ AC_F77_WRAPPERS
+
+ ff_cfagsf77=""
+ case $ac_cv_f77_mangling in
+# "lower case, no underscore, no extra underscore")
+# "lower case, no underscore, extra underscore")
+# ;;
+ "lower case, underscore, no extra underscore") ff_cfagsf77="-DAdd_";;
+ "lower case, underscore, extra underscore") ff_cfagsf77="-DAdd__ -Df77IsF2C";;
+ "upper case, no underscore, no extra underscore") ff_cfagsf77="-DUPPER";;
+ "upper case, no underscore, extra underscore") ff_cfagsf77="-DUPPER -DAdd__";;
+ "upper case, underscore, no extra underscore") ff_cfagsf77="-DUPPER -DAdd_";;
+ "upper case, underscore, extra underscore") ff_cfagsf77="-DUPPER -DAdd__";;
+ *) ;;
+ esac
+ AC_SUBST(CFLAGSF77,$ff_cfagsf77)
+ if test $ff_f77intsize -ne 4
+ then
+ AC_MSG_ERROR([ Fatal Error: Your fortran 77 compiler have by not 4 bytes integer ( $ff_f77intsize bytes) ],1);
+ fi
+ test -f /mingw/bin/libpthread-2.dll && ff_pthread_dll=/mingw/bin/libpthread-2.dll ; \
+ AC_FF_ADDWHERELIB(f77,$FLIBS,$ff_cfagsf77 $ff_pthread_dll)
+ AC_FF_ADDWHERELIB(fc,$FLIBS,$ff_cfagsf77 $ff_pthread_dll)
+fi
+
+# fin test FORTRAN ..........
+# ----------------------------
+
+AC_ARG_ENABLE(c,AC_HELP_STRING([--disable-c],[No C compiler available (C BLAS need it)]))
+if test "$enable_c" != no
+then
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+else
+
+ # We need to define this otherwise ./configure crashes with
+ # the message "configure: error: conditional "am__fastdepCC"
+ # was never defined".
+
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+fi
+
+AM_PROG_LEX
+AC_PROG_YACC
+AC_LANG(C++)
+
+
+# Some useful libraries
+
+AC_CHECK_LIB(pthread,pthread_create,ff_pthread="-lpthread",ff_pthread="")
++<<<<<<< HEAD
+AC_CHECK_LIB(iomp5,omp_get_wtime,ff_iomp5="-liomp5",ff_iomp5="")
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+if test -n "$ff_pthread" ; then
+ AC_FF_ADDWHERELIB(pthread,$ff_pthread,)
+fi
+
+# Necessary absolute pathname for local directory when some libraries
+# are used from several different locations (for instance locally in
+# configure.ac and in a subdir).
+curdir=`pwd`
+
+# Configure options
+# -----------------
+
+echo $ac_configure_args > configure.param
+# by default the suffix of the .so lib file is .so
+# it is .dll under windows
+# it is .dylib under macos X
+ff_suffix_dylib="so";
+# Checking wether we can produce a MacIntosh-specific version
+# -----------------------------------------------------------
+
+AC_MSG_CHECKING(wether we are on a MacIntosh)
+ff_mac=no
+if test `uname` = Darwin;
+then
+ ff_HOSTARCH_pastix=i686_mac
+ ff_suffix_dylib="dylib"
+ ff_mac=yes
+AC_DEFINE_UNQUOTED(FF_PREFIX_DIR_APPLE,"/Applications/FreeFem++.app/Contents/",FreeFem prefix dir)
+fi
+AC_MSG_RESULT($ff_mac)
+
+AC_MSG_CHECKING(wether we are on SunOS)
+ff_sunos=no
+if test `uname -s` = SunOS;
+then
+ ff_sunos=yes
+fi
+AC_MSG_RESULT($ff_sunos)
+
+# Checking wether we can produce a Microsoft Windows-specific version
+# -------------------------------------------------------------------
+
+AC_ARG_ENABLE(cygwindll,
+ [ --enable-cygwindll Forces the use of the Cygwin DLL (not recommended)])
+
+AC_MSG_CHECKING(wether we are on Microsoft Windows)
+ff_uname=`uname`
+# flag to build window 32 version ff_mingw = yes
+ff_mingw=no
+case $ff_uname in
+ CYGWIN*)
+
+ # FFCS - 17/1/12 - -mno-cygwin is not recognised by the latest version of mingw32
+ if test $enable_ffcs = no
+ then
+ ff_nocygwin=-mno-cygwin
+ fi
+
+ AC_SUBST(GCCNOCYGWIN,$ff_nocygwin);;
+ MINGW*)
+ enable_cygwindll=no;;
+esac
+case $ff_uname in
+CYGWIN*|MINGW*)
+
+ ff_suffix_dylib="dll";
+ ff_win32=yes;
+
+ # FFCS - 8/3/12 - remove -D_MSC_VER under MinGW64 because it forces system calls to be compiled into any object
+ # (which creates thousands of duplicate definitions for sytem calls like time()).
+
+ if test $enable_ffcs = yes
+ then
+ AC_SUBST(FFMETIS_CFLAGS,"-D__VC__")
+ else
+ AC_SUBST(FFMETIS_CFLAGS,"-D__VC__ -D_MSC_VER")
+ fi
+
+ # We need Mingw to avoid Cygwin's extra DLLs
+ if test "$enable_cygwindll" != yes
+ then
+# CHECK_COMPILE_FLAG(C++,-mwindows,CXXFLAGS)
+ ff_glut_ok=yes
+
+ # FFCS: on Windows, FF crashes when compiling GL/glut.h and the option "--disable-opengl" is not
+ # operational because ff_glut_ok is forced to yes here.
+ if test $enable_ffcs = yes
+ then
+ ff_glut_ok=no
+ enable_opengl=no
+ fi
+
+ ff_mingw=yes
+ enable_cygwindll=no;
+ ff_pthread="-mthreads"
+
+ # FFCS does not use the Cygwin MinGW compilers any more
+ if test $enable_ffcs = no
+ then
+ CXXFLAGS="$CXXFLAGS $ff_nocygwin -I/usr/include/mingw"
+ FFLAGS="$FFLAGS $ff_nocygwin"
+ CFLAGS="$CFLAGS $ff_nocygwin -I/usr/include/mingw"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a;])],[],
+ [ff_nocygwin="";
+ AC_MSG_NOTICE([Sorry $ff_nocygwin optio is wrong try whitout , but try with gcc-3.3])
+ ])
+ CXXFLAGS="$CXXFLAGS $ff_nocygwin -I/usr/include/mingw"
+ FFLAGS="$FFLAGS $ff_nocygwin"
+ CFLAGS="$CFLAGS $ff_nocygwin -I/usr/include/mingw"
+ CNOFLAGS="$CNOFLAGS $ff_nocygwin -I/usr/include/mingw"
+ fi
+
+ LIBS="$LIBS $ff_nocygwin -mthreads -lws2_32 -lcomdlg32"
+ LIBSNOCONSOLE="-mwindows"
+
+ # FFCS uses a specific compiler, so we specify its libraries explicitely
+ if test $enable_ffcs = no
+ then
+ test -z "$MPIRUN" && MPIRUN=`which mpiexe.exe`
+ if test "$enable_fortran" != no -o "$with_flib" != no ; then
+ case "$F77" in
+ *gfortran) FLIBS="$ff_nocygwin -lgfortran";;
+ *g77) FLIBS="$ff_nocygwin -lg2c";;
+ *) AC_MSG_ERROR([ Sorry no known FLIBS with this $F77 !]) ;;
+ esac
+ fi
+ fi
+
+ ff_glutname="glut32"
+ # check abort a existing function just to find in glut32.dll exist in the path
+ # because glutInit is not the real symbol on win32 dur dur FH !!!!!!!!!
+ AC_CHECK_LIB(glut32,abort,ff_glut="-l$ff_glutname -mthreads -lglu32 -lopengl32",ff_glut="")
+ if test -z "$ff_glut" ; then
+ ff_glutname="freeglut"
+ AC_CHECK_LIB(freeglut,abort,ff_glut="-l$ff_glutname -mthreads -lglu32 -lopengl32",ff_glut_ok=no)
+ fi
+ # Resources for FreeFem++-cs in Microsoft Windows format
+ AC_SUBST(FFGLUTNAME,$ff_glutname)
+ AC_SUBST(WINDRESOBJ,windres.o)
+ AC_SUBST(LIBSNOCONSOLE,$LIBSNOCONSOLE)
+ AC_SUBST(WIN32DLLTARGET,win32-dll-target)
+ ff_TEST_FFPP="../src/bin-win32/FreeFem++.exe"
+ AC_DEFINE(PURE_WIN32,1,A pure windows applications no cygwin dll)
+ ff_dynload=yes
+ fi
+
+
+ ;;
+*)ff_win32=no;;
+esac
+AC_MSG_RESULT($ff_win32)
+
+if test "$ff_win32" = no
+then
+ enable_cygwindll=no
+fi
+
+# FreeFem++-specific version information
+# --------------------------------------
+
+# Version numbering, converted to a floating point value
+ff_numver="`echo $VERSION|sed 's/-\(.*\)/+\1.0*0.000001/'`"
+AC_DEFINE_UNQUOTED(VersionFreeFempp,$ff_numver,FreeFem++ version as a float)
+
+# Since src/fflib/strversionnumber.cpp is recreated at each build, this
+# date is only useful for config-version.h
+
+test "$prefix" = NONE && prefix="$ac_default_prefix"
+ff_prefix_dir="${prefix}/lib/ff++/$VERSION"
+AC_MSG_CHECKING(prefix dir freefem++ )
+AC_MSG_RESULT($ff_prefix_dir)
+
+FF_DATE=`date`
+AC_DEFINE_UNQUOTED(VersionFreeFemDate,"$FF_DATE",FreeFem++ build date)
+AC_DEFINE_UNQUOTED(FF_PREFIX_DIR,"${ff_prefix_dir}",FreeFem prefix dir)
+AC_SUBST(ff_prefix_dir,$ff_prefix_dir)
+
+# Separate configuration header file for version information, included
+# in config-macos9.h
+
+cat << EOF > config-version.h
+/* FreeFem++ version information for MacOS 9 configuration */
+/* File generated by configure.ac */
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "$PACKAGE_STRING"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+
+/* Version number of package */
+#define VERSION "$VERSION"
+
+/* FreeFem++ build date */
+#define VersionFreeFemDate "$FF_DATE"
+
+/* FreeFem++ version as a float */
+#define VersionFreeFempp ($ff_numver)
+EOF
+
+# Checking wether to produce a debug version
+# ------------------------------------------
+
+# Generic or hardware-dependant optimization
+m4_include(acmacros.m4)
+m4_include(acoptim.m4)
++<<<<<<< HEAD
+m4_include(ax_lib_hdf5.m4)
+m4_include(ax_lib_gsl.m4)
+# Checking c++11 for schwarz interface of P. Jolivet ...
+
+CHECK_COMPILE_FLAG(C++,[-std=c++11],CXXFLAGS,ff_cxx11)
+dnl CXXFLAGS="$CXX11FLAGS $CXXFLAGS"
+dnl ff_cxx11="no"
+dnl if test -n "$CXX11FLAGS" ; then ff_cxx11="yes" ; fi
+AC_SUBST(WITH_CXX11,$ff_cxx11)
+#end Checking c++11
++=======
++
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+# ------------------------------
+# compilation flags of FreeFem++
+# ------------------------------
+# -DDRAWING bamg active some drawing facility in bamg (inquire mesh)
+# -DBAMG_LONG_LONG active the use of long long in bamg
+# -DDEBUG active the checking in bamg
+# -DNCHECKPTR remove check pointer facility
+# -DCHECK_KN active subscripting of some array
+# -DWITHCHECK of the dynamic type ckecking of the langague (very slow)
+# -DEIGENVALUE to compile the eigen value part
+# ------------------------------------------------
+
+# FreeFrem++-specific optimizations -fpascal-strings
++<<<<<<< HEAD
+
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+if test "$enable_debug" = yes;
+then
+ CXXFLAGS="$CXXFLAGS -DBAMG_LONG_LONG -DCHECK_KN"
+ if test "$ff_mac" = yes;
+ then
+ CXXFLAGS="$CXXFLAGS -fno-inline -fexceptions"
+ fi
+else
+ CXXFLAGS="$CXXFLAGS -DBAMG_LONG_LONG -DNCHECKPTR"
+ if test "$ff_mac" = yes;
+ then
+ CXXFLAGS="$CXXFLAGS "
+ fi
+fi
+
+#whether or not to add a suffix to the package name
+#--------------------------------------------------
+
+AC_ARG_WITH(suffix,[ --with-suffix=[G3/G4/G4,P4,..] or --without-suffix (default no suffix to package name)])
+
+AC_MSG_CHECKING(suffix to add to package name)
+ff_suffix=
+if test "$with_suffix" = yes -o "$with_suffix" = no -o "$with_suffix" = ""
+then
+ AC_MSG_RESULT(none)
+else
+ ff_suffix="-$with_suffix"
+ AC_MSG_RESULT($ff_suffix)
+fi
+AC_SUBST(ADD_PACKAGE_NAME,$ff_suffix)
+
+
+
+
+# Checking that OpenGL is accessible
+# ----------------------------------
+
+ff_gl_ok=no
+ff_glx_ok=no
+
+ff_libs="$LIBS"
+AC_ARG_WITH(flib,[ --with-flib= the fortran library ])
+AC_ARG_ENABLE([opengl],AS_HELP_STRING([--enable-opengl],
+ [Enable/disable support for OpenGL]))
+
+# echo " .... LIBS = $LIBS .... "
+if test x$enable_opengl != xno; then
+# GL libraries seem to depend on some dlopen capabilities
+if test "$enable_static" != yes -a "$ff_glut_ok" != yes
+then
+ # If we cannot find gl.h, no OpenGL version can be produced
+ AC_CHECK_HEADERS(OpenGL/gl.h,
+ ff_gl_ok=yes
+ ,
+ ff_gl_ok=no
+ )
+
+
+ if test "$ff_gl_ok" = no
+ then
+ AC_CHECK_HEADERS(GL/gl.h,
+ ff_gl_ok=yes
+ ,
+ ff_gl_ok=no
+ )
+ fi
+ AC_CHECK_HEADERS(GLUT/glut.h,
+ ff_glut_ok=yes,
+ ff_glut_ok=no)
+
+ if test "$ff_glut_ok" = no
+ then
+ AC_CHECK_HEADERS(GL/glut.h,
+ ff_glut_ok=yes,
+ ff_glut_ok=no)
+ fi
+
+# GLUT .....
+ if test "$ff_glut_ok" = yes
+ then
+ for glut in \
+ "-framework GLUT -framework OpenGL -framework Cocoa" \
+ "-lglut -lGLU -lGL"
+ do
+ ff_glut="$glut"
+ ff_libs1="$LIBS"
+ LIBS="$LIBS $ff_glut"
+ AC_TRY_LINK_FUNC(glutInit,
+ ff_glut_ok=yes
+ LIBS="$ff_libs1"
+ break,
+ ff_glut_ok=next);
+ LIBS="$ff_libs1"
+ done
+ fi
+
+
+fi
+fi
+AC_SUBST(LIBSPTHREAD,$ff_pthread)
+
+# ALH - 16/9/13 - at the moment the requirements for medit (glut) are not compatible with FFCS so medit is
+# only compiled with FF.
+
+if test $enable_ffcs = no
+then
+ if test "$ff_glut_ok" = yes
+ then
+ AC_SUBST(LIBSGLUT,$ff_glut)
+ if test -n "$ff_pthread" ; then
+ ff_ffglutprog="ffglut${EXEEXT}"
+ AC_DEFINE_UNQUOTED(PROG_FFGLUT,"$ff_ffglutprog", the ffglut application for the new graphics )
+ fi
+ ff_meditprog="ffmedit${EXEEXT}"
+ fi
+fi
+
+AC_ARG_WITH(suffix,[ --with-suffix=[G3/G4/G4,P4,..] or --without-suffix (default no suffix package name)])
+if test "$with_suffix" = yes
+then
+ with_suffix=""
+elif test "$with_suffix" = no -o -z "$with_suffix"
+then
+ with_suffix=""
+else
+ with_suffix="-$with_suffix"
+fi
+ AC_MSG_CHECKING(add suffix $with_suffix )
+ AC_SUBST(ADD_PACKAGE_NAME,$with_suffix)
+ AC_MSG_RESULT(yes)
+
+
+# Checking wether we can produce a parallel version
+# -------------------------------------------------
+
+if test $enable_ffcs = no
+then
+ # FF case
+ m4_include(acmpi.m4)
+else
+ # FFCS - use the same MPI configuration choices as FFCS
+ ff_mpi=yes
+ AC_SUBST(MPICXX,$MPICXX)
+ AC_SUBST(MPICC,$MPICC)
+ AC_SUBST(MPIF77,$MPIF77)
+ AC_SUBST(MPIFC,$MPIFC)
+ AC_SUBST(MPIPROG,"FreeFem++-mpi${EXEEXT}")
+ AC_SUBST(MPI_INCLUDE,"-I $MPI_INC_DIR")
+ AC_SUBST(MPI_INC_DIR,$MPI_INC_DIR)
+ AC_SUBST(MPI_LIB_DIRS,"")
+ AC_SUBST(MPI_LIB,$MPI_LIB)
+ AC_SUBST(MPI_LIBC,"")
+ AC_SUBST(MPI_LIBFC,"")
+
+ # Extra MPI-dependant configuration options that are set by FF during MPI configuration. FFCS - 25/2/13 - Fred
+ # noticed that if PASTIX_HOSTARCH stays blank, pastix compilation breaks. At least i686_pc_linux and i686_mac are
+ # required by pastix on the corresponding platforms.
+
+ if test"$ff_HOSTARCH_pastix" = ""
+ then
+ ff_HOSTARCH_pastix=i686_pc_linux
+ fi
+ AC_SUBST(PASTIX_HOSTARCH,$ff_HOSTARCH_pastix)
+
+ # these values should not be empty otherwise examples++-load/ff-get-dep will think that they are not defined
+ AC_FF_ADDWHERELIB(mpi,-DDUMMY,-I$MPI_INC_DIR)
+
+ # mpifc and mpif77 libraries should always be specified because FF never calls the Fortran MPI compiler. It always
+ # uses mpicxx in [[file:examples++-load/ff-c++]]. The resulting Fortran libraries (eg Mumps) would compile even
+ # without the proper Fortran libs, but they would not load properly.
+
+ # under Win32, libmpi_f77.a is not the right name and FFCS mingw/mpicxx adds the right libraries by itself
+
+ # With mpich2 Debian wheezy 32 bits, libmpi_f77.a is not available (request from Cico, 14/10/13)
+
+ if test -f /usr/lib/openmpi/lib/libmpi_f77.a
+ then
+ AC_FF_ADDWHERELIB(mpifc,-lmpi_f77,)
+ AC_FF_ADDWHERELIB(mpif77,-lmpi_f77,)
+ else
+ AC_FF_ADDWHERELIB(mpifc,-DDUMMY,)
+ AC_FF_ADDWHERELIB(mpif77,-DDUMMY,)
+ fi
+
+ # FFCS - MPI_DOUBLE_COMPLEX kept from original FF configure script
+ AC_MSG_CHECKING( MPI_DOUBLE_COMPLEX)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([
+#include <mpi.h>
+ MPI_Datatype xxxx=MPI_DOUBLE_COMPLEX;
+ ])],
+ ff_mpi_double_complex=yes,
+ ff_mpi_double_complex=no)
+ AC_MSG_RESULT($ff_mpi_double_complex)
+ if test "$ff_mpi_double_complex" = yes ; then
+ AC_DEFINE(HAVE_MPI_DOUBLE_COMPLEX,1, mpi_double_complex)
+ fi
+fi
+
+# FFCS needs to change some of the FF makefiles to compile without MPI on MacOS
+AM_CONDITIONAL([FFCS_MPIOK],[test $ff_mpi = yes])
+
+# Looking for useful configuration utilities
+# ------------------------------------------
+
+AC_ARG_ENABLE(download,AC_HELP_STRING([--enable-download],[Download missing libraries (BLAS,ARPACK,UMFPACK,...)]))
++<<<<<<< HEAD
+## PETSc
+AC_ARG_WITH(petsc,[ --with-petsc= /usr/local/petsc --without-petsc ])
+# /usr/local/petsc/conf/petscvariables
+ff_petsc_ok=no
+## echo --$with_petsc--
+if test "$with_petsc" != no -a $ff_mpi = yes; then
+ ff_petsc=""
+ for d in "$with_petsc" /usr /usr/local /opt/usr /opt/local
+ do
+ if test -f ; then
+ ffconfpetsc="$d"
+ elif test -f "$d/petsc/petscvariables" ; then
+ ffconfpetsc="$d/petsc/petscvariables"
+ elif test -f "$d/petsc-conf/petscvariables" ; then
+ ffconfpetsc="$d/petsc-conf/petscvariables"
+ else
+ ffconfpetsc=""
+ fi
+ if test -f "$ffconfpetsc" ; then
+ if test "$ff_petsc_ok" = no ; then
+ PETSC_MPIRUN=`awk -F'=' '"MPIEXEC "==$1 {print $2}' $ff_petsc`
+ cmp -s $PETSC_MPIRUN $MPIRUN
+ if test $? -eq 0 ; then
+ PETSC_WITH_EXTERNAL_LIB=`awk -F'=' '"PETSC_WITH_EXTERNAL_LIB "==$1 {print $2}' $ff_petsc`
+ PETSC_CC_INCLUDES=`awk -F'=' '"PETSC_CC_INCLUDES "==$1 {print $2}' $ff_petsc`
+ if test -n "$PETSC_WITH_EXTERNAL_LIB"; then
+ ff_petsc_ok=yes;
+ AC_FF_ADDWHERELIB(petsc,$PETSC_WITH_EXTERNAL_LIB,$PETSC_CC_INCLUDES)
+ fi
+ fi
+ fi
+ fi
+ done
+fi
+
+if test "$ff_petsc_ok" != no ; then
+ AC_MSG_NOTICE([ with petsc $ff_petsc])
+else
+ AC_MSG_NOTICE([ without petsc ***** ])
+fi
+
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+#replacing wget with another command
+ff_wget_command="wget --no-check-certificate"
+ff_wget=no
+
+AC_ARG_WITH(wget,
+ [ --with-wget=command Replace "wget" with another command. Implies --enable-download],
+ enable_download=yes
+ ff_wget=yes
+ ff_wget_command="${withval}")
+
+ff_mkl_libpath=yes
+AC_ARG_WITH(mkl,
+ [ --with-mkl= the MKL LIBPATH : (ie. /opt/intel/mkl/RR.r.y.xxx/lib/<arch>)],
+ ff_mkl_libpath="${withval}")
+
+# if enabling downloads find wget or curl to do download
+# ------------------------------------------------------
+
+if test "$ff_wget" = no
+then
+ ff_wget=""
+ AC_CHECK_PROG(ff_wget,wget --no-check-certificate,yes,no)
+fi
+if test "$ff_wget" = no
+then
+ ff_wget_command="curl --fail -O "
+ ff_curl=""
+ AC_CHECK_PROG(ff_curl,curl -O,yes,no)
+ ff_wget="$ff_curl"
+fi
+
+# for automatique compilation of
+# lib in download
+if test "$ff_wget" != yes -a "$enable_download" = "yes" ; then
+ enable_download=no
+ AC_MSG_ERROR([ enable-download and no wget or curl. ],1);
+fi
+if test "$enable_download" = "yes" ; then
++<<<<<<< HEAD
+DOWNLOADCOMPILE="compile-pkg install-other"
++=======
++DOWNLOADCOMPILE=compile-pkg
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+else
+DOWNLOADCOMPILE=
+fi
+
+AC_SUBST(WGET,$ff_wget_command)
+AC_SUBST(DOWNLOADCOMPILE,$DOWNLOADCOMPILE)
+
+# modif FH -----
+# -- looking for cadna
+# the round-off error propagation
+# the web site http://www-anp.lip6.fr/cadna/
+# --------------------
+AC_ARG_WITH(cadna,[ --with-cadna= cadna library --without-cadna ])
+if test "$with_cadna" != no -o -n "$with_cadna"
+ then
+ ff_cadna="$with_cadna"
+fi
+ff_cadna_ok=no
+if test "$with_cadna" != no
+ then
+ ff_libs_old="$LIBS"
+ ff_ldflags_old="$LDFLAGS"
+ ff_cadna_dir="${curdir}/download/cadna"
+ LDFLAGS="$LDFLAGS -L$ff_cadna_dir"
+ AC_CHECK_LIB(cadnafree,arit_zero,
+ ff_cadna_ok=yes)
+ AC_CHECK_HEADERS(${ff_cadna_dir}/cadnafree.h,
+ ff_cadna_h=yes, ff_cadna_h=no)
+
+ LIBS="$ff_libs_old"
+ LDFLAGS="$ff_ldflags_old"
+
+ if test "$ff_cadna_ok" = yes -a "$ff_cadna_h" = yes
+ then
+ AC_DEFINE(HAVE_CADNA,1, freecadna is use to evalute the round-off error propagation )
+ CPPFLAGS="$CPPFLAGS -I$ff_cadna_dir"
+ LIBS=" -L$ff_cadna_dir -lcadnafree $ff_libs_old"
+ else
+ AC_MSG_NOTICE([ without cadna ***** ])
+ fi
+else
+ AC_MSG_NOTICE([ without cadna ***** ])
+fi
+
+# Looking for FFTW
+# ----------------
+
+# ALH - 18/9/13 - deactivates FFTW detection for testing purposes
+
+AC_ARG_ENABLE(system_fftw,AC_HELP_STRING([--disable-system-fftw],[Disable the automatic detection of FFTW]))
+if test "$enable_system_fftw" != no
+then
+
+ # ALH - 4/9/13 - avoid recompiling FFTW if a copy was found on the system (request from Helmut Jarausch, 1/8/13)
+
+ AC_CHECK_LIB(fftw3,fftw_execute,ff_fftw_ok=yes)
+ AC_CHECK_HEADERS(fftw3.h,ff_fftw_h=yes, ff_fftw_h=no)
+fi
+
+if test "$ff_fftw_ok" = yes -a "$ff_fftw_h" = yes
+then
+ AC_FF_ADDWHERELIB(fftw3,-lfftw3,)
+ fftw_download=
+else
+ if test "$enable_download" = yes
+ then
+ ff_DOWNLOAD_FFTW=fftw
+ fi
+fi
+
+# used in [[file:download/fftw/Makefile.am::DOWNLOAD_FFTW]]
+
+AC_SUBST(DOWNLOAD_FFTW,$ff_DOWNLOAD_FFTW)
+
+dnl ---------------------------
+dnl Looking for the tetgen
+dnl --------------------------
+AC_CHECK_LIB(tet,tetrahedralize,ff_fftet_ok=yes)
+AC_CHECK_HEADERS(tetgen.h,ff_tet_h=yes, ff_tet_h=no)
+if test "$ff_tet_ok" = yes -a "$ff_tet_h" = yes
+then
+ AC_FF_ADDWHERELIB(tetgen,-ltet,)
+ AC_DEFINE(HAVE_TETGEN,1, tetgen is compute tetrahedralize volume of an enclosed surface)
+fi
+
+# Looking for the BLAS
+# --------------------
+
+ff_blas_ok=no
+ff_blas_inc=""
+
+# ALH - 18/9/13 - give the option to deactivate system blas for testing purposes
+AC_ARG_ENABLE(system-blas,AC_HELP_STRING([--disable-system-blas],[Disable the search for a system-wide BLAS library]))
+
+if test "$enable_system_blas" != no
+then
+
+ # User-specified location
+ # add MKL seach dec 2010 FH ....
+
+ ff_mkl_flags=""
+ if test "$ff_mkl_libpath" != "not" ; then
+ ff_CFLAGS="$CFLAGS"
+ CHECK_COMPILE_FLAG(C,-mkl,CFLAGS)
+ if test "$ff_CFLAGS" != "$CFLAGS" ; then
+ ff_ff_mkl_flags="-mkl"
+ fi
+ CFLAGS="$ff_CFLAGS"
+ fi
+
+ AC_MSG_CHECKING(for MKL)
+ ff_mkl_root=""
+ if test "$ff_mkl_libpath" != "not" -a -z "$ff_mkl_flags" ; then
++<<<<<<< HEAD
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if test "$ff_mkl_libpath" = "yes" ; then
+ ff_IFS="$IFS"
+ IFS=":"
+ for i in $LD_LIBRARY_PATH:$LIBRARY_PATH ; do
+ case $i in
+ */mkl/*) ff_mkl_libpath=$i;;
+ esac ;
+ done;
+ IFS="$ff_IFS"
++<<<<<<< HEAD
+# else
+# ff_mkl_libpath=no
+ fi
+
+ if test "$ff_mkl_libpath" != "no" -a -d "$ff_mkl_libpath" ; then
+ ff_mkl_root=`expr "//$ff_mkl_libpath" : '//\(.*\)/lib.*'`
+ ff_mkl_arch=`expr "//$ff_mkl_libpath" : '//.*/lib/\(.*\)'`
+ ff_mkl_lp=_lp64
++=======
++ else
++ ff_mkl_libpath=no
++ fi
++ if test "$ff_mkl_libpath" != "no" -a -d "$ff_mkl_libpath" ; then
++ ff_mkl_root=`expr "//$ff_mkl_libpath" : '//\(.*\)/lib/.*'`
++ ff_mkl_arch=`expr "//$ff_mkl_libpath" : '//.*/lib/\(.*\)'`
++ ff_mkl_lp=
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ case "$ff_mkl_arch" in
+ *64*) ff_mkl_lp=_lp64
+ esac
+ case $F77 in
+ *ifort*) ff_mkl_cc=intel;;
+ *) ff_mkl_cc=gf;;
+ esac
+ # bof bof ....
+ case "$MPIRUN" in
+ */sgi/*) ff_mkl_mpi=_sgimpt;;
+ */intel/*) ff_mkl_mpi=_intelmpi;;
+ *) ff_mkl_mpi=_openmpi;;
+ esac
++<<<<<<< HEAD
+# echo ................ ff_mkl_root = $ff_mkl_root .. $ff_mkl_arch
+ if test ! -d "$ff_mkl_libpath" ; then
+ ff_mkl_libpath="$ff_mkl_root/lib/$ff_mkl_arch"
+ fi
+
+ if test -f "$ff_mkl_libpath/libmkl_rt.$ff_suffix_dylib" ; then
+ mkl_blas=rt
+ mkl_lapack=rt
+ ff_mkl_mlt="-L$ff_mkl_libpath -lmkl_rt -lmkl_intel_thread -lmkl_core $ff_iomp5 $ff_pthread"
+ ff_mkl_blas="-L$ff_mkl_libpath -lmkl_rt -lmkl_sequential -lmkl_core $ff_iomp5 $ff_pthread"
+ ff_mkl_lapack="$ff_mkl_blas"
+ elif test -f "$ff_mkl_libpath/libmkl_lapack.$ff_suffix_dylib" ; then
+ ff_mkl_mlt="-L$ff_mkl_libpath -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_lapack -lmkl_intel${ff_mkl_lp} -lmkl_intel_thread -lmkl_core -lguide -lm -lpthread"
+ ff_mkl_blas="-L$ff_mkl_libpath -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_lapack -lmkl_intel${ff_mkl_lp} -lmkl_sequential -lmkl_core -lguide -lm -lpthread"
+ ff_mkl_lapack="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_lapack"
+ else
+ ff_mkl_mlt="$ff_ldbg -L$ff_mkl_libpath -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_intel${ff_mkl_lp} -lmkl_intel_thread -lmkl_core -lmkl_intel_thread $ff_iomp5 $ff_ldeg -lm $ff_pthread"
+ ff_mkl_blas="$ff_ldbg -L$ff_mkl_libpath -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_intel${ff_mkl_lp} -lmkl_sequential -lmkl_core -lmkl_sequential $ff_ldeg -lm $ff_pthread"
+ ff_mkl_lapack="$ff_mkl_blas"
+ fi
+ if test -f "-L$ff_mkl_libpathmkl_scalapack${ff_mkl_lp}" ; then
+ ff_mkl_scalapack="-L$ff_mkl_libpath -lmkl_blacs${ff_mkl_mpi}${ff_mkl_lp} -lmkl_scalapack${ff_mkl_lp} "
+ ff_mkl_blacs="-L$ff_mkl_libpath -lmkl_blacs${ff_mkl_mpi}${ff_mkl_lp} -lmkl_scalapack${ff_mkl_lp}"
+ fi
++=======
++ # echo ................ ff_mkl_root = $ff_mkl_root .. $ff_mkl_arch
++ if test -f $ff_mkl_root/lib/$ff_mkl_arch/libmkl_rt.a ; then
++ mkl_blas=rt
++ mkk_lapack=rt
++ ff_mkl_mlt="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_rt -lmkl_intel_thread -lmkl_core -liomp5 -lpthread"
++ ff_mkl_blas="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_rt -lmkl_sequential -lmkl_core -liomp5 -lpthread"
++ ff_mkl_lapack="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_rt -lmkl_sequential -lmkl_core -liomp5 -lpthread"
++ else
++ if test -f $ff_mkl_root/lib/$ff_mkl_arch/libmkl_lapack.a ; then
++ ff_mkl_mlt="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_lapack -lmkl_intel${ff_mkl_lp} -lmkl_intel_thread -lmkl_core -lguide -lm -lpthread"
++ ff_mkl_blas="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_lapack -lmkl_intel${ff_mkl_lp} -lmkl_sequential -lmkl_core -lguide -lm -lpthread"
++ ff_mkl_lapack="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_lapack"
++ else
++ ff_mkl_mlt="-Wl,--start-group -L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_intel${ff_mkl_lp} -lmkl_intel_thread -lmkl_core -lmkl_intel_thread -liomp5 -Wl,--end-group -lm -lpthread"
++ ff_mkl_blas="-Wl,--start-group -L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_${ff_mkl_cc}${ff_mkl_lp} -lmkl_intel${ff_mkl_lp} -lmkl_sequential -lmkl_core -lmkl_sequential -Wl,--end-group -lm -lpthread"
++ ff_mkl_lapack="$ff_mkl_blas"
++ fi
++ fi
++ ff_mkl_scalapack="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_blacs${ff_mkl_mpi}${ff_mkl_lp} -lmkl_scalapack${ff_mkl_lp} "
++ ff_mkl_blacs="-L$ff_mkl_root/lib/$ff_mkl_arch -lmkl_blacs${ff_mkl_mpi}${ff_mkl_lp} -lmkl_scalapack${ff_mkl_lp}"
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ ff_blas_ok=yes
+ ff_lapack_ok=yes
+
+ # <<enable_mkl_mlt>> ALH - 6/11/13 - request from Atsushi Suzuki - the default MKL library must be able to
+ # handle threads when FF is connected to AS' solver. So we need an option to configure FF with the
+ # multithreaded MKL by default.
+
+ AC_ARG_ENABLE(mkl_mlt,AC_HELP_STRING([--enable-mkl-mlt],[Link with the multithreaded instead of the monothreaded version of the MKL]))
+
+ if test "$enable_mkl_mlt" = yes
+ then
+ ff_blas_libs="$ff_mkl_mlt"
+ else
+ ff_blas_libs="$ff_mkl_blas"
+ fi
+
+ ff_blas_inc="-I$ff_mkl_root/include"
+ dnl scalapack, and blacs don not work with mlk and sgi
+ if test "$ff_mkl_mpi" != "_sgimpt" ; then
+ AC_FF_ADDWHERELIB(scalapack,$ff_mkl_scalapack,$ff_blas_inc)
+ AC_FF_ADDWHERELIB(blacs,$ff_mkl_blacs,$ff_blas_inc)
+ else
+ ff_warm=" (We do not use MKL scalapack and blacs with sgi MPI), "
+ fi
+ AC_FF_ADDWHERELIB(lapack,$ff_mkl_lapack,$ff_blas_inc)
+ AC_FF_ADDWHERELIB(mkl,$ff_mkl_mlt,$ff_blas_inc)
++<<<<<<< HEAD
+ AC_DEFINE(HAVE_MKL,1, the MKL intel lib is present for BLAS and LAPACK )
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ else
+ ff_mkl_libpath=no
+
+ # FH - pardiso is there as soon as mkl is
+ enable_pardiso=no
+ fi
+ fi
+
+
+ AC_MSG_RESULT( [ $ff_warm root: $ff_mkl_root , arch: $ff_mkl_arch , $ff_mkl_lp ... ])
+
+ AC_ARG_WITH(blas,
+ AC_HELP_STRING([--with-blas=library],[Use a specific version of the Blas]),
+ ff_blas_ok=yes
+ ff_blas_libs="${withval}")
+
+ # Specific BLAS library location for FreeBSD
+ ff_freebsd_blas="-lf2c -lf77blas -latlas -lgslcblas"
+ # zmach is in lapack
+ # Trying blas library
+ # echo "LIBS = $LIBS blas --- $ff_blas_ok"
+ for iblas in \
++<<<<<<< HEAD
+ "-framework Accelerate" "$ff_mkl_blas" "-lblas" "-L/usr/lib/atlas -lblas" \
++=======
++ "-framework vecLib" "$ff_mkl_blas" "-lblas" "-L/usr/lib/atlas -lblas" \
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ $ff_freebsd_blas
+ do
+ if test "$ff_blas_ok" = no;
+ then
+ AC_MSG_CHECKING(for daxpy_ in $iblas)
+ ff_save_libs="$LIBS"
+ LIBS="$LIBS $iblas"
+ AC_LINK_IFELSE(
+ [AC_LANG_CALL(,daxpy_)],
+ ff_blas_ok=yes
+ ff_blas_libs="$iblas",)
+ LIBS="$ff_save_libs"
+ AC_MSG_RESULT($ff_blas_ok)
+ fi
+ done
+
+ #cblas_zdotu_sub
+ #echo "LIBS = " $LIBS
+ ff_cblas_libs=no
+ if test "$ff_blas_ok" = yes
+ then
+ AC_MSG_CHECKING(for blas_zdotu_sub in $ff_blas_libs)
+ ff_save_libs="$LIBS"
+ LIBS="$LIBS $ff_blas_libs $FLIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_CALL(,cblas_zdotu_sub)],
+ ff_cblas_libs=yes)
+ AC_MSG_RESULT($ff_cblas_libs)
+ LIBS="$ff_save_libs"
+ fi
+fi
+
+# <<OpenBLAS>> ALH - 18/9/13 - option to compile the OpenBLAS moved from the FFCS tree to FF tree
+
+AC_ARG_ENABLE(openblas,AC_HELP_STRING([--disable-openblas],[Disable the automatic download of OpenBLAS]))
+if test "$ff_blas_ok" = no && test "$enable_openblas" != no && test "$enable_download" = yes
+then
+ AC_CHECK_PROG(ff_git,git,yes,no)
+ AC_MSG_CHECKING([Activating the OpenBLAS (deactivate with --disable-openblas)])
+ if test $ff_git = no
+ then
+ AC_MSG_RESULT([git not found])
+ else
+ ff_download_blas=openblas
+
+ # it is necessary to split the library path into -L and -l otherwise ff/upstream/examples+++-load/ff-c++ will
+ # place -lgfortran in LIBS, .../libgoto___.lib in OTHER, and call the compiler with $LIBS before $OTHER, which
+ # will fail.
+
+ ff_blas_libs="-L${curdir}/download/blas/OpenBLAS -lopenblas -lgfortran $ff_pthread"
+ ff_blas_inc="-I${curdir}/download/blas/CBLAS/src"
+
+ # skip generic blas compilation and activate OpenBLAS (see [[file:download/blas/Makefile.am::OpenBLAS]])
+ AC_SUBST(DOWNLOADED_BLAS,"")
+ AC_SUBST(COMPILE_OPENBLAS,openblas)
+
+ ff_blas_ok=yes
+ ff_cblas_h=yes
+ ff_cblas_libs=yes
+
+ AC_MSG_RESULT([ok])
+ fi
+fi
+
+# If all else fails, download a generic version
+
+if test "$ff_blas_ok" = no -a "$enable_download" = yes -a "$enable_fortran" != no -a "$enable_c" != no
+then
+ AC_CHECK_PROG(ff_unzip,unzip,yes,no)
+
+ AC_MSG_CHECKING(for BLAS version to download)
+
+ # Do not update $LIBS, but create an extra LIB variable, because this lib does not exist yet, and this could make
+ # the following tests fail.
+
+ # When compiling a generic version, we do not need an optimized version of the BLAS.
+
+ ff_download_blas=generic
+ ff_blas_libs="-L${curdir}/download/blas -lcblas -lf77blas"
+ ff_blas_inc="-I${curdir}/download/blas/CBLAS/src"
+
+ AC_SUBST(DOWNLOADED_BLAS,"libf77blas.a libcblas.a")
+ AC_SUBST(DOWNLOADED_BLAS_BUILT_SOURCES,'BLAS CBLAS $(F77BLAS_SOURCES) $(CBLAS_SOURCES)')
+
+ AC_MSG_RESULT($ff_download_blas)
+ ff_blas_ok=yes
+ ff_cblas_h=yes
+ ff_cblas_libs=yes
+fi
+
+AC_SUBST(BLASLIBS,$ff_blas_libs)
+AC_SUBST(BLASINC,$ff_blas_inc)
+
+#looking for cblas.h FH
+
+if test "$ff_blas_ok" = yes -a "$ff_cblas_libs" = yes ;
+then
+ AC_CHECK_HEADERS(cblas.h,
+ ff_cblas_h=yes,
+ ff_cblas_h=no)
++<<<<<<< HEAD
+ AC_CHECK_HEADERS(Accelerate/cblas.h,
++=======
++ AC_CHECK_HEADERS(vecLib/cblas.h,
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ ff_cblas_h=yes
+ ff_cblas_h=no)
+ AC_CHECK_HEADERS(atlas/cblas.h,
+ ff_cblas_h=yes
+ ff_cblas_h=no)
+fi
+
+# ALH - 18/9/13 - [[file:download/blas/Makefile.am]] does not update the WHERE mechanism so it always needs to be set up
+# here even in the case of a downloaded blas library.
+
+AC_FF_ADDWHERELIB(blas,$ff_blas_libs,)
+
+# end of BLAS -------------------
+
+# Looking for ARPACK
+# ------------------
+
+# We need the following g77 libraries to connect to the Fortran 77
+# Arpack.
+
+if test "$ff_blas_ok" = yes;
+then
+ ff_g2c_lib="$FLIBS"
+ if test -n "$ff_g2c_lib"
+ then
+ LIBS="$LIBS $ff_g2c_lib"
+ else
+ ff_g2c_ok=no
+ AC_CHECK_LIB(g2c,G77_second_0,
+ LIBS="$LIBS -lg2c"
+ ff_g2c_lib="-lg2c"
+ ff_g2c_ok=yes)
+
+ if test "$ff_g2c_ok" = no;
+ then
+ AC_MSG_CHECKING(for G77_second_0 in /sw/lib/libg2c.a)
+ ff_save_libs="$LIBS"
+ LIBS="$LIBS -L/sw/lib -lg2c"
+ AC_LINK_IFELSE(
+ [AC_LANG_CALL(,G77_second_0)],
+ ff_g2c_lib="-L/sw/lib -lg2c"
+ ff_g2c_ok=yes,
+ LIBS="$ff_save_libs")
+ AC_MSG_RESULT($ff_g2c_ok)
+ fi
+ fi
+fi
+
+# Copy the result of g2c investigations into a separate variable
+# because BLAS compilation will need it.
+
+AC_SUBST(G2CLIB,$ff_g2c_lib)
+#looking of lapack if no compile the arpack lapack
+# warning $$ because the make eat one
+ff_lapack_ok=no;
+ff_lapack_lib=
+AC_MSG_CHECKING([for lapack in $LIBS, $ff_blas_libs and -llapack] )
+ if test "$ff_blas_ok" = yes ; then
+ AC_LINK_IFELSE( [AC_LANG_CALL(,dgeqr2_)], ff_lapack_ok=yes)
+ if test "$ff_lapack_ok" = no ; then
+ ff_save_libs=$LIBS
+ LIBS="$ff_save_libs $ff_blas_libs"
+ AC_LINK_IFELSE( [AC_LANG_CALL(,dgeqr2_)], ff_lapack_ok=yes)
+ if test "$ff_lapack_ok" = no ; then
+ LIBS="$ff_save_libs -llapack $ff_blas_libs"
+ AC_LINK_IFELSE( [AC_LANG_CALL(,dgeqr2_)], [ff_lapack_ok=yes
+ ff_lapack_lib="-llapack"] )
+ fi
+ LIBS="$ff_save_libs"
+ fi
+ fi
+
+AC_MSG_RESULT($ff_lapack_ok)
+if test "$ff_lapack_ok" != no ; then
+AC_SUBST(LAPACKLIBS,$ff_lapack_lib)
+fi
+if test "$ff_lapack_ok" = no; then
+ AC_ARG_WITH(lapack,
+ AC_HELP_STRING([--with-lapack=library],[Use a specific version of Lapack]),
+ ff_lapack_ok=yes
+ ff_lapack_lib="${withval}"
+ LIBS="$ff_lapack_lib $LIBS")
+fi
+
+# Lapack configuration for Arpack
+
+ff_lapackdir='$$(LAPACKdir)'
+if test "$ff_lapack_ok" = yes
+then
+ # no compilation of lapack in arpack
+ ff_lapackdir=
+else
+ ff_lapack_lib="-L${curdir}/download/lib -llapack"
+fi
+
+# Arpack itself
+
+ff_arpack_ok=no
+ff_save_libs="$LIBS"
+ff_arpack_libs=
+if test "$ff_blas_ok" = yes;
+then
+
+ # User-specified location
+ AC_ARG_WITH(arpack,
+ [ --with-arpack=library Use a specific version of Arpack],
+ ff_arpack_ok=yes
+ ff_arpack_libs="${withval}")
+
+ # Default locations
+ if test "$ff_arpack_ok" = no;
+ then
+ AC_CHECK_LIB(arpack,dsaupd_,
+ ff_arpack_libs="-larpack -llapack"
+ ff_arpack_ok=yes,,
+ -llapack)
+ fi
+
+ # Trying to "locate" Arpack
+ if test "$ff_arpack_ok" = no -a "$enable_download" != yes ;
+ then
+ AC_MSG_CHECKING(for libarpack with locate)
+ ff_lib_arpack=`locate libarpack|grep 'libarpack.*.a$'|head -1`
+ LIBS="$ff_lib_arpack $LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_CALL(,dsaupd_)],
+ ff_arpack_ok=yes
+ ff_arpack_libs="$ff_lib_arpack")
+ AC_MSG_RESULT($ff_arpack_ok)
+ fi
+ if test "$ff_arpack_ok" = yes
+ then
+ AC_FF_ADDWHERELIB(arpack,$ff_arpack_libs,)
+ echo arpack LD "'$ff_arpack_libs'" >>$ff_where_lib_conf
+ fi
+
+ # If all else fails, download!
+ if test "$ff_arpack_ok" = no -a "$enable_download" = yes \
+ -a "$enable_fortran" != no
+ then
+ ff_arpack_download=yes
+ AC_MSG_NOTICE(using downloaded Arpack)
+
+ # ALH - 6/11/13 - this install goal is the standard goal for all downloaded packages in
+ # [[file:download/common.mak::install]]
+
+ AC_SUBST(DOWNLOAD_ARPACK,install)
+
+ AC_SUBST(FF_LAPACKdir,$ff_lapackdir)
+ AC_SUBST(ARPACKLIB,${curdir}/download/lib/libarpack.a)
+ AC_SUBST(LAPACK_arpack_LIB,${curdir}/download/lib/liblapack.a)
+
+ # Do not update $LIBS, but create an extra LIB variable, because this lib does not exist yet, and this
+ # could make the following tests fail.
+
+ # ALH - 30/9/13 - do not use the "-L ${curdir}/download/lib" directive because it would allow other
+ # following -l directives (eg -lumfpack) to pick an old locally compiled library instead of the system
+ # ones.
+
+ ff_arpack_libs="${curdir}/download/lib/libarpack.a $ff_lapack_lib"
+ ff_arpack_ok=yes
+ fi
+fi
+if test "$ff_arpack_ok" != yes
+ then
+ AC_MSG_NOTICE([-- NO ARPACK -- enable_download : $enable_download , wget: $ff_wget ])
+fi
+
+# Do not insert ARPACK libs in $LIBS yet, because they may not exist
+# yet, and this could make the following tests fail.
+
+LIBS="$ff_save_libs"
+
+if test "$ff_arpack_ok" = yes;
+then
+ AC_SUBST(ARPACKLIBS,$ff_arpack_libs)
+ EIGENOBJ='eigenvalue.$(OBJEXT)'
+ AC_DEFINE(HAVE_LIBARPACK,1,Arpack is used for eigenvalue computation)
+
+ # Determines whether to run the eigenvalue tests
+else
+# all eigen test fails
+ AC_SUBST([SKIP_TESTS_EIGEN],[yes])
+fi
+AC_SUBST([EIGENOBJ])
+
+# ALH - 25/9/13 - <<WHERE_lapack>> always run the WHERE LD statement for lapack because some libraries in
+# examples++-load require it (eg [[file:examples++-load/Element_Mixte.cpp::lapack]]). Request from Fred.
+
+AC_FF_ADDWHERELIB(lapack,$ff_lapack_lib,)
+
+# Looking for UMFPACK
+# -------------------
+
+ff_amd_ok=no
+ff_umfpack_ok=no
+ff_save_libs="$LIBS"
+if test "$ff_blas_ok" = yes;
+then
+
+ # User-specified location
+
+ AC_ARG_WITH(amd,
+ AC_HELP_STRING([--with-amd=library],[Use a specific version of AMD]),
+ ff_amd_ok=yes
+ ff_umfpack_libs="${withval}")
+
+ AC_ARG_WITH(umfpack,
+ AC_HELP_STRING([--with-umfpack=library],[Use a specific version of Umfpack]),
+ ff_umfpack_ok=yes
+ ff_umfpack_libs="${withval} $ff_umfpack_libs")
+
+ # Trying default locations for the headers
+
+ AC_CHECK_HEADERS(umfpack.h umfpack/umfpack.h ufsparse/umfpack.h suitesparse/umfpack.h,
+ ff_umfpack_header=yes
+ ff_umfpack_dir=`dirname $ac_header`)
+
+ # Somes systems like FreeBSD hide umfpack.h in a directory called UMFPACK (all capitals). This breaks the
+ # standard #define produced by autoconf in config.h.in.
+
+ LIBS="$ff_blas_libs $LIBS"
+ if test "$ff_umfpack_header" != yes;
+ then
+ AC_CHECK_HEADER(UMFPACK/umfpack.h,
+ ff_umfpack_header=yes
+ ff_umfpack_dir=UMFPACK
+ AC_DEFINE(HAVE_BIG_UMFPACK_UMFPACK_H,1,If umfpack.h is located in UMFPACK subdir))
+ fi
+
+ if test "$ff_amd_ok" = no;
+ then
+ AC_CHECK_LIB(amd,amd_info,
+ ff_umfpack_libs="$ff_umfpack_libs -lamd"
+ ff_amd_ok=yes)
+ fi
+
+ if test "$ff_umfpack_ok" = no -a "$ff_amd_ok" = yes;
+ then
+
+ # ALH - 30/9/13 - other libraries required by Umfpack
+
+ AC_CHECK_LIB(cholmod,cholmod_add,ff_umfpack_libs="$ff_umfpack_libs -lcholmod")
+ AC_CHECK_LIB(colamd,colamd_set_defaults,ff_umfpack_libs="$ff_umfpack_libs -lcolamd")
+
+ AC_CHECK_LIB(umfpack,umf_i_malloc,
+ ff_umfpack_libs="-lumfpack $ff_umfpack_libs"
+ ff_umfpack_ok=yes,,$ff_umfpack_libs)
+ fi
+
+ if test "$ff_umfpack_header" != yes -o "$ff_umfpack_ok" != yes; then
+ ff_umfpack_ok=no
+ AC_MSG_WARN([Sorry, we could not find the UMFPACK lib or the UMFPACK headers])
+ fi
+
+ if test "$ff_umfpack_ok" = yes -a "$ff_amd_ok" = yes; then
+ AC_DEFINE(HAVE_LIBUMFPACK,1,Umfpack is used for sparse matrices computations)
+ fi
+fi
+
+LIBS="$ff_save_libs"
+
+# If all else fails, download!
+
+if test "$ff_umfpack_ok" = no -a "$enable_download" = yes
+then
+ AC_MSG_NOTICE(using downloaded UMFPACK)
+ AC_SUBST(DOWNLOAD_UMFPACK,"umfpack")
+ ff_umfpack_download=yes
+
+ # Do not update $LIBS, but create an extra LIB variable, because this lib does not exist yet, and this could make
+ # the following tests fail.
+
+ ff_umfpack_libs="-L${curdir}/download/lib -lumfpack -lcholmod -lcolamd -lamd -lsuitesparseconfig"
+ AC_DEFINE(HAVE_LIBUMFPACK,1,UMFPACK)
+ if test "$ff_win32" = yes; then
+ AC_SUBST(FF_UMFPACK_CONFIG,-DCBLAS)
+ fi
+ ff_umfpack_ok=yes
+fi
+
+# ALH - 17/9/13 - moved UMFPACK configuration settings in wherelib to _after_ configuring the download version because
+# [[file:download/umfpack/Makefile.am]] does not set the WHERE mechanism. Also removed -I/usr/include/$ff_umfpack_dir
+# from include options for FFCS because it breaks the MingW64 compilation process.
+
+if test "$ff_umfpack_ok" = yes
+then
+ if test $enable_ffcs = no
+ then
+ AC_FF_ADDWHERELIB(amd,$ff_umfpack_libs,-I/usr/include/$ff_umfpack_dir)
+ AC_FF_ADDWHERELIB(umfpack,$ff_umfpack_libs,-I/usr/include/$ff_umfpack_dir)
+ else
+ AC_FF_ADDWHERELIB(amd,$ff_umfpack_libs,)
+ AC_FF_ADDWHERELIB(umfpack,$ff_umfpack_libs,)
+ fi
+else
+ AC_MSG_NOTICE([ -- NO UMFPACK (ff_wget = $ff_wget)])
+fi
+
+AC_SUBST(UMFPACKLIBS,$ff_umfpack_libs)
+
+# If times() and sysconf() are not here, UMFPACK should know
+
+if test "$ff_umfpack_ok" = yes
+then
+ AC_CHECK_FUNCS(times sysconf,
+ ff_umfpack_posix_ok=yes,
+ ff_umfpack_posix_ok=no)
+
+ if test "$ff_umfpack_posix_ok" = no
+ then
+ AC_SUBST(FF_UMFPACK_CONFIG,"-DCBLAS -DNPOSIX")
+ fi
+fi
+
+# Checking for some functions that may not appear everywhere
+# ----------------------------------------------------------
+AC_CHECK_HEADERS([unistd.h])
+# asinh acosh atanh are not in Mingw yet gettimeofday
+ff_malloc_h=""
+AC_HEADER_TIME
+AC_CHECK_HEADERS(malloc.h,ff_malloc_h=1)
+AC_SUBST(FF_MALLOC_H,$ff_malloc_h)
+
+AC_CHECK_FUNCS(asinh acosh atanh getenv jn erfc tgamma gettimeofday mallinfo mstats)
+AC_CHECK_FUNCS(srandomdev)
+
+
+AC_CHECK_FUNCS(second_,ff_second="",ff_second=second.o)
+AC_SUBST(FF_SECOND,"$ff_second")
+
+# Enable static linking (no shared libraries)
+# -------------------------------------------
+AC_CHECK_PROG(ff_libtool,libtool,yes,no)
+if test "$ff_mac" = "yes" -a "$ff_libtool" = yes ; then
+ ff_AR="libtool"
+ ff_ARFLAGS="-static -o"
+ ff_RANLIB="echo"
+fi
+
+AC_ARG_ENABLE(static,
+ [ --enable-static Build binaries with no shared library dependencies])
+if test "$enable_static" = yes
+then
+ AC_CHECK_PROG(ff_libtool,libtool,yes,no)
+ if test "$ff_libtool" = yes
+ then
+ LDFLAGS="$LDFLAGS -all-static"
+ AC_SUBST(STATICTOOL,libtool)
+ else
+ AC_MSG_ERROR(libtool not found)
+ fi
+fi
+# for compiation of arpack use libtool to bluid universal library on MacOs.
+AC_SUBST(AR,$ff_AR)
+AC_SUBST(ARFLAGS,$ff_ARFLAGS)
+AC_SUBST(RANLIN,$ff_RANLIB)
+
+
+# Dynamic loading of compiled functions
+# -------------------------------------
+
+# Not if we don't want shared libraries (non FH modif FH juin 2005)
+ff_dynload=no
+if test "$enable_static" != yes
+then
+
+ # Availability of dlopen(). Use AC_COMPILE rather than
+ # AC_CHECK_HEADERS because the latter has problems seeing it (in
+ # Cygwin) when it does not compile (in Mingw).
+
+ AC_MSG_CHECKING(for dlfcn.h)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <dlfcn.h>]])],
+ ff_dynload=yes,
+ ff_dynload=no)
+ AC_MSG_RESULT($ff_dynload)
+fi
+
+# FFCS - -lm missing for ffmedit link stage on Debian Testing
+AC_CHECK_LIB(m,sin)
+
+# Checks that we also have the corresponding library
+if test "$ff_dynload" = yes
+then
+ AC_CHECK_LIB(dl,dlinfo)
+
+ # Checks that everythings works ok
+ AC_MSG_CHECKING(whether dlopen links ok)
+ AC_LINK_IFELSE(
+[AC_LANG_SOURCE([[#include <dlfcn.h>
+int main(int argc,char **argv){
+ dlopen("",RTLD_LAZY);
+ return 0;
+}]])],
+ ff_dynload=yes,
+ ff_dynload=no)
+ AC_MSG_RESULT($ff_dynload)
+fi
+
+# the -rdynamic don't exist on macos and sunOS
+if test "$ff_dynload" = yes
+then
+ AC_DEFINE(HAVE_DLFCN_H,1,Dynamic loading - not mandatory)
+ # Activate dynamic loading tests (see examples++-load/Makefile.am)
+ AC_SUBST(LOAD_TESTS,../regtests.sh)
+ AC_SUBST(LOAD_COMPILE,load_compile)
+
+ # gcc on MacOS does not produce an error with "-rdynamic" but
+ # still complains about it.
+ if test "$ff_mac" = "no" -a "$ff_win32" = "no" -a "$ff_sunos" = "no" ;
+ then
+ CHECK_COMPILE_FLAG(C++,-rdynamic,LDFLAGS)
+dnl CHECK_COMPILE_FLAG(C,-rdynamic,CNOFLAGS)
+dnl CHECK_COMPILE_FLAG(C,-rdynamic,CFLAGS)
+ fi
+ CHECK_COMPILE_FLAG(C++,-fPIC,CXXFLAGS)
+ CHECK_COMPILE_FLAG(C,-fPIC,CFLAGS)
+ CHECK_COMPILE_FLAG(C,-fPIC,CNOFLAGS)
+ if test "$enable_fortran" != no
+ then
+ CHECK_COMPILE_FLAG(Fortran,-fPIC,FFLAGS)
+ CHECK_COMPILE_FLAG(Fortran,-fPIC,FNOFLAGS)
+ CHECK_COMPILE_FLAG(Fortran,-fPIC,FCFLAGS)
+ CHECK_COMPILE_FLAG(Fortran,-fPIC,FCNOFLAGS)
+dnl CHECK_COMPILE_FLAG(Fortran,-rdynamic,FNOFLAGS)
+dnl CHECK_COMPILE_FLAG(Fortran,-rdynamic,FFLAGS)
+
+ fi
+fi
+AC_SUBST(DYLIB_SUFFIX,$ff_suffix_dylib)
+
+# Checking wether we can generate some documentation
+# --------------------------------------------------
+
+AC_CHECK_PROG(ff_latex,latex,yes,no)
+AC_CHECK_PROG(ff_makeindex,makeindex,yes,no)
+AC_CHECK_PROG(ff_dvips,dvips,yes,no)
+# to translate the figure
+AC_CHECK_PROG(ff_pdf2ps,pdf2ps,yes,no)
+AC_CHECK_PROGS(EPSTOPDF,[epstopdf pstopdf],[false])
+AC_CHECK_PROG(ff_convert,convert,yes,no)
+if test "$ff_latex" = yes -a "$ff_makeindex" = yes -a "$ff_dvips" = yes -a $ff_pdf2ps = yes -a $ff_convert = yes;
+then
+ AC_SUBST(DOCPS,"freefem++doc.ps")
+
+ AC_CHECK_PROG(ff_gzip,gzip,yes,no)
+ if test "$ff_gzip" = yes;
+ then
+ AC_SUBST(DOCPSGZ,"freefem++doc.ps.gz")
+ fi
+fi
+
+# PDF documentation building sometimes poses problems because of
+# pdfsync.sty. So we need to be able to disable it.
+enable_pdf=yes
+AC_ARG_ENABLE(pdf,[ --disable-pdf Disable PDF documentation building])
+if test "$enable_pdf" != no
+then
+ AC_CHECK_PROG(ff_pdflatex,pdflatex,yes,no)
+ if test "$ff_pdflatex" = yes -a $EPSTOPDF != false -a $ff_convert = yes;
+ then
+ AC_SUBST(DOCPDF,"freefem++doc.pdf")
+ fi
+fi
+
+# HISTORY logging through CVS, but only if we are in a CVS working area
+if test -d CVS
+then
+ AC_CHECK_PROG(ff_history,cvs2cl,yes,no)
+ if test "$ff_history" = yes
+ then
+ AC_SUBST(HISTORY,history)
+ fi
+fi
+
+# Choosing compilation options for the standard version (in src/std)
+# ------------------------------------------------------------------
+
+# The "standard" configured version can use win32 (mingw)
+
+if test "$ff_mingw" = yes
+then
+
+ # FFCS does not use FreeFem++-std, and Pcrgraph.cpp does not compile under mingwin64
+ if test $enable_ffcs = no
+ then
+ ff_stdprog="FreeFem++-std${EXEEXT}"
+ ff_std_graph_obj=Pcrgraph.$OBJEXT
+ fi
+
+ # ALH - FFCS - 30/11/8 - I need to get the output from FF for FFCS regression tests
+ if test $enable_ffcs = yes
+ then
+ ff_std_ldflags="-mconsole -mwindows"
+ else
+ ff_std_ldflags=-mwindows
+ fi
+
+ ff_std_libs=
+fi
+AC_SUBST(STD_GRAPH_OBJ,$ff_std_graph_obj)
+AC_SUBST(STD_LDFLAGS,$ff_std_ldflags)
+
+AC_SUBST(STD_LIBS,$ff_std_libs)
+
+# Allow some downloaded tools not to be compiled
+# ----------------------------------------------
+
+# ALH - this is required by FFCS that needs to deactivate some tools that do not work on all platforms. Some FF users
+# may also find interesting to specify a local version of a tool instead of downloading it.
+
+# m4 macro parameters: $1 = tool name, $2 = dynamic library name, $3 = download directory name if different from $1
+
+m4_define([TOOL_PARAMETERS],
+ [AC_ARG_WITH($1_include,AC_HELP_STRING([--with-$1-include=],[Include directives for $1 instead of automatic download]))
+ AC_ARG_WITH($1_ldflags,AC_HELP_STRING([--with-$1-ldflags=],[Link-time directives for $1 instead of automatic download]))
+
+ if test "$with_$1_include" != "" || test "$with_$1_ldflags" != ""
+ then
+
+ # some directives have been specified, use them instead of downloading
+
+ AC_FF_ADDWHERELIB($1,$with_$1_ldflags,$with_$1_include)
+ AC_SUBST([TOOL_COMPILE_$1],"")
+ enable_$1_download=no
+ fi
+])
+
+m4_define([TOOL_DISABLE],
+ [AC_ARG_ENABLE($1,AC_HELP_STRING([--disable-$1],[Do not use $1]))
+ if test "$enable_$1" = "no"
+ then
+ AC_SUBST([TOOL_COMPILE_$1],"")
+ AC_SUBST([TOOL_DYLIB_$1],"")
+ else
+ AC_SUBST([TOOL_COMPILE_$1],ifelse($3,,$1,$3))
+ AC_SUBST([TOOL_DYLIB_$1],$2)
+ enable_$1_download=yes
+ fi
+
+ # Also allow to disable the download of one tool if it is already locally installed
+
+ TOOL_PARAMETERS($1,$2,$3)
+])
+## try to see pakage is hon computer if the FH ZZZZ
++<<<<<<< HEAD
+## FH to find gsl ...
+AX_PATH_GSL(1.15, ff_with_gsl=yes, ff_with_gsl=no)
+if test "$ff_with_gsl" = "yes"; then
+ AC_FF_ADDWHERELIB(gsl,$GSL_LIBS,$GSL_CFLAGS)
+fi
+
+##
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+m4_map([AC_FF_WHERELIB],[
+ [[mumps],[-ldmumps -lzmumps -lmumps_common -lpord],[dmumps_c.h],[]],
+ [[mumps_ptscotch],[-lpord_ptscotch -lmumps_common_ptscotch -ldmumps_ptscotch -lzmumps_ptscotch -lpord_ptscotch],[dmumps_c.h]],
+ [[mumps_scotch],[-lpord_scotch -lmumps_common_scotch -ldmumps_scotch -lzmumps_scotch -lpord_scotch],[dmumps_c.h]],
+ [[hypre],[-lHYPRE]],
+ [[fftw3],[-lfftw3],[/usr/include/fftw3.h],[]],
+ [[superlu_dist],[-lsuperlu-dist],[/usr/include/superlu-dist/superlu_defs.h],[]],
+ [[superlu],[-lsuperlu],[/usr/include/superlu/superlu_enum_consts.h],[]],
+ [[Superlu4],[-lsuperlu4],[/usr/include/superlu4/superlu_enum_consts.h],[]],
+ [[blacs],[ -lblacsCinit$ff_with_mpi -lblacsF77init$ff_with_mpi -lblacs$ff_with_mpi],[]],
+ [[scalapack],[-lscalapack$ff_with_mpi],[]],
+ [[scotch],[-lscotch -lscotcherr],[scotch.h]],
+ [[ptscotch],[-lptscotch -lptscotcherr],[ptscotch.h]],
+ [[metis],[-lscotch -lmetis],[/usr/include/metis/metis.h],[]],
+ [[metis],[-lscotch -lmetis],[metis.h],[]],
+ [[parmetis],[-lptscotch -lparmetis],[],[]],
+ [[freeyams],[-lfreeyams],[freeyamslib.h],[]],
+ [[mmg3d],[-lmmg3d],[libmmg3d.h],[]],
+ [[mshmet],[-lmshmet],[],[]],
++<<<<<<< HEAD
+dnl [[gsl],[-lgsl -lgslcblas -lm],[gsl/gsl_sf.h],[]],
++=======
++ [[gsl],[-lgsl -lgslcblas -lm],[gsl/gsl_sf.h],[]],
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ [[parms],[-lparms -litsol -llapack -lblas -lm],[],[]],
+ [[tetgen],[-ltet],[tetgen.h],[]],
+ ]
+ )
+## before try
+
+TOOL_DISABLE(fflapack,fflapack.$DYLIB_SUFFIX)
+TOOL_DISABLE(hips,hips_FreeFem.$DYLIB_SUFFIX)
+TOOL_DISABLE(ipopt,ff-Ipopt.$DYLIB_SUFFIX)
+TOOL_DISABLE(lapack,lapack.$DYLIB_SUFFIX)
+TOOL_DISABLE(metis,metis.$DYLIB_SUFFIX)
+TOOL_DISABLE(mmg3d,mmg3d-v4.0.$DYLIB_SUFFIX)
+TOOL_DISABLE(mshmet,mshmet.$DYLIB_SUFFIX)
+TOOL_DISABLE(mumps,"MUMPS_FreeFem.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX")
+TOOL_DISABLE(mumps_seq,"MUMPS_seq.$DYLIB_SUFFIX MUMPS.$DYLIB_SUFFIX",mumps-seq)
+TOOL_DISABLE(nlopt,ff-NLopt.$DYLIB_SUFFIX)
+TOOL_DISABLE(parmetis)
+TOOL_DISABLE(parms,parms_FreeFem.$DYLIB_SUFFIX)
+TOOL_DISABLE(pastix,"interfacepastix.$DYLIB_SUFFIX complex_pastix_FreeFem.$DYLIB_SUFFIX real_pastix_FreeFem.$DYLIB_SUFFIX")
+TOOL_DISABLE(pipe,pipe.$DYLIB_SUFFIX)
+TOOL_DISABLE(scotch,scotch.$DYLIB_SUFFIX)
+TOOL_DISABLE(superlu,SuperLu.$DYLIB_SUFFIX)
+TOOL_DISABLE(superludist,"complex_SuperLU_DIST_FreeFem.$DYLIB_SUFFIX real_SuperLU_DIST_FreeFem.$DYLIB_SUFFIX dSuperLU_DIST.$DYLIB_SUFFIX")
+TOOL_DISABLE(umfpack,UMFPACK64.$DYLIB_SUFFIX)
+TOOL_DISABLE(yams,freeyams.$DYLIB_SUFFIX)
+TOOL_DISABLE(pipe,pipe.$DYLIB_SUFFIX)
+
+# FFCS - MUMPS_seq has a different Win32 compiler setup from FFCS, so we need to add some extra parameters
+
+if test "$OS" = Windows_NT
+then
+ CFLAGS="$CFLAGS -DWITHOUT_PTHREAD -DAdd_"
+
+ # we also need to satisfy ff-c++ that the pthread are not a blocking point
+ if test -n "$ff_pthread" ; then
+ AC_FF_ADDWHERELIB(pthread,"",)
+ fi
+fi
+
+# ALH - pARMS needs "-fno-range-check" on Windows, but this options fails on MacOS 10.8. Add no-range-check for Windows
+# for hexadecimal parameter constants like:
+#
+# [[file:c:/cygwin/home/alh/ffcs/rel/mingw/mpif.h::PARAMETER MPI_SHORT_INT z 8c000003]]
+#
+# Such constants are rejected without [[file:download/parms/makefile-parms.in::NO_RANGE_CHECK]]
+
+if test "$OS" = Windows_NT
+then
+ AC_SUBST(NO_RANGE_CHECK,-fno-range-check)
+fi
+
+# ALH - 4/9/13 - request from Helmut Jarausch - allow to change Scotch include path
+if test "$with_scotch_include" = ""
+then
+ with_scotch_include=$ac_pwd/download/include/scotch
+fi
+AC_SUBST(SCOTCH_INCLUDE,$with_scotch_include)
+
+# Find out kernel and libc versions
+# ---------------------------------
+
+if test "$ff_win32" != yes -a "$ff_mac" != yes
+then
+ AC_MSG_CHECKING(kernel version)
+ ff_kernel_version=`cat /proc/version|perl -e '<STDIN>=~/(\d+\.\d+\.\d+)/;print $1;'`
+ AC_MSG_RESULT($ff_kernel_version)
+ AC_SUBST(KERNEL_VERSION,$ff_kernel_version)
+
+ AC_MSG_CHECKING(libc version)
+ ff_libc_version=`ldd /bin/sh | awk '/libc/{print $3}' | xargs readlink | sed -e 's/\.so$//'`
+ AC_MSG_RESULT($ff_libc_version)
+ AC_SUBST(LIBC_VERSION,$ff_libc_version)
+fi
+# def variable pour les makefiles
+
+# creating all makefiles
+# ----------------------
+
+ff_bamgprog="bamg${EXEEXT} cvmsh2${EXEEXT}"
+
+AC_SUBST(CNOFLAGS,$CNOFLAGS) dnl for superludist CFLAGS without optim ...
+AC_SUBST(FNOFLAGS,$FNOFLAGS) dnl for blacs CFLAGS without optim ...
+
+# The final list of executable programs
+
+AC_SUBST(MEDITPROG,$ff_meditprog)
+AC_SUBST(FFGLUTPROG,$ff_ffglutprog)
+AC_SUBST(BAMGPROG,$ff_bamgprog)
+AC_SUBST(STDPROG,$ff_stdprog)
+ff_progs="FreeFem++-nw $ff_bamgprog $ff_mpiprog $ff_meditprog $ff_ffglutprog"
+
+AC_SUBST(TEST_FFPP,$ff_TEST_FFPP)
+AC_SUBST(TEST_FFPPMPI,"../src/mpi/ff-mpirun")
+
+ff_with_mpi=-openmpi;
+
+ff_blacs="-lblacsCinit$ff_with_mpi -lblacsF77init$ff_with_mpi -lblacs$ff_with_mpi"
+ff_scalapack=-lscalapack
+
+# change MKL interface ...
+test -n "$ff_mkl_blacs" && ff_blacs="$ff_mkl_blacs"
+test -n "$ff_mkl_scalapack" && ff_scalapack="$ff_mkl_scalapack"
+test -n "$ff_mkl_root" && ff_winc="$ff_mkl_root/include/mkl_blas.h"
+
+# FFCS - 27/10/11 - Some extra conditionals for things that do not work on certain systems (eg MPI libraries under
+# Windows)
+
++<<<<<<< HEAD
+## search of HDF5 ....
+AX_LIB_HDF5()
+if test "$with_hdf5" = "yes"; then
+ AC_FF_ADDWHERELIB(hdf5,$HDF5_LDFLAGS $HDF5_LIBS,$HDF5_CPPFLAGS)
+ LIBS="$LIBS $HDF5_LDFLAGS $HDF5_LIBS"
+else
+ enable_iohdf5=no
+fi
+TOOL_DISABLE(iohdf5,iohdf5.$DYLIB_SUFFIX)
+
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+AM_CONDITIONAL([FFCS_WINDOWS],[test "$OS" = Windows_NT])
+
+# remove gsl if not find ... FH
+# correction FH .. 18/12/2013.
+# ALH - 7/1/14 - not able to compile gsl or pardiso with FFCS on Windows
+if test "$enable_ffcs" != yes
+then
+ if test "$ff_where_lib_conf_gsl" == 1 -a "$enable_gsl"!="no" ; then enable_gsl=yes; fi;
+ if test "$ff_where_lib_conf_mkl" == 1 -a "$enable_mkl"!=no ; then enable_pardiso=yes; fi;
+fi
++<<<<<<< HEAD
+TOOL_DISABLE(gsl,"gsl.$DYLIB_SUFFIX")
+TOOL_DISABLE(NewSolver,"NewSolver.$DYLIB_SUFFIX")
+TOOL_DISABLE(pardiso,"PARDISO.$DYLIB_SUFFIX")
+
+# echo "debug cxxx11: $ff_cxx11 mpi: $ff_mpi petsc: $ff_petsc_ok "
+
+test "$ff_cxx11" != yes -o "$ff_mpi" != yes && enable_schwarz=no
+
+TOOL_DISABLE(schwarz,"schwarz.$DYLIB_SUFFIX removeDOF.$DYLIB_SUFFIX utility.$DYLIB_SUFFIX")
+
++=======
++TOOL_DISABLE(gsl,"gsl.$DYLIB_SUFFIX NewSolver.$DYLIB_SUFFIX")
++TOOL_DISABLE(pardiso,PARDISO.$DYLIB_SUFFIX)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+# All makefiles
+AC_OUTPUT(Makefile
+ download/Makefile
+ download/blas/Makefile
+ download/arpack/Makefile
+ download/umfpack/Makefile
+ download/fftw/Makefile
+ src/Makefile
+ src/bamglib/Makefile
+ src/Graphics/Makefile
+ src/femlib/Makefile
+ src/Algo/Makefile
+ src/lglib/Makefile
+ src/fflib/Makefile
+ src/nw/Makefile
+ src/mpi/Makefile
+ src/bamg/Makefile
+ src/libMesh/Makefile
+ src/medit/Makefile
+ src/bin-win32/Makefile
+ examples++/Makefile
+ examples++-eigen/Makefile
+ examples++-tutorial/Makefile
+ examples++-mpi/Makefile
+ examples++-load/Makefile
+ examples++-chapt3/Makefile
+ examples++-bug/Makefile
+ examples++-other/Makefile
+ examples++-3d/Makefile
+ DOC/Makefile)
+AC_MSG_NOTICE([ freefem++ used download : $enable_download ])
+AC_MSG_NOTICE([ -- Dynamic load facility: $ff_dynload ])
+AC_MSG_NOTICE([ -- ARPACK (eigen value): $ff_arpack_ok ])
+AC_MSG_NOTICE([ -- UMFPACK (sparse solver) $ff_umfpack_ok ])
+AC_MSG_NOTICE([ -- BLAS $ff_blas_ok ])
+AC_MSG_NOTICE([ -- with MPI $ff_mpi])
++<<<<<<< HEAD
+AC_MSG_NOTICE([ -- with PETSC $ff_petsc_ok ]);
+AC_MSG_NOTICE([ -- with schwarz (HPDDM) $enable_schwarz (need MPI & c++11 : $ff_cxx11 ) ]);
+
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+AC_MSG_NOTICE([ progs: $ff_progs ])
+if test "$ff_umfpack_download" = yes ;then
+ AC_MSG_NOTICE([ use of download UMFPACK see download/umfpack/SuiteSparse/UMFPACK/README.txt for the License])
+fi
+if test "$ff_arpack_download" = yes ; then
+ AC_MSG_NOTICE([ use of download ARPACK see download/arpack/ARPACK/README no License ])
+fi
+
+if test "$enable_download" = yes ;then
+ AC_MSG_NOTICE([ use of download fftw see download/fftw/fftw-3.2/COPYRIGHT ])
+ AC_MSG_NOTICE([ use of download tetgen see download/tetgen/tetgen1.4.3/LICENSE ])
+ AC_MSG_NOTICE([ use of download freeyams see download/yams/freeyams.2011.02.22 (suface mesh adaptation) ])
+ AC_MSG_NOTICE([ use of download mmg3d (v4) see download/mmg3d/mmg3d4/LICENCE.txt ])
+ AC_MSG_NOTICE([ use of download metis])
+
+ # ALH - some tools may be activated but not downloaded if a local version is specified (see
+ # [[TOOL_PARAMETERS]])
+
+ if test "$enable_superlu_download" = yes
+ then
+ AC_MSG_NOTICE([ use of download superlu])
+ fi
+
+ if test -n "$MPICC" ; then
+ AC_MSG_NOTICE([ try to download: blacs parmetis scalapack scotch superludist pastix hypre hips library])
+ fi
+
+ if test "$ff_download_blas" = "generic" ; then
+ AC_MSG_NOTICE([ use of download generic blas and cblas freefem may be slow ])
+ AC_MSG_NOTICE([ you can try to use the Kazushige Goto s BLAS at http://www.cs.utexas.edu/users/flame/goto/ ])
+ AC_MSG_NOTICE([ or at http://www.tacc.utexas.edu/~kgoto/ for the best BLAS .])
+ AC_MSG_NOTICE([ or try to download/compile the altas blas .])
+ fi
+
+ # ALH - 30/10/13 - (request from FH) all downloads are now part of a separate script ([[file:download/getall]])
+ # which needs to be run before make for the user to specify whether he is ok with each of the package licences.
+
+ AC_MSG_NOTICE([ Please run "download/getall" to download all necessary packages before running make])
+fi
+
+# FFCS does not use glut, so remove this message because it could make the user think that something is broken
+
+if test $enable_ffcs = no
+then
+ if test "$ff_glut_ok" != yes ; then
+ AC_MSG_NOTICE([ *********************************************** ])
+ AC_MSG_NOTICE([ WARNING: you do not have the new grachics tools ])
+ AC_MSG_NOTICE([ because the configure do not find OpenGL, GLUT or pthread developer stuff ])
+ AC_MSG_NOTICE([ read the README to find missing package ])
+ AC_MSG_NOTICE([ F. Hecht ])
+ AC_MSG_NOTICE([ to install missing package under debian or ubuntu, try: sudo apt-get install freeglut3-dev ])
+ AC_MSG_NOTICE([ *********************************************** ])
+ fi
+fi
+
+# Local Variables:
+# mode:shell-script
+# ispell-local-dictionary:"british"
+# coding:utf-8
+# End:
diff --cc debian/changelog.orig
index 0da2a5c,0000000..97eae4f
mode 100644,000000..100644
--- a/debian/changelog.orig
+++ b/debian/changelog.orig
@@@ -1,190 -1,0 +1,193 @@@
++<<<<<<< HEAD
+freefem++ (3.34.1-1) UNRELEASED; urgency=medium
+
+ * Imported Upstream version 3.34.1
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Sun, 22 Feb 2015 11:50:14 +0200
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+freefem++ (3.32.1-1) experimental; urgency=medium
+
+ * Edit d/watch file to fix broken downloaded upstream tarball
+ * Imported Upstream version 3.32.1
+ * Update standards version
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Tue, 30 Dec 2014 16:21:29 +0200
+
+freefem++ (3.31-2-1) unstable; urgency=low
+
+ * Imported Upstream version 3.31-2
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Mon, 21 Jul 2014 14:15:13 +0300
+
+freefem++ (3.30-1) unstable; urgency=medium
+
+ * Imported Upstream version 3.30
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Fri, 25 Apr 2014 13:47:29 +0300
+
+freefem++ (3.27-1) unstable; urgency=medium
+
+ * Imported Upstream version 3.27
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Mon, 03 Mar 2014 13:31:46 +0200
+
+freefem++ (3.26-2-3) unstable; urgency=low
+
+ * Change package urgency from medium to low
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Thu, 26 Dec 2013 19:30:00 +0200
+
+freefem++ (3.26-2-2) unstable; urgency=medium
+
+ [ Dimitrios Eftaxiopoulos ]
+ * Enable build with metis
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Thu, 26 Dec 2013 16:13:46 +0200
+
+freefem++ (3.26-2-1) unstable; urgency=low
+
+ * Imported Upstream version 3.26-2 (Closes: #706714)
+ * Disable make check execution in d/rules (Closes: #730739)
+ * Correct architecture names for hurd and kfreebsd (Closes: #730738)
+ * Make libmesh.a install only in libfreefem++ binary
+ * Fix duplication of executables (Closes: #701161)
+ * Update standards version
+ * Set installation dir of WHERE* scripts to /usr/include/freefem++
+ * Add rdfind and symlinks to build deps in d/control
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Thu, 19 Dec 2013 22:38:49 +0200
+
+freefem++ (3.25-1) unstable; urgency=low
+
+ [ Dimitrios Eftaxiopoulos ]
+ * Imported Upstream version 3.25 (Closes: #701161 #706714)
+ * Change installation directory of header-like *.idp files
+ from /usr/lib/freefem++ to /usr/include/freefem++, in order
+ to fix a lintian warning
+ * Update patch to examples++-load/Makefile.am in order to enable
+ functioning of load *.so and include *.idp commands in *.edp
+ scripts
+ * Delete patches to src/Graphics/sansgraph.cpp and
+ src/Graphics/xglrgraph.cpp because they are not needed any more
+ * Fix lintian warning about missing LDFLAGS
+ * Override dh_auto_test in debian/rules, such that in case it is
+ used, it completes executing all *.edp example files, regardless
+ of aborting on some of them
+ * Add libmetis-dev to build-deps in d/control
+ * Remove libparmetis-dev from build deps
+ * Add --parallel option to dh $@ in debian/rules
+ * Add hardening compilation flags to mpic++
+ * Allow testing of compiling and running the example files after build
+
+ [ Christophe Trophime ]
+ * update C. Trophime email
+ * add support for nlopt, ipopt - simplify debian/rules
+ * upload CT changes to 3.20
+ * add patch for configure
+ * add patch for examples++-mpi
+ * fix bamg install
+ * add corrected scripts to build plugins
+ * add patch for properly build examples++-load
+ * add lintian overrides for libfreefem++
+ * add some missing files
+ * update patches
+ * update rules
+ * reorder BuildDepends - comment out unsupported libs
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Thu, 12 Sep 2013 00:02:58 +0300
+
+freefem++ (3.20-1) experimental; urgency=low
+
+ * New upstream release.
+ * Add libnlopt-dev and coinor-libipopt-dev to build-deps.
+ * Update patch examples++-load-Makefile.patch.
+ * Remove patch examples-load-WHERE-LIBRARY.patch.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Thu, 18 Oct 2012 14:14:12 +0300
+
+freefem++ (3.19.1-1) unstable; urgency=low
+
+ * New upstream release.
+ * Make debian/compat=9.
+ * Make debhelper (>= 9~) in Build-Depends in debian/control.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Sun, 03 Jun 2012 22:16:18 +0300
+
+freefem++ (3.19-1) unstable; urgency=low
+
+ * New upstream release.
+ * Add libmumps-seq-dev to build-deps.
+ * Update standards version to 3.9.3.
+ * Fix FTBFS due to new g++-4.7 (Closes: #672612).
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Sun, 12 May 2012 03:59:00 +0200
+
+freefem++ (3.18.1-1) unstable; urgency=low
+
+ * New upstream release.
+ * Create new patch for documentation build.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Fri, 17 Feb 2012 21:29:00 +0200
+
+freefem++ (3.18-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Sat, 4 Feb 2012 21:10:00 +0200
+
+freefem++ (3.17-2) unstable; urgency=low
+
+ * Fix build failure on hurd-i386 architecture.
+ * Rename kfreebsd.patch to examples++-load-load-link-in.patch and ammend it.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Thu, 29 Dec 2011 16:31:00 +0200
+
+freefem++ (3.17-1) unstable; urgency=low
+
+ * New upstream release.
+ * Add build-deps for libgmm++-dev.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Sun, 27 Nov 2011 14:17:00 +0200
+
+freefem++ (3.14-1) unstable; urgency=low
+
+ * Add build-deps for mumps_ptscotch, mumps_scotch and hypre.
+ * Change build-dep libfltk1.1-dev to libfltk1.3-dev | libfltk-dev in debian/
+ control file.
+ * New upstream release.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Wed, 14 Sep 2011 19:11:00 +0300
+
+freefem++ (3.13.3-1) unstable; urgency=low
+
+ * Add patch for the location of file freefem++.pref.
+ * New upstream release.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Tue, 9 Aug 2011 15:31:00 +0300
+
+freefem++ (3.13.2-1) unreleased; urgency=low
+
+ * Revert to gcc-4.6 for building.
+ * New upstream release.
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Sun, 3 Jul 2011 21:51:00 +0300
+
+freefem++ (3.13-2) unstable; urgency=low
+
+ * Change build-dep from openmpi-bin to mpi-default-dev to effect build on
+ more arches.
+ * Apply patch kfreebsd.patch to fix build failure on kfreebsd arches.
+ * Rename /usr/bin/bamg to /usr/bin/ffbamg to fix double occurence of the
+ former, in both rheolef and freefem++ packages (Closes: #630864).
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Mon, 20 Jun 2011 23:00:00 +0200
+
+freefem++ (3.13-1) unstable; urgency=low
+
+ * Initial release (Closes: #500755).
+ * Built with gcc-4.5 (see bug report 49264 submitted to the gcc bugzilla
+ upstream).
+
+ -- Dimitrios Eftaxiopoulos <eftaxi12 at otenet.gr> Mon, 13 Jun 2011 11:10:00 +0200
diff --cc debian/patches/configure.patch.orig
index 8affc91,0000000..da4349a
mode 100644,000000..100644
--- a/debian/patches/configure.patch.orig
+++ b/debian/patches/configure.patch.orig
@@@ -1,25 -1,0 +1,28 @@@
++<<<<<<< HEAD
+Change the path name for finding the superlu libraries
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+--- a/configure.ac
++++ b/configure.ac
+@@ -1653,8 +1653,8 @@
+ [[hypre],[-lHYPRE]],
+ [[fftw3],[-lfftw3],[/usr/include/fftw3.h],[]],
+ [[superlu_dist],[-lsuperlu-dist],[/usr/include/superlu-dist/superlu_defs.h],[]],
+- [[superlu],[-lsuperlu],[/usr/include/superlu/superlu_enum_consts.h],[]],
+- [[Superlu4],[-lsuperlu4],[/usr/include/superlu4/superlu_enum_consts.h],[]],
++ [[superlu],[-lsuperlu4],[/usr/include/superlu/superlu_enum_consts.h],[]],
++ [[superlu],[-lsuperlu4],[/usr/include/superlu/slu_ddefs.h],[]],
+ [[blacs],[ -lblacsCinit$ff_with_mpi -lblacsF77init$ff_with_mpi -lblacs$ff_with_mpi],[]],
+ [[scalapack],[-lscalapack$ff_with_mpi],[]],
+ [[scotch],[-lscotch -lscotcherr],[scotch.h]],
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -6,7 +6,7 @@
+
+ # $Id$
+
+-SUBDIRS=download src examples++-tutorial examples++ \
++SUBDIRS=src examples++-tutorial examples++ \
+ examples++-eigen examples++-load examples++-mpi \
+ examples++-bug examples++-chapt3 examples++-other \
+ examples++-3d DOC
diff --cc debian/patches/examples++-load.patch.orig
index 25f339c,0000000..10017fb
mode 100644,000000..100644
--- a/debian/patches/examples++-load.patch.orig
+++ b/debian/patches/examples++-load.patch.orig
@@@ -1,25 -1,0 +1,38 @@@
++<<<<<<< HEAD
+Ensure build on Hurd and kfreebsd arches and find header and library paths
+--- a/examples++-load/Makefile.am
++++ b/examples++-load/Makefile.am
+@@ -212,8 +212,8 @@
++=======
++--- a/examples++-load/Makefile.am
+++++ b/examples++-load/Makefile.am
++@@ -205,8 +205,8 @@
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ sed <$$i >$(DESTDIR)$(ff_prefix_dir)/lib/$$i 's#$(abs_top_builddir)/download#$(ff_prefix_dir)#' ;\
+ done
+ echo loadpath += \"./\" >$(DESTDIR)$(ff_prefix_dir)/etc/freefem++.pref
+- echo loadpath += \"$(ff_prefix_dir)/lib\" >>$(DESTDIR)$(ff_prefix_dir)/etc/freefem++.pref
+- echo includepath += \"$(ff_prefix_dir)/idp\" >>$(DESTDIR)$(ff_prefix_dir)/etc/freefem++.pref
++ echo loadpath += \"$(prefix)/lib/freefem++\" >>$(DESTDIR)$(ff_prefix_dir)/etc/freefem++.pref
++ echo includepath += \"$(prefix)/include/freefem++/idp\" >>$(DESTDIR)$(ff_prefix_dir)/etc/freefem++.pref
+ $(INSTALL_SCRIPT) ff-c++ $(DESTDIR)${bindir}
+ $(INSTALL_SCRIPT) ff-pkg-download $(DESTDIR)${bindir}
++<<<<<<< HEAD
+ $(INSTALL_SCRIPT) ff-get-dep $(DESTDIR)${bindir}
+--- a/examples++-load/load.link.in
++++ b/examples++-load/load.link.in
+@@ -225,7 +225,7 @@
++=======
++ $(INSTALL_SCRIPT) ff-get-dep $(DESTDIR)${bindir}
++--- a/examples++-load/load.link.in
+++++ b/examples++-load/load.link.in
++@@ -216,7 +216,7 @@
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ LIBS="'$b/libff.dll' $LIBS $DLL"
+ # SUF=dll
+ ;;
+- FreeBSD|NetBSD)
++ FreeBSD|NetBSD|GNU|GNU/kFreeBSD)
+ SHARED="-shared"
+ FLAGS='-fPIC';;
+ # 64 bit Linux needs -fPIC (ALH)
diff --cc debian/patches/examples-bamg.patch.orig
index 7173499,0000000..d6f9d33
mode 100644,000000..100644
--- a/debian/patches/examples-bamg.patch.orig
+++ b/debian/patches/examples-bamg.patch.orig
@@@ -1,9 -1,0 +1,12 @@@
++<<<<<<< HEAD
+Set proper path for perl executable
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+--- a/examples-bamg/test/dotest.pl
++++ b/examples-bamg/test/dotest.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # ----- clean ---
+ unlink <*.mesh>;
+ unlink <*.am_fmt>;
diff --cc download/Makefile.am.orig
index 1e89643,0000000..14badf7
mode 100755,000000..100755
--- a/download/Makefile.am.orig
+++ b/download/Makefile.am.orig
@@@ -1,191 -1,0 +1,207 @@@
+# Downloading and compiling extra libraries
+# -----------------------------------------
+
+# $Id: Makefile.am,v 1.16 2010/05/06 21:20:38 hecht Exp $
+
+SUBDIRS=blas arpack umfpack
+EXTRA_DIST= \
+./nlopt/Make.inc ./nlopt/Makefile \
+./blacs/BLACS.patch \
+./blacs/BLACS_gridinit_.c-return-values.patch \
+./blacs/Bmake-blacs.inc \
+./blacs/Makefile \
+./f2c/Makefile \
+./f2c/Makefile-MacOs \
+./f2c/f2c.h-int \
+./f2c/fort77.sed \
+./f2c/tt.f \
+./fftw/Makefile.am \
+./fftw/Makefile.in \
+./gmm/Makefile \
+./gmm/cxxflags \
+./headers-sparsesolver.inc \
+./hips/Makefile \
+./hips/SRC_SPKIT_makefile \
+./hips/hips-1.2b-rc4.patch \
+./hips/makefile-hips.inc \
+./hypre/Makefile \
+./hypre/ff-flags.inc \
+./metis/Makefile \
+./metis/Makefile-metis.in \
+./metis/patch-metis \
+./metis/metis-4.0_main_return.patch \
+./mmg3d/Makefile \
+./mmg3d/patch-mmg3dv4.diff \
+./mshmet/Makefile \
+./mshmet/Makefile-mshmet.inc \
+./mshmet/mshmet.2011.03.06.patch \
+./mshmet/mshmet.2012.04.25_i586.patch \
+./mshmet/mshmetlib-internal.h \
+./mshmet/mshmetlib.c \
+./mshmet/mshmetlib.h \
+./mumps/Makefile \
+./mumps-seq/Makefile-mumps-4.10.0.inc \
+./mumps-seq/Makefile \
+./mumps/Makefile-mumps-4.10.0.inc \
+./mumps/MUMPS_4.10.0.patch \
+./parmetis/Makefile-parmetis.in \
+./parmetis/makefile \
+./parmetis/parmetis-3.1.1.patch \
+./parms/Makefile \
+./parms/makefile-parms.in \
+./pastix/Makefile \
+./pastix/config-pastix-complex.in \
+./pastix/config-pastix-real.in \
+./pastix/pastix_release_2200-blend.patch \
+./pastix/patch-pastix_long_complex.h \
+./pastix//all_macros.diff \
+./scalapack/Makefile \
+./scalapack/SLmake-scalapack.inc \
+./scotch/Makefile \
+./scotch/Makefile-scotch.inc \
+./scotch/Makefile.patch \
+./scotch/scotch_5.1_esmumps.patch \
+./superlu/Makefile \
+./superlu/make.inc \
+./superludist/Makefile \
+./superludist/make-superlu.inc \
+./superludist/superludist_2.3.patch \
+./superludist/superludist_3.0-printf.patch \
+./superludist/superludist_3.0-cast_warning.patch \
+./superludist/superludist_3.0-return_values.patch \
+./superludist/superludist_3.0-operation_undefined.patch \
+./tetgen/Makefile \
+./tetgen/tetgen1.4.2.patch \
+./tetgen/patches.win64 \
+./yams/Makefile \
+./yams/freeyams.2012.02.05.patch \
+./yams/freeyams.2012.02.05-return-values.patch \
+./yams/makefile-yams.inc \
+./yams/yamslib.c \
+./yams/yamslib.h \
+./yams/yamslib_internal.h \
+ipopt/Makefile \
+ipopt/Makefile.inc.in \
+ipopt/patch-IpBlas \
+getall
+
+# FFCS: See [[file:../../../configure.ac::tools_problems_all_platforms]] for reasons why some tools may be deactivated
+
+# <<no_more_blacs>> blacs is included in scalapack 2.0.2
+
+MPI_SOFT=@TOOL_COMPILE_parmetis@ scalapack @TOOL_COMPILE_superludist@ \
+ @TOOL_COMPILE_mumps@ @TOOL_COMPILE_pastix@ \
+ @TOOL_COMPILE_hips@ @TOOL_COMPILE_parms@
+
+LIST_SOFT=tetgen @TOOL_COMPILE_superlu@ fftw @TOOL_COMPILE_metis@ \
+ @TOOL_COMPILE_scotch@ @TOOL_COMPILE_mshmet@ \
+ @TOOL_COMPILE_yams@ @TOOL_COMPILE_mmg3d@ gmm \
+ @TOOL_COMPILE_nlopt@ @TOOL_COMPILE_mumps_seq@ \
++<<<<<<< HEAD
+ @TOOL_COMPILE_ipopt@
++=======
++ @TOOL_COMPILE_ipopt@
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+all-recursive: bin lib include pkg
+
+lib:
+ mkdir lib
+bin:
+ mkdir bin
+include:
+ mkdir include
+pkg:
+ mkdir pkg
+
+# ALH - /download/yams and /download/mshmet need /src/libMesh/libmesh.a but /src is compiled after /download, so we
+# need to compile it now
+
+lib/libMesh.a:lib include
+ cd ../src/libMesh && $(MAKE) $(AM_MAKEFLAGS)
+ test -f ../src/libMesh/libMesh.a
+ mkdir -p include/libMesh
+ cp ../src/libMesh/*h include/libMesh
+ echo libMesh LD -L at DIR@/lib -lMesh > lib/WHERE.libMesh
+ echo libMesh INCLUDE -I at DIR@/include/libMesh >> lib/WHERE.libMesh
+ cp ../src/libMesh/libMesh.a lib/libMesh.a
+
++<<<<<<< HEAD
+all-local:bin lib include lib/libMesh.a pkg $(DOWNLOADCOMPILE) install-other
+
+install-other: tag-install-other
+
+tag-install-other:
+ test -n "$(TOOL_COMPILE_schwarz)" && $(MAKE) install-hpddm
+ touch tag-install-other
+
+WHERE-OTHER: lib/WHERE.hpddm
+WHERE-LD: tag-compile-pkg WHERE-OTHER
+ touch ../examples++-load/WHERE_LIBRARY-config ../examples++-load/WHERE_LIBRARY
+ grep LD ../examples++-load/WHERE_LIBRARY ../examples++-load/WHERE_LIBRARY-config >WHERE-LD
+install-hpddm:
+ test -n "$(TOOL_COMPILE_schwarz)" && ./getall hpddm -a && $(MAKE) include/hpddm-master lib/WHERE.hpddm
+reinstall-hpddm:
+ -rm ../pkg/hpddm.zip
+ -rm -rf include/hpddm-master
+ test -n "$(TOOL_COMPILE_schwarz)" && $(MAKE) install-hpddm
+include/hpddm-master:
+ -if test -f ../pkg/hpddm.zip ; then cd include; unzip ../pkg/hpddm.zip ; fi
+
+lib/WHERE.hpddm:
+ if test -d include/hpddm-master ; then \
+ echo hpddm LD -L at DIR@/lib > $@ ;\
+ echo hpddm INCLUDE -I at DIR@/include/hpddm-master/src >> $@ ;\
+ fi
++=======
++all-local:bin lib include lib/libMesh.a pkg $(DOWNLOADCOMPILE)
++
++WHERE-LD: tag-compile-pkg
++ touch ../examples++-load/WHERE_LIBRARY-config ../examples++-load/WHERE_LIBRARY
++ grep LD ../examples++-load/WHERE_LIBRARY ../examples++-load/WHERE_LIBRARY-config >WHERE-LD
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+# FFCS: need to stop at the first error to make sure that all libraries are correctly compiled
+compile-dir:
+ @echo "\n\n ****** $(COMPILEDIR) ****** \n\n";
+ @if [ 0 -eq `egrep ':$(COMPILEDIR)' WHERE-LD | wc -l` ] ;then \
+ cd $(COMPILEDIR) && $(MAKE) $(DIRTARGET) ; \
+ else \
+ echo $(COMPILEDIR) is in WHERE- files ;\
+ fi
+compile-pkg: tag-compile-pkg WHERE-LD
+
+# FFCS: need to stop at the first error to make sure that all libraries are correctly compiled
+tag-compile-pkg: bin lib include pkg FORCE
+ @if [ -n "$(WGET)" ] ; then \
+ for d in $(LIST_SOFT) ; do $(MAKE) compile-dir COMPILEDIR=$$d || exit 1;done ;\
+ if [ -n "$(MPICC)" ] ; then \
+ for d in $(MPI_SOFT) ; do $(MAKE) compile-dir COMPILEDIR=$$d || exit 1; done;\
+ fi;fi
+ touch tag-compile-pkg
+FORCE:
+
+re-install:
+ $(MAKE) compile-pkg DIRTARGET=install
+WHERE:
++<<<<<<< HEAD
+ $(MAKE) compile-pkg DIRTARGET=WHERE
++=======
++ $(MAKE) compile-pkg DIRTARGET=WHERE
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+install-exec-local:
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/lib
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/bin
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/include
+ cp -rp lib $(DESTDIR)$(ff_prefix_dir)
+ cp -rp include $(DESTDIR)$(ff_prefix_dir)
+ cp -rp bin $(DESTDIR)$(ff_prefix_dir)
+
+clean-local:
+ -rm -rf tag-* include lib bin
+ -mkdir include lib bin
+ -rm */FAIT */FAIRE
+# FFCS - make sure that all directories are cleaned. Thisis especially important under Windows because there is no
+# compilation dependencies control there (see
+# [[file:c:/cygwin/home/alh/ffcs/dist/configure.ac::dependency_tracking]])
+ for d in $(LIST_SOFT) $(MPI_SOFT) ; do $(MAKE) clean -C $$d ; done
diff --cc download/getall.orig
index d10a47e,0000000..05d5309
mode 100755,000000..100755
--- a/download/getall.orig
+++ b/download/getall.orig
@@@ -1,217 -1,0 +1,224 @@@
+#!/usr/bin/perl
+# Download third-party packages independently of FF configuration (request from FH)
+# ======================================================================
+# Written by Antoine Le Hyaric
+# http://www.ljll.math.upmc.fr/lehyaric
+# Laboratoire Jacques-Louis Lions
+# Université Pierre et Marie Curie-Paris6, UMR 7598, Paris, F-75005 France
+# ======================================================================
+# This file is part of Freefem++
+#
+# Freefem++ is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# Freefem++ is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Freefem++; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+# ======================================================================
+# headeralh brief="Download third-party packages independently of FF configuration (request from FH)" default=0 freefem perl start=21/10/2013 upmc written
+
+use strict;
+use Getopt::Std;
+use Digest::MD5 qw(md5_hex); # [[http://perldoc.perl.org/Digest/MD5.html]]
+
+# This download script needs to be able to work on platforms that do not have threads (eg Mingw).
+
+my $can_use_threads=eval 'use threads;use threads::shared;1';
+
+my %opts;
+getopts('afho:',\%opts);
+
+if($opts{h}){
+ print <<EOF;
+getall [options]: Download third-party packages independently of the FreeFem++ configuration procedure
+
+Available options:
+
+-a = accept all licences without further user interaction
+-f = force downloads even if packages are already present locally
+-h = this help
+-o name,name,... = only download packages with the given names
+
+EOF
+ exit 0;
+}
+
+# Accumulate errors and print them all at the end of the script
+
+my $errors='';
+if($can_use_threads){share(\$errors)}
+
+# list required packages
+my $only=0;
+my %packs;
+if(defined $opts{o}){
+ $only=1;
+ foreach(split(/,/,$opts{o})){$packs{$_}=1}
+}
+
+# can be run from the parent directory
+
+if(-x "download/getall"){chdir "download"}
+
+# can be run from any of the child directories
+
+if(-x "../getall"){chdir ".."}
+
+system "mkdir -p pkg";
+my @downloads;
+
+download('ARPACK','http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz',
+ 'http://www.caam.rice.edu/software/ARPACK','arpack96.tar.gz','fffaa970198b285676f4156cebc8626e');
+download('ARPACK','http://www.caam.rice.edu/software/ARPACK/SRC/patch.tar.gz',
+ 'http://www.caam.rice.edu/software/ARPACK','patch.tar.gz','14830d758f195f272b8594a493501fa2');
+
+download('BLAS','http://www.netlib.org/blas/blas.tgz','http://www.netlib.org/blas','blas.tgz',
+ '5e99e975f7a1e3ea6abcad7c6e7e42e6');
+download('BLAS','http://www.netlib.org/blas/blast-forum/cblas.tgz','http://www.netlib.org/blas','cblas.tgz',
+ '1e8830f622d2112239a4a8a83b84209a');
+
+download('OpenBLAS','http://github.com/xianyi/OpenBLAS/tarball/v0.2.12','http://www.openblas.net/','OpenBLAS.tar.gz',
+ 'dfc868e0c134855639f036d2723bf4be',
+ 'BAD_CERT');
+
+download('FFTW','http://www.fftw.org/fftw-3.3.2.tar.gz','http://www.fftw.org','fftw-3.3.2.tar.gz',
+ '6977ee770ed68c85698c7168ffa6e178');
+
+download('freeYams','http://www.ann.jussieu.fr/~frey/ftp/archives/freeyams.2012.02.05.tgz',
+ 'http://www.ann.jussieu.fr/~frey/software.html','freeyams.2012.02.05.tgz','b7c82a256a3e59beeb2b578de93a4e0b');
+
+download('Gmm++','http://download.gna.org/getfem/stable/gmm-4.2.tar.gz',
+ 'http://download.gna.org/getfem/html/homepage/download.html','gmm-4.2.tar.gz','35fe900f7459c49f4b4337dc691c8cdf');
+
+download('Hips','http://hips.gforge.inria.fr/release/hips-1.2b-rc4.tar.gz',
+ 'http://hips.gforge.inria.fr/','hips-1.2b-rc4.tar.gz','78720bf9bbbce5e174bdbdbaa1e5d7b4');
+
+download('Ipopt','http://www.coin-or.org/download/source/Ipopt/Ipopt-3.10.2.tgz',
+ 'https://projects.coin-or.org/Ipopt','Ipopt-3.10.2.tgz','e647a49a80a03f2682db583e00aa520b');
+
+download('METIS','http://www.netlib.org/linalg/metis-4.0.tar.gz','http://www.netlib.org/linalg/','metis-4.0.tar.gz',
+ '0aa546419ff7ef50bd86ce1ec7f727c7');
+
+download('ParMETIS','http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/OLD/ParMetis-3.1.1.tar.gz',
+ 'http://glaros.dtc.umn.edu/gkhome/views/metis','ParMetis-3.1.1.tar.gz','57318dbaddff2c3d1ef820cff0bf87b0');
+
+download('MMG3D','http://www.math.u-bordeaux1.fr/~dobrzyns/logiciels/download/mmg3d4.0.tgz',
+ 'http://www.math.u-bordeaux1.fr/~dobrzyns/logiciels/mmg3d.php','mmg3d4.0.tgz','bfc2b0373bc208e0512415d1aa2e76a1');
+
+download('mshmet','http://www.ann.jussieu.fr/~frey/ftp/archives/mshmet.2012.04.25.tgz',
+ 'http://www.ann.jussieu.fr/~frey/software.html','mshmet.2012.04.25.tgz','427f397e0602efc56aa897d38a8e9bfa');
+
+download('MUMPS','http://graal.ens-lyon.fr/MUMPS/MUMPS_4.10.0.tar.gz',
+ 'http://graal.ens-lyon.fr/MUMPS/','MUMPS_4.10.0.tar.gz','959e9981b606cd574f713b8422ef0d9f');
+
+download('NLopt','http://ab-initio.mit.edu/nlopt/nlopt-2.2.4.tar.gz',
+ 'http://ab-initio.mit.edu/wiki/index.php/NLopt','nlopt-2.2.4.tar.gz','9c60c6380a10c6d2a06895f0e8756d4f');
+
+download('pARMS','http://www-users.cs.umn.edu/~saad/software/pARMS/pARMS_2.2.php',
+ 'http://www-users.cs.umn.edu/~saad/software/pARMS','pARMS_2.2.tar.gz','be0b4a539d78b9b2b7faf32ff83de822');
+
+# ALH - 6/1/14 - web certificate for gforge.inria.fr is rejected
+
+download('PaStiX','https://gforge.inria.fr/frs/download.php/21873/pastix_release_2200.tar.bz2',
+ 'https://gforge.inria.fr/projects/pastix/','pastix_release_2200.tar.bz2','c82b1808084f183dc8dfd07b1deef694',
+ 'BAD_CERT');
+
+download('ScaLAPACK','http://www.netlib.org/scalapack/scalapack-2.0.2.tgz',
+ 'http://www.netlib.org/scalapack/','scalapack-2.0.2.tgz','2f75e600a2ba155ed9ce974a1c4b536f');
+
+# ALH - 6/1/14 - web certificate for gforge.inria.fr is rejected
+
+download('Scotch','https://gforge.inria.fr/frs/download.php/23391/scotch_5.1.6_esmumps.tar.gz',
+ 'https://gforge.inria.fr/projects/scotch/','scotch_5.1.6_esmumps.tar.gz','961d0ab22914fc6455a62699cf7b5a47',
+ 'BAD_CERT');
+
+download('SuiteSparse','http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-4.3.1.tar.gz',
+ 'http://www.cise.ufl.edu/research/sparse/SuiteSparse/','SuiteSparse-4.3.1.tar.gz',
+ 'f8f26a3b1c7f82444c0db0b375215287');
+
+download('SuperLU','http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_4.3.tar.gz',
+ 'http://crd-legacy.lbl.gov/~xiaoye/SuperLU/','superlu_4.3.tar.gz','b72c6309f25e9660133007b82621ba7c');
+download('SuperLU_DIST','http://crd-legacy.lbl.gov/~xiaoye/SuperLU/superlu_dist_3.0.tar.gz',
+ 'http://crd-legacy.lbl.gov/~xiaoye/SuperLU/','superlu_dist_3.0.tar.gz','1d77f10a265f5751d4e4b59317d778f8');
+
+download('TetGen','http://wias-berlin.de/software/tetgen/files/tetgen1.4.3.tar.gz',
+ 'http://wias-berlin.de/software/tetgen/','tetgen1.4.3.tar.gz','d6a4bcdde2ac804f7ec66c29dcb63c18');
+
+download('PETSc','http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.2.tar.gz',
+ 'http://ftp.mcs.anl.gov/pub/petsc/release-snapshots','petsc-lite-3.5.2.tar.gz','d707336a98d7cb31d843804d020edc94');
++<<<<<<< HEAD
+download('hpddm','https://github.com/hpddm/hpddm/archive/master.zip',
+ 'https://github.com/hpddm','hpddm.zip','none');
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+# run all downloads concurrently
+
+if($can_use_threads){
+ my @threads;
+ foreach(@downloads){push @threads,threads->create(\&downloadone,$_)}
+ foreach(@threads){$_->join()}
+}
+else{
+ foreach(@downloads){downloadone($_)}
+}
+
+if($errors ne ''){
+ print "\n$errors";
+ exit 1;
+}
+
+sub download{
+ my($title,$url,$lic,$pkg,$md5,$opts)=@_;
+
+ # skip packages that have not been requested explicitely
+ return if($only && !defined $packs{$title});
+
+ # skip packages that are already present
+ if(-f "pkg/$pkg" && !$opts{f}){
+ print "$title $pkg done\n";
+ return;
+ }
+
+ # we do not store the answers to these questions. To repeat the same downloads without manual input, options "-a" and
+ # "-o names" are provided.
+
+ if(!$opts{a}){
+ print "$title: please check the licence at $lic. Do you want to download $url? (yN)\n";
+ my $ans=uc <STDIN>;
+ chomp $ans;
+ return if $ans ne 'Y';
+ }
+
+ # uses [[file:../build/download]]
+ push @downloads,"$url,pkg/$pkg,$md5,$opts";
+}
+
+sub downloadone{
+ my($url,$pkg,$md5,$opts)=split(/,/,$_[0]);
+ my $cmd="../build/download $url $pkg $opts";
+ print "$cmd\n";
+ system $cmd;
+ if($?){$errors.="ERROR: $cmd FAILED\n"}
+
+ # check if resulting package contents are valid
+ my $md5check=md5_hex(`cat $pkg`);
++<<<<<<< HEAD
+ if( ( $md5 ne "none") && ($md5check ne $md5)){$errors.="ERROR: INVALID MD5 for $pkg\n"}
++=======
++ if($md5check ne $md5){$errors.="ERROR: INVALID MD5 for $pkg\n"}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+}
+
+# Local Variables:
+# mode:cperl
+# ispell-local-dictionary:"british"
+# coding:utf-8
+# End:
diff --cc download/scotch/Makefile-scotch.inc.orig
index 5ea9b52,0000000..8d2f963
mode 100644,000000..100644
--- a/download/scotch/Makefile-scotch.inc.orig
+++ b/download/scotch/Makefile-scotch.inc.orig
@@@ -1,32 -1,0 +1,36 @@@
+# ALH - avoid blocking when Makefile.inc is not built yet
+-include @abs_top_builddir@/download/headers-sparsesolver.inc
+
+EXE =
+LIB = .a
+OBJ = .o
+DIRMPI = @FFMPIDIR@
+MAKE = make
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+CAT = cat
+CCS = @CC@
+CCP = @MPICC@
+CCD = @CC@ -I'@MPI_INC_DIR@'
+
+# FFCS - 16/4/13 - some plain C files seem to need access to mpi.h too
+
+# FFCS - 23/4/13 - remove thread and fork dependency on Windows with
+# -DCOMMON_STUB_FORK without -DCOMMON_PTHREAD
+# [[file:scotch_5.1_esmumps/INSTALL.TXT::COMMON_STUB_FORK]]
+
+CFLAGS = @CFLAGS@ -I'@MPI_INC_DIR@' $(FFINTSCOTCH) -Drestrict=__restrict -DCOMMON_STUB_FORK -DCOMMON_RANDOM_FIXED_SEED -DCOMMON_TIMING_OLD -DSCOTCH_RENAME -DSCOTCH_DETERMINISTIC
+
++<<<<<<< HEAD
+LDFLAGS = @LDFLAGS@ -lm @MPI_LIBC@ @LIBSPTHREAD@ #-L/usr/local/lib/gcc/
++=======
++LDFLAGS = @LDFLAGS@ -lm @MPI_LIB@ @LIBSPTHREAD@ #-L/usr/local/lib/gcc/
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+CP = cp
+LEX = @LEX@
+LN = ln
+MKDIR = mkdir
+MV = mv
+RANLIB = @RANLIB@
+YACC = @YACC@
+WGET = @WGET@
diff --cc examples++-3d/Makefile.am.orig
index fcd4579,0000000..2446fba
mode 100644,000000..100644
--- a/examples++-3d/Makefile.am.orig
+++ b/examples++-3d/Makefile.am.orig
@@@ -1,46 -1,0 +1,50 @@@
+# $Id$
+
+all-local: all.edp regtests.edp freefem++.pref
+
+TESTS=3d-Leman.edp ArrayFE-3d.edp EqPoisson.edp Lac.edp Laplace-Adapt-3d.edp Laplace-Adapt-aniso-3d.edp Laplace3d.edp LaplaceRT-3d.edp NSI3d-carac.edp NSI3d.edp Period-Poisson-cube-ballon.edp Poisson-cube-ballon.edp Poisson.edp Poisson3d.edp Stokes.edp TruncLac.edp beam-3d.edp cone.edp convect-3d.edp cube-period.edp cylinder-3d.edp cylinder.edp fallingspheres.edp first.edp meditddm.edp p.edp periodic-3d.edp pyramide.edp refinesphere.edp schwarz-nm-3d.edp sphere2.edp sphere6.edp tetge [...]
++<<<<<<< HEAD
+XFAIL_TESTS=Laplace-Adapt-aniso-3d.edp fallingspheres.edp Laplace-Adapt-3d.edp Period-Poisson-cube-ballon.edp Poisson-cube-ballon.edp cylinder.edp refinesphere.edp tetgencube.edp tetgenholeregion.edp Poisson3d.edp schwarz-nm-3d.edp
++=======
++XFAIL_TESTS=Laplace-Adapt-aniso-3d.edp fallingspheres.edp Laplace-Adapt-3d.edp Period-Poisson-cube-ballon.edp Poisson-cube-ballon.edp cylinder.edp refinesphere.edp tetgencube.edp tetgenholeregion.edp Poisson3d.edp
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+LOG_DRIVER=$(SHELL) $(top_srcdir)/test-driver-ff
+TESTS_ENVIRONMENT=TEST_FFPP=$(TEST_FFPP) FLAGS_FFPP=-nw
+
+LIST_IDP=MeshSurface.idp cube.idp
+
+EXTRA_DIST=*.edp all.edp regtests.edp regtests.m4 ref.edp dodecaedre01.mesh \
+ lac-leman-v4.msh $(LIST_IDP)
+
+
+
+all.edp: Makefile
+ (echo "NoGraphicWindow=true;NoUseOfWait=true;int verbosityy=verbosity;int MEM1234=storageused();"; \
+ for i in *`ls *.edp|grep -v -E '^(all|regtests|makeref|ref)\.edp$$'` ; do \
+ echo ' cout << "--------- file : '$$i' --------------------------------------------------------" << endl;' ;\
+ echo "verbosity=verbosityy;searchMethod=0;" ; \
+ echo \{ include \"$$i\"\;\}\; ;\
+ echo ' cout << " mem leak = " <<storageused() - MEM1234 << endl << "------------------------------------------------------------------------------ " << endl;' ;\
+ done) > $@
+
+# To create a new set of reference values in "ref.edp"
+Ref: makeref.edp freefem++.pref
+ export FF_LOADPATH=../examples++-load/.;../src/nw/FreeFem++-nw makeref.edp
+
+makeref.edp: regtests.m4 ../regtests.m4
+ m4 regtests.m4 > makeref.edp
+
+freefem++.pref:
+ echo loadpath = \"../examples++-load/\" >freefem++.pref
+ echo loadpath += \"./\" >>freefem++.pref
+3d-Leman.edp:freefem++.pref
+install-exec-local::
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/idp
+ $(INSTALL) -m 555 $(LIST_IDP) $(DESTDIR)$(ff_prefix_dir)/idp
+
+
+
+# To check the scripts against their reference values
+regtests.edp: regtests.m4 ../regtests.m4
+ m4 -DASSERT regtests.m4 > regtests.edp
+FORCE:
diff --cc examples++-load/BinaryIO.cpp.orig
index 95a0941,0000000..c309330
mode 100644,000000..100644
--- a/examples++-load/BinaryIO.cpp.orig
+++ b/examples++-load/BinaryIO.cpp.orig
@@@ -1,89 -1,0 +1,100 @@@
+
+#include <iostream>
+#include <cfloat>
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+#include "rgraph.hpp"
+#include "RNM.hpp"
+#include "fem.hpp"
+#include "FESpace.hpp"
+#include "MeshPoint.hpp"
+#include "AFunction_ext.hpp" // Extension of "AFunction.hpp" to deal with more than 3 parameters function
+using namespace Fem2D;
+
+
+double SaveVec(KN<double> *const & f, string *const & nome)
+{
+ std::ofstream outfile (nome->data(),ios_base::binary);
+ // To access value at node i of vector N, do as follow: *(N[0]+i)
+ // Explanation (C++ for dummies as I am ;-):
+ // N is an alias to the KN object.
+ // N[0] is a pointer to the first element of the vector.
+ // N[0]+i is a pointer to the ith element of the vector.
+ // *(N[0]+i) is the value of the ith element of the vector.
+
+ long int nn = f->N(); // get number of nodes
+ long int dim=nn;
+ outfile.write ((char*) &dim, sizeof(long int));//write the dimension of the vector
+ double ftemp ;
+ for(long int i=0; i<nn; i++) {
+
+ ftemp = *(f[0]+i) ;
+ outfile.write ((char*) &ftemp, sizeof(double));
+ }
+ outfile.close();
+ return 0.0; // dummy return value.
+}
+
+
+double LoadVec(KN<double> *const & ww, string *const & nome)
+{
+ std::ifstream infile (nome->data(),ios_base::binary);
+ long int dim;
+ infile.read((char *) &dim, sizeof(long int));
+ double dtemp;
+ for(long int i=0; i<dim; i++)
+ {
+ infile.read((char *) &dtemp, sizeof(double));
+ *(ww[0]+i)=dtemp ;
+ }
+ return 0.0; // dummy return value.
+}
+
+
+double LoadFlag(long int *const & ww, string *const & nome)
+{
+ std::ifstream infile (nome->data(),ios_base::binary);
+ long int flag;
+ infile.read((char *) &flag, sizeof(long int));
+ *ww=flag;
+ return 0.0; // dummy return value.
+}
+
+double flag(long int *const & FLAG,string *const &nome)
+{
+ std::ofstream outfile (nome->data(),ios_base::binary);
+long int Flag;
+ Flag= *FLAG;
+ outfile.write ((char*) &Flag, sizeof(long int));
+outfile.close();
+ return 0.0;
+}
+
+
+
+// add the function name to the freefem++ table
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+static void Load_Init(){
++=======
++class Init { public:
++ Init();
++};
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ Global.Add("LoadVec","(",new OneOperator2_<double, KN<double>*, string* >(LoadVec));
+Global.Add("LoadFlag","(",new OneOperator2_<double,long int*, string* >(LoadFlag));
+ Global.Add("SaveVec","(",new OneOperator2_<double,KN<double>*, string* >(SaveVec));
+ Global.Add("flag","(",new OneOperator2_<double,long int*,string* >(flag));
+}
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/DxWriter.cpp.orig
index 05393e0,0000000..b89ef06
mode 100644,000000..100644
--- a/examples++-load/DxWriter.cpp.orig
+++ b/examples++-load/DxWriter.cpp.orig
@@@ -1,351 -1,0 +1,362 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Sala Lorenzo
+// E-MAIL : salalo80 at gmail.com
+//
+
+#include "mode_open.hpp"
+#include <iostream>
+#include <cfloat>
+#include <cmath>
+#include <iterator>
+using namespace std;
+#include "ff++.hpp"
+using namespace Fem2D;
+
+
+/*!The class DxWriter permits to save in opendx format a "field"
+(in the dx-language a "field" means the values of a function f(x,y,z) on a grid),
+a time series (an ordered collection of "fields", so we have field0=f(x,y,z,t0), field1=f(x,y,z,t1)
+and so on).
+DxWriter creates two files: one with extension .data where it puts the position of the grid, the connessions,
+the values; and one with extension.dx where it puts the time series.
+Now you can save only scalar fields.
+An example <code>
+load "DxWriter"
+mesh Th=square(5,5);
+DxWriter ff("pippo");
+Dxaddmesh(ff, Th);
+Dxaddtimeseries(ff, "Vx",Th);
+fespace Vh(Th, P1);
+Vh vx=x*y;
+Dxaddsol2ts(ff,"Vx",1.0, vx);
+vx=0.5*x*y^2+0.2;
+Dxaddsol2ts(ff,"Vx",2.0, vx);
+cout<<"Ciao";
+</code>
+*/
+
+class DxWriter {
+ struct tsinfo{
+ int imesh;//!<index of the mesh
+ std::string name;
+ std::vector<double> vecistant;
+ };
+private:
+std::vector<Fem2D::Mesh*> _vecmesh;
+std::vector<tsinfo> _vecofts;
+std::string _nameoffile;
+/*! This string contains the name of data file with \\ where there's a \ in the path*/
+std::string _nameofdatafile;
+//!files containing the data and the timeseries
+std::ofstream _ofdata, _ofts;
+
+/*!This function is called frequently, so if the main program crashes the files are good
+and you need only write "end" at the end of data file: echo end>>nameoffile.data and then the files are good
+*/
+void save_header(){
+ std::string s=_nameoffile;
+ s.append(".dx");
+ _ofts.open(s.c_str(), std::ios_base::out);
+ for(int i=0;i<_vecofts.size();++i){
+ _ofts<<"object \""<<_vecofts[i].name<<"\" class series"<<std::endl;
+ for(int j=0;j<_vecofts[i].vecistant.size();++j){
+ _ofts<<"member "<<j<<" value file \""<<_nameofdatafile<<"\",\""<<_vecofts[i].name<<"_"<<j<<"\" position "<<_vecofts[i].vecistant[j]<<std::endl;
+ }
+ _ofts<<std::endl;
+ }
+ _ofts<<"end"<<std::endl;
+ _ofts.close();
+ }
+
+
+public:
+ DxWriter() { std::cout << "Constructor of DxWriter" << endl; }
+ void openfiles(const std::string& s){
+ _nameoffile=s;
+ std::string tmp=s+".data";
+ std::cout<<tmp<<" ";
+ _ofdata.open(tmp.c_str(), std::ios_base::out);
+ _nameofdatafile="";
+ for(int i=0;i<tmp.length();++i){
+ if(tmp.at(i)=='\\')
+ _nameofdatafile.append(1,'\\');
+ _nameofdatafile.append(1,tmp.at(i));
+ }
+ }
+
+ void addmesh(Fem2D::Mesh* mesh){
+ Fem2D::Mesh& Th(*mesh);
+ _vecmesh.push_back(mesh);
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+ _ofdata<<"object \"pos_"<<_vecmesh.size()-1 <<"\" class array type float rank 1 shape 2 items "<<Th.nv<<" data follows"<<std::endl;
+ for(int k=0;k<Th.nv;++k){//Scorre tutti i vertici
+ _ofdata << Th(k).x<<" "<<Th(k).y<<endl;
+ }
+ _ofdata<<std::endl;
+ _ofdata.flags(std::ios_base::fixed);
+ _ofdata<<"object \"conn_"<<_vecmesh.size()-1<<"\" class array type int rank 1 shape 3 items "<<Th.nt<<" data follows "<<endl;
+ for (int i=0;i<Th.nt;i++){
+ for (int j=0; j <3; j++)
+ _ofdata << Th(i,j) << " ";
+ _ofdata<< endl;
+ }
+ _ofdata<<"attribute \"element type\" string \"triangles\" "<<std::endl;
+ _ofdata<<"attribute \"ref\" string \"positions\" "<<std::endl<<std::endl;
+ }
+ /*!Add a new time series, defined on the mesh*/
+ void addtimeseries(const string& nameofts, Fem2D::Mesh* mesh){
+ tsinfo ts;ts.name=nameofts;
+ std::vector<Fem2D::Mesh*>::const_iterator first=_vecmesh.begin(), last=_vecmesh.end();
+ if(std::find(first, last, mesh)==last){
+ addmesh(mesh);
+ ts.imesh=_vecmesh.size()-1;
+ }else{
+ ts.imesh=std::distance(first, std::find(first, last, mesh));
+ }
+ _vecofts.push_back(ts);
+ }
+
+ /*!Add an instant to a time series name*/
+ void addistant2ts(const string& nameofts, const double t, const KN<double>&val){
+ int jj=-1;
+ for(int i=0;i<_vecofts.size();++i){
+ if(_vecofts[i].name==nameofts)jj=i;
+ }
+ _vecofts[jj].vecistant.push_back(t);
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+ _ofdata<<"object \""<<nameofts<<"_data_"<<_vecofts[jj].vecistant.size()-1<<"\" class array type float rank 0 items "<<
+ val.size()<<" data follows"<<std::endl;
+ for(int i=0;i<val.size();++i)
+ _ofdata<<val[i]<<std::endl;
+ _ofdata<<"attribute \"dep\" string \"positions\""<<std::endl<<std::endl;
+ _ofdata<<"object \""<<nameofts<<"_"<<_vecofts[jj].vecistant.size()-1<<"\" class field"<<std::endl;
+ _ofdata<<"component \"positions\" value \"pos_"<<_vecofts[jj].imesh<<"\""<<std::endl;
+ _ofdata<<"component \"connections\" value \"conn_"<<_vecofts[jj].imesh<<"\""<<std::endl;
+ _ofdata<<"component \"data\" value \""<<nameofts<<"_data_"<<_vecofts[jj].vecistant.size()-1<<"\""<<std::endl<<std::endl;
+ _ofdata.flush();
+ save_header();
+ }
+
+ /*!Add a field*/
+ void addfield(const string& nameoffield, Fem2D::Mesh* mesh, const KN<double>&val){
+ std::vector<Fem2D::Mesh*>::const_iterator first=_vecmesh.begin(), last=_vecmesh.end();
+ int im;
+ if(std::find(first, last, mesh)==last){
+ addmesh(mesh);
+ im=_vecmesh.size()-1;
+ }else{
+ im=std::distance(first, std::find(first, last, mesh));
+ }
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+ _ofdata<<"object \""<<nameoffield<<"_data\" class array type float rank 0 items "<<
+ val.size()<<" data follows"<<std::endl;
+ for(int i=0;i<val.size();++i)
+ _ofdata<<val[i]<<std::endl;
+ _ofdata<<"attribute \"dep\" string \"positions\""<<std::endl<<std::endl;
+ _ofdata<<"object \""<<nameoffield<<"\" class field"<<std::endl;
+ _ofdata<<"component \"positions\" value \"pos_"<<im<<"\""<<std::endl;
+ _ofdata<<"component \"connections\" value \"conn_"<<im<<"\""<<std::endl;
+ _ofdata<<"component \"data\" value \""<<nameoffield<<"_data\""<<std::endl<<std::endl;
+ _ofdata.flush();
+ }
+
+ /*!Get the mesh associated with the series nameofts*/
+ Fem2D::Mesh* getmeshts(const string& nameofts){
+ for(int i=0;i<_vecofts.size();++i){
+ if(_vecofts[i].name==nameofts)return _vecmesh[_vecofts[i].imesh];
+ }
+ return NULL;
+ }
+
+ void init(){
+ new(this)DxWriter();
+ }
+
+ void destroy() {
+ if(_ofdata.is_open()){
+ _ofdata<<std::endl<<"end"<<std::endl;
+ _ofdata.close();
+ }
+ }
+};
+
+
+class Dxwritesol_Op : public E_F0mps
+{
+public:
+ typedef long Result;
+ Expression edx;
+ Expression ename;//!<name of time series or field
+ Expression et;//!<time
+ long what; // 1 scalar, 2 vector, 3 symtensor
+ long nbfloat; // 1 scalar, n vector (3D), n symtensor(3D)
+ Expression evct;
+
+public:
+ Dxwritesol_Op(const basicAC_F0 & args) : what(0), nbfloat(0)
+ {
+ evct=0;
+ int nbofsol;
+ int ddim=2;
+ int stsize=3;
+ //There's no named parameter
+ args.SetNameParam();
+ if(args.size()!=4){
+ CompileError("Dxwritesol accepts only 4 parameters");
+ }
+ if (BCastTo<DxWriter *>(args[0])) edx = CastTo<DxWriter *>(args[0]);
+ if (BCastTo<string *>(args[1])) ename = CastTo<string *>(args[1]);
+ if (BCastTo<double>(args[2])) et = CastTo<double>(args[2]);
+
+ if ( args[3].left()==atype<double>() ){
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[3] );
+ }
+ else if ( args[3].left()==atype<double *>() )
+ {
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[3] );
+ }
+ else if ( BCastTo<pfer>(args[3]) )
+ {
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[3] );
+ }
+ else if ( args[3].left()==atype<E_Array>() )
+ {
+ CompileError("Until now only scalar solution");
+
+ /*const E_Array * a0 = dynamic_cast<const E_Array *>( args[i].LeftValue() );
+ //cout << "taille" << a0->size() << endl;
+ //if (a0->size() != ddim || a0->size() != stsize)
+ // CompileError("savesol in 2D: vector solution is 2 composant, symmetric solution is 3 composant");
+ if( a0->size() == ddim){
+ // vector solution
+ what=2;
+ nbfloat=a0->size();
+ for(int j=0; j<l[i].nbfloat; j++){
+ //evct[j] = to<double>( (*a0)[j]);
+ }
+ }
+ else if( a0->size() == stsize){
+ // symmetric tensor solution
+ what=3;
+ nbfloat=a0->size();
+ for(int j=0; j<l[i].nbfloat; j++){
+ //evct[j] = to<double>( (*a0)[j]);
+ }
+ }*/
+ }
+ else {
+ CompileError("savesol in 2D: Sorry no way to save this kind of data");
+ }
+
+ }
+ static ArrayOfaType typeargs() { return ArrayOfaType(atype<DxWriter *>(), atype<string *>(), atype<double>(), true); }// all type
+ static E_F0 * f(const basicAC_F0 & args) { return new Dxwritesol_Op(args);}
+ AnyType operator()(Stack stack) const ;
+};
+
+
+AnyType Dxwritesol_Op::operator()(Stack stack) const
+{
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ DxWriter &dx=*(GetAny<DxWriter *>((*edx)(stack)));
+ string &name=*(GetAny<string *>((*ename)(stack)));
+ double t=GetAny<double>((*et)(stack));
+ Mesh &Th=*(dx.getmeshts(name));
+
+ int nt = Th.nt;
+ int nv = Th.nv;
+
+ int nbsol=nv;
+ long longdefault;
+
+ KN<double> valsol(nbsol);
+ valsol=0.;
+ KN<int> takemesh(nbsol);
+ takemesh=0;
+ MeshPoint *mp3(MeshPointStack(stack));
+ for (int it=0;it<nt;it++){
+ for(int iv=0;iv<3;iv++){
+ int i=Th(it,iv);
+ mp3->setP(&Th,it,iv);
+ valsol[i] = valsol[i] + GetAny< double >((*evct)(stack));
+ ++takemesh[i];
+ }
+ }
+ for(int i=0; i<nbsol; i++){
+ valsol[i] /= takemesh[i];
+ }
+
+ //Writes valsol on the file file
+ dx.addistant2ts(name, t, valsol);
+
+ return longdefault;
+}
+
+// le vrai constructeur est la
+DxWriter* init_DxWriter(DxWriter * const &a, string * const & s)
+{
+ std::cout << "start init_DxWriter" << std::endl;
+ a->init();
+ a->openfiles(*s);
+ std::cout << "end init_DxWriter" << std::endl;
+ return a;
+}
+
+void* call_addmesh( DxWriter * const & mt, Fem2D::Mesh* const & pTh)
+{
+ mt->addmesh(pTh);
+ return NULL;
+}
+
+void* call_addtimeseries( DxWriter * const & mt,string * const & name, Fem2D::Mesh* const & pTh)
+{
+ mt->addtimeseries(*name, pTh);
+ return NULL;
+}
+
+
+// Add the function name to the freefem++ table
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+static void Load_Init(){
++=======
++class Init { public:
++ Init();
++};
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ Dcl_Type<DxWriter*>(InitP<DxWriter>,Destroy<DxWriter>); // declare deux nouveau type pour freefem++ un pointeur et
+
+ zzzfff->Add("DxWriter",atype<DxWriter*>()); // ajoute le type myType a freefem++
+ // constructeur d'un type myType dans freefem
+ TheOperators->Add("<-", new OneOperator2_<DxWriter*, DxWriter* ,string*>(&init_DxWriter));
+
+ Global.Add("Dxaddmesh","(",new OneOperator2_<void *, DxWriter*, Fem2D::Mesh*>(call_addmesh));
+ Global.Add("Dxaddtimeseries","(",new OneOperator3_<void *, DxWriter*, std::string*, Fem2D::Mesh*>(call_addtimeseries));
+
+ Global.Add("Dxaddsol2ts","(",new OneOperatorCode< Dxwritesol_Op> );
+
+ //atype< myType * >()->Add("(","",new OneOperator3_<myType_uv,myType *,double,double >(set_myType_uv));
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/FreeFemQA.cpp.orig
index 417bd0e,0000000..2b51902
mode 100644,000000..100644
--- a/examples++-load/FreeFemQA.cpp.orig
+++ b/examples++-load/FreeFemQA.cpp.orig
@@@ -1,188 -1,0 +1,202 @@@
+//
+// FreeFamQA.cpp
+//
+//
+// Created by Jean-Marie Mirebeau on 09/10/11.
+// Copyright 2011 UPMC. All rights reserved.
+//
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+//compilation : ff-c++ FreeFemQA.cpp -I/usr/local/boost_1_47_0
+//ff-c++-cpp-dep: GeometryQA.cpp
+#include <iostream>
+#include <cfloat>
+#include <cmath>
+using namespace std;
+#include "ff++.hpp"
+using namespace Fem2D;
+
+//#include <boost/operators.hpp>
+namespace mir {
+#define _FLAGGED_BOUNDARY_
+#include "Geometry.hpp"
+}
+
+//the main class
+//details of FreeFem meshes (connectivity, etc) in file GenericMesh.hpp
+
+class MeshGenQA : public E_F0mps
+{
+public:
+ static basicAC_F0::name_and_type name_param[] ;
+ static const int n_name_param =7;
+
+ Expression nargs[n_name_param];// store named args
+
+ typedef Mesh * Result;
+ Expression expTh;
+ Expression expM11;
+ Expression expM12;
+ Expression expM22;
+
+ MeshGenQA(const basicAC_F0 & args)
+ {
+ args.SetNameParam(n_name_param,name_param,nargs);// named args
+ expTh= to<pmesh>(args[0]); // a the expression to get the mesh
+ expM11= to<double>(args[1]);
+ expM12= to<double>(args[2]);
+ expM22= to<double>(args[3]);
+ }
+ double arg(int i,Stack stack,double a) const { return nargs[i] ? GetAny<double>( (*nargs[i])(stack) ): a;}
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ bool arg(int i,Stack stack,bool a) const{ return nargs[i] ? GetAny<bool>( (*nargs[i])(stack) ): a;}
+ KN<double> * arg(int i,Stack stack,KN<double> * a) const{ return nargs[i] ? GetAny<KN<double> *>( (*nargs[i])(stack) ): a;}
+
+
+ ~MeshGenQA(){}
+
+ static ArrayOfaType typeargs()
+ { return ArrayOfaType(
+ atype<pmesh>(),
+ atype<double>(),
+ atype<double>(),
+ atype<double>()
+ );;
+ }
+ static E_F0 * f(const basicAC_F0 & args){ return new MeshGenQA(args);}
+ AnyType operator()(Stack s) const ;// la vraie fonction qui fait faire le boulot
+};
+
+basicAC_F0::name_and_type MeshGenQA::name_param[MeshGenQA::n_name_param] = {
+ //{ "flag", &typeid(long)},
+ { "noIsoRef", &typeid(bool)},
+ { "finalRefine", &typeid(bool)},
+ { "exportIntermediateData", &typeid(bool)},
+ { "Lip", &typeid(double)},
+ { "exportToMathematica", &typeid(bool)},
+ { "exportMetricToMathematica",&typeid(bool)},
+ { "noRef", &typeid(bool)}
+};
+
+AnyType MeshGenQA:: operator()(Stack stack) const
+{
+ //const long flag = arg(0,stack,0L);
+ const bool noIsoRef = arg(0,stack,false);
+ const bool finalRefine = arg(1,stack,false);
+ const bool exportIntermediateData = arg(2,stack,false);
+
+
+ unsigned int flag = 0;
+ if(noIsoRef) flag |= mir::Triangulation::hRQA_noIsoRef;
+ if(finalRefine) flag |= mir::Triangulation::hRQA_finalRefine;
+ if(exportIntermediateData) flag |= mir::Triangulation::hRQA_exportIntermediateData;
+
+ const double Lip = arg(3,stack,5.);
+ const bool exportToMathematica = arg(4, stack, false);
+ const bool exportMetricToMathematica = arg(5, stack, false);
+ const bool noRef = arg(6, stack, false);
+
+ Mesh * pTh = GetAny<pmesh>((*expTh)(stack));
+ ffassert(pTh);
+ const Mesh & Th= *pTh;
+
+ class FFMetric2 : public mir::Metric2 {
+ const MeshGenQA &MGQA_;
+ Stack stack_;
+ public:
+ FFMetric2(const MeshGenQA &MGQA, Stack stack, double Lip):MGQA_(MGQA),stack_(stack){lip=Lip;}
+ const mir::sym2 operator()(const mir::R2 &P) const {
+ MeshPointStack(stack_)->set(P.x,P.y); //needs to be done three times ?
+ MeshPointStack(stack_)->set(P.x,P.y);
+ MeshPointStack(stack_)->set(P.x,P.y);
+ return mir::sym2(GetAny<double>((*MGQA_.expM11)(stack_)),
+ GetAny<double>((*MGQA_.expM12)(stack_)),
+ GetAny<double>((*MGQA_.expM22)(stack_))
+ );
+ }
+ };
+
+ FFMetric2 ffMetric(*this,stack,Lip);
+ const mir::Metric2 &metric = ffMetric;
+
+ mir::Triangulation triQA(Th,metric);
+ if(!triQA.check()) {cout << "MeshGenQA : Error while importing mesh !\n"; return false;}
+
+ if(exportToMathematica) triQA.export_to_Mathematica("ThFF.txt");
+ if(exportMetricToMathematica) triQA.export_to_Mathematica_Metric("ThFF_Metric.txt");
+
+ if(!noRef) triQA.hRefineQA(1, flag);
+
+ triQA.export_to_FreeFem("triQA.msh");
+
+ if(exportToMathematica) triQA.export_to_Mathematica("TriQA.txt");
+ if(exportMetricToMathematica) triQA.export_to_Mathematica_Metric("TriQA_Metric.txt");
+
+ /*
+ if(exportToMathematica) {
+ vector<double> gains;
+ gains.resize(triQA.ne_oriented());
+ for(int i=0; i<triQA.ne_oriented(); ++i)
+ gains[i]=triQA.getEdges()[i].flipGain();
+ ofstream data_out; data_out.open("gains.txt");
+ mir::print_array(data_out << mir::Mathematica, gains.begin(), gains.end());
+ data_out.close();
+ }*/
+
+ // generation de la class Mesh a partir des 3 tableaux : v,t,b
+ {
+ Mesh * m = triQA.export_to_Mesh(); // new Mesh(nbv+nbt,nbt*3,neb,v,t,b);
+ R2 Pn,Px;
+ m->BoundingBox(Pn,Px);
+ m->quadtree=new Fem2D::FQuadTree(m,Pn,Px,m->nv);
+ m->decrement();
+ return m;
+ }
+
+};
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+// Init init;
+static void Load_Init()
++=======
++class Init { public:
++ Init();
++};
++
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++
++// Init init;
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ cout << "\n -- lood: init MeshGenQA\n";
+ Global.Add("MeshGenQA","(", new OneOperatorCode<MeshGenQA >( ));
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/Makefile.am.orig
index 94fbb9b,0000000..f5ddd92
mode 100644,000000..100644
--- a/examples++-load/Makefile.am.orig
+++ b/examples++-load/Makefile.am.orig
@@@ -1,243 -1,0 +1,284 @@@
+all-local: @LOAD_COMPILE@
+TESTS=APk-AdaptEpsDeltaPk.edp APk-ExplicitPkTest.edp APk-FreeFemQA.edp APk-MetricPk.edp IPOTest.edp IpOptMinSurf.edp IpoptLap.edp IpoptMinSurfVol.edp IpoptVI.edp IpoptVI2.edp LapDG3.edp LapDG4.edp LapLNewSolver.edp LapMUMPS_seq.edp LapNewSolver.edp LapUmfpack64.edp LaplaceP3.edp LaplaceP4.edp LaplaceRT1.edp Leman-mesh.edp MetricKuate.edp NSP2BRP0.edp PARDISO.edp SuperLU.edp VarIneq2.edp bilapMorley.edp bmo.edp buildlayermesh.edp checkglumeshcube.edp cmaes-VarIneq.edp cmaes-oven.edp con [...]
+# all test can fail must but clean ???? FH...
+XFAIL_TESTS=$(TESTS)
+
+LOG_DRIVER=$(SHELL) $(top_srcdir)/test-driver-ff
+TESTS_ENVIRONMENT=TEST_FFPP=$(TEST_FFPP) FLAGS_FFPP=-nw
+
+EXTRA_DIST= $(TESTS) all.edp makeref.edp regtests.edp \
++<<<<<<< HEAD
+ff-get-dep.in ff-get-dep.awk ff-pkg-download.in load.link.in include.tar.gz \
++=======
++ff-get-dep.in ff-pkg-download.in load.link.in include.tar.gz \
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ BernadiRaugel.cpp Morley.cpp dfft.cpp \
+ funcTemplate.cpp mat_dervieux.cpp mat_psi.cpp myfunction.cpp \
+ mat_dervieux.cpp funcTemplate.cpp \
+ regtests.m4 addNewType.cpp \
+ qf11to25.cpp Element_P3.cpp Element_P3.hpp Element_P4.cpp Element_P4.hpp \
+ Element_P3dc.cpp Element_P3dc.hpp Element_P4dc.cpp Element_P4dc.hpp \
+ Element_PkEdge.cpp \
+ SuperLu.cpp \
+ NewSolver.cpp \
+ splitmesh3.cpp splitmesh6.cpp \
+ README_SuperLU \
+ tetgen.cpp\
+ msh3.cpp msh3.hpp\
+ ffrandom.cpp \
+ medit.cpp \
+ bmo.cpp lgbmo.cpp bmo.hpp \
+ fflapack.cpp lapack.cpp clapack.h \
+ fig.pgm lg.pgm ppm2rnm.cpp ppmimg.h \
+ DxWriter.cpp metis.cpp pcm.cpp pcm.hpp pcm2rnm.cpp \
+ UMFPACK64.cpp iovtk.cpp gmsh.cpp MetricKuate.cpp \
+ ffnewuoa.cpp newuoa.f Element_P1dc1.cpp ilut.cpp \
+ freeyams.cpp mmg3d-v4.0.cpp mshmet.cpp \
+ BinaryIO.cpp gsl.cpp gsl.awk ff_gsl_awk.hpp gsl.idp isolineP1.cpp isoline.cpp lg.pgm \
+ thresholdings.cpp \
+ VTK_writer_3d.cpp VTK_writer.cpp splitedges.cpp \
+ Element_Mixte.cpp \
+ myfunction2.cpp \
+ cmaes.cpp \
+ cmaes.h cmaes_interface.h ff-cmaes.cpp \
+ ff-NLopt.cpp \
+ MetricPk.cpp GeometryQA.cpp FreeFemQA.cpp BasicMath.h TensorK.hpp Geometry.hpp \
+ RZ.h SortedList.h ExampleMetrics.h \
+ cube.msh \
+ MUMPS_seq.cpp \
+ MUMPS.cpp \
+ ff-Ipopt.cpp \
+ scotch.cpp shell.cpp \
+ pipe.cpp pstream.h \
+ symmetrizeCSR.cpp \
+ dmatrix.hpp PARDISO.cpp \
++<<<<<<< HEAD
+ ch.pts BEC.cpp bfstream.cpp iohdf5.cpp \
+ iohd5-beam-2d.edp iohd5-beam-3d.edp
++=======
++ ch.pts BEC.cpp bfstream.cpp
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+LIST_COMPILE=myfunction.$(DYLIB_SUFFIX) BernadiRaugel.$(DYLIB_SUFFIX) \
+ Morley.$(DYLIB_SUFFIX) funcTemplate.$(DYLIB_SUFFIX) addNewType.$(DYLIB_SUFFIX) \
+ qf11to25.$(DYLIB_SUFFIX) Element_P3.$(DYLIB_SUFFIX) Element_P4.$(DYLIB_SUFFIX) \
+ Element_P3dc.$(DYLIB_SUFFIX) Element_P4dc.$(DYLIB_SUFFIX) \
+ Element_PkEdge.$(DYLIB_SUFFIX) msh3.$(DYLIB_SUFFIX) \
+ splitmesh3.$(DYLIB_SUFFIX) splitmesh6.$(DYLIB_SUFFIX) \
+ ffrandom.$(DYLIB_SUFFIX) \
+ medit.$(DYLIB_SUFFIX) \
+ mat_dervieux.$(DYLIB_SUFFIX) lgbmo.$(DYLIB_SUFFIX) mat_psi.$(DYLIB_SUFFIX)\
+ ppm2rnm.$(DYLIB_SUFFIX) DxWriter.$(DYLIB_SUFFIX) \
+ pcm2rnm.$(DYLIB_SUFFIX) $(DYLIB_OTHER_COMPILE) \
+ iovtk.$(DYLIB_SUFFIX) gmsh.$(DYLIB_SUFFIX) MetricKuate.$(DYLIB_SUFFIX) \
+ Element_P1dc1.$(DYLIB_SUFFIX) BinaryIO.$(DYLIB_SUFFIX) \
+ isolineP1.$(DYLIB_SUFFIX) isoline.$(DYLIB_SUFFIX) thresholdings.$(DYLIB_SUFFIX) \
+ VTK_writer_3d.$(DYLIB_SUFFIX) VTK_writer.$(DYLIB_SUFFIX) \
+ splitedges.$(DYLIB_SUFFIX) Element_Mixte.$(DYLIB_SUFFIX) \
+ myfunction2.$(DYLIB_SUFFIX) \
+ MetricPk.$(DYLIB_SUFFIX) FreeFemQA.$(DYLIB_SUFFIX) shell.$(DYLIB_SUFFIX) \
+ @TOOL_DYLIB_pipe@ symmetrizeCSR.$(DYLIB_SUFFIX) BEC.$(DYLIB_SUFFIX) \
++<<<<<<< HEAD
+ bfstream.$(DYLIB_SUFFIX) @TOOL_DYLIB_iohdf5@
++=======
++ bfstream.$(DYLIB_SUFFIX)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+# FFCS - some libraries are skipped because the corresponding tool is deactivated.
+
+LIST_COMPILE_PKG=tetgen.$(DYLIB_SUFFIX) @TOOL_DYLIB_superlu@ dfft.$(DYLIB_SUFFIX) @TOOL_DYLIB_metis@ \
+ @TOOL_DYLIB_umfpack@ NewSolver.$(DYLIB_SUFFIX) @TOOL_DYLIB_lapack@ @TOOL_DYLIB_fflapack@ \
+ ffnewuoa.$(DYLIB_SUFFIX) ilut.$(DYLIB_SUFFIX) @TOOL_DYLIB_yams@ @TOOL_DYLIB_mmg3d@ @TOOL_DYLIB_mshmet@ \
+ @TOOL_DYLIB_gsl@ @TOOL_DYLIB_mumps_seq@ @TOOL_DYLIB_ipopt@ @TOOL_DYLIB_nlopt@ ff-cmaes.$(DYLIB_SUFFIX) \
+ @TOOL_DYLIB_scotch@ @TOOL_DYLIB_pardiso@
+
+bin_PROGRAMS=
+
+# FFCS parallel make: some targets need to be built first, sequentially
+
+load_compile: ff-c++ WHERE_LIBRARY-download include.done freefem++.pref
+#
+# max_load
++<<<<<<< HEAD
+ - at rm "Missing-plugins-$(DYLIB_SUFFIX).log" 2>/dev/null || true
++=======
++ -rm "Missing-plugins-$(DYLIB_SUFFIX).log" 2>/dev/null
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ $(MAKE) $(AM_MAKEFLAGS) $(LIST_COMPILE) $(LIST_COMPILE_PKG)
+ @if test -f Missing-plugins-$(DYLIB_SUFFIX).log ; then cat Missing-plugins-$(DYLIB_SUFFIX).log; fi; exit 0
+ @echo Warning missing plugin: `for i in $(LIST_COMPILE) $(LIST_COMPILE_PKG); do if test ! -s $i ; then j=1; echo "$i," ;fi; done`
+ echo " finish build list $(DYLIB_SUFFIX)"
+
+.cpp.$(DYLIB_SUFFIX): ff-c++
+ ./ff-c++ -auto $<
+
+# FFCS - 26/10/11 - Unpacking include.tar.gz is very often buggy under Cygwin (softlinks are randomly replaced with
+# empty files without any access right). So just replace the whole thing with a plain copy.
+
++<<<<<<< HEAD
++=======
++if ENABLE_FFCS
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+allheaders=../src/fflib/AddNewFE.h ../src/fflib/AFunction_ext.hpp ../src/fflib/AFunction.hpp ../src/fflib/AnyType.hpp \
+ ../src/fflib/array_init.hpp ../src/fflib/array_resize.hpp ../src/fflib/array_tlp.hpp \
+ ../src/femlib/assertion.hpp ../src/femlib/BamgFreeFem.hpp ../src/Algo/BFGS.hpp ../src/Algo/BrentLS.hpp \
+ ../src/Algo/CG.hpp ../src/femlib/CGNL.hpp ../src/fflib/CodeAlloc.hpp ../config.h ../config-wrapper.h \
+ ../src/Algo/CubicLS.hpp ../src/Algo/defs.hpp ../src/femlib/DOperator.hpp ../src/libMesh/eigenv.h \
+ ../src/fflib/endian.hpp ../src/fflib/environment.hpp ../src/fflib/error.hpp ../src/femlib/fem3.hpp \
+ ../src/femlib/fem.hpp ../src/femlib/FESpace.hpp ../src/femlib/FESpacen.hpp ../src/fflib/ff++.hpp \
+ ../src/fflib/ffstack.hpp ../src/femlib/FQuadTree.hpp ../src/femlib/GenericMesh.hpp \
+ ../src/Graphics/getprog-unix.hpp ../src/Graphics/glrgraph.hpp ../src/femlib/gmres.hpp \
+ ../src/femlib/GQuadTree.hpp ../src/femlib/HashTable.hpp ../src/femlib/HeapSort.hpp ../src/fflib/InitFunct.hpp \
+ ../src/fflib/ffapi.hpp ../src/femlib/Label.hpp ../src/fflib/lex.hpp ../src/fflib/lgfem.hpp \
+ ../src/fflib/lgmesh3.hpp ../src/fflib/lgsolver.hpp ../src/lglib/lg.tab.hpp ../src/femlib/libmesh5.h \
+ ../src/Algo/LineSearch.hpp ../src/femlib/MatriceCreuse.hpp ../src/femlib/MatriceCreuse_tpl.hpp \
+ ../src/femlib/Mesh1dn.hpp ../src/femlib/Mesh2dn.hpp ../src/bamglib/Mesh2.h ../src/femlib/Mesh3dn.hpp \
+ ../src/bamglib/Meshio.h ../src/femlib/MeshPoint.hpp ../src/bamglib/meshtype.h ../src/bamglib/Metric.h \
+ ../src/Graphics/mode_open.hpp ../src/Algo/NewtonRaphson.hpp ../src/Algo/NRJ.hpp ../src/fflib/Operator.hpp \
+ ../src/Algo/Optima.hpp ../src/Algo/Param.hpp ../src/femlib/PkLagrange.hpp ../src/fflib/PlotStream.hpp \
+ ../src/fflib/problem.hpp ../src/femlib/QuadratureFormular.hpp ../src/bamglib/QuadTree.h ../src/femlib/R1.hpp \
+ ../src/bamglib/R2.h ../src/femlib/R2.hpp ../src/femlib/R3.hpp ../src/femlib/RefCounter.hpp \
+ ../src/Graphics/rgraph.hpp ../src/femlib/RNM.hpp ../src/femlib/RNM_opc.hpp ../src/femlib/RNM_op.hpp \
+ ../src/femlib/RNM_tpl.hpp ../src/Algo/RosenBrock.hpp ../src/fflib/Serialize.hpp ../src/bamglib/SetOfE4.h \
+ ../src/fflib/showverb.hpp ../src/femlib/splitsimplex.hpp ../src/fflib/String.hpp \
+ ../src/fflib/strversionnumber.hpp ../src/fflib/throwassert.hpp ../src/femlib/ufunction.hpp \
++<<<<<<< HEAD
+ ../src/fflib/versionnumber.hpp ../src/bamglib/write_hdf5.hpp ../src/bamglib/write_xdmf.hpp \
+ ../src/fflib/P1IsoValue.hpp
+
+if ENABLE_FFCS
+
+include.done: $(allheaders)
+ -rm -rf include
++=======
++ ../src/fflib/versionnumber.hpp
++
++include.done: $(allheaders)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ mkdir -p include
+ cp $^ include
+ touch $@
+
+else
++<<<<<<< HEAD
+include.done: $(allheaders)
+ -rm -rf include
+ mkdir -p include
+ for i in $(allheaders); do ln -s ../$$i include/. ; done
++=======
++include.done: include.tar.gz
++ rm -rf include
++ gunzip -c include.tar.gz| tar xvf -
++ -rm -f include/._*
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ touch $@
+endif
+
+clean-local::
+ -rm -r include
+ -rm include.done
+
+Ref: makeref.edp
+ ../src/nw/FreeFem++-nw makeref.edp
+
+makeref.edp: regtests.m4 ../regtests.m4
+ m4 regtests.m4 > makeref.edp
+
+all-local: all.edp regtests.edp load_compile
+
+# FFCS - 27/2/13 - remove dependency on Makefile to avoid recompiling everything everytime something is changed in the
+# configuration step
+
+all.edp:
+ @(echo "NoGraphicWindow=true;NoUseOfWait=true;int verbosityy=verbosity;"; \
+ for i in *`ls *.edp|grep -v -E '^(all|regtests|makeref|ref)\.edp$$'` ; do \
+ echo ' cout << "--------- file : '$$i' --------------------------------------------------------" << endl;' ;\
+ echo "verbosity=verbosityy;" ; \
+ echo \{ include \"$$i\"\;\}\; ;\
+ echo ' cout << "------------------------------------------------------------------------------ " << endl;' ;\
+ done) > $@
+
+# To check the scripts against their reference values
+regtests.edp: regtests.m4 ../regtests.m4
+ m4 -DASSERT regtests.m4 > regtests.edp
+
+# FFCS - 27/2/13 - remove dependency on Makefile to avoid recompiling everything everytime something is changed in the
+# configuration step
+
+$(LIST_COMPILE):ff-c++ include.done
+
+clean-local::
+ -rm *.o *.$(DYLIB_SUFFIX) load.link WHERE_LIBRARY-download ff-get-dep ff-c++ ff-pkg-download \
+ $(LIST_COMPILE) $(LIST_COMPILE_PKG) regtests.edp makeref.edp
+ -rm -rf include include.done
+ff-c++:load.link.in load.link WHERE_LIBRARY-download ff-get-dep ../config.status
+ ../config.status --file=ff-c++:load.link.in
+ chmod a+x ff-c++
+load.link:load.link.in ../config.status
+ ../config.status --file=load.link:load.link.in
+ chmod a+x load.link
+ff-pkg-download:ff-pkg-download.in ../config.status
+ ../config.status --file=$@:$@.in
+ chmod a+x $@
+ cp $@ ../download/bin
+ff-get-dep:ff-get-dep.in ../config.status
+ ../config.status --file=$@:$@.in
+ chmod a+x $@
+ -if [ -d ../download/bin ] ;then cp $@ ../download/bin; fi
+WHERE_LIBRARY-download:ff-pkg-download FORCE WHERE_LIBRARY-config WHERE_LIBRARY
+ @./ff-pkg-download >$@-new
+ @diff $@-new $@ || (cp $@-new $@ ;touch WHERE_LIBRARY)
+WHERE_LIBRARY:
+ touch $@
+FORCE: ;
+freefem++.pref:
+ echo loadpath = \"./\" >freefem++.pref
+install-exec-local:: load_compile WHERE_LIBRARY
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/lib
+ test -n "$(MPIPROG)" && $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/lib/mpi
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/include
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/etc
+ $(INSTALL_DATA) clapack.h ppmimg.h bmo.hpp msh3.hpp pcm.hpp include/* $(DESTDIR)$(ff_prefix_dir)/include
+ $(INSTALL) -m 555 $(LIST_COMPILE) $(DESTDIR)$(ff_prefix_dir)/lib
++<<<<<<< HEAD
+ $(INSTALL) -m 555 ff-get-dep.awk WHERE_LIBRARY-config WHERE_LIBRARY $(DESTDIR)$(ff_prefix_dir)/lib
++=======
++ $(INSTALL) -m 555 WHERE_LIBRARY-config WHERE_LIBRARY $(DESTDIR)$(ff_prefix_dir)/lib
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ for i in WHERE_LIBRARY-config WHERE_LIBRARY WHERE_LIBRARY-download; do \
+ sed <$$i >$(DESTDIR)$(ff_prefix_dir)/lib/$$i 's#$(abs_top_builddir)/download#$(ff_prefix_dir)#' ;\
+ done
+ echo loadpath += \"./\" >$(DESTDIR)$(ff_prefix_dir)/etc/freefem++.pref
+ echo loadpath += \"$(ff_prefix_dir)/lib\" >>$(DESTDIR)$(ff_prefix_dir)/etc/freefem++.pref
+ echo includepath += \"$(ff_prefix_dir)/idp\" >>$(DESTDIR)$(ff_prefix_dir)/etc/freefem++.pref
+ $(INSTALL_SCRIPT) ff-c++ $(DESTDIR)${bindir}
+ $(INSTALL_SCRIPT) ff-pkg-download $(DESTDIR)${bindir}
++<<<<<<< HEAD
+ $(INSTALL_SCRIPT) ff-get-dep $(DESTDIR)${bindir}
++=======
++ $(INSTALL_SCRIPT) ff-get-dep $(DESTDIR)${bindir}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+## $(DESTDIR)${bindir}/ff-pkg-download $(DESTDIR) >$(DESTDIR)$(ff_prefix_dir)/lib/WHERE_LIBRARY-download
+ -for i in $(LIST_COMPILE_PKG); do \
+ if [ -f $$i ] ; then $(INSTALL) -m 555 $$i $(DESTDIR)$(ff_prefix_dir)/lib; fi; done
+ - if [ -n "$(MPIPROG)" ] ; then \
+ for i in $(LIST_COMPILE_PKG) $(LIST_COMPILE); do \
+ if [ -f ../examples++-mpi/$$i ] ; then \
+ $(INSTALL) -m 555 ../examples++-mpi/$$i $(DESTDIR)$(ff_prefix_dir)/lib/mpi; \
+ else echo missing install mpi version ??? ../examples++-mpi/$$i ;\
+ fi; \
+ done ; \
+ fi
+
+clean-local::
+ -rm *.fg *.eps *~ *.ps *.mesh *.mesh.gmsh ListOfAllocPtr-8.bin ffglut*.ppm Th.o.meshb Th3.d.meshb dep.sol.meshbgh \
+ipopt.out mmg.out xxxx ThFF.txt TriQA.txt cavidadTT.txt mass.txt xy.txt \
+ThFF_Metric.txt TriQA_Metric.txt datanc.txt u100m8.txt \
+TTh.sol Th.o.sol Th3.sol dep.o.sol dep.sol gradient.sol hessien.sol pippo.data pippo.dx testsavemedit.solb med.gp bidule.vtk disque.vtk g-iso
+
+
+# FFCS: add tags for files that are not specified to automake by a SOURCE directive (this tags file is automatically
+# taken into account by automake when it sees it).
+
+TAGS:
+ etags *.?pp
diff --cc examples++-load/MetricKuate.cpp
index 49f0ffc,fd427f3..bf583e7
--- a/examples++-load/MetricKuate.cpp
+++ b/examples++-load/MetricKuate.cpp
@@@ -36,7 -36,7 +36,7 @@@ int Lire( const char * NomDuFichier,in
template<typename T>
bool from_string( const string & Str, T & Dest )
{
-- // cr�er un flux � partir de la chaine donn�e
++ // cr�er un flux � partir de la chaine donn�e
istringstream iss( Str );
// tenter la conversion vers Dest
iss >> Dest;
@@@ -65,7 -65,7 +65,7 @@@ void metrique(int nbpoints, R2 * Point,
Rmax=Max(Rmax,Point[i].norme());
-- //---d�placement des points situ�es sur les axes--------------
++ //---d�placement des points situ�es sur les axes--------------
if(abs(Point[i].x)<=precision)
{
if(Point[i].y<0)
@@@ -108,7 -108,7 +108,7 @@@
//-------permutation des indices de la liste des points :
-- //ranger la liste en commen�ant par le point X0-------
++ //ranger la liste en commen�ant par le point X0-------
for(int k=0;k<nbpoints-indiceX0;k++)
{
PPoint[k]=Point[k+indiceX0];
@@@ -216,7 -216,7 +216,7 @@@
-- //------deplacement des points align�s avec l'origine et X0-----------
++ //------deplacement des points align�s avec l'origine et X0-----------
if(abs(detXY)<=precision)
{
@@@ -240,14 -240,14 +240,14 @@@
//-----------------------------------------------------------------
-- //-----racines du polynome en b � minimiser----------------------------
++ //-----racines du polynome en b � minimiser----------------------------
R bb1=(1./pow(detXY,2))*(pow(X0*Ri,2)+pow(Xi*R0,2)-2.*abs(Xi*X0)*sqrt(pow(R0*Ri,2)-pow(detXY/(Rmax*(r0-epsilon0)),2)));
R bb2=(1./pow(detXY,2))*(pow(X0*Ri,2)+pow(Xi*R0,2)+2.*abs(Xi*X0)*sqrt(pow(R0*Ri,2)-pow(detXY/(Rmax*(r0-epsilon0)),2)));
-- //--fin----racines du polynome en b � minimiser--------------------
++ //--fin----racines du polynome en b � minimiser--------------------
bmax=Min(bb2,pow(Rmax/pow((r0),2),2));
diff --cc examples++-load/MetricKuate.cpp.orig
index 49f0ffc,fd427f3..76dfb52
--- a/examples++-load/MetricKuate.cpp.orig
+++ b/examples++-load/MetricKuate.cpp.orig
@@@ -658,13 -658,12 +658,24 @@@ AnyType MetricKuate::operator()(Stack s
}
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+static void Load_Init()
++=======
+ class Init { public:
+ Init();
+ };
+ LOADINIT(Init);
+ Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
{
cout << "\n -- lood: init MetricKuate\n";
Global.Add("MetricKuate","(", new OneOperatorCode<MetricKuate >( ));
}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/MetricPk.cpp
index e48719f,5ebe999..4d12720
--- a/examples++-load/MetricPk.cpp
+++ b/examples++-load/MetricPk.cpp
@@@ -86,7 -86,7 +86,7 @@@ basicAC_F0::name_and_type MetricPk::nam
AnyType MetricPk:: operator()(Stack stack) const
{
-- /************* r�cup�ration des arguments ****************/
++ /************* r�cup�ration des arguments ****************/
const long k_deg= arg(0,stack,2L); // Finite element of degree k_deg will be used for approximation.
const long m_deg=k_deg+1; // Derivatives of degree m_deg = k_deg+1 will be estimated.
@@@ -146,10 -146,10 +146,10 @@@
std::vector<R> DOFt; DOFt.resize(nDOFt); //degrees of freedom on a triangle
//le bord
-- //Th.ElementAdj(k,ie); renvoie k', �crase ie par ie';
++ //Th.ElementAdj(k,ie); renvoie k', �crase ie par ie';
// is frontiere k' <0 ou k'==k
//Seg
-- //BoundaryElement (+r�cent)
++ //BoundaryElement (+r�cent)
//Th.nbe ou Th.neb
//Th.be(i) Th.be(i)[0] ou Th.be(i)[1]
std::vector<int> nextv; nextv.resize(nv); fill(nextv.begin(), nextv.end(), -1);
@@@ -161,9 -161,9 +161,9 @@@
// cout << "next point on boundary\n"; for(int i=0; i<nv; ++i) cout << " " << nextv[i]; cout << "\n";
--// for(int i=0; i<Th.neb; ++i) nextv[Th.be(i)[0]]=Th.be(i)[1]; //ne convient pas : les num�ros sont oubli�s, seuls les points sont conserv�s.
++// for(int i=0; i<Th.neb; ++i) nextv[Th.be(i)[0]]=Th.be(i)[1]; //ne convient pas : les num�ros sont oubli�s, seuls les points sont conserv�s.
-- /********* estimation des d�riv�es ***********/
++ /********* estimation des d�riv�es ***********/
for(int i=0; i<Th.nt; ++i){
const Triangle &K=Th[i];
const R2 sommets[3]={K(R2(0,0)),K(R2(1,0)),K(R2(0,1))};
@@@ -178,12 -178,12 +178,12 @@@
double f[m_deg]; //contains the derivatives of order
switch(m_deg){
-- case 2:{ //accolades n�cessaires pour d�clarer des variables dans un case
++ case 2:{ //accolades n�cessaires pour d�clarer des variables dans un case
double f[2]; tk.getDerivatives(DOFt,invHauteur,f); //f={fx,fy}
for(int j=0; j<3; ++j){
const int s= Th(i,j); //le sommet j du triangle i
-- Deriv[m_dim*s+0]+= aire* f[0]*invHauteur[j].x; //contribution � l'estimation des d�riv�es secondes.
++ Deriv[m_dim*s+0]+= aire* f[0]*invHauteur[j].x; //contribution � l'estimation des d�riv�es secondes.
Deriv[m_dim*s+1]+= aire*(f[0]*invHauteur[j].y/2.+f[1]*invHauteur[j].x/2.);
Deriv[m_dim*s+2]+= aire* f[1]*invHauteur[j].y;
aires[s]+=aire;
@@@ -195,7 -195,7 +195,7 @@@
for(int j=0; j<3; ++j){
const int s= Th(i,j);
-- Deriv[m_dim*s+0]+= aire*f[0]*invHauteur[j].x; //contribution � l'estimation des d�riv�es troisi�mes.
++ Deriv[m_dim*s+0]+= aire*f[0]*invHauteur[j].x; //contribution � l'estimation des d�riv�es troisi�mes.
Deriv[m_dim*s+1]+= aire*(f[0]*invHauteur[j].y/3.+f[1]*invHauteur[j].x*2./3.);
Deriv[m_dim*s+2]+= aire*(f[2]*invHauteur[j].x/3.+f[1]*invHauteur[j].y*2./3.);
Deriv[m_dim*s+3]+= aire*f[2]*invHauteur[j].y;
@@@ -208,7 -208,7 +208,7 @@@
for(int j=0; j<3; ++j){
const int s= Th(i,j);
-- Deriv[m_dim*s+0]+= f[0]*invHauteur[j].x*aire; //contribution � l'estimation des d�riv�es quatri�mes.
++ Deriv[m_dim*s+0]+= f[0]*invHauteur[j].x*aire; //contribution � l'estimation des d�riv�es quatri�mes.
Deriv[m_dim*s+1]+= (f[0]*invHauteur[j].y/4. +f[1]*invHauteur[j].x*3./4.)*aire;
Deriv[m_dim*s+2]+= (f[1]*invHauteur[j].y/2. +f[2]*invHauteur[j].x/2.)*aire;
Deriv[m_dim*s+3]+= (f[2]*invHauteur[j].y*3./4.+f[3]*invHauteur[j].x/4.)*aire;
@@@ -222,7 -222,7 +222,7 @@@
for(int j=0; j<3; ++j){
const int s= Th(i,j);
-- Deriv[m_dim*s+0]+= f[0]*invHauteur[j].x*aire; //contribution � l'estimation des d�riv�es quatri�mes.
++ Deriv[m_dim*s+0]+= f[0]*invHauteur[j].x*aire; //contribution � l'estimation des d�riv�es quatri�mes.
Deriv[m_dim*s+1]+= (f[0]*invHauteur[j].y/5.+f[1]*invHauteur[j].x*4./5.)*aire;
Deriv[m_dim*s+2]+= (f[1]*invHauteur[j].y*2./5.+f[2]*invHauteur[j].x*3./5.)*aire;
Deriv[m_dim*s+3]+= (f[2]*invHauteur[j].y*3./5.+f[3]*invHauteur[j].x*2./5.)*aire;
diff --cc examples++-load/MetricPk.cpp.orig
index e48719f,5ebe999..1fd53e5
--- a/examples++-load/MetricPk.cpp.orig
+++ b/examples++-load/MetricPk.cpp.orig
@@@ -400,13 -400,12 +400,24 @@@ AnyType MetricPk:: operator()(Stack sta
}
*/
}
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+Init init;*/
+static void Load_Init()
++=======
+ class Init { public:
+ Init();
+ };
+ Init init;
+ Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
{
cout << "\n -- lood: init MetricPk\n";
Global.Add("MetricPk","(", new OneOperatorCode<MetricPk >( ));
}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/NewSolver.cpp.orig
index 2351ecd,0000000..65feced
mode 100644,000000..100644
--- a/examples++-load/NewSolver.cpp.orig
+++ b/examples++-load/NewSolver.cpp.orig
@@@ -1,343 -1,0 +1,354 @@@
+// file to add UMFPACK solver with dynamic load.
+//ff-c++-LIBRARY-dep: umfpack amd blas
+//ff-c++-cpp-dep:
+
+#include <iostream>
+using namespace std;
+
+#include "rgraph.hpp"
+#include "error.hpp"
+#include "AFunction.hpp"
+
+
+#include "MatriceCreuse_tpl.hpp"
+
+
+#ifdef HAVE_LIBUMFPACK
+extern "C" {
+#ifdef HAVE_UMFPACK_H
+#include <umfpack.h>
+#else
+#ifdef HAVE_UMFPACK_UMFPACK_H
+#include <umfpack/umfpack.h>
+#else
+#ifdef HAVE_BIG_UMFPACK_UMFPACK_H
+#include <UMFPACK/umfpack.h>
+#else
+#ifdef HAVE_UFSPARSE_UMFPACK_H
+#include <ufsparse/umfpack.h>
+#else
+#ifdef HAVE_SUITESPARSE_UMFPACK_H
+#include <suitesparse/umfpack.h>
+#else
+
+ // Defaults to a local version of the UMFPACK headers
+#include "../../download/include/umfpack.h"
+
+#endif // HAVE_SUITESPARSE_UMFPACK_H
+#endif // HAVE_UFSPARSE_UMFPACK_H
+#endif // HAVE_BIG_UMFPACK_UMFPACK_H
+#endif // HAVE_UMFPACK_UMFPACK_H
+#endif // HAVE_UMFPACK_H
+}
+#endif
+template<class R>
+class SolveUMFPACK : public MatriceMorse<R>::VirtualSolver {
+ double eps;
+ mutable double epsr;
+ double tgv;
+ void *Symbolic, *Numeric ;
+ int umfpackstrategy;
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+public:
+ SolveUMFPACK(const MatriceMorse<R> &A,int strategy,double ttgv, double epsilon=1e-6,
+ double pivot=-1.,double pivot_sym=-1. ) :
+ eps(epsilon),epsr(0),
+ tgv(ttgv),
+ Symbolic(0),Numeric(0) ,
+ umfpackstrategy(strategy),
+ tol_pivot_sym(pivot_sym),tol_pivot(pivot)
+ {
+
+ int status;
+ throwassert( !A.sym() && Numeric == 0 && Symbolic==0 );
+ int n=A.n;
+ double Control[UMFPACK_CONTROL];
+ double Info[UMFPACK_INFO];
+
+ for(int i=0;i<UMFPACK_CONTROL;i++) Control[i]=0;
+ for(int i=0;i<UMFPACK_INFO;i++) Info[i]=0;
+
+ umfpack_di_defaults (Control) ;
+ Control[UMFPACK_PRL]=1;
+ // Control[UMFPACK_PIVOT_TOLERANCE]=1E-10;
+
+ if(verbosity>4) Control[UMFPACK_PRL]=2;
+ if(tol_pivot_sym>0) Control[UMFPACK_SYM_PIVOT_TOLERANCE]=pivot_sym;
+ if(tol_pivot>0) Control[UMFPACK_PIVOT_TOLERANCE]=pivot;
+ if(umfpackstrategy>=0) Control[UMFPACK_STRATEGY]=umfpackstrategy;
+ if(verbosity>3) {
+ cout << " UMFPACK real Solver Control :" ;
+ cout << "\n\t SYM_PIVOT_TOLERANCE "<< Control[UMFPACK_SYM_PIVOT_TOLERANCE];
+ cout << "\n\t PIVOT_TOLERANCE "<< Control[UMFPACK_PIVOT_TOLERANCE];
+ cout << "\n\t PRL "<< Control[UMFPACK_PRL];
+ cout << "\n";
+ }
+
+ status = umfpack_di_symbolic (n, n, A.lg, A.cl, A.a, &Symbolic,Control,Info) ;
+ if (status != 0)
+ {
+ (void) umfpack_di_report_matrix (n, n, A.lg, A.cl, A.a, 1, Control) ;
+
+ umfpack_di_report_info (Control, Info) ;
+ umfpack_di_report_status (Control, status) ;
+ cerr << "umfpack_di_symbolic failed" << endl;
+ ExecError("umfpack_di_symbolic failed");
+ //ffassert(0);
+ }
+
+ status = umfpack_di_numeric (A.lg, A.cl, A.a, Symbolic, &Numeric,Control,Info) ;
+ if (status != 0)
+ {
+ umfpack_di_report_info (Control, Info) ;
+ umfpack_di_report_status (Control, status) ;
+ cerr << "umfpack_di_numeric failed" << endl;
+ ExecError("umfpack_di_numeric failed");
+ ffassert(0);
+ }
+
+ if (Symbolic) umfpack_di_free_symbolic (&Symbolic),Symbolic=0;
+ if(verbosity>3)
+ cout << " -- umfpack_di_build LU " << n << endl;
+ if(verbosity>5) (void) umfpack_di_report_info(Control,Info);
+
+ }
+ void Solver(const MatriceMorse<R> &A,KN_<R> &x,const KN_<R> &b) const {
+ ffassert ( &x[0] != &b[0]);
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+ // cout << " epsr = " << epsr << endl;
+ double Control[UMFPACK_CONTROL];
+ double Info[UMFPACK_INFO];
+ for(int i=0;i<UMFPACK_CONTROL;i++) Control[i]=0;
+ for(int i=0;i<UMFPACK_INFO;i++) Info[i]=0;
+ int n= b.N();
+ ffassert(A.ChecknbLine( n) && n == x.N() && A.ChecknbColumn(n) );
+
+ umfpack_di_defaults (Control) ;
+ // change UMFPACK_At to UMFPACK_Aat in complex
+ int status = umfpack_di_solve (UMFPACK_Aat, A.lg, A.cl, A.a,KN_2Ptr<R> (x), KN_2Ptr<R>(b), Numeric,Control,Info) ;
+ if (status != 0)
+ {
+ umfpack_di_report_info (Control, Info) ;
+ umfpack_di_report_status (Control, status) ;
+ cerr << "umfpack_di_solve failed" << endl;
+ ExecError("umfpack_di_solve failed");
+
+ ffassert(0);
+ }
+ if(verbosity>2)
+ cout << " -- umfpack_di_solve " << endl;
+ if(verbosity>3)
+ cout << " b min max " << b.min() << " " <<b.max() << endl;
+ if(verbosity>3) (void) umfpack_di_report_info(Control,Info);
+ if(verbosity>1) cout << " x min max " << x.min() << " " <<x.max() << endl;
+ }
+
+ ~SolveUMFPACK() {
+ if(verbosity>3)
+ cout << "~SolveUMFPACK S:" << Symbolic << " N:" << Numeric <<endl;
+ if (Symbolic) umfpack_di_free_symbolic (&Symbolic),Symbolic=0;
+ if (Numeric) umfpack_di_free_numeric (&Numeric),Numeric=0;
+ }
+ void addMatMul(const KN_<R> & x, KN_<R> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<R> &) (*this) * x;
+ }
+
+};
+
+
+template<>
+class SolveUMFPACK<Complex> : public MatriceMorse<Complex>::VirtualSolver {
+ double eps;
+ mutable double epsr;
+ int umfpackstrategy;
+ double tgv;
+ void *Symbolic, *Numeric ;
+ double *ar,*ai;
+
+
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+
+public:
+ SolveUMFPACK(const MatriceMorse<Complex> &A,int strategy,double ttgv, double epsilon=1e-6,
+ double pivot=-1.,double pivot_sym=-1.
+) :
+ eps(epsilon),epsr(0),umfpackstrategy(strategy),tgv(ttgv),
+ Symbolic(0),Numeric(0),
+ ar(0),ai(0),
+ tol_pivot_sym(pivot_sym),
+ tol_pivot(pivot)
+ {
+ int status;
+ throwassert( !A.sym());
+ int n=A.n;
+ // copy the coef of the matrice ---
+ ar= new double[A.nbcoef];
+ ai= new double[A.nbcoef];
+ ffassert(ar && ai);
+ C2RR(A.nbcoef,A.a,ar,ai);
+
+ double Control[UMFPACK_CONTROL];
+ double Info[UMFPACK_INFO];
+ umfpack_zi_defaults (Control) ;
+ Control[UMFPACK_PRL]=1;
+ if(verbosity>4) Control[UMFPACK_PRL]=2;
+ // Control[UMFPACK_SYM_PIVOT_TOLERANCE]=1E-10;
+ // Control[UMFPACK_PIVOT_TOLERANCE]=1E-10;
+ if(tol_pivot_sym>0) Control[UMFPACK_SYM_PIVOT_TOLERANCE]=pivot_sym;
+ if(tol_pivot>0) Control[UMFPACK_PIVOT_TOLERANCE]=pivot;
+ if(umfpackstrategy>=0) Control[UMFPACK_STRATEGY]=umfpackstrategy;
+ if(verbosity>3) {
+ cout << " UMFPACK complex Solver Control :" ;
+ cout << "\n\t SYM_PIVOT_TOLERANCE "<< Control[UMFPACK_SYM_PIVOT_TOLERANCE];
+ cout << "\n\t PIVOT_TOLERANCE "<< Control[UMFPACK_PIVOT_TOLERANCE];
+ cout << "\n\t PRL "<< Control[UMFPACK_PRL];
+ cout << "\n";
+ }
+ status = umfpack_zi_symbolic (n, n, A.lg, A.cl, ar,ai, &Symbolic,Control,Info) ;
+ if (status < 0)
+ {
+ (void) umfpack_zi_report_matrix (n, n, A.lg, A.cl, ar,ai, 1, Control) ;
+
+ umfpack_zi_report_info (Control, Info) ;
+ umfpack_zi_report_status (Control, status) ;
+ cerr << "umfpack_zi_symbolic failed" << endl;
+ ExecError("umfpack_zi_symbolic failed");
+ ffassert(0);
+ exit(2);
+ }
+
+ status = umfpack_zi_numeric (A.lg, A.cl, ar,ai, Symbolic, &Numeric,Control,Info) ;
+ if (status < 0)
+ {
+ umfpack_zi_report_info (Control, Info) ;
+ umfpack_zi_report_status (Control, status) ;
+ cerr << "umfpack_zi_numeric failed" << endl;
+ ExecError("umfpack_zi_numeric failed");
+ ffassert(0);
+ exit(2);
+ }
+
+ if (Symbolic) umfpack_zi_free_symbolic (&Symbolic),Symbolic=0;
+ if(verbosity>3)
+ cout << "umfpack_zi_build LU " << n << endl;
+ if(verbosity>5) (void) umfpack_zi_report_info(Control,Info);
+
+ }
+ void Solver(const MatriceMorse<Complex> &A,KN_<Complex> &x,const KN_<Complex> &b) const {
+ ffassert ( &x[0] != &b[0]);
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+ // cout << " epsr = " << epsr << endl;
+ double Control[UMFPACK_CONTROL];
+ double Info[UMFPACK_INFO];
+ umfpack_zi_defaults (Control) ;
+ int n = b.N();
+ ffassert(A.ChecknbLine( n) && n == x.N() && A.ChecknbColumn(n) );
+ KN<double> xr(n),xi(n),br(n),bi(n);
+ C2RR(n,b,br,bi);
+ // change UMFPACK_At to UMFPACK_Aat in complex oct 2005
+ int status = umfpack_zi_solve (UMFPACK_Aat, A.lg, A.cl, ar,ai, xr, xi, br,bi, Numeric,Control,Info) ;
+ if (status < 0)
+ {
+ umfpack_zi_report_info (Control, Info) ;
+ umfpack_zi_report_status (Control, status) ;
+ cerr << "umfpack_zi_solve failed" << endl;
+ ExecError("umfpack_zi_numeric failed");
+ ffassert(0);
+ exit(2);
+ }
+ RR2C(n,xr,xi,x);
+ if(verbosity>1)
+ {
+ cout << " -- umfpack_zi_solve " << endl;
+ if(verbosity>3) (void) umfpack_zi_report_info(Control,Info);
+
+ cout << " b min max " << b.min() << " " <<b.max() << endl;
+ cout << " x min max " << x.min() << " " <<x.max() << endl;
+ }
+ }
+
+ ~SolveUMFPACK() {
+ if(verbosity>5)
+ cout << "~SolveUMFPACK " << endl;
+ if (Symbolic) umfpack_zi_free_symbolic (&Symbolic),Symbolic=0;
+ if (Numeric) umfpack_zi_free_numeric (&Numeric),Numeric=0;
+ delete [] ar;
+ delete [] ai;
+ }
+ void addMatMul(const KN_<Complex> & x, KN_<Complex> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<Complex> &) (*this) * x;
+ }
+
+
+};
+
+inline MatriceMorse<double>::VirtualSolver *
+BuildSolverIUMFPack(DCL_ARG_SPARSE_SOLVER(double,A))
+{
+ if( verbosity>9)
+ cout << " BuildSolverUMFPack<double>" << endl;
+ return new SolveUMFPACK<double>(*A,ds.strategy,ds.tgv,ds.epsilon,ds.tol_pivot,ds.tol_pivot_sym);
+}
+
+inline MatriceMorse<Complex>::VirtualSolver *
+BuildSolverIUMFPack(DCL_ARG_SPARSE_SOLVER(Complex,A))
+{
+ if( verbosity>9)
+ cout << " BuildSolverUMFPack<Complex>" << endl;
+ return new SolveUMFPACK<Complex>(*A,ds.strategy,ds.tgv,ds.epsilon,ds.tol_pivot,ds.tol_pivot_sym);
+}
+
+
+// the 2 default sparse solver double and complex
+DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
+DefSparseSolver<Complex>::SparseMatSolver SparseMatSolver_C;
+// the default probleme solver
+TypeSolveMat::TSolveMat TypeSolveMatdefaultvalue=TypeSolveMat::defaultvalue;
+
+
+
+bool SetUMFPACK()
+{
+ if(verbosity>1)
+ cout << " SetDefault sparse solver to IUMFPack" << endl;
+ DefSparseSolver<double>::solver =BuildSolverIUMFPack;
+ DefSparseSolver<Complex>::solver =BuildSolverIUMFPack;
+ TypeSolveMat::defaultvalue =TypeSolveMatdefaultvalue;
+ return true;
+}
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+static void Load_Init(){
++=======
++class Init { public:
++ Init();
++};
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ SparseMatSolver_R= DefSparseSolver<double>::solver;
+ SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+ if(verbosity>1)
+ cout << "\n Add: UMFPACK: defaultsolver defaultsolverUMFPACK" << endl;
+ TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+
+ DefSparseSolver<double>::solver =BuildSolverIUMFPack;
+ DefSparseSolver<Complex>::solver =BuildSolverIUMFPack;
+
+ if(! Global.Find("defaulttoUMFPACK").NotNull() )
+ Global.Add("defaulttoUMFPACK","(",new OneOperator0<bool>(SetUMFPACK));
+}
+
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/PARDISO.cpp
index 2434bc3,0511d54..0511d54
mode 100644,100755..100644
--- a/examples++-load/PARDISO.cpp
+++ b/examples++-load/PARDISO.cpp
diff --cc examples++-load/PARDISO.cpp.orig
index 2434bc3,0511d54..ceb4772
mode 100644,100755..100644
--- a/examples++-load/PARDISO.cpp.orig
+++ b/examples++-load/PARDISO.cpp.orig
@@@ -185,16 -185,22 +185,32 @@@ bool SetPARDISO(
TypeSolveMat::defaultvalue =TypeSolveMatdefaultvalue;
return 0;
}
++<<<<<<< HEAD
+/* class Init {
++=======
+ /*
+ class Init {
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
public:
Init();
};
++<<<<<<< HEAD
+$1 */
+
+
++=======
+ LOADINIT(Init);
+
+ Init::Init() {
+ TypeSolveMat::defaultvalue = TypeSolveMat::SparseSolver;
+ DefSparseSolver<double>::solver = buildSolver<double>;
+ DefSparseSolver<Complex>::solver = buildSolver<Complex>;
+ }
+ */
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
static long ffompgetnumthreads(){return omp_get_num_threads();}
@@@ -202,16 -208,11 +218,24 @@@ static long ffompgetmaxthreads(){retur
static long ffompsetnumthreads(long n){omp_set_num_threads(n); return n;}
++<<<<<<< HEAD
+static void Load_Init() {
+ //}static void initPARDISO()
+ //{
+
+ if(verbosity>1)
+ cout << "\n Add: PARDISO: defaultsolver defaultsolverPARDISO" << endl;
+ TypeSolveMat::defaultvalue = TypeSolveMat::SparseSolver;
+ DefSparseSolver<double>::solver = buildSolver<double>;
+ DefSparseSolver<Complex>::solver = buildSolver<Complex>;
+
++=======
+ void initPARDISO()
+ {
+
+ if(verbosity>1)
+ cout << "\n Add: PARDISO: defaultsolver defaultsolverPARDISO" << endl;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
DefSparseSolver<double>::solver = buildSolver;
DefSparseSolver<Complex>::solver = buildSolver;
DefSparseSolverSym<double>::solver = buildSolver;
@@@ -229,5 -230,4 +253,9 @@@
}
++<<<<<<< HEAD
+//LOADFUNC(initPARDISO);
+LOADFUNC(Load_Init)
++=======
+ LOADFUNC(initPARDISO);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/SuperLu.cpp.orig
index ad407b0,0000000..ef2b1bd
mode 100644,000000..100644
--- a/examples++-load/SuperLu.cpp.orig
+++ b/examples++-load/SuperLu.cpp.orig
@@@ -1,778 -1,0 +1,794 @@@
+// for automatic compilation with ff-c++
+//ff-c++-LIBRARY-dep: superlu blas
+//ff-c++-cpp-dep:
+// for Super4.0 library
+#include "ff++.hpp"
+#include "slu_ddefs.h"
+#include "superlu_enum_consts.h"
+#define GlobalLU_t GlobalLU_txxxx
+#define countnz countnzxxxx
+#define fixupL fixupLxxxx
+#define print_lu_col print_lu_colxxxx
+#define check_tempv check_tempvxxxx
+#define PrintPerf PrintPerfxxxx
+#define ilu_countnz ilu_countnzxxxx
+#include "slu_zdefs.h"
+
+#undef GlobalLU_t
+#undef countnz
+#undef fixupL
+#undef print_lu_col
+#undef check_tempv
+#undef PrintPerf
+#undef ilu_countnz
+
+
+template <class R> struct SuperLUDriver
+{
+
+};
+
+template <> struct SuperLUDriver<double>
+{
+ /* Driver routines */
+ static Dtype_t R_SLU_T() { return SLU_D;}
+ static void
+ gssv(superlu_options_t * p1, SuperMatrix * p2, int * p3, int * p4, SuperMatrix * p5,
+ SuperMatrix * p6, SuperMatrix * p7 , SuperLUStat_t * p8, int * p9)
+ { dgssv( p1,p2,p3,p4,p5,p6,p7,p8,p9); }
+
+
+ static void
+ gssvx(superlu_options_t * p1, SuperMatrix * p2, int * p3, int * p4, int * p5,
+ char * p6, double * p7, double * p8, SuperMatrix * p9, SuperMatrix * p10,
+ void * p11, int p12, SuperMatrix * p13, SuperMatrix * p14,
+ double * p15, double * p16, double * p17, double * p18,
+ mem_usage_t * p19, SuperLUStat_t * p20, int * p21)
+ { dgssvx( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10, p11,p12,p13,p14,p15,p16,p17,p18,p19,p20, p21); }
+
+
+
+ /* Supernodal LU factor related */
+ static void
+ Create_CompCol_Matrix(SuperMatrix * p1, int p2 , int p3, int p4, double * p5,
+ int * p6, int * p7, Stype_t p8, Dtype_t p9 , Mtype_t p10)
+ {
+ dCreate_CompCol_Matrix( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
+ }
+
+
+ static void
+ Create_CompRow_Matrix(SuperMatrix * p1, int p2, int p3, int p4, double * p5,
+ int * p6, int * p7, Stype_t p8, Dtype_t p9, Mtype_t p10)
+ {
+ dCreate_CompRow_Matrix( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
+ }
+
+
+ static void
+ Create_Dense_Matrix(SuperMatrix * p1, int p2, int p3, double * p4, int p5,
+ Stype_t p6, Dtype_t p7, Mtype_t p8)
+ {
+ dCreate_Dense_Matrix( p1,p2,p3,p4,p5,p6,p7,p8);
+ }
+
+
+ static void
+ Create_SuperNode_Matrix(SuperMatrix * p1, int p2, int p3, int p4, double * p5,
+ int * p6, int * p7, int * p8, int * p9, int * p10,
+ Stype_t p11, Dtype_t p12, Mtype_t p13)
+ {
+ dCreate_SuperNode_Matrix( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10, p11,p12,p13);
+ }
+
+ static void
+ CompRow_to_CompCol(int p1, int p2, int p3,
+ double *p4, int *p5, int *p6,
+ double **p7, int **p8, int **p9)
+ {
+ dCompRow_to_CompCol( p1, p2, p3, p4, p5, p6, p7, p8, p9);
+ }
+
+
+};
+
+
+
+template <> struct SuperLUDriver<Complex>
+{
+ /* Driver routines */
+ static Dtype_t R_SLU_T() { return SLU_Z;}
+ static doublecomplex *dc(Complex *p) { return (doublecomplex *) (void *) p;}
+ static doublecomplex **dc(Complex **p) { return (doublecomplex **) (void *) p;}
+
+ static void
+ gssv(superlu_options_t * p1, SuperMatrix * p2, int * p3, int * p4, SuperMatrix * p5,
+ SuperMatrix * p6, SuperMatrix * p7 , SuperLUStat_t * p8, int * p9)
+ { zgssv( p1,p2,p3,p4,p5,p6,p7,p8,p9); }
+
+
+ static void
+ gssvx(superlu_options_t * p1, SuperMatrix * p2, int * p3, int * p4, int * p5,
+ char * p6, double * p7, double * p8, SuperMatrix * p9, SuperMatrix * p10,
+ void * p11, int p12, SuperMatrix * p13, SuperMatrix * p14,
+ double * p15, double * p16, double * p17, double * p18,
+ mem_usage_t * p19, SuperLUStat_t * p20, int * p21)
+ { zgssvx( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10, p11,p12,p13,p14,p15,p16,p17,p18,p19,p20, p21); }
+
+
+
+ /* Supernodal LU factor related */
+ static void
+ Create_CompCol_Matrix(SuperMatrix * p1, int p2 , int p3, int p4, Complex * p5,
+ int * p6, int * p7, Stype_t p8, Dtype_t p9 , Mtype_t p10)
+ {
+ zCreate_CompCol_Matrix( p1,p2,p3,p4,dc(p5),p6,p7,p8,p9,p10);
+ }
+
+
+ static void
+ Create_CompRow_Matrix(SuperMatrix * p1, int p2, int p3, int p4, Complex * p5,
+ int * p6, int * p7, Stype_t p8, Dtype_t p9, Mtype_t p10)
+ {
+ zCreate_CompRow_Matrix( p1,p2,p3,p4,dc(p5),p6,p7,p8,p9,p10);
+ }
+
+
+ static void
+ Create_Dense_Matrix(SuperMatrix * p1, int p2, int p3, Complex * p4, int p5,
+ Stype_t p6, Dtype_t p7, Mtype_t p8)
+ {
+ zCreate_Dense_Matrix( p1,p2,p3,dc(p4),p5,p6,p7,p8);
+ }
+
+
+ static void
+ Create_SuperNode_Matrix(SuperMatrix * p1, int p2, int p3, int p4, Complex * p5,
+ int * p6, int * p7, int * p8, int * p9, int * p10,
+ Stype_t p11, Dtype_t p12, Mtype_t p13)
+ {
+ zCreate_SuperNode_Matrix( p1,p2,p3,p4,dc(p5),p6,p7,p8,p9,p10, p11,p12,p13);
+ }
+
+ static void
+ CompRow_to_CompCol(int p1, int p2, int p3, Complex *p4, int *p5,
+ int *p6, Complex **p7, int **p8, int **p9)
+ {
+ zCompRow_to_CompCol( p1, p2, p3, dc(p4), p5, p6, dc(p7), p8, p9);
+ }
+
+};
+
+// read options for superlu in freefem++
+/*
+#ifdef __cpluscplus
+int s_(char *ff, ...)
+{
+ int i = 0;
+ while( *(++i+&str) != 0 )
+ if( strcmp(str, (char*)*(&str+i)) == 0)
+ return i;
+ return 0;
+}
+
+#else
+*/
+int s_(char* str, const char* cmp[])
+{
+ int i = 0;
+ while( cmp[i] != 0){
+ if( strcmp(str, cmp[i]) == 0){
+ //cout << *str << " return" << i << endl;
+ return i+1 ;
+ }
+ i++;
+ }
+ //cout << *str << " return 0" << endl;
+ return 0;
+}
+//#endif
+/*
+ static const yes_no_t enumyes_no_t[2] = {NO, YES};
+ static const fact_t enumfact_t[4] = {DOFACT, SamePattern, SamePattern_SameRowPerm, FACTORED};
+ static const colperm_t enumcolperm_t[5] = {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD, MY_PERMC};
+ static const trans_t enumtrans_t[3] = {NOTRANS, TRANS, CONJ};
+ static const IterRefine_t enumIterRefine_t[4] = {NOREFINE, SINGLE, DOUBLE, EXTRA};
+
+ static const char* compyes_no_t[] = {"NO", "YES",0};
+ static const char* compfact_t[] = {"DOFACT", "SamePattern", "SamePattern_SameRowPerm", "FACTORED",0};
+ static const char* compcolperm_t[] = {"NATURAL", "MMD_ATA", "MMD_AT_PLUS_A", "COLAMD", "MY_PERMC",0};
+ static const char* comptrans_t[] = {"NOTRANS", "TRANS", "CONJ",0};
+ static const char* compIterRefine_t[] = {"NOREFINE", "SINGLE", "DOUBLE", "EXTRA",0};
+
+ static const char* comp[] = {"Fact", "Equil","ColPerm",
+ "DiagPivotThresh","Trans","IterRefine",
+ "SymmetricMode","PivotGrowth","ConditionNumber",
+ "PrintStat",0};
+*/
+
+void read_options_freefem(string string_option, superlu_options_t *options){
+ static const yes_no_t enumyes_no_t[2] = {NO, YES};
+ static const fact_t enumfact_t[4] = {DOFACT, SamePattern, SamePattern_SameRowPerm, FACTORED};
+ static const colperm_t enumcolperm_t[5] = {NATURAL, MMD_ATA, MMD_AT_PLUS_A, COLAMD, MY_PERMC};
+ static const trans_t enumtrans_t[3] = {NOTRANS, TRANS, CONJ};
+ static const IterRefine_t enumIterRefine_t[4] = {NOREFINE, SLU_SINGLE, SLU_DOUBLE, SLU_EXTRA};
+
+ static const char* compyes_no_t[] = {"NO", "YES",0};
+ static const char* compfact_t[] = {"DOFACT", "SamePattern", "SamePattern_SameRowPerm", "FACTORED",0};
+ static const char* compcolperm_t[] = {"NATURAL", "MMD_ATA", "MMD_AT_PLUS_A", "COLAMD", "MY_PERMC",0};
+ static const char* comptrans_t[] = {"NOTRANS", "TRANS", "CONJ",0};
+ static const char* compIterRefine_t[] = {"NOREFINE", "SINGLE", "DOUBLE", "EXTRA",0};
+
+ static const char* comp[] = {"Fact", "Equil","ColPerm",
+ "DiagPivotThresh","Trans","IterRefine",
+ "SymmetricMode","PivotGrowth","ConditionNumber",
+ "PrintStat",0};
+
+
+ /* Set the default values for options argument:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ //cout << "string_option" << *string_option << endl;
+ KN<char> kdata(string_option.size()+1);
+
+ char * data=kdata;
+ strcpy( data, string_option.c_str());
+ cout << "data=" << data << endl;
+ char * tictac;
+ tictac = strtok(data," =,\t\n");
+ cout << "tictac=" << data << endl;
+// #ifdef __cplusplus
+// while(tictac != NULL){
+// int id_option = s_(tictac, "Fact", "Equil","ColPerm",
+// "DiagPivotThresh","Trans","IterRefine",
+// "SymmetricMode","PivotGrowth","ConditionNumber",
+// "PrintStat",0);
+// tictac = strtok(NULL," ,\t\n");
+// int val_options;
+// switch (id_option)
+// {
+// case 1 : // Fact
+// val_options= s_(tictac, "DOFACT", "SamePattern", "SamePattern_SameRowPerm", "FACTORED",0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","Fact");
+// exit(1);
+// }
+// options->Fact= enumfact_t[val_options-1];
+// break;
+// case 2: // Equil
+// val_options= s_(tictac, "NO", "YES", 0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","Equil");
+// exit(1);
+// }
+// options->Equil= enumyes_no_t[val_options-1];
+// break;
+// case 3: // ColPerm
+// val_options= s_(tictac,"NATURAL", "MMD_ATA", "MMD_AT_PLUS_A", "COLAMD", "MY_PERMC", 0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","ColPerm");
+// exit(1);
+// }
+// options->ColPerm= enumcolperm_t[val_options-1];
+// case 4: // DiagPivotThresh
+// options->DiagPivotThresh= strtod(tictac,&tictac);
+// break;
+// case 5: // Trans
+// val_options= s_(tictac, "NOTRANS", "TRANS", "CONJ",0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","Trans");
+// exit(1);
+// }
+// options->Trans= enumtrans_t[val_options-1];
+// break;
+// case 6: // IterRefine
+// val_options= s_(tictac, "NOREFINE", "SINGLE", "DOUBLE", "EXTRA",0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","IterRefine");
+// exit(1);
+// }
+// options->IterRefine= enumIterRefine_t[val_options-1];
+// break;
+// case 7: // SymmetricMode
+// val_options= s_(tictac, "NO","YES",0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","SymmetricMode");
+// exit(1);
+// }
+// options->SymmetricMode= enumyes_no_t[val_options-1];
+// break;
+// case 8: // PivotGrowth
+// val_options= s_(tictac, "NO","YES",0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","PivotGrowth");
+// exit(1);
+// }
+// options->PivotGrowth= enumyes_no_t[val_options-1];
+// break;
+// case 9: // ConditionNumber
+// val_options= s_(tictac, "NO","YES",0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","ConditionNumber");
+// exit(1);
+// }
+// options->ConditionNumber = enumyes_no_t[val_options-1];
+// break;
+// case 10: // PrintStat
+// val_options= s_(tictac, "NO","YES",0);
+// if( val_options == 0){
+// printf("value given for SuperLU for options %s is not correct\n","PrintStat");
+// exit(1);
+// }
+// options->PrintStat = enumyes_no_t[val_options-1];
+// break;
+// case 0: // Equivalent of case default
+// printf("A false parameter for SuperLU is given %s \n",tictac);
+// exit(1);
+// }
+// tictac = strtok(NULL," ,\t\n");
+// }
+// #else
+ while(tictac != NULL){
+ //char* comp[] = {"Fact", "Equil","ColPerm",
+ //"DiagPivotThresh","Trans","IterRefine",
+ //"SymmetricMode","PivotGrowth","ConditionNumber",
+ //"PrintStat",0 };
+ int id_option = s_(tictac, comp);
+ tictac = strtok(NULL," =,\t\n");
+ int val_options;
+
+ switch (id_option)
+ {
+ case 1 : // Fact
+ //char* comp1[] = {"DOFACT", "SamePattern", "SamePattern_SameRowPerm", "FACTORED",0};
+ val_options= s_(tictac,compfact_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","Fact");
+ exit(1);
+ }
+ options->Fact = enumfact_t[val_options-1];
+ break;
+ case 2: // Equil
+ //char* comp2[] = {"NO", "YES", 0};
+ val_options= s_(tictac,compyes_no_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","Equil");
+ exit(1);
+ }
+ options->Equil = enumyes_no_t[val_options-1];
+ break;
+ case 3: // ColPerm
+ //char* comp3[] = {"NATURAL", "MMD_ATA", "MMD_AT_PLUS_A", "COLAMD", "MY_PERMC", 0};
+ val_options= s_(tictac,compcolperm_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","ColPerm");
+ exit(1);
+ }
+ options->ColPerm = enumcolperm_t[val_options-1];
+ break;
+ case 4: // DiagPivotThresh
+ options->DiagPivotThresh= strtod(tictac,&tictac);
+ break;
+ case 5: // Trans
+ //char* comp5[] = {"NOTRANS", "TRANS", "CONJ", 0};
+ val_options= s_(tictac, comptrans_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","Trans");
+ exit(1);
+ }
+ options->Trans = enumtrans_t[val_options-1];
+ break;
+ case 6: // IterRefine
+ //char* comp6[] = {"NOREFINE", "SINGLE", "DOUBLE", "EXTRA", 0};
+ val_options= s_(tictac, compIterRefine_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","IterRefine");
+ exit(1);
+ }
+ options->IterRefine = enumIterRefine_t[val_options-1];
+ break;
+ case 7: // SymmetricMode
+ //char* comp7[] = {"NO","YES", 0};
+ val_options= s_(tictac, compyes_no_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","SymmetricMode");
+ exit(1);
+ }
+ options->SymmetricMode= enumyes_no_t[val_options-1];
+ break;
+ case 8: // PivotGrowth
+ //char* comp8[] = {"NO","YES", 0};
+ val_options= s_(tictac,compyes_no_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","PivotGrowth");
+ exit(1);
+ }
+ options->PivotGrowth = enumyes_no_t[val_options-1];
+ break;
+ case 9: // ConditionNumber
+ //char* comp9[] = {"NO","YES", 0};
+ val_options= s_(tictac, compyes_no_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","ConditionNumber");
+ exit(1);
+ }
+ options->ConditionNumber = enumyes_no_t[val_options-1];
+ break;
+ case 10: // PrintStat
+ val_options= s_(tictac, compyes_no_t);
+ if( val_options == 0){
+ printf("value given for SuperLU for options %s is not correct\n","PrintStat");
+ exit(1);
+ }
+ options->PrintStat = enumyes_no_t[val_options-1];
+ break;
+ case 0: // Equivalent of case default
+ break;
+ }
+ tictac = strtok(NULL," =,\t\n");
+ }
+ //#endif
+}
+
+
+
+
+
+
+template<class R>
+class SolveSuperLU : public MatriceMorse<R>::VirtualSolver, public SuperLUDriver<R> {
+ double eps;
+ mutable double epsr;
+ double tgv;
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+
+
+ mutable char equed[1];
+ yes_no_t equil;
+ mutable SuperMatrix A, L, U;
+ NCformat *Astore;
+ NCformat *Ustore;
+ SCformat *Lstore;
+ R *a;
+ int *asub, *xa;
+ KN<int> perm_c; /* column permutation vector */
+ KN<int> perm_r; /* row permutations from partial pivoting */
+ string string_option;
+ //string *file_option;
+ //string *file_perm_r;
+ //string *file_perm_c;
+
+ KN<int> etree;
+ R *rhsb, *rhsx, *xact;
+ double *RR, *CC;
+ int m, n, nnz;
+
+ R *arow;
+ int *asubrow, *xarow;
+
+
+ mutable superlu_options_t options;
+ mutable mem_usage_t mem_usage;
+
+public:
+ SolveSuperLU(const MatriceMorse<R> &AA,int strategy,double ttgv, double epsilon,
+ double pivot,double pivot_sym, string & param_char, KN<long> pperm_r,
+ KN<long> pperm_c ) :
+ eps(epsilon),epsr(0),
+ tgv(ttgv),
+ etree(0),string_option(param_char),perm_r(pperm_r), perm_c(pperm_c),
+ RR(0), CC(0),
+ tol_pivot_sym(pivot_sym),tol_pivot(pivot)
+ {
+ SuperMatrix B, X;
+ SuperLUStat_t stat;
+ void *work=0;
+ int info, lwork=0, nrhs=1;
+ int i;
+ double ferr[1];
+ double berr[1];
+ double rpg, rcond;
+
+ R *bb;
+ R *xx;
+
+ A.Store=0;
+ B.Store=0;
+ X.Store=0;
+ L.Store=0;
+ U.Store=0;
+
+ int status;
+
+ n=AA.n;
+ m=AA.m;
+ nnz=AA.nbcoef;
+
+ arow=AA.a;
+ asubrow=AA.cl;
+ xarow=AA.lg;
+
+ /* FreeFem++ use Morse Format */
+ // FFCS - "this->" required by g++ 4.7
+ this->CompRow_to_CompCol(m, n, nnz, arow, asubrow, xarow,
+ &a, &asub, &xa);
+
+ /* Defaults */
+ lwork = 0;
+ nrhs = 0;
+
+ /* Set the default values for options argument:
+ options.Fact = DOFACT;
+ options.Equil = YES;
+ options.ColPerm = COLAMD;
+ options.DiagPivotThresh = 1.0;
+ options.Trans = NOTRANS;
+ options.IterRefine = NOREFINE;
+ options.SymmetricMode = NO;
+ options.PivotGrowth = NO;
+ options.ConditionNumber = NO;
+ options.PrintStat = YES;
+ */
+ set_default_options(&options);
+
+ printf(".. default options:\n");
+ printf("\tFact\t %8d\n", options.Fact);
+ printf("\tEquil\t %8d\n", options.Equil);
+ printf("\tColPerm\t %8d\n", options.ColPerm);
+ printf("\tDiagPivotThresh %8.4f\n", options.DiagPivotThresh);
+ printf("\tTrans\t %8d\n", options.Trans);
+ printf("\tIterRefine\t%4d\n", options.IterRefine);
+ printf("\tSymmetricMode\t%4d\n", options.SymmetricMode);
+ printf("\tPivotGrowth\t%4d\n", options.PivotGrowth);
+ printf("\tConditionNumber\t%4d\n", options.ConditionNumber);
+ printf("..\n");
+
+ if(!string_option.empty()) read_options_freefem(string_option,&options);
+
+ printf(".. options:\n");
+ printf("\tFact\t %8d\n", options.Fact);
+ printf("\tEquil\t %8d\n", options.Equil);
+ printf("\tColPerm\t %8d\n", options.ColPerm);
+ printf("\tDiagPivotThresh %8.4f\n", options.DiagPivotThresh);
+ printf("\tTrans\t %8d\n", options.Trans);
+ printf("\tIterRefine\t%4d\n", options.IterRefine);
+ printf("\tSymmetricMode\t%4d\n", options.SymmetricMode);
+ printf("\tPivotGrowth\t%4d\n", options.PivotGrowth);
+ printf("\tConditionNumber\t%4d\n", options.ConditionNumber);
+ printf("..\n");
+
+ Dtype_t R_SLU = SuperLUDriver<R>::R_SLU_T();
+
+ // FFCS - "this->" required by g++ 4.7
+ this->Create_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, R_SLU, SLU_GE);
+
+ this->Create_Dense_Matrix(&B, m, 0, (R*) 0, m, SLU_DN, R_SLU, SLU_GE);
+ this->Create_Dense_Matrix(&X, m, 0, (R*) 0, m, SLU_DN, R_SLU, SLU_GE);
+
+
+ if ( etree.size() ==0 ) etree.resize(n);
+ if ( perm_r.size() ==0 ) perm_r.resize(n);
+ if ( perm_c.size() ==0 ) perm_c.resize(n);
+
+ if ( !(RR = new double[n]) )
+ ABORT("SUPERLU_MALLOC fails for R[].");
+ for(int ii=0; ii<n; ii++){
+ RR[ii]=1.;
+ }
+ if ( !(CC = new double[m]) )
+ ABORT("SUPERLU_MALLOC fails for C[].");
+ for(int ii=0; ii<n; ii++){
+ CC[ii]=1.;
+ }
+ ferr[0]=0;
+ berr[0]=0;
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+ B.ncol = 0; /* Indicate not to solve the system */
+ SuperLUDriver<R>::gssvx(&options, &A, perm_c, perm_r, etree, equed, RR, CC,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+
+
+ if(verbosity>2)
+ printf("LU factorization: dgssvx() returns info %d\n", info);
+ if(verbosity>3)
+ {
+ if ( info == 0 || info == n+1 ) {
+
+ if ( options.PivotGrowth ) printf("Recip. pivot growth = %e\n", rpg);
+ if ( options.ConditionNumber )
+ printf("Recip. condition number = %e\n", rcond);
+ Lstore = (SCformat *) L.Store;
+ Ustore = (NCformat *) U.Store;
+ printf("No of nonzeros in factor L = %d\n", Lstore->nnz);
+ printf("No of nonzeros in factor U = %d\n", Ustore->nnz);
+ printf("No of nonzeros in L+U = %d\n", Lstore->nnz + Ustore->nnz - n);
+ printf("L\\U MB %.3f\ttotal MB needed %.3f\texpansions %d\n",
+ mem_usage.for_lu/1e6, mem_usage.total_needed/1e6,
+ stat.expansions
+ );
+ fflush(stdout);
+
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+ }
+ if ( verbosity>5 ) StatPrint(&stat);
+ StatFree(&stat);
+ if( B.Store) Destroy_SuperMatrix_Store(&B);
+ if( X.Store) Destroy_SuperMatrix_Store(&X);
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+
+
+ }
+ void Solver(const MatriceMorse<R> &AA,KN_<R> &x,const KN_<R> &b) const {
+ SuperMatrix B, X;
+ SuperLUStat_t stat;
+ void *work=0;
+ int info=0, lwork=0, nrhs=1;
+ int i;
+ double ferr[1], berr[1];
+ double rpg, rcond;
+ double *xx;
+
+ B.Store=0;
+ X.Store=0;
+ ffassert ( &x[0] != &b[0]);
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+ Dtype_t R_SLU = SuperLUDriver<R>::R_SLU_T();
+
+ {
+ KN_2Ptr<R> xx(x),bb(b);
+ // cout << " xx #### " << xx.c.N() << " "<< xx.ca.N() << " " << xx.ca.step << endl;
+ //cout << " bb #### " << bb.c.N() << " "<< bb.ca.N() << " " << bb.ca.step <<endl;
+ // FFCS - "this->" required by g++ 4.7
+ this->Create_Dense_Matrix(&B, m, 1, bb, m, SLU_DN, R_SLU, SLU_GE);
+ this->Create_Dense_Matrix(&X, m, 1, xx, m, SLU_DN, R_SLU, SLU_GE);
+
+ B.ncol = nrhs; /* Set the number of right-hand side */
+
+ /* Initialize the statistics variables. */
+ StatInit(&stat);
+
+
+ SuperLUDriver<R>::gssvx(&options, &A, perm_c, perm_r, etree, equed, RR, CC,
+ &L, &U, work, lwork, &B, &X, &rpg, &rcond, ferr, berr,
+ &mem_usage, &stat, &info);
+
+
+
+ if(verbosity>2)
+ printf("Triangular solve: dgssvx() returns info %d\n", info);
+
+ }
+
+
+
+ if(verbosity>3)
+ {
+ if ( info == 0 || info == n+1 ) {
+
+ /* This is how you could access the solution matrix. */
+ R *sol = (R*) ((DNformat*) X.Store)->nzval;
+
+
+ if ( options.IterRefine ) {
+ printf("Iterative Refinement:\n");
+ printf("%8s%8s%16s%16s\n", "rhs", "Steps", "FERR", "BERR");
+ printf("%8d%8d%16e%16e\n", i+1, stat.RefineSteps, ferr[0], berr[0]);
+ }
+ fflush(stdout);
+ } else if ( info > 0 && lwork == -1 ) {
+ printf("** Estimated memory: %d bytes\n", info - n);
+ }
+ }
+
+
+ //cout << " x min max " << x.min() << " " <<x.max() << endl;
+ //cout << "=========================================" << endl;
+ if( B.Store) Destroy_SuperMatrix_Store(&B);
+ if( X.Store) Destroy_SuperMatrix_Store(&X);
+ }
+
+ ~SolveSuperLU() {
+ if(verbosity>3)
+ cout << "~SolveSuperLU S:" << endl;
+ // if (etree) delete[] etree;
+ // if (perm_r) delete[] perm_r;
+ // if (perm_c) delete[] perm_c;
+ if (RR) delete[] RR;
+ if (CC) delete[] CC;
+ if( A.Store) Destroy_SuperMatrix_Store(&A);
+ if( L.Store) Destroy_SuperNode_Matrix(&L);
+ if( U.Store) Destroy_CompCol_Matrix(&U);
+
+ }
+ void addMatMul(const KN_<R> & x, KN_<R> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<R> &) (*this) * x;
+ }
+
+};
+
+MatriceMorse<double>::VirtualSolver *
+BuildSolverSuperLU(DCL_ARG_SPARSE_SOLVER(double,A))
+{
+ if(verbosity>9)
+ cout << " BuildSolverSuperLU<double>" << endl;
+ return new SolveSuperLU<double>(*A,ds.strategy,ds.tgv,ds.epsilon,ds.tol_pivot,ds.tol_pivot_sym,ds.sparams,ds.perm_r,ds.perm_c);
+}
+
+MatriceMorse<Complex>::VirtualSolver *
+BuildSolverSuperLU(DCL_ARG_SPARSE_SOLVER(Complex,A))
+{
+ if(verbosity>9)
+ cout << " BuildSolverSuperLU<Complex>" << endl;
+ return new SolveSuperLU<Complex>(*A,ds.strategy,ds.tgv,ds.epsilon,ds.tol_pivot,ds.tol_pivot_sym,ds.sparams,ds.perm_r,ds.perm_c);
+}
+
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+ };*/
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// the 2 default sparse solver double and complex
+DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
+DefSparseSolver<Complex>::SparseMatSolver SparseMatSolver_C;
+// the default probleme solver
+TypeSolveMat::TSolveMat TypeSolveMatdefaultvalue=TypeSolveMat::defaultvalue;
+
+bool SetSuperLU()
+{
+ if(verbosity>1)
+ cout << " SetDefault sparse solver to SuperLU" << endl;
+ DefSparseSolver<double>::solver =BuildSolverSuperLU;
+ DefSparseSolver<Complex>::solver =BuildSolverSuperLU;
+ TypeSolveMat::defaultvalue =TypeSolveMatdefaultvalue;
+ return true;
+}
+
++<<<<<<< HEAD
+static void Load_Init()
++=======
++
++
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ SparseMatSolver_R= DefSparseSolver<double>::solver;
+ SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+
+ if(verbosity>1)
+ cout << "\n Add: SuperLU, defaultsolverSuperLU" << endl;
+ TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+ DefSparseSolver<double>::solver =BuildSolverSuperLU;
+ DefSparseSolver<Complex>::solver =BuildSolverSuperLU;
+ Global.Add("defaulttoSuperLU","(",new OneOperator0<bool>(SetSuperLU));
+}
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/VTK_writer.cpp.orig
index d6e3718,0000000..467b975
mode 100644,000000..100644
--- a/examples++-load/VTK_writer.cpp.orig
+++ b/examples++-load/VTK_writer.cpp.orig
@@@ -1,340 -1,0 +1,352 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Cedric Ody (not an expert in c++)
+// E-MAIL : cedric.listes at gmail.com
+// from the work of Sala Lorenzo (Dxwriter)
+
+#include "mode_open.hpp"
+#include <iostream>
+#include <cfloat>
+#include <cmath>
+#include <iterator>
+using namespace std;
+#include "ff++.hpp"
+using namespace Fem2D;
+
+class VtkWriter
+{
+ struct tsinfo
+ {
+ int imesh;//!<index of the mesh
+ std::string name;
+ std::vector<double> vecistant;
+ };
+
+private:
+ std::vector<Fem2D::Mesh*> _vecmesh;
+ //std::vector<tsinfo> _vecofts;
+ std::string _nameoffile;
+
+ /*! This string contains the name of data file with \\ where there's a \ in the path*/
+ std::string _nameofdatafile;
+
+ //!files containing the data and the timeseries
+ std::ofstream _ofdata;
+
+public:
+ VtkWriter() { std::cout << "Constructor of VtkWriter" << endl; }
+ void openfiles(const std::string& s)
+ {
+ _nameoffile=s;
+ std::string tmp=s+".vtu";
+ std::cout<<tmp<<" ";
+ _ofdata.open(tmp.c_str(), std::ios_base::out);
+ _nameofdatafile="";
+ for(int i=0;i<tmp.length();++i)
+ {
+ if(tmp.at(i)=='\\')
+ _nameofdatafile.append(1,'\\');
+ _nameofdatafile.append(1,tmp.at(i));
+ }
+ }
+
+ void addmesh(Fem2D::Mesh* mesh)
+ {
+ Fem2D::Mesh& Th(*mesh);
+ _vecmesh.push_back(mesh);
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+
+ _ofdata << "<?xml version=\"1.0\"?>" << std::endl;
+ _ofdata << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\">" ;
+ _ofdata << std::endl;
+ _ofdata << "<UnstructuredGrid>" ; _ofdata << std::endl;
+ _ofdata << "<Piece NumberOfPoints=\"" << Th.nv << "\" NumberOfCells=\"" << Th.nt << "\">";
+ _ofdata << std::endl;
+ _ofdata << "<Points>" << std::endl;
+ _ofdata << "<DataArray type=\"Float32\" Name=\"Position\" NumberOfComponents=\"3\" format=\"ascii\">";
+ _ofdata << std::endl;
+ for(int k=0;k<Th.nv;++k) _ofdata << Th(k).x<<" "<<Th(k).y<< " " << 0.0 << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata << "</Points>" << std::endl;
+ _ofdata << "<Cells>" << std::endl;
+ _ofdata << "<DataArray type=\"Int32\" Name=\"connectivity\" NumberOfComponents=\"1\" format=\"ascii\">";
+ _ofdata << std::endl;
+ for(int i=0;i<Th.nt;++i)
+ for (int j=0; j <3; j++) _ofdata << Th(i,j) << " " ;
+ _ofdata << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata << "<DataArray type=\"Int32\" Name=\"offsets\" NumberOfComponents=\"1\" format=\"ascii\">";
+ _ofdata << std::endl;
+ for(int i=0;i<Th.nt;++i) _ofdata << 3+3*(i) << " ";
+ _ofdata << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata << "<DataArray type=\"UInt8\" Name=\"types\" NumberOfComponents=\"1\" format=\"ascii\">" ;
+ _ofdata<< std::endl;
+ for(int i=0;i<Th.nt;++i) _ofdata << 5 << " ";
+ _ofdata << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata << "</Cells>" << std::endl;
+ _ofdata << "<PointData >" << endl;
+ }
+
+ double checkprecision(double val)
+ {
+ double tmp;
+ if ( val >= 0. ) tmp=max(0.,val);
+ if ( val < 0. ) tmp=min(0.,val);
+ return tmp;
+ }
+
+ /*!Add a field*/
+ void addscalar(const string& nameoffield, Fem2D::Mesh* mesh, const KN<double>&val)
+ {
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+
+ _ofdata << "<DataArray type=\"Float32\" Name=\"";
+ _ofdata << nameoffield<<"\" NumberOfComponents=\"1\" format=\"ascii\">";
+ _ofdata << std::endl;
+ for(int i=0;i<val.size();++i) _ofdata<<checkprecision(val[i])<<std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+
+ _ofdata.flush();
+ }
+
+ /*!Add a field*/
+ void addvector(const string& nameoffield, Fem2D::Mesh* mesh, const KN<double>&val, const KN<double>&val2)
+ {
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+
+ _ofdata << "<DataArray type=\"Float32\" Name=\"";
+ _ofdata << nameoffield<<"\" NumberOfComponents=\"3\" format=\"ascii\">";
+ _ofdata << std::endl;
+ for(int i=0;i<val.size();++i) _ofdata<<checkprecision(val[i])<< " " << checkprecision(val2[i]) << " " << 0.0 << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata.flush();
+ }
+
+ /*!Get the mesh associated with the series nameofts*/
+ Fem2D::Mesh* getmeshts(const string& nameofts)
+ {
+ return _vecmesh[0];
+ }
+
+ void init()
+ {
+ new(this)VtkWriter();
+ }
+
+ void destroy()
+ {
+ if(_ofdata.is_open())
+ {
+ _ofdata << "</PointData>" << endl;
+ _ofdata << "<CellData>" << endl;
+ _ofdata << "</CellData>" << endl;
+ _ofdata << "</Piece>" << endl;
+ _ofdata << "</UnstructuredGrid>" << endl;
+ _ofdata << "</VTKFile>" << endl;
+ _ofdata.close();
+ }
+ }
+}; //End of class
+
+class Vtkwritesol_Op : public E_F0mps
+{
+public:
+ typedef long Result;
+ Expression edx;
+ Expression ename;//!<name of time series or field
+ Expression et;//!<time
+ long what; // 1 scalar, 2 vector, 3 symtensor
+ long nbfloat; // 1 scalar, n vector (3D), n symtensor(3D)
+ Expression evct,evct2;
+
+public:
+ Vtkwritesol_Op(const basicAC_F0 & args) : what(0), nbfloat(0)
+ {
+ evct=0;
+ evct2=0;
+ int nbofsol;
+ int ddim=2;
+ //There's no named parameter
+ args.SetNameParam();
+ if(args.size()!=3)
+ {
+ CompileError("Vtkwritesol accepts only 4 parameters");
+ }
+ if (BCastTo<VtkWriter *>(args[0])) edx = CastTo<VtkWriter *>(args[0]);
+ if (BCastTo<string *>(args[1])) ename = CastTo<string *>(args[1]);
+
+ if ( args[2].left()==atype<double>() )
+ {
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[2] );
+ }
+ else if ( args[2].left()==atype<double *>() )
+ {
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[2] );
+ }
+ else if ( BCastTo<pfer>(args[2]) )
+ {
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[2] );
+ }
+ else if ( args[2].left()==atype<E_Array>() )
+ {
+ std::cout << "Until now only scalar solution" << std::endl;
+
+ int i=2;
+ const E_Array * a0 = dynamic_cast<const E_Array *>( args[i].LeftValue() );
+
+ if( a0->size() == ddim){
+ // vector solution
+ what=2;
+ nbfloat=a0->size();
+ evct = to<double>( (*a0)[0]);
+ evct2 = to<double>( (*a0)[1]);
+
+ }
+ cout << "Passed Until now only scalar solution" << std::endl;
+ }
+ else
+ {
+ CompileError("savesol in 2D: Sorry no way to save this kind of data");
+ }
+
+ }
+ // all type
+ static ArrayOfaType typeargs() { return ArrayOfaType(atype<VtkWriter *>(), atype<string *>(), true); }
+ static E_F0 * f(const basicAC_F0 & args) { return new Vtkwritesol_Op(args);}
+ AnyType operator()(Stack stack) const ;
+}; // end of class
+
+
+AnyType Vtkwritesol_Op::operator()(Stack stack) const
+{
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ VtkWriter &dx=*(GetAny<VtkWriter *>((*edx)(stack)));
+ string &name=*(GetAny<string *>((*ename)(stack)));
+ //double t=GetAny<double>((*et)(stack));
+ Mesh &Th=*(dx.getmeshts(name));
+
+ int nt = Th.nt;
+ int nv = Th.nv;
+
+ int nbsol=nv;
+ long longdefault;
+
+ KN<double> valsol(nbsol);
+ valsol=0.;
+ KN<int> takemesh(nbsol);
+ takemesh=0;
+ MeshPoint *mp3(MeshPointStack(stack));
+ for (int it=0;it<nt;it++)
+ {
+ for(int iv=0;iv<3;iv++)
+ {
+ int i=Th(it,iv);
+ mp3->setP(&Th,it,iv);
+ valsol[i] = valsol[i] + GetAny< double >((*evct)(stack));
+ ++takemesh[i];
+ }
+ }
+ for(int i=0; i<nbsol; i++)
+ {
+ valsol[i] /= takemesh[i];
+ }
+
+ //Writes valsol on the file file
+ if (what==1) dx.addscalar(name,&Th,valsol);
+
+ if (what == 2)
+ {
+ KN<double> valsol2(nbsol);
+ valsol2=0.;
+ KN<int> takemesh(nbsol);
+ takemesh=0;
+ MeshPoint *mp3(MeshPointStack(stack));
+ for (int it=0;it<nt;it++)
+ {
+ for(int iv=0;iv<3;iv++)
+ {
+ int i=Th(it,iv);
+ mp3->setP(&Th,it,iv);
+ valsol2[i] = valsol2[i] + GetAny< double >((*evct2)(stack));
+ ++takemesh[i];
+ }
+ }
+ for(int i=0; i<nbsol; i++)
+ {
+ valsol2[i] /= takemesh[i];
+ }
+
+ //Writes valsol on the file file
+ dx.addvector(name,&Th,valsol,valsol2);
+
+ }
+
+ return longdefault;
+
+}
+
+
+
+// le vrai constructeur est la
+VtkWriter* init_VtkWriter(VtkWriter * const &a, string * const & s)
+{
+ std::cout << "start init_VtkWriter" << std::endl;
+ a->init();
+ a->openfiles(*s);
+ std::cout << "end init_VtkWriter" << std::endl;
+ return a;
+}
+
+void* call_addmesh( VtkWriter * const & mt, Fem2D::Mesh* const & pTh) {
+ mt->addmesh(pTh);
+ return NULL;
+}
+
+// Add the function name to the freefem++ table
++<<<<<<< HEAD
+/* class Init
++=======
++class Init
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+public:
+ Init();
+};
+
++<<<<<<< HEAD
+$1 */
+static void Load_Init()
++=======
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ Dcl_Type<VtkWriter*>(InitP<VtkWriter>,Destroy<VtkWriter>);
+// declare deux nouveau type pour freefem++ un pointeur et
+
+ zzzfff->Add("VtkWriter",atype<VtkWriter*>()); // ajoute le type myType a freefem++
+ // constructeur d'un type myType dans freefem
+ TheOperators->Add("<-", new OneOperator2_<VtkWriter*, VtkWriter* ,string*>(&init_VtkWriter));
+ Global.Add("Vtkaddmesh","(",new OneOperator2_<void *, VtkWriter*, Fem2D::Mesh*>(call_addmesh));
+ Global.Add("Vtkaddscalar","(",new OneOperatorCode< Vtkwritesol_Op> );
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/VTK_writer_3d.cpp.orig
index 3d60a7b,0000000..ba847c8
mode 100644,000000..100644
--- a/examples++-load/VTK_writer_3d.cpp.orig
+++ b/examples++-load/VTK_writer_3d.cpp.orig
@@@ -1,368 -1,0 +1,380 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Cedric Ody (not an expert in c++)
+// E-MAIL : cedric.listes at gmail.com
+// from the work of Sala Lorenzo (Dxwriter)
+
+#include "mode_open.hpp"
+#include <iostream>
+#include <cfloat>
+#include <cmath>
+#include <iterator>
+using namespace std;
+#include "ff++.hpp"
+//using namespace Fem2D;
+#include <set>
+#include <vector>
+//#include "msh3.hpp"
+
+class VtkWriter
+{
+ struct tsinfo
+ {
+ int imesh;//!<index of the mesh
+ std::string name;
+ std::vector<double> vecistant;
+ };
+
+private:
+ std::vector<Mesh3*> _vecmesh;
+ //std::vector<tsinfo> _vecofts;
+ std::string _nameoffile;
+
+ /*! This string contains the name of data file with \\ where there's a \ in the path*/
+ std::string _nameofdatafile;
+
+ //!files containing the data and the timeseries
+ std::ofstream _ofdata;
+
+public:
+ VtkWriter() { std::cout << "Constructor of VtkWriter" << endl; }
+ void openfiles(const std::string& s)
+ {
+ _nameoffile=s;
+ std::string tmp=s+".vtu";
+ std::cout<<tmp<<" ";
+ _ofdata.open(tmp.c_str(), std::ios_base::out);
+ _nameofdatafile="";
+ for(int i=0;i<tmp.length();++i)
+ {
+ if(tmp.at(i)=='\\')
+ _nameofdatafile.append(1,'\\');
+ _nameofdatafile.append(1,tmp.at(i));
+ }
+ }
+
+ void addmesh(Mesh3* mesh)
+ {
+ Mesh3& Th(*mesh);
+ _vecmesh.push_back(mesh);
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+
+ _ofdata << "<?xml version=\"1.0\"?>" << std::endl;
+ _ofdata << "<VTKFile type=\"UnstructuredGrid\" version=\"0.1\" byte_order=\"LittleEndian\">" << std::endl;
+ _ofdata << "<UnstructuredGrid>" << std::endl;
+ _ofdata << "<Piece NumberOfPoints=\"" << Th.nv << "\" NumberOfCells=\"" << Th.nt << "\">" << std::endl;
+ _ofdata << "<Points>" << std::endl;
+ _ofdata << "<DataArray type=\"Float32\" Name=\"Position\" NumberOfComponents=\"3\" format=\"ascii\">" << std::endl;
+ for(int k=0;k<Th.nv;++k) _ofdata << Th(k).x<<" "<<Th(k).y<< " "<<Th(k).z<<std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata << "</Points>" << std::endl;
+ _ofdata << "<Cells>" << std::endl;
+ _ofdata << "<DataArray type=\"Int32\" Name=\"connectivity\" NumberOfComponents=\"1\" format=\"ascii\">" << std::endl;
+ for(int i=0;i<Th.nt;++i)
+ for (int j=0; j <4; j++) _ofdata << Th(i,j) << " " ;
+ _ofdata << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata << "<DataArray type=\"Int32\" Name=\"offsets\" NumberOfComponents=\"1\" format=\"ascii\">" << std::endl;
+ for(int i=0;i<Th.nt;++i) _ofdata << 4+4*(i) << " ";
+ _ofdata << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata << "<DataArray type=\"UInt8\" Name=\"types\" NumberOfComponents=\"1\" format=\"ascii\">" << std::endl;
+ for(int i=0;i<Th.nt;++i) _ofdata << 10 << " ";
+ _ofdata << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata << "</Cells>" << std::endl;
+ _ofdata << "<PointData >" << endl;
+ }
+
+ /*!Add a field*/
+ void addscalar(const string& nameoffield, Mesh3* mesh, const KN<double>&val)
+ {
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+
+ _ofdata << "<DataArray type=\"Float32\" Name=\""<<nameoffield<<"\" NumberOfComponents=\"1\" format=\"ascii\">" << std::endl;
+ for(int i=0;i<val.size();++i) _ofdata<<checkprecision(val[i])<<std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+
+ _ofdata.flush();
+ }
+
+ double checkprecision(double val)
+ {
+ double tmp;
+ if ( val >= 0. ) tmp=max(0.,val);
+ if ( val < 0. ) tmp=min(0.,val);
+ return tmp;
+ }
+
+ /*!Add a field*/
+ void addvector(const string& nameoffield, Mesh3* mesh, const KN<double>&val,
+ const KN<double>&val2,const KN<double>&val3 )
+ {
+ _ofdata.flags(std::ios_base::scientific);
+ _ofdata.precision(15);
+
+ _ofdata << "<DataArray type=\"Float32\" Name=\""<<nameoffield<<"\" NumberOfComponents=\"3\" format=\"ascii\">" << std::endl;
+ for(int i=0;i<val.size();++i) _ofdata<<checkprecision(val[i])<< " " << checkprecision(val2[i]) << " " << checkprecision(val3[i]) << std::endl;
+ _ofdata << "</DataArray>" << std::endl;
+ _ofdata.flush();
+ }
+
+
+ /*!Get the mesh associated with the series nameofts*/
+ Mesh3* getmeshts(const string& nameofts)
+ {
+ return _vecmesh[0];
+ }
+
+ void init()
+ {
+ new(this)VtkWriter();
+ }
+
+ void destroy()
+ {
+ if(_ofdata.is_open())
+ {
+ _ofdata << "</PointData>" << endl;
+ _ofdata << "<CellData>" << endl;
+ _ofdata << "</CellData>" << endl;
+ _ofdata << "</Piece>" << endl;
+ _ofdata << "</UnstructuredGrid>" << endl;
+ _ofdata << "</VTKFile>" << endl;
+ _ofdata.close();
+ }
+ }
+}; //End of class
+
+class Vtkwritesol_Op : public E_F0mps
+{
+public:
+ typedef long Result;
+ Expression edx;
+ Expression ename;//!<name of time series or field
+ Expression et;//!<time
+ long what; // 1 scalar, 2 vector, 3 symtensor
+ long nbfloat; // 1 scalar, n vector (3D), n symtensor(3D)
+ Expression evct,evct2,evct3;
+
+public:
+ Vtkwritesol_Op(const basicAC_F0 & args) : what(0), nbfloat(0)
+ {
+ evct=0;
+ evct2=0;
+ evct3=0;
+ int nbofsol;
+ int ddim=3;
+ //There's no named parameter
+ args.SetNameParam();
+ if(args.size()!=3)
+ {
+ CompileError("Vtkwritesol accepts only 4 parameters");
+ }
+ if (BCastTo<VtkWriter *>(args[0])) edx = CastTo<VtkWriter *>(args[0]);
+ if (BCastTo<string *>(args[1])) ename = CastTo<string *>(args[1]);
+
+ if ( args[2].left()==atype<double>() )
+ {
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[2] );
+ }
+ else if ( args[2].left()==atype<double *>() )
+ {
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[2] );
+ }
+ else if ( BCastTo<pfer>(args[2]) )
+ {
+ what=1;
+ nbfloat=1;
+ evct=to<double>( args[2] );
+ }
+ else if ( args[2].left()==atype<E_Array>() )
+ {
+ std::cout << "Until now only scalar solution" << std::endl;
+
+ int i=2;
+ const E_Array * a0 = dynamic_cast<const E_Array *>( args[i].LeftValue() );
+
+
+ if( a0->size() == 1){
+ // scalar solution
+ what=1;
+ nbfloat=a0->size();
+ evct = to<double>( (*a0)[0]);
+
+ }
+
+ if( a0->size() == ddim){
+ // vector solution
+ what=2;
+ nbfloat=a0->size();
+ evct = to<double>( (*a0)[0]);
+ evct2 = to<double>( (*a0)[1]);
+ evct3 = to<double>( (*a0)[2]);
+
+ }
+ cout << "Passed Until now only scalar solution" << std::endl;
+ }
+ else
+ {
+ CompileError("savesol in 2D: Sorry no way to save this kind of data");
+ }
+
+ }
+ static ArrayOfaType typeargs() { return ArrayOfaType(atype<VtkWriter *>(), atype<string *>(), true); }// all type
+ static E_F0 * f(const basicAC_F0 & args) { return new Vtkwritesol_Op(args);}
+ AnyType operator()(Stack stack) const ;
+}; // end of class
+
+
+AnyType Vtkwritesol_Op::operator()(Stack stack) const
+{
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ VtkWriter &dx=*(GetAny<VtkWriter *>((*edx)(stack)));
+ string &name=*(GetAny<string *>((*ename)(stack)));
+ //double t=GetAny<double>((*et)(stack));
+ Mesh3 &Th=*(dx.getmeshts(name));
+
+ int nt = Th.nt;
+ int nv = Th.nv;
+
+ int nbsol=nv;
+ long longdefault;
+
+ KN<double> valsol(nbsol);
+ valsol=0.;
+ KN<int> takemesh(nbsol);
+ takemesh=0;
+ MeshPoint *mp3(MeshPointStack(stack));
+ for (int it=0;it<nt;it++)
+ {
+ for(int iv=0;iv<4;iv++)
+ {
+ int i=Th(it,iv);
+ mp3->setP(&Th,it,iv);
+ valsol[i] = valsol[i] + GetAny< double >((*evct)(stack));
+ ++takemesh[i];
+ }
+ }
+ for(int i=0; i<nbsol; i++)
+ {
+ valsol[i] /= takemesh[i];
+ }
+
+ //Writes valsol on the file file
+ if (what==1)
+ dx.addscalar(name,&Th,valsol);
+
+ if (what == 2)
+ {
+ KN<double> valsol2(nbsol);
+ valsol2=0.;
+ KN<int> takemesh(nbsol);
+ takemesh=0;
+ MeshPoint *mp3(MeshPointStack(stack));
+ for (int it=0;it<nt;it++)
+ {
+ for(int iv=0;iv<4;iv++)
+ {
+ int i=Th(it,iv);
+ mp3->setP(&Th,it,iv);
+ valsol2[i] = valsol2[i] + GetAny< double >((*evct2)(stack));
+ ++takemesh[i];
+ }
+ }
+ for(int i=0; i<nbsol; i++)
+ {
+ valsol2[i] /= takemesh[i];
+ }
+
+ {
+ KN<double> valsol3(nbsol);
+ valsol3=0.;
+ KN<int> takemesh(nbsol);
+ takemesh=0;
+ MeshPoint *mp3(MeshPointStack(stack));
+ for (int it=0;it<nt;it++)
+ {
+ for(int iv=0;iv<4;iv++)
+ {
+ int i=Th(it,iv);
+ mp3->setP(&Th,it,iv);
+ valsol3[i] = valsol3[i] + GetAny< double >((*evct3)(stack));
+ ++takemesh[i];
+ }
+ }
+ for(int i=0; i<nbsol; i++)
+ {
+ valsol3[i] /= takemesh[i];
+ }
+
+ //Writes valsol on the file file
+ dx.addvector(name,&Th,valsol,valsol2,valsol3);
+
+ }
+
+ }
+
+ return longdefault;
+
+}
+
+
+
+// le vrai constructeur est la
+VtkWriter* init_VtkWriter(VtkWriter * const &a, string * const & s)
+{
+ std::cout << "start init_VtkWriter" << std::endl;
+ a->init();
+ a->openfiles(*s);
+ std::cout << "end init_VtkWriter" << std::endl;
+ return a;
+}
+
+void* call_addmesh( VtkWriter * const & mt, Mesh3* const & pTh) {
+ mt->addmesh(pTh);
+ return NULL;
+}
+
+// Add the function name to the freefem++ table
++<<<<<<< HEAD
+/* class Init
++=======
++class Init
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+public:
+ Init();
+};
+
++<<<<<<< HEAD
+$1 */
+static void Load_Init()
++=======
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ Dcl_Type<VtkWriter*>(InitP<VtkWriter>,Destroy<VtkWriter>); // declare deux nouveau type pour freefem++ un pointeur et
+
+ zzzfff->Add("VtkWriter",atype<VtkWriter*>()); // ajoute le type myType a freefem++
+ // constructeur d'un type myType dans freefem
+ TheOperators->Add("<-", new OneOperator2_<VtkWriter*, VtkWriter* ,string*>(&init_VtkWriter));
+ Global.Add("Vtkaddmesh","(",new OneOperator2_<void *, VtkWriter*, Mesh3*>(call_addmesh));
+ Global.Add("Vtkaddscalar","(",new OneOperatorCode< Vtkwritesol_Op> );
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/addNewType.cpp.orig
index 7626df2,0000000..2995cdd
mode 100644,000000..100644
--- a/examples++-load/addNewType.cpp.orig
+++ b/examples++-load/addNewType.cpp.orig
@@@ -1,81 -1,0 +1,92 @@@
+
+// Example C++ function "CppModTemplate" dynamically loaded into "load.edp"
+// ------------------------------------------------------------------------
+#include "ff++.hpp"
+using namespace Fem2D;
+
+// see src/femlib/RNM.hpp
+
+class myType { public:
+ string * nom;
+ myType(char * nn) { cout << " nn = " << nn << endl; }
+ double x(double u,double v) const { return u+v;}
+ void init() { cout << " init myTpe \n" ; nom =0;} // init des pointeur
+ void destroy() { cout << " destroy de la variable associe \n"; delete nom;nom=0; }
+};
+
+class myType_uv { public:
+ myType * mt;
+ double u,v;
+ myType_uv(myType * mmt,double uu,double vv): mt(mmt),u(uu),v(vv) {}
+};
+
+// le vrai constructeur est la
+myType * init_MyType(myType * const &a, string * const & s)
+{
+ a->nom = new string(* s);
+ cout << " build MyType " << *a->nom << endl;
+ return NULL; // return value never used for now (13.1)
+}
+
+
+myType_uv set_myType_uv( myType * const & mt,const double & u,const double & v)
+{ return myType_uv(mt,u,v);}
+
+double get_myType_uv_x(const myType_uv & muv)
+{
+ return muv.mt->x(muv.u,muv.v);
+}
+
+R3 * get_myType_uv_N(const myType_uv & muv)
+{
+ static R3 r;
+ r=R3(muv.mt->x(muv.u,muv.v),0.,0.);
+ return &r;
+}
+// Add the function name to the freefem++ table
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+static void Load_Init(){
++=======
++class Init { public:
++ Init();
++};
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ Dcl_Type<myType*>(InitP<myType >,Destroy<myType>); // declare deux nouveau type pour freefem++ un pointeur et
+ Dcl_Type<myType_uv>();
+ // Dcl_Type<R3>();
+ // cast d'un ** en *
+ // atype<myType**>()->AddCast( new E_F1_funcT<myType*,myType **>(UnRef<myType*>));
+
+ zzzfff->Add("myType",atype<myType*>()); // ajoute le type myType a freefem++
+ // constructeur d'un type myType dans freefem
+ TheOperators->Add("<-",
+ new OneOperator2_<myType *,myType* ,string*>(&init_MyType));
+ // dans ff++
+ // myType ff("qsdlqdjlqsjdlkq");
+ // ajoute la fonction myType* (u,v) cree le type myType_uv
+ // ff(0.1,0.6).x
+ // deux etapes
+ // 1) ff(u,v) -> myType_uv
+ // ajoute la methode x sur myType_uv ff(u,v).x
+ // ajoute des fonction sur myType_uv
+ // 1)
+
+ atype< myType * >()->Add("(","",new OneOperator3_<myType_uv,myType *,double,double >(set_myType_uv));
+
+ Add<myType_uv>("x",".",new OneOperator1_<double,myType_uv>(get_myType_uv_x) );
+ Add<myType_uv>("N",".",new OneOperator1_<R3*,myType_uv>(get_myType_uv_N) );
+}
+
+
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/bfstream.cpp.orig
index 039d40c,0000000..ce05cdc
mode 100644,000000..100644
--- a/examples++-load/bfstream.cpp.orig
+++ b/examples++-load/bfstream.cpp.orig
@@@ -1,85 -1,0 +1,89 @@@
++<<<<<<< HEAD
+// to compile ff-c++ bstream.cpp
++=======
++// to compile ff-c++ pipe.cpp
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+// warning do not compile under windows...
+#include "ff++.hpp"
+#include <cstdio>
+#include <unistd.h>
+
+template<class T>
+class Stream_b { public:
+ Stream_b(T * ff) :f(ff) {}
+ Stream_b(T ** ff) :f(*ff) {ffassert(f); }
+ Stream_b(const Stream_b &io): f(io.f) {}
+
+ T * f;
+};
+
+template<class T>
+ Stream_b<T> pto_stream_b(T **f){ return Stream_b<T>(f);}
+template<class T>
+Stream_b<T> to_stream_b(T *f){ return Stream_b<T>(f);}
+
+template<class T>
+istream * Read(Stream_b<istream> const & io, T * const & data ) {
+ io.f->read(reinterpret_cast<char *>(data),sizeof(*data));
+ return io.f; }
+
+template<class T>
+istream * Read(Stream_b<istream> const & io, KN<T> * const & data ) {
+ long n;
+ io.f->read(reinterpret_cast<char *>(&n),sizeof(long));
+ cout << " read n =" << n << " " << n*sizeof(sizeof(T)) << " " << endl;
+ if( n != data->N()) data->resize(n);
+ T* p = *data;
+ io.f->read(reinterpret_cast<char *>(p),n*sizeof(T));
+ return io.f; }
+template<class T>
+ostream * Write(Stream_b<ostream> const & io, KN<T> * const & data ) {
+ T* p = *data;
+ long n=data->N();
+ cout << " write n =" << n << " " << n*sizeof(T) << " " << p << endl;
+ io.f->write(reinterpret_cast<const char *>(&n),sizeof(long));
+ io.f->write(reinterpret_cast<const char *>(p),n*sizeof(T));
+ return io.f; }
+
+template<class T>
+ostream * Write(Stream_b<ostream> const & io, T * const & data ) {
+ io.f->write(reinterpret_cast<const char *>(data),sizeof(*data));
+ return io.f; }
+template<class T>
+ostream * Write(Stream_b<ostream> const & io, T const & data ) {
+ io.f->write(reinterpret_cast<const char *>(&data),sizeof(data));
+ return io.f; }
+template <class K>
+void initK()
+{
+ typedef Stream_b<ostream> OB;
+ typedef Stream_b<istream> IB;
+ Add<IB>("(","",new OneOperator2_<istream *,IB,K *>(Read));
+ Add<OB>("(","",new OneOperator2_<ostream *,OB,K *>(Write));
+ Add<OB>("(","",new OneOperator2_<ostream *,OB,K >(Write));
+ Add<IB>("(","",new OneOperator2_<istream *,IB,KN<K> *>(Read));
+ Add<OB>("(","",new OneOperator2_<ostream *,OB,KN<K> * >(Write));
+
+}
+void inittt()
+{
+ typedef Stream_b<ostream> OB;
+ typedef Stream_b<istream> IB;
+ Dcl_Type< OB> ();
+ Dcl_Type< IB> ();
+
+ Add<istream**>("read",".",new OneOperator1<IB,istream**>(pto_stream_b<istream>));
+ Add<ostream**>("write",".",new OneOperator1<OB,ostream**>(pto_stream_b<ostream>));
+ initK<long>();
+ initK<double>();
+ initK<complex<double> >();
+
+/*
+ Add<IB>("(","",new OneOperator2_<istream *,IB,double *>(Read));
+ Add<OB>("(","",new OneOperator2_<ostream *,OB,double *>(Write));
+ Add<OB>("(","",new OneOperator2_<ostream *,OB,double >(Write));
+ */
+
+}
+
+LOADFUNC(inittt);
diff --cc examples++-load/dfft.cpp.orig
index d15fbb6,0000000..4ce81f4
mode 100644,000000..100644
--- a/examples++-load/dfft.cpp.orig
+++ b/examples++-load/dfft.cpp.orig
@@@ -1,270 -1,0 +1,284 @@@
+// Example C++ function "myfunction", dynamically loaded into "ff-c++ dfft.cpp "
+// ---------------------------------------------------------------------
+// $Id$
+
+// for automatic compilation with ff-c++
+//ff-c++-LIBRARY-dep: fftw3
+//ff-c++-cpp-dep:
+//
+#include "ff++.hpp"
+#include "AFunction_ext.hpp"
+#include <fftw3.h>
+
+
+template<class Complex>
+class DFFT_1d2dor3d
+{
+public:
+ Complex * x;
+ int n, m,k;
+ int sign;
+ DFFT_1d2dor3d(KN<Complex> * xx,long signn,long nn=1,long kk=1) : x(*xx),n(nn),m(xx->N()/(nn*kk)),k(kk),sign(signn) {
+ cout << xx << " " << signn << " " << nn << " " << xx->N() << " n: " << n << " m:" << m << " k: " << k <<endl;
+ ffassert(n>0 && (n*m*k ==xx->N()));
+
+ }
+
+
+ DFFT_1d2dor3d(KNM<Complex> * xx,long signn) : x(*xx),n(xx->M()),m(xx->N()),sign(signn) {
+ }
+
+};
+
+DFFT_1d2dor3d<Complex> dfft(KN<Complex> * const & x,const long &sign)
+{
+ return DFFT_1d2dor3d<Complex>(x,sign);
+}
+
+DFFT_1d2dor3d<Complex> dfft(KN<Complex> *const &x,const long &nn,const long &sign)
+{
+ return DFFT_1d2dor3d<Complex>(x,sign,nn);
+}
+DFFT_1d2dor3d<Complex> dfft(KN<Complex> *const &x,const long &nn,const long &kk,const long &sign)
+{
+ return DFFT_1d2dor3d<Complex>(x,sign,nn,kk);
+}
+
+DFFT_1d2dor3d<Complex> dfft(KNM<Complex> * const & x,const long &sign)
+{
+ return DFFT_1d2dor3d<Complex>(x,sign);
+}
+bool ff_execute(fftw_plan *p)
+{
+ if(*p) fftw_execute(*p);
+ return 0;
+}
+
+bool ff_delete(fftw_plan *p)
+{
+ if(*p) fftw_destroy_plan(*p);
+ *p =0;
+ return 0;
+}
+
+KN<Complex> * dfft_eq( KN<Complex> * const &x,const DFFT_1d2dor3d<Complex> & d)
+{
+ ffassert(x->N()==d.n*d.m*d.k );
+ Complex *px = *x;
+ fftw_plan p;
+ //cout << " dfft " << px << " = " << d.x << " n = " << d.n << " " << d.m << " sign = " << d.sign << endl;
+ if ( d.k ==1)
+ {
+ if ( d.n > 1)
+ p = fftw_plan_dft_2d(d.n,d.m,reinterpret_cast<fftw_complex*>(d.x),reinterpret_cast<fftw_complex*> (px),d.sign,FFTW_ESTIMATE);
+ else
+ p = fftw_plan_dft_1d(d.m ,reinterpret_cast<fftw_complex*>(d.x),reinterpret_cast<fftw_complex*> (px),d.sign,FFTW_ESTIMATE);
+ }
+ else
+ {
+ if ( d.n > 1)
+ p = fftw_plan_dft_3d(d.n,d.m,d.k,reinterpret_cast<fftw_complex*>(d.x),reinterpret_cast<fftw_complex*> (px),d.sign,FFTW_ESTIMATE);
+ else
+ p = fftw_plan_dft_2d(d.m,d.k,reinterpret_cast<fftw_complex*>(d.x),reinterpret_cast<fftw_complex*> (px),d.sign,FFTW_ESTIMATE);
+
+ }
+ // cout << " ---" ;
+ fftw_execute(p);
+ // cout << " ---" ;
+ fftw_destroy_plan(p);
+ // cout << " ---" ;
+ return x;
+}
+
+
+KN<double> * dfft_eq( KN<double> * const &x,const DFFT_1d2dor3d<double> & d)
+{
+ ffassert(0);
+ return x;
+}
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+ };*/
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+// bofbof ..
+struct fftw_plan_s {};
+// ...
+
+template<> inline AnyType DeletePtr<fftw_plan*>(Stack,const AnyType &x) {
+ fftw_plan * a=PGetAny<fftw_plan>(x);
+ if(*a) fftw_destroy_plan(*a);
+ *a =0;
+ return Nothing;
+};
+
+fftw_plan* plan__eq( fftw_plan* a, fftw_plan b)
+{
+ if(*a) fftw_destroy_plan(*a);
+ *a=b;
+ return a;
+}
+fftw_plan* plan_set( fftw_plan* a, fftw_plan b)
+{
+ // if(*a) fftw_destroy_plan(*a);
+ *a=b;
+ return a;
+}
+
+fftw_plan plan_dfft(KN<Complex> * const & x,KN<Complex> * const & y,const long &sign)
+{
+ return fftw_plan_dft_1d(x->N() ,reinterpret_cast<fftw_complex*>(&x[0]),reinterpret_cast<fftw_complex*> (&y[0]),sign,FFTW_ESTIMATE);
+}
+fftw_plan plan_dfft(KNM<Complex> * const & x,KNM<Complex> * const & y,const long &sign)
+{
+ long m=x->N(), n=x->M();
+ fftw_plan_dft_2d(n,m,reinterpret_cast<fftw_complex*>(&x[0]),reinterpret_cast<fftw_complex*> (&y[0]),sign,FFTW_ESTIMATE);
+ return 0;
+}
+
+fftw_plan plan_dfft(KN<Complex> * const & x,KN<Complex> * const & y,const long &n,const long &sign)
+{
+ long nn=n, mm=y->N()/nn; ffassert( mm*nn == y->N() && x->N() == y->N() );
+ return fftw_plan_dft_2d(nn,mm,reinterpret_cast<fftw_complex*>(&x[0]),reinterpret_cast<fftw_complex*> (&y[0]),sign,FFTW_ESTIMATE);
+
+}
+
+fftw_plan plan_dfft(KN<Complex> * const & x,KN<Complex> * const & y,const long &n,const long &k,const long &sign)
+{
+ int nn=n, mm= y->N()/(k*n), kk= k;
+ ffassert(y->N() == nn*mm*kk) ;
+ if( nn >1)
+ return fftw_plan_dft_3d(nn,mm,kk, reinterpret_cast<fftw_complex*>(&x[0]),reinterpret_cast<fftw_complex*> (&y[0]),sign,FFTW_ESTIMATE);
+ else
+ return fftw_plan_dft_2d(nn,mm,reinterpret_cast<fftw_complex*>(&x[0]),reinterpret_cast<fftw_complex*> (&y[0]),sign,FFTW_ESTIMATE);
+}
+
+
+
+class Mapkk : public E_F0mps
+{
+
+public:
+ typedef Complex R;
+ typedef KN_<R> Result;
+ ;
+ static basicAC_F0::name_and_type name_param[] ;
+ static const int n_name_param =0;
+ Expression nargs[n_name_param];
+ Expression expv, expm,exp;
+
+ Mapkk(const basicAC_F0 & args)
+ : expv(0), expm(0),exp(0)
+ {
+ args.SetNameParam(n_name_param,name_param,nargs);
+ expv= to<KN<R>*>(args[0]); // a the expression to get the mesh
+ expm= to<long>(args[1]);
+ exp= to<R>(args[2]);// a the expression to get the mesh
+
+ }
+
+ ~Mapkk()
+ {
+ }
+
+ static ArrayOfaType typeargs()
+ { return ArrayOfaType(
+ atype<KN<R> *>(),
+ atype<long >(),
+ atype<R >()
+ );
+ }
+ static E_F0 * f(const basicAC_F0 & args){ return new Mapkk(args);}
+ AnyType operator()(Stack s) const ;
+
+};
+
+basicAC_F0::name_and_type Mapkk::name_param[]={};
+
+AnyType Mapkk::operator()(Stack s) const
+{
+ MeshPoint *mp(MeshPointStack(s)) , mps=*mp;
+ KN<R> * pv=GetAny<KN<R> *>((*expv)(s));
+ KN<R> v(*pv);
+
+ long nn = v.N();
+ long m = GetAny<long>((*expm)(s));
+ cout << " expm " << expm << " m = " << m << endl;
+ long n = nn/m;
+ double ki = 1./n ;
+ double kj = 1./m ;
+ double ki0=0., kj0=0;
+ cout << n << " " << m << " " << nn << " == " << n*m << endl;
+ ffassert( m* n == nn );
+ long n2= (n+1)/2, m2=(m+1)/2;
+ for(long k=0,i=0;i < n; ++i)
+ for(long j=0;j < m; ++j,++k)
+ {//
+ int ii=i, jj=j;
+ if( ii > n2) ii=i-n;
+ if( jj > m2) jj=j-n;
+ R2 P(i*ki+ki0 ,j*kj+kj0);
+ mp->set(P.x,P.y);
+ v[k] = GetAny< R>((*exp)(s));
+ }
+ *mp = mps;
+ return 0L;
+}
+
++<<<<<<< HEAD
+
+static void Load_Init(){
++=======
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ typedef DFFT_1d2dor3d<Complex> DFFT_C;
+ typedef DFFT_1d2dor3d<double> DFFT_R;
+
+ cout << " lood: init dfft " << endl;
+ Dcl_Type<DFFT_C >();
+ Dcl_Type<DFFT_R >();
+
+ // cout << typeid(fftw_plan).name() << endl;
+ Dcl_Type<fftw_plan*>(::InitializePtr<fftw_plan*>,::DeletePtr<fftw_plan*>);
+ Dcl_Type<fftw_plan>();
+ zzzfff->Add("fftwplan",atype<fftw_plan * >());
+
+ TheOperators->Add("=", new OneOperator2<fftw_plan *,fftw_plan *,fftw_plan>(plan__eq));
+ TheOperators->Add("<-", new OneOperator2<fftw_plan *,fftw_plan *,fftw_plan>(plan_set));
+
+ Global.Add("plandfft","(", new OneOperator3_<fftw_plan,KN<Complex>*,KN<Complex>*,long >(plan_dfft ));
+ Global.Add("plandfft","(", new OneOperator4_<fftw_plan,KN<Complex>*,KN<Complex>*,long,long >(plan_dfft ));
+ Global.Add("plandfft","(", new OneOperator5_<fftw_plan,KN<Complex>*,KN<Complex>*,long,long,long >(plan_dfft ));
+ Global.Add("plandfft","(", new OneOperator3_<fftw_plan,KNM<Complex>*,KNM<Complex>*,long >(plan_dfft ));
+
+
+ Global.Add("execute","(", new OneOperator1<bool,fftw_plan*>(ff_execute));
+ Global.Add("delete","(", new OneOperator1<bool,fftw_plan*>(ff_delete));
+
+
+ Global.Add("dfft","(", new OneOperator2_<DFFT_C,KN<Complex>*,long >(dfft ));
+ Global.Add("dfft","(", new OneOperator3_<DFFT_C,KN<Complex>*,long,long >(dfft ));
+ Global.Add("dfft","(", new OneOperator4_<DFFT_C,KN<Complex>*,long,long, long >(dfft ));
+ Global.Add("dfft","(", new OneOperator2_<DFFT_C,KNM<Complex>*,long >(dfft ));
+ Global.Add("map","(", new OneOperatorCode<Mapkk>( ));
+ TheOperators->Add("=", new OneOperator2_<KN<Complex>*,KN<Complex>*,DFFT_C>(dfft_eq));
+ /*
+ Global.Add("dfft","(", new OneOperator2_<DFFT_R,KN<double>*,long >(dfft ));
+ Global.Add("dfft","(", new OneOperator3_<DFFT_R,KN<double>*,long,long >(dfft ));
+ Global.Add("dfft","(", new OneOperator4_<DFFT_R,KN<double>*,long,long, long >(dfft ));
+ Global.Add("dfft","(", new OneOperator2_<DFFT_R,KNM<double>*,long >(dfft ));
+ TheOperators->Add("=", new OneOperator2_<KN<double>*,KN<double>*,DFFT_R>(dfft_eq));
+ */
+ // TheOperators->Add("=", new OneOperator2_<KNM<Complex>*,KNM<Complex>*,DFFT_1d2dor3d>(dfft_eq));
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/ff-Ipopt.cpp.orig
index a8955ab,0000000..6ed8dd7
mode 100644,000000..100644
--- a/examples++-load/ff-Ipopt.cpp.orig
+++ b/examples++-load/ff-Ipopt.cpp.orig
@@@ -1,1747 -1,0 +1,1759 @@@
+/*
+ * ff-NLopt.cpp
+ *
+ *
+ * Created by Sylvain Auliac on 17/01/12.
+ *
+ */
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+//ff-c++-LIBRARY-dep: Ipopt mumps-seq blas libseq fc
+
+//using namespace std;
+#include "IpTNLP.hpp"
+#include "IpIpoptApplication.hpp"
+#include "ff++.hpp"
+
+
+
+extern Block *currentblock;
+
+typedef double R;
+typedef KN_<R> Rn_;
+typedef KN<R> Rn;
+typedef KNM_<R> Rnm_;
+typedef KNM<R> Rnm;
+
+
+
+
+
+/*****************************************************************************************************************************
+ * Some misc. function usefull later...
+ *****************************************************************************************************************************/
+
+//A variadic function to add an undefinite number of elements to a set of short int
+//This is used to define the set of named parameter which are not used when some assumptions
+//upon the optimization poblem functions are met
+void AddElements(std::set<unsigned short> &_set,int amount,int first,...)
+{
+ int elem=0;
+ va_list vl;
+ va_start(vl,first);
+ _set.insert(first);
+ for (int i=1;i<amount;i++)
+ {
+ elem=va_arg(vl,int);
+ _set.insert(elem);
+
+ }
+ va_end(vl);
+
+}
+
+//A raw pointer cleaner
+template<class T> inline void clean(T *p) {if(p) {delete p; p=0;} }
+
+//Pair compare (certainly already implemented in the STL with KeyLess...)
+inline bool operator<=(const std::pair<int,int> &l,const std::pair<int,int> &r) {return (l.first < r.first) || (l.first==r.first && l.second <= r.second);}
+
+//Some logical operators (exclussive or and its negation)
+inline bool XOR(bool a,bool b) {return (!a && b) || (a && !b);}
+inline bool NXOR(bool a,bool b) {return !XOR(a,b);}
+
+//A debug tool
+#ifdef DEBUG
+inline void SONDE() {static int i=1; cout << "SONDE " << i << endl; ++i;}
+#else
+inline void SONDE() {}
+#endif
+
+
+
+
+
+/*****************************************************************************************************************************
+ * FreeFem function callers
+ * ffcalfunc : template abstract mother class with a pointer to the freefem stack and the J virtual method which computes
+ * the function
+ *****************************************************************************************************************************/
+template<class K> class ffcalfunc
+{
+public:
+ Stack stack;
+ ffcalfunc(const ffcalfunc &f) : stack(f.stack) {}
+ ffcalfunc(Stack _stack) : stack(_stack) {}
+ virtual K J(Rn_) const = 0;
+ virtual ~ffcalfunc() {}
+};
+
+
+/*****************************************************************************************************************************
+ * GeneralFunc : Most general case (specialized for sparse matrix returning functions, because IPOPT need the hessian func
+ * to take some additional parameters).
+ * @theparame: ff expression of the parameter of the ff function, computing J(x) need the associated KN to be set to the
+ * values of x
+ * @JJ : ff expression of the function
+ *****************************************************************************************************************************/
+template<class K> class GeneralFunc : public ffcalfunc<K>
+{
+public:
+ Expression JJ,theparame;
+ GeneralFunc(const GeneralFunc &f) : ffcalfunc<K>(f),JJ(f.JJ),theparame(f.theparame) {}
+ GeneralFunc(Stack s,Expression JJJ,Expression epar) : ffcalfunc<K>(s),JJ(JJJ), theparame(epar) {}
+ K J(Rn_ x) const
+ {
+ KN<double> *p=GetAny<KN<double> *>( (*theparame)(this->stack) );
+ *p=x;
+ K ret= GetAny<K>( (*JJ)(this->stack) );
+ //cout << "call to ffcalfunc.J with " << *p << " and ret=" << ret << endl;
+ WhereStackOfPtr2Free(this->stack)->clean();
+ return ret;
+ }
+};
+
+/*****************************************************************************************************************************
+ * P2ScalarFunc: encapsulate a function which is the sum of a bilinear and a linear form (no constant part since it will be
+ * used as fitness function). It also handles the case of pure quadratic or linear forms.
+ * @vf : If true J will compute 0.5xMx - bx (x is the solution of Mx = b in the unconstrained optimization process)
+ * if false xMx + bx is returned
+ * @M : FF expression of the matrix of the bilinear form (null pointer for linear form case)
+ * @b : FF expression of the vector representation of the linear part (null for pure quadratic case)
+ *****************************************************************************************************************************/
+class P2ScalarFunc : public ffcalfunc<R>
+{
+public:
+ const bool vf;
+ Expression M,b; //Matrix of the quadratic part, vector of the linear part
+ P2ScalarFunc(const P2ScalarFunc &f) : ffcalfunc<R>(f),M(f.M),b(f.b),vf(f.vf) {}
+ P2ScalarFunc(Stack s,Expression _M,Expression _b,bool _vf=false) : ffcalfunc<R>(s),M(_M),b(_b),vf(_vf) {}
+ R J(Rn_ x) const
+ {
+ Rn tmp(x.N(),0.);
+ if(M)
+ {
+ Matrice_Creuse<R> * a = GetAny<Matrice_Creuse<R> *>( (*M)(stack) );
+ MatriceMorse<R> *A = dynamic_cast<MatriceMorse<R> *>(&(*a->A));
+ assert(A);
+ tmp = (*A)*x;
+ if(vf) tmp/=2.;
+ }
+ if(b)
+ {
+ Rn *B = GetAny<Rn*>( (*b)(stack) );
+ tmp += *B;
+ //if(vf) tmp -= (*B); else tmp += (*B);
+ }
+ R res=0.;
+ for(int i=0;i<x.N();++i) res += x[i]*tmp[i];
+ return res;
+ }
+};
+
+/*****************************************************************************************************************************
+ * P1VectorFunc: encapsulate a function which is the sum of a linear part and a constant, mostly used for affine/linear
+ * constraints, or for P2 fitness function gradient
+ * @vf : Set to true if this is expected the gradient of a P2 scalar function associated to Ax=b linear system
+ * J will then return Ax - b. Otherwize Ax+b is returned.
+ * @M : FF expression of the matrix of the linear part
+ * @b : FF expression of the vector representation of the constant part
+ *****************************************************************************************************************************/
+class P1VectorFunc : public ffcalfunc<Rn>
+{
+public:
+ const bool vf;
+ Expression M,b;
+ P1VectorFunc(const P1VectorFunc &f) : ffcalfunc<Rn>(f),M(f.M),b(f.b),vf(f.vf) {}
+ P1VectorFunc(Stack s,Expression _M,Expression _b,bool _vf=false) : ffcalfunc<Rn>(s),M(_M),b(_b),vf(_vf) {}
+ Rn J(Rn_ x) const
+ {
+ Rn tmp(0);
+ if(M)
+ {
+ Matrice_Creuse<R> * a = GetAny<Matrice_Creuse<R> *>( (*M)(stack) );
+ MatriceMorse<R> *A = dynamic_cast<MatriceMorse<R> *>(&(*a->A));
+ assert(A);
+ if(tmp.N() != A->n) {tmp.resize(A->n); tmp=0.;}
+ tmp = (*A)*x;
+ }
+ if(b)
+ {
+ Rn* B = GetAny<Rn *>( (*b)(stack) );
+ if(tmp.N() != B->N()) {tmp.resize(B->N()); tmp=0.;}
+ tmp += *B;
+ //if(vf) tmp -= (*B); else tmp += (*B);
+ }
+ return tmp;
+ }
+};
+
+
+
+/*****************************************************************************************************************************
+ * ffcalfunc<Matrice_Creuse>R>*>: specialization for sparse matrix returning function. When it encapsulates the hessian
+ * function of the lagragian, non-linear constraints will need the additional obj_factor and lagrange multiplier
+ * parameters. The one parameter version of J is called if there is no non-linear constraints or if the objects
+ * represents the jacobian of the constraints.
+ *****************************************************************************************************************************/
+template<> class ffcalfunc<Matrice_Creuse<R> *>
+{
+public:
+ typedef Matrice_Creuse<R> *K;
+ Stack stack;
+ ffcalfunc(const ffcalfunc &f) : stack(f.stack) {}
+ ffcalfunc(Stack s) : stack(s) {}
+ virtual K J(Rn_) const = 0;
+ virtual K J(Rn_,double,Rn_) const = 0;
+ virtual bool NLCHPEnabled() const = 0; //Non Linear Constraints Hessian Prototype
+ virtual ~ffcalfunc(){}
+
+};
+
+/*****************************************************************************************************************************
+ * GeneralSparseMatFunc: general case of sparse matrix returning function. Members datas added are ff expression of the
+ * scalar objective factor and vectorial lagrange multipliers.
+ *****************************************************************************************************************************/
+class GeneralSparseMatFunc : public ffcalfunc<Matrice_Creuse<R> *>
+{
+private:
+ typedef ffcalfunc<Matrice_Creuse<R> *> FFF;
+public:
+ Expression JJ,param,paramlm,paramof;
+ GeneralSparseMatFunc(const GeneralSparseMatFunc &f) : FFF(f),JJ(f.JJ),param(f.param),paramlm(f.paramlm),paramof(f.paramof) {};
+ GeneralSparseMatFunc(Stack s,Expression JJJ,Expression epar,Expression eparof=0,Expression eparlm=0)
+ : FFF(s),JJ(JJJ),param(epar),paramlm(eparlm),paramof(eparof)
+ {ffassert(NXOR(paramlm,paramof));}
+ bool NLCHPEnabled() const {return paramlm && paramof;}
+ K J(Rn_ x) const
+ {
+ KN<double> *p=GetAny<KN<double> *>( (*param)(stack) );
+ *p=x;
+ K ret= GetAny<K>( (*JJ)(stack));
+ //cout << "call to ffcalfunc.J with " << *p << " and ret=" << ret << endl;
+ WhereStackOfPtr2Free(stack)->clean();
+ return ret;
+ }
+ K J(Rn_ x,double of,Rn_ lm) const
+ {
+ if(paramlm && paramof)
+ {
+ KN<double> *p=GetAny<KN<double> *>( (*param)(stack) );
+ double *pof=GetAny<double *>( (*paramof)(stack) );
+ KN<double > *plm=GetAny<KN<double> *>( (*paramlm)(stack) );
+ *p=x;
+ *pof=of;
+ int m= lm.N(), mm=plm->N();
+ if( (m != mm) && mm) {cout << " ff-ipopt H : big bug int size ???"<< m << " != " << mm << endl; abort();};
+ *plm=lm;
+ K ret= GetAny<K>( (*JJ)(stack));
+ //cout << "call to ffcalfunc.J with " << *p << " and ret=" << ret << endl;
+ WhereStackOfPtr2Free(stack)->clean();
+ return ret;
+ }
+ else return J(x);
+ }
+};
+
+/*****************************************************************************************************************************
+ * ConstantSparseMatFunc: Encapsulate a constant matrix returning function. Just contains the ff expression of the matrix
+ * (and stack inherited from mother class), this matrix is returned regardless of x.
+ *****************************************************************************************************************************/
+class ConstantSparseMatFunc : public ffcalfunc<Matrice_Creuse<R> *>
+{
+private:
+ typedef ffcalfunc<Matrice_Creuse<R> *> FFF;
+public:
+ Expression M; //Expression of the matrix
+ ConstantSparseMatFunc(const ConstantSparseMatFunc &f) : FFF(f),M(f.M) {}
+ ConstantSparseMatFunc(Stack s,Expression _M) : FFF(s),M(_M) {}
+ bool NLCHPEnabled() const {return false;}
+ K J(Rn_) const
+ {
+ K ret = M ? GetAny<K>( (*M)(stack) ) : 0;
+ WhereStackOfPtr2Free(stack)->clean();
+ return ret;
+ }
+ K J(Rn_ x,double,Rn_) const {return J(x);}
+};
+
+
+
+typedef ffcalfunc<double> ScalarFunc;
+typedef ffcalfunc<Rn> VectorFunc;
+typedef ffcalfunc<Rnm> FullMatrixFunc;
+typedef ffcalfunc<Matrice_Creuse<R>* > SparseMatFunc;
+
+
+
+
+
+/*****************************************************************************************************************************
+ * SparseMatStructure: a class for sparse matrix structure management (mostly merging). The most interesting methods in this
+ * class are :
+ * AddMatrix : merge the structure of the given matrix to the structure of current object
+ * AddArrays : merge structure in arrays form to the current object
+ * ToKn : allocate the raws and cols pointers and fill them with the std::set<Z2> form of the structure
+ * structure is then emptied if this method is passed a true value
+ * ==> update 28/03/2012, autostruct proved useless since the structure merging can be done with operator +
+ * (I did not no whether nullify coefficients where removed from the result but it actually doesn't so the structure of
+ * the lagrangian hessian can be guessed exactly by evaluating on a point yeilding the biggest fitness function
+ * hessian along with a dual vector filled with 1).
+ *****************************************************************************************************************************/
+class SparseMatStructure
+{
+public:
+ typedef std::pair<int,int> Z2;
+ typedef std::set<Z2> Structure;
+ typedef std::pair<KN<int>,KN<int> > Zn2;
+ typedef Structure::const_iterator const_iterator;
+ typedef Structure::iterator iterator;
+
+ SparseMatStructure(bool _sym=0) : structure(),sym(_sym),n(0),m(0),raws(0),cols(0) {}
+ SparseMatStructure(Matrice_Creuse<R> const * const M,bool _sym=0) : structure(),sym(_sym),n(M->N()),m(M->M()),raws(0),cols(0) {this->AddMatrix(M);}
+ template<class INT> SparseMatStructure(const KN<INT> &I,const KN<INT> &J,bool _sym=0) : structure(),sym(_sym),n(I.max()),m(J.max()),raws(0),cols(0) {this->AddArrays(I,J);}
+ ~SparseMatStructure() {if(raws) delete raws; if(cols) delete cols;}
+
+ const_iterator begin() const {return structure.begin();}
+ iterator begin() {return structure.begin();}
+ const_iterator end() const {return structure.end();}
+ iterator end() {return structure.end();}
+ //Structure& operator()() {return structure;}
+ //const Structure& operator()() const {return structure;}
+ bool empty() const {return structure.empty() && !raws && !cols;}
+ int N() const {return n;}
+ int M() const {return m;}
+
+ SparseMatStructure& clear() {structure.clear(); if(raws) delete raws; if(cols) delete cols; sym=false; n=0; m=0; return *this;}
+ int size() const {return structure.size() ? structure.size() : (raws ? raws->N() : 0);}
+ SparseMatStructure& AddMatrix(Matrice_Creuse<R> const * const);
+ template<class INT> SparseMatStructure& AddArrays(const KN<INT> &,const KN<INT> &);
+ SparseMatStructure& ToKn(bool emptystruct=false);
+
+
+ KN<int> & Raws() {return *raws;}
+ KN<int> const & Raws() const {return *raws;}
+ KN<int> & Cols() {return *cols;}
+ KN<int> const & Cols() const {return *cols;}
+
+private:
+ int n,m;
+ Structure structure;
+ bool sym;
+ //Zn2 *array_structure;
+ KN<int> *raws,*cols;
+};
+
+SparseMatStructure& SparseMatStructure::ToKn(bool emptystruct)
+{
+ if(raws) delete raws;
+ if(cols) delete cols;
+ raws = new KN<int>(structure.size());
+ cols = new KN<int>(structure.size());
+ int k=0;
+ for(const_iterator i=begin();i!=end();++i) {(*raws)[k]=i->first; (*cols)[k]=i->second; ++k;}
+ if(emptystruct) structure.clear();
+ return *this;
+}
+
+SparseMatStructure& SparseMatStructure::AddMatrix(Matrice_Creuse<R> const * const _M)
+{
+ n = n > _M->N() ? n : _M->N();
+ m = m > _M->M() ? m : _M->M();
+ MatriceMorse<R> const * const M = dynamic_cast<MatriceMorse<R> const * const> (&(*_M->A));
+ if( !M ) {
+ cerr << " Err= "<< " Matrix is not morse or CSR "<< &(*_M->A) << endl;
+ ffassert(M);
+ }
+ {
+ if(!sym || (sym && M->symetrique))
+ {
+ for(int i=0;i < M->N;++i)
+ {
+ for(int k=M->lg[i]; k < M->lg[i+1]; ++k) structure.insert(Z2(i,M->cl[k]));
+ }
+ }
+ else // sym && !M->symetrique
+ {
+ for(int i=0;i<M->N;++i)
+ {
+ for(int k=M->lg[i]; k < M->lg[i+1]; ++k) if(i >= M->cl[k]) structure.insert(Z2(i,M->cl[k]));
+ }
+ }
+ }
+ return *this;
+}
+template<class INT> SparseMatStructure& SparseMatStructure::AddArrays(const KN<INT> &I,const KN<INT> &J)
+{
+ ffassert(I.N()==J.N());
+ n = n > I.max()+1 ? n : I.max()+1;
+ m = m > J.max()+1 ? m : J.max()+1;
+ if(!sym) for(int k=0;k<I.N();++k) structure.insert(Z2(I[k],J[k]));
+ else for(int k=0;k<I.N();++k) if(I[k]>=J[k]) structure.insert(Z2(I[k],J[k]));
+ return *this;
+}
+
+
+
+
+
+/*****************************************************************************************************************************
+ * ffNLP : Derived from the TNLP non-linear problem wrapper class of Ipopt. Virtual methods are defined as explain in
+ * the IPOPT documentation. Some of them are tricky because the sparse matrix format in freefem is CRS, whereas
+ * IPOPT use COO storage.
+ * It is even more tricky because most of time, FreeFem will remove null coefficient from the structure, leading to
+ * non constant indexing of the coefficient through the algorithm in case of very non linear functions. As IPOPT need
+ * a constant structure, a FindIndex method involving a dichotomic search has been implemented to prevent the errors
+ * related to that.
+ *****************************************************************************************************************************/
+using namespace Ipopt;
+
+class ffNLP : public TNLP
+{
+public:
+ ffNLP() : xstart(0) {}
+ ffNLP(Rn &,const Rn &,const Rn &,const Rn &,const Rn &,ScalarFunc*, VectorFunc*, SparseMatFunc*, VectorFunc*, SparseMatFunc*);
+ ffNLP(Rn &,const Rn &,const Rn &,const Rn &,const Rn &,ScalarFunc*, VectorFunc*, SparseMatFunc*, VectorFunc*, SparseMatFunc*, int ,int ,int);
+ virtual ~ffNLP();
+
+ bool get_nlp_info(Index&, Index&, Index&, Index&, IndexStyleEnum&); //the IPOPT methods
+ bool get_bounds_info(Index, Number*, Number*, Index, Number*, Number*);
+ bool get_starting_point(Index, bool, Number*,bool , Number* , Number*,Index , bool ,Number* );
+ bool eval_f(Index, const Number*, bool, Number&);
+ bool eval_grad_f(Index, const Number*, bool, Number*);
+ bool eval_g(Index, const Number*, bool, Index, Number*);
+ bool eval_jac_g(Index, const Number*, bool,Index, Index, Index*, Index *,Number*);
+ bool eval_h(Index, const Number*, bool ,Number , Index , const Number*,bool, Index, Index*,Index*, Number*);
+ void finalize_solution(SolverReturn, Index, const Number*, const Number*, const Number*, Index, const Number*, const Number*, Number,
+ const IpoptData* ip_data,
+ IpoptCalculatedQuantities* ip_cq);
+
+ template<class INT> ffNLP& SetHessianStructure(const KN<INT> &,const KN<INT> &,bool reset=0);
+ template<class INT> ffNLP& SetJacobianStructure(const KN<INT> &,const KN<INT> &,bool reset=0);
+ enum Level {do_nothing,user_defined, one_evaluation, basis_analysis};
+ ffNLP& BuildMatrixStructures(Level,Level,int);
+ ffNLP& EnableCheckStruct() {checkstruct=true; return *this;}
+ ffNLP& DisableCheckStruct() {checkstruct=false; return *this;}
+
+ Rn lambda_start,x_start,uz_start,lz_start;
+ double sigma_start;
+
+ double final_value;
+private:
+ //algorithm datas
+ Rn *xstart,xl,xu,gl,gu;
+ ScalarFunc *fitness; //Pointers to functions wrappers
+ VectorFunc *dfitness,*constraints;
+ SparseMatFunc *hessian,*dconstraints;
+ int mm,nnz_jac,nnz_h; //duplicated datas? did not seems to be reachable in the base class
+ //bool sym;
+ bool checkstruct;
+ SparseMatStructure HesStruct,JacStruct;
+
+ //some static functions...
+ template<class A,class B> static void KnToPtr(const KN<A> &a,B *b) {for(int i=0;i<a.N();++i) b[i]=a[i];} //Fill a pointer with a KN
+ template<class A,class B> static void KnFromPtr(KN<A> &a,B const *b) {for(int i=0;i<a.N();++i) a[i]=b[i];}//Fill a KN with a pointer <-- to avoid the use of const_cast
+ static int FindIndex(const KN<int> &irow,const KN<int> & jrow,int i,int j,int kmin,int kmax);
+};
+
+
+ffNLP::ffNLP(Rn &x,const Rn &_xl,const Rn &_xu,const Rn &_gl,const Rn &_gu,ScalarFunc * _fitness,VectorFunc * _dfitness,SparseMatFunc * _hessian,
+ VectorFunc * _constraints,SparseMatFunc * _dconstraints) :
+xstart(&x), xl(_xl), xu(_xu), gl(_gl), gu(_gu),final_value(299792458.),//sym(0),unsymind(),
+fitness(_fitness), dfitness(_dfitness), constraints(_constraints),uz_start(),lz_start(),
+hessian(_hessian), dconstraints(_dconstraints),mm(-1),nnz_jac(-1),nnz_h(-1),
+HesStruct(true),JacStruct(false),sigma_start(1.),lambda_start(),x_start(x),checkstruct(1) {}
+
+
+ffNLP::ffNLP(Rn &x,const Rn &_xl,const Rn &_xu,const Rn &_gl,const Rn &_gu,ScalarFunc * _fitness,VectorFunc * _dfitness,SparseMatFunc * _hessian,
+ VectorFunc * _constraints,SparseMatFunc * _dconstraints, int _mm,int _nnz_jac,int _nnz_h) :
+xstart(&x), xl(_xl), xu(_xu), gl(_gl), gu(_gu),hessian(_hessian),final_value(299792458.),//sym(0),unsymind(),
+fitness(_fitness),dfitness(_dfitness),constraints(_constraints),dconstraints(_dconstraints),uz_start(),lz_start(),
+mm(_mm),nnz_jac(_nnz_jac),nnz_h(_nnz_h),HesStruct(true),JacStruct(false),sigma_start(1.),lambda_start(),x_start(x),checkstruct(1) {}
+
+ffNLP::~ffNLP()
+{
+ /*
+ clean(fitness);
+ clean(dfitness);
+ clean(constraints);
+ clean(hessian);
+ clean(dconstraints);
+ */
+}
+
+template<class INT> ffNLP& ffNLP::SetHessianStructure(const KN<INT> &I,const KN<INT> &J,bool reset)
+{
+ if(reset) HesStruct.clear();
+ HesStruct.AddArrays(I,J);
+ return *this;
+}
+template<class INT> ffNLP& ffNLP::SetJacobianStructure(const KN<INT> &I,const KN<INT> &J,bool reset)
+{
+ if(reset) JacStruct.clear();
+ JacStruct.AddArrays(I,J);
+ return *this;
+}
+ffNLP& ffNLP::BuildMatrixStructures(Level hlvl, Level jlvl,int _mm)
+{
+ if(jlvl!=do_nothing && dconstraints)
+ {
+ if(jlvl==user_defined) ffassert(JacStruct.size());
+ else if((jlvl==one_evaluation || jlvl==basis_analysis) && dconstraints) JacStruct.AddMatrix(dconstraints->J(x_start));
+ }
+ if(hlvl!=do_nothing && hessian)
+ {
+ if(hlvl==user_defined) ffassert(HesStruct.size());
+ else if(hlvl==one_evaluation || !hessian->NLCHPEnabled() )
+ {
+ Rn lms=lambda_start;
+ lms=1.;
+ HesStruct.AddMatrix(hessian->J(x_start,sigma_start,lms));
+ }
+ else if(hlvl==basis_analysis)
+ {
+ {
+ Rn lambda(_mm,0.);
+ HesStruct.AddMatrix(hessian->J(x_start,1.,lambda));
+ }
+ for(int i=0;i<_mm;++i)
+ {
+ Rn lambda(_mm,0.);
+ lambda[i] = 1.;
+ HesStruct.AddMatrix(hessian->J(x_start,0.,lambda));
+ lambda[i] = 0.;
+ }
+ }
+ }
+ JacStruct.ToKn();
+ HesStruct.ToKn();
+ return *this;
+}
+int ffNLP::FindIndex(const KN<int> &irow,const KN<int> &jcol,int i,int j,int kmin,int kmax)
+{
+ //cout << "Trying to find (" << i << ',' << j << ") in :" << irow << jcol << " - kmin=" << kmin << " and kmax=" << kmax << endl;
+ typedef std::pair<int,int> Z2;
+ Z2 ij(i,j),ijmin(irow[kmin],jcol[kmin]),ijmax(irow[kmax],jcol[kmax]);
+ if(abs(kmin-kmax)<=1)
+ {
+ if(ij==ijmin) return kmin;
+ else if(ij==ijmax) return kmax;
+ else return -1;
+ }
+ else
+ {
+ int knew = (kmin + kmax) / 2;
+ Z2 ijnew(irow[knew],jcol[knew]);
+ if(ij <= ijnew) return FindIndex(irow,jcol,i,j,kmin,knew);
+ else return FindIndex(irow,jcol,i,j,knew,kmax);
+ }
+}
+
+
+bool ffNLP::get_nlp_info(Index& n, Index& m, Index& nnz_jac_g,Index& nnz_h_lag, IndexStyleEnum& index_style)
+{
+ bool ret=true;
+ n = xstart ? xstart->N() : (ret=0);
+ //set(m,mm,constraints,xstart,ret);
+ //set(nnz_jac_g,nnz_jac,dconstraints,xstart,ret);
+ //set(nnz_h_lag,nnz_h,hessian,xstart,ret);
+ //if(JacStruct.empty() && constraints) BuildMatrixStructures(do_nothing,one_evaluation);
+ //if(HesStruct.empty()) BuildMatrixStructures(one_evaluation,do_nothing);
+ mm = m = constraints ? JacStruct.N() : 0;
+ nnz_jac = nnz_jac_g = constraints ? JacStruct.size() : 0;
+ nnz_h = nnz_h_lag = HesStruct.size();
+ index_style = TNLP::C_STYLE;
+ return ret;
+}
+
+bool ffNLP::get_bounds_info(Index n, Number* x_l, Number* x_u, Index m, Number* g_l, Number* g_u)
+{
+ //cout << "n=" << n << " m=" << m << " mm=" << mm << " g_l.N()=" << gl.N() << " g_u.N()=" << gu.N() << endl;
+ //assert(gl.N()==mm);
+ //assert(gu.N()==mm);
+ KnToPtr(xl,x_l);
+ KnToPtr(xu,x_u);
+ if(mm) KnToPtr(gl,g_l);
+ if(mm) KnToPtr(gu,g_u);
+ /* DEBUG
+ cout << "constraints lower bound = (";
+ for(int i=0;i<m;++i) cout << g_l[i] << (i<m-1 ? ',':')');
+ cout << endl << "constraints upper bound = (";
+ for(int i=0;i<m;++i) cout << g_u[i] << (i<m-1 ? ',':')');
+ cout << endl;*/
+ return true;
+}
+bool ffNLP::get_starting_point(Index n, bool init_x, Number* x,bool init_z, Number* z_L, Number* z_U,Index m, bool init_lambda,Number* lambda)
+{
+ assert(init_x == true);
+ assert(xstart->N() == n);
+ KnToPtr(*xstart,x);
+ if(init_z)
+ {
+ if(uz_start.N() != n)
+ {
+ if(xu.min() < 1.e19)
+ {
+ cout << "ff-IPOPT warm start : upper simple bounds start multipliers array doesn't have the expected size (" << uz_start.N() << "!=" << n << ")." << endl;
+ cout << " ";
+ if(uz_start.N()==0) cout << "maybe because no upper bounds multiplier has been given. " << endl;
+ cout << " Initializing them to 1..." << endl;
+ }
+ uz_start.resize(n);
+ uz_start=1.;
+ }
+ if(lz_start.N() != n)
+ {
+ if(xl.max() > -1e19)
+ {
+ cout << "ff-IPOPT warm start : lower simple bounds start multipliers array doesn't have the expected size (" << lz_start.N() << "!=" << n << ")." << endl;
+ cout << " ";
+ if(lz_start.N()==0) cout << "maybe because no lower bounds multiplier has been given. " << endl;
+ cout << " Initializing them to 1..." << endl;
+ }
+ lz_start.resize(n);
+ lz_start=1.;
+ }
+ KnToPtr(uz_start, z_U);
+ KnToPtr(lz_start, z_L);
+ }
+ if(init_lambda)
+ {
+ if(lambda_start.N() != m)
+ {
+ cout << "ff-IPOPT warm start : constraints start multipliers array doesn't have the expected size (" << lambda_start.N() << "!=" << m << ")." << endl;
+ cout << " ";
+ if(lambda_start.N()==0) cout << "maybe because no constraints multiplier has been given. " << endl;
+ cout << " Initializing them to 1..." << endl;
+ lambda_start.resize(m);
+ lambda_start=1.;
+ }
+ KnToPtr(lambda_start, lambda);
+ }
+ return true;
+}
+bool ffNLP::eval_f(Index n, const Number* x, bool new_x, Number& obj_value)
+{
+ assert(n == xstart->N());
+ Rn X(n);
+ KnFromPtr(X,x);
+ obj_value = fitness->J(X);
+ return true;
+}
+bool ffNLP::eval_grad_f(Index n, const Number* x, bool new_x, Number* grad_f)
+{
+ assert(n == xstart->N());
+ Rn X(n);
+ KnFromPtr(X,x);
+ Rn _grad_f=dfitness->J(X);
+ KnToPtr(_grad_f,grad_f);
+ return true;
+}
+bool ffNLP::eval_g(Index n, const Number* x, bool new_x, Index m, Number* g)
+{
+ Rn X(n);
+ KnFromPtr(X,x);
+ if(constraints)
+ {
+ Rn _g=constraints->J(X);
+ KnToPtr(_g,g);
+ }
+ return true;
+}
+bool ffNLP::eval_jac_g(Index n, const Number* x, bool new_x,Index m, Index nele_jac, Index* iRow, Index *jCol,Number* values)
+{
+ assert(n==xstart->N());
+ Rn X(n);
+ if(x) KnFromPtr(X,x); else X=*xstart;
+
+ if(values==0)
+ {
+ int k=0;
+ for(SparseMatStructure::const_iterator i=JacStruct.begin(); i != JacStruct.end(); ++i)
+ {
+ iRow[k] = i->first;
+ jCol[k] = i->second;
+ ++k;
+ }
+ }
+ else if(dconstraints)
+ {
+ Matrice_Creuse<R>* M = dconstraints->J(X);
+ MatriceMorse<R> *MM = dynamic_cast<MatriceMorse<R>* >(&(*M->A)); //ugly!
+ for(int i=0;i<MM->N;++i)
+ {
+ for(int k=MM->lg[i]; k < MM->lg[i+1]; ++k)
+ {
+ if(checkstruct)
+ {
+ int kipopt = FindIndex(JacStruct.Raws(),JacStruct.Cols(),i,MM->cl[k],0,nele_jac-1);
+ if(kipopt>=0) values[kipopt] = MM->a[k];
+ }
+ else values[k] = MM->a[k];
+ }
+ }
+ }
+ return true;
+}
+
+
+bool ffNLP::eval_h(Index n, const Number* x, bool new_x,Number obj_factor, Index m, const Number* lambda,bool new_lambda, Index nele_hess, Index* iRow,Index* jCol, Number* values)
+{
+ Rn X(n),L(m);
+ if(x) KnFromPtr(X,x); else X=*xstart;
+ if(lambda) KnFromPtr(L,lambda); else L=0.;
+
+ bool NLCHPE = hessian->NLCHPEnabled();
+ Number _obj_factor = NLCHPE ? 1. : obj_factor;
+ if(values==0)
+ {
+ int k=0;
+ for(SparseMatStructure::const_iterator i=HesStruct.begin(); i != HesStruct.end(); ++i)
+ {
+ iRow[k] = i->first;
+ jCol[k] = i->second;
+ ++k;
+ }
+ }
+ else
+ {
+ Matrice_Creuse<R>* M=0;
+ if(NLCHPE) M=hessian->J(X,obj_factor,L); else M=hessian->J(X);
+ MatriceMorse<R> *MM = dynamic_cast<MatriceMorse<R>* >(&(*M->A));//ugly!
+ if(MM)
+ {
+ if(checkstruct)
+ {
+ for(int i=0;i<MM->N;++i)
+ {
+ for(int k=MM->lg[i]; k < MM->lg[i+1]; ++k)
+ {
+ int kipopt = FindIndex(HesStruct.Raws(),HesStruct.Cols(),i,MM->cl[k],0,nele_hess-1);
+ if(kipopt>=0) values[kipopt] = _obj_factor * (MM->a[k]);
+ //else values[k] = (hessian->paramof &&hessian->paramlm ? 1. : obj_factor) * (MM->a[k]);
+ }
+ }
+ }
+ else if(! MM->symetrique)
+ {
+ for(int i=0,kipopt=0;i<MM->N;++i)
+ {
+ for(int k=MM->lg[i]; k < MM->lg[i+1]; ++k)
+ {
+ if(i >= MM->cl[k])
+ {
+ values[kipopt] = _obj_factor * (MM->a[k]);
+ ++kipopt;
+ }
+ }
+ }
+ }
+ else
+ {
+ for(int i=0;i<MM->N;++i)
+ {
+ for(int k=MM->lg[i]; k < MM->lg[i+1]; ++k) values[k] = _obj_factor * (MM->a[k]);
+ }
+ }
+ }
+ }
+ return true;
+}
+
+
+void ffNLP::finalize_solution(SolverReturn status,
+ Index n, const Number* x, const Number* z_L, const Number* z_U,
+ Index m, const Number* g, const Number* lambda,
+ Number obj_value,const IpoptData* ip_data,
+ IpoptCalculatedQuantities* ip_cq)
+{
+ KnFromPtr(*xstart,x);
+ KnFromPtr(lambda_start,lambda);
+ KnFromPtr(lz_start, z_L);
+ KnFromPtr(uz_start, z_U);
+ final_value = obj_value;
+}
+
+
+
+/*****************************************************************************************************************************
+ * Assumptions : these are tags used as template parameters for case specific function wrapping or warning message in the
+ * interface. Some case can be added here (but some class has to be specialized for the new cases)
+ * AssumptionF : undeff --> undefined case (not used)
+ * no_assumption_f --> most general case when the fitness function and all its derivative are coded in the
+ * freefem script with the func keyword (type Polymorphic in c++). These functions
+ * are then wrapped in GeneralFunc objects.
+ * P2_f --> no longer used (it was used for fitness and its gradient defined as func in freefem
+ * script, while the hessian is a constant matrix directly given to the interface, but
+ * it leads to ambiguities).
+ * unavailable_hessian --> fitness function and its gradients coded with func in the ff script, wrapped into
+ * GeneralFunc objects, without second order derivative function. Enables the BFGS
+ * option of IPOPT.
+ * mv_P2_f --> fitness function is a P2 function which will be defined by a [matrix,vector] array.
+ * The functions are passed to the ffNLP object as P2ScalarFunc, P1VectorFunc and
+ * ConstantSparseMatFunc respectively for the fitness function, its gradient and its
+ * hessian (with all vf=1).
+ * quadratic_f --> f is a pure quadratic fonction, defined by a single matrix. Same type as mv_P2_f
+ * for function wrappers with a vf=0 tag.
+ * linear_f --> f is a linear form, defined by a single vector. Same type as mv_P2_f
+ * for function wrappers with a vf=0 tag.
+ * AssumptionG : undeff --> undefined case (not used)
+ * no_assumption_f --> most general case when the constraint functions and all its derivative are coded in
+ * the freefem script with the func keyword (type Polymorphic in c++). These functions
+ * are then wrapped in GeneralFunc objects.
+ * P1_g --> no longer used (it was used for constraints defined as func in freefem script
+ * , while the jacobian is a constant matrix directly given to the interface, but
+ * it leads to ambiguities).
+ * mv_P1_g --> Constraints function is a P1 function which will be defined by a [matrix,vector]
+ * array. The functions are passed to the ffNLP object as P1VectorFunc and
+ * ConstantSparseMatFunc respectively for the constraints and its jacobian (with
+ * all vf=0).
+ * linear_g --> Constraints are linear, defined by a single matrix. Same type as mv_P1_g
+ * for function wrappers with a vf=0 tag.
+ * Case : templatized with a pair of AssumptionF and AssumptionG, is used to build different constructor for the interface
+ * class in order to overload the freefem function which will call IPOPT
+ *****************************************************************************************************************************/
+
+
+enum AssumptionF {undeff,no_assumption_f, P2_f, unavailable_hessian, mv_P2_f, quadratic_f, linear_f};
+enum AssumptionG {undefg,without_constraints, no_assumption_g, P1_g, mv_P1_g, linear_g};
+
+template<AssumptionF AF,AssumptionG AG> struct Case
+{
+ Case() {}
+ static const AssumptionF af=AF;
+ static const AssumptionG ag=AG;
+};
+
+
+/*****************************************************************************************************************************
+ * CheckMatrixVectorPair : Small function taking an E_Array and check whether the type of the 2 objects contained in the
+ * array are matrix and vector. Returns false if types are not matrix/vector.
+ * order is modified to know whether the matrix is in first position or not.
+ *****************************************************************************************************************************/
+bool CheckMatrixVectorPair(const E_Array *mv,bool &order)
+{
+ const aType t1 = (*mv)[0].left(), t2 = (*mv)[1].left();
+ if(NXOR(t1 == atype<Matrice_Creuse<R>*>() , t2 == atype<Matrice_Creuse<R>*>())) return false;
+ else if(NXOR(t1 == atype<Rn*>(),t2 == atype<Rn*>())) return false;
+ else
+ {
+ order = (t1 == atype<Matrice_Creuse<R>*>());
+ return true;
+ }
+}
+
+
+/*****************************************************************************************************************************
+ * The following class offers a polymorphic way to build the function wrappers to pass to the ffNLP object
+ * Each element of the assumption enum define a "FunctionDatas" class in which the constructor and the operator() makes
+ * case specific task.
+ * If some new value in the Assumption enums are to be added, the FitnessFunctionDatas and/or ConstraintFunctionDatas with
+ * the new value as template parameter has to be specialized.
+ * What should the method do is (exemple at the end of the file with already coded cases):
+ * Constructor : define the Expression members using the arguments passed to the IPOPT function in the script
+ * operator() : allocate with appropriate dynamic type the ScalarFunc, VectorFunc, SparseMatFunc pointers, and display some
+ * case dependant errors or warnings (note that there is no ScalarFunc ptr to allocate for constraints)
+ *****************************************************************************************************************************/
+class GenericFitnessFunctionDatas
+{
+public:
+ static GenericFitnessFunctionDatas* New(AssumptionF,const basicAC_F0 &,Expression const *,const C_F0&,const C_F0&,const C_F0&);
+ bool CompletelyNonLinearConstraints;
+ Expression JJ,GradJ,Hessian;
+ GenericFitnessFunctionDatas() : CompletelyNonLinearConstraints(true),JJ(0),GradJ(0),Hessian(0) {}
+ virtual const AssumptionF A() const {return undeff;}
+ virtual void operator()(Stack,const C_F0&,const C_F0&,const C_F0&,Expression const *,ScalarFunc *&,VectorFunc *&,SparseMatFunc *&,bool) const = 0; //Build the functions
+ virtual ~GenericFitnessFunctionDatas() {}
+};
+template<AssumptionF AF> class FitnessFunctionDatas : public GenericFitnessFunctionDatas //not really a template, since most of the methods of all cases have to be specialized
+{
+public:
+ FitnessFunctionDatas(const basicAC_F0 &,Expression const *,const C_F0 &,const C_F0 &,const C_F0 &);
+ const AssumptionF A() const {return AF;}
+ void operator()(Stack,const C_F0&,const C_F0&,const C_F0&,Expression const *,ScalarFunc *&,VectorFunc *&,SparseMatFunc *&,bool) const;
+
+};
+
+class GenericConstraintFunctionDatas
+{
+public:
+ static GenericConstraintFunctionDatas* New(AssumptionG,const basicAC_F0 &,Expression const *,const C_F0 &);
+ Expression Constraints,GradConstraints;
+ GenericConstraintFunctionDatas() : Constraints(0),GradConstraints(0) {}
+ virtual const AssumptionG A() const {return undefg;}
+ virtual const bool WC() const =0;//with constraints
+ virtual void operator()(Stack,const C_F0 &,Expression const *,VectorFunc *&,SparseMatFunc *&,bool) const = 0;//build the functions`
+ virtual ~GenericConstraintFunctionDatas() {}
+
+};
+template<AssumptionG AG> class ConstraintFunctionDatas : public GenericConstraintFunctionDatas
+{
+public:
+ ConstraintFunctionDatas(const basicAC_F0 &,Expression const *,const C_F0 &);
+ const AssumptionG A() const {return AG;}
+ const bool WC() const {return AG!=without_constraints;}
+ void operator()(Stack,const C_F0&,Expression const *,VectorFunc *&,SparseMatFunc *&,bool) const ;
+};
+
+
+
+
+/*****************************************************************************************************************************
+ * OptimIpopt & OptimIpopt::E_Ipopt - The interface class
+ * Do the link beetween freefem and Ipopt
+ *****************************************************************************************************************************/
+class OptimIpopt : public OneOperator
+{
+public:
+ const AssumptionF AF;
+ const AssumptionG AG;
+ class E_Ipopt : public E_F0mps
+ {
+ private:
+ bool spurious_cases;
+ public:
+ const AssumptionF AF;
+ const AssumptionG AG;
+ const bool WC;
+ std::set<unsigned short> unused_name_param; //In some case, some parameter are usless, this is the list of their index in nargs
+ void InitUNP(); //Initialize unusued_name_param at freefem compile time
+ static basicAC_F0::name_and_type name_param[];
+ static const int n_name_param=29;
+ Expression nargs[n_name_param];
+ Expression X;
+ mutable Rn lm;
+ C_F0 L_m;
+ C_F0 inittheparam,theparam,closetheparam;
+ C_F0 initobjfact,objfact;
+ GenericFitnessFunctionDatas * fitness_datas;
+ GenericConstraintFunctionDatas * constraints_datas;
+ bool arg(int i,Stack stack,bool a) const {return nargs[i] ? GetAny<bool>( (*nargs[i])(stack) ): a;}
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ R arg(int i,Stack stack,R a) const{ return nargs[i] ? GetAny<R>( (*nargs[i])(stack) ): a;}
+ Rn_ arg(int i,Stack stack,Rn_ a) const {return nargs[i] ? GetAny<Rn_>((*nargs[i])(stack)) : a;}
+ template<typename T> T Arg(int i,Stack s) const {return GetAny<T>( (*nargs[i])(s));}
+
+ E_Ipopt(const basicAC_F0 & args,AssumptionF af,AssumptionG ag)
+ : lm(),L_m(CPValue(lm)),AF(af),AG(ag),WC(ag!=without_constraints),unused_name_param(),
+ spurious_cases(false),fitness_datas(0),constraints_datas(0)
+ {
+ InitUNP();
+ int nbj= args.size()-1;
+ Block::open(currentblock); // make a new block to
+ X = to<Rn*>(args[nbj]);
+ C_F0 X_n(args[nbj],"n");
+ // the expression to init the theparam of all
+ inittheparam = currentblock->NewVar<LocalVariable>("the parameter",atype<KN<R> *>(),X_n);
+ initobjfact = currentblock->NewVar<LocalVariable>("objective factor",atype<double *>());
+ //C_F0 initlm = currentblock->NewVar<LocalVariable>("lagrange multiplier",atype<KN<R> *>(),L_m);
+ theparam = currentblock->Find("the parameter"); // the expression for the parameter
+ objfact = currentblock->Find("objective factor");
+ args.SetNameParam(n_name_param,name_param,nargs);
+ fitness_datas = GenericFitnessFunctionDatas::New(AF,args,nargs,theparam,objfact,L_m); //Creates links to the freefem objects
+ constraints_datas = GenericConstraintFunctionDatas::New(AG,args,nargs,theparam); //defining the functions
+ spurious_cases = AG==no_assumption_g && (AF==P2_f || AF==mv_P2_f || AF==quadratic_f || AF==linear_f);
+ closetheparam=currentblock->close(currentblock); // the cleanning block expression
+ }
+ ~E_Ipopt()
+ {
+ if(fitness_datas) delete fitness_datas;
+ if(constraints_datas) delete constraints_datas;
+ }
+
+
+ virtual AnyType operator()(Stack stack) const
+ {
+ double cost = nan("");
+ WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+ Rn &x = *GetAny<Rn *>((*X)(stack));
+ {
+ Expression test(theparam); //in some case the KN object associated to the param is never initialized, leading to failed assertion in KN::destroy
+ Rn *tt = GetAny<Rn *>((*test)(stack)); //this lines prevent this to happen
+ *tt = x;
+ }
+ long n=x.N();
+ bool warned=false;
+ cout << endl;
+ if(spurious_cases)
+ {
+ cout << "ff-IPOPT Spurious case detected : the hessian is defined as a constant matrix but constraints are given in function form." << endl;
+ cout << "If they are not affine, the optimization is likely to fail. In this case, try one of the following suggestions:" << endl;
+ cout << " - if constraints have computable hessians, use function form for the fitness function and all its derivatives" << endl;
+ cout << " and check the documentation to know how to express the whole lagrangian hessian." << endl;
+ cout << " - if constraints hessians are difficult to obtain, force the BFGS mode using named parameter "<< name_param[12].name<< '.' << endl;
+ cout << "Do not worry about this message if you know all your constraints has a constant null hessian." << endl << endl;
+ }
+ if(nargs[7]) cout << "ff-IPOPT : the named parameter autostruct is no longer used in this version of the interface." << endl;
+ //Detection of mixed case dependant warnings or error
+ for(int i=0;i<n_name_param;++i)
+ if(nargs[i] && unused_name_param.find(i)!=unused_name_param.end())
+ {
+ cout << "ff-IPOPT Warning: named parameter " << name_param[i].name << " is useless for the problem you have set." << endl;
+ warned = true;
+ }
+ if(nargs[4] && nargs[5] && nargs[7])
+ {
+ cout << "ff-IPOPT Warning: both " << name_param[4].name << " and " << name_param[5].name << " has been defined, so " << name_param[7].name;
+ cout << " will be ignored." << endl;
+ }
+ if(warned)
+ {
+ if(!WC && AF==unavailable_hessian && nargs[8])
+ {
+ cout << " ==> " << name_param[8].name << " is useless because there should not be any function returning matrix in your problem," << endl;
+ cout << " (2 functions can only be J and dJ). You may as well have forgotten one function (IPOPT will certainly crash if so)." << endl;
+ }
+ if(AF!=no_assumption_f && AF!=unavailable_hessian && AG!=no_assumption_g && nargs[5])
+ {
+ cout << " ==> your lagrangian hessian is a constant matrix, so there is no need to specify its structure with " << name_param[5].name << endl;
+ cout << " since it is contained in the matrix object." << endl;
+ }
+ if(AF!=no_assumption_f && AF!=unavailable_hessian && AG!=no_assumption_g && nargs[7])
+ {
+ cout << " ==> " << name_param[7].name << " will be ignored since all matrices are constants and constraints do not" << endl;
+ cout << " contribute to the hessian, matrix structure determination is trivial." << endl;
+ }
+ if(AF==unavailable_hessian && AG!=no_assumption_g && (nargs[7] || nargs[8]))
+ {
+ cout << " ==> " << name_param[7].name << " or " << name_param[8].name << " will be ignored since the only matrix you have passed is constant. " << endl;
+ cout << " Or maybe did you forget to pass a function (IPOPT will certainly crash if so)." << endl;
+ }
+ if(AF!=no_assumption_f && AF!=unavailable_hessian && AG!=no_assumption_g && nargs[8])
+ {
+ cout << " ==> no need to use " << name_param[8].name << " since all matrices are constant, structures won't change through the algorithm," << endl;
+ cout << " it is automatically set to the default disabling value." << endl;
+ }
+ }
+
+ long iprint = verbosity;
+
+ ScalarFunc *ffJ=0;
+ VectorFunc *ffdJ=0,*ffC=0;
+ SparseMatFunc *ffH=0,*ffdC=0;
+
+ (*fitness_datas)(stack,theparam,objfact,L_m,nargs,ffJ,ffdJ,ffH,warned);//Fill the functions
+ (*constraints_datas)(stack,theparam,nargs,ffC,ffdC,warned);
+
+ Rn xl(n),xu(n),gl(nargs[2] ? Arg<Rn_>(2,stack).N() : 0),gu(nargs[3] ? Arg<Rn_>(3,stack).N() : 0);
+ int mmm=0;
+ if(WC && (gl.N()+gu.N())==0)
+ {
+ cout << "IPOPT Warning : constrained problem without constraints bounds." << endl;
+ mmm = ffC->J(x).N();
+ }
+ else mmm=gl.N()>gu.N() ? gl.N() : gu.N();
+ Rn_ *lag_mul=0,*l_z=0,*u_z=0;//Rn(mmm,1.);
+ //int niter=arg(6,stack,100L);
+ int autostructmode = ffNLP::one_evaluation;
+ bool checkindex = (AF!=no_assumption_f && AG!=no_assumption_g) ? false : arg(8,stack,true), cberror=false;
+
+ if(nargs[0]) xl=Arg<Rn_>(0,stack); else xl=-1.e19;
+ if(nargs[1]) xu=Arg<Rn_>(1,stack); else xu=1.e19;
+ if(nargs[2]) gl=Arg<Rn_>(2,stack); else {gl.resize(mmm); gl=-1.e19;}
+ if(nargs[3]) gu=Arg<Rn_>(3,stack); else {gu.resize(mmm); gu=1.e19;}
+ const E_Array * ejacstruct = (WC && AF==no_assumption_f && AG==no_assumption_g && nargs[4]) ? dynamic_cast<const E_Array *> (nargs[4]) : 0,
+ * ehesstruct = (AF==no_assumption_f && nargs[5]) ? dynamic_cast<const E_Array *> (nargs[5]) : 0;
+
+ if(nargs[6] && WC) lag_mul = new Rn_(GetAny<Rn_>((*nargs[6])(stack)));
+ if(nargs[21]) l_z = new Rn_(GetAny<Rn_>((*nargs[21])(stack)));
+ if(nargs[20]) u_z = new Rn_(GetAny<Rn_>((*nargs[20])(stack)));
+
+
+ SmartPtr<TNLP> optim = new ffNLP(x,xl,xu,gl,gu,ffJ,ffdJ,ffH,ffC,ffdC);
+ ffNLP * _optim = dynamic_cast<ffNLP *> (&(*optim));
+ assert(_optim);
+ if(WC && nargs[6]) _optim->lambda_start = *lag_mul;
+ else if(WC)
+ {
+ _optim->lambda_start.resize(mmm);
+ _optim->lambda_start = 1.;
+ }
+ _optim->sigma_start = 1.;
+ if(nargs[21] && nargs[0]) _optim->lz_start = *l_z;
+ else if(nargs[0]) {_optim->lz_start.resize(xl.N()); _optim->lz_start = 1.;}
+ if(nargs[20] && nargs[1]) _optim->uz_start = *u_z;
+ else if(nargs[1]) {_optim->uz_start.resize(xu.N()); _optim->uz_start = 1.;}
+
+ if(ejacstruct)
+ {
+ if(ejacstruct->nbitem()!=2) ExecError("\nSorry, we were expecting an array with two componants in structjac=[iraw,jcol]");
+ if((*ejacstruct)[0].left() != atype<KN<long> *>()) CompileError("Sorry, array componants in structjac=[iraw,jcol] must be integer arrays");
+ if((*ejacstruct)[1].left() != atype<KN<long> *>()) CompileError("Sorry, array componants in structjac=[iraw,jcol] must be integer arrays");
+ Expression raws = (*ejacstruct)[0], cols = (*ejacstruct)[1];
+ _optim->SetJacobianStructure(*GetAny<KN<long>*>((*raws)(stack)),*GetAny<KN<long>*>((*cols)(stack)),true);
+ }
+ if(ehesstruct)
+ {
+ if(ehesstruct->nbitem()!=2) ExecError("\nSorry, we were expecting an array with two componants in structhess=[iraw,jcol]");
+ if((*ehesstruct)[0].left() != atype<KN<long> *>()) CompileError("Sorry, array componants in structhess=[iraw,jcol] must be integer arrays");
+ if((*ehesstruct)[1].left() != atype<KN<long> *>()) CompileError("Sorry, array componants in structhess=[iraw,jcol] must be integer arrays");
+ Expression raws = (*ehesstruct)[0], cols = (*ehesstruct)[1];
+ _optim->SetHessianStructure(*GetAny<KN<long>*>((*raws)(stack)),*GetAny<KN<long>*>((*cols)(stack)),true);
+ }
+ ffNLP::Level lh=ehesstruct ? ffNLP::user_defined : ffNLP::Level(autostructmode),lj=ejacstruct ? ffNLP::user_defined : ffNLP::Level(autostructmode);
+ if(AF==unavailable_hessian) lh=ffNLP::do_nothing;
+ _optim->BuildMatrixStructures(lh,lj,mmm);
+ if(checkindex) _optim->EnableCheckStruct();
+
+ SmartPtr<IpoptApplication> app = new IpoptApplication();
+
+ //app->Options()->SetNumericValue("tol", 1e-10);
+ if(nargs[9]) app->Options()->SetNumericValue("tol",GetAny<double>((*nargs[9])(stack)));
+ if(nargs[10]) app->Options()->SetIntegerValue("max_iter",GetAny<long>((*nargs[10])(stack)));
+ if(nargs[11]) app->Options()->SetNumericValue("max_cpu_time",GetAny<double>((*nargs[11])(stack)));
+ bool bfgs = nargs[12] ? GetAny<bool>((*nargs[12])(stack)) : false;
+ //app->Options()->SetStringValue("hessian_approximation","limited-memory");
+ if(AF==unavailable_hessian || bfgs)
+ {
+ if(AF==unavailable_hessian && !bfgs) cout << "IPOPT Note : No hessian given ==> LBFGS hessian approximation enabled" << endl;
+ app->Options()->SetStringValue("hessian_approximation","limited-memory");
+ }
+ if(nargs[13])
+ {
+ string derivative_test = *GetAny<string*>((*nargs[13])(stack)) ;
+ app->Options()->SetStringValue("derivative_test",derivative_test.c_str());
+ }
+ if(nargs[14])
+ {
+ string options_file = *GetAny<string*>((*nargs[14])(stack));
+ app->Options()->SetStringValue("option_file_name",options_file.c_str());
+ }
+ if(nargs[15]) app->Options()->SetIntegerValue("print_level",GetAny<long>((*nargs[15])(stack)));
+ if(AG==without_constraints || AG==mv_P1_g || AG==linear_g)
+ {
+ app->Options()->SetStringValue("jac_c_constant","yes");
+ app->Options()->SetStringValue("jac_d_constant","yes");
+ }
+ if(AF==mv_P2_f || AF==quadratic_f || AF==linear_f) app->Options()->SetStringValue("hessian_constant","yes");
+ if(nargs[16]) app->Options()->SetNumericValue("derivative_test_perturbation",GetAny<double>((*nargs[16])(stack)));
+ if(nargs[17]) app->Options()->SetNumericValue("derivative_test_tol",GetAny<double>((*nargs[16])(stack)));
+ if(nargs[18]) app->Options()->SetStringValue("fixed_variable_treatment",GetAny<string*>((*nargs[18])(stack))->c_str());
+ if(nargs[19])
+ {
+ app->Options()->SetStringValue("warm_start_init_point","yes");
+ if(WC && !nargs[6])
+ {
+ cout << "ff-IPOPT Warning : warm start for constrained problem without initial constraints dual variables (" << name_param[6].name << " parameter)." << endl;
+ cout << " ==> Starting with " << name_param[6].name << "=(1,1,...,1)." << endl;
+ }
+ if(nargs[0] && !nargs[21])
+ {
+ cout << "ff-IPOPT Warning : warm start with simple lower bounds without initial lower bounds dual variables (" << name_param[21].name << " parameter)." << endl;
+ cout << " ==> Starting with " << name_param[21].name << "=(1,1,...,1)." << endl;
+ }
+ if(nargs[1] && !nargs[20])
+ {
+ cout << "ff-IPOPT Warning : warm start with simple upper bounds without initial upper bounds dual variables (" << name_param[20].name << " parameter)." << endl;
+ cout << " ==> Starting with " << name_param[20].name << "=(1,1,...,1)." << endl;
+ }
+ if(l_z) _optim->lz_start = *l_z;
+ if(u_z) _optim->uz_start = *u_z;
+ if(lag_mul) _optim->lambda_start = *lag_mul;
+ }
+
+ if(nargs[22]) app->Options()->SetNumericValue("mu_init",GetAny<double>((*nargs[22])(stack)));
+ else app->Options()->SetStringValue("mu_strategy", "adaptive");
+ if(nargs[23]) app->Options()->SetNumericValue("mumps_pivtol",GetAny<double>((*nargs[23])(stack)));
+ if(nargs[24]) app->Options()->SetNumericValue("bound_relax_factor",GetAny<double>((*nargs[24])(stack)));
+ if(nargs[25]) app->Options()->SetStringValue("mu_strategy",GetAny<string*>((*nargs[25])(stack))->c_str());
+ if(nargs[27]) app->Options()->SetNumericValue("mu_min",GetAny<double>((*nargs[27])(stack)));
+ if(nargs[28]) if(!GetAny<bool>((*nargs[28])(stack))) app->Options()->SetStringValue("accept_every_trial_step","yes");
+ //if(nargs[26]) app->Options()->SetNumericValue("obj_scaling_factor",GetAny<double>((*nargs[26])(stack)));
+ if(verbosity>1) app->Options()->SetStringValue("print_user_options","yes");
+ app->Options()->SetStringValue("output_file", "ipopt.out");
+ if(AF!=no_assumption_f && AF!=unavailable_hessian && AG!=no_assumption_g) app->Options()->SetStringValue("mehrotra_algorithm", "yes");
+
+ ApplicationReturnStatus status;
+ app->Initialize();
+
+ // Ask Ipopt to solve the problem
+ status = app->OptimizeTNLP(optim);
+
+ if(lag_mul) *lag_mul = _optim->lambda_start;
+ if(l_z) *l_z = _optim->lz_start;
+ if(u_z) *u_z = _optim->uz_start;
+ cost = _optim->final_value;
+
+ if(nargs[26])
+ {
+ double *pfv = GetAny<double*>((*nargs[26])(stack));
+ *pfv = cost;
+ }
+ if(verbosity)
+ {
+ if(status == Solve_Succeeded) printf("\n\n*** Ipopt succeeded \n");
+ else if(static_cast<int>(status)<0) printf("\n\n*** Ipopt failure!\n");
+ else printf("\n\n*** Ipopt mixed results.\n");
+ }
+
+
+ clean(lag_mul);
+ clean(l_z);
+ clean(u_z);
+ clean(ffJ);
+ clean(ffdJ);
+ clean(ffH);
+ clean(ffC);
+ clean(ffdC);
+ if(lm) lm.destroy(); // clean memory of LM
+ closetheparam.eval(stack); // clean memory
+ WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+ return SetAny<long>(static_cast<long>(static_cast<int>(status))); //SetAny<long>(0); Modif FH july 2005
+ }
+
+ operator aType () const { return atype<long>();}
+
+ };
+
+ E_F0 * code(const basicAC_F0 & args) const {return new E_Ipopt(args,AF,AG);}
+
+ //Constructors - they define the different prototype of the overloaded IPOPT function reachable in freefem scripts
+
+ OptimIpopt(Case<no_assumption_f,no_assumption_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<KN<R> *>()),
+ AF(no_assumption_f),AG(no_assumption_g) {}
+ OptimIpopt(Case<no_assumption_f,without_constraints>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<KN<R> *>()),
+ AF(no_assumption_f),AG(without_constraints) {}
+ OptimIpopt(Case<no_assumption_f,P1_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R> *>(),atype<KN<R> *>()),
+ AF(no_assumption_f),AG(P1_g) {}
+ OptimIpopt(Case<no_assumption_f,mv_P1_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<E_Array>(),atype<KN<R> *>()),
+ AF(no_assumption_f),AG(mv_P1_g) {}
+ OptimIpopt(Case<no_assumption_f,linear_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R> *>()),
+ AF(no_assumption_f),AG(linear_g) {}
+
+
+ OptimIpopt(Case<P2_f,P1_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R> *>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R> *>(),atype<KN<R> *>()),
+ AF(P2_f),AG(P1_g) {}
+ OptimIpopt(Case<P2_f,without_constraints>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R> *>(),atype<KN<R> *>()),
+ AF(P2_f),AG(without_constraints) {}
+ OptimIpopt(Case<P2_f,no_assumption_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R> *>(),atype<Polymorphic*>(),atype<Polymorphic *>(),atype<KN<R> *>()),
+ AF(P2_f),AG(no_assumption_g) {}
+ OptimIpopt(Case<P2_f,mv_P1_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R>*>(),atype<E_Array>(),atype<KN<R> *>()),
+ AF(P2_f),AG(mv_P1_g) {}
+ OptimIpopt(Case<P2_f,linear_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R>*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R> *>()),
+ AF(P2_f),AG(linear_g) {}
+
+ OptimIpopt(Case<unavailable_hessian,no_assumption_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<KN<R> *>()),
+ AF(unavailable_hessian),AG(no_assumption_g) {}
+ OptimIpopt(Case<unavailable_hessian,without_constraints>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<KN<R> *>()),AF(unavailable_hessian),AG(without_constraints) {}
+ OptimIpopt(Case<unavailable_hessian,P1_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R> *>()),
+ AF(unavailable_hessian),AG(P1_g) {}
+ OptimIpopt(Case<unavailable_hessian,mv_P1_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<E_Array>(),atype<KN<R>*>()),
+ AF(unavailable_hessian),AG(mv_P1_g) {}
+ OptimIpopt(Case<unavailable_hessian,linear_g>) :
+ OneOperator(atype<long>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R>*>()),
+ AF(unavailable_hessian),AG(linear_g) {}
+
+ OptimIpopt(Case<mv_P2_f,no_assumption_g>) :
+ OneOperator(atype<long>(),atype<E_Array>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<KN<R>*>()),
+ AF(mv_P2_f),AG(no_assumption_g) {}
+ OptimIpopt(Case<mv_P2_f,without_constraints>) :
+ OneOperator(atype<long>(),atype<E_Array>(),atype<KN<R>*>()),
+ AF(mv_P2_f),AG(without_constraints) {}
+ OptimIpopt(Case<mv_P2_f,P1_g>) :
+ OneOperator(atype<long>(),atype<E_Array>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R>*>()),
+ AF(mv_P2_f),AG(P1_g) {}
+ OptimIpopt(Case<mv_P2_f,mv_P1_g>) :
+ OneOperator(atype<long>(),atype<E_Array>(),atype<E_Array>(),atype<KN<R>*>()),
+ AF(mv_P2_f),AG(mv_P1_g) {}
+ OptimIpopt(Case<mv_P2_f,linear_g>) :
+ OneOperator(atype<long>(),atype<E_Array>(),atype<Matrice_Creuse<R>*>(),atype<KN<R>*>()),
+ AF(mv_P2_f),AG(linear_g) {}
+
+ OptimIpopt(Case<quadratic_f,no_assumption_g>) :
+ OneOperator(atype<long>(),atype<Matrice_Creuse<R>*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<KN<R>*>()),
+ AF(quadratic_f),AG(no_assumption_g) {}
+ OptimIpopt(Case<quadratic_f,without_constraints>) :
+ OneOperator(atype<long>(),atype<Matrice_Creuse<R>*>(),atype<KN<R>*>()),
+ AF(quadratic_f),AG(without_constraints) {}
+ OptimIpopt(Case<quadratic_f,P1_g>) :
+ OneOperator(atype<long>(),atype<Matrice_Creuse<R>*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R>*>()),
+ AF(quadratic_f),AG(P1_g) {}
+ OptimIpopt(Case<quadratic_f,mv_P1_g>) :
+ OneOperator(atype<long>(),atype<Matrice_Creuse<R>*>(),atype<E_Array>(),atype<KN<R>*>()),
+ AF(quadratic_f),AG(mv_P1_g) {}
+ OptimIpopt(Case<quadratic_f,linear_g>) :
+ OneOperator(atype<long>(),atype<Matrice_Creuse<R>*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R>*>()),
+ AF(quadratic_f),AG(linear_g) {}
+
+
+ OptimIpopt(Case<linear_f,no_assumption_g>) :
+ OneOperator(atype<long>(),atype<KN<R>*>(),atype<Polymorphic*>(),atype<Polymorphic*>(),atype<KN<R>*>()),
+ AF(linear_f),AG(no_assumption_g) {}
+ OptimIpopt(Case<linear_f,without_constraints>) :
+ OneOperator(atype<long>(),atype<KN<R>*>(),atype<KN<R>*>()),
+ AF(linear_f),AG(without_constraints) {}
+ OptimIpopt(Case<linear_f,P1_g>) :
+ OneOperator(atype<long>(),atype<KN<R>*>(),atype<Polymorphic*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R>*>()),
+ AF(linear_f),AG(P1_g) {}
+ OptimIpopt(Case<linear_f,mv_P1_g>) :
+ OneOperator(atype<long>(),atype<KN<R>*>(),atype<E_Array>(),atype<KN<R>*>()),
+ AF(linear_f),AG(mv_P1_g) {}
+ OptimIpopt(Case<linear_f,linear_g>) :
+ OneOperator(atype<long>(),atype<KN<R>*>(),atype<Matrice_Creuse<R>*>(),atype<KN<R>*>()),
+ AF(linear_f),AG(linear_g) {}
+
+};
+
+
+
+/*
+ enum AssumptionF {no_assumption_f, P2_f, unavailable_hessian, mv_P2_f, quadratic_f,linear_f};
+ enum AssumptionG {without_constraints, no_assumption_g, P1_g, mv_P1_g, linear_g};
+ */
+
+//Case dependant initialization of unused_name_param
+//exemple : AF==no_assumption_f && AG==without_constraints ==> no constraint related named parameter should be used (index 2,3,4,6 - first integer is how many are not used)
+void OptimIpopt::E_Ipopt::InitUNP()
+{
+ if(AF==no_assumption_f && AG==no_assumption_g) {} //no unused named parameter
+ if(AF==no_assumption_f && AG==without_constraints) AddElements(unused_name_param,4,2,3,4,6);
+ if(AF==no_assumption_f && AG==P1_g) AddElements(unused_name_param,1,4);
+ if(AF==no_assumption_f && AG==mv_P1_g) AddElements(unused_name_param,1,4);
+ if(AF==no_assumption_f && AG==linear_g) AddElements(unused_name_param,1,4);
+ if(AF==P2_f && AG==P1_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==P2_f && AG==without_constraints) AddElements(unused_name_param,8,2,3,4,5,6,7,8,12);
+ if(AF==P2_f && AG==no_assumption_g) AddElements(unused_name_param,1,5);
+ if(AF==P2_f && AG==mv_P1_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==P2_f && AG==linear_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==unavailable_hessian && AG==no_assumption_g) AddElements(unused_name_param,1,5);
+ if(AF==unavailable_hessian && AG==without_constraints) AddElements(unused_name_param,7,2,3,4,5,6,7,8);
+ if(AF==unavailable_hessian && AG==P1_g) AddElements(unused_name_param,4,4,5,7,8);
+ if(AF==unavailable_hessian && AG==mv_P1_g) AddElements(unused_name_param,4,4,5,7,8);
+ if(AF==unavailable_hessian && AG==linear_g) AddElements(unused_name_param,4,4,5,7,8);
+ if(AF==mv_P2_f && AG==without_constraints) AddElements(unused_name_param,8,2,3,4,5,6,7,8,12);
+ if(AF==mv_P2_f && AG==no_assumption_g) AddElements(unused_name_param,1,5);
+ if(AF==mv_P2_f && AG==P1_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==mv_P2_f && AG==mv_P1_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==mv_P2_f && AG==linear_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==quadratic_f && AG==without_constraints) AddElements(unused_name_param,8,2,3,4,5,6,7,8,12);
+ if(AF==quadratic_f && AG==no_assumption_g) AddElements(unused_name_param,1,5);
+ if(AF==quadratic_f && AG==P1_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==quadratic_f && AG==mv_P1_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==quadratic_f && AG==linear_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==linear_f && AG==without_constraints) AddElements(unused_name_param,8,2,3,4,5,6,7,8,12);
+ if(AF==linear_f && AG==no_assumption_g) AddElements(unused_name_param,1,5);
+ if(AF==linear_f && AG==P1_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==linear_f && AG==mv_P1_g) AddElements(unused_name_param,5,4,5,7,8,12);
+ if(AF==linear_f && AG==linear_g) AddElements(unused_name_param,5,4,5,7,8,12);
+}
+
+
+
+basicAC_F0::name_and_type OptimIpopt::E_Ipopt::name_param[]=
+{
+ //DONT CHANGE THE ORDER!!!! If some parameters need to be added, add them after the last one
+ //otherwize warning message of this interface will be a mess
+ {"lb", &typeid(KN_<double>) }, //0 - lower bound on optimization parameter X
+ {"ub", &typeid(KN_<double>) }, //1 - upper bound on optimization parameter X
+ {"clb", &typeid(KN_<double>) }, //2 - constraints lower bounds
+ {"cub", &typeid(KN_<double>) }, //3 - constraints upper bounds
+ {"structjacc",&typeid(E_Array)}, //4 - constraints jacobian structure
+ {"structhess",&typeid(E_Array)}, //5 - lagrangian hessian structure
+ {"lm", &typeid(KN_<double>)}, //6 - lagrange multiplier (for autostruct or to get their value at the end of the algorithm)
+ {"autostruct",&typeid(long)}, //7 - automatic structure determination
+ {"checkindex",&typeid(bool)}, //8 - whether to use the FindIndex function or not
+ {"tol", &typeid(double)}, //9 - stopping criteria tol
+ {"maxiter", &typeid(long)}, //10 - stopping criteria : maximum number of iterations
+ {"maxcputime",&typeid(double)}, //11 - stopping criteria : maximum CPU time
+ {"bfgs", &typeid(bool)}, //12 - force the bfgs hessian approximation
+ {"derivativetest", &typeid(string*)}, //13 - call the derivative checker
+ {"optfile", &typeid(string*)}, //14 - set the ipopt option file name (default is ipopt.opt)
+ {"printlevel",&typeid(long)}, //15 - controls IPOPT print level output
+ {"dth", &typeid(double)}, //16 - perturbation for finite difference derivative test
+ {"dttol", &typeid(double)}, //17 - relative tolerence for the derivative test error detection
+ {"fixedvar", &typeid(string*)}, //18 - remove the equality simple bounds from problem
+ {"warmstart", &typeid(bool)}, //19 - do we initialize multipliers with given values
+ {"uz", &typeid(KN_<double>) }, //20 - simple upper bounds dual variable
+ {"lz", &typeid(KN_<double>) }, //21 - simple lower bounds dual variable
+ {"muinit", &typeid(double) }, //22 - barrier parameter initialization
+ {"pivtol", &typeid(double) }, //23 - pivot tolerance for the linear solver
+ {"brf", &typeid(double) }, //24 - bounds relax factor
+ {"mustrategy",&typeid(string*) }, //25 - strategy for barrier parameter update
+ {"objvalue", &typeid(double*) }, //26 - to get the last objective function value
+ {"mumin", &typeid(double) }, //27 - minimal value for the barrier parameter
+ {"linesearch",&typeid(bool) } //28 - use the line search or not (if no, the usual Newton step is kept)
+ //{"osf", &typeid(double) } //26 - objective function scalling factor
+};
+
+
+
++<<<<<<< HEAD
+/* class Init { public:
++=======
++class Init { public:
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ Init();
+};
+
+static Init init;
++<<<<<<< HEAD
+*/
+static void Load_Init()
++=======
++
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ Global.Add("IPOPT","(",new OptimIpopt(Case<no_assumption_f,no_assumption_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<no_assumption_f,without_constraints>()));
+ //Global.Add("IPOPT","(",new OptimIpopt(Case<no_assumption_f,P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<no_assumption_f,mv_P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<no_assumption_f,linear_g>()));
+ /*Global.Add("IPOPT","(",new OptimIpopt(Case<P2_f,P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<P2_f,without_constraints>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<P2_f,no_assumption_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<P2_f,mv_P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<P2_f,linear_g>()));*/
+ Global.Add("IPOPT","(",new OptimIpopt(Case<unavailable_hessian,no_assumption_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<unavailable_hessian,without_constraints>()));
+ //Global.Add("IPOPT","(",new OptimIpopt(Case<unavailable_hessian,P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<unavailable_hessian,mv_P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<unavailable_hessian,linear_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<mv_P2_f,no_assumption_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<mv_P2_f,without_constraints>()));
+ //Global.Add("IPOPT","(",new OptimIpopt(Case<mv_P2_f,P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<mv_P2_f,mv_P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<mv_P2_f,linear_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<quadratic_f,no_assumption_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<quadratic_f,without_constraints>()));
+ //Global.Add("IPOPT","(",new OptimIpopt(Case<quadratic_f,P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<quadratic_f,mv_P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<quadratic_f,linear_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<linear_f,no_assumption_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<linear_f,without_constraints>()));
+ //Global.Add("IPOPT","(",new OptimIpopt(Case<linear_f,P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<linear_f,mv_P1_g>()));
+ Global.Add("IPOPT","(",new OptimIpopt(Case<linear_f,linear_g>()));
+}
+
+
+
+
+/*****************************************************************************************************************************
+ * Specialization of functions builders' constructor and operator()
+ *****************************************************************************************************************************/
+
+
+template<> FitnessFunctionDatas<no_assumption_f>::FitnessFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m)
+: GenericFitnessFunctionDatas()
+{
+ const Polymorphic * opJ = dynamic_cast<const Polymorphic *>(args[0].LeftValue()),
+ * opdJ = dynamic_cast<const Polymorphic *>(args[1].LeftValue()),
+ * opH = dynamic_cast<const Polymorphic *>(args[2].LeftValue());
+ ArrayOfaType hprototype2(atype<KN<R> *>(),atype<double>(),atype<KN<R>*>()),hprototype1(atype<KN<R> *>());
+ JJ = to<R>(C_F0(opJ,"(",theparam));
+ GradJ = to<Rn_>(C_F0(opdJ,"(",theparam));
+ if(opH->Find("(",hprototype2))
+ {
+ CompletelyNonLinearConstraints = true;
+ Hessian = to<Matrice_Creuse<R>* >(C_F0(opH,"(",theparam,objfact,L_m));
+ }
+ else if(opH->Find("(",hprototype1))
+ {
+ CompletelyNonLinearConstraints = false; //When constraints are affine, lagrange multipliers are not used in the hessian, obj_factor is also hidden to the user
+ Hessian = to<Matrice_Creuse<R>* >(C_F0(opH,"(",theparam));
+ }
+ else CompileError("Error, wrong hessian function prototype. Must be either (real[int] &) or (real[int] &,real,real[int] &)");
+}
+template<> void FitnessFunctionDatas<no_assumption_f>::operator()
+(Stack stack,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m,Expression const *nargs,ScalarFunc *&ffJ,VectorFunc *&ffdJ,SparseMatFunc *&ffH,bool warned) const
+{
+ ffJ = new GeneralFunc<R>(stack,JJ,theparam);
+ ffdJ = new GeneralFunc<Rn>(stack,GradJ,theparam);
+ if(CompletelyNonLinearConstraints) ffH = new GeneralSparseMatFunc(stack,Hessian,theparam,objfact,L_m);
+ else ffH = new GeneralSparseMatFunc(stack,Hessian,theparam);
+}
+
+
+template<> FitnessFunctionDatas<P2_f>::FitnessFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m)
+: GenericFitnessFunctionDatas()
+{
+ CompletelyNonLinearConstraints = false;
+ const Polymorphic * opJ = dynamic_cast<const Polymorphic *>(args[0].LeftValue()),* opdJ = dynamic_cast<const Polymorphic *>(args[1].LeftValue());
+ JJ = to<R>(C_F0(opJ,"(",theparam));
+ GradJ = to<Rn_>(C_F0(opdJ,"(",theparam));
+ Hessian = to<Matrice_Creuse<R> *>(args[2]);
+}
+template<> void FitnessFunctionDatas<P2_f>::operator()
+(Stack stack,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m,Expression const *nargs,ScalarFunc *&ffJ,VectorFunc *&ffdJ,SparseMatFunc *&ffH,bool warned) const
+{
+ if(warned && nargs[5])
+ {
+ cout << " ==> your lagrangian hessian is a constant matrix, so there is no need to specify its structure with ";
+ cout << OptimIpopt::E_Ipopt::name_param[5].name << endl;
+ cout << " since it is contained in the matrix object." << endl;
+ }
+ ffJ = new GeneralFunc<R>(stack,JJ,theparam);
+ ffdJ = new GeneralFunc<Rn>(stack,GradJ,theparam);
+ ffH = new ConstantSparseMatFunc(stack,Hessian);
+}
+
+
+template<> FitnessFunctionDatas<unavailable_hessian>::FitnessFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m)
+: GenericFitnessFunctionDatas()
+{
+ CompletelyNonLinearConstraints = false;
+ const Polymorphic * opJ = dynamic_cast<const Polymorphic *> (args[0].LeftValue()),* opdJ = dynamic_cast<const Polymorphic *>(args[1].LeftValue());
+ JJ = to<R>(C_F0(opJ,"(",theparam));
+ GradJ = to<Rn_>(C_F0(opdJ,"(",theparam));
+}
+template<> void FitnessFunctionDatas<unavailable_hessian>::operator()
+(Stack stack,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m,Expression const *nargs,ScalarFunc *&ffJ,VectorFunc *&ffdJ,SparseMatFunc *&ffH,bool warned) const
+{
+ if(warned && nargs[5])
+ {
+ cout << " ==> no hessian has been given, the LBFGS mode has been enabled, thus making ";
+ cout << OptimIpopt::E_Ipopt::name_param[5].name << " useless. You may also" << endl << " have forgoten a function (IPOPT will certainly crash if so)." << endl;
+ }
+ ffJ = new GeneralFunc<R>(stack,JJ,theparam);
+ ffdJ = new GeneralFunc<Rn>(stack,GradJ,theparam);
+ ffH = 0;
+}
+
+
+template<> FitnessFunctionDatas<mv_P2_f>::FitnessFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m)
+: GenericFitnessFunctionDatas()
+{
+ const E_Array *M_b = dynamic_cast<const E_Array *>(args[0].LeftValue());
+ if(M_b->nbitem() != 2) CompileError("\nSorry, we were expecting an array with two componants, either [M,b] or [b,M] for the affine constraints expression." );
+ bool order = true;
+ if(CheckMatrixVectorPair(M_b,order))
+ {
+ Hessian = to<Matrice_Creuse<R> *>((*M_b)[order ? 0:1]);
+ GradJ = to<Rn*>((*M_b)[order ? 1:0]); //This is gradJ evaluated on x=0
+ }
+}
+template<> void FitnessFunctionDatas<mv_P2_f>::operator()
+(Stack stack,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m,Expression const *nargs,ScalarFunc *&ffJ,VectorFunc *&ffdJ,SparseMatFunc *&ffH,bool warned) const
+{
+ if(warned && nargs[5])
+ {
+ cout << " ==> your lagrangian hessian is a constant matrix, so there is no need to specify its structure with ";
+ cout << OptimIpopt::E_Ipopt::name_param[5].name << endl;
+ cout << " since it is contained in the matrix object." << endl;
+ }
+ ffJ = new P2ScalarFunc(stack,Hessian,GradJ,true);
+ ffdJ = new P1VectorFunc(stack,Hessian,GradJ,true);
+ ffH = new ConstantSparseMatFunc(stack,Hessian);
+}
+
+
+template<> FitnessFunctionDatas<quadratic_f>::FitnessFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m)
+: GenericFitnessFunctionDatas() {Hessian = to<Matrice_Creuse<R> *>(args[0]);}
+template<> void FitnessFunctionDatas<quadratic_f>::operator()
+(Stack stack,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m,Expression const *nargs,ScalarFunc *&ffJ,VectorFunc *&ffdJ,SparseMatFunc *&ffH,bool warned) const
+{
+ if(warned && nargs[5])
+ {
+ cout << " ==> your lagrangian hessian is a constant matrix, so there is no need to specify its structure with ";
+ cout << OptimIpopt::E_Ipopt::name_param[5].name << endl;
+ cout << " since it is contained in the matrix object." << endl;
+ }
+ ffJ = new P2ScalarFunc(stack,Hessian,0,true);
+ ffdJ = new P1VectorFunc(stack,Hessian,0,true);
+ ffH = new ConstantSparseMatFunc(stack,Hessian);
+}
+
+
+template<> FitnessFunctionDatas<linear_f>::FitnessFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m)
+: GenericFitnessFunctionDatas() {GradJ = to<Rn *>(args[0]);}
+template<> void FitnessFunctionDatas<linear_f>::operator()
+(Stack stack,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &L_m,Expression const *nargs,ScalarFunc *&ffJ,VectorFunc *&ffdJ,SparseMatFunc *&ffH,bool warned) const
+{
+ if(warned && nargs[5])
+ {
+ cout << " ==> your lagrangian hessian is a null matrix, so there is no need to specify its structure with ";
+ cout << OptimIpopt::E_Ipopt::name_param[5].name << endl;
+ cout << " since it is empty." << endl;
+ }
+ ffJ = new P2ScalarFunc(stack,0,GradJ);
+ ffdJ = new P1VectorFunc(stack,0,GradJ);
+ ffH = 0;
+}
+
+
+
+
+template<> ConstraintFunctionDatas<without_constraints>::ConstraintFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam)
+: GenericConstraintFunctionDatas() {}
+template<> void ConstraintFunctionDatas<without_constraints>::operator()(Stack stack,const C_F0 &theparam,Expression const *nargs,VectorFunc *&ffC,SparseMatFunc *&ffdC,bool warned) const
+{
+ if(warned)
+ {
+ if(nargs[2] || nargs[3]) cout << " ==> Some constraints bounds have been defined while no constraints function has been passed." << endl;
+ if(nargs[4]) cout << " ==> A structure has been provided for the constraints jacobian but there is no constraint function." << endl;
+ if(nargs[6]) cout << " ==> Unconstrained problem make the use of " << OptimIpopt::E_Ipopt::name_param[6].name << " pointless (see the documentation for more details)." << endl;
+ }
+ ffC = 0;
+ ffdC = 0;
+}
+
+template<> ConstraintFunctionDatas<no_assumption_g>::ConstraintFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam)
+: GenericConstraintFunctionDatas()
+{
+ int nbj = args.size()-1;
+ const Polymorphic * opG = dynamic_cast<const Polymorphic *> (args[nbj-2].LeftValue()),
+ * opjG= dynamic_cast<const Polymorphic *> (args[nbj-1].LeftValue());
+ Constraints = to<Rn_>(C_F0(opG,"(",theparam));
+ GradConstraints = to<Matrice_Creuse<R>*>(C_F0(opjG,"(",theparam));
+}
+template<> void ConstraintFunctionDatas<no_assumption_g>::operator()(Stack stack,const C_F0 &theparam,Expression const *nargs,VectorFunc *&ffC,SparseMatFunc *&ffdC,bool) const
+{
+ ffC = new GeneralFunc<Rn>(stack,Constraints,theparam);
+ ffdC = new GeneralSparseMatFunc(stack,GradConstraints,theparam);
+}
+
+template<> ConstraintFunctionDatas<P1_g>::ConstraintFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam)
+: GenericConstraintFunctionDatas()
+{
+ int nbj = args.size()-1;
+ const Polymorphic * opG = dynamic_cast<const Polymorphic *> (args[nbj-2].LeftValue());
+ Constraints = to<Rn_>(C_F0(opG,"(",theparam));
+ GradConstraints = to<Matrice_Creuse<R> *>(args[nbj-1]);
+}
+template<> void ConstraintFunctionDatas<P1_g>::operator()(Stack stack,const C_F0 &theparam,Expression const *nargs,VectorFunc *&ffC,SparseMatFunc *&ffdC,bool warned) const
+{
+ if(warned && nargs[4])
+ {
+ cout << " ==> your constraints jacobian is a constant matrix, there is no need to specify its structure with " << OptimIpopt::E_Ipopt::name_param[4].name << endl;
+ cout << " since it is contained in the matrix object." << endl;
+ }
+ ffC = new GeneralFunc<Rn>(stack,Constraints,theparam);
+ ffdC = new ConstantSparseMatFunc(stack,GradConstraints);
+}
+
+template<> ConstraintFunctionDatas<mv_P1_g>::ConstraintFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam)
+: GenericConstraintFunctionDatas()
+{
+ int nbj = args.size()-1;
+ const E_Array *M_b = dynamic_cast<const E_Array *>(args[nbj-1].LeftValue());
+ if(M_b->nbitem() != 2) CompileError("\nSorry, we were expecting an array with two componants, either [M,b] or [b,M] for the affine constraints expression." );
+ bool order=true;
+ if(CheckMatrixVectorPair(M_b,order))
+ {
+ GradConstraints = to<Matrice_Creuse<R> *>((*M_b)[order ? 0:1]);
+ Constraints = to<Rn*>((*M_b)[order ? 1:0]); //Constraint on x=0
+ }
+ else CompileError("\nWrong types in the constraints [matrix,vector] pair, expecting a sparse matrix and real[int].");
+}
+template<> void ConstraintFunctionDatas<mv_P1_g>::operator()(Stack stack,const C_F0 &theparam,Expression const *nargs,VectorFunc *&ffC,SparseMatFunc *&ffdC,bool warned) const
+{
+ if(warned && nargs[4])
+ {
+ cout << " ==> your constraints jacobian is a constant matrix, there is no need to specify its structure with " << OptimIpopt::E_Ipopt::name_param[4].name << endl;
+ cout << " since it is contained in the matrix object." << endl;
+ }
+ ffC = new P1VectorFunc(stack,GradConstraints,Constraints);
+ ffdC = new ConstantSparseMatFunc(stack,GradConstraints);
+}
+
+template<> ConstraintFunctionDatas<linear_g>::ConstraintFunctionDatas(const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam)
+: GenericConstraintFunctionDatas()
+{
+ int nbj = args.size()-1;
+ GradConstraints = to<Matrice_Creuse<R> *>(args[nbj-1]);
+}
+template<> void ConstraintFunctionDatas<linear_g>::operator()(Stack stack,const C_F0 &theparam,Expression const *nargs,VectorFunc *&ffC,SparseMatFunc *&ffdC,bool warned) const
+{
+ if(warned && nargs[4])
+ {
+ cout << " ==> your constraints jacobian is a constant matrix, there is no need to specify its structure with " << OptimIpopt::E_Ipopt::name_param[4].name << endl;
+ cout << " since it is contained in the matrix object." << endl;
+ }
+ ffC = new P1VectorFunc(stack,GradConstraints,0);
+ ffdC = new ConstantSparseMatFunc(stack,GradConstraints);
+}
+
+
+GenericFitnessFunctionDatas* GenericFitnessFunctionDatas::New(AssumptionF AF,const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam,const C_F0 &objfact,const C_F0 &lm)
+{
+ switch (AF)
+ {
+ case no_assumption_f:
+ return new FitnessFunctionDatas<no_assumption_f>(args,nargs,theparam,objfact,lm);
+ break;
+ case P2_f:
+ return new FitnessFunctionDatas<P2_f>(args,nargs,theparam,objfact,lm);
+ break;
+ case unavailable_hessian:
+ return new FitnessFunctionDatas<unavailable_hessian>(args,nargs,theparam,objfact,lm);
+ break;
+ case mv_P2_f:
+ return new FitnessFunctionDatas<mv_P2_f>(args,nargs,theparam,objfact,lm);
+ break;
+ case quadratic_f:
+ return new FitnessFunctionDatas<quadratic_f>(args,nargs,theparam,objfact,lm);
+ break;
+ case linear_f:
+ return new FitnessFunctionDatas<linear_f>(args,nargs,theparam,objfact,lm);
+ break;
+ default:
+ return 0;
+ break;
+ }
+}
+
+GenericConstraintFunctionDatas* GenericConstraintFunctionDatas::New(AssumptionG AG,const basicAC_F0 &args,Expression const *nargs,const C_F0 &theparam)
+{
+ switch (AG)
+ {
+ case no_assumption_g:
+ return new ConstraintFunctionDatas<no_assumption_g>(args,nargs,theparam);
+ break;
+ case without_constraints:
+ return new ConstraintFunctionDatas<without_constraints>(args,nargs,theparam);
+ break;
+ case P1_g:
+ return new ConstraintFunctionDatas<P1_g>(args,nargs,theparam);
+ break;
+ case mv_P1_g:
+ return new ConstraintFunctionDatas<mv_P1_g>(args,nargs,theparam);
+ break;
+ case linear_g:
+ return new ConstraintFunctionDatas<linear_g>(args,nargs,theparam);
+ break;
+ default:
+ return 0;
+ break;
+ }
+}
+
+/*
+ enum AssumptionF {undeff,no_assumption_f, P2_f, unavailable_hessian, mv_P2_f, quadratic_f, linear_f};
+ enum AssumptionG {undefg,without_constraints, no_assumption_g, P1_g, mv_P1_g, linear_g};
+ */
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
diff --cc examples++-load/ff-NLopt.cpp.orig
index 0994528,0000000..a2bca4e
mode 100644,000000..100644
--- a/examples++-load/ff-NLopt.cpp.orig
+++ b/examples++-load/ff-NLopt.cpp.orig
@@@ -1,878 -1,0 +1,891 @@@
+/*
+ * ff-NLopt.cpp
+ *
+ *
+ * Created by Sylvain Auliac on 25/05/11.
+ *
+ */
+
+//ff-c++-LIBRARY-dep: nlopt
+//ff-c++-cpp-dep:
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Sylvain Auliac
+// E-MAIL : auliac at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#include <iostream>
+#include <stack>
+#include <vector>
+using namespace std;
+#include "ff++.hpp"
+
+#include <nlopt.hpp>
+
+
+extern Block *currentblock;
+
+typedef double R;
+typedef double (*NLoptFuncType)(unsigned,const double *,double *,void*);
+
+template<nlopt::algorithm ALGO> struct Info {static const bool DF=true,SA=false; static const char *name;};//DF=Derivative Free , SA=need a Sub Algorithm
+template<> struct Info<nlopt::LD_LBFGS_NOCEDAL> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_LBFGS> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_VAR1> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_VAR2> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_TNEWTON> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_TNEWTON_RESTART> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_TNEWTON_PRECOND> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_TNEWTON_PRECOND_RESTART> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_MMA> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::LD_AUGLAG> {static const bool DF=false,SA=true; static const char *name;};
+template<> struct Info<nlopt::LD_AUGLAG_EQ> {static const bool DF=false,SA=true; static const char *name;};
+template<> struct Info<nlopt::LD_SLSQP> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::GD_STOGO> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::GD_STOGO_RAND> {static const bool DF=false,SA=false; static const char *name;};
+template<> struct Info<nlopt::GD_MLSL> {static const bool DF=false,SA=true; static const char *name;};
+template<> struct Info<nlopt::GD_MLSL_LDS> {static const bool DF=false,SA=true; static const char *name;};
+template<> struct Info<nlopt::GN_MLSL> {static const bool DF=true,SA=true; static const char *name;};
+template<> struct Info<nlopt::GN_MLSL_LDS> {static const bool DF=true,SA=true; static const char *name;};
+template<> struct Info<nlopt::LN_AUGLAG> {static const bool DF=true,SA=true; static const char *name;};
+template<> struct Info<nlopt::LN_AUGLAG_EQ> {static const bool DF=true,SA=true; static const char *name;};
+template<> struct Info<nlopt::G_MLSL> {static const bool DF=true,SA=true; static const char *name;};
+template<> struct Info<nlopt::G_MLSL_LDS> {static const bool DF=true,SA=true; static const char *name;};
+template<> struct Info<nlopt::AUGLAG> {static const bool DF=true,SA=true; static const char *name;};
+template<> struct Info<nlopt::AUGLAG_EQ> {static const bool DF=true,SA=true; static const char *name;};
+
+
+
+template<nlopt::algorithm ALGO> const char *Info<ALGO>::name = "ALGORITHM";
+template<> const char *Info<nlopt::GN_DIRECT>::name = "Dividing Rectangles";
+template<> const char *Info<nlopt::GN_DIRECT_L>::name = "Locally Biased Dividing Rectangles";
+template<> const char *Info<nlopt::GN_DIRECT_L_RAND>::name = "Randomized Locally Biased Dividing Rectangles";
+template<> const char *Info<nlopt::GN_DIRECT_NOSCAL>::name = "Dividing Rectangles (no scaling)";
+template<> const char *Info<nlopt::GN_DIRECT_L_NOSCAL>::name = "Locally Biased Dividing Rectangles (no scaling)";
+template<> const char *Info<nlopt::GN_DIRECT_L_RAND_NOSCAL>::name = "Randomized Locally Biased Dividing Rectangles (no scaling)";
+template<> const char *Info<nlopt::GN_ORIG_DIRECT>::name = "Original Glabonsky's Dividing Rectangles";
+template<> const char *Info<nlopt::GN_ORIG_DIRECT_L>::name = "Original Glabonsky's Locally Biased Dividing Rectangles";
+ const char *Info<nlopt::GD_STOGO>::name = "StoGO";
+ const char *Info<nlopt::GD_STOGO_RAND>::name = "Randomized StoGO";
+ const char *Info<nlopt::LD_LBFGS_NOCEDAL>::name = "Nocedal's Low-Storage BFGS";
+ const char *Info<nlopt::LD_LBFGS>::name = "Low-Storage BFGS";
+template<> const char *Info<nlopt::LN_PRAXIS>::name = "Principal Axis";
+ const char *Info<nlopt::LD_VAR1>::name = "Rank-1 Shifted Limited Memory Variable Metric";
+ const char *Info<nlopt::LD_VAR2>::name = "Rank-2 Shifted Limited Memory Variable Metric";
+ const char *Info<nlopt::LD_TNEWTON>::name = "Truncated Newton";
+ const char *Info<nlopt::LD_TNEWTON_RESTART>::name = "Steepest Descent Restarting Truncated Newton";
+ const char *Info<nlopt::LD_TNEWTON_PRECOND>::name = "BFGS Preconditionned Truncated Newton";
+ const char *Info<nlopt::LD_TNEWTON_PRECOND_RESTART>::name = "BFGS Precondionned Truncated Newton with Steepest Descent Resrtarting";
+template<> const char *Info<nlopt::GN_CRS2_LM>::name = "Controlled Random Search with Local Mutation";
+ const char *Info<nlopt::GN_MLSL>::name = "Multi-Level Single-Linkage (derivative free)";
+ const char *Info<nlopt::GD_MLSL>::name = "Multi-Level Single-Linkage (with gradient-based local search)";
+ const char *Info<nlopt::GN_MLSL_LDS>::name = "Low Discrepancy Sequence Multi-Level Single-Linkage (derivative free)";
+ const char *Info<nlopt::GD_MLSL_LDS>::name = "Low Discrepancy Sequence Multi-Level Single-Linkage (with gradient-based local search)";
+ const char *Info<nlopt::LD_MMA>::name = "Method of Moving Asymptotes";
+template<> const char *Info<nlopt::LN_COBYLA>::name = "Constrained Optimization by Linear Approximations";
+template<> const char *Info<nlopt::LN_NEWUOA>::name = "NEWUOA";
+template<> const char *Info<nlopt::LN_NEWUOA_BOUND>::name = "NEWUOA for bounded optimization";
+template<> const char *Info<nlopt::LN_NELDERMEAD>::name = "Nelder-Mead Simplex";
+template<> const char *Info<nlopt::LN_SBPLX>::name = "Subplex";
+ const char *Info<nlopt::LN_AUGLAG>::name = "Inequality/Equality Constraints Augmented Lagrangian (derivative free)";
+ const char *Info<nlopt::LD_AUGLAG>::name = "Inequality/Equality Constraints Augmented Lagrangian (with gradient-based subsidiary search)";
+ const char *Info<nlopt::LN_AUGLAG_EQ>::name = "Equality Constraints Augmented Lagrangian (derivative free)";
+ const char *Info<nlopt::LD_AUGLAG_EQ>::name = "Equality Constraints Augmented Lagrangian (with gradient-based subsidiary search)";
+template<> const char *Info<nlopt::LN_BOBYQA>::name = "BOBYQA";
+template<> const char *Info<nlopt::GN_ISRES>::name = "Improved Stochastic Ranking Evolution Strategy";
+ const char *Info<nlopt::LD_SLSQP>::name = "Sequential Least-Squares Quadratic Programming";
+ const char *Info<nlopt::G_MLSL>::name = "Multi-Level Single-Linkage";
+ const char *Info<nlopt::G_MLSL_LDS>::name = "Low Discrepancy Multi-level Single-Linkage";
+ const char *Info<nlopt::AUGLAG>::name = "Inequality/Equality Constraints Augmented Lagrangian";
+ const char *Info<nlopt::AUGLAG_EQ>::name = "Equality Constraints Augmented Lagrangian";
+
+
+
+inline void Sonde(int i) {cout << "sonde " << i << endl;}
+
+
+typedef KN_<R> Rn_;
+typedef KN<R> Rn;
+typedef KNM_<R> Rnm_;
+typedef KNM<R> Rnm;
+
+/*template<class T> inline std::vector<T> KnToStdVect(const KN<T> &V)
+{
+ std::vector<T> v(V.n);
+ for(int i=0;i<v.size();++i) v[i] = V[i];
+ return v;
+}*/
+
+template<class T> inline std::vector<T> KnToStdVect(const KN_<T> &V)
+{
+ std::vector<T> v(V.n);
+ for(int i=0;i<v.size();++i) v[i] = V[i];
+ return v;
+}
+
+
+
+template<class K> class ffcalfunc // to call the freefem function .. J, constraints, and derivatives
+{
+ public:
+ Stack stack;
+ Expression JJ,theparame;
+
+ ffcalfunc(const ffcalfunc &f) : stack(f.stack),JJ(f.JJ),theparame(f.theparame) {}
+ ffcalfunc(Stack s,Expression JJJ,Expression epar) : stack(s),JJ(JJJ), theparame(epar) {}
+ K J(Rn_ x) const
+ {
+ KN<double> *p=GetAny<KN<double> *>( (*theparame)(stack) );
+ *p=x;
+ K ret= GetAny<K>( (*JJ)(stack));
+ //cout << "call to ffcalfunc.J with " << *p << " and ret=" << ret << endl;
+ WhereStackOfPtr2Free(stack)->clean();
+ return ret;
+ }
+};
+
+
+typedef ffcalfunc<double> * ScalarFunc;
+typedef ffcalfunc<Rn> * VectorFunc;
+typedef ffcalfunc<Rnm> * MatrixFunc;
+
+
+class GenericOptimizer
+{
+ public:
+ /*GenericOptimizer(nlopt::algorithm ALGO) : opt(ALGO,0),x(0),econsttol(0),iconsttol(0),econstrained(false),iconstrained(false),fit(0),d_fit(0),equaconst(0),
+ d_equaconst(0),ineqconst(0),d_ineqconst(0),subopt(0)
+ {}*/
+ GenericOptimizer(nlopt::algorithm ALGO,int dim=0) : opt(ALGO,dim),x(0),econsttol(0),iconsttol(0),econstrained(false),iconstrained(false),fit(0),d_fit(0),equaconst(0),
+ d_equaconst(0),ineqconst(0),d_ineqconst(0),subopt(0)
+ {}
+ GenericOptimizer(nlopt::algorithm ALGO,const ffcalfunc<R> &_ff,Rn &xstart) : opt(ALGO,xstart.n),x(&xstart),econsttol(0),iconsttol(0),econstrained(false),iconstrained(false),
+ fit(new ffcalfunc<R>(_ff)),d_fit(0),equaconst(0),d_equaconst(0),ineqconst(0),d_ineqconst(0),subopt(0)
+ {
+ opt.set_min_objective(NLoptFunc, static_cast<void*>(this));
+ }
+ virtual ~GenericOptimizer()
+ {
+ Clean(fit);
+ Clean(d_fit);
+ Clean(equaconst);
+ Clean(d_equaconst);
+ Clean(ineqconst);
+ Clean(d_ineqconst);
+ Clean(subopt);
+ }
+
+
+
+ double operator() ()
+ {
+ double minf;
+ vector<double> vv(x->n);
+ for(int i=0;i<vv.size();++i) vv[i] = (*x)[i];
+ opt.optimize(vv,minf);
+ for(int i=0;i<vv.size();++i) (*x)[i] = vv[i];
+ return minf;
+ }
+
+ virtual bool DF() const {return true;}
+ virtual bool SA() const {return false;}
+ virtual const char * Name() const {return "Generic Algorithm";}
+ virtual nlopt::algorithm Tag() const = 0;
+
+ GenericOptimizer& SetEqualityConstraintsTolerance(const Rn_ &val) {econsttol=val; return *this;}
+ GenericOptimizer& SetInequalityConstraintsTolerance(const Rn_ &val) {iconsttol=val; return *this;}
+ GenericOptimizer& SetSCXRelativeTolerance(const double val) {opt.set_xtol_rel(val); return *this;} //SC = stopping criteria
+ GenericOptimizer& SetSCXAbsoluteTolerance(const Rn_ &val) {opt.set_xtol_abs(KnToStdVect(val)); return *this;}
+ GenericOptimizer& SetLowerBounds(const Rn_ &lb) {opt.set_lower_bounds(KnToStdVect(lb)); return *this;}
+ GenericOptimizer& SetUpperBounds(const Rn_ &ub) {opt.set_upper_bounds(KnToStdVect(ub)); return *this;}
+ GenericOptimizer& SetSCStopFunctionValue(const double val) {opt.set_stopval(val); return *this;}
+ GenericOptimizer& SetSCRelativeFunctionTolerance(const double val) {opt.set_ftol_rel(val); return *this;}
+ GenericOptimizer& SetSCAbsoluteFunctionTolerance(const double val) {opt.set_ftol_abs(val); return *this;}
+ GenericOptimizer& SetSCMaxFunctionEvaluations(const long val) {opt.set_maxeval(val); return *this;}
+ GenericOptimizer& SetSCEllapsedTime(const double val) {opt.set_maxtime(val); return *this;}
+ GenericOptimizer& SetPopulationSize(const int val) {opt.set_population(static_cast<unsigned>(val)); return *this;}
+ virtual GenericOptimizer& SetVectorStorage(const int val) {opt.set_vector_storage(static_cast<unsigned>(val)); return *this;}
+
+ GenericOptimizer& SetObjectiveFunctionGradient(const ffcalfunc<Rn> &g) {Clean(d_fit) = new ffcalfunc<Rn>(g); return *this;}
+ GenericOptimizer& SetEqualityConstraintFunction(const ffcalfunc<Rn> &f) {Clean(equaconst) = new ffcalfunc<Rn>(f); return *this;}
+ GenericOptimizer& SetEqualityConstraintGradient(const ffcalfunc<Rnm> &g) {Clean(d_equaconst) = new ffcalfunc<Rnm>(g); return *this;}
+ GenericOptimizer& SetInequalityConstraintFunction(const ffcalfunc<Rn> &f) {Clean(ineqconst) = new ffcalfunc<Rn>(f); return *this;}
+ GenericOptimizer& SetInequalityConstraintGradient(const ffcalfunc<Rnm> &g) {Clean(d_ineqconst) = new ffcalfunc<Rnm>(g); return *this;}
+
+
+
+ GenericOptimizer& SetEqualityConstraints()
+ {
+ if(econstrained) opt.remove_equality_constraints();
+ Rn etestv = equaconst->J(*x);
+ if(econsttol.n==0) {econsttol.resize(etestv.n); econsttol = 1.e-12;}
+ else assert(econsttol.n == etestv.n);
+ opt.add_equality_mconstraint(NLoptECDF,static_cast<void*>(this),KnToStdVect(econsttol));
+ econstrained = true;
+ return *this;
+ }
+ GenericOptimizer& SetInequalityConstraints()
+ {
+ if(iconstrained) opt.remove_inequality_constraints();
+ Rn itestv = ineqconst->J(*x);
+ //cout << "itestv = " << itestv << "(x=" << *x << ")" << endl;
+ if(iconsttol.n==0) {iconsttol.resize(itestv.n); iconsttol = 1.e-12;}
+ else assert(iconsttol.n == itestv.n);
+ opt.add_inequality_mconstraint(NLoptICDF,static_cast<void*>(this),KnToStdVect(iconsttol));
+ iconstrained = true;
+ return *this;
+ }
+
+ static double NLoptFunc(const std::vector<double> &xx,std::vector<double> &grad, void *data)
+ {
+ GenericOptimizer * pthis = static_cast<GenericOptimizer *>(data);
+ int n = xx.size();
+ Rn X(n);
+ for(int i=0;i<n;++i) X[i] = xx[i];
+ //cout << "grad: " << grad << "d_fit.top():" << d_fit.top() << endl;
+ if(grad.size() && pthis->d_fit)
+ {
+ Rn dJ=pthis->d_fit->J(X);
+ for(int i=0;i<n;++i) grad[i] = dJ[i];
+ }
+ //cout << "call to NLoptFunc with x=" << X << endl;
+ return pthis->fit->J(X);
+ }
+ static void NLoptECDF(unsigned m,double *result,unsigned n,const double *xx,double *grad,void *data)
+ {
+ GenericOptimizer * pthis = static_cast<GenericOptimizer *>(data);
+ if(pthis->equaconst)
+ {
+ Rn X(n);
+ for(int k=0;k<n;++k) X[k] = xx[k];
+ Rn Y=pthis->equaconst->J(X);
+ assert(Y.n==m);
+ for(int i=0;i<m;++i) result[i] = Y[i];
+ if(grad)
+ {
+ assert(pthis->d_equaconst);
+ Rnm dconst=pthis->d_equaconst->J(X);
+ assert(dconst.N()==m && dconst.M()==n);
+ for(int i=0;i<m;++i)
+ for(int j=0;j<n;++j) grad[i*n + j] = dconst(i,j);
+ }
+ }
+ else
+ {
+ for(int i=0;i<m;++i)
+ {
+ result[i] = 0;
+ if(grad) for(int j=0;j<n;++j) grad[i*n+j]=0;
+ }
+ }
+ }
+ static void NLoptICDF(unsigned m,double *result,unsigned n,const double *xx,double *grad,void *data)
+ {
+ GenericOptimizer * pthis = static_cast<GenericOptimizer *>(data);
+ if(pthis->ineqconst)
+ {
+ Rn X(n);
+ for(int k=0;k<n;++k) X[k] = xx[k];
+ Rn Y=pthis->ineqconst->J(X);
+ assert(Y.N()==m);
+ for(int i=0;i<m;++i) result[i] = Y[i];
+ if(grad)
+ {
+ assert(pthis->d_ineqconst);
+ Rnm dconst=pthis->d_ineqconst->J(X);
+ assert(dconst.N()==m && dconst.M()==n);
+ for(int i=0;i<m;++i)
+ for(int j=0;j<n;++j) grad[i*n + j] = dconst(i,j);
+ }
+ }
+ else
+ {
+ for(int i=0;i<m;++i)
+ {
+ result[i] = 0;
+ if(grad) for(int j=0;j<n;++j) grad[i*n+j]=0;
+ }
+ }
+ }
+
+
+
+
+ nlopt::opt opt,*subopt;
+ Rn *x,econsttol,iconsttol;
+ bool iconstrained,econstrained;
+ ScalarFunc fit;
+ VectorFunc d_fit,equaconst,ineqconst;
+ MatrixFunc d_equaconst,d_ineqconst;
+ private:
+ GenericOptimizer();
+ template<class T> static T*& Clean(T*& p)
+ {
+ if(p) delete p;
+ p=0;
+ return p;
+ }
+};
+
+
+
+
+
+template<nlopt::algorithm ALGO> class Optimizer : public GenericOptimizer
+{
+ public:
+
+ Optimizer(int dim=0) : GenericOptimizer(ALGO,dim) {}
+ Optimizer(const ffcalfunc<R> &_ff,Rn &xstart) : GenericOptimizer(ALGO,_ff,xstart) {}
+ ~Optimizer() {}
+
+
+ bool DF() const {return Info<ALGO>::DF;}
+ bool SA() const {return Info<ALGO>::SA;}
+ nlopt::algorithm Tag() const {return ALGO;}
+ const char * Name() const {return Info<ALGO>::name;}
+
+ private:
+};
+
+
+
+template<bool a> struct MyCheck {MyCheck() {} };
+template<> struct MyCheck<false>
+{
+ private:
+ MyCheck() {}
+};
+
+template<nlopt::algorithm ALGO> class SAOptimizer : public GenericOptimizer
+{
+ public:
+
+ SAOptimizer(int dim=0) : GenericOptimizer(ALGO,dim),subopt(0) {MyCheck<Info<ALGO>::SA>();}
+ SAOptimizer(const ffcalfunc<R> &_ff,Rn &xstart) : GenericOptimizer(ALGO,_ff,xstart),subopt(0) {MyCheck<Info<ALGO>::SA>();}
+ ~SAOptimizer() {if(subopt) delete subopt; subopt=0;}
+
+ GenericOptimizer *subopt;
+
+ bool DF() const {return Info<ALGO>::DF && (subopt ? subopt->DF() : false);}
+ bool SA() const {return true;}
+ nlopt::algorithm Tag() const {return ALGO;}
+ const char * Name() const {return Info<ALGO>::name;}
+
+ GenericOptimizer& SetSubOptimizer(const string & name=string(),bool save= 1);
+ GenericOptimizer& SetSASCXRelativeTolerance(const double val) {if(subopt) subopt->opt.set_xtol_rel(val); return *this;} //SC = stopping criteria
+ GenericOptimizer& SetSASCXAbsoluteTolerance(const Rn_ &val) {if(subopt) subopt->opt.set_xtol_abs(KnToStdVect(val)); return *this;}
+ GenericOptimizer& SetSASCStopFunctionValue(const double val) {if(subopt) subopt->opt.set_stopval(val); return *this;}
+ GenericOptimizer& SetSASCRelativeFunctionTolerance(const double val) {if(subopt) subopt->opt.set_ftol_rel(val); return *this;}
+ GenericOptimizer& SetSASCAbsoluteFunctionTolerance(const double val) {if(subopt) subopt->opt.set_ftol_abs(val); return *this;}
+ GenericOptimizer& SetSASCMaxFunctionEvaluations(const long val) {if(subopt) subopt->opt.set_maxeval(val); return *this;}
+ GenericOptimizer& SetSASCEllapsedTime(const double val) {if(subopt) subopt->opt.set_maxtime(val); return *this;}
+ GenericOptimizer& SetSAPopulationSize(const int val) {if(subopt) subopt->opt.set_population(static_cast<unsigned>(val));return *this;}
+ GenericOptimizer& SetVectorStorage(const int val) {if(subopt) subopt->opt.set_vector_storage(static_cast<unsigned>(val)); return *this;}
+
+};
+template<nlopt::algorithm ALGO> GenericOptimizer& SAOptimizer<ALGO>::SetSubOptimizer(const string &name,bool save)
+{
+ if(!subopt)
+ {
+ if(name=="DIRECT") subopt = new Optimizer<nlopt::GN_DIRECT>(x->n);
+ else if(name=="DIRECTL") subopt = new Optimizer<nlopt::GN_DIRECT_L>(x->n);
+ else if(name=="DIRECTLRand") subopt = new Optimizer<nlopt::GN_DIRECT_L_RAND>(x->n);
+ else if(name=="DIRECTNoScal") subopt = new Optimizer<nlopt::GN_DIRECT_NOSCAL>(x->n);
+ else if(name=="DIRECTLNoScal") subopt = new Optimizer<nlopt::GN_DIRECT_L_NOSCAL>(x->n);
+ else if(name=="DIRECTLRandNoScal") subopt = new Optimizer<nlopt::GN_DIRECT_L_RAND_NOSCAL>(x->n);
+ else if(name=="OrigDIRECT") subopt = new Optimizer<nlopt::GN_ORIG_DIRECT>(x->n);
+ else if(name=="OrigDIRECTL") subopt = new Optimizer<nlopt::GN_ORIG_DIRECT_L>(x->n);
+ else if(name=="StoGO") subopt = new Optimizer<nlopt::GD_STOGO>(x->n);
+ else if(name=="StoGORand") subopt = new Optimizer<nlopt::GD_STOGO_RAND>(x->n);
+ else if(name=="LBFGS") subopt = new Optimizer<nlopt::LD_LBFGS>(x->n);
+ else if(name=="PRAXIS") subopt = new Optimizer<nlopt::LN_PRAXIS>(x->n);
+ else if(name=="Var1") subopt = new Optimizer<nlopt::LD_VAR1>(x->n);
+ else if(name=="Var2") subopt = new Optimizer<nlopt::LD_VAR2>(x->n);
+ else if(name=="TNewton") subopt = new Optimizer<nlopt::LD_TNEWTON>(x->n);
+ else if(name=="TNewtonRestart") subopt = new Optimizer<nlopt::LD_TNEWTON_RESTART>(x->n);
+ else if(name=="TNewtonPrecond") subopt = new Optimizer<nlopt::LD_TNEWTON_PRECOND>(x->n);
+ else if(name=="TNewtonPrecondRestart") subopt = new Optimizer<nlopt::LD_TNEWTON_PRECOND_RESTART>(x->n);
+ else if(name=="CRS2") subopt = new Optimizer<nlopt::GN_CRS2_LM>(x->n);
+ else if(name=="MMA") subopt = new Optimizer<nlopt::LD_MMA>(x->n);
+ else if(name=="COBYLA") subopt = new Optimizer<nlopt::LN_COBYLA>(x->n);
+ else if(name=="NEWUOA") subopt = new Optimizer<nlopt::LN_NEWUOA>(x->n);
+ else if(name=="NEWUOABound") subopt = new Optimizer<nlopt::LN_NEWUOA_BOUND>(x->n);
+ else if(name=="NelderMead") subopt = new Optimizer<nlopt::LN_NELDERMEAD>(x->n);
+ else if(name=="Sbplx") subopt = new Optimizer<nlopt::LN_SBPLX>(x->n);
+ else if(name=="BOBYQA") subopt = new Optimizer<nlopt::LN_BOBYQA>(x->n);
+ else if(name=="ISRES") subopt = new Optimizer<nlopt::GN_ISRES>(x->n);
+ else if(name=="SLSQP") subopt = new Optimizer<nlopt::LD_SLSQP>(x->n);
+ else cout << "Warning: unknown or unauthorized optimizer name passed as sub algorithm to " << Info<ALGO>::name << endl;
+ }
+ if(subopt && save) opt.set_local_optimizer(subopt->opt);
+ return *this;
+}
+
+
+
+
+
+template<nlopt::algorithm ALGO,bool SA=Info<ALGO>::SA> class OptimNLopt : public OneOperator
+{
+ public:
+ const int cas;
+
+ class E_NLopt : public E_F0mps
+ {
+ public:
+ const int cas;
+ static basicAC_F0::name_and_type name_param[] ;
+ static const int n_name_param =18;
+ Expression nargs[n_name_param];
+ Expression X;
+ C_F0 inittheparam,theparam,closetheparam;
+ Expression JJ;
+ Expression GradJ,EIConst,EGradIConst,EEConst,EGradEConst;
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ R arg(int i,Stack stack,R a) const{ return nargs[i] ? GetAny<R>( (*nargs[i])(stack) ): a;}
+ Rn_ arg(int i,Stack stack,Rn_ a) const {return nargs[i] ? GetAny<Rn_>((*nargs[2])(stack)) : a;}
+ template<typename T> T Arg(int i,Stack s) const {return GetAny<T>( (*nargs[i])(s));}
+
+ E_NLopt(const basicAC_F0 & args,int cc) : cas(cc)
+ {
+ int nbj= args.size()-1;
+ Block::open(currentblock); // make a new block to
+ X = to<Rn*>(args[nbj]);
+ C_F0 X_n(args[nbj],"n");
+ // the expression to init the theparam of all
+ inittheparam = currentblock->NewVar<LocalVariable>("the parameter",atype<KN<R> *>(),X_n);
+ theparam = currentblock->Find("the parameter"); // the expression for the parameter
+ args.SetNameParam(n_name_param,name_param,nargs);
+ const Polymorphic * opJ=0;
+ if (nbj>0)
+ {
+ opJ= dynamic_cast<const Polymorphic *>(args[0].LeftValue());
+ assert(opJ);
+ }
+ JJ= to<R>(C_F0(opJ,"(",theparam));
+ const Polymorphic * gradient = nargs[0] ? dynamic_cast<const Polymorphic *>(nargs[0]) : 0,
+ * iconst = nargs[1] ? dynamic_cast<const Polymorphic *>(nargs[1]) : 0,
+ * gradiconst = nargs[2] ? dynamic_cast<const Polymorphic *>(nargs[2]) : 0,
+ * econst = nargs[3] ? dynamic_cast<const Polymorphic *>(nargs[3]) : 0,
+ * gradeconst = nargs[4] ? dynamic_cast<const Polymorphic *>(nargs[4]) : 0;
+ if(gradient) GradJ = to<Rn_>(C_F0(gradient,"(",theparam));
+ if(iconst) EIConst = to<Rn_>(C_F0(iconst,"(",theparam));
+ if(gradiconst) EGradIConst = to<Rnm_>(C_F0(gradiconst,"(",theparam));
+ if(econst) EEConst = to<Rn_>(C_F0(econst,"(",theparam));
+ if(gradeconst) EGradEConst = to<Rnm_>(C_F0(gradeconst,"(",theparam));
+ closetheparam=currentblock->close(currentblock); // the cleanning block expression
+ }
+
+ virtual AnyType operator()(Stack stack) const
+ {
+ double cost = 1e100;
+ WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+ Rn &x = *GetAny<Rn *>((*X)(stack));
+ long n=x.N();
+
+ const bool gradient = nargs[0] ? dynamic_cast<const Polymorphic *>(nargs[0]) : 0,
+ iconst = nargs[1] ? dynamic_cast<const Polymorphic *>(nargs[1]) : 0,
+ gradiconst = nargs[2] ? dynamic_cast<const Polymorphic *>(nargs[2]) : 0,
+ econst = nargs[3] ? dynamic_cast<const Polymorphic *>(nargs[3]) : 0,
+ gradeconst = nargs[4] ? dynamic_cast<const Polymorphic *>(nargs[4]) : 0;
+
+ long iprint = verbosity;
+ ffcalfunc<double> ffJ(stack,JJ,theparam);
+
+ Optimizer<ALGO> optim(ffJ,x);
+ if(nargs[5]) optim.SetLowerBounds(Arg<Rn_>(5,stack));
+ if(nargs[6]) optim.SetUpperBounds(Arg<Rn_>(6,stack));
+ if(nargs[7]) optim.SetSCStopFunctionValue(Arg<R>(7,stack));
+ if(nargs[8]) optim.SetEqualityConstraintsTolerance(Arg<Rn_>(8,stack));
+ if(nargs[9]) optim.SetSCXRelativeTolerance(Arg<R>(9,stack));
+ if(nargs[10]) optim.SetSCXAbsoluteTolerance(Arg<Rn_>(10,stack));
+ if(nargs[11]) optim.SetSCRelativeFunctionTolerance(Arg<R>(11,stack));
+ if(nargs[12]) optim.SetSCAbsoluteFunctionTolerance(Arg<R>(12,stack));
+ if(nargs[13]) optim.SetSCMaxFunctionEvaluations(Arg<long>(13,stack));
+ if(nargs[14]) optim.SetSCEllapsedTime(Arg<R>(14,stack));
+ if(nargs[15]) optim.SetInequalityConstraintsTolerance(Arg<Rn_>(15,stack));
+ if(nargs[16]) optim.SetPopulationSize(static_cast<int>(Arg<long>(16,stack)));
+ if(nargs[17])
+ {
+ optim.SetVectorStorage(static_cast<int> (Arg<long>(17,stack)));
+ if(optim.DF()) cout << "Warning: in " << optim.Name() << " algorithm - using nGradStored is pointless (no gradient to store in a derivative free context)." << endl;
+ else if(ALGO==nlopt::LD_SLSQP || ALGO==nlopt::LD_MMA) cout << "Warning: nGradStored can't be used with " << optim.Name() << ", parameter will be ignored." << endl;
+ }
+
+ if(econst) optim.SetEqualityConstraintFunction(ffcalfunc<Rn>(stack,EEConst,theparam));
+ if(iconst) optim.SetInequalityConstraintFunction(ffcalfunc<Rn>(stack,EIConst,theparam));
+
+ if(optim.DF())
+ {
+ if(gradient) cout << "Warning: in " << optim.Name() << " algorithm - derivative free algorithm will ignore the objective function gradient." << endl;
+ if(gradiconst)
+ {
+ cout << "Warning: in " << optim.Name() << " algorithm - derivative free algorithm will ignore the inequality constraints gradient." << endl;
+ if(!iconst) cout << "Also note that this gradient has been provided for an inexisting set of inequality constraints!" << endl;
+ }
+ if(gradeconst)
+ {
+ cout << "Warning: in " << optim.Name() << " algorithm - derivative free algorithm will ignore the equality constraints gradient." << endl;
+ if(!econst) cout << "Also note that this gradient has been provided for an inexisting set of equality constraints!" << endl;
+ }
+ }
+ else
+ {
+ if(gradient) optim.SetObjectiveFunctionGradient(ffcalfunc<Rn>(stack,GradJ,theparam));
+ else cout << "Warning: in " << optim.Name() << " algorithm - no objective function gradient has been provided (choose a derivative free algorithm if it is not available)." << endl;
+
+ if(econst)
+ {
+ if(gradeconst) optim.SetEqualityConstraintGradient(ffcalfunc<Rnm>(stack,EGradEConst,theparam));
+ else cout << "Warning: in " << optim.Name() << " algorithm - no equality constraints gradients has been provided." << endl;
+ }
+ else if(gradeconst) cout << "Warning: in " << optim.Name() << " algorithm - gradients have been provided for an inexisting set of equality constraints." << endl;
+
+ if(iconst)
+ {
+ if(gradiconst) optim.SetInequalityConstraintGradient(ffcalfunc<Rnm>(stack,EGradIConst,theparam));
+ else cout << "Warning: in " << optim.Name() << " algorithm - no inequality constraints gradients has been provided." << endl;
+ }
+ else if(gradiconst)cout << "Warning: in " << optim.Name() << " algorithm - gradients have been provided for an inexisting set of inequality constraints." << endl;
+ }
+
+ if(econst) optim.SetEqualityConstraints();
+ if(iconst) optim.SetInequalityConstraints();
+
+ if(verbosity>1) cout << Info<ALGO>::name << " starting..." << endl;
+ try {cost = optim();}
+ catch(nlopt::roundoff_limited) {cout << " nlopt roundoff limited" << endl;}
+ catch(nlopt::forced_stop) { cout << " nlopt forced stop" << endl;}
+ catch(std::runtime_error) {cout << "runtime error" << endl;}
+ catch(std::invalid_argument) {cout << "invalid argument" << endl;}
+ catch(std::bad_alloc) {cout << "bad alloc" << endl;}
+
+ //x = KN_<double>(optim.xbestever(),optim.dimension());
+ //cout << "Number of fitness evalution(s) : " << optim.eval() << endl;
+
+ closetheparam.eval(stack); // clean memory
+ WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+ return cost; //SetAny<long>(0); Modif FH july 2005
+ }
+
+ operator aType () const { return atype<double>();}
+ };
+
+ E_F0 * code(const basicAC_F0 & args) const {return new E_NLopt(args,cas);}
+
+ OptimNLopt(int c) : OneOperator(atype<double>(),atype<Polymorphic*>(),atype<KN<R> *>()),cas(c){}
+};
+
+
+template<nlopt::algorithm ALGO,bool SA> basicAC_F0::name_and_type OptimNLopt<ALGO,SA>::E_NLopt::name_param[]=
+{
+ {"grad", &typeid(Polymorphic*) },
+ {"IConst", &typeid(Polymorphic*) },
+ {"gradIConst", &typeid(Polymorphic*) },
+ {"EConst", &typeid(Polymorphic*) },
+ {"gradEConst", &typeid(Polymorphic*) },
+ {"lb", &typeid(KN_<double>) },
+ {"ub", &typeid(KN_<double>) },
+ {"stopFuncValue", &typeid(double) },
+ {"tolEConst", &typeid(KN_<double>) },
+ {"stopRelXTol", &typeid(double) },
+ {"stopAbsXTol", &typeid(KN_<double>) },
+ {"stopRelFTol", &typeid(double) },
+ {"stopAbsFTol", &typeid(double) },
+ {"stopMaxFEval", &typeid(long) },
+ {"stopTime", &typeid(double) },
+ {"tolIConst", &typeid(KN_<double>) },
+ {"popSize", &typeid(long) },
+ {"nGradStored", &typeid(long) }
+};
+
+
+
+
+template<nlopt::algorithm ALGO> class OptimNLopt<ALGO,true> : public OneOperator
+{
+ public:
+ const int cas;
+
+ class E_NLopt : public E_F0mps
+ {
+ public:
+ const int cas;
+ static basicAC_F0::name_and_type name_param[] ;
+ static const int n_name_param =27;
+ Expression nargs[n_name_param];
+ Expression X;
+ C_F0 inittheparam,theparam,closetheparam;
+ Expression JJ;
+ Expression GradJ,EIConst,EGradIConst,EEConst,EGradEConst;
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ R arg(int i,Stack stack,R a) const{ return nargs[i] ? GetAny<R>( (*nargs[i])(stack) ): a;}
+ Rn_ arg(int i,Stack stack,Rn_ a) const {return nargs[i] ? GetAny<Rn_>((*nargs[2])(stack)) : a;}
+ template<typename T> T Arg(int i,Stack s) const {return GetAny<T>( (*nargs[i])(s));}
+
+ E_NLopt(const basicAC_F0 & args,int cc) : cas(cc)
+ {
+ int nbj= args.size()-1;
+ Block::open(currentblock); // make a new block to
+ X = to<Rn*>(args[nbj]);
+ C_F0 X_n(args[nbj],"n");
+ // the expression to init the theparam of all
+ inittheparam = currentblock->NewVar<LocalVariable>("the parameter",atype<KN<R> *>(),X_n);
+ theparam = currentblock->Find("the parameter"); // the expression for the parameter
+ args.SetNameParam(n_name_param,name_param,nargs);
+ const Polymorphic * opJ=0;
+ if (nbj>0)
+ {
+ opJ= dynamic_cast<const Polymorphic *>(args[0].LeftValue());
+ assert(opJ);
+ }
+ JJ= to<R>(C_F0(opJ,"(",theparam));
+ const Polymorphic * gradient = nargs[0] ? dynamic_cast<const Polymorphic *>(nargs[0]) : 0,
+ * iconst = nargs[1] ? dynamic_cast<const Polymorphic *>(nargs[1]) : 0,
+ * gradiconst = nargs[2] ? dynamic_cast<const Polymorphic *>(nargs[2]) : 0,
+ * econst = nargs[3] ? dynamic_cast<const Polymorphic *>(nargs[3]) : 0,
+ * gradeconst = nargs[4] ? dynamic_cast<const Polymorphic *>(nargs[4]) : 0;
+ if(gradient) GradJ = to<Rn_>(C_F0(gradient,"(",theparam));
+ if(iconst) EIConst = to<Rn_>(C_F0(iconst,"(",theparam));
+ if(gradiconst) EGradIConst = to<Rnm_>(C_F0(gradiconst,"(",theparam));
+ if(econst) EEConst = to<Rn_>(C_F0(econst,"(",theparam));
+ if(gradeconst) EGradEConst = to<Rnm_>(C_F0(gradeconst,"(",theparam));
+ closetheparam=currentblock->close(currentblock); // the cleanning block expression
+ }
+
+ virtual AnyType operator()(Stack stack) const
+ {
+ double cost = 1e100;
+ WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+ Rn &x = *GetAny<Rn *>((*X)(stack));
+ long n=x.N();
+
+ const bool gradient = nargs[0] ? dynamic_cast<const Polymorphic *>(nargs[0]) : 0,
+ iconst = nargs[1] ? dynamic_cast<const Polymorphic *>(nargs[1]) : 0,
+ gradiconst = nargs[2] ? dynamic_cast<const Polymorphic *>(nargs[2]) : 0,
+ econst = nargs[3] ? dynamic_cast<const Polymorphic *>(nargs[3]) : 0,
+ gradeconst = nargs[4] ? dynamic_cast<const Polymorphic *>(nargs[4]) : 0;
+
+
+ long iprint = verbosity;
+ ffcalfunc<double> ffJ(stack,JJ,theparam);
+
+ SAOptimizer<ALGO> optim(ffJ,x);
+ if(nargs[5]) optim.SetLowerBounds(Arg<Rn_>(5,stack));
+ if(nargs[6]) optim.SetUpperBounds(Arg<Rn_>(6,stack));
+ if(nargs[7]) optim.SetSCStopFunctionValue(Arg<R>(7,stack));
+ if(nargs[8]) optim.SetEqualityConstraintsTolerance(Arg<Rn_>(8,stack));
+ if(nargs[9]) optim.SetSCXRelativeTolerance(Arg<R>(9,stack));
+ if(nargs[10]) optim.SetSCXAbsoluteTolerance(Arg<Rn_>(10,stack));
+ if(nargs[11]) optim.SetSCRelativeFunctionTolerance(Arg<R>(11,stack));
+ if(nargs[12]) optim.SetSCAbsoluteFunctionTolerance(Arg<R>(12,stack));
+ if(nargs[13]) optim.SetSCMaxFunctionEvaluations(Arg<long>(13,stack));
+ if(nargs[14]) optim.SetSCEllapsedTime(Arg<R>(14,stack));
+ if(nargs[15]) optim.SetInequalityConstraintsTolerance(Arg<Rn_>(15,stack));
+ if(nargs[16]) optim.SetPopulationSize(static_cast<int>(Arg<long>(16,stack)));
+ if(nargs[17]) optim.SetSubOptimizer(*Arg<string*>(17,stack),0);
+ else cout << "Warning: in " << optim.Name() << " algorithm - you have to specify a local optimizer, aboarting optimization (use the subOpt named parameter)." << endl;
+ if(nargs[18]) optim.SetSASCStopFunctionValue(Arg<R>(18,stack));
+ if(nargs[19]) optim.SetSASCXRelativeTolerance(Arg<R>(19,stack));
+ if(nargs[20]) optim.SetSASCXAbsoluteTolerance(Arg<Rn_>(20,stack));
+ if(nargs[21]) optim.SetSASCRelativeFunctionTolerance(Arg<R>(21,stack));
+ if(nargs[22]) optim.SetSASCAbsoluteFunctionTolerance(Arg<R>(22,stack));
+ if(nargs[23]) optim.SetSASCMaxFunctionEvaluations(Arg<long>(23,stack));
+ if(nargs[24]) optim.SetSASCEllapsedTime(Arg<R>(24,stack));
+ if(nargs[25]) optim.SetSAPopulationSize(static_cast<int>(Arg<long>(25,stack)));
+ if(nargs[26])
+ {
+ optim.SetVectorStorage(static_cast<int> (Arg<long>(26,stack)));
+ if(optim.DF()) cout << "Warning: in " << optim.subopt->Name() << " algorithm - using nGradStored is pointless (no gradient to store in a derivative free context)." << endl;
+ else if(optim.subopt->Tag()==nlopt::LD_SLSQP || optim.subopt->Tag()==nlopt::LD_MMA)
+ cout << "Warning: nGradStored can't be used with " << optim.Name() << ", parameter will be ignored." << endl;
+ }
+ optim.SetSubOptimizer();
+
+
+ if(econst) optim.SetEqualityConstraintFunction(ffcalfunc<Rn>(stack,EEConst,theparam));
+ if(iconst) optim.SetInequalityConstraintFunction(ffcalfunc<Rn>(stack,EIConst,theparam));
+
+ if(optim.subopt)
+ {
+ if(optim.subopt->DF())
+ {
+ if(gradient) cout << "Warning: in " << optim.Name() << " algorithm - derivative free sub-algorithm will ignore the objective function gradient." << endl;
+ if(gradiconst)
+ {
+ cout << "Warning: in " << optim.Name() << " algorithm - derivative free sub-algorithm will ignore the inequality constraints gradient." << endl;
+ if(!iconst) cout << "Also note that this gradient has been provided for an inexisting set of inequality constraints!" << endl;
+ }
+ if(gradeconst)
+ {
+ cout << "Warning: in " << optim.Name() << " algorithm - derivative free sub-algorithm will ignore the equality constraints gradient." << endl;
+ if(!econst) cout << "Also note that this gradient has been provided for an inexisting set of equality constraints!" << endl;
+ }
+ }
+ else
+ {
+ if(gradient) optim.SetObjectiveFunctionGradient(ffcalfunc<Rn>(stack,GradJ,theparam));
+ else cout << "Warning: in " << optim.Name() << " algorithm - no objective function gradient has been provided (choose a derivative free local search if it is not available)." << endl;
+
+ if(econst)
+ {
+ if(gradeconst) optim.SetEqualityConstraintGradient(ffcalfunc<Rnm>(stack,EGradEConst,theparam));
+ else cout << "Warning: in " << optim.Name() << " algorithm - no equality constraints gradients has been provided." << endl;
+ }
+ else if(gradeconst) cout << "Warning: in " << optim.Name() << " algorithm - gradients have been provided for an inexisting set of equality constraints." << endl;
+
+ if(iconst)
+ {
+ if(gradiconst) optim.SetInequalityConstraintGradient(ffcalfunc<Rnm>(stack,EGradIConst,theparam));
+ else cout << "Warning: in " << optim.Name() << " algorithm - no inequality constraints gradients has been provided." << endl;
+ }
+ else if(gradiconst)cout << "Warning: in " << optim.Name() << " algorithm - gradients have been provided for an inexisting set of inequality constraints." << endl;
+ }
+
+ if(econst) optim.SetEqualityConstraints();
+ if(iconst) optim.SetInequalityConstraints();
+
+ if(verbosity>1) cout << Info<ALGO>::name << " starting..." << endl;
+ try {cost = optim();}
+ catch(nlopt::roundoff_limited) {cout << " nlopt roundoff limited" << endl;}
+ catch(nlopt::forced_stop) { cout << " nlopt forced stop" << endl;}
+ catch(std::runtime_error) {cout << "runtime error" << endl;}
+ catch(std::invalid_argument) {cout << "invalid argument" << endl;}
+ catch(std::bad_alloc) {cout << "bad alloc" << endl;}
+ }
+ //x = KN_<double>(optim.xbestever(),optim.dimension());
+ //cout << "Number of fitness evalution(s) : " << optim.eval() << endl;
+
+ closetheparam.eval(stack); // clean memory
+ WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+ return cost; //SetAny<long>(0); Modif FH july 2005
+ }
+
+ operator aType () const { return atype<double>();}
+ };
+
+ E_F0 * code(const basicAC_F0 & args) const {return new E_NLopt(args,cas);}
+
+ OptimNLopt(int c) : OneOperator(atype<double>(),atype<Polymorphic*>(),atype<KN<R> *>()),cas(c){}
+};
+
+
+template<nlopt::algorithm ALGO> basicAC_F0::name_and_type OptimNLopt<ALGO,true>::E_NLopt::name_param[]=
+{
+ {"grad", &typeid(Polymorphic*) },
+ {"IConst", &typeid(Polymorphic*) },
+ {"gradIConst", &typeid(Polymorphic*) },
+ {"EConst", &typeid(Polymorphic*) },
+ {"gradEConst", &typeid(Polymorphic*) },
+ {"lb", &typeid(KN_<double>) },
+ {"ub", &typeid(KN_<double>) },
+ {"stopFuncValue", &typeid(double) },
+ {"tolEConst", &typeid(KN_<double>) },
+ {"stopRelXTol", &typeid(double) },
+ {"stopAbsXTol", &typeid(KN_<double>) },
+ {"stopRelFTol", &typeid(double) },
+ {"stopAbsFTol", &typeid(double) },
+ {"stopMaxFEval", &typeid(long) },
+ {"stopTime", &typeid(double) },
+ {"tolIConst", &typeid(KN_<double>) },
+ {"popSize", &typeid(long) }, //16
+ {"subOpt", &typeid(string*) },
+ {"SOStopFuncValue", &typeid(double) },
+ {"SOStopRelXTol", &typeid(double) },
+ {"SOStopAbsXTol", &typeid(KN_<double>) },
+ {"SOStopRelFTol", &typeid(double) },
+ {"SOStopAbsFTol", &typeid(double) },
+ {"SOStopMaxFEval", &typeid(long) },
+ {"SOStopTime", &typeid(double) },
+ {"SOPopSize", &typeid(long) },
+ {"nGradStored", &typeid(long) }
+};
+
+
+
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+static void Load_Init()
++=======
++class Init { public:
++ Init();
++};
++
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ Global.Add("nloptDIRECT", "(",new OptimNLopt<nlopt::GN_DIRECT>(1));
+ Global.Add("nloptDIRECTL", "(",new OptimNLopt<nlopt::GN_DIRECT_L>(1));
+ Global.Add("nloptDIRECTLRand", "(",new OptimNLopt<nlopt::GN_DIRECT_L_RAND>(1));
+ Global.Add("nloptDIRECTNoScal", "(",new OptimNLopt<nlopt::GN_DIRECT_NOSCAL>(1));
+ Global.Add("nloptDIRECTLNoScal", "(",new OptimNLopt<nlopt::GN_DIRECT_L_NOSCAL>(1));
+ Global.Add("nloptDIRECTLRandNoScal", "(",new OptimNLopt<nlopt::GN_DIRECT_L_RAND_NOSCAL>(1));
+ Global.Add("nloptOrigDIRECT", "(",new OptimNLopt<nlopt::GN_ORIG_DIRECT>(1));
+ Global.Add("nloptOrigDIRECTL", "(",new OptimNLopt<nlopt::GN_ORIG_DIRECT_L>(1));
+ Global.Add("nloptStoGO", "(",new OptimNLopt<nlopt::GD_STOGO>(1));
+ Global.Add("nloptStoGORand", "(",new OptimNLopt<nlopt::GD_STOGO_RAND>(1));
+ //Global.Add("nloptLBFGSNocedal", "(",new OptimNLopt<nlopt::LD_LBFGS_NOCEDAL>(1)); //Invalid argument
+ Global.Add("nloptLBFGS", "(",new OptimNLopt<nlopt::LD_LBFGS>(1));
+ Global.Add("nloptPRAXIS", "(",new OptimNLopt<nlopt::LN_PRAXIS>(1));
+ Global.Add("nloptVar1", "(",new OptimNLopt<nlopt::LD_VAR1>(1));
+ Global.Add("nloptVar2", "(",new OptimNLopt<nlopt::LD_VAR2>(1));
+ Global.Add("nloptTNewton", "(",new OptimNLopt<nlopt::LD_TNEWTON>(1));
+ Global.Add("nloptTNewtonRestart", "(",new OptimNLopt<nlopt::LD_TNEWTON_RESTART>(1));
+ Global.Add("nloptTNewtonPrecond", "(",new OptimNLopt<nlopt::LD_TNEWTON_PRECOND>(1));
+ Global.Add("nloptTNewtonPrecondRestart","(",new OptimNLopt<nlopt::LD_TNEWTON_PRECOND_RESTART>(1));
+ Global.Add("nloptCRS2", "(",new OptimNLopt<nlopt::GN_CRS2_LM>(1));
+ Global.Add("nloptMMA", "(",new OptimNLopt<nlopt::LD_MMA>(1));
+ Global.Add("nloptCOBYLA", "(",new OptimNLopt<nlopt::LN_COBYLA>(1));
+ Global.Add("nloptNEWUOA", "(",new OptimNLopt<nlopt::LN_NEWUOA>(1));
+ Global.Add("nloptNEWUOABound", "(",new OptimNLopt<nlopt::LN_NEWUOA_BOUND>(1));
+ Global.Add("nloptNelderMead", "(",new OptimNLopt<nlopt::LN_NELDERMEAD>(1));
+ Global.Add("nloptSbplx", "(",new OptimNLopt<nlopt::LN_SBPLX>(1));
+ Global.Add("nloptBOBYQA", "(",new OptimNLopt<nlopt::LN_BOBYQA>(1));
+ Global.Add("nloptISRES", "(",new OptimNLopt<nlopt::GN_ISRES>(1));
+ Global.Add("nloptSLSQP", "(",new OptimNLopt<nlopt::LD_SLSQP>(1));
+ Global.Add("nloptMLSL", "(",new OptimNLopt<nlopt::G_MLSL>(1));
+ Global.Add("nloptMLSLLDS", "(",new OptimNLopt<nlopt::G_MLSL_LDS>(1));
+ Global.Add("nloptAUGLAG", "(",new OptimNLopt<nlopt::AUGLAG>(1));
+ Global.Add("nloptAUGLAGEQ", "(",new OptimNLopt<nlopt::AUGLAG_EQ>(1));
+}
+
+
+
+
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/ff-cmaes.cpp.orig
index 0700f03,0000000..e01d37e
mode 100644,000000..100644
--- a/examples++-load/ff-cmaes.cpp.orig
+++ b/examples++-load/ff-cmaes.cpp.orig
@@@ -1,308 -1,0 +1,321 @@@
+
+//ff-c++-cpp-dep: cmaes.cpp
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Sylvain Auliac
+// E-MAIL : auliac at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+/*
+ This is a freefem interface of the Hansen's CMA-ES C optimizer.
+ The class CMAES is a quick C++ interface for the contents of the C files
+ then follow the real FreeFem++ stuff.
+*/
+
+
+#include <iostream>
+using namespace std;
+#include "ff++.hpp"
+
+#include "cmaes_interface.h"
+
+
+class CMAES //Abstract class, because the fitness function prototype may differ from users to users
+{
+ public:
+ //typedef double (*FFT)(double const *); //Fitness Function Type
+ CMAES() : pop(0),fitvals(0),evo() {}
+ CMAES(int d,double *xstart,double *stddev,long seed,int lambda,const char *ipf="initials.par") : pop(0),fitvals(0),evo()
+ {
+ fitvals = init(d,xstart,stddev,seed,lambda,ipf);
+ cout << SayHello() << endl;
+ }
+ virtual ~CMAES() {exit();}
+
+ void resume_distribution(char *filename) {return cmaes_resume_distribution(&evo, filename);}
+ double * const * & SamplePopulation() {return pop = cmaes_SamplePopulation(&evo);}
+ double * UpdateDistribution() {return cmaes_UpdateDistribution(&evo,fitvals);}
+ const char * TestForTermination() const {return cmaes_TestForTermination(&evo);}
+ double * const * & ReSampleSingle(int index) {return pop = cmaes_ReSampleSingle(&evo,index);}
+ double const * ReSampleSingle_old(double *rgx) {return cmaes_ReSampleSingle_old(&evo,rgx);}
+ void UpdateEigensystem(int flgforce) {return cmaes_UpdateEigensystem(&evo, flgforce);}
+ virtual void PopEval() =0;
+ //{for(int i=0;i<popsize();++i) fitvals[i] = ff(pop[i]);} //the thing to parralelize
+
+ double axisratio() const {return cmaes_Get(&evo,"axisratio");} //between lengths of longest and shortest principal axis of the distribution ellipsoid
+ int eval() const {return floor(cmaes_Get(&evo,"eval"));} //number of function evaluations
+ double fitness() const {return cmaes_Get(&evo,"fitness");} //recent best function evaluation
+ double fbestever() const {return cmaes_Get(&evo,"fbestever");} //ever best function value
+ int generation() const {return floor(cmaes_Get(&evo,"generation"));}
+ int maxeval() const {return floor(cmaes_Get(&evo,"maxeval"));} //maximal number of function evaluations
+ int maxgen() const {return floor(cmaes_Get(&evo,"maxgen"));} //maximal number of generations
+ double maxaxislength() const {return cmaes_Get(&evo,"maxaxislength");}
+ double minaxislength() const {return cmaes_Get(&evo,"minaxislength");}
+ double maxstddev() const {return cmaes_Get(&evo,"maxstddev");}
+ double minstddev() const {return cmaes_Get(&evo,"minstddev");}
+ int dimension() const {return floor(cmaes_Get(&evo,"dimension"));}
+ int popsize() const {return floor(cmaes_Get(&evo,"lambda"));}
+ double sigma() const {return cmaes_Get(&evo,"sigma");}
+ double * diagC() const {return const_cast<double*>(cmaes_GetPtr(&evo,"diag(C)"));}
+ double * diagD() const {return const_cast<double*>(cmaes_GetPtr(&evo,"diag(D)"));}
+ double * stddev() const {return const_cast<double*>(cmaes_GetPtr(&evo,"stddev"));}
+ double * xbestever() const {return const_cast<double*>(cmaes_GetPtr(&evo,"xbestever"));}
+ double * xbest() const {return const_cast<double*>(cmaes_GetPtr(&evo,"xbest"));}
+ double * xmean() const {return const_cast<double*>(cmaes_GetPtr(&evo,"xmean"));}
+
+ void ReadSignals(char const * filename) const {cmaes_ReadSignals(&evo,filename);}
+ char * SayHello() const {return cmaes_SayHello(&evo);}
+ void WriteToFile(char const * keyword,char const * output_filename) const {cmaes_WriteToFile(&evo,keyword,output_filename);}
+
+ virtual double * operator() ()
+ {
+ //ReadSignals("signals.par");
+ while(!TestForTermination())
+ {
+ SamplePopulation();
+ PopEval();
+ UpdateDistribution();
+ //ReadSignals("signals.par");
+ }
+ cout << "Stop : " << TestForTermination() << endl;
+ return xmean();
+ }
+ cmaes_t& optimizer() {return evo;}
+ protected:
+ double * const * pop;
+ double * fitvals;
+ private:
+ void exit() {cmaes_exit(&evo);}
+ double*& init(int dimension,double *xstart,double *stddev,long seed,int lambda,const char *input_parameter_filename)
+ {return fitvals = cmaes_init(&evo,dimension,xstart,stddev,seed,lambda,input_parameter_filename);}
+ mutable cmaes_t evo;
+};
+
+
+
+
+/*
+ Now comes the FreeFem ++ part :
+*/
+
+extern Block *currentblock;
+
+typedef double R;
+
+class OptimCMA_ES : public OneOperator
+{
+ public:
+ typedef KN<R> Kn;
+ typedef KN_<R> Kn_;
+ const int cas;
+
+
+ class ffcalfunc // to call the freefem function .. J
+ {
+ public:
+ Stack stack;
+ Expression JJ,theparame;
+
+ ffcalfunc(Stack s,Expression JJJ,Expression epar) : stack(s),JJ(JJJ), theparame(epar) {}
+ double J(Kn_ x) const
+ {
+ KN<double> *p=GetAny<KN<double> *>( (*theparame)(stack) );
+ *p=x;
+ double ret= GetAny<R>( (*JJ)(stack));
+ WhereStackOfPtr2Free(stack)->clean();
+ return ret;
+ }
+ };
+ class CMA_ES : public CMAES
+ {
+ public:
+ typedef KN<double> Rn;
+ typedef KN_<double> Rn_;
+
+
+ CMA_ES() : CMAES(),x(0),fit(0) {}
+ /*CMA_ES(ffcalfunc &_ff,int d,Rn &xstart,double *stddev,long seed,int lambda)
+ : CMAES(d,xstart.n ? xstart:0,stddev,seed,lambda,"non"),x(&xstart),fit(&_ff) {}
+ CMA_ES(ffcalfunc &_ff,int d,Rn &xstart,const Rn &stddev,long seed,int lambda)
+ : CMAES(d,xstart.n ? xstart:0,stddev,seed,lambda,"non"),x(&xstart),fit(&_ff) {}*/
+ CMA_ES(ffcalfunc &_ff,Rn &xstart,const Rn &stddev,long seed,int lambda)
+ : CMAES(xstart.n,xstart,stddev,seed,lambda,"non"),x(&xstart),fit(&_ff) {}
+ CMA_ES(ffcalfunc &_ff,Rn &xstart,const Rn &stddev,long seed,int lambda,const string &ipf)
+ : CMAES(xstart.n,xstart,stddev,seed,lambda,ipf.c_str()),x(&xstart),fit(&_ff) {}
+
+
+ void PopEval() {for(int i=0;i<popsize();++i) {Rn_ popi(pop[i],dimension()); fitvals[i] = fit->J(popi);}}
+ double * operator() () {return *x = Rn(x->n,CMAES::operator()());}
+ private:
+ ffcalfunc *fit;
+ Rn *x;
+ };
+
+
+
+ class E_CMA_ES: public E_F0mps
+ {
+ public:
+ const int cas;
+ static basicAC_F0::name_and_type name_param[] ;
+ static const int n_name_param =11;
+ Expression nargs[n_name_param];
+ Expression X;
+ C_F0 inittheparam,theparam,closetheparam;
+ Expression JJ;
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ R arg(int i,Stack stack,R a) const{ return nargs[i] ? GetAny<R>( (*nargs[i])(stack) ): a;}
+
+ E_CMA_ES(const basicAC_F0 & args,int cc) : cas(cc)
+ {
+ int nbj= args.size()-1;
+ Block::open(currentblock); // make a new block to
+ X = to<Kn*>(args[nbj]);
+ C_F0 X_n(args[nbj],"n");
+ // the expression to init the theparam of all
+ inittheparam = currentblock->NewVar<LocalVariable>("the parameter",atype<KN<R> *>(),X_n);
+ theparam = currentblock->Find("the parameter"); // the expression for the parameter
+ args.SetNameParam(n_name_param,name_param,nargs);
+ const Polymorphic * opJ=0;
+ if (nbj>0)
+ {
+ opJ= dynamic_cast<const Polymorphic *>(args[0].LeftValue());
+ assert(opJ);
+ }
+ JJ= to<R>(C_F0(opJ,"(",theparam));
+ closetheparam=currentblock->close(currentblock); // the cleanning block expression
+ }
+
+ virtual AnyType operator()(Stack stack) const
+ {
+ double cost = 1e100;
+ WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+ Kn &x = *GetAny<Kn *>((*X)(stack));
+ long n=x.N();
+ long seed = arg(0,stack,0L); //The seed for random numbers generation
+ double initialStdDev = arg(1,stack,0.3); //Initial standard deviation
+ KN<double> iSD(n,1.);
+ iSD *= initialStdDev;
+ KN<double> initialStdDevs(nargs[2] ? GetAny<KN_<double> >((*nargs[2])(stack)) : (KN_<double>)iSD);
+ //cout << "dans le dylib :" << initialStdDevs << endl;
+ double stopTolFun = arg(3,stack,1.E-12);
+ double stopTolFunHist = arg(4,stack,0.);
+ double stopTolX = arg(5,stack,0.);
+ double stopTolUpXFactor = arg(6,stack,1.E3);
+ long popsize = arg(7,stack,4 + (long) floor(3*log(n)));
+ //long mu = arg(8,stack,popsize/2);
+ string pipf = nargs[10] ? *GetAny<string*>((*nargs[10])(stack)) : string("") ;
+
+ long iprint = verbosity;
+ ffcalfunc ffJ(stack,JJ,theparam);
+
+ CMA_ES *optim=0;
+ if(pipf.size()>0)
+ {
+ cout << "input file : " << pipf << endl;
+ optim = new CMA_ES(ffJ,x,initialStdDevs,seed,popsize,pipf);
+ }
+ else
+ {
+ cout << "no input file " << endl;
+ optim = new CMA_ES(ffJ,x,initialStdDevs,seed,popsize);
+ long meval = arg(8,stack,static_cast<long>(optim->maxeval()));
+ long mgen = arg(9,stack,static_cast<long>(optim->maxgen()));
+ optim->optimizer().sp.stopTolFun = stopTolFun;
+ optim->optimizer().sp.stopTolFunHist = stopTolFunHist;
+ optim->optimizer().sp.stopTolX = stopTolX;
+ optim->optimizer().sp.stopTolUpXFactor = stopTolUpXFactor;
+ optim->optimizer().sp.stopMaxFunEvals = meval;
+ optim->optimizer().sp.stopMaxIter = mgen;
+ }
+
+ (*optim)();
+ cost = optim->fitness();
+ x = KN_<double>(optim->xbestever(),optim->dimension());
+ cout << "Number of fitness evalution(s) : " << optim->eval() << endl;
+
+ closetheparam.eval(stack); // clean memory
+
+ if(optim) {delete optim; optim=0;}
+ WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+ return cost; //SetAny<long>(0); Modif FH july 2005
+ }
+
+ operator aType () const { return atype<double>();}
+ };
+
+ E_F0 * code(const basicAC_F0 & args) const {return new E_CMA_ES(args,cas);}
+
+ OptimCMA_ES(int c) : OneOperator(atype<double>(),atype<Polymorphic*>(),atype<KN<R> *>()),cas(c){}
+};
+
+basicAC_F0::name_and_type OptimCMA_ES::E_CMA_ES::name_param[]=
+{
+ {"seed", &typeid(long) },
+ {"initialStdDev", &typeid(double) },
+ {"initialStdDevs", &typeid(KN_<double>) },
+ {"stopTolFun", &typeid(double) },
+ {"stopTolFunHist", &typeid(double) },
+ {"stopTolX", &typeid(double) },
+ {"stopTolUpXFactor",&typeid(double) },
+ {"popsize", &typeid(long) },
+ {"stopMaxFunEval", &typeid(long) },
+ {"stopMaxIter", &typeid(long) },
+ {"paramFile", &typeid(string*) }
+ //{"mu", &typeid(long) }
+};
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+static void Load_Init()
++=======
++class Init { public:
++ Init();
++};
++
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ Global.Add("cmaes","(",new OptimCMA_ES(1));
+
+}
+
+
+
+
+
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/ff-get-dep.in.orig
index 0000000,0000000..5a3f457
new file mode 100755
--- /dev/null
+++ b/examples++-load/ff-get-dep.in.orig
@@@ -1,0 -1,0 +1,99 @@@
++#!/bin/sh
++# ff-c++ `./ff-get-dep -ff metis.cpp`
++
++case "$1" in
++ -dlib)
++ shift
++<<<<<<< HEAD
++ awk -F: '/^[\/]+ff-c[+][+]-LIBRARY-dep:/ { printf("%s",$2); exit 0;}' $@
++=======
++ awk -F: '/ff-c[+][+]-LIBRARY-dep/ { print $2}' $@
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
++ exit 0;
++ ;;
++ -dcpp)
++ shift
++<<<<<<< HEAD
++ awk -F: '/^[\/]+ff-c[+][+]-cpp-dep:/ { printf("%s",$2); exit 0;}' $@
++=======
++ awk -F: '/ff-c[+][+]-cpp-dep/ { print $2}' $@
++ echo $@
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
++ exit 0;
++ ;;
++ -ff)
++ shift;
++<<<<<<< HEAD
++# ajout de lib with check
++ libs=`$0 -dlib $@`
++ cpp=`$0 -dcpp $@`" $@"
++=======
++ libs=`$0 -dlib $@`
++ cpp=`$0 -dcpp $@`
++ inclins=`$0 -i $libs`
++ ldlibs=`$0 -l $libs`
++ if [ -n "$ldlibs" -o -z "$libs" ]; then
++ echo "$cpp" "$inclins" "$ldlibs"
++ else
++ # FFCS - we need errors returns to insure that all compilations run well. ERROR is detected by ff-c++
++ echo "ERROR: find libs of $0 : $libs "
++ fi
++ exit 0;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
++ ;;
++esac
++dircommand=`dirname $0`
++if [ -f "WHERE_LIBRARY-download" ] ; then
++<<<<<<< HEAD
++dircommand="./"
++=======
++ dirwhere=.
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
++elif [ -f "$dircommand/WHERE_LIBRARY-download" ] ; then
++ dirwhere=$dircommand
++elif [ -f '@ff_prefix_dir@/lib/WHERE_LIBRARY-download' ] ; then
++ dirwhere='@ff_prefix_dir@/lib'
++else
++ echo " error no WHERE_LIBRARY file "
++ exit 1;
++fi
++cd "$dirwhere"
++wherel=WHERE_LIBRARY-download
++test -f WHERE_LIBRARY-config && wherel="$wherel WHERE_LIBRARY-config"
++test -f WHERE_LIBRARY && wherel="$wherel WHERE_LIBRARY"
++<<<<<<< HEAD
++awk -f ff-get-dep.awk -v libs="$libs" -v cpp="$cpp" $wherel
++exit $?
++=======
++
++
++case "$1" in
++ -i*)
++ shift;
++ for i in $@ ; do
++ # echo "$1"
++ # echo awk -v p="$1" -v m=INCLUDE ' ($1 == p) && ($2 == m) { for (i=3;i<=NF;++i) {print $i," ";}}' WHERE_LIBRARY WHERE_LIBRARY-download
++
++ # FFCS: print everything on the same line to avoid splitting paths containing spaces
++ awk -v p="$i" -v m=INCLUDE ' ($1 == p) && ($2 == m) && (!first){ first=1;for (i=3;i<=NF;++i) {printf("%s ",$i);}}' $wherel
++ done
++
++ ;;
++ -l*)
++ shift;
++ for i in $@ ; do
++
++ # FFCS: print everything on the same line to avoid splitting paths containing spaces
++ awk -v p="$i" -v m=LD ' ($1 == p) && ($2 == m) && (!first) {first=1; for (i=3;i<=NF;++i) {printf("%s ",$i);}}
++ END { if(!first) print "ERROR-missing-lib:" p;} ' $wherel
++ done
++ ;;
++ *)
++ for i in $@ ; do
++ awk -v p="$i" ' ($1 == p) { k=0; for (i=3;i<=NF;++i) {k=1;} print k}' $wherel
++ done
++
++shift;;
++esac
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/fflapack.cpp.orig
index 94aa2eb,0000000..7d8980d
mode 100644,000000..100644
--- a/examples++-load/fflapack.cpp.orig
+++ b/examples++-load/fflapack.cpp.orig
@@@ -1,970 -1,0 +1,995 @@@
+//ff-c++-LIBRARY-dep: lapack
+//ff-c++-LIBRARY-dep: blas
+#include "ff++.hpp"
+#include "RNM.hpp"
+#include "AFunction_ext.hpp" // Extension of "AFunction.hpp" to deal with more than 3 parameters function
+
+using namespace std;
+
+#ifdef __LP64__
+ typedef int intblas;
+ typedef int integer;
+#else
+ typedef long intblas;
+ typedef long integer;
+#endif
+
+typedef integer logical;
+typedef float LAPACK_real;
+typedef double doublereal;
+typedef logical (* L_fp)();
+typedef integer ftnlen;
+
+typedef complex<float> LAPACK_complex;
+typedef complex<double> doublecomplex;
+typedef void VOID;
+#define complex LAPACK_complex
+#define real LAPACK_real
+
+#include "clapack.h"
+#undef real
+#undef complex
++<<<<<<< HEAD
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+long lapack_inv(KNM<double>* A)
+{
+ intblas n=A->N();
+ intblas m=A->M();
+ double *a=&(*A)(0,0);
+ intblas info;
+ intblas lda=n;
+ KN<intblas> ipiv(n);
+ intblas lw=10*n;
+ KN<double> w(lw);
+ ffassert(n==m);
+ dgetrf_(&n,&n,a,&lda,ipiv,&info);
+ if(info) return info;
+ dgetri_(&n,a,&lda,ipiv,w,&lw,&info);
+ return info;
+}
+
+long lapack_inv(KNM<Complex>* A)
+{
+ intblas n=A->N();
+ intblas m=A->M();
+ Complex *a=&(*A)(0,0);
+ intblas info;
+ intblas lda=n;
+ KN<intblas> ipiv(n);
+ intblas lw=10*n;
+ KN<Complex> w(lw);
+ ffassert(n==m);
+ zgetrf_(&n,&n,a,&lda,ipiv,&info);
+ if(info) return info;
+ zgetri_(&n,a,&lda,ipiv,w,&lw,&info);
+ return info;
+}
+
+// (computation of the eigenvalues and right eigenvectors of a real nonsymmetric matrix)
+long lapack_dgeev(KNM<double> *const &A,KN<Complex> *const &vp,KNM<Complex> *const &vectp)
+{
+ /*
+ SUBROUTINE DGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
+ * JOBVL (input) CHARACTER*1
+ * = 'N': left eigenvectors of A are not computed;
+ * = 'V': left eigenvectors of A are computed.
+ *
+ * JOBVR (input) CHARACTER*1
+ * = 'N': right eigenvectors of A are not computed;
+ * = 'V': right eigenvectors of A are computed.
+ *
+ * N (input) INTEGER
+ * The order of the matrix A. N >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ * On entry, the N-by-N matrix A.
+ * On exit, A has been overwritten.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * WR (output) DOUBLE PRECISION array, dimension (N)
+ * WI (output) DOUBLE PRECISION array, dimension (N)
+ * WR and WI contain the real and imaginary parts,
+ * respectively, of the computed eigenvalues. Complex
+ * conjugate pairs of eigenvalues appear consecutively
+ * with the eigenvalue having the positive imaginary part
+ * first.
+ *
+ * VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
+ * If JOBVL = 'V', the left eigenvectors u(j) are stored one
+ * after another in the columns of VL, in the same order
+ * as their eigenvalues.
+ * If JOBVL = 'N', VL is not referenced.
+ * If the j-th eigenvalue is real, then u(j) = VL(:,j),
+ * the j-th column of VL.
+ * If the j-th and (j+1)-st eigenvalues form a complex
+ * conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
+ * u(j+1) = VL(:,j) - i*VL(:,j+1).
+ *
+ * LDVL (input) INTEGER
+ * The leading dimension of the array VL. LDVL >= 1; if
+ * JOBVL = 'V', LDVL >= N.
+ *
+ * VR (output) DOUBLE PRECISION array, dimension (LDVR,N)
+ * If JOBVR = 'V', the right eigenvectors v(j) are stored one
+ * after another in the columns of VR, in the same order
+ * as their eigenvalues.
+ * If JOBVR = 'N', VR is not referenced.
+ * If the j-th eigenvalue is real, then v(j) = VR(:,j),
+ * the j-th column of VR.
+ * If the j-th and (j+1)-st eigenvalues form a complex
+ * conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
+ * v(j+1) = VR(:,j) - i*VR(:,j+1).
+ *
+ * LDVR (input) INTEGER
+ * The leading dimension of the array VR. LDVR >= 1; if
+ * JOBVR = 'V', LDVR >= N.
+ *
+ * WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+ * On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+ *
+ * LWORK (input) INTEGER
+ * The dimension of the array WORK. LWORK >= max(1,3*N), and
+ * if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good
+ * performance, LWORK must generally be larger.
+ *
+ * If LWORK = -1, then a workspace query is assumed; the routine
+ * only calculates the optimal size of the WORK array, returns
+ * this value as the first entry of the WORK array, and no error
+ * message related to LWORK is issued by XERBLA.
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value.
+ * > 0: if INFO = i, the QR algorithm failed to compute all the
+ * eigenvalues, and no eigenvectors have been computed;
+ * elements i+1:N of WR and WI contain eigenvalues which
+ * have converged.
+ */
+ intblas n=A->N();
+ ffassert(A->M()==n);
+ ffassert(vectp->M()>=n);
+ ffassert(vectp->N()>=n);
+ ffassert(vp->N()>=n);
+ KN<double> wr(n),wi(n),w(1);
+ KNM<double> mat(*A),vr(n,n),vl(n,n);
+ intblas info,lw=-1;
+ char JOBVL='N',JOBVR='V';
+ dgeev_(&JOBVL,&JOBVR,&n,mat,&n,wr,wi,vl,&n,vr,&n,w,&lw,&info);
+ lw=w[0];
+ w.resize(lw);
+ //cout << mat << endl;
+ dgeev_(&JOBVL,&JOBVR,&n,mat,&n,wr,wi,vl,&n,vr,&n,w,&lw,&info);
+ //cout << wr << endl;
+ //cout << wi << endl;
+ if (info<0)
+ {
+ cout << " dgeev: the " << info << "-th argument had an illegal value." << endl;
+ (*vp)=Complex();
+ (*vectp)=Complex();
+ }
+ else if (info>0)
+ {
+ cout << " dgeev: the QR algorithm failed to compute all the eigenvalues, and no eigenvectors have been computed." << endl;
+ (*vp)=Complex();
+ (*vectp)=Complex();
+ }
+ else if (info==0)
+ {
+ for (int i=0;i<n;++i)
+ {
+ (*vp)[i]=Complex(wr[i],wi[i]);
+ if (verbosity>2)
+ cout << " dgeev: vp "<< i << " : " << (*vp)[i] << endl;
+ if (wi[i]==0)
+ for (int j=0;j<n;++j)
+ (*vectp)(j,i)=vr(j,i);
+ else if (wi[i]>0)
+ {
+ for (int j=0;j<n;++j)
+ (*vectp)(j,i)=Complex(vr(j,i),vr(j,i+1));
+ }
+ else if (wi[i]<0)
+ {
+ for (int j=0;j<n;++j)
+ (*vectp)(j,i)=Complex(vr(j,i-1),-vr(j,i));
+ }
+ if (verbosity>5)
+ cout << " dgeev: " << (*vectp)(':',i) <<endl;
+ }
+ }
+ return info;
+}
+
+// (computation of the eigenvalues and right eigenvectors of a complex nonsymmetric matrix)
+long lapack_zgeev(KNM<Complex> *const &A,KN<Complex> *const &vp,KNM<Complex> *const &vectp)
+{
+ intblas nvp =0,zero=0;
+ intblas n= A->N();
+ ffassert(A->M()==n);
+ ffassert(vectp->M()>=n);
+ ffassert(vectp->N()>=n);
+ ffassert(vp->N()>=n);
+ KN<Complex> w(n),vr(n*n),vl(n*n);
+ KNM<Complex> mat(*A);
+ intblas info,lw=n*(n+1)*10;
+ KN<Complex> wk(lw);
+ KN<double> rwk(2*n);
+
+ char N='N',V='V';
+ // lw=1;// to get opt size value
+ zgeev_(&N,&V,&n, mat,&n, w, vl,&n, vr,&n,wk,&lw,rwk,&info);
+ // cout << lw << " " << wk[0] << " " << info << endl;
+ /* lw=wk[0].real();
+ w.resize(lw);
+ zgeev_(&N,&V,&n, mat,&n, w, vl,&n, vr,&n,wk,&lw,rwk,&info);
+ */
+ if(info)
+ cout << " info = " << info << endl;
+ if(!info)
+ {
+ int k=0;
+ for(int i=0;i<n;++i)
+ {
+ (*vp)[i]=w[i];
+ if(verbosity>2)
+ cout << " zgeev: vp "<< i << " : " << (*vp)[i] << endl;
+ for(int j=0;j<n;++j)
+ (*vectp)(j,i)=vr[k++];
+ if(verbosity>5)
+ cout << " zgeev : " << (*vectp)(':',i) <<endl;
+ }
+ }
+ else
+ {
+ nvp=0;
+ (*vp)=Complex();
+ (*vectp)=Complex();
+ }
+ return nvp;
+}
+
+// VL, 10/02/2010
+long lapack_dggev(KNM<double> *const &A,KNM<double> *const &B,KN<Complex> *const &vpa,KN<double> *const &vpb,KNM<Complex> *const &vectp)
+{
+ intblas nvp =0,zero=0;
+ intblas n=A->N();
+ ffassert(A->M()==n);
+ ffassert(B->M()==n);
+ ffassert(B->N()==n);
+ ffassert(vectp->M()>=n);
+ ffassert(vectp->N()>=n);
+ ffassert(vpa->N()>=n);
+ ffassert(vpb->N()>=n);
+
+ KN<double> war(n),wai(n),wb(n),vr(n*n),vl(n*n);
+ KNM<double> matA(*A);
+ KNM<double> matB(*B);
+ intblas info,lw=-1;
+ KN<double> w(1);
+ //char N='N',V='V'; VL: do not compute eigenvectors (if yes, switch with following line)
+ char VL='N',VR='N';
+
+ dggev_(&VL,&VR,&n,matA,&n,matB,&n,war,wai,wb,vl,&n,vr,&n,w,&lw,&info);
+ lw=w[0];
+ // cout << lw << endl;
+ w.resize(lw);
+ dggev_(&VL,&VR,&n,matA,&n,matB,&n,war,wai,wb,vl,&n,vr,&n,w,&lw,&info);
+ if(info)
+ cout << " info = " << info << endl;
+ if(!info)
+ {
+ int k=0;
+ for(int i=0;i<n;++i)
+ {
+ (*vpa)[i]=Complex(war[i],wai[i]);
+ (*vpb)[i]=wb[i];
+ if(verbosity>2)
+ cout << " dggev: vp "<< i << " : " << (*vpa)[i] << " ; " << (*vpb)[i] << endl;
+ if( wai[i] == 0)
+ for(int j=0;j<n;++j)
+ (*vectp)(j,i)=vr[k++];
+ else if ( wai[i] > 0)
+ {
+ int ki= k+n;
+ for(int j=0;j<n;++j)
+ (*vectp)(j,i)=Complex(vr[k++],vr[ki++]);
+ }
+ else
+ {
+ int kr= k-n;
+ for(int j=0;j<n;++j)
+ (*vectp)(j,i)=Complex(vr[kr++],-vr[k++]);
+ }
+ if(verbosity>5)
+ cout << " dggev : " << (*vectp)(':',i) <<endl;
+ }
+ }
+ else
+ {
+ nvp=0;
+ (*vpa)=Complex();
+ (*vectp)=Complex();
+ }
+ return nvp;
+}
+
+// GL, 05/10/2011 (computation of all the eigenvalues and the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form A*x=(lambda)*B*x)
+long lapack_dsygvd(KNM<double> *const &A,KNM<double> *const &B,KN<double> *const &vp,KNM<double> *const &vectp)
+{
+ /*
+ SUBROUTINE DSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, IWORK, LIWORK, INFO )
+ * ITYPE (input) INTEGER
+ * Specifies the problem type to be solved:
+ * = 1: A*x = (lambda)*B*x
+ * = 2: A*B*x = (lambda)*x
+ * = 3: B*A*x = (lambda)*x
+ *
+ * JOBZ (input) CHARACTER*1
+ * = 'N': Compute eigenvalues only;
+ * = 'V': Compute eigenvalues and eigenvectors.
+ *
+ * UPLO (input) CHARACTER*1
+ * = 'U': Upper triangles of A and B are stored;
+ * = 'L': Lower triangles of A and B are stored.
+ *
+ * N (input) INTEGER
+ * The order of the matrices A and B. N >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
+ * On entry, the symmetric matrix A. If UPLO = 'U', the
+ * leading N-by-N upper triangular part of A contains the
+ * upper triangular part of the matrix A. If UPLO = 'L',
+ * the leading N-by-N lower triangular part of A contains
+ * the lower triangular part of the matrix A.
+ *
+ * On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+ * matrix Z of eigenvectors. The eigenvectors are normalized
+ * as follows:
+ * if ITYPE = 1 or 2, Z**T*B*Z = I;
+ * if ITYPE = 3, Z**T*inv(B)*Z = I.
+ * If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+ * or the lower triangle (if UPLO='L') of A, including the
+ * diagonal, is destroyed.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
+ * On entry, the symmetric matrix B. If UPLO = 'U', the
+ * leading N-by-N upper triangular part of B contains the
+ * upper triangular part of the matrix B. If UPLO = 'L',
+ * the leading N-by-N lower triangular part of B contains
+ * the lower triangular part of the matrix B.
+ *
+ * On exit, if INFO <= N, the part of B containing the matrix is
+ * overwritten by the triangular factor U or L from the Cholesky
+ * factorization B = U**T*U or B = L*L**T.
+ *
+ * LDB (input) INTEGER
+ * The leading dimension of the array B. LDB >= max(1,N).
+ *
+ * W (output) DOUBLE PRECISION array, dimension (N)
+ * If INFO = 0, the eigenvalues in ascending order.
+ *
+ * WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+ * On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+ *
+ * LWORK (input) INTEGER
+ * The dimension of the array WORK.
+ * If N <= 1, LWORK >= 1.
+ * If JOBZ = 'N' and N > 1, LWORK >= 2*N+1.
+ * If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
+ *
+ * If LWORK = -1, then a workspace query is assumed; the routine
+ * only calculates the optimal sizes of the WORK and IWORK
+ * arrays, returns these values as the first entries of the WORK
+ * and IWORK arrays, and no error message related to LWORK or
+ * LIWORK is issued by XERBLA.
+ *
+ * IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
+ * On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+ *
+ * LIWORK (input) INTEGER
+ * The dimension of the array IWORK.
+ * If N <= 1, LIWORK >= 1.
+ * If JOBZ = 'N' and N > 1, LIWORK >= 1.
+ * If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+ *
+ * If LIWORK = -1, then a workspace query is assumed; the
+ * routine only calculates the optimal sizes of the WORK and
+ * IWORK arrays, returns these values as the first entries of
+ * the WORK and IWORK arrays, and no error message related to
+ * LWORK or LIWORK is issued by XERBLA.
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ * > 0: DPOTRF or DSYEVD returned an error code:
+ * <= N: if INFO = i and JOBZ = 'N', then the algorithm
+ * failed to converge; i off-diagonal elements of an
+ * intermediate tridiagonal form did not converge to
+ * zero;
+ * if INFO = i and JOBZ = 'V', then the algorithm
+ * failed to compute an eigenvalue while working on
+ * the submatrix lying in rows and columns INFO/(N+1)
+ * through mod(INFO,N+1);
+ * > N: if INFO = N + i, for 1 <= i <= N, then the leading
+ * minor of order i of B is not positive definite.
+ * The factorization of B could not be completed and
+ * no eigenvalues or eigenvectors were computed.
+ */
+ intblas n=A->N();
+ ffassert(A->M()==n);
+ ffassert(B->M()==n);
+ ffassert(B->N()==n);
+ ffassert(vp->N()>=n);
+ ffassert(vectp->M()>=n);
+ ffassert(vectp->N()>=n);
+ KN<double> war(n),wai(n),wb(n),vr(n*n),vl(n*n);
+ KNM<double> matA(*A),matB(*B);
+ intblas itype=1,info,lw=-1;
+ KN<double> w(1);
+ KN<intblas> iw(1);
+ char JOBZ='V',UPLO='U';
+
+ dsygvd_(&itype,&JOBZ,&UPLO,&n,matA,&n,matB,&n,*vp,w,&lw,iw,&lw,&info);
+ lw=w[0];
+ w.resize(lw);
+ iw.resize(lw);
+ dsygvd_(&itype,&JOBZ,&UPLO,&n,matA,&n,matB,&n,*vp,w,&lw,iw,&lw,&info);
+ if (info<0)
+ {
+ cout << " dsygvd: the " << info << "-th argument had an illegal value." << endl;
+ }
+ else if (info>0)
+ {
+ cout << " dsygvd: DPOTRF or DSYEVD returned an error code." << endl;
+ }
+ else if (info==0)
+ {
+ for (int i=0;i<n;++i)
+ {
+ for (int i=0;i<n;++i)
+ {
+ for (int j=0;j<n;++j)
+ (*vectp)(j,i)=matA(j,i);
+ }
+ }
+ }
+ return info;
+}
+
+// GL,27/09/2011 (singular value decomposition of a rectangular real matrix)
+long lapack_dgesdd(KNM<double> *const &A,KNM<double> *const &U,KN<double> *const &S,KNM<double> *const &V)
+{
+ /*
+ SUBROUTINE DGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, IWORK, INFO )
+ * JOBZ (input) CHARACTER*1
+ * Specifies options for computing all or part of the matrix U:
+ * = 'A': all M columns of U and all N rows of V**T are
+ * returned in the arrays U and VT;
+ * = 'S': the first min(M,N) columns of U and the first
+ * min(M,N) rows of V**T are returned in the arrays U
+ * and VT;
+ * = 'O': If M >= N, the first N columns of U are overwritten
+ * on the array A and all rows of V**T are returned in
+ * the array VT;
+ * otherwise, all columns of U are returned in the
+ * array U and the first M rows of V**T are overwritten
+ * in the array A;
+ * = 'N': no columns of U or rows of V**T are computed.
+ *
+ * M (input) INTEGER
+ * The number of rows of the input matrix A. M >= 0.
+ *
+ * N (input) INTEGER
+ * The number of columns of the input matrix A. N >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ * On entry, the M-by-N matrix A.
+ * On exit,
+ * if JOBZ = 'O', A is overwritten with the first N columns
+ * of U (the left singular vectors, stored
+ * columnwise) if M >= N;
+ * A is overwritten with the first M rows
+ * of V**T (the right singular vectors, stored
+ * rowwise) otherwise.
+ * if JOBZ .ne. 'O', the contents of A are destroyed.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,M).
+ *
+ * S (output) DOUBLE PRECISION array, dimension (min(M,N))
+ * The singular values of A, sorted so that S(i) >= S(i+1).
+ *
+ * U (output) DOUBLE PRECISION array, dimension (LDU,UCOL)
+ * UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
+ * UCOL = min(M,N) if JOBZ = 'S'.
+ * If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
+ * orthogonal matrix U;
+ * if JOBZ = 'S', U contains the first min(M,N) columns of U
+ * (the left singular vectors, stored columnwise);
+ * if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
+ *
+ * LDU (input) INTEGER
+ * The leading dimension of the array U. LDU >= 1; if
+ * JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
+ *
+ * VT (output) DOUBLE PRECISION array, dimension (LDVT,N)
+ * If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
+ * N-by-N orthogonal matrix V**T;
+ * if JOBZ = 'S', VT contains the first min(M,N) rows of
+ * V**T (the right singular vectors, stored rowwise);
+ * if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
+ *
+ * LDVT (input) INTEGER
+ * The leading dimension of the array VT. LDVT >= 1; if
+ * JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
+ * if JOBZ = 'S', LDVT >= min(M,N).
+ *
+ * WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+ * On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
+ *
+ * LWORK (input) INTEGER
+ * The dimension of the array WORK. LWORK >= 1.
+ * If JOBZ = 'N',
+ * LWORK >= 3*min(M,N) + max(max(M,N),7*min(M,N)).
+ * If JOBZ = 'O',
+ * LWORK >= 3*min(M,N) +
+ * max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).
+ * If JOBZ = 'S' or 'A'
+ * LWORK >= 3*min(M,N) +
+ * max(max(M,N),4*min(M,N)*min(M,N)+4*min(M,N)).
+ * For good performance, LWORK should generally be larger.
+ * If LWORK = -1 but other input arguments are legal, WORK(1)
+ * returns the optimal LWORK.
+ *
+ * IWORK (workspace) INTEGER array, dimension (8*min(M,N))
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit.
+ * < 0: if INFO = -i, the i-th argument had an illegal value.
+ * > 0: DBDSDC did not converge, updating process failed.
+ */
+ intblas n=A->N();
+ intblas m=A->M();
+ U->resize(n,n);
+ S->resize(min(n,m));
+ V->resize(m,m);
+ KNM<double> VT(m,m);
+ KN<intblas> iw(8*min(n,m));
+ intblas info,lw=-1;
+ KN<double> w(1);
+ char JOBZ='A';
+ dgesdd_(&JOBZ,&n,&m,*A,&n,*S,*U,&n,VT,&m,w,&lw,iw,&info);
+ lw=w[0];
+ w.resize(lw);
+ dgesdd_(&JOBZ,&n,&m,*A,&n,*S,*U,&n,VT,&m,w,&lw,iw,&info);
+ if (info<0)
+ {
+ cout << " dgesdd: the " << info << "-th argument had an illegal value." << endl;
+ }
+ else if (info>0)
+ {
+ cout << " dgesdd: DBDSDC did not converge, updating process failed." << endl;
+ }
+ else if (info==0)
+ {
+ for (int i=0;i<m;++i)
+ for (int j=0;j<m;++j)
+ (*V)(i,j)=VT(j,i);
+ }
+ return info;
+}
+
+// GL,28/09/2011 (computation of the eigenvalues and eigenvectors of a real symmetric matrix)
+long lapack_dsyev(KNM<double> *const &A,KN<double> *const &vp,KNM<double> *const &vectp)
+{
+ /*
+ SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
+ * JOBZ (input) CHARACTER*1
+ * = 'N': Compute eigenvalues only;
+ * = 'V': Compute eigenvalues and eigenvectors.
+ *
+ * UPLO (input) CHARACTER*1
+ * = 'U': Upper triangle of A is stored;
+ * = 'L': Lower triangle of A is stored.
+ *
+ * N (input) INTEGER
+ * The order of the matrix A. N >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
+ * On entry, the symmetric matrix A. If UPLO = 'U', the
+ * leading N-by-N upper triangular part of A contains the
+ * upper triangular part of the matrix A. If UPLO = 'L',
+ * the leading N-by-N lower triangular part of A contains
+ * the lower triangular part of the matrix A.
+ * On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+ * orthonormal eigenvectors of the matrix A.
+ * If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+ * or the upper triangle (if UPLO='U') of A, including the
+ * diagonal, is destroyed.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * W (output) DOUBLE PRECISION array, dimension (N)
+ * If INFO = 0, the eigenvalues in ascending order.
+ *
+ * WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+ * On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+ *
+ * LWORK (input) INTEGER
+ * The length of the array WORK. LWORK >= max(1,3*N-1).
+ * For optimal efficiency, LWORK >= (NB+2)*N,
+ * where NB is the blocksize for DSYTRD returned by ILAENV.
+ *
+ * If LWORK = -1, then a workspace query is assumed; the routine
+ * only calculates the optimal size of the WORK array, returns
+ * this value as the first entry of the WORK array, and no error
+ * message related to LWORK is issued by XERBLA.
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ * > 0: if INFO = i, the algorithm failed to converge; i
+ * off-diagonal elements of an intermediate tridiagonal
+ * form did not converge to zero.
+ */
+ intblas n=A->N();
+ ffassert(A->M()==n);
+ ffassert(vectp->N()==n);
+ ffassert(vectp->M()==n);
+ ffassert(vp->N()==n);
+ KNM<double> mat(*A);
+ intblas info,lw=-1;
+ KN<double> w(1);
+ char JOBZ='V',UPLO='U';
+ dsyev_(&JOBZ,&UPLO,&n,mat,&n,*vp,w,&lw,&info);
+ lw=w[0];
+ w.resize(lw);
+ dsyev_(&JOBZ,&UPLO,&n,mat,&n,*vp,w,&lw,&info);
+ if (info<0)
+ {
+ cout << " dsyev: the " << info << "-th argument had an illegal value." << endl;
+ }
+ else if (info>0)
+ {
+ cout << " dsyev: the algorithm failed to converge." << endl;
+ }
+ else if (info==0)
+ {
+ *vectp=mat;
+ }
+ return info;
+}
+
+template<class T>
+class Inverse{ public:
+ T t;
+ Inverse( T v)
+ : t(v) {}
+ template<class TT> Inverse( TT v) : t(v) {}
+ template<class TT> Inverse( TT * v) : t(*v) {}
+ operator const T & () const {return t;}
+};
+
+template<class T>
+class Mult{ public:
+ T a;bool ta;
+ T b;bool tb;
+ Mult( T aa,T bb)
+ : a(aa),b(bb),ta(0),tb(0) {}
+ // Transpose<
+ Mult( Transpose<T> aa,T bb)
+ : a(aa),b(bb),ta(1),tb(0) {}
+ Mult( Transpose<T> aa,Transpose<T> bb)
+ : a(aa),b(bb),ta(1),tb(1) {}
+ Mult( T aa,Transpose<T> bb)
+ : a(aa),b(bb),ta(1),tb(1) {}
+
+};
+
+template<class K>
+class OneBinaryOperatorRNM_inv : public OneOperator { public:
+ OneBinaryOperatorRNM_inv()
+ : OneOperator( atype< Inverse< KNM<K>* > >(),atype<KNM<K> *>(),atype<long>()) {}
+ E_F0 * code(const basicAC_F0 & args) const
+ { Expression p=args[1];
+ if ( ! p->EvaluableWithOutStack() )
+ {
+ bool bb=p->EvaluableWithOutStack();
+ cout << " Error exposant ??? " << bb << " " << * p << endl;
+ CompileError(" A^p, The p must be a constant == -1, sorry");}
+ long pv = GetAny<long>((*p)(0));
+ if (pv !=-1)
+ { char buf[100];
+ sprintf(buf," A^%ld, The pow must be == -1, sorry",pv);
+ CompileError(buf);}
+ return new E_F_F0<Inverse< KNM<K>* > ,KNM<K> *>(Build<Inverse< KNM<K>* > ,KNM<K> *>,t[0]->CastTo(args[0]));
+ }
+};
+
+
++<<<<<<< HEAD
++=======
++/*
++class Init { public:
++ Init();
++};
++*/
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+template <int INIT>
+KNM<R>* Solve(KNM<R>* a,Inverse<KNM<R >*> b)
+{
+ /*
+ SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+ * N (input) INTEGER
+ * The number of linear equations, i.e., the order of the
+ * matrix A. N >= 0.
+ *
+ * NRHS (input) INTEGER
+ * The number of right hand sides, i.e., the number of columns
+ * of the matrix B. NRHS >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ * On entry, the N-by-N coefficient matrix A.
+ * On exit, the factors L and U from the factorization
+ * A = P*L*U; the unit diagonal elements of L are not stored.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * IPIV (output) INTEGER array, dimension (N)
+ * The pivot indices that define the permutation matrix P;
+ * row i of the matrix was interchanged with row IPIV(i).
+ *
+ * B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
+ * On entry, the N-by-NRHS matrix of right hand side matrix B.
+ * On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+ *
+ * LDB (input) INTEGER
+ * The leading dimension of the array B. LDB >= max(1,N).
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ * > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+ * has been completed, but the factor U is exactly
+ * singular, so the solution could not be computed.
+ *
+ */
+ typedef double R;
+ integer info;
+ KNM<R> B(*b);
+ integer n= B.N();
+ KN<integer> p(n);
+ ffassert(B.M()==n);
+ if(INIT)
+ a->init(n,n);
+ else
+ a->resize(n,n);
+ *a=0.;
+ for(int i=0;i<n;++i)
+ (*a)(i,i)=(R) 1;;
+
+ dgesv_(&n,&n,B,&n,p,*a,&n,&info);
+ if(info) cerr << " error: dgesv_ "<< info << endl;
+ return a;
+}
+
+
+// Template interface
+inline int gemm(char *transa, char *transb, integer *m, integer *
+ n, integer *k, double *alpha, double *a, integer *lda,
+ double *b, integer *ldb, double *beta, double *c, integer
+ *ldc) {
+ return dgemm_(transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc);
+}
+inline int gemm(char *transa, char *transb, integer *m, integer *
+ n, integer *k, Complex *alpha, Complex *a, integer *lda,
+ Complex *b, integer *ldb, Complex *beta, Complex *c, integer
+ *ldc) {
+ return zgemm_(transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc);
+}
+
+
+template<class R,bool init, int ibeta>
+KNM<R>* mult(KNM<R >* a,const KNM_<R> & A,const KNM_<R> & B)
+{ // C=A*B
+
+ R alpha=1.,beta=R(ibeta);
+ char tA, tB;
+ if(init) a->init();
+ intblas N= A.N();
+ intblas M=B.M();
+ intblas K=A.M();
+ KNM<R> & C= *a;
+ C.resize(N,M);
+ ffassert(K==B.N());
+ R *A00=&A(0,0), *A10= &A(1,0), *A01= &A(0,1);
+ R *B00=&B(0,0), *B10= &B(1,0), *B01= &B(0,1);
+ R *C00=&C(0,0), *C10= &C(1,0), *C01= &C(0,1);
+ intblas lsa=A10-A00 ,lsb=B10-B00,lsc=C10-C00;
+ intblas lda=A01-A00 ,ldb=B01-B00,ldc=C01-C00;
+ if(verbosity>10) {
+ cout << lsa << " " << lsb << " "<< lsc << " init " << init << endl;
+ cout << lda << " " << ldb << " "<< ldc << endl;
+ }
+ tA=lda==1?'T':'N';
+ tB=ldb==1?'T':'N';
+
+ if(lda==1) lda=lsa;
+ if(ldb==1) ldb=lsb;
+ if(beta==0.)
+ C=R();
+#ifdef XXXXXXXXXXXXXX
+
+ for(int i=0;i<N;++i)
+ for(int j=0;j<M;++j)
+ for(int k=0;k<K;++k)
+ C(i,j) += A(i,k)*B(k,j) ;
+#else
+ gemm(&tB,&tA,&N,&M,&K,&alpha,A00,&lda,B00,&ldb,&beta,C00,&ldc);
+#endif
+ return a;
+ /*
+ The Fortran interface for these procedures are:
+ SUBROUTINE xGEMM ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC )
+ where TRANSA and TRANSB determines if the matrices A and B are to be transposed.
+ M is the number of rows in matrix A and C. N is the number of columns in matrix B and C.
+ K is the number of columns in matrix A and rows in matrix B.
+ LDA, LDB and LDC specifies the size of the first dimension of the matrices, as laid out in memory;
+ meaning the memory distance between the start of each row/column, depending on the memory structure (Dongarra et al. 1990).
+ */
+}
+template<class R,bool init, int ibeta>
+KNM<R>* mult(KNM<R >* a,Mult<KNM<R >*> bc)
+{
+ if( (bc.ta == 0) && (bc.tb == 0))
+ return mult<R,init,ibeta>(a,*bc.a,*bc.b) ;
+ else if((bc.ta == 1 )&& (bc.tb == 0))
+ return mult<R,init,ibeta>(a,bc.a->t(),*bc.b) ;
+ else if((bc.ta == 0) && (bc.tb == 1))
+ return mult<R,init,ibeta>(a,*bc.a,bc.b->t()) ;
+ else if((bc.ta == 1) && (bc.tb == 1))
+ return mult<R,init,ibeta>(a,bc.a->t(),bc.b->t()) ;
+ else
+ // should never happen
+ return NULL;
+}
+
+template <int INIT>
+KNM<Complex>* SolveC(KNM<Complex>* a,Inverse<KNM<Complex >*> b)
+{
+ /*
+ SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+ * N (input) INTEGER
+ * The number of linear equations, i.e., the order of the
+ * matrix A. N >= 0.
+ *
+ * NRHS (input) INTEGER
+ * The number of right hand sides, i.e., the number of columns
+ * of the matrix B. NRHS >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ * On entry, the N-by-N coefficient matrix A.
+ * On exit, the factors L and U from the factorization
+ * A = P*L*U; the unit diagonal elements of L are not stored.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * IPIV (output) INTEGER array, dimension (N)
+ * The pivot indices that define the permutation matrix P;
+ * row i of the matrix was interchanged with row IPIV(i).
+ *
+ * B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
+ * On entry, the N-by-NRHS matrix of right hand side matrix B.
+ * On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+ *
+ * LDB (input) INTEGER
+ * The leading dimension of the array B. LDB >= max(1,N).
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ * > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+ * has been completed, but the factor U is exactly
+ * singular, so the solution could not be computed.
+ *
+ */
+ typedef Complex R;
+ integer info;
+ KNM<R> B(*b);
+ integer n= B.N();
+ KN<integer> p(n);
+ ffassert(B.M()==n);
+ if(INIT)
+ a->init(n,n);
+ else
+ a->resize(n,n);
+ *a=0.;
+ for(int i=0;i<n;++i)
+ (*a)(i,i)=(R) 1;;
+
+ zgesv_(&n,&n,(R*) B,&n,p, (R*) *a,&n,&info);
+ if(info) cerr << " error: zgesv_ "<< info << endl;
+ return a;
+}
+
++<<<<<<< HEAD
++=======
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+template<class R,class A,class B> R Build2(A a,B b) {
+ return R(a,b);
+}
++<<<<<<< HEAD
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ if( map_type.find(typeid(Inverse<KNM<double >* >).name() ) == map_type.end() )
+ {
+ if(verbosity)
+ cout << " Add lapack interface ..." ;
+ Dcl_Type< Inverse<KNM<double >* > > ();
+ Dcl_Type< Inverse<KNM<Complex >* > > ();
+ Dcl_Type< Mult<KNM<Complex >* > > ();
+ Dcl_Type< Mult<KNM<double >* > > ();
+
+ TheOperators->Add("^", new OneBinaryOperatorRNM_inv<double>());
+ TheOperators->Add("*", new OneOperator2< Mult< KNM<double>* >,KNM<double>*,KNM<double>*>(Build2));
+ TheOperators->Add("*", new OneOperator2< Mult< KNM<Complex>* >,KNM<Complex>*,KNM<Complex>*>(Build2));
+
+ TheOperators->Add("^", new OneBinaryOperatorRNM_inv<Complex>());
+ TheOperators->Add("=", new OneOperator2<KNM<double>*,KNM<double>*,Inverse<KNM<double >*> >( Solve<0>) );
+ TheOperators->Add("=", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Inverse<KNM<Complex >*> >( SolveC<0>) );
+ TheOperators->Add("<-", new OneOperator2<KNM<double>*,KNM<double>*,Inverse<KNM<double >*> >( Solve<1>) );
+ TheOperators->Add("<-", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Inverse<KNM<Complex >*> >( SolveC<1>) );
+
+ TheOperators->Add("=", new OneOperator2<KNM<double>*,KNM<double>*,Mult<KNM<double >*> >( mult<double,false,0> ) );
+ TheOperators->Add("=", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Mult<KNM<Complex >*> >( mult<Complex,false,0> ) );
+
+ TheOperators->Add("+=", new OneOperator2<KNM<double>*,KNM<double>*,Mult<KNM<double >*> >( mult<double,false,1> ) );
+ TheOperators->Add("+=", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Mult<KNM<Complex >*> >( mult<Complex,false,1> ) );
+
+ TheOperators->Add("-=", new OneOperator2<KNM<double>*,KNM<double>*,Mult<KNM<double >*> >( mult<double,false,-1> ) );
+ TheOperators->Add("-=", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Mult<KNM<Complex >*> >( mult<Complex,false,-1> ) );
+
+ TheOperators->Add("<-", new OneOperator2<KNM<double>*,KNM<double>*,Mult<KNM<double >*> >( mult<double,true,0> ) );
+ TheOperators->Add("<-", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Mult<KNM<Complex >*> >( mult<Complex,true,0> ) );
+
+ Global.Add("inv","(",new OneOperator1<long,KNM<double>*>(lapack_inv));
+ Global.Add("inv","(",new OneOperator1<long,KNM<Complex>*>(lapack_inv));
+
+ Global.Add("dgeev","(",new OneOperator3_<long,KNM<double>*,KN<Complex>*,KNM<Complex>*>(lapack_dgeev));
+ Global.Add("zgeev","(",new OneOperator3_<long,KNM<Complex>*,KN<Complex>*,KNM<Complex>*>(lapack_zgeev));
+ // add FH
+ Global.Add("geev","(",new OneOperator3_<long,KNM<double>*,KN<Complex>*,KNM<Complex>*>(lapack_dgeev));
+ Global.Add("geev","(",new OneOperator3_<long,KNM<Complex>*,KN<Complex>*,KNM<Complex>*>(lapack_zgeev));
+
+ Global.Add("dggev","(",new OneOperator5_<long,KNM<double>*,KNM<double>*,KN<Complex>*,KN<double>*,KNM<Complex>*>(lapack_dggev));
+ Global.Add("dsygvd","(",new OneOperator4_<long,KNM<double>*,KNM<double>*,KN<double>*,KNM<double>*>(lapack_dsygvd));
+ Global.Add("dgesdd","(",new OneOperator4_<long,KNM<double>*,KNM<double>*,KN<double>*,KNM<double>*>(lapack_dgesdd));
+ Global.Add("dsyev","(",new OneOperator3_<long,KNM<double>*,KN<double>*,KNM<double>*>(lapack_dsyev));
+ }
+ else
+ if(verbosity)
+ cout << "( load: lapack <=> fflapack , skeep ) ";
+}
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/ffnewuoa.cpp.orig
index 612e66f,0000000..83a5375
mode 100644,000000..100644
--- a/examples++-load/ffnewuoa.cpp.orig
+++ b/examples++-load/ffnewuoa.cpp.orig
@@@ -1,193 -1,0 +1,206 @@@
+//ff-c++-cpp-dep: newuoa.f
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#include <iostream>
+#include <cfloat>
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+#include "rgraph.hpp"
+#include "RNM.hpp"
+#include "MatriceCreuse_tpl.hpp"
+#include "Mesh3dn.hpp"
+#include "MeshPoint.hpp"
+#include "lgfem.hpp"
+#include "lgmesh3.hpp"
+#include "lgsolver.hpp"
+#include "problem.hpp"
+
+typedef int integer;
+typedef int logical;
+
+
+typedef void (*typecalfunc)( integer *, double *, double *f, void * );
+
+#define F77newuoa newuoa_
+
+extern "C" {
+double F77newuoa(integer *N, integer *NPT, double *x , double * rhob, double *rhog,
+ integer *iprint, integer *maxfun,
+ double *w, void * iwf, typecalfunc calfun);
+}
+
+
+void calfun( integer * n, double * x, double *f, void * t);
+
+
+//template<class R>
+extern Block *currentblock;
+
+typedef double R;
+void calfun( integer * n, double * x, double *f, void * t);
+class OptimNewoa : public OneOperator
+{
+public:
+ typedef KN<R> Kn;
+ typedef KN_<R> Kn_;
+ const int cas;
+
+
+class ffcalfunc { // to call the freefem function .. J
+ public:
+ Stack stack;
+ Expression JJ,theparame;
+
+ ffcalfunc(Stack s,Expression JJJ,Expression epar)
+ : stack(s),JJ(JJJ), theparame(epar) {}
+
+ double J(Kn_ x) const
+ {
+ KN<double> *p=GetAny<KN<double> *>( (*theparame)(stack) );
+ *p=x;
+ double ret= GetAny<R>( (*JJ)(stack));
+ WhereStackOfPtr2Free(stack)->clean();
+ return ret; }
+
+ };
+
+
+ class E_newoa: public E_F0mps { public:
+ const int cas;
+ static basicAC_F0::name_and_type name_param[] ;
+ static const int n_name_param =4;
+ Expression nargs[n_name_param];
+ Expression X;
+ C_F0 inittheparam,theparam,closetheparam;
+ Expression JJ;
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ R arg(int i,Stack stack,R a) const{ return nargs[i] ? GetAny<R>( (*nargs[i])(stack) ): a;}
+
+
+
+ E_newoa(const basicAC_F0 & args,int cc) :
+ cas(cc)
+ {
+ int nbj= args.size()-1;
+ Block::open(currentblock); // make a new block to
+ X = to<Kn*>(args[nbj]);
+ C_F0 X_n(args[nbj],"n");
+ // the expression to init the theparam of all
+ inittheparam = currentblock->NewVar<LocalVariable>("the parameter",atype<KN<R> *>(),X_n);
+ theparam = currentblock->Find("the parameter"); // the expression for the parameter
+ args.SetNameParam(n_name_param,name_param,nargs);
+ const Polymorphic * opJ=0;
+ if (nbj>0)
+ {
+ opJ= dynamic_cast<const Polymorphic *>(args[0].LeftValue());
+ assert(opJ);
+ }
+ JJ= to<R>(C_F0(opJ,"(",theparam));
+ closetheparam=currentblock->close(currentblock); // the cleanning block expression
+ }
+
+ virtual AnyType operator()(Stack stack) const
+ {
+ double cost = 1e100;
+ WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+ Kn &x = *GetAny<Kn *>((*X)(stack));
+ long n=x.N();
+ double rhobeg=arg(0,stack,1E-6); // not used ....
+ double rhoend=arg(1,stack,2.); // not used ....
+ long maxfun=arg(2,stack,1000L); // bof bof
+ long npt=arg(3,stack,n*2L+1L); // bof bof
+ long iprint = verbosity;
+ ffcalfunc ffJ(stack,JJ,theparam);
+ int lw = (npt+13)*(npt+n)+3*n*(n+3)/2;
+ KN<double> w(lw);
+ integer N=n,NPT=npt,IPRINT=iprint,MAXFUN=maxfun;
+ cost= F77newuoa(&N,&NPT,(double *)x,&rhobeg,&rhoend,&IPRINT,&MAXFUN,(double *)w,(void *) &ffJ, calfun);
+ closetheparam.eval(stack); // clean memory
+ WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+ return cost; //SetAny<long>(0); Modif FH july 2005
+ }
+
+
+ operator aType () const { return atype<double>();}
+
+ };
+
+
+
+ E_F0 * code(const basicAC_F0 & args) const {
+ return new E_newoa(args,cas);}
+
+ OptimNewoa(int c) : OneOperator(atype<double>(),
+ atype<Polymorphic*>(),
+ atype<KN<R> *>()),cas(c){}
+
+};
+
+basicAC_F0::name_and_type OptimNewoa::E_newoa::name_param[]=
+ {
+ { "rhobeg", &typeid(double) },
+ { "rhoend", &typeid(double) },
+ { "maxfun",&typeid(long) },
+ { "npt",&typeid(long) }
+ };
+
+void calfun( integer * n, double * x, double *f, void * t)
+{
+ OptimNewoa::ffcalfunc * tt=static_cast<OptimNewoa::ffcalfunc *>(t);
+ *f=tt->J(KN_<double>(x,*n));
+ if(verbosity>20) cout << " F= " << * f << endl;
+}
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+static void Load_Init() // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++class Init { public:
++ Init();
++};
++
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++
++Init::Init() // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ Global.Add("newuoa","(",new OptimNewoa(1)); // j + dJ
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/freeyams.cpp.orig
index ef46ec0,0000000..b5fd5fb
mode 100644,000000..100644
--- a/examples++-load/freeyams.cpp.orig
+++ b/examples++-load/freeyams.cpp.orig
@@@ -1,831 -1,0 +1,844 @@@
+// ORIG-DATE: Fev 2010
+// -*- Mode : c++ -*-
+//
+// SUMMARY : liaison medit freefem++ : adaptmesh in 3d
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// E-MAIL : jacques.morice at ann.jussieu.fr
+//
+// for automatic compilation with ff-c++
+//ff-c++-LIBRARY-dep: freeyams libMesh
+//ff-c++-cpp-dep:
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+
+/*
+ff-c++ -auto freeyams.cpp
+*/
+
+// ./ff-c++ yams.cpp -I../src/libMesh/ -I../download/include/yams/ -L../download/lib/yams/ -lyams2 -L/Users/morice/work/postdoc/freefem++prod/src/libMesh/ -lMesh
+
+#include "ff++.hpp"
+#include "msh3.hpp"
+//#define ADAPTLIBRARY
+#include "memory.h"
+#include "freeyamslib.h"
+#include "eigenv.h" // include dans libMesh
+
+using namespace Fem2D;
+using namespace yams;
+
+// 3d mesh function
+
+void mesh3_to_yams_pSurfMesh( const Mesh3 &Th3 , int memory, int choix,
+ yams_pSurfMesh meshyams){
+
+ /*
+ Mesh3 :: maillage initiale
+ memory :: memoire pour yams
+ choix :: option du remaillage
+ ref ::
+ */
+ int k;
+ int npinit,neinit;
+
+ meshyams->dim = 3;
+ meshyams->npfixe = Th3.nv;
+ meshyams->nefixe = Th3.nbe;
+ meshyams->ntet = Th3.nt;
+ meshyams->nafixe = 0; // Edges
+ meshyams->nvfixe = 0; // Normals
+ meshyams->ntfixe = 0; // Tangents
+ npinit = meshyams->npfixe;
+ neinit = meshyams->nefixe;
+ // cette fonction change la taille des tableaux en fonctions des options : choix, memory, sm->type
+ zaldy1( meshyams->nefixe, meshyams->npfixe, meshyams->nvfixe, memory, meshyams, choix);
+
+
+ yams_pPoint ppt;
+ for (k=1; k<=npinit; k++) {
+ ppt = &meshyams->point[k];
+ ppt->c[0] = Th3.vertices[k-1].x;
+ ppt->c[1] = Th3.vertices[k-1].y;
+ ppt->c[2] = Th3.vertices[k-1].z;
+ ppt->ref = Th3.vertices[k-1].lab & 0x7fff;
+
+ ppt->tag = M_UNUSED;
+ ppt->color= 0;
+ ppt->size = -1.;
+ ppt->tge = 0;
+ ppt->geom = M_CURVE;
+ }
+ meshyams->npfixe = npinit;
+
+ /* read mesh triangles */
+ yams_pTriangle ptriangle;
+ for (k=1; k<=neinit; k++) {
+ const Triangle3 & K(Th3.be(k-1));
+ ptriangle = &meshyams->tria[k];
+ ptriangle->v[0] = Th3.operator()(K[0])+1;
+ ptriangle->v[1] = Th3.operator()(K[1])+1;
+ ptriangle->v[2] = Th3.operator()(K[2])+1;
+ ptriangle->ref = K.lab& 0x7fff;
+ }
+
+ /* tetrahedra */
+ if( meshyams->ntet ){
+ yams_pTetra ptetra;
+ meshyams->tetra = (yams_Tetra*)calloc((meshyams->ntet+1),sizeof(yams_Tetra));
+ assert(meshyams->tetra);
+
+ for (k=1; k<=meshyams->ntet; k++) {
+ const Tet & K(Th3.elements[k-1]);
+ ptetra = &meshyams->tetra[k];
+ ptetra->v[0] = Th3.operator()(K[0])+1;
+ ptetra->v[1] = Th3.operator()(K[1])+1;
+ ptetra->v[2] = Th3.operator()(K[2])+1;
+ ptetra->v[3] = Th3.operator()(K[3])+1;
+ ptetra->ref = K.lab & 0x7fff;
+ }
+ }
+
+
+ meshyams->ne = meshyams->nefixe;
+ meshyams->np = meshyams->npfixe;
+}
+
+Mesh3 * yams_pSurfMesh_to_mesh3( yams_pSurfMesh sm, int infondang, int infocc, int choix){
+
+ /*
+ Mesh3 :: maillage initiale
+ memory :: memoire pour yams
+ choix :: option du remaillage
+ ref ::
+ */
+ // variable a enlever par la suite
+ yams_pGeomSupp gs;
+ yams_pGeomtge gt;
+ yams_pPoint ppt;
+ yams_pTriangle pt1;
+ yams_pTetra ptt;
+ yams_pEdge pte;
+ int i,k,np,ne,nn,nt,nav,natv,tatv,nbl;
+ int nedge,nridge,ndang,nrequis;
+ int is1,is2,ncorner,prequis;
+
+ // freefempp variable
+ int ff_nv, ff_nt, ff_nbe;
+
+
+ /* mark connected component */
+ ne = 0;
+ for (k=1; k<=sm->npmax; k++) {
+ ppt = & sm->point[k];
+ ppt->tag |= M_UNUSED;
+ ppt->flag = ppt->color = 0;
+ }
+ // a enlever pour l'instant
+ if ( sm->connex > 0 ) {
+ for (k=1; k<=sm->ne; k++) {
+ pt1 = &sm->tria[k];
+ if ( pt1->v[0] > 0 && pt1->cc == sm->connex ) {
+ ne++;
+ for (i=0; i<3; i++) {
+ ppt = &sm->point[pt1->v[i]];
+ ppt->tag &= ~M_UNUSED;
+ }
+ }
+ }
+ }
+ else {
+ /* mark used faces */
+ for (k=1; k<=sm->ne; k++) {
+ pt1 = &sm->tria[k];
+ if ( !pt1->v[0] ) continue;
+ ++ne;
+ for (i=0; i<3; i++) {
+ ppt = &sm->point[pt1->v[i]];
+ ppt->tag &= ~M_UNUSED;
+ }
+ }
+ }
+
+ cout << "sm->ntet=" << sm->ntet << endl;
+ // a enlever on ne garde pas les tetrahedres
+ // demander P. Frey
+ if ( choix == 6 && sm->ntet ) {
+ for (k=1; k<=sm->ntet; k++) {
+ ptt = &sm->tetra[k];
+ if ( !ptt->v[0] ) continue;
+ for (i=0; i<4; i++) {
+ ppt = &sm->point[ptt->v[i]];
+ ppt->tag &= ~M_UNUSED;
+ }
+ }
+ }
+
+ /* mark used vertices */
+ np = nav = 0;
+ ncorner = prequis = 0;
+ for (k=1; k<=sm->npmax; k++) {
+ ppt = &sm->point[k];
+ if ( ppt->tag & M_UNUSED ) continue;
+ ppt->tmp = ++np;
+ if ( ppt->tag == M_NOTAG ) nav++;
+ }
+
+ ff_nv = np; // number of vertex
+ //
+ Vertex3 *ff_v = new Vertex3[ff_nv];
+ int kk=0;
+ for(k=1; k<=sm->npmax; k++) {
+ ppt = &sm->point[k];
+ if ( ppt->tag & M_UNUSED ) continue;
+ ff_v[kk].x = ppt->c[0];
+ ff_v[kk].y = ppt->c[1];
+ ff_v[kk].z = ppt->c[2];
+ ff_v[kk].lab = ppt->ref;
+ kk++;
+ if (ppt->tag & M_CORNER) ncorner++;
+ if (ppt->tag & M_REQUIRED ) prequis++;
+ }
+ assert(kk==ff_nv);
+ // write triangle
+ nedge = sm->dim == 3 ? infondang : 0;
+ nridge = nrequis = nn = nt = natv = tatv = 0;
+
+ for (k=1; k<=sm->ne; k++) {
+ pt1 = &sm->tria[k];
+ if ( !pt1->v[0] ) continue;
+ else if ( sm->connex > 0 && pt1->cc != sm->connex ) continue;
+ nt++;
+ }
+
+ ff_nbe = nt;
+ Triangle3 *ff_b = new Triangle3[ff_nbe];
+ Triangle3 *ff_bb = ff_b;
+
+
+ for (k=1; k<=sm->ne; k++) {
+ int iv[3],lab;
+ pt1 = &sm->tria[k];
+ // lab = pt1->ref;
+ if ( !pt1->v[0] ) continue;
+ else if ( sm->connex > 0 && pt1->cc != sm->connex ) continue;
+ iv[0] = sm->point[pt1->v[0]].tmp-1;
+ iv[1] = sm->point[pt1->v[1]].tmp-1;
+ iv[2] = sm->point[pt1->v[2]].tmp-1;
+ lab = pt1->ref; // change fh 02/2013
+ //cout << " lab : " << sm->connex << " " << pt1->cc << " " << pt1->ref<< " " << endl;
+ (*ff_bb++).set( ff_v, iv, lab);
+
+ for (i=0; i<3; i++) {
+ ppt = &sm->point[pt1->v[i]];
+ gs = &sm->geom[pt1->vn[i]];
+ gt = &sm->tgte[ppt->tge];
+ if ( ppt->tag > M_NOTAG ) {
+ natv++;
+ if ( ppt->tag & M_CORNER ) tatv++;
+ }
+ if ( !gs->newnum ) gs->newnum = ++nn;
+ if ( !gt->newnum ) gt->newnum = ++nt;
+ if ( !pt1->edg[i] && pt1->tag[i] == M_NOTAG ) continue;
+ else if ( pt1->adj[i] && (k > pt1->adj[i]) ) continue;
+ nedge++;
+ if ( pt1->tag[i] & M_RIDGE_GEO ) nridge++;
+ if ( pt1->tag[i] & M_REQUIRED ) nrequis++;
+ }
+
+ }
+
+ Tet *ff_t;
+ if ( choix == 6 && sm->ntet ) ff_t = new Tet[sm->ntet];
+ Tet *ff_tt = ff_t;
+
+ if ( choix == 6 && sm->ntet ) {
+ int iv[4],lab;
+ for (k=1; k<=sm->ntet; k++) {
+ ptt = &sm->tetra[k];
+ if ( !ptt->v[0] ) continue;
+ for (i=0; i<4; i++)
+ iv[i] = sm->point[ptt->v[i]].tmp-1;
+ lab = ptt->ref;
+ (*ff_tt++).set( ff_v, iv, lab);
+ }
+ }
+
+
+ // les autres avoir par la suite
+ if( verbosity>1 ) cout << " nv " << ff_nv << " nbe" << ff_nbe << endl;
+ if( choix == 6 && sm->ntet){
+ int ff_nt = sm->ntet;
+ Mesh3 *TH3_T = new Mesh3(ff_nv,ff_nt,ff_nbe,ff_v,ff_t,ff_b);
+ TH3_T->BuildGTree();
+ return TH3_T;
+ }
+ else{
+ Mesh3 *TH3_T = new Mesh3(ff_nv,ff_nbe,ff_v,ff_b);
+ return TH3_T;
+ }
+}
+
+void solyams_pSurfMesh( yams_pSurfMesh sm, const int &type, const KN<double> & tabsol, float hmin, float hmax){
+ yams_pPoint ppt;
+ yams_pMetric pm;
+ int i,k;
+ double sizeh,m[6],lambda[3],vp[2][2],vp3[3][3];
+ hmin = FLT_MAX;
+ hmax = -FLT_MAX;
+ float vpmin=FLT_MAX, vpmax=-FLT_MAX, mmin=FLT_MAX,mmax=-FLT_MAX;
+
+ if(type == 1)
+ {
+ for (k=1; k<=sm->npfixe; k++) {
+ ppt = &sm->point[k];
+ ppt->size = (float) tabsol[k-1];// change FH nov 2010: k -> k-1
+ hmin = min(ppt->size,hmin);
+ hmax = max(ppt->size,hmax);
+
+ }
+ }
+ else if( type == 3 ){
+ if ( !sm->metric && !zaldy3(sm,3) ) {
+ ExecError("Pb alloc metric in freeyam ??? ");
+ }
+
+ for (k=1; k<=sm->npfixe; k++) {
+ ppt = &sm->point[k];
+ pm = &sm->metric[k];// coorrection FH dec 2010..
+ memset(pm->m,6*sizeof(float),0.);
+
+ for (i=0; i<6; i++)
+ m[i] = (float) tabsol[(k-1)*6+i];
+
+ pm->m[0] = m[0];
+ pm->m[1] = m[1];
+ pm->m[2] = m[3];
+ pm->m[3] = m[2];
+ pm->m[4] = m[4];
+ pm->m[5] = m[5];
+ pm->k1 = pm->k2 = (float)FLT_MAX;
+ for (i=0; i<6; i++) m[i] = pm->m[i];
+ if ( !eigenv(1,m,lambda,vp3) ) {
+ fprintf(stderr," ## ERR 9201, inbbf, Not a metric tensor. Discarded\n");
+ free(sm->metric);
+ sm->metric = 0;
+ ExecError("freeyamerr: ## ERR 9201, inbbf, Not a metric tensor. Discarded");
+ }
+
+ float vmn = min(min(lambda[0],lambda[1]),lambda[2]);
+ float vmx = max(max(lambda[0],lambda[1]),lambda[2]);
+
+ vpmin= min(vpmin, vmn);
+ vpmax= max(vpmax,vmx);
+ sizeh = vpmax;
+ ppt->size = max(1.0 / sqrt(sizeh),EPS);
+ hmin = min(ppt->size,hmin);
+ hmax = max(ppt->size,hmax);
+ }
+ }
+ //if(verbosity>4)
+ {
+ cout << " freeyams (metric in) : hmin " << hmin << " , hmax " << hmax << endl;
+ if(type==3)
+ cout << " min max of eigen val " << vpmin << " " << vpmax << endl;
+ }
+
+ if(type==3 && vpmin <0 )
+ {
+ cout << " Error Freeyam : metric min max of eigen val " << vpmin << " " << vpmax << endl;
+ ExecError("Error in metric definition freeyams (negative eigen value");
+ }
+}
+
+
+static const int wrapper_intopt[13] = { 0, 3, 7, 8, 9,
+ 11, 12, 13, 14, 15,
+ 17, 18, 22};
+
+/*
+static const int wrapper_fopt[12] = { 0, 1, 3, 4, 6,
+ 7, 8, 9, 10, 11,
+ 12, 13};
+*/
+static const int wrapper_fopt[11] = { 1, 3, 4, 6,
+ 7, 8, 9, 10, 11,
+ 12, 13};
+
+void yams_inival(int intopt[23],double fopt[14]){
+
+/*
+ intopt : 0 !! anisotropie
+ 1 !! ecp // enl
+ 2 !! extended out put file // enl
+ 3 !! FE correction
+ 4 !! Formatted (ascii) output file // enl
+ 5 !! save metric file // enl
+ 6 !! msh2 // enl
+ 7 !! Split multiple connected points
+ 8 !! memory
+ 9 !! connected component
+ 10 !! vrml //enl
+ 11 !! imprim
+ 12 !! nm : Create point on straight edge (no mapping)
+ 13 !! nc : No validity check during smoothing (opt. 9)
+ 14 !! np : Specify number of points desired
+ 15 !! nit : Nb Iter
+ 16 !! nq : Output quads // enl
+ 17 !! nr : No ridge detection
+ 18 !! ns : No point smoothing
+ 19 !! no : No output file // enl
+ 20 !! ref : Ignore face references // enl
+ // rajouter lors de l'ouverture du fichiers yams
+ 21 !! absolute : opts.ctrl &= ~REL; par default 1 // enl
+ 22 !! set optim option
+
+ fopt : 0 !! iso
+ 1 !! eps
+ pas de 2
+ 3 !! opts.lambda
+ 4 !! opts.mu
+ pas de 5
+ 6 !! hgrad :: opts.shock
+ 7 !! hmin :: opts.hmin
+ 8 !! hmax :: opts.hmax
+ // rajouter lors de l'ouverture du fichiers yams
+ 9 !! tolerance :: opts.bande
+ 10 !! degrad :: opts.degrad
+ 11 !! declic :: opts.declic
+ 12 !! walton :: opts.walton = cos(dummy/180.0*M_PI);
+ 13 !! ridge :: opts.ridge
+ */
+
+/* Set default values for options */
+ // fopt 5,
+ fopt[7] = -2.0;
+ fopt[8] = -2.0;
+ fopt[6] = 1.3; /* default mesh gradation */
+ fopt[1] = 0.01; /* geometric approximation */
+ fopt[0] = 0.0;
+ fopt[11] = 1.0 / BETAC;
+ fopt[3] = -1.0;
+ fopt[4] = -1.0;
+ fopt[13] = 45.; // default RIDG = 45.
+ //opts.ridge = cos(RIDG*M_PI/180.);
+ //opts.geom = cos(GEOM*M_PI/180.);
+ fopt[12] = COS45DEG; /* Walton limitation */
+ fopt[9] = -2; /* default = 1 unit */
+ fopt[10] = QUALCOE; /* quality degradation */
+ //opts.ctrl = REL | ISO; initialisation by default
+
+
+
+ // intopt :: 3,7,13,14,15,20
+ intopt[15] = -1;
+ intopt[13] = 0;
+ intopt[14] = -1;
+
+ /* get decimation parameters */
+ intopt[20] = 0;
+ intopt[3] = 0;
+ intopt[7] = 0;// Split multiple connected points (no manifold)
+ intopt[22] = 1;// set optim option
+
+ // demander P. Frey
+ intopt[0] = 0; // anisotropie
+ intopt[1] = 0; //
+ intopt[2] = 0;
+
+ intopt[4] = 0;
+ intopt[5] = 0;
+ intopt[6] = 0;
+
+ intopt[8] = -1; // memory
+ intopt[9] = -1; // par default connex connected component (tout)
+ intopt[10] = 0;// vrml
+ intopt[11] = verbosity;
+ intopt[12] = 0; //nm
+
+ intopt[16] = 0; // quad
+ intopt[17] = 0;// noridge
+ intopt[18] = 0;// nosmooth
+ intopt[19] = 1;// 1
+ intopt[21] = 1;
+
+}
+
+class yams_Op: public E_F0mps
+{
+public:
+ typedef pmesh3 Result;
+ Expression eTh;
+ int nbsol;
+ int nbsolsize;
+ int type;
+ int dim;
+ vector<Expression> sol;
+
+ static const int n_name_param = 14; //
+ static basicAC_F0::name_and_type name_param[] ;
+ Expression nargs[n_name_param];
+
+ KN_<long> arg(int i,Stack stack,KN_<long> a ) const
+ { return nargs[i] ? GetAny<KN_<long> >( (*nargs[i])(stack) ): a;}
+ KN_<double> arg(int i,Stack stack,KN_<double> a ) const
+ { return nargs[i] ? GetAny<KN_<double> >( (*nargs[i])(stack) ): a;}
+ double arg(int i,Stack stack,double a ) const{ return nargs[i] ? GetAny< double >( (*nargs[i])(stack) ): a;}
+ long arg(int i,Stack stack, long a ) const{ return nargs[i] ? GetAny< long >( (*nargs[i])(stack) ): a;}
+ int arg(int i,Stack stack, int a ) const{ return nargs[i] ? GetAny< long >( (*nargs[i])(stack) ): a;}
+ bool arg(int i,Stack stack, bool a ) const{ return nargs[i] ? GetAny< bool >( (*nargs[i])(stack) ): a;}
+
+
+public:
+ yams_Op(const basicAC_F0 & args) : sol( args.size()-1 )
+ {
+
+ cout << "yams"<< endl;
+ args.SetNameParam(n_name_param,name_param,nargs);
+ eTh=to<pmesh3>(args[0]);
+ dim=3;
+ nbsol = args.size()-1;
+ if(nbsol >1)
+ CompileError(" yams accept only one solution ");
+ int ksol=0;
+
+ if(nbsol == 1){
+ int i=1;
+ if (args[i].left()==atype<E_Array>())
+ {
+ const E_Array * a = dynamic_cast<const E_Array *>(args[i].LeftValue());
+ ffassert(a);
+ ksol+=a->size();
+ }
+ else
+ ksol++;
+ sol.resize(ksol);
+
+ // type :: 1 sca, 2 vector, 3 symtensor
+
+ ksol=0;
+ nbsolsize=0;
+ type = 0;
+
+ if (args[i].left()==atype<E_Array>())
+ {
+ const E_Array * a = dynamic_cast<const E_Array *>(args[i].LeftValue());
+ ffassert(a);
+ int N=a->size();
+ nbsolsize=nbsolsize+N;
+ switch (N){
+ /*
+ case 3 :
+ type[i-1]=2;
+ for (int j=0;j<N;j++)
+ sol[ksol++]=to<double>((*a)[j]);
+ break;
+ */
+ case 6 :
+ type=3;
+ for (int j=0;j<N;j++)
+ sol[ksol++]=to<double>((*a)[j]);
+ break;
+ default :
+ CompileError(" 3D solution for yams is a scalar (1 comp) or a symetric tensor (6 comp)");
+ break;
+ }
+ }
+ else
+ {
+ type=1;
+ nbsolsize=nbsolsize+1;
+ sol[ksol++]=to<double>(args[i]);
+ }
+
+ if( nargs[2] )
+ CompileError(" we give two metric for yams ");
+ }
+
+ }
+
+ static ArrayOfaType typeargs() { return ArrayOfaType( atype< pmesh3 >(), true); }// all type
+ static E_F0 * f(const basicAC_F0 & args) { return new yams_Op(args);}
+ AnyType operator()(Stack stack) const ;
+ operator aType () const { return atype< pmesh3 >();}
+};
+
+
+basicAC_F0::name_and_type yams_Op::name_param[]= {
+
+ { "loptions", &typeid(KN_<long>)}, //0
+ { "doptions", &typeid(KN_<double>)},
+ { "metric", &typeid(KN_<double>)},
+ { "aniso", &typeid(bool)} ,//3
+ { "mem", &typeid(long)} ,
+ { "hmin", &typeid(double)} ,
+ { "hmax", &typeid(double)} ,//6
+ { "gradation", &typeid(double)} ,
+ { "option", &typeid(long)} , // 8
+ { "ridgeangle", &typeid(double)} ,//9
+ { "absolute", &typeid(bool)}, //10
+ { "verbosity", &typeid(long)}, //11
+
+ { "nr", &typeid(long)}, // 12 no ridge
+ { "ns", &typeid(long)} // 13 no point smoothing
+};
+
+AnyType yams_Op::operator()(Stack stack) const
+{
+ // initialisation
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ Mesh3 * pTh= GetAny<Mesh3 *>((*eTh)(stack));
+ ffassert( pTh );
+ Mesh3 &Th3=*pTh;
+ int nv=Th3.nv;
+ int nt=Th3.nt;
+ int nbe=Th3.nbe;
+
+ KN<int> defaultintopt(23);
+ KN<double> defaultfopt(14);
+ defaultintopt = 0;
+ defaultfopt = 0.;
+ yams_inival( defaultintopt, defaultfopt);
+
+ KN<int> intopt(23);
+ for(int ii=0; ii< 23; ii++){
+ intopt[ii]=defaultintopt[ii];
+ }
+
+ KN<double> fopt(14);
+ for(int ii=0; ii< 14; ii++){
+ fopt[ii]=defaultfopt[ii];
+ }
+ assert( fopt.N() == 14 );
+
+ if( nargs[0] ){
+ KN<int> intopttmp = GetAny<KN_<long> >( (*nargs[0])(stack) );
+ if( intopttmp.N() != 13 ){
+ cerr <<"the size of vector loptions is 13 " << endl;
+ exit(1);
+ }
+ else{
+ for(int ii=0; ii<13; ii++){
+ intopt[ wrapper_intopt[ii] ] = intopttmp[ii];
+ }
+ }
+ }
+
+ if( nargs[1] ){
+ KN<double> fopttmp = GetAny<KN_<double> >( (*nargs[1])(stack) );
+ if( fopttmp.N() != 11 ){
+ cerr <<"the size of vector loptions is 11 not " << fopttmp.N()<< endl;
+ ExecError("FreeYams");
+ }
+ else{
+ for(int ii=0; ii<11; ii++){
+ fopt[ wrapper_fopt[ii] ] = fopttmp[ii];
+ }
+ }
+ }
+
+ intopt[0] = arg(3,stack,intopt[0]!=1);
+ intopt[8] = arg(4,stack,intopt[8]);
+ fopt[7] = arg(5,stack,fopt[7]);
+ fopt[8] = arg(6,stack,fopt[7]);
+ fopt[6] = arg(7,stack,fopt[6]);
+ intopt[22] = arg(8,stack, intopt[22] ); // optim option
+ if(nargs[9]) intopt[17]=1;
+ fopt[13] = arg(9,stack,fopt[13]); // ridge angle
+ intopt[21] = arg(10,stack, intopt[21] ); // absolue
+ intopt[11] = arg(11,stack,(int) verbosity); // verbosity
+ intopt[17] = arg(12,stack,intopt[17]); // no ridge
+ intopt[18] = arg(13,stack,intopt[18]); // nb smooth
+ if(verbosity>1)
+ {
+ cout << " fopt = [";
+ for(int i=0;i<11;++i)
+ cout << fopt[wrapper_fopt[i]] << (i < 10 ? ",": "];\n") ;
+ cout << " intopt = [";
+ for(int i=0;i<13;++i)
+ cout << intopt[wrapper_intopt[i]] << (i < 12 ? ",": "];\n" );
+ }
+
+
+
+
+ /*
+ KN<int> intopt(arg(0,stack,defaultintopt));
+ assert( intopt.N() == 23 );
+ KN<double> fopt(arg(1,stack,defaultfopt));
+ assert( fopt.N() == 14 );
+ */
+ KN<double> metric;
+
+ int mtype=type;
+ if( nargs[2] )
+ {
+ metric = GetAny<KN_<double> >( (*nargs[2])(stack) );
+ if(metric.N()==Th3.nv){
+ mtype=1;
+ intopt[1]=0;
+ }
+ else if(metric.N()==6*Th3.nv){
+ intopt[1]=1;
+ mtype=3;
+ }
+ else
+ cerr << "sizeof vector metric is incorrect, size will be Th.nv or 6*Th.nv" << endl;
+ }
+ else if(nbsol>0)
+ {
+ if( type == 1 )
+ {
+ intopt[1]=0;
+ metric.resize(Th3.nv);
+ metric=0.;
+ }
+ else if( type ==3 )
+ {
+ intopt[1]=1;
+ metric.resize(6*Th3.nv);
+ metric=0.;
+ }
+ }
+ else
+ {
+ if( intopt[1]==0 ){ metric.resize(Th3.nv); metric=0.;}
+ else if ( intopt[1]==1 ){ metric.resize(6*Th3.nv); metric=0.;}
+ }
+ // mesh for yams
+ yams_pSurfMesh yamsmesh;
+ yamsmesh = (yams_pSurfMesh)calloc(1,sizeof(yams_SurfMesh));
+ if ( !yamsmesh ){
+ cerr << "allocation error for SurfMesh for yams" << endl;
+ }
+ yamsmesh->infile = NULL;
+ yamsmesh->outfile = NULL;
+ yamsmesh->type = M_SMOOTH | M_QUERY | M_DETECT | M_BINARY | M_OUTPUT;
+
+
+ mesh3_to_yams_pSurfMesh( Th3 , intopt[8], intopt[22], yamsmesh);
+
+
+ // solution for freeyams2
+ if(nbsol)
+ {
+ MeshPoint *mp3(MeshPointStack(stack));
+
+ KN<bool> takemesh(nv);
+ takemesh=false;
+ for(int it=0;it<nt;it++){
+ for(int iv=0;iv<4;iv++){
+ int i=Th3(it,iv);
+
+ if(takemesh[i]==false){
+ mp3->setP(&Th3,it,iv);
+
+ for(int ii=0;ii<nbsolsize;ii++){
+ metric[i*nbsolsize+ii] = GetAny< double >( (*sol[ii])(stack) );
+ }
+ takemesh[i] = true;
+ }
+ }
+ }
+ }
+ if(verbosity>10)
+ cout << "nbsol " << nargs[2] << endl;
+ if( nargs[2] || (nbsol > 0) ){
+ float hmin,hmax;
+ solyams_pSurfMesh( yamsmesh, mtype, metric, hmin, hmax);
+ yamsmesh->nmfixe = yamsmesh->npfixe;
+ if( fopt[7] < 0.0 )
+ fopt[7]= max(fopt[7],hmin);
+ if( fopt[8] < 0.0 )
+ fopt[8]=max(fopt[8],hmax);
+ }
+ else{
+ yamsmesh->nmfixe = 0;
+ }
+ int infondang=0, infocc=0;
+ int res = yams_main( yamsmesh, intopt, fopt, infondang, infocc);
+ if(verbosity>10)
+ cout << " yamsmesh->dim " << yamsmesh->dim << endl;
+ if( res > 0){
+ cout << " problem with yams :: error " << res << endl;
+ ExecError("Freeyams error");
+ }
+
+ Mesh3 *Th3_T = yams_pSurfMesh_to_mesh3( yamsmesh, infondang, infocc ,intopt[22] );
+
+ // recuperer la solution ????
+ if(verbosity>10)
+ {
+ cout << &yamsmesh->point << " " << &yamsmesh->tria << " " <<&yamsmesh->geom << " " << &yamsmesh->tgte << endl;
+ cout << &yamsmesh << endl;
+
+ }
+ free(yamsmesh->point);
+ free(yamsmesh->tria);
+ free(yamsmesh->geom);
+ free(yamsmesh->tgte);
+ if ( yamsmesh->metric ) free(yamsmesh->metric);
+ if ( yamsmesh->edge ) free(yamsmesh->edge);
+ if ( yamsmesh->tetra ) free(yamsmesh->tetra);
+ free(yamsmesh);
+
+ *mp=mps;
+ Add2StackOfPtr2FreeRC(stack,Th3_T);
+ return SetAny<pmesh3>(Th3_T);
+}
+
+
+
++<<<<<<< HEAD
+/* class Init1 { public:
+ Init1();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++class Init1 { public:
++ Init1();
++};
++
++LOADINIT(Init1) // une variable globale qui serat construite au chargement dynamique
++
++Init1::Init1(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ //typedef Mesh3 *pmesh3;
+ if(verbosity) cout << " load: freeyams " << endl;
+
+ Global.Add("freeyams","(",new OneOperatorCode<yams_Op>);
+
+}
+
+
+#define WITH_NO_INIT
+#include "msh3.hpp"
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/funcTemplate.cpp.orig
index 1c63aee,0000000..65fab10
mode 100644,000000..100644
--- a/examples++-load/funcTemplate.cpp.orig
+++ b/examples++-load/funcTemplate.cpp.orig
@@@ -1,131 -1,0 +1,142 @@@
+// Example C++ function "CppModTemplate" dynamically loaded into "load.edp"
+// ------------------------------------------------------------------------
+#include <ff++.hpp>
+#include "AFunction_ext.hpp" // Extension of "AFunction.hpp" to deal with more than 3 parameters function
+using namespace Fem2D;
+
+// see src/femlib/RNM.hpp
+
+// dummy routine to understand how to use vector
+double CppModTemplate3(KN<double> *const & A, // OUTPUT
+ KN<double> *const & B, KN<double> *const & C) // INPUTS
+{
+
+ // Remarque:
+ // It might prove usefull to have a look in the cpp file where KN is defined: src/femlib/RNM.hpp
+ //
+ // To access value at node i of vector N, do as follow: *(N[0]+i)
+ // Explanation (C++ for dummies as I am ;-):
+ // N is an alias to the KN object.
+ // N[0] is a pointer to the first element of the vector.
+ // N[0]+i is a pointer to the ith element of the vector.
+ // *(N[0]+i) is the value of the ith element of the vector.
+
+ int nn = A->N(); // get number of nodes
+
+ cout << "nn: " << nn << endl;
+
+ for(int i=0; i<nn; i++) {
+ (*(A[0]+i)) = (*(B[0]+i)) * (*(C[0]+i));
+ cout << (*(A[0]+i)) << endl;
+ }
+
+ return 0.0; // dummy return value.
+}
+
+double CppModTemplate4(KN<double> *const & A, // OUTPUT
+ KN<double> *const & B, KN<double> *const & C, // INPUTS
+ KN<double> *const & D)
+{
+ int nn = A->N(); // get number of nodes
+ cout << "nn: " << nn << endl;
+ for(int i=0; i<nn; i++) {
+ (*(A[0]+i)) = (*(B[0]+i)) * (*(C[0]+i)) * (*(D[0]+i));
+ cout << (*(A[0]+i)) << endl;
+ }
+ return 0.0; // dummy return value.
+}
+
+double CppModTemplate5(KN<double> *const & A, // OUTPUT
+ KN<double> *const & B, KN<double> *const & C, // INPUTS
+ KN<double> *const & D, KN<double> *const & E)
+{
+ int nn = A->N(); // get number of nodes
+ cout << "nn: " << nn << endl;
+ for(int i=0; i<nn; i++) {
+ (*(A[0]+i)) = (*(B[0]+i)) * (*(C[0]+i)) * (*(D[0]+i)) * (*(E[0]+i));
+ cout << (*(A[0]+i)) << endl;
+ }
+ return 0.0; // dummy return value.
+
+}
+
+
+double CppModTemplate6(KN<double> *const & A, // OUTPUT
+ KN<double> *const & B, KN<double> *const & C, // INPUTS
+ KN<double> *const & D, KN<double> *const & E,
+ KN<double> *const & F)
+{
+ int nn = A->N(); // get number of nodes
+ cout << "nn: " << nn << endl;
+ for(int i=0; i<nn; i++) {
+ (*(A[0]+i)) = (*(B[0]+i)) * (*(C[0]+i)) * (*(D[0]+i)) * (*(E[0]+i)) * (*(F[0]+i));
+ cout << (*(A[0]+i)) << endl;
+ }
+ return 0.0; // dummy return value.
+}
+
+double CppModTemplate7(KN<double> *const & A, // OUTPUT
+ KN<double> *const & B, KN<double> *const & C, // INPUTS
+ KN<double> *const & D, KN<double> *const & E,
+ KN<double> *const & F, KN<double> *const & G)
+{
+ int nn = A->N(); // get number of nodes
+ cout << "nn: " << nn << endl;
+ for(int i=0; i<nn; i++) {
+ (*(A[0]+i)) = (*(B[0]+i)) * (*(C[0]+i)) * (*(D[0]+i)) * (*(E[0]+i)) * (*(F[0]+i)) * (*(G[0]+i));
+ cout << (*(A[0]+i)) << endl;
+ }
+ return 0.0; // dummy return value.
+}
+
+double CppModTemplate8(KN<double> *const & A, // OUTPUT
+ KN<double> *const & B, KN<double> *const & C, // INPUTS
+ KN<double> *const & D, KN<double> *const & E,
+ KN<double> *const & F, KN<double> *const & G,
+ KN<double> *const & H)
+{
+ int nn = A->N(); // get number of nodes
+ cout << "nn: " << nn << endl;
+ for(int i=0; i<nn; i++) {
+ (*(A[0]+i)) = (*(B[0]+i)) * (*(C[0]+i)) * (*(D[0]+i)) * (*(E[0]+i)) * (*(F[0]+i)) * (*(G[0]+i)) * (*(H[0]+i)) ;
+ cout << (*(A[0]+i)) << endl;
+ }
+ return 0.0; // dummy return value.
+}
+
+double funcs3(Stack s,const double &a,const double &b,const double &c){ return a+b+c;}
+double funcs2(Stack s,const double &a,const double &b){ return a+b;}
+double funcs1(Stack s,const double &a){ return a;}
+
+// add the function name to the freefem++ table
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+static void Load_Init(){
++=======
++class Init { public:
++ Init();
++};
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ // Add function with 3 arguments
+ Global.Add("funcs1","(",new OneOperator1s_<double, double>(funcs1));
+ Global.Add("funcs2","(",new OneOperator2s_<double, double, double >(funcs2));
+ Global.Add("funcs3","(",new OneOperator3s_<double, double, double, double >(funcs3));
+ Global.Add("CppModTemplate3","(",new OneOperator3_<double, KN<double>*, KN<double>*, KN<double>*>(CppModTemplate3));
+ Global.Add("CppModTemplate4","(",new OneOperator4_<double, KN<double>*, KN<double>*, KN<double>*, KN<double>*>(CppModTemplate4));
+ Global.Add("CppModTemplate5","(",new OneOperator5_<double, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*>(CppModTemplate5));
+ Global.Add("CppModTemplate6","(",new OneOperator6_<double, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*>(CppModTemplate6));
+ Global.Add("CppModTemplate7","(",new OneOperator7_<double, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*>(CppModTemplate7));
+ Global.Add("CppModTemplate8","(",new OneOperator8_<double, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*, KN<double>*>(CppModTemplate8));
+}
+
+
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/gmsh.cpp.orig
index 8f511c3,0000000..e06e8a5
mode 100644,000000..100644
--- a/examples++-load/gmsh.cpp.orig
+++ b/examples++-load/gmsh.cpp.orig
@@@ -1,841 -1,0 +1,854 @@@
+// ORIG-DATE: September 2009
+// -*- Mode : c++ -*%
+//
+// SUMMARY : interface avec le logiciel gmsh
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// E-MAIL : jacques.morice at ann.jussieu.fr
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+
+// FH July 2009
+// comment all
+// Th3_t->BuildBound();
+// Th3_t->BuildAdj();
+// Th3_t->Buildbnormalv();
+// Th3_t->BuildjElementConteningVertex();
+// is now in the constructor of Mesh3 to be consistante.
+//
+// Vincent HUBER - vincent.huber at cemosis.fr October 2014
+// manage verbosity levels
+//
+#include "ff++.hpp"
+
+using namespace Fem2D;
+
+// Table of number of vertex for an element type of gmsh
+static const int nvElemGmsh[30] = { 2, 3, 0, 4, 0,
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1,
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0 };
+// we considerer only edges, triangles and tetrahedrons in Freefem++
+// 15 :: Vertex Corner
+// 1 :: Edge/line
+// 2 :: triangles
+// 4 :: tetrahedrons
+void SwapBytes(char *array, int size, int n)
+ {
+ char *x = new char[size];
+ for(int i = 0; i < n; i++) {
+ char *a = &array[i * size];
+ memcpy(x, a, size);
+ for(int c = 0; c < size; c++)
+ a[size - 1 - c] = x[c];
+ }
+ delete [] x;
+ }
+
+
+class GMSH_LoadMesh_Op : public E_F0mps
+{
+public:
+ Expression filename;
+ static const int n_name_param = 2; //
+ static basicAC_F0::name_and_type name_param[];
+ Expression nargs[n_name_param];
+public:
+ GMSH_LoadMesh_Op(const basicAC_F0 & args,Expression ffname)
+ : filename(ffname)
+ {
+ if(verbosity>1) cout << "Load mesh given by GMSH " << endl;
+ args.SetNameParam(n_name_param,name_param,nargs);
+ }
+
+ AnyType operator()(Stack stack) const ;
+};
+basicAC_F0::name_and_type GMSH_LoadMesh_Op::name_param[]= {
+ { "reftri", &typeid(long)},
+ { "renum", &typeid(long)}
+};
+
+
+class GMSH_LoadMesh : public OneOperator { public:
+ GMSH_LoadMesh() : OneOperator(atype<pmesh>(),atype<string *>()) {}
+
+ E_F0 * code(const basicAC_F0 & args) const
+ {
+ return new GMSH_LoadMesh_Op( args,t[0]->CastTo(args[0]) );
+ }
+};
+
+Mesh * GMSH_Load(const string & filename)
+ {
+ // variable freefem++
+ int nv, nt=0, nbe=0;
+ Mesh::Vertex *vff;
+ map<int,int> mapnumv;
+
+ // loading mesh and reading mesh in gmsh are in the file GModelIO_Mesh.cpp (directory Geo)
+ char str[256] = "ZZZ";
+ double version = 2.0;
+ bool binary = false, swap = false, postpro = false;
+
+ FILE *fp = fopen(filename.c_str(), "rb");
+ if(!fp){
+ cerr << "Unable to open file " << filename.c_str() << endl;
+ exit(1);
+ }
+
+ while( !feof(fp) ){
+ fgets(str, sizeof(str), fp);
+ if( str[0] == '$'){
+ if(!strncmp(&str[1], "MeshFormat", 10)) {
+ if(!fgets(str, sizeof(str), fp)) exit(1);
+ int format, size;
+ if(sscanf(str, "%lf %d %d", &version, &format, &size) != 3) exit(1);
+ if(verbosity>1) cout << "Mesh Format is " << format << endl;
+ if(format){
+ binary = true;
+ if(verbosity>2) cout << "Mesh is in binary format" << endl;
+ int one;
+ if(fread(&one, sizeof(int), 1, fp) != 1) exit(1);
+ if(one != 1){
+ swap = true;
+ if(verbosity>2) cout << "Swapping bytes from binary file" << endl;
+ }
+ }
+ }
+ else if(!strncmp(&str[1], "PhysicalNames", 13)) {
+ if(verbosity>0) cout << " PhysicalNames is not considered in freefem++ " << endl;
+ }
+
+ else if(!strncmp(&str[1], "NO", 2) || !strncmp(&str[1], "Nodes", 5) ||
+ !strncmp(&str[1], "ParametricNodes", 15)) {
+
+ const bool parametric = !strncmp(&str[1], "ParametricNodes", 15);
+ if( parametric == true ){
+ cerr << " ParametricNodes is not considered yet in freefem++" << endl;
+ exit(1);
+ }
+ if(!fgets(str, sizeof(str), fp)) exit(1);
+
+ if(sscanf(str, "%d", &nv) != 1) exit(1);
+ printf("%d vertices\n", nv);
+
+ // local variables freefem++
+ vff = new Mesh::Vertex[nv];
+
+ int minVertex = nv + 1, maxVertex = -1;
+ for(int i = 0; i < nv; i++) {
+ int num;
+ double xyz[3], uv[2];
+
+ //if (!parametric){
+ if(!binary){
+ if (fscanf(fp, "%d %lf %lf %lf", &num, &xyz[0], &xyz[1], &xyz[2]) != 4)
+ exit(1);
+ }
+ else{
+ if(fread(&num, sizeof(int), 1, fp) != 1) exit(1);
+ if(swap) SwapBytes((char*)&num, sizeof(int), 1);
+ if(fread(xyz, sizeof(double), 3, fp) != 3) exit(1);
+ if(swap) SwapBytes((char*)xyz, sizeof(double), 3);
+ }
+
+ assert( abs(xyz[2]) < 1.e-7);
+ vff[i].x = xyz[0];
+ vff[i].y = xyz[1];
+ vff[i].lab = 1;
+ mapnumv[num] = i;
+ }
+ }
+ else if(!strncmp(&str[1], "ELM", 3) || !strncmp(&str[1], "Elements", 8)) {
+
+ if(!fgets(str, sizeof(str), fp)) exit(1);
+ int numElements;
+ sscanf(str, "%d", &numElements);
+
+ if(verbosity>2) cout << "Loading elements\n" << endl;
+ if(!binary){
+ for(int i = 0; i < numElements; i++) {
+ int num, type, physical = 0, elementary = 0, partition = 0, numVertices;
+ if(version <= 1.0){
+ fscanf(fp, "%d %d %d %d %d", &num, &type, &physical, &elementary, &numVertices);
+ }
+ else{
+ int numTags;
+ fscanf(fp, "%d %d %d", &num, &type, &numTags);
+ for(int j = 0; j < numTags; j++){
+ int tag;
+ fscanf(fp, "%d", &tag);
+ if(j == 0) physical = tag;
+ else if(j == 1) elementary = tag;
+ else if(j == 2) partition = tag;
+ // ignore any other tags for now
+ }
+ assert(type>=1 && type <=31);
+ if( (numVertices = nvElemGmsh[type-1]) == 0){
+ cerr << "Element of type " << type << " is not considered in Freefem++" << endl;
+ exit(1);
+ }
+ }
+
+ if( type == 1 ) nbe++;
+ if( type == 2 ) nt++;
+ if( type == 4 ){
+ cout << "We are loading a two dimensionnal mesh " << endl;
+ exit(1);
+ }
+
+ int indices[60];
+ for(int j = 0; j < numVertices; j++) fscanf(fp, "%d", &indices[j]);
+
+ }
+ }
+ else{
+ int numElementsPartial = 0;
+ while(numElementsPartial < numElements){
+ int header[3];
+ if( fread(header, sizeof(int), 3, fp) != 3 ) exit(1);
+ if(swap) SwapBytes((char*)header, sizeof(int), 3);
+ int type = header[0];
+ int numElms = header[1];
+ int numTags = header[2];
+ int numVertices;
+ assert(type>=1 && type <=31);
+ if( (numVertices = nvElemGmsh[type-1]) == 0){
+ cerr << "Element of type " << type << " is not considered in Freefem++" << endl;
+ exit(1);
+ }
+ unsigned int n = 1 + numTags + numVertices;
+ int *data = new int[n];
+
+ for(int i = 0; i < numElms; i++) {
+ if(fread(data, sizeof(int), n, fp) != n) exit(1);
+ if(swap) SwapBytes((char*)data, sizeof(int), n);
+ int num = data[0];
+ int physical = (numTags > 0) ? data[4 - numTags] : 0;
+ int elementary = (numTags > 1) ? data[4 - numTags + 1] : 0;
+ int partition = (numTags > 2) ? data[4 - numTags + 2] : 0;
+ int *indices = &data[numTags + 1];
+
+ if( type == 1 ) nbe++;
+ if( type == 2 ) nt++;
+ if( type == 4 ){
+ cout << "We are loading a two dimensionnal mesh " << endl;
+ exit(1);
+ }
+
+ }
+ delete [] data;
+ numElementsPartial += numElms;
+
+ }
+ }
+ break;
+ }
+ }
+ }
+ fclose(fp);
+
+ Mesh::Triangle *tff = new Mesh::Triangle[nt];
+ Mesh::Triangle *ttff = tff;
+
+ Mesh::BorderElement *bff = new Mesh::BorderElement[nbe];
+ Mesh::BorderElement *bbff = bff;
+
+ // second reading
+ fp = fopen(filename.c_str(), "rb");
+
+ while( !feof(fp) ){
+ fgets(str, sizeof(str), fp);
+ if( str[0] == '$'){
+
+ if(!strncmp(&str[1], "ELM", 3) || !strncmp(&str[1], "Elements", 8)) {
+
+ if(!fgets(str, sizeof(str), fp)) exit(1);
+ int numElements;
+ sscanf(str, "%d", &numElements);
+
+
+ if(!binary){
+
+ int ie=0;
+ int it=0;
+
+ for(int i = 0; i < numElements; i++) {
+ int num, type, physical = 0, elementary = 0, partition = 0, numVertices;
+ if(version <= 1.0){
+ fscanf(fp, "%d %d %d %d %d", &num, &type, &physical, &elementary, &numVertices);
+ }
+ else{
+ int numTags;
+ fscanf(fp, "%d %d %d", &num, &type, &numTags);
+ for(int j = 0; j < numTags; j++){
+ int tag;
+ fscanf(fp, "%d", &tag);
+ if(j == 0) physical = tag;
+ else if(j == 1) elementary = tag;
+ else if(j == 2) partition = tag;
+ // ignore any other tags for now
+ }
+ assert(type>=1 && type <=31);
+ if( (numVertices = nvElemGmsh[type-1]) == 0){
+ cerr << "Element of type " << type << " is not considered in Freefem++" << endl;
+ exit(1);
+ }
+ }
+
+ int indices[60];
+ for(int j = 0; j < numVertices; j++) fscanf(fp, "%d", &indices[j]);
+
+ if( type == 1 ){
+ int iv0,iv1;
+ iv0 = mapnumv[ indices[0] ];
+ iv1 = mapnumv[ indices[1] ];
+ if(verbosity>2) cout << "Elem " << ie+1 << " " << iv0+1 << " " << iv1+1 << endl;
+ (bbff++)->set(vff, iv0, iv1, physical);
+ ie++;
+ }
+ if( type == 2 ){
+ int iv0,iv1,iv2;
+ iv0 = mapnumv[ indices[0] ];
+ iv1 = mapnumv[ indices[1] ];
+ iv2 = mapnumv[ indices[2] ];
+ if(verbosity>2) cout << "Triangles " << it+1 << " " << iv0+1 << " " << iv1+1 << " " << iv2+1 << endl;
+
+ (ttff++)->set(vff, iv0, iv1, iv2, physical);
+ if(verbosity>2) cout << "mes=" << tff[it].area << endl;
+ if( tff[it].area < 1e-8 ){
+ cout << "bug : mes < 1e-8 !" << endl;
+ exit(1);
+ }
+ it++;
+ }
+ }
+ assert(it==nt);
+ assert(ie==nbe);
+ }
+ else{
+
+ int ie=0;
+ int it=0;
+
+ int numElementsPartial = 0;
+ while(numElementsPartial < numElements){
+ int header[3];
+ if( fread(header, sizeof(int), 3, fp) != 3 ) exit(1);
+ if(swap) SwapBytes((char*)header, sizeof(int), 3);
+ int type = header[0];
+ int numElms = header[1];
+ int numTags = header[2];
+ int numVertices;
+ assert(type>=1 && type <=31);
+ if( (numVertices = nvElemGmsh[type-1]) == 0){
+ cerr << "Element of type " << type << " is not considered in Freefem++" << endl;
+ exit(1);
+ }
+ unsigned int n = 1 + numTags + numVertices;
+ int *data = new int[n];
+ for(int i = 0; i < numElms; i++) {
+ if(fread(data, sizeof(int), n, fp) != n) exit(1);
+ if(swap) SwapBytes((char*)data, sizeof(int), n);
+ int num = data[0];
+ int physical = (numTags > 0) ? data[4 - numTags] : 0;
+ int elementary = (numTags > 1) ? data[4 - numTags + 1] : 0;
+ int partition = (numTags > 2) ? data[4 - numTags + 2] : 0;
+ int *indices = &data[numTags + 1];
+
+ if( type == 1 ){
+ int iv0,iv1;
+ iv0 = mapnumv[ indices[0] ];
+ iv1 = mapnumv[ indices[1] ];
+ (bbff++)->set(vff, iv0, iv1, physical);
+ ie++;
+ }
+ if( type == 2 ){
+ double mes=-1;
+ int iv0,iv1,iv2;
+ iv0 = mapnumv[ indices[0] ];
+ iv1 = mapnumv[ indices[1] ];
+ iv2 = mapnumv[ indices[2] ];
+ (ttff++)->set(vff, iv0, iv1, iv2, physical,mes);
+
+ it++;
+ }
+
+ }
+ delete [] data;
+ numElementsPartial += numElms;
+
+
+ }
+ assert(it==nt);
+ assert(ie==nbe);
+ }
+ }
+ else if(!strncmp(&str[1], "NodeData", 8)) {
+ if(verbosity>1) cout << " NodeData is not considered in freefem++ " << endl;
+ }
+ else if(!strncmp(&str[1], "ElementData", 11) ||
+ !strncmp(&str[1], "ElementNodeData", 15)){
+
+ if(verbosity>1) cout << " ElementData/ElementNodeData is not considered in freefem++ " << endl;
+ }
+ }
+ }
+ fclose(fp);
+
+ Mesh *pTh = new Mesh(nv,nt,nbe,vff,tff,bff);
+ R2 Pn,Px;
+ pTh->BoundingBox(Pn,Px);
+ if(!pTh->quadtree)
+ pTh->quadtree=new Fem2D::FQuadTree(pTh,Pn,Px,pTh->nv);
+
+ return pTh;
+
+ }
+
+
+
+AnyType GMSH_LoadMesh_Op::operator()(Stack stack) const
+{
+
+ string * pffname= GetAny<string *>((*filename)(stack));
+ int renumsurf = 0;
+ if( nargs[1] ) renumsurf = GetAny<long>( (*nargs[1])(stack) );
+ assert( renumsurf <=1 && renumsurf >= 0);
+
+ Mesh * Th = GMSH_Load( *pffname );
+
+ Add2StackOfPtr2FreeRC(stack,Th);
+
+ return Th;
+}
+
+// Load three dimensionnal mesh
+
+class GMSH_LoadMesh3_Op : public E_F0mps
+{
+public:
+ Expression filename;
+ static const int n_name_param = 2; //
+ static basicAC_F0::name_and_type name_param[];
+ Expression nargs[n_name_param];
+public:
+ GMSH_LoadMesh3_Op(const basicAC_F0 & args,Expression ffname)
+ : filename(ffname)
+ {
+ if(verbosity>1) cout << "Load mesh given by GMSH " << endl;
+ args.SetNameParam(n_name_param,name_param,nargs);
+ }
+
+ AnyType operator()(Stack stack) const ;
+};
+basicAC_F0::name_and_type GMSH_LoadMesh3_Op::name_param[]= {
+ { "reftet", &typeid(long)},
+ { "renum", &typeid(long)}
+};
+
+
+class GMSH_LoadMesh3 : public OneOperator { public:
+ GMSH_LoadMesh3() : OneOperator(atype<pmesh3>(),atype<string *>()) {}
+
+ E_F0 * code(const basicAC_F0 & args) const
+ {
+ return new GMSH_LoadMesh3_Op( args,t[0]->CastTo(args[0]) );
+ }
+};
+
+Mesh3 * GMSH_Load3(const string & filename)
+ {
+ // variable freefem++
+ int nv, nt=0, nbe=0;
+ Vertex3 *vff;
+ map<int,int> mapnumv;
+
+ // loading mesh and reading mesh in gmsh are in the file GModelIO_Mesh.cpp (directory Geo)
+ char str[256] = "ZZZ";
+ double version = 2.0;
+ bool binary = false, swap = false, postpro = false;
+
+ FILE *fp = fopen(filename.c_str(), "rb");
+ if(!fp){
+ cerr << "Unable to open file " << filename.c_str() << endl;
+ exit(1);
+ }
+
+ while( !feof(fp) ){
+ fgets(str, sizeof(str), fp);
+ if( str[0] == '$'){
+ if(!strncmp(&str[1], "MeshFormat", 10)) {
+ if(!fgets(str, sizeof(str), fp)) exit(1);
+ int format, size;
+ if(sscanf(str, "%lf %d %d", &version, &format, &size) != 3) exit(1);
+ if(format){
+ binary = true;
+ if(verbosity>1) cout << "Mesh is in binary format" << endl;
+ int one;
+ if(fread(&one, sizeof(int), 1, fp) != 1) exit(1);
+ if(one != 1){
+ swap = true;
+ if(verbosity>1) cout << "Swapping bytes from binary file" << endl;
+ }
+ }
+ }
+ else if(!strncmp(&str[1], "PhysicalNames", 13)) {
+ if(verbosity>1) cout << " PhysicalNames is not considered in freefem++ " << endl;
+ }
+
+ else if(!strncmp(&str[1], "NO", 2) || !strncmp(&str[1], "Nodes", 5) ||
+ !strncmp(&str[1], "ParametricNodes", 15)) {
+
+ const bool parametric = !strncmp(&str[1], "ParametricNodes", 15);
+ if( parametric == true ){
+ cerr << " ParametricNodes is not considered yet in freefem++" << endl;
+ exit(1);
+ }
+ if(!fgets(str, sizeof(str), fp)) exit(1);
+
+ if(sscanf(str, "%d", &nv) != 1) exit(1);
+ printf("%d vertices\n", nv);
+
+ // local variables freefem++
+ vff = new Vertex3[nv];
+ //map<int,int> mapnumv;
+
+ int minVertex = nv + 1, maxVertex = -1;
+ for(int i = 0; i < nv; i++) {
+ int num;
+ double xyz[3], uv[2];
+
+ //if (!parametric){
+ if(!binary){
+ if (fscanf(fp, "%d %lf %lf %lf", &num, &xyz[0], &xyz[1], &xyz[2]) != 4)
+ exit(1);
+ }
+ else{
+ if(fread(&num, sizeof(int), 1, fp) != 1) exit(1);
+ if(swap) SwapBytes((char*)&num, sizeof(int), 1);
+ if(fread(xyz, sizeof(double), 3, fp) != 3) exit(1);
+ if(swap) SwapBytes((char*)xyz, sizeof(double), 3);
+ }
+
+ vff[i].x = xyz[0];
+ vff[i].y = xyz[1];
+ vff[i].z = xyz[2];
+ vff[i].lab = 1;
+ mapnumv[num] = i;
+ }
+ }
+ else if(!strncmp(&str[1], "ELM", 3) || !strncmp(&str[1], "Elements", 8)) {
+
+ if(!fgets(str, sizeof(str), fp)) exit(1);
+ int numElements;
+ sscanf(str, "%d", &numElements);
+
+ if(!binary){
+ for(int i = 0; i < numElements; i++)
+ {
+ int num, type, physical = 0, elementary = 0, partition = 0, numVertices;
+ if(version <= 1.0)
+ {
+ fscanf(fp, "%d %d %d %d %d", &num, &type, &physical, &elementary, &numVertices);
+ }
+ else{
+ int numTags;
+ fscanf(fp, "%d %d %d", &num, &type, &numTags);
+ for(int j = 0; j < numTags; j++){
+ int tag;
+ fscanf(fp, "%d", &tag);
+ if(j == 0) physical = tag;
+ else if(j == 1) elementary = tag;
+ else if(j == 2) partition = tag;
+ // ignore any other tags for now
+ }
+ assert(type>=1 && type <=31);
+ if( (numVertices = nvElemGmsh[type-1]) == 0){
+ cerr << "Element of type " << type << " is not considered in Freefem++" << endl;
+ exit(1);
+ }
+ }
+
+ if( type == 1 ){
+ if(i==0)
+ if(verbosity>0) cout << "edges in 3D mesh are not considered yet in freefem++, skeep data" << endl;
+ }
+ if( type == 2 ) nbe++;
+ if( type == 4 ) nt++;
+
+ int indices[60];
+ for(int j = 0; j < numVertices; j++) fscanf(fp, "%d", &indices[j]);
+
+ }
+ }
+ else
+ {
+ int numElementsPartial = 0;
+ while(numElementsPartial < numElements){
+ int header[3];
+ if( fread(header, sizeof(int), 3, fp) != 3 ) exit(1);
+ if(swap) SwapBytes((char*)header, sizeof(int), 3);
+ int type = header[0];
+ int numElms = header[1];
+ int numTags = header[2];
+ int numVertices;
+ assert(type>=1 && type <=31);
+ if( (numVertices = nvElemGmsh[type-1]) == 0){
+ cout << "Element of type " << type << " is not considered in Freefem++" << endl;
+ exit(1);
+ }
+ unsigned int n = 1 + numTags + numVertices;
+ int *data = new int[n];
+
+ for(int i = 0; i < numElms; i++) {
+ if(fread(data, sizeof(int), n, fp) != n) exit(1);
+ if(swap) SwapBytes((char*)data, sizeof(int), n);
+ int num = data[0];
+ int physical = (numTags > 0) ? data[4 - numTags] : 0;
+ int elementary = (numTags > 1) ? data[4 - numTags + 1] : 0;
+ int partition = (numTags > 2) ? data[4 - numTags + 2] : 0;
+ int *indices = &data[numTags + 1];
+
+ if( type == 1 && i==0 ){
+ cout << "edges in 3D mesh are not used in freefem++,skeep data" << endl;
+ //exit(1);
+ }
+ if( type == 2 ) nbe++;
+ if( type == 4 ) nt++;
+ }
+ delete [] data;
+ numElementsPartial += numElms;
+
+ }
+ }
+ break;
+ }
+ }
+ }
+ fclose(fp);
+
+ if(verbosity>1) cout << "closing file " << nt << " " << nbe << endl;
+
+ Tet *tff = new Tet[nt];
+ Tet *ttff = tff;
+
+ Triangle3 *bff = new Triangle3[nbe];
+ Triangle3 *bbff = bff;
+
+ // second reading
+ fp = fopen(filename.c_str(), "rb");
+
+ while( !feof(fp) ){
+ fgets(str, sizeof(str), fp);
+ if( str[0] == '$'){
+
+ if(!strncmp(&str[1], "ELM", 3) || !strncmp(&str[1], "Elements", 8)) {
+
+ if(!fgets(str, sizeof(str), fp)) exit(1);
+ int numElements;
+ sscanf(str, "%d", &numElements);
+
+ printf("%d tetrahedrons\n", nt);
+ printf("%d triangles\n", nbe);
+ printf("%d numElements\n", numElements);
+ if(!binary){
+
+ int ie=0;
+ int it=0;
+
+ for(int i = 0; i < numElements; i++) {
+ int num, type, physical = 0, elementary = 0, partition = 0, numVertices;
+ if(version <= 1.0){
+ fscanf(fp, "%d %d %d %d %d", &num, &type, &physical, &elementary, &numVertices);
+ }
+ else{
+ int numTags;
+ fscanf(fp, "%d %d %d", &num, &type, &numTags);
+ for(int j = 0; j < numTags; j++){
+ int tag;
+ fscanf(fp, "%d", &tag);
+
+ if(j == 0) physical = tag;
+ else if(j == 1) elementary = tag;
+ else if(j == 2) partition = tag;
+ // ignore any other tags for now
+ }
+ assert(type>=1 && type <=31);
+ if( (numVertices = nvElemGmsh[type-1]) == 0){
+ cerr << "Element of type " << type << " is not considered in Freefem++" << endl;
+ exit(1);
+ }
+ }
+
+ int indices[60];
+ for(int j = 0; j < numVertices; j++){
+ fscanf(fp, "%d", &indices[j]);
+ }
+ if( type == 2 ){
+ int ivff[3];
+ for(int ii=0; ii < numVertices; ii++){
+ ivff[ii] = mapnumv[ indices[ii] ];
+ assert( ivff[ii]>=0 && ivff[ii]< nv );
+ }
+ (bbff++)->set(vff,ivff,physical);
+ ie++;
+ }
+ if( type == 4 ){
+ int ivff[4];
+ for(int ii=0; ii < numVertices; ii++){
+ ivff[ii] = mapnumv[ indices[ii] ];
+ assert( ivff[ii]>=0 && ivff[ii]< nv );
+ }
+ (ttff++)->set(vff,ivff,physical);
+ it++;
+ }
+ }
+ assert( it==nt );
+ assert( ie==nbe );
+ }
+ else{
+
+ int ie=0;
+ int it=0;
+
+ int numElementsPartial = 0;
+ while(numElementsPartial < numElements){
+ int header[3];
+ if( fread(header, sizeof(int), 3, fp) != 3 ) exit(1);
+ if(swap) SwapBytes((char*)header, sizeof(int), 3);
+ int type = header[0];
+ int numElms = header[1];
+ int numTags = header[2];
+ int numVertices;
+ assert(type>=1 && type <=31);
+ if( (numVertices = nvElemGmsh[type-1]) == 0){
+ cerr << "Element of type " << type << " is not considered in Freefem++" << endl;
+ exit(1);
+ }
+ unsigned int n = 1 + numTags + numVertices;
+ int *data = new int[n];
+ for(int i = 0; i < numElms; i++) {
+ if(fread(data, sizeof(int), n, fp) != n) exit(1);
+ if(swap) SwapBytes((char*)data, sizeof(int), n);
+ int num = data[0];
+ int physical = (numTags > 0) ? data[4 - numTags] : 0;
+ int elementary = (numTags > 1) ? data[4 - numTags + 1] : 0;
+ int partition = (numTags > 2) ? data[4 - numTags + 2] : 0;
+ int *indices = &data[numTags + 1];
+
+ if( type == 2 ){
+ int ivff[3];
+ for(int ii=0; ii < numVertices; ii++) ivff[ii] = mapnumv[ indices[ii] ];
+ (bbff++)->set(vff,ivff,physical);
+ ie++;
+ }
+ if( type == 4 ){
+ int ivff[4];
+ for(int ii=0; ii < numVertices; ii++) ivff[ii] = mapnumv[ indices[ii] ];
+ (ttff++)->set(vff,ivff,physical);
+ it++;
+ }
+
+ }
+ delete [] data;
+ numElementsPartial += numElms;
+
+ }
+ assert(it==nt);
+ assert(ie==nbe);
+ }
+ }
+ else if(!strncmp(&str[1], "NodeData", 8)) {
+ if(verbosity) cout << " NodeData is not considered in freefem++ " << endl;
+ }
+ else if(!strncmp(&str[1], "ElementData", 11) ||
+ !strncmp(&str[1], "ElementNodeData", 15)){
+
+ if(verbosity) cout << " ElementData/ElementNodeData is not considered in freefem++ " << endl;
+ }
+ }
+ }
+ fclose(fp);
+
+ if(nt==0){
+ Mesh3 *Th3 = new Mesh3(nv,nbe,vff,bff);
+ return Th3;
+ }
+ else{
+ Mesh3 *Th3 = new Mesh3(nv,nt,nbe,vff,tff,bff);
+ return Th3;
+ }
+
+
+ }
+
+
+
+AnyType GMSH_LoadMesh3_Op::operator()(Stack stack) const
+{
+
+ string * pffname= GetAny<string *>((*filename)(stack));
+ int renumsurf = 0;
+ if( nargs[1] ) renumsurf = GetAny<long>( (*nargs[1])(stack) );
+ assert( renumsurf <=1 && renumsurf >= 0);
+
+ Mesh3 * Th3_t = GMSH_Load3( *pffname);
+
+ Th3_t->BuildGTree();
+ Add2StackOfPtr2FreeRC(stack,Th3_t);
+
+ return Th3_t;
+}
+
++<<<<<<< HEAD
+/* class Init1 { public:
+ Init1();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++class Init1 { public:
++ Init1();
++};
++
++LOADINIT(Init1) // une variable globale qui serat construite au chargement dynamique
++
++Init1::Init1(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ //if (verbosity)
+ if(verbosity>1) cout << " load: gmsh " << endl;
+ Global.Add("gmshload3","(",new GMSH_LoadMesh3);
+ Global.Add("gmshload","(",new GMSH_LoadMesh);
+ if(verbosity>1) cout << " load: gmsh " << endl;
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/gsl.cpp.orig
index a3cc3fb,0000000..ee753f6
mode 100644,000000..100644
--- a/examples++-load/gsl.cpp.orig
+++ b/examples++-load/gsl.cpp.orig
@@@ -1,256 -1,0 +1,268 @@@
+// Example C++ function "myfunction", dynamically loaded into "load.edp"
+// ---------------------------------------------------------------------
+// $Id$
+//ff-c++-LIBRARY-dep: gsl
+//ff-c++-cpp-dep:
+#include <ff++.hpp>
+#include <gsl/gsl_sf.h>
+#include <gsl/gsl_sf_airy.h>
+#include <gsl/gsl_sf_bessel.h>
+#include <gsl/gsl_sf_clausen.h>
+#include <gsl/gsl_sf_coulomb.h>
+#include <gsl/gsl_sf_coupling.h>
+#include <gsl/gsl_sf_dawson.h>
+#include <gsl/gsl_sf_debye.h>
+#include <gsl/gsl_sf_dilog.h>
+#include <gsl/gsl_sf_elementary.h>
+#include <gsl/gsl_sf_ellint.h>
+#include <gsl/gsl_sf_elljac.h>
+#include <gsl/gsl_sf_erf.h>
+#include <gsl/gsl_sf_exp.h>
+#include <gsl/gsl_sf_expint.h>
+#include <gsl/gsl_sf_fermi_dirac.h>
+#include <gsl/gsl_sf_gamma.h>
+#include <gsl/gsl_sf_gegenbauer.h>
+#include <gsl/gsl_sf_hyperg.h>
+#include <gsl/gsl_sf_laguerre.h>
+#include <gsl/gsl_sf_lambert.h>
+#include <gsl/gsl_sf_legendre.h>
+#include <gsl/gsl_sf_log.h>
+#include <gsl/gsl_sf_mathieu.h>
+#include <gsl/gsl_sf_pow_int.h>
+#include <gsl/gsl_sf_psi.h>
+#include <gsl/gsl_sf_result.h>
+#include <gsl/gsl_sf_synchrotron.h>
+#include <gsl/gsl_sf_transport.h>
+#include <gsl/gsl_sf_trig.h>
+#include <gsl/gsl_sf_zeta.h>
+#include <gsl/gsl_poly.h>
+
+#include <gsl/gsl_bspline.h>
+#include <gsl/gsl_multifit.h>
+
+#include <gsl/gsl_rng.h>
+#include <gsl/gsl_randist.h>
+#include <gsl/gsl_cdf.h>
+
+#include "ff_gsl_awk.hpp"
+
+long gslpolysolvequadratic( KN_<double> a, KN_<double> x)
+{
+ ffassert(a.N()>2 && x.N()>1);
+ return gsl_poly_solve_quadratic (a[2],a[1],a[0],&(x[0]),&(x[1]));
+}
+long gslpolysolvecubic( KN_<double> a, KN_<double> x)
+{
+ ffassert(a.N()>2 && x.N()>2);
+ return gsl_poly_solve_cubic (a[2],a[1],a[0],&(x[0]),&(x[1]),&(x[2]));
+ }
+
+long gslpolycomplexsolve( KN_<double> a, KN_<Complex> x)
+{
+ int n = a.N();
+ ffassert( n-1 <= x.N());
+ KN<double> z(n*2);
+ gsl_poly_complex_workspace * w= gsl_poly_complex_workspace_alloc (n);
+ int ok=gsl_poly_complex_solve (&a[0], n, w, &z[0]);
+ gsl_poly_complex_workspace_free (w);
+ for (long i = 0; i < n-1; i++)
+ x[i] = Complex(z[2*i], z[2*i+1]);
+ return ok;
+}
+
+// Ramdom part..
+AnyType init_gsl_rng(Stack,const AnyType &x){
+ gsl_rng ** pp = PGetAny< gsl_rng *>(x);
+ *pp = gsl_rng_alloc(gsl_rng_default) ;
+ return x;
+};
+AnyType delete_gsl_rng(Stack,const AnyType &x)
+{
+ gsl_rng ** pp = PGetAny< gsl_rng *>(x);
+ if(*pp) gsl_rng_free(*pp);
+ *pp=0;
+ return Nothing;
+};
+
+gsl_rng ** init_gsl_rng_type( gsl_rng ** pp, const gsl_rng_type * g)
+{
+ *pp = gsl_rng_alloc(g) ;
+ return pp;
+}
+
+gsl_rng ** set_gsl_rng_type( gsl_rng ** pp, const gsl_rng_type * g)
+{
+ if(*pp) gsl_rng_free(*pp);
+ *pp = gsl_rng_alloc(g) ;
+ return pp;
+}
+gsl_rng ** set_gsl_cpy( gsl_rng ** pp, gsl_rng ** gg)
+{
+ if(*pp) gsl_rng_free(*pp);
+ *pp = gsl_rng_clone(*gg);
+ return pp;
+}
+
+double gslrnguniform( gsl_rng ** pr) { return gsl_rng_uniform(*pr);}
+double gslrnguniformpos( gsl_rng ** pr) { return gsl_rng_uniform_pos(*pr);}
+long gsl_rng_get(gsl_rng ** pr){ return gsl_rng_get(*pr);}
+long gsl_rng_min(gsl_rng ** pr){ return gsl_rng_min(*pr);}
+long gsl_rng_max(gsl_rng ** pr){ return gsl_rng_max(*pr);}
+long gsl_rng_set(gsl_rng ** pr, long s){ gsl_rng_set(*pr,s);return 0; }
+string * gsl_name(Stack s,const gsl_rng_type * const & pr)
+ {return Add2StackOfPtr2Free(s,new string((*pr).name));}
+
+long ngslrng =0;
+long gslabort =1;
+static const gsl_rng_type ** gsl_rngpp;
+
+const gsl_rng_type * gslrngtype(long i)
+{
+ ffassert(i >=0 && i < ngslrng);
+ return gsl_rngpp[i];
+}
+
+extern "C" {
+ void ffhandler (const char * reason,
+ const char * file,
+ int line,
+ int gsl_errno);
+
+}
+void ffhandler (const char * reason,
+ const char * file,
+ int line,
+ int gsl_errno)
+{
+ cerr << "\n GSL Error = " << reason << " in " <<file << " at " << line << " err= " <<gsl_errno << endl;
+ if(gslabort) ExecError("Gsl errorhandler");
+}
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+using namespace Fem2D ;
+static void Load_Init(){
++=======
++class Init { public:
++ Init();
++};
++LOADINIT(Init);
++using namespace Fem2D ;
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ Global.Add("gslpolysolvequadratic","(",new OneOperator2<long,KN_<double>,KN_<double> >( gslpolysolvequadratic));
+ Global.Add("gslpolysolvecubic","(",new OneOperator2<long,KN_<double>,KN_<double> >(gslpolysolvecubic));
+ Global.Add("gslpolycomplexsolve","(",new OneOperator2<long,KN_<double>,KN_<Complex> >( gslpolycomplexsolve));
+/* spline gsl and June 2013 */
+ /*
+ Dcl_Type<gsl_bspline_workspace**>(::InitializePtr<gsl_bspline_workspace **>,::DeletePtr<gsl_bspline_workspace **>);
+ zzzfff->Add("gslbspline",atype<gsl_bspline_workspace ** >());
+ TheOperators->Add("<-",
+ new OneOperator3_<gsl_bspline_workspace **,gsl_bspline_workspace **,KNM_<double> >(pBuilQFd<R1>),
+*/
+ // a faire ... interface randon of gsl ...
+ gsl_rng_env_setup();
+ gsl_rngpp =gsl_rng_types_setup();
+ for(long i=0; gsl_rngpp[i]; )
+ ngslrng=++i;
+ Dcl_Type< gsl_rng ** > (init_gsl_rng,delete_gsl_rng);
+ Dcl_Type< const gsl_rng_type * > (); //gsl_rng_type
+ Global.New("ngslrng",CConstant<long>(ngslrng));
+//
+// all gsl random generator .???? .
+/*
+Global.New("gslrngborosh13",CConstant<const gsl_rng_type *>(gsl_rng_borosh13));
+Global.New("gslrngcoveyou",CConstant<const gsl_rng_type *>(gsl_rng_coveyou));
+Global.New("gslrngcmrg",CConstant<const gsl_rng_type *>(gsl_rng_cmrg));
+Global.New("gslrngfishman18",CConstant<const gsl_rng_type *>(gsl_rng_fishman18));
+Global.New("gslrngfishman20",CConstant<const gsl_rng_type *>(gsl_rng_fishman20));
+Global.New("gslrngfishman2x",CConstant<const gsl_rng_type *>(gsl_rng_fishman2x));
+Global.New("gslrnggfsr4",CConstant<const gsl_rng_type *>(gsl_rng_gfsr4));
+Global.New("gslrngknuthran",CConstant<const gsl_rng_type *>(gsl_rng_knuthran));
+Global.New("gslrngknuthran2",CConstant<const gsl_rng_type *>(gsl_rng_knuthran2));
+Global.New("gslrngknuthran2002",CConstant<const gsl_rng_type *>(gsl_rng_knuthran2002));
+Global.New("gslrnglecuyer21",CConstant<const gsl_rng_type *>(gsl_rng_lecuyer21));
+Global.New("gslrngminstd",CConstant<const gsl_rng_type *>(gsl_rng_minstd));
+Global.New("gslrngmrg",CConstant<const gsl_rng_type *>(gsl_rng_mrg));
+Global.New("gslrngmt19937",CConstant<const gsl_rng_type *>(gsl_rng_mt19937));
+Global.New("gslrngmt199371999",CConstant<const gsl_rng_type *>(gsl_rng_mt19937_1999));
+Global.New("gslrngmt199371998",CConstant<const gsl_rng_type *>(gsl_rng_mt19937_1998));
+Global.New("gslrngr250",CConstant<const gsl_rng_type *>(gsl_rng_r250));
+Global.New("gslrngran0",CConstant<const gsl_rng_type *>(gsl_rng_ran0));
+Global.New("gslrngran1",CConstant<const gsl_rng_type *>(gsl_rng_ran1));
+Global.New("gslrngran2",CConstant<const gsl_rng_type *>(gsl_rng_ran2));
+Global.New("gslrngran3",CConstant<const gsl_rng_type *>(gsl_rng_ran3));
+Global.New("gslrngrand",CConstant<const gsl_rng_type *>(gsl_rng_rand));
+Global.New("gslrngrand48",CConstant<const gsl_rng_type *>(gsl_rng_rand48));
+Global.New("gslrngrandom128bsd",CConstant<const gsl_rng_type *>(gsl_rng_random128_bsd));
+Global.New("gslrngrandom128glibc2",CConstant<const gsl_rng_type *>(gsl_rng_random128_glibc2));
+Global.New("gslrngrandom128libc5",CConstant<const gsl_rng_type *>(gsl_rng_random128_libc5));
+Global.New("gslrngrandom256bsd",CConstant<const gsl_rng_type *>(gsl_rng_random256_bsd));
+Global.New("gslrngrandom256glibc2",CConstant<const gsl_rng_type *>(gsl_rng_random256_glibc2));
+Global.New("gslrngrandom256libc5",CConstant<const gsl_rng_type *>(gsl_rng_random256_libc5));
+Global.New("gslrngrandom32bsd",CConstant<const gsl_rng_type *>(gsl_rng_random32_bsd));
+Global.New("gslrngrandom32glibc2",CConstant<const gsl_rng_type *>(gsl_rng_random32_glibc2));
+Global.New("gslrngrandom32libc5",CConstant<const gsl_rng_type *>(gsl_rng_random32_libc5));
+Global.New("gslrngrandom64bsd",CConstant<const gsl_rng_type *>(gsl_rng_random64_bsd));
+Global.New("gslrngrandom64glibc2",CConstant<const gsl_rng_type *>(gsl_rng_random64_glibc2));
+Global.New("gslrngrandom64libc5",CConstant<const gsl_rng_type *>(gsl_rng_random64_libc5));
+Global.New("gslrngrandom8bsd",CConstant<const gsl_rng_type *>(gsl_rng_random8_bsd));
+Global.New("gslrngrandom8glibc2",CConstant<const gsl_rng_type *>(gsl_rng_random8_glibc2));
+Global.New("gslrngrandom8libc5",CConstant<const gsl_rng_type *>(gsl_rng_random8_libc5));
+Global.New("gslrngrandombsd",CConstant<const gsl_rng_type *>(gsl_rng_random_bsd));
+Global.New("gslrngrandomglibc2",CConstant<const gsl_rng_type *>(gsl_rng_random_glibc2));
+Global.New("gslrngrandomlibc5",CConstant<const gsl_rng_type *>(gsl_rng_random_libc5));
+Global.New("gslrngrandu",CConstant<const gsl_rng_type *>(gsl_rng_randu));
+Global.New("gslrngranf",CConstant<const gsl_rng_type *>(gsl_rng_ranf));
+Global.New("gslrngranlux",CConstant<const gsl_rng_type *>(gsl_rng_ranlux));
+Global.New("gslrngranlux389",CConstant<const gsl_rng_type *>(gsl_rng_ranlux389));
+Global.New("gslrngranlxd1",CConstant<const gsl_rng_type *>(gsl_rng_ranlxd1));
+Global.New("gslrngranlxd2",CConstant<const gsl_rng_type *>(gsl_rng_ranlxd2));
+Global.New("gslrngranlxs0",CConstant<const gsl_rng_type *>(gsl_rng_ranlxs0));
+Global.New("gslrngranlxs1",CConstant<const gsl_rng_type *>(gsl_rng_ranlxs1));
+Global.New("gslrngranlxs2",CConstant<const gsl_rng_type *>(gsl_rng_ranlxs2));
+Global.New("gslrngranmar",CConstant<const gsl_rng_type *>(gsl_rng_ranmar));
+Global.New("gslrngslatec",CConstant<const gsl_rng_type *>(gsl_rng_slatec));
+Global.New("gslrngtaus",CConstant<const gsl_rng_type *>(gsl_rng_taus));
+Global.New("gslrngtaus2",CConstant<const gsl_rng_type *>(gsl_rng_taus2));
+Global.New("gslrngtaus113",CConstant<const gsl_rng_type *>(gsl_rng_taus113));
+Global.New("gslrngtransputer",CConstant<const gsl_rng_type *>(gsl_rng_transputer));
+Global.New("gslrngtt800",CConstant<const gsl_rng_type *>(gsl_rng_tt800));
+Global.New("gslrnguni",CConstant<const gsl_rng_type *>(gsl_rng_uni));
+Global.New("gslrnguni32",CConstant<const gsl_rng_type *>(gsl_rng_uni32));
+Global.New("gslrngvax",CConstant<const gsl_rng_type *>(gsl_rng_vax));
+Global.New("gslrngwaterman14",CConstant<const gsl_rng_type *>(gsl_rng_waterman14));
+Global.New("gslrngzuf",CConstant<const gsl_rng_type *>(gsl_rng_zuf));
+Global.New("gslrngdefault",CConstant<const gsl_rng_type *>(gsl_rng_default));
+*/
+
+zzzfff->Add("gslrng",atype<gsl_rng ** >());
+TheOperators->Add("<-",new OneOperator2<gsl_rng **,gsl_rng **, const gsl_rng_type * >(init_gsl_rng_type));
+TheOperators->Add("=",new OneOperator2<gsl_rng **,gsl_rng **, const gsl_rng_type * >(set_gsl_rng_type));
+TheOperators->Add("=",new OneOperator2<gsl_rng **,gsl_rng **, gsl_rng ** >(set_gsl_cpy));
+//map_type[typeid(gsl_rng *).name()]->AddCast( new E_F1_funcT<gsl_rng *,gsl_rng **>(UnRef<gsl_rng*>) );
+//map_type[typeid(gsl_rng *).name()]->AddCast( new E_F1_funcT<gsl_rng *,gsl_rng **>(UnRef<gsl_rng*>) );
+
+Global.Add("gslrnguniform","(",new OneOperator1<double,gsl_rng **>( gslrnguniform));
+Global.Add("gslrnguniformpos","(",new OneOperator1<double,gsl_rng **>( gslrnguniformpos));
+
+Global.Add("gslname","(",new OneOperator1s_<string * ,const gsl_rng_type *>( gsl_name));
+Global.Add("gslrngget","(",new OneOperator1<long ,gsl_rng **>( gsl_rng_get));
+Global.Add("gslrngmin","(",new OneOperator1<long ,gsl_rng **>( gsl_rng_min));
+Global.Add("gslrngmax","(",new OneOperator1<long ,gsl_rng **>( gsl_rng_max));
+Global.Add("gslrngset","(",new OneOperator2<long ,gsl_rng **, long>(gsl_rng_set));
+ Global.Add("gslrngtype","(",new OneOperator1<const gsl_rng_type * ,long>(gslrngtype));
+ init_gsl_sf() ;
+ gslabort=1;
+ Global.New("gslabortonerror",CConstant<long*>(&gslabort));
+
+ gsl_set_error_handler(ffhandler);
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/ilut.cpp.orig
index 4fa981d,0000000..f463e02
mode 100644,000000..100644
--- a/examples++-load/ilut.cpp.orig
+++ b/examples++-load/ilut.cpp.orig
@@@ -1,152 -1,0 +1,170 @@@
+/*
+ * ilut.cpp: ILUT plugin for FreeFem++ wrapping GMM++ functions.
+ * Copyright (C) 2008, Alessandro Proverbio and David Radice.
+ *
+ * ilut.cpp is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation;
+ *
+ * ilut.cpp is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with ilut.cpp; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+//ff-c++-LIBRARY-dep: gmm
+//ff-c++-cpp-dep:
+
+#include <cmath>
+#include <iostream>
+#include "AFunction.hpp"
+#include "RNM.hpp"
+#include "error.hpp"
+#include <gmm/gmm.h>
+#include <vector>
+
+#define ILUT_K_FILLIN 5
+#define ILUT_EPS 1e-6
+
+#define PRINT(VAR) cout << VAR << endl
+
+using namespace std;
+using namespace gmm;
+
+typedef ilut_precond<row_matrix<rsvector<double> > > my_ilut_precond;
+
+class ILUT;
+
+class ILUT_Matrix {
+ private:
+ long * _i;
+ long * _j;
+ double * _c;
+
+ long _nelem;
+ long _size;
+ public:
+ ILUT_Matrix(KN<long> * const & i,
+ KN<long> * const & j,
+ KN<double> * const & c): _i(*i),
+ _j(*j),
+ _c(*c),
+ _nelem(c->N()) {
+ _size=max(i->max(),j->max());
+ ++_size;
+ }
+ friend class ILUT;
+};
+
+class ILUT_Vector {
+ private:
+ double * _v;
+ long _size;
+ public:
+ ILUT_Vector(KN<double> * const & c) : _v(*c),_size(c->N()) {}
+ friend class ILUT;
+};
+
+class ILUT {
+ private:
+ static my_ilut_precond * p;
+ static long size;
+ public:
+ static long make_ilut_precond(ILUT_Matrix const & m) {
+ row_matrix<rsvector<double> > A(m._size,m._size);
+ row_matrix<wsvector<double> > w_A(m._size,m._size);
+
+ for(long k(0);k<m._nelem;++k) {
+ w_A[m._i[k]][m._j[k]]=m._c[k];
+ }
+
+ copy(w_A,A); // A <-- w_A
+ delete p;
+ p = new my_ilut_precond(A,ILUT_K_FILLIN,ILUT_EPS);
+
+ size=m._size;
+
+ return 0;
+ }
+ static void apply_ilut_precond(ILUT_Vector const & v,
+ KN<double> * const & x) {
+
+ vector<double> vv(size);
+ vector<double> xx(size);
+
+ for(long k=0;k<size;++k) {
+ vv[k]=v._v[k];
+ }
+
+ mult(*p,vv,xx); // xx <-- p.solve(vv)
+
+ for(long k=0;k<size;++k) {
+ (*x)[k]=xx[k];
+ }
+
+ // If used for the full vector fill the remaining components
+ for(long k=0;k+size<x->N();++k) {
+ (*x)[k+size]=v._v[k+size];
+ }
+ }
+
+};
+
+my_ilut_precond * ILUT::p=0;
+long ILUT::size=0;
+
+long * make_ilut_precond_eq(long * const & errorcode,
+ ILUT_Matrix const & mat) {
+ *errorcode=ILUT::make_ilut_precond(mat);
+ return errorcode;
+}
+
+KN<double> * apply_ilut_precond_eq(KN<double> * const & x,
+ ILUT_Vector const & vec) {
+ ILUT::apply_ilut_precond(vec, x);
+ return x;
+}
+
+ILUT_Matrix make_ilut_precond(KN<long> * const & i,
+ KN<long> * const & j,
+ KN<double> * const & v) {
+ return ILUT_Matrix(i,j,v);
+}
+
+ILUT_Vector apply_ilut_precond(KN<double> * const & v) {
+ return ILUT_Vector(v);
+}
+
++<<<<<<< HEAD
+static void Load_Init() {
+ if(verbosity) cout << " -- load ilut init : " << endl;
+ Dcl_Type<ILUT_Matrix>();
+ Dcl_Type<ILUT_Vector>();
+ Global.Add("applyIlutPrecond","(",new OneOperator1_<ILUT_Vector,KN<double>* >(apply_ilut_precond));
+ Global.Add("makeIlutPrecond","(", new OneOperator3_<ILUT_Matrix,KN<long> *,KN<long> *,KN<double> *>(make_ilut_precond));
+ TheOperators->Add("=", new OneOperator2_<long *,long *,ILUT_Matrix>(make_ilut_precond_eq));
+ TheOperators->Add("=", new OneOperator2_<KN<double> *, KN<double> *,ILUT_Vector>(apply_ilut_precond_eq));
+}
+
+LOADFUNC(Load_Init)
++=======
++class IluInit {
++ public:
++ IluInit() {
++ if(verbosity) cout << " -- load ilut init : " << endl;
++ Dcl_Type<ILUT_Matrix>();
++ Dcl_Type<ILUT_Vector>();
++ Global.Add("applyIlutPrecond","(",new OneOperator1_<ILUT_Vector,KN<double>* >(apply_ilut_precond));
++ Global.Add("makeIlutPrecond","(", new OneOperator3_<ILUT_Matrix,KN<long> *,KN<long> *,KN<double> *>(make_ilut_precond));
++ TheOperators->Add("=", new OneOperator2_<long *,long *,ILUT_Matrix>(make_ilut_precond_eq));
++ TheOperators->Add("=", new OneOperator2_<KN<double> *, KN<double> *,ILUT_Vector>(apply_ilut_precond_eq));
++ }
++};
++
++//static IluInit init;
++LOADINIT(IluInit)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/iovtk.cpp
index dde51d9,72af3c1..dddc41a
--- a/examples++-load/iovtk.cpp
+++ b/examples++-load/iovtk.cpp
@@@ -829,7 -829,7 +829,7 @@@ void VTU_WRITE_MESH( FILE *fp, const Me
// Elemenents
BEGINTYPE_VTU( fp, "Cells");
VTU_DATA_ARRAY( fp, "Int32", "connectivity" , binary); // rgmin=0 ; rgmax=nc-1;
-- // begin :: connectivit� des elements
++ // begin :: connectivit� des elements
if(binary){
int IntType=4;
if(verbosity > 1) printf("writting tetrahedre elements \n");
@@@ -888,7 -888,7 +888,7 @@@
}
}
if(binary) fprintf(fp, "\n");
-- // end :: connectivit� des elements
++ // end :: connectivit� des elements
ENDTYPE_VTU( fp, "DataArray");
VTU_DATA_ARRAY( fp, "Int32", "offsets" , binary); // rgmin=; rgmax=;
@@@ -1192,7 -1192,7 +1192,7 @@@ Mesh * VTK_Load(const string & filename
case 5: // Triangle
nt++; // 2D
break;
-- case 10: // Tetrah�dre
++ case 10: // Tetrah�dre
cout << "We are loading a three dimensional mesh. Three is no tetrahedron." << endl;
ExecError("error in reading vtk file");
break;
@@@ -2705,7 -2705,7 +2705,7 @@@ Mesh3 * VTK_Load3(const string & filena
case 5: // Triangle
nbe++; // 3D
break;
-- case 10: // Tetrah�dre
++ case 10: // Tetrah�dre
nt++;
break;
default:
@@@ -2746,7 -2746,7 +2746,7 @@@
}
(bbff++)->set(vff, ivb, label);
break;
-- case 10: // Tetrah�dre
++ case 10: // Tetrah�dre
assert( (firstCell[i+1]-firstCell[i]) == 4 );
for(int j=firstCell[i]; j<firstCell[i+1]; j++){
ivt[j-firstCell[i]] = IntCells[j];
diff --cc examples++-load/iovtk.cpp.orig
index dde51d9,72af3c1..9468f47
--- a/examples++-load/iovtk.cpp.orig
+++ b/examples++-load/iovtk.cpp.orig
@@@ -4014,13 -4014,13 +4014,23 @@@ void saveTecplot(const string &file, co
++<<<<<<< HEAD
+/* class Init1 { public:
+ Init1();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
+ class Init1 { public:
+ Init1();
+ };
+
+ LOADINIT(Init1) // une variable globale qui serat construite au chargement dynamique
+
+ Init1::Init1(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
typedef Mesh *pmesh;
//typedef Mesh2 *pmesh2;
@@@ -4033,4 -4033,3 +4043,7 @@@
Global.Add("vtkload","(",new VTK_LoadMesh);
}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/isolineP1.cpp
index 282ae81,613451a..3fe9826
--- a/examples++-load/isolineP1.cpp
+++ b/examples++-load/isolineP1.cpp
@@@ -207,7 -207,7 +207,7 @@@ AnyType ISOLINE_P1_Op::operator()(Stac
else if( ivertex == 2){
//* search positive triangle *//
-- // deux possibilit�s
++ // deux possibilit�s
for(int iii=0;iii<3;iii++){
if( nkeq[iii] != 1 ){
int j0,j1;
@@@ -570,10 -570,10 +570,10 @@@
*/
}
-- // rappel: le lien a �t� effectuer entre les bords
++ // rappel: le lien a �t� effectuer entre les bords
// -1 : pas de suivant
// positive et nulle : le suivant border element
-- // -2 : pas d'�lement � prendre en compte.
++ // -2 : pas d'�lement � prendre en compte.
}
if(verbosity>10)
@@@ -719,7 -719,7 +719,7 @@@
}
else{
-- // old version j0bid � la place de j1bid
++ // old version j0bid � la place de j1bid
VertexIsoP[inv].x = Th.vertices[ j1bid ].x;
VertexIsoP[inv].y = Th.vertices[ j1bid ].y;
VertexIsoP[inv].lab = label;
diff --cc examples++-load/isolineP1.cpp.orig
index 282ae81,613451a..cf831fa
--- a/examples++-load/isolineP1.cpp.orig
+++ b/examples++-load/isolineP1.cpp.orig
@@@ -875,13 -875,13 +875,23 @@@ typedef Mesh *pmesh
}
};
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
+ class Init { public:
+ Init();
+ };
+
+ LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
+
+ Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
typedef Mesh *pmesh;
cerr << " Warning obsolete load file version now use isolineP1 -> isoline " << endl;
@@@ -892,4 -892,3 +902,7 @@@
}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/lapack.cpp.orig
index 94aa2eb,0000000..7d8980d
mode 100644,000000..100644
--- a/examples++-load/lapack.cpp.orig
+++ b/examples++-load/lapack.cpp.orig
@@@ -1,970 -1,0 +1,995 @@@
+//ff-c++-LIBRARY-dep: lapack
+//ff-c++-LIBRARY-dep: blas
+#include "ff++.hpp"
+#include "RNM.hpp"
+#include "AFunction_ext.hpp" // Extension of "AFunction.hpp" to deal with more than 3 parameters function
+
+using namespace std;
+
+#ifdef __LP64__
+ typedef int intblas;
+ typedef int integer;
+#else
+ typedef long intblas;
+ typedef long integer;
+#endif
+
+typedef integer logical;
+typedef float LAPACK_real;
+typedef double doublereal;
+typedef logical (* L_fp)();
+typedef integer ftnlen;
+
+typedef complex<float> LAPACK_complex;
+typedef complex<double> doublecomplex;
+typedef void VOID;
+#define complex LAPACK_complex
+#define real LAPACK_real
+
+#include "clapack.h"
+#undef real
+#undef complex
++<<<<<<< HEAD
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+long lapack_inv(KNM<double>* A)
+{
+ intblas n=A->N();
+ intblas m=A->M();
+ double *a=&(*A)(0,0);
+ intblas info;
+ intblas lda=n;
+ KN<intblas> ipiv(n);
+ intblas lw=10*n;
+ KN<double> w(lw);
+ ffassert(n==m);
+ dgetrf_(&n,&n,a,&lda,ipiv,&info);
+ if(info) return info;
+ dgetri_(&n,a,&lda,ipiv,w,&lw,&info);
+ return info;
+}
+
+long lapack_inv(KNM<Complex>* A)
+{
+ intblas n=A->N();
+ intblas m=A->M();
+ Complex *a=&(*A)(0,0);
+ intblas info;
+ intblas lda=n;
+ KN<intblas> ipiv(n);
+ intblas lw=10*n;
+ KN<Complex> w(lw);
+ ffassert(n==m);
+ zgetrf_(&n,&n,a,&lda,ipiv,&info);
+ if(info) return info;
+ zgetri_(&n,a,&lda,ipiv,w,&lw,&info);
+ return info;
+}
+
+// (computation of the eigenvalues and right eigenvectors of a real nonsymmetric matrix)
+long lapack_dgeev(KNM<double> *const &A,KN<Complex> *const &vp,KNM<Complex> *const &vectp)
+{
+ /*
+ SUBROUTINE DGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
+ * JOBVL (input) CHARACTER*1
+ * = 'N': left eigenvectors of A are not computed;
+ * = 'V': left eigenvectors of A are computed.
+ *
+ * JOBVR (input) CHARACTER*1
+ * = 'N': right eigenvectors of A are not computed;
+ * = 'V': right eigenvectors of A are computed.
+ *
+ * N (input) INTEGER
+ * The order of the matrix A. N >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ * On entry, the N-by-N matrix A.
+ * On exit, A has been overwritten.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * WR (output) DOUBLE PRECISION array, dimension (N)
+ * WI (output) DOUBLE PRECISION array, dimension (N)
+ * WR and WI contain the real and imaginary parts,
+ * respectively, of the computed eigenvalues. Complex
+ * conjugate pairs of eigenvalues appear consecutively
+ * with the eigenvalue having the positive imaginary part
+ * first.
+ *
+ * VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
+ * If JOBVL = 'V', the left eigenvectors u(j) are stored one
+ * after another in the columns of VL, in the same order
+ * as their eigenvalues.
+ * If JOBVL = 'N', VL is not referenced.
+ * If the j-th eigenvalue is real, then u(j) = VL(:,j),
+ * the j-th column of VL.
+ * If the j-th and (j+1)-st eigenvalues form a complex
+ * conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
+ * u(j+1) = VL(:,j) - i*VL(:,j+1).
+ *
+ * LDVL (input) INTEGER
+ * The leading dimension of the array VL. LDVL >= 1; if
+ * JOBVL = 'V', LDVL >= N.
+ *
+ * VR (output) DOUBLE PRECISION array, dimension (LDVR,N)
+ * If JOBVR = 'V', the right eigenvectors v(j) are stored one
+ * after another in the columns of VR, in the same order
+ * as their eigenvalues.
+ * If JOBVR = 'N', VR is not referenced.
+ * If the j-th eigenvalue is real, then v(j) = VR(:,j),
+ * the j-th column of VR.
+ * If the j-th and (j+1)-st eigenvalues form a complex
+ * conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
+ * v(j+1) = VR(:,j) - i*VR(:,j+1).
+ *
+ * LDVR (input) INTEGER
+ * The leading dimension of the array VR. LDVR >= 1; if
+ * JOBVR = 'V', LDVR >= N.
+ *
+ * WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+ * On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+ *
+ * LWORK (input) INTEGER
+ * The dimension of the array WORK. LWORK >= max(1,3*N), and
+ * if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good
+ * performance, LWORK must generally be larger.
+ *
+ * If LWORK = -1, then a workspace query is assumed; the routine
+ * only calculates the optimal size of the WORK array, returns
+ * this value as the first entry of the WORK array, and no error
+ * message related to LWORK is issued by XERBLA.
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value.
+ * > 0: if INFO = i, the QR algorithm failed to compute all the
+ * eigenvalues, and no eigenvectors have been computed;
+ * elements i+1:N of WR and WI contain eigenvalues which
+ * have converged.
+ */
+ intblas n=A->N();
+ ffassert(A->M()==n);
+ ffassert(vectp->M()>=n);
+ ffassert(vectp->N()>=n);
+ ffassert(vp->N()>=n);
+ KN<double> wr(n),wi(n),w(1);
+ KNM<double> mat(*A),vr(n,n),vl(n,n);
+ intblas info,lw=-1;
+ char JOBVL='N',JOBVR='V';
+ dgeev_(&JOBVL,&JOBVR,&n,mat,&n,wr,wi,vl,&n,vr,&n,w,&lw,&info);
+ lw=w[0];
+ w.resize(lw);
+ //cout << mat << endl;
+ dgeev_(&JOBVL,&JOBVR,&n,mat,&n,wr,wi,vl,&n,vr,&n,w,&lw,&info);
+ //cout << wr << endl;
+ //cout << wi << endl;
+ if (info<0)
+ {
+ cout << " dgeev: the " << info << "-th argument had an illegal value." << endl;
+ (*vp)=Complex();
+ (*vectp)=Complex();
+ }
+ else if (info>0)
+ {
+ cout << " dgeev: the QR algorithm failed to compute all the eigenvalues, and no eigenvectors have been computed." << endl;
+ (*vp)=Complex();
+ (*vectp)=Complex();
+ }
+ else if (info==0)
+ {
+ for (int i=0;i<n;++i)
+ {
+ (*vp)[i]=Complex(wr[i],wi[i]);
+ if (verbosity>2)
+ cout << " dgeev: vp "<< i << " : " << (*vp)[i] << endl;
+ if (wi[i]==0)
+ for (int j=0;j<n;++j)
+ (*vectp)(j,i)=vr(j,i);
+ else if (wi[i]>0)
+ {
+ for (int j=0;j<n;++j)
+ (*vectp)(j,i)=Complex(vr(j,i),vr(j,i+1));
+ }
+ else if (wi[i]<0)
+ {
+ for (int j=0;j<n;++j)
+ (*vectp)(j,i)=Complex(vr(j,i-1),-vr(j,i));
+ }
+ if (verbosity>5)
+ cout << " dgeev: " << (*vectp)(':',i) <<endl;
+ }
+ }
+ return info;
+}
+
+// (computation of the eigenvalues and right eigenvectors of a complex nonsymmetric matrix)
+long lapack_zgeev(KNM<Complex> *const &A,KN<Complex> *const &vp,KNM<Complex> *const &vectp)
+{
+ intblas nvp =0,zero=0;
+ intblas n= A->N();
+ ffassert(A->M()==n);
+ ffassert(vectp->M()>=n);
+ ffassert(vectp->N()>=n);
+ ffassert(vp->N()>=n);
+ KN<Complex> w(n),vr(n*n),vl(n*n);
+ KNM<Complex> mat(*A);
+ intblas info,lw=n*(n+1)*10;
+ KN<Complex> wk(lw);
+ KN<double> rwk(2*n);
+
+ char N='N',V='V';
+ // lw=1;// to get opt size value
+ zgeev_(&N,&V,&n, mat,&n, w, vl,&n, vr,&n,wk,&lw,rwk,&info);
+ // cout << lw << " " << wk[0] << " " << info << endl;
+ /* lw=wk[0].real();
+ w.resize(lw);
+ zgeev_(&N,&V,&n, mat,&n, w, vl,&n, vr,&n,wk,&lw,rwk,&info);
+ */
+ if(info)
+ cout << " info = " << info << endl;
+ if(!info)
+ {
+ int k=0;
+ for(int i=0;i<n;++i)
+ {
+ (*vp)[i]=w[i];
+ if(verbosity>2)
+ cout << " zgeev: vp "<< i << " : " << (*vp)[i] << endl;
+ for(int j=0;j<n;++j)
+ (*vectp)(j,i)=vr[k++];
+ if(verbosity>5)
+ cout << " zgeev : " << (*vectp)(':',i) <<endl;
+ }
+ }
+ else
+ {
+ nvp=0;
+ (*vp)=Complex();
+ (*vectp)=Complex();
+ }
+ return nvp;
+}
+
+// VL, 10/02/2010
+long lapack_dggev(KNM<double> *const &A,KNM<double> *const &B,KN<Complex> *const &vpa,KN<double> *const &vpb,KNM<Complex> *const &vectp)
+{
+ intblas nvp =0,zero=0;
+ intblas n=A->N();
+ ffassert(A->M()==n);
+ ffassert(B->M()==n);
+ ffassert(B->N()==n);
+ ffassert(vectp->M()>=n);
+ ffassert(vectp->N()>=n);
+ ffassert(vpa->N()>=n);
+ ffassert(vpb->N()>=n);
+
+ KN<double> war(n),wai(n),wb(n),vr(n*n),vl(n*n);
+ KNM<double> matA(*A);
+ KNM<double> matB(*B);
+ intblas info,lw=-1;
+ KN<double> w(1);
+ //char N='N',V='V'; VL: do not compute eigenvectors (if yes, switch with following line)
+ char VL='N',VR='N';
+
+ dggev_(&VL,&VR,&n,matA,&n,matB,&n,war,wai,wb,vl,&n,vr,&n,w,&lw,&info);
+ lw=w[0];
+ // cout << lw << endl;
+ w.resize(lw);
+ dggev_(&VL,&VR,&n,matA,&n,matB,&n,war,wai,wb,vl,&n,vr,&n,w,&lw,&info);
+ if(info)
+ cout << " info = " << info << endl;
+ if(!info)
+ {
+ int k=0;
+ for(int i=0;i<n;++i)
+ {
+ (*vpa)[i]=Complex(war[i],wai[i]);
+ (*vpb)[i]=wb[i];
+ if(verbosity>2)
+ cout << " dggev: vp "<< i << " : " << (*vpa)[i] << " ; " << (*vpb)[i] << endl;
+ if( wai[i] == 0)
+ for(int j=0;j<n;++j)
+ (*vectp)(j,i)=vr[k++];
+ else if ( wai[i] > 0)
+ {
+ int ki= k+n;
+ for(int j=0;j<n;++j)
+ (*vectp)(j,i)=Complex(vr[k++],vr[ki++]);
+ }
+ else
+ {
+ int kr= k-n;
+ for(int j=0;j<n;++j)
+ (*vectp)(j,i)=Complex(vr[kr++],-vr[k++]);
+ }
+ if(verbosity>5)
+ cout << " dggev : " << (*vectp)(':',i) <<endl;
+ }
+ }
+ else
+ {
+ nvp=0;
+ (*vpa)=Complex();
+ (*vectp)=Complex();
+ }
+ return nvp;
+}
+
+// GL, 05/10/2011 (computation of all the eigenvalues and the eigenvectors of a real generalized symmetric-definite eigenproblem, of the form A*x=(lambda)*B*x)
+long lapack_dsygvd(KNM<double> *const &A,KNM<double> *const &B,KN<double> *const &vp,KNM<double> *const &vectp)
+{
+ /*
+ SUBROUTINE DSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, IWORK, LIWORK, INFO )
+ * ITYPE (input) INTEGER
+ * Specifies the problem type to be solved:
+ * = 1: A*x = (lambda)*B*x
+ * = 2: A*B*x = (lambda)*x
+ * = 3: B*A*x = (lambda)*x
+ *
+ * JOBZ (input) CHARACTER*1
+ * = 'N': Compute eigenvalues only;
+ * = 'V': Compute eigenvalues and eigenvectors.
+ *
+ * UPLO (input) CHARACTER*1
+ * = 'U': Upper triangles of A and B are stored;
+ * = 'L': Lower triangles of A and B are stored.
+ *
+ * N (input) INTEGER
+ * The order of the matrices A and B. N >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
+ * On entry, the symmetric matrix A. If UPLO = 'U', the
+ * leading N-by-N upper triangular part of A contains the
+ * upper triangular part of the matrix A. If UPLO = 'L',
+ * the leading N-by-N lower triangular part of A contains
+ * the lower triangular part of the matrix A.
+ *
+ * On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+ * matrix Z of eigenvectors. The eigenvectors are normalized
+ * as follows:
+ * if ITYPE = 1 or 2, Z**T*B*Z = I;
+ * if ITYPE = 3, Z**T*inv(B)*Z = I.
+ * If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
+ * or the lower triangle (if UPLO='L') of A, including the
+ * diagonal, is destroyed.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * B (input/output) DOUBLE PRECISION array, dimension (LDB, N)
+ * On entry, the symmetric matrix B. If UPLO = 'U', the
+ * leading N-by-N upper triangular part of B contains the
+ * upper triangular part of the matrix B. If UPLO = 'L',
+ * the leading N-by-N lower triangular part of B contains
+ * the lower triangular part of the matrix B.
+ *
+ * On exit, if INFO <= N, the part of B containing the matrix is
+ * overwritten by the triangular factor U or L from the Cholesky
+ * factorization B = U**T*U or B = L*L**T.
+ *
+ * LDB (input) INTEGER
+ * The leading dimension of the array B. LDB >= max(1,N).
+ *
+ * W (output) DOUBLE PRECISION array, dimension (N)
+ * If INFO = 0, the eigenvalues in ascending order.
+ *
+ * WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+ * On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+ *
+ * LWORK (input) INTEGER
+ * The dimension of the array WORK.
+ * If N <= 1, LWORK >= 1.
+ * If JOBZ = 'N' and N > 1, LWORK >= 2*N+1.
+ * If JOBZ = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
+ *
+ * If LWORK = -1, then a workspace query is assumed; the routine
+ * only calculates the optimal sizes of the WORK and IWORK
+ * arrays, returns these values as the first entries of the WORK
+ * and IWORK arrays, and no error message related to LWORK or
+ * LIWORK is issued by XERBLA.
+ *
+ * IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
+ * On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+ *
+ * LIWORK (input) INTEGER
+ * The dimension of the array IWORK.
+ * If N <= 1, LIWORK >= 1.
+ * If JOBZ = 'N' and N > 1, LIWORK >= 1.
+ * If JOBZ = 'V' and N > 1, LIWORK >= 3 + 5*N.
+ *
+ * If LIWORK = -1, then a workspace query is assumed; the
+ * routine only calculates the optimal sizes of the WORK and
+ * IWORK arrays, returns these values as the first entries of
+ * the WORK and IWORK arrays, and no error message related to
+ * LWORK or LIWORK is issued by XERBLA.
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ * > 0: DPOTRF or DSYEVD returned an error code:
+ * <= N: if INFO = i and JOBZ = 'N', then the algorithm
+ * failed to converge; i off-diagonal elements of an
+ * intermediate tridiagonal form did not converge to
+ * zero;
+ * if INFO = i and JOBZ = 'V', then the algorithm
+ * failed to compute an eigenvalue while working on
+ * the submatrix lying in rows and columns INFO/(N+1)
+ * through mod(INFO,N+1);
+ * > N: if INFO = N + i, for 1 <= i <= N, then the leading
+ * minor of order i of B is not positive definite.
+ * The factorization of B could not be completed and
+ * no eigenvalues or eigenvectors were computed.
+ */
+ intblas n=A->N();
+ ffassert(A->M()==n);
+ ffassert(B->M()==n);
+ ffassert(B->N()==n);
+ ffassert(vp->N()>=n);
+ ffassert(vectp->M()>=n);
+ ffassert(vectp->N()>=n);
+ KN<double> war(n),wai(n),wb(n),vr(n*n),vl(n*n);
+ KNM<double> matA(*A),matB(*B);
+ intblas itype=1,info,lw=-1;
+ KN<double> w(1);
+ KN<intblas> iw(1);
+ char JOBZ='V',UPLO='U';
+
+ dsygvd_(&itype,&JOBZ,&UPLO,&n,matA,&n,matB,&n,*vp,w,&lw,iw,&lw,&info);
+ lw=w[0];
+ w.resize(lw);
+ iw.resize(lw);
+ dsygvd_(&itype,&JOBZ,&UPLO,&n,matA,&n,matB,&n,*vp,w,&lw,iw,&lw,&info);
+ if (info<0)
+ {
+ cout << " dsygvd: the " << info << "-th argument had an illegal value." << endl;
+ }
+ else if (info>0)
+ {
+ cout << " dsygvd: DPOTRF or DSYEVD returned an error code." << endl;
+ }
+ else if (info==0)
+ {
+ for (int i=0;i<n;++i)
+ {
+ for (int i=0;i<n;++i)
+ {
+ for (int j=0;j<n;++j)
+ (*vectp)(j,i)=matA(j,i);
+ }
+ }
+ }
+ return info;
+}
+
+// GL,27/09/2011 (singular value decomposition of a rectangular real matrix)
+long lapack_dgesdd(KNM<double> *const &A,KNM<double> *const &U,KN<double> *const &S,KNM<double> *const &V)
+{
+ /*
+ SUBROUTINE DGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, IWORK, INFO )
+ * JOBZ (input) CHARACTER*1
+ * Specifies options for computing all or part of the matrix U:
+ * = 'A': all M columns of U and all N rows of V**T are
+ * returned in the arrays U and VT;
+ * = 'S': the first min(M,N) columns of U and the first
+ * min(M,N) rows of V**T are returned in the arrays U
+ * and VT;
+ * = 'O': If M >= N, the first N columns of U are overwritten
+ * on the array A and all rows of V**T are returned in
+ * the array VT;
+ * otherwise, all columns of U are returned in the
+ * array U and the first M rows of V**T are overwritten
+ * in the array A;
+ * = 'N': no columns of U or rows of V**T are computed.
+ *
+ * M (input) INTEGER
+ * The number of rows of the input matrix A. M >= 0.
+ *
+ * N (input) INTEGER
+ * The number of columns of the input matrix A. N >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ * On entry, the M-by-N matrix A.
+ * On exit,
+ * if JOBZ = 'O', A is overwritten with the first N columns
+ * of U (the left singular vectors, stored
+ * columnwise) if M >= N;
+ * A is overwritten with the first M rows
+ * of V**T (the right singular vectors, stored
+ * rowwise) otherwise.
+ * if JOBZ .ne. 'O', the contents of A are destroyed.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,M).
+ *
+ * S (output) DOUBLE PRECISION array, dimension (min(M,N))
+ * The singular values of A, sorted so that S(i) >= S(i+1).
+ *
+ * U (output) DOUBLE PRECISION array, dimension (LDU,UCOL)
+ * UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
+ * UCOL = min(M,N) if JOBZ = 'S'.
+ * If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
+ * orthogonal matrix U;
+ * if JOBZ = 'S', U contains the first min(M,N) columns of U
+ * (the left singular vectors, stored columnwise);
+ * if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
+ *
+ * LDU (input) INTEGER
+ * The leading dimension of the array U. LDU >= 1; if
+ * JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
+ *
+ * VT (output) DOUBLE PRECISION array, dimension (LDVT,N)
+ * If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
+ * N-by-N orthogonal matrix V**T;
+ * if JOBZ = 'S', VT contains the first min(M,N) rows of
+ * V**T (the right singular vectors, stored rowwise);
+ * if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
+ *
+ * LDVT (input) INTEGER
+ * The leading dimension of the array VT. LDVT >= 1; if
+ * JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
+ * if JOBZ = 'S', LDVT >= min(M,N).
+ *
+ * WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+ * On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
+ *
+ * LWORK (input) INTEGER
+ * The dimension of the array WORK. LWORK >= 1.
+ * If JOBZ = 'N',
+ * LWORK >= 3*min(M,N) + max(max(M,N),7*min(M,N)).
+ * If JOBZ = 'O',
+ * LWORK >= 3*min(M,N) +
+ * max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).
+ * If JOBZ = 'S' or 'A'
+ * LWORK >= 3*min(M,N) +
+ * max(max(M,N),4*min(M,N)*min(M,N)+4*min(M,N)).
+ * For good performance, LWORK should generally be larger.
+ * If LWORK = -1 but other input arguments are legal, WORK(1)
+ * returns the optimal LWORK.
+ *
+ * IWORK (workspace) INTEGER array, dimension (8*min(M,N))
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit.
+ * < 0: if INFO = -i, the i-th argument had an illegal value.
+ * > 0: DBDSDC did not converge, updating process failed.
+ */
+ intblas n=A->N();
+ intblas m=A->M();
+ U->resize(n,n);
+ S->resize(min(n,m));
+ V->resize(m,m);
+ KNM<double> VT(m,m);
+ KN<intblas> iw(8*min(n,m));
+ intblas info,lw=-1;
+ KN<double> w(1);
+ char JOBZ='A';
+ dgesdd_(&JOBZ,&n,&m,*A,&n,*S,*U,&n,VT,&m,w,&lw,iw,&info);
+ lw=w[0];
+ w.resize(lw);
+ dgesdd_(&JOBZ,&n,&m,*A,&n,*S,*U,&n,VT,&m,w,&lw,iw,&info);
+ if (info<0)
+ {
+ cout << " dgesdd: the " << info << "-th argument had an illegal value." << endl;
+ }
+ else if (info>0)
+ {
+ cout << " dgesdd: DBDSDC did not converge, updating process failed." << endl;
+ }
+ else if (info==0)
+ {
+ for (int i=0;i<m;++i)
+ for (int j=0;j<m;++j)
+ (*V)(i,j)=VT(j,i);
+ }
+ return info;
+}
+
+// GL,28/09/2011 (computation of the eigenvalues and eigenvectors of a real symmetric matrix)
+long lapack_dsyev(KNM<double> *const &A,KN<double> *const &vp,KNM<double> *const &vectp)
+{
+ /*
+ SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
+ * JOBZ (input) CHARACTER*1
+ * = 'N': Compute eigenvalues only;
+ * = 'V': Compute eigenvalues and eigenvectors.
+ *
+ * UPLO (input) CHARACTER*1
+ * = 'U': Upper triangle of A is stored;
+ * = 'L': Lower triangle of A is stored.
+ *
+ * N (input) INTEGER
+ * The order of the matrix A. N >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA, N)
+ * On entry, the symmetric matrix A. If UPLO = 'U', the
+ * leading N-by-N upper triangular part of A contains the
+ * upper triangular part of the matrix A. If UPLO = 'L',
+ * the leading N-by-N lower triangular part of A contains
+ * the lower triangular part of the matrix A.
+ * On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+ * orthonormal eigenvectors of the matrix A.
+ * If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+ * or the upper triangle (if UPLO='U') of A, including the
+ * diagonal, is destroyed.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * W (output) DOUBLE PRECISION array, dimension (N)
+ * If INFO = 0, the eigenvalues in ascending order.
+ *
+ * WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+ * On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+ *
+ * LWORK (input) INTEGER
+ * The length of the array WORK. LWORK >= max(1,3*N-1).
+ * For optimal efficiency, LWORK >= (NB+2)*N,
+ * where NB is the blocksize for DSYTRD returned by ILAENV.
+ *
+ * If LWORK = -1, then a workspace query is assumed; the routine
+ * only calculates the optimal size of the WORK array, returns
+ * this value as the first entry of the WORK array, and no error
+ * message related to LWORK is issued by XERBLA.
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ * > 0: if INFO = i, the algorithm failed to converge; i
+ * off-diagonal elements of an intermediate tridiagonal
+ * form did not converge to zero.
+ */
+ intblas n=A->N();
+ ffassert(A->M()==n);
+ ffassert(vectp->N()==n);
+ ffassert(vectp->M()==n);
+ ffassert(vp->N()==n);
+ KNM<double> mat(*A);
+ intblas info,lw=-1;
+ KN<double> w(1);
+ char JOBZ='V',UPLO='U';
+ dsyev_(&JOBZ,&UPLO,&n,mat,&n,*vp,w,&lw,&info);
+ lw=w[0];
+ w.resize(lw);
+ dsyev_(&JOBZ,&UPLO,&n,mat,&n,*vp,w,&lw,&info);
+ if (info<0)
+ {
+ cout << " dsyev: the " << info << "-th argument had an illegal value." << endl;
+ }
+ else if (info>0)
+ {
+ cout << " dsyev: the algorithm failed to converge." << endl;
+ }
+ else if (info==0)
+ {
+ *vectp=mat;
+ }
+ return info;
+}
+
+template<class T>
+class Inverse{ public:
+ T t;
+ Inverse( T v)
+ : t(v) {}
+ template<class TT> Inverse( TT v) : t(v) {}
+ template<class TT> Inverse( TT * v) : t(*v) {}
+ operator const T & () const {return t;}
+};
+
+template<class T>
+class Mult{ public:
+ T a;bool ta;
+ T b;bool tb;
+ Mult( T aa,T bb)
+ : a(aa),b(bb),ta(0),tb(0) {}
+ // Transpose<
+ Mult( Transpose<T> aa,T bb)
+ : a(aa),b(bb),ta(1),tb(0) {}
+ Mult( Transpose<T> aa,Transpose<T> bb)
+ : a(aa),b(bb),ta(1),tb(1) {}
+ Mult( T aa,Transpose<T> bb)
+ : a(aa),b(bb),ta(1),tb(1) {}
+
+};
+
+template<class K>
+class OneBinaryOperatorRNM_inv : public OneOperator { public:
+ OneBinaryOperatorRNM_inv()
+ : OneOperator( atype< Inverse< KNM<K>* > >(),atype<KNM<K> *>(),atype<long>()) {}
+ E_F0 * code(const basicAC_F0 & args) const
+ { Expression p=args[1];
+ if ( ! p->EvaluableWithOutStack() )
+ {
+ bool bb=p->EvaluableWithOutStack();
+ cout << " Error exposant ??? " << bb << " " << * p << endl;
+ CompileError(" A^p, The p must be a constant == -1, sorry");}
+ long pv = GetAny<long>((*p)(0));
+ if (pv !=-1)
+ { char buf[100];
+ sprintf(buf," A^%ld, The pow must be == -1, sorry",pv);
+ CompileError(buf);}
+ return new E_F_F0<Inverse< KNM<K>* > ,KNM<K> *>(Build<Inverse< KNM<K>* > ,KNM<K> *>,t[0]->CastTo(args[0]));
+ }
+};
+
+
++<<<<<<< HEAD
++=======
++/*
++class Init { public:
++ Init();
++};
++*/
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+template <int INIT>
+KNM<R>* Solve(KNM<R>* a,Inverse<KNM<R >*> b)
+{
+ /*
+ SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+ * N (input) INTEGER
+ * The number of linear equations, i.e., the order of the
+ * matrix A. N >= 0.
+ *
+ * NRHS (input) INTEGER
+ * The number of right hand sides, i.e., the number of columns
+ * of the matrix B. NRHS >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ * On entry, the N-by-N coefficient matrix A.
+ * On exit, the factors L and U from the factorization
+ * A = P*L*U; the unit diagonal elements of L are not stored.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * IPIV (output) INTEGER array, dimension (N)
+ * The pivot indices that define the permutation matrix P;
+ * row i of the matrix was interchanged with row IPIV(i).
+ *
+ * B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
+ * On entry, the N-by-NRHS matrix of right hand side matrix B.
+ * On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+ *
+ * LDB (input) INTEGER
+ * The leading dimension of the array B. LDB >= max(1,N).
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ * > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+ * has been completed, but the factor U is exactly
+ * singular, so the solution could not be computed.
+ *
+ */
+ typedef double R;
+ integer info;
+ KNM<R> B(*b);
+ integer n= B.N();
+ KN<integer> p(n);
+ ffassert(B.M()==n);
+ if(INIT)
+ a->init(n,n);
+ else
+ a->resize(n,n);
+ *a=0.;
+ for(int i=0;i<n;++i)
+ (*a)(i,i)=(R) 1;;
+
+ dgesv_(&n,&n,B,&n,p,*a,&n,&info);
+ if(info) cerr << " error: dgesv_ "<< info << endl;
+ return a;
+}
+
+
+// Template interface
+inline int gemm(char *transa, char *transb, integer *m, integer *
+ n, integer *k, double *alpha, double *a, integer *lda,
+ double *b, integer *ldb, double *beta, double *c, integer
+ *ldc) {
+ return dgemm_(transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc);
+}
+inline int gemm(char *transa, char *transb, integer *m, integer *
+ n, integer *k, Complex *alpha, Complex *a, integer *lda,
+ Complex *b, integer *ldb, Complex *beta, Complex *c, integer
+ *ldc) {
+ return zgemm_(transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc);
+}
+
+
+template<class R,bool init, int ibeta>
+KNM<R>* mult(KNM<R >* a,const KNM_<R> & A,const KNM_<R> & B)
+{ // C=A*B
+
+ R alpha=1.,beta=R(ibeta);
+ char tA, tB;
+ if(init) a->init();
+ intblas N= A.N();
+ intblas M=B.M();
+ intblas K=A.M();
+ KNM<R> & C= *a;
+ C.resize(N,M);
+ ffassert(K==B.N());
+ R *A00=&A(0,0), *A10= &A(1,0), *A01= &A(0,1);
+ R *B00=&B(0,0), *B10= &B(1,0), *B01= &B(0,1);
+ R *C00=&C(0,0), *C10= &C(1,0), *C01= &C(0,1);
+ intblas lsa=A10-A00 ,lsb=B10-B00,lsc=C10-C00;
+ intblas lda=A01-A00 ,ldb=B01-B00,ldc=C01-C00;
+ if(verbosity>10) {
+ cout << lsa << " " << lsb << " "<< lsc << " init " << init << endl;
+ cout << lda << " " << ldb << " "<< ldc << endl;
+ }
+ tA=lda==1?'T':'N';
+ tB=ldb==1?'T':'N';
+
+ if(lda==1) lda=lsa;
+ if(ldb==1) ldb=lsb;
+ if(beta==0.)
+ C=R();
+#ifdef XXXXXXXXXXXXXX
+
+ for(int i=0;i<N;++i)
+ for(int j=0;j<M;++j)
+ for(int k=0;k<K;++k)
+ C(i,j) += A(i,k)*B(k,j) ;
+#else
+ gemm(&tB,&tA,&N,&M,&K,&alpha,A00,&lda,B00,&ldb,&beta,C00,&ldc);
+#endif
+ return a;
+ /*
+ The Fortran interface for these procedures are:
+ SUBROUTINE xGEMM ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC )
+ where TRANSA and TRANSB determines if the matrices A and B are to be transposed.
+ M is the number of rows in matrix A and C. N is the number of columns in matrix B and C.
+ K is the number of columns in matrix A and rows in matrix B.
+ LDA, LDB and LDC specifies the size of the first dimension of the matrices, as laid out in memory;
+ meaning the memory distance between the start of each row/column, depending on the memory structure (Dongarra et al. 1990).
+ */
+}
+template<class R,bool init, int ibeta>
+KNM<R>* mult(KNM<R >* a,Mult<KNM<R >*> bc)
+{
+ if( (bc.ta == 0) && (bc.tb == 0))
+ return mult<R,init,ibeta>(a,*bc.a,*bc.b) ;
+ else if((bc.ta == 1 )&& (bc.tb == 0))
+ return mult<R,init,ibeta>(a,bc.a->t(),*bc.b) ;
+ else if((bc.ta == 0) && (bc.tb == 1))
+ return mult<R,init,ibeta>(a,*bc.a,bc.b->t()) ;
+ else if((bc.ta == 1) && (bc.tb == 1))
+ return mult<R,init,ibeta>(a,bc.a->t(),bc.b->t()) ;
+ else
+ // should never happen
+ return NULL;
+}
+
+template <int INIT>
+KNM<Complex>* SolveC(KNM<Complex>* a,Inverse<KNM<Complex >*> b)
+{
+ /*
+ SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+ * N (input) INTEGER
+ * The number of linear equations, i.e., the order of the
+ * matrix A. N >= 0.
+ *
+ * NRHS (input) INTEGER
+ * The number of right hand sides, i.e., the number of columns
+ * of the matrix B. NRHS >= 0.
+ *
+ * A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
+ * On entry, the N-by-N coefficient matrix A.
+ * On exit, the factors L and U from the factorization
+ * A = P*L*U; the unit diagonal elements of L are not stored.
+ *
+ * LDA (input) INTEGER
+ * The leading dimension of the array A. LDA >= max(1,N).
+ *
+ * IPIV (output) INTEGER array, dimension (N)
+ * The pivot indices that define the permutation matrix P;
+ * row i of the matrix was interchanged with row IPIV(i).
+ *
+ * B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)
+ * On entry, the N-by-NRHS matrix of right hand side matrix B.
+ * On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+ *
+ * LDB (input) INTEGER
+ * The leading dimension of the array B. LDB >= max(1,N).
+ *
+ * INFO (output) INTEGER
+ * = 0: successful exit
+ * < 0: if INFO = -i, the i-th argument had an illegal value
+ * > 0: if INFO = i, U(i,i) is exactly zero. The factorization
+ * has been completed, but the factor U is exactly
+ * singular, so the solution could not be computed.
+ *
+ */
+ typedef Complex R;
+ integer info;
+ KNM<R> B(*b);
+ integer n= B.N();
+ KN<integer> p(n);
+ ffassert(B.M()==n);
+ if(INIT)
+ a->init(n,n);
+ else
+ a->resize(n,n);
+ *a=0.;
+ for(int i=0;i<n;++i)
+ (*a)(i,i)=(R) 1;;
+
+ zgesv_(&n,&n,(R*) B,&n,p, (R*) *a,&n,&info);
+ if(info) cerr << " error: zgesv_ "<< info << endl;
+ return a;
+}
+
++<<<<<<< HEAD
++=======
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+template<class R,class A,class B> R Build2(A a,B b) {
+ return R(a,b);
+}
++<<<<<<< HEAD
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ if( map_type.find(typeid(Inverse<KNM<double >* >).name() ) == map_type.end() )
+ {
+ if(verbosity)
+ cout << " Add lapack interface ..." ;
+ Dcl_Type< Inverse<KNM<double >* > > ();
+ Dcl_Type< Inverse<KNM<Complex >* > > ();
+ Dcl_Type< Mult<KNM<Complex >* > > ();
+ Dcl_Type< Mult<KNM<double >* > > ();
+
+ TheOperators->Add("^", new OneBinaryOperatorRNM_inv<double>());
+ TheOperators->Add("*", new OneOperator2< Mult< KNM<double>* >,KNM<double>*,KNM<double>*>(Build2));
+ TheOperators->Add("*", new OneOperator2< Mult< KNM<Complex>* >,KNM<Complex>*,KNM<Complex>*>(Build2));
+
+ TheOperators->Add("^", new OneBinaryOperatorRNM_inv<Complex>());
+ TheOperators->Add("=", new OneOperator2<KNM<double>*,KNM<double>*,Inverse<KNM<double >*> >( Solve<0>) );
+ TheOperators->Add("=", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Inverse<KNM<Complex >*> >( SolveC<0>) );
+ TheOperators->Add("<-", new OneOperator2<KNM<double>*,KNM<double>*,Inverse<KNM<double >*> >( Solve<1>) );
+ TheOperators->Add("<-", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Inverse<KNM<Complex >*> >( SolveC<1>) );
+
+ TheOperators->Add("=", new OneOperator2<KNM<double>*,KNM<double>*,Mult<KNM<double >*> >( mult<double,false,0> ) );
+ TheOperators->Add("=", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Mult<KNM<Complex >*> >( mult<Complex,false,0> ) );
+
+ TheOperators->Add("+=", new OneOperator2<KNM<double>*,KNM<double>*,Mult<KNM<double >*> >( mult<double,false,1> ) );
+ TheOperators->Add("+=", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Mult<KNM<Complex >*> >( mult<Complex,false,1> ) );
+
+ TheOperators->Add("-=", new OneOperator2<KNM<double>*,KNM<double>*,Mult<KNM<double >*> >( mult<double,false,-1> ) );
+ TheOperators->Add("-=", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Mult<KNM<Complex >*> >( mult<Complex,false,-1> ) );
+
+ TheOperators->Add("<-", new OneOperator2<KNM<double>*,KNM<double>*,Mult<KNM<double >*> >( mult<double,true,0> ) );
+ TheOperators->Add("<-", new OneOperator2<KNM<Complex>*,KNM<Complex>*,Mult<KNM<Complex >*> >( mult<Complex,true,0> ) );
+
+ Global.Add("inv","(",new OneOperator1<long,KNM<double>*>(lapack_inv));
+ Global.Add("inv","(",new OneOperator1<long,KNM<Complex>*>(lapack_inv));
+
+ Global.Add("dgeev","(",new OneOperator3_<long,KNM<double>*,KN<Complex>*,KNM<Complex>*>(lapack_dgeev));
+ Global.Add("zgeev","(",new OneOperator3_<long,KNM<Complex>*,KN<Complex>*,KNM<Complex>*>(lapack_zgeev));
+ // add FH
+ Global.Add("geev","(",new OneOperator3_<long,KNM<double>*,KN<Complex>*,KNM<Complex>*>(lapack_dgeev));
+ Global.Add("geev","(",new OneOperator3_<long,KNM<Complex>*,KN<Complex>*,KNM<Complex>*>(lapack_zgeev));
+
+ Global.Add("dggev","(",new OneOperator5_<long,KNM<double>*,KNM<double>*,KN<Complex>*,KN<double>*,KNM<Complex>*>(lapack_dggev));
+ Global.Add("dsygvd","(",new OneOperator4_<long,KNM<double>*,KNM<double>*,KN<double>*,KNM<double>*>(lapack_dsygvd));
+ Global.Add("dgesdd","(",new OneOperator4_<long,KNM<double>*,KNM<double>*,KN<double>*,KNM<double>*>(lapack_dgesdd));
+ Global.Add("dsyev","(",new OneOperator3_<long,KNM<double>*,KN<double>*,KNM<double>*>(lapack_dsyev));
+ }
+ else
+ if(verbosity)
+ cout << "( load: lapack <=> fflapack , skeep ) ";
+}
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/lgbmo.cpp.orig
index fb76f62,0000000..2e25ea2
mode 100644,000000..100644
--- a/examples++-load/lgbmo.cpp.orig
+++ b/examples++-load/lgbmo.cpp.orig
@@@ -1,327 -1,0 +1,340 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+//ff-c++-cpp-dep: bmo.cpp
+
+#include <iostream>
+#include <cfloat>
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+#include "rgraph.hpp"
+#include "RNM.hpp"
+#include "MatriceCreuse_tpl.hpp"
+#include "Mesh3dn.hpp"
+#include "MeshPoint.hpp"
+#include "lgfem.hpp"
+#include "lgmesh3.hpp"
+#include "lgsolver.hpp"
+#include "problem.hpp"
+#include "bmo.hpp"
+
+//template<class R>
+extern Block *currentblock;
+
+typedef double R;
+
+class OptimBMO : public OneOperator
+{
+public:
+ typedef KN<R> Kn;
+ typedef KN_<R> Kn_;
+ typedef R REAL;
+ typedef KN<REAL> VECT;
+ typedef KNM<REAL> MAT;
+ typedef VirtualMatrice<REAL> VMAT;
+
+ const int cas;
+
+
+
+
+ class E_BMO: public E_F0mps { public:
+ const int cas;
+ static basicAC_F0::name_and_type name_param[] ;
+ static const int n_name_param =16;
+ Expression nargs[n_name_param];
+ Expression X;
+ C_F0 inittheparam,theparam,closetheparam;
+ Expression JJ,dJJ;
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ R arg(int i,Stack stack,R a) const{ return nargs[i] ? GetAny<R>( (*nargs[i])(stack) ): a;}
+ string *arg(int i,Stack stack,string * a) const{ return nargs[i] ? GetAny<string *>( (*nargs[i])(stack) ): a;}
+ void Set_arg(int i,Stack stack,Kn_ v) const { if(nargs[i]) v= GetAny<Kn_>( (*nargs[i])(stack) );}
+
+ class lgBMO: public BijanMO {
+ private:
+ Stack stack;
+ Expression JJ,dJJ,theparame;
+ protected:
+ void setparam( const KN_<R>& x )
+ {
+ KN_<double> *p=GetAny<KN_<double> *>( (*theparame)(stack) );
+ ffassert( p->N() == x.N());
+ *p =x;
+ }
+
+ public:
+
+ lgBMO(Stack s,int n,Expression t,Expression J,Expression dJ,
+ int wnbrestart=1,
+ int wnbext1=1,
+ int wnbbvp=5,
+ int wnbgrad=5,
+ double wepsfd=1e-5,
+ double wrho000=100,
+ double wepsloc=1e-4,
+ double wepsij=1e-6,
+ int nn100=100)
+
+ : BijanMO(n,wnbrestart,wnbext1,wnbbvp,wnbgrad,wepsfd,wrho000,wepsloc,wepsij,nn100),
+ stack(s),
+ JJ(J),dJJ(dJ),theparame(t)
+ {
+ }
+
+ ~lgBMO() {
+ }
+
+
+
+ /* ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc */
+ /* functional definition */
+ /* ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc */
+
+ double J(Vect & x)
+ {
+ setparam(x);
+
+ double ret= GetAny<R>( (*JJ)(stack));
+ WhereStackOfPtr2Free(stack)->clean();
+ return ret; }
+
+
+ /* cccccccccccccccccccccccccccccccccccccccccccccccccccccccc */
+ /* gradient exact, no defini => DF */
+ /* cccccccccccccccccccccccccccccccccccccccccccccccccccccccc */
+
+ double * DJ(Vect & x, Vect & fpx)
+ {
+ if(!dJJ) return 0;
+ setparam(x);
+ fpx=GetAny<Kn_>( (*dJJ)(stack));
+ WhereStackOfPtr2Free(stack)->clean();
+ return fpx;
+ }
+ void result(Vect & xoptg,Vect &vinit){}
+
+ };
+
+ E_BMO(const basicAC_F0 & args,int cc) :
+ cas(cc)
+ {
+ int nbj= args.size()-1;
+ Block::open(currentblock); // make a new block to
+ X = to<Kn*>(args[nbj]);
+ C_F0 X_n(args[nbj],"n");
+ // the expression to init the theparam of all
+ inittheparam = currentblock->NewVar<LocalVariable>("the parameter",atype<KN<R> *>(),X_n);
+ theparam = currentblock->Find("the parameter"); // the expression for the parameter
+ args.SetNameParam(n_name_param,name_param,nargs);
+ const Polymorphic * opJ=0;
+ const Polymorphic * opdJ=0;
+ if (nbj>0)
+ { opJ= dynamic_cast<const Polymorphic *>(args[0].LeftValue());
+ assert(opJ); }
+ if (nbj>1)
+ { opdJ= dynamic_cast<const Polymorphic *>(args[1].LeftValue());
+ assert(opdJ); }
+ JJ=dJJ=0;
+
+ JJ= to<R>(C_F0(opJ,"(",theparam));
+ if(opdJ)
+ dJJ= to<Kn_>(C_F0(opdJ,"(",theparam));// Modif FH 17102005 (a verifier) to<Kn*> ->to<Kn>
+ closetheparam=currentblock->close(currentblock); // the cleanning block expression
+ }
+
+ virtual AnyType operator()(Stack stack) const
+ {
+
+ WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+
+ /*
+ basicAC_F0::name_and_type OptimBMO::E_BMO::name_param[]= {
+ { "eps", &typeid(double) },
+ { "nbrestart",&typeid(long) },
+ { "nbbvp",&typeid(long)},
+ { "nbgrad",&typeid(long)},
+ { "epsfd",&typeid(double)},
+ { "epsloc",&typeid(double)},
+ { "epsij",&typeid(double)},
+ { "n100",&typeid(long)} // 7
+ };
+
+ */
+
+ R tol=arg(0,stack,1E-6); // not used ....
+ int nbrestart=arg(1,stack,5L);
+ int nbext1=5; // bof bof
+ int nbbvp=arg(2,stack,5L);
+ int nbgrad=arg(3,stack,5L);
+ double epsfd=arg(4,stack,1e-5);
+ double rho000=arg(5,stack,1e-5);
+ double epsloc=arg(6,stack,1e-4);
+ double epsij=arg(7,stack,1e-6);
+ int n100=arg(8,stack,100L);
+ int diagrand=arg(9,stack,0L);
+ R cmin = arg(9,stack,-1000.);
+ R cmax = arg(10,stack,1000.);
+ //KN_<double> vmin = arg< KN_<double> >(11,stack, ccmin );
+ // KN_<double> vmax = arg< KN_<double> >(12,stack, ccmax );
+ string * datahist =arg(13,stack, (string *) 0 );
+ string * datachist =arg(14,stack, (string *) 0 );
+ int typealgo =arg(15,stack, 1L );
+
+ try {
+ Kn &x = *GetAny<Kn *>((*X)(stack));
+ const int n=x.N();
+ Kn xmin(n),xmax(n);
+ xmin=cmin;
+ xmax=cmax;
+ Set_arg(11,stack,xmin);
+ Set_arg(12,stack,xmax);
+
+ //Kn * para =
+ GetAny<KN<double>*>( inittheparam.eval(stack) ) ; // do allocation
+
+ KN_<R> param(x);
+ //cout << nbrestart << " ---- \n";
+ lgBMO nrj1(stack,n,theparam,JJ,dJJ,nbrestart,nbext1,nbbvp,nbgrad,epsfd,rho000,epsloc,epsij,n100);
+ nrj1.diagrand=diagrand;
+ nrj1.debug=verbosity;
+ nrj1.typealgo=typealgo;
+ nrj1.histpath=datahist;
+ nrj1.histcpath=datachist;
+ double fopt=nrj1.main(x,xmin,xmax);
+
+ if(verbosity)
+ {
+ cout <<endl<<"*** RESULTS SUMMARY ***"<<endl;
+
+ if(verbosity>1) {
+ cout <<" The number of call to J : "<< nrj1.nbeval << endl;
+ cout <<" The number of call to dJ : "<< nrj1.nbevalp << endl; }
+ if(verbosity) {
+ cout <<" Initial J value : " << nrj1.finit << endl;
+ cout <<" Final J value : " << fopt<< endl;}
+ }
+ }
+ catch (...)
+ {
+ closetheparam.eval(stack); // clean memory
+ WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+ throw ;
+ }
+ closetheparam.eval(stack); // clean memory
+ WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+
+
+ return 0L; //SetAny<long>(0); Modif FH july 2005
+
+ }
+
+
+ operator aType () const { return atype<long>();}
+
+ };
+
+
+
+ E_F0 * code(const basicAC_F0 & args) const {
+ return new E_BMO(args,cas);}
+
+ OptimBMO(int c) : OneOperator(atype<long>(),
+ atype<Polymorphic*>(),
+ atype<KN<R> *>()),cas(c){}
+
+ OptimBMO(int c,int cc) : OneOperator(atype<long>(),
+ atype<Polymorphic*>(),
+ atype<Polymorphic*>(),
+ atype<KN<R> *>()),cas(c){}
+
+
+};
+
+
+//template<class R>
+ /*
+ BijanMO(
+ ndim,
+ nbrestart=1,
+ nbext1=1,
+ nbbvp=5,
+ nbgrad=5,
+ epsfd=1e-5,
+ rho000=100,
+ epsloc=1e-4,
+ epsij=1e-6,
+ n100=100)
+
+ */
+
+basicAC_F0::name_and_type OptimBMO::E_BMO::name_param[]= {
+ { "eps", &typeid(double) },
+ { "nbrestart",&typeid(long) },
+ { "nbbvp",&typeid(long)},
+ { "nbgrad",&typeid(long)},
+ { "epsfd",&typeid(double)},
+ { "rho000",&typeid(double)},
+ { "epsloc",&typeid(double)},
+ { "epsij",&typeid(double)},
+ { "n100",&typeid(long)}, // 8
+{ "max",&typeid(double)}, // 9
+{ "min",&typeid(double)}, // 10
+{ "vmax",&typeid(double)}, // 11
+{ "vmin",&typeid(double)}, // 12
+{ "histfile", & typeid(string*)}, // 13
+{ "histcfile", & typeid(string*)}, // 14
+{ "algo", & typeid(long)} // 15
+};
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+static void Load_Init() // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++class Init { public:
++ Init();
++};
++
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++
++Init::Init() // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ Global.Add("bmo","(",new OptimBMO(1)); // j + dJ
+ Global.Add("bmo","(",new OptimBMO(1,1)); // j + dJ
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/load.link.in.orig
index 4c88353,0000000..1abe61a
mode 100755,000000..100755
--- a/examples++-load/load.link.in.orig
+++ b/examples++-load/load.link.in.orig
@@@ -1,292 -1,0 +1,296 @@@
+#!/bin/sh
+# Create a loadable object from a C++ function defined in a .cpp file
+# $Id$
+thecommand="$0"
+dircommand=`dirname "$0"`
+
+FFVERSION='@VERSION@'
+FFCXXFLAGS='@CXXFLAGS@ @CPPFLAGS@'
+FFFFLAGS='@FFLAGS@'
+FFFLIBS='@FLIBS@'
+INCFF=
+if [ "@ENABLE_FFCS@" != "yes" ] ;then ffcs=0; else ffcs=1;fi
+if [ -z "$CXX" ] ; then CXX='@CXX@' ; fi
+if [ -z "$MPICXX" ] ; then MPICXX="@MPICXX@" ; fi
+if [ -z "$MPI_LIB" ] ; then MPI_LIB="@MPI_LIB@" ; fi
+if [ -z "$F77" ] ; then F77="@F77@" ; fi
+if [ "$CXX" = '@'CXX'@' ] ; then CXX=""; fi
+if [ "$MPICXX" = '@'MPICXX'@' ] ; then MPICXX=""; fi
+if [ "$F77" = '@'F77'@' ] ; then F77=""; fi
+if [ "$FFCXXFLAGS" = '@'CXXFLAGS'@' ] ; then FFCXXFLAGS=""; fi
+if [ "$FFFFLAGS" = '@'FFLAGS'@' ] ; then FFFFLAGS=""; fi
+if [ "$FFFLIBS" = '@'FLIBS'@' ] ; then FFFLIBS=""; fi
+if [ "$FFVERSION" = '@'VERSION'@' ] ; then FFVERSION=""; fi
+if [ -z "$INCFF" ] ; then
+ if [ -f "@INCFF@/ff++.hpp" ] ; then
+ INCFF="-I at INCFF@"
+ elif [ -f "${dircommand}/include/ff++.hpp" ]; then
+ INCFF="-I${dircommand}/include"
+ elif [ -f ../examples++-load/include/ff++.hpp ]; then
++<<<<<<< HEAD
+ INCFF="-I../examples++-load/include"
++=======
++ INCFF="-Iinclude"
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ elif [ -f "FFAPPLI_INC/ff++.hpp" ] ; then
+ INCFF="-IFFAPPLI_INC"
+ elif [ -f '@ff_prefix_dir@/include/ff++.hpp' ] ; then
+ INCFF='-I at ff_prefix_dir@/include'
+ else
+ ff=`which freefem++.exe`;
+ ffinc=`dirname "$ff"`/examples++-load/include
+ if [ -f "$ffinc/ff++.hpp" ]; then
+ INCFF=-I"'$ffinc'";
+ else
+ echo " erreur PB include freefem++ directory " ;
+ exit 1;
+ fi
+ fi
+fi
+do="yes"
+DEBUG=""
+CONLY="false"
+uu=`uname -s`
+INC=""
+LIBS=""
+DLL=""
+bin="."
+out=""
+files=""
+fileso=""
+OTHER="";
+WIN32="";
+
+case "$uu" in
+ CYGWIN*|MINGW*)
+ if [ -z "@WIN32DLLTARGET@" ] ; then
+ onwin32=1; uu="cygwin-version";
+ else
+ onwin32=1; uu="win32"; # pure windows
+ fi
+ WIN32="win32-"
+ wff=`which FreeFem++.exe`
+ dff=`dirname "$wff"`
+ if [ "$bin" = "." -a -f ../src/bin-win32/libff.dll ]; then
+ bin=../src/bin-win32
+ elif [ -f "$dff/libff.dll" ]; then
+# modif for install on cygwin
+ bin="$dff"
+ elif [ "$bin" = "." -a -f ../libff.dll ]; then
+ bin=..
+ elif [ "$bin" = "." -a -f ../../libff.dll ]; then
+ bin=../..
+ fi;;
+esac
+autodep=""
+withmpi=""
+args=""
+
+while [ $# -ne 0 ] ; do
+ argsp=$args
+ args="$args '$1'"
+ case "$1" in
+ -[h?]*) echo usage $0 "[-n] [-g] [-win32] [-l libfile] [-I includedir] files"
+ echo " -auto : build automaticaly the dependance (in test FH) "
+ echo " -n : do nothing just print"
+ echo " -g : compile with -g option"
+ echo " -c : compile only"
+ echo " -mpi: with mpi"
+ echo " -nompi: without $MPI_LIB links "
+ echo " -O* : compile with -O* option"
+ echo " -cygwin: compile for cygwin/win32 OS (Window XP, ...)"
+ echo " -win32: compile for win32 OS (Window XP, ...) default under cygwin"
+ echo " -l files add files to the ld process (link)"
+ echo " -I dir add dir in include seach dir for compilation"
+ echo " -b dir to change the default install dir "
+ echo " -dll file add dll and this file copie in the install dir"
+ echo " -o outputfile without suffix"
+ echo " file.{cpp,cp,cxx,c,f,F}"
+ exit 0;
+ ;;
+ F77=*) F77=`echo $1|sed 's/[A-Z0-9]*=//'` ;;
+ CXX=*) CXX=`echo $1|sed 's/[A-Z0-9]*=//'` ;;
+ MPICXX=*) MPICXX=`echo $1|sed 's/[A-Z0-9]*=//'`;withmpi=yes ;;
+ F77=*) F77=`echo $1|sed 's/[A-Z0-9]*=//'` ;;
+ CXXFLAGS=*) CXXFLAGS=`echo $1|sed 's/[A-Z0-9]*=//'` ;;
+ FFLAGS=*) FFLAGS=`echo $1|sed 's/[A-Z0-9]*=//'` ;;
+ MPI_LIB=*) MPI_LIB=`echo $1|sed 's/[A-Z0-9]*=//'` ;;
+ -auto) autodep=yes;args=$argsp;;
+ -mpi) withmpi=yes;;
+ -nompi) MPI_LIB='';withmpi='';;
+ -n) do="no";;
+ -g) DEBUG="$DEBUG $1";;
+ -c) CONLY=yes;;
+ -O*) DEBUG="$DEBUG $1";;
+ -cygwin) onwin32=1; uu="cygwin-version";;
+ -win32) onwin32=1; uu="win32";;
+ -b) bin=$2 ; shift;;
+ -I*) INC="$INC '$1'";;
+ -D*) INC="$INC '$1'";;
+ -dll) DLL="$DLL '$2'";shift;;
+ -[Ll]*) LIBS="$LIBS '$1'" ;; # FFCS - 27/10/11 - need quotes for MPICH libraries in 'Program Files' under Windows
+ *.a) LIBS="$LIBS $1" ;;
+ *.so) LIBS="$LIBS $1" ;;
+ *.dll) if [ -f "$1" ] ; then LIBS="$LIBS '$1'"
+ elif [ -f "$bin/$1" ] ; then LIBS="$LIBS '$bin/$1'"
+ else
+ echo " erreur file not found $1" ;
+ exit 1;
+ fi;;
+ -Wl*) LIBS="$LIBS $1" ;;
+ *.cpp) files="$files '$1'"; o=`basename "$1" .cpp` ; fileso="$fileso '$o.o'"; args=$argsp;;
+ *.cp) files="$files '$1'"; o=`basename "$1" .cp` ; fileso="$fileso '$o.o'"; args=$argsp;;
+ *.cxx) files="$files '$1'"; o=`basename "$1" .cxx` ; fileso="$fileso '$o.o'"; args=$argsp;;
+ *.c) files="$files '$1'"; o=`basename "$1" .c` ; fileso="$fileso '$o.o'"; args=$argsp;;
+ *.f) ffiles="$ffiles '$1'"; o=`basename "$1" .f` ; fileso="$fileso '$o.o'";;
+ *.F) ffiles="$ffiles '$1'"; o=`basename "$1" .F` ; fileso="$fileso '$o.o'";;
+ *.o) fileso="$fileso '$1'"; o=`basename "$1" .o` ;;
+ -o) out="$2"; shift;;
+ *) OTHER="$OTHER $1";;
+ esac
+ shift
+done
+
+# remove old file... FH sep 2013..
+SUF=@DYLIB_SUFFIX@
+
+if [ -n "$autodep" ] ; then
+# echo "$thecommand" $args `eval "'$dircommand/ff-get-dep'" -ff $files`
+ argsdep=`eval "'$dircommand/ff-get-dep'" -ff $files`
+
+ error=`echo "$argsdep"| grep ERROR`
+ if [ -n "$error" ] ; then
+ echo " WARNING in auto dependance seach ( missing plugin $2) . sorry : $error "
+
+ # FFCS - 28/11/11 - we need to stop compiling as soon as there is an error because we want a fixed set of features in
+ # FFCS
+ # return a error when FFCS enable .. FH.
+ echo " -- $error " >>Missing-plugins- at DYLIB_SUFFIX@.log
+ exit $ffcs;
+ fi
+ echo eval "$thecommand" $args $argsdep
+ eval "$thecommand" $args $argsdep
+
+ # FFCS needs an error exit code to make sure that all libraries are correctly compiled
+ exit $?;
+fi
+
+if [ -n "$onwin32" -a ! -f "$bin/libff.dll" ] ; then
+ echo " Error the file libff.dll must be exist in '$bin' the install directory,"
+ echo " to link on windows OS "
+ echo " Use the parameter -b to set the correct install directory "
+ exit 1;
+fi
+
+if [ -z "$out" ] ; then out=$o ; fi;
+if [ -f "$out.$SUF" ] ; then rm $out.$SUF ; fi
+
+
+# Default compiler
+if [ -z "$CXX" ];then CXX=g++ ; fi
+if [ -n "$withmpi" ]; then CXX=$MPICXX;fi
+
+test "$withmpi" = "yes" && WMPI_LIB="$MPI_LIB"
+
+# build a mpi version of the plugin if the plugin do exist un mpi dir
+# and if the mpi version exist and if
+OWMPI=""
+test -d ../examples++-mpi -a -n "$MPI_LIB" -a "$withmpi" != "yes" -a ! -f "../examples++-mpi/$out.cpp" && OWMPI="../examples++-mpi/$out.$SUF"
+test -f "$OWMPI" -a -n "$OWMPI" && rm "$OWMPI"
+
+
+
+INC="$INCFF $INC"
+SHARED="-shared"
+case "$WIN32$uu" in
+ Darwin*)
+# echo "export MACOSX_DEPLOYMENT_TARGET=10.3"
+# export MACOSX_DEPLOYMENT_TARGET=10.4
+# SUF=dylib
+ SHARED="-bundle -undefined dynamic_lookup" ;;
+ win32-CYGWIN*|win32-win32)
+ echo " Window without cygwin "
+ WMPI_LIB=''
+ b="$bin"
+ LIBS=" '$b/libff.dll' '$b/FreeFem++-api.dll' $LIBS $DLL"
+
+ # FFCS - 17/10/12 - --unresolved-symbols=ignore-all is not understood by the current mingw64 compilers
+ SHARED="-shared -Wl,--enable-auto-import"
+
+ # FFCS - 17/10/12 - -mno-cygwin is not understood by the current mingw64 compilers
+ ###FLAGS=' -mno-cygwin '
+# SUF=dll
+ ;;
+ win32-cygwin-version)
+ echo " cygwin-version "
+ WMPI_LIB=''
+ b=$bin
+ FLAGS=' '
+ LIBS="'$b/libff.dll' $LIBS $DLL"
+# SUF=dll
+ ;;
+ FreeBSD|NetBSD)
+ SHARED="-shared"
+ FLAGS='-fPIC';;
+ # 64 bit Linux needs -fPIC (ALH)
+ SunOS)
+ SHARED="-shared"
+ FLAGS='-fPIC';;
+ # 64 bit Linux needs -fPIC (ALH)
+ Linux)
+ FLAGS='-fPIC'
+ SHARED="-shared " ;;
+ *)
+ echo "sorry unknown achitecture "`uname`
+ exit 1;;
+esac
+
+
+#FLAGS="$FLAGS $DEBUG $FFCXXFLAGS"
+# change F. H Version 3.17
+FLAGS="$FLAGS $DEBUG"
+
+if [ -n "$ffiles$files$fileso" ] ; then
+ if [ -n "$WIN32" -a ! -f "$bin/libff.dll" ]; then
+ echo " Sorry, no freefem .dll file (libff.dll) in $bin dir "
+ echo " try with -b dir-path where the file libff.dll exist"
+ exit 1;
+ fi
+ if [ "$files" ] ;then
+ echo $CXX -c $FLAGS $CXXFLAGS $FFCXXFLAGS $INC $PIC $files
+ if [ $do = yes ] ; then
+ eval $CXX -c $INC $FLAGS $CXXFLAGS $FFCXXFLAGS $PIC $files
+ ret=$?; if [ $ret -ne 0 ] ; then exit $ret ;fi
+ fi
+ fi
+ if [ "$ffiles" ] ;then
+ echo $F77 -c $FLAGS $FFLAGS $FFFFLAGS $INC $PIC $ffiles
+ LIBS="$FFFLIBS $LIBS"
+ if [ $do = yes ] ; then
+ eval $F77 -c $INC $FFLAGS $FLAGS $FFFFLAGS $PIC $ffiles
+ ret=$?; if [ $ret -ne 0 ] ; then exit $ret ;fi
+ fi
+ fi
+ if [ "$CONLY" != yes ]; then
+ echo $CXX $SHARED $FLAGS $CXXFLAGS $FFCXXFLAGS $fileso -o $out.$SUF $LIBS $DLL $OTHER $WMPI_LIB
+ if [ $do = yes ] ; then
+ eval $CXX $SHARED $FLAGS $CXXFLAGS $FFCXXFLAGS $fileso -o $out.$SUF $LIBS $DLL $OTHER $WMPI_LIB
+ ret=$?; if [ $ret -ne 0 ] ; then exit $ret ;fi
+ fi
+ if [ "$bin" != "." ]; then
+ echo cp $out.$SUF $bin
+ test $do = yes && cp $out.$SUF "$bin"
+ fi
+ if [ -n "$DLL" ] ; then
+ echo cp $DLL $bin
+ test $do = yes && cp $DLL "$bin"
+ fi
+ if [ -n "$OWMPI" ] ; then
+ echo $CXX $SHARED $FLAGS $CXXFLAGS $FFCXXFLAGS $fileso -o $OWMPI $LIBS $DLL $OTHER $MPI_LIB
+ if [ $do = yes ] ; then
+ eval $CXX $SHARED $FLAGS $CXXFLAGS $FFCXXFLAGS $fileso -o $OWMPI $LIBS $DLL $OTHER $MPI_LIB
+ ret=$?; if [ $ret -ne 0 ] ; then exit $ret ;fi
+ fi
+ fi
+ fi
+fi
diff --cc examples++-load/mat_dervieux.cpp.orig
index bb7b141,0000000..ce3eb37
mode 100644,000000..100644
--- a/examples++-load/mat_dervieux.cpp.orig
+++ b/examples++-load/mat_dervieux.cpp.orig
@@@ -1,159 -1,0 +1,170 @@@
+// Implementation of P1-P0 FVM-FEM
+// ---------------------------------------------------------------------
+// $Id$
+// compile and link with ./load.link mat\_dervieux.cpp
+#include <iostream>
+using namespace std;
+#include "cfloat"
+#include "rgraph.hpp"
+#include "error.hpp"
+#include "AFunction.hpp"
+
+//#include "lex.hpp"
+#include "MatriceCreuse_tpl.hpp"
+#include "Mesh3dn.hpp"
+#include "MeshPoint.hpp"
+#include "lgfem.hpp"
+#include "lgmesh3.hpp"
+#include "lgsolver.hpp"
+#include "problem.hpp"
+/*
+#include <iostream>
+#include <cfloat>
+#include <cmath>
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+#include "rgraph.hpp"
+#include "RNM.hpp"
+// remove problem of include
+#undef HAVE_LIBUMFPACK
+#undef HAVE_CADNA
+#include "MatriceCreuse_tpl.hpp"
+#include "MeshPoint.hpp"
+#include "lgfem.hpp"
+#include "lgmesh.hpp"
+#include "lgmesh3.hpp"
+#include "lgsolver.hpp"
+#include "problem.hpp"
+*/
+class MatrixUpWind0 : public E_F0mps { public:
+ typedef Matrice_Creuse<R> * Result;
+ Expression emat,expTh,expc,expu1,expu2;
+ MatrixUpWind0(const basicAC_F0 & args)
+ {
+
+ args.SetNameParam();
+ emat =args[0]; // the matrix expression
+ expTh= to<pmesh>(args[1]); // a the expression to get the mesh
+ expc = CastTo<double>(args[2]); // the expression to get c (must be a double)
+ // a array expression [ a, b]
+ const E_Array * a= dynamic_cast<const E_Array*>((Expression) args[3]);
+ if (a->size() != 2) CompileError("syntax: MatrixUpWind0(Th,rhi,[u1,u2])");
+ int err =0;
+ expu1= CastTo<double>((*a)[0]); // fist exp of the array (must be a double)
+ expu2= CastTo<double>((*a)[1]); // second exp of the array (must be a double)
+
+ }
+
+ ~MatrixUpWind0()
+ {
+ }
+
+ static ArrayOfaType typeargs()
+ { return ArrayOfaType(atype<Matrice_Creuse<R>*>(),
+ atype<pmesh>(),atype<double>(),atype<E_Array>());}
+ static E_F0 * f(const basicAC_F0 & args){ return new MatrixUpWind0(args);}
+ AnyType operator()(Stack s) const ;
+
+};
+
+int fvmP1P0(double q[3][2], double u[2],double c[3], double a[3][3], double where[3] )
+{ // computes matrix a on a triangle for the Dervieux FVM
+ for(int i=0;i<3;i++) for(int j=0;j<3;j++) a[i][j]=0;
+
+ for(int i=0;i<3;i++){
+ int ip = (i+1)%3, ipp =(ip+1)%3;
+ double unL =-((q[ip][1]+q[i][1]-2*q[ipp][1])*u[0]
+ -(q[ip][0]+q[i][0]-2*q[ipp][0])*u[1])/6;
+ if(unL>0) { a[i][i] += unL; a[ip][i]-=unL;}
+ else{ a[i][ip] += unL; a[ip][ip]-=unL;}
+ if(where[i]&&where[ip]){ // this is a boundary edge
+ unL=((q[ip][1]-q[i][1])*u[0] -(q[ip][0]-q[i][0])*u[1])/2;
+ if(unL>0) { a[i][i]+=unL; a[ip][ip]+=unL;}
+ }
+ }
+ return 1;
+}
+
+// the evaluation routine
+AnyType MatrixUpWind0::operator()(Stack stack) const
+{
+ Matrice_Creuse<R> * sparce_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ MatriceMorse<R> * amorse =0;
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ Mesh * pTh = GetAny<pmesh>((*expTh)(stack));
+ ffassert(pTh);
+ Mesh & Th (*pTh);
+ {
+ map< pair<int,int>, R> Aij;
+ KN<double> cc(Th.nv);
+ double infini=DBL_MAX;
+ cc=infini;
+ for (int it=0;it<Th.nt;it++)
+ for (int iv=0;iv<3;iv++)
+ {
+ int i=Th(it,iv);
+ if ( cc[i]==infini) { // if nuset the set
+ mp->setP(&Th,it,iv);
+ cc[i]=GetAny<double>((*expc)(stack));
+ }
+ }
+
+ for (int k=0;k<Th.nt;k++)
+ {
+ const Triangle & K(Th[k]);
+ const Vertex & A(K[0]), &B(K[1]),&C(K[2]);
+ R2 Pt(1./3.,1./3.);
+ R u[2];
+ MeshPointStack(stack)->set(Th,K(Pt),Pt,K,K.lab);
+ u[0] = GetAny< R>( (*expu1)(stack) ) ;
+ u[1] = GetAny< R>( (*expu2)(stack) ) ;
+
+ int ii[3] ={ Th(A), Th(B),Th(C)};
+ double q[3][2]= { { A.x,A.y} ,{B.x,B.y},{C.x,C.y} } ; // coordinates of 3 vertices (input)
+ double c[3]={cc[ii[0]],cc[ii[1]],cc[ii[2]]};
+ double a[3][3], where[3]={(double) A.lab, (double) B.lab, (double)C.lab};
+ if (fvmP1P0(q,u,c,a,where) )
+ {
+ for (int i=0;i<3;i++)
+ for (int j=0;j<3;j++)
+ if (fabs(a[i][j]) >= 1e-30)
+ { Aij[make_pair(ii[i],ii[j])]+=a[i][j];
+ }
+ }
+ }
+ amorse= new MatriceMorse<R>(Th.nv,Th.nv,Aij,false);
+ }
+ sparce_mat->Uh=UniqueffId();
+ sparce_mat->Vh=UniqueffId();
+ sparce_mat->A.master(amorse);
+ sparce_mat->typemat=(amorse->n == amorse->m) ? TypeSolveMat(TypeSolveMat::GMRES) : TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ *mp=mps;
+
+ if(verbosity>3) { cout << " End Build MatrixUpWind : " << endl;}
+
+ return sparce_mat;
+}
+
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+static void Load_Init()
++=======
++class Init { public:
++ Init();
++};
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ cout << " lood: init Mat Chacon " << endl;
+ Global.Add("MatUpWind1","(", new OneOperatorCode<MatrixUpWind0 >( ));
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/mat_psi.cpp.orig
index 9cb3746,0000000..d974ce8
mode 100644,000000..100644
--- a/examples++-load/mat_psi.cpp.orig
+++ b/examples++-load/mat_psi.cpp.orig
@@@ -1,271 -1,0 +1,283 @@@
+// Example C++ function "myfunction", dynamically loaded into "load.edp"
+// ---------------------------------------------------------------------
+// $Id$
+
+
+#include "ff++.hpp"
+
+class MatrixUpWind0 : public E_F0 { public:
+ typedef Matrice_Creuse<R> * Result;
+ Expression emat,expTh,expc,expu1,expu2;
+ MatrixUpWind0(const basicAC_F0 & args)
+ {
+
+ args.SetNameParam();
+ emat =args[0];
+ expTh= to<pmesh>(args[1]);
+ expc = CastTo<double>(args[2]);
+ const E_Array * a= dynamic_cast<const E_Array*>((Expression) args[3]);
+ if (a->size() != 2) CompileError("syntax: MatrixUpWind0(Th,rhi,[u1,u2])");
+ int err =0;
+ expu1= CastTo<double>((*a)[0]);
+ expu2= CastTo<double>((*a)[1]);
+
+ }
+
+ ~MatrixUpWind0()
+ {
+ }
+
+ static ArrayOfaType typeargs() { return ArrayOfaType(atype<Matrice_Creuse<R>*>(),atype<pmesh>(),atype<double>(),atype<E_Array>());}
+ static E_F0 * f(const basicAC_F0 & args){ return new MatrixUpWind0(args);}
+ AnyType operator()(Stack s) const ;
+
+};
+
+class MatrixUpWind3 : public E_F0 { public:
+ typedef Matrice_Creuse<R> * Result;
+ Expression emat,expTh,expc,expu1,expu2,expu3;
+ MatrixUpWind3(const basicAC_F0 & args)
+ {
+
+ args.SetNameParam();
+ emat =args[0];
+ expTh= to<pmesh3>(args[1]);
+ expc = CastTo<double>(args[2]);
+ const E_Array * a= dynamic_cast<const E_Array*>((Expression) args[3]);
+ if (a->size() != 3) CompileError("syntax: MatrixUpWind0(Th,rhi,[u1,u2])");
+ int err =0;
+ expu1= CastTo<double>((*a)[0]);
+ expu2= CastTo<double>((*a)[1]);
+ expu3= CastTo<double>((*a)[2]);
+
+ }
+
+ ~MatrixUpWind3()
+ {
+ }
+
+ static ArrayOfaType typeargs() { return ArrayOfaType(atype<Matrice_Creuse<R>*>(),atype<pmesh3>(),atype<double>(),atype<E_Array>());}
+ static E_F0 * f(const basicAC_F0 & args){ return new MatrixUpWind3(args);}
+ AnyType operator()(Stack s) const ;
+
+};
+
+int gladys(double q[3][2], double u[2],double c[3], double a[3][3] ) //PSI Deconninck
+{ // computes matrix a on a triangle for the Chacon-Reina Petrof-Galerkin upwind
+
+ // working arrays
+ double dw[3][2]; // basis function gradients times area
+ double ua[2], kk[3], beta[3]; // to define a[][]
+ double udc=0; // u.grad(w)*area
+ bool oneaval=false;
+ int i1=-1;
+
+ for(int i=0;i<3;i++)
+ {
+ int ip=(i+1)%3, ipp=(ip+1)%3;
+ for(int j=0;j<2;j++)
+ dw[i][1-j]= (2*j-1)*(q[ipp][j]-q[ip][j])/2;
+ }
+
+ for(int i=0;i<3;i++){
+ kk[i] = u[0]*dw[i][0]+u[1]*dw[i][1] ;
+ udc += kk[i]*c[i];
+ }
+
+ for(int i=0;i<3;i++)
+ {
+ ua[0]=u[0]; ua[1]=u[1];
+ int ip=(i+1)%3, ipp=(ip+1)%3;
+ if(kk[i]>0 && kk[ip]<=0 && kk[ipp]<=0)
+ {
+ beta[i]=1; beta[ip]=0; beta[ipp]=0; oneaval=true;
+ }
+ else if(kk[i]<=0 && kk[ip]>0 && kk[ipp]>0) i1=i;
+ }
+
+ if(!oneaval)
+ {
+ if(i1<0)cout<<"bug\n";
+ int i=i1, ip=(i+1)%3, ipp=(i+2)%3;
+ double lambda = (c[ip]-c[i])*(c[ipp]-c[i]);
+ if (fabs(lambda) < -1e-20)
+ {
+ return 0;
+ }
+ if(lambda < 0)
+ {
+ if (udc>0)
+ {
+ beta[i]=0; beta[ip]=0; beta[ipp]=1;
+ ua[0] = udc*(q[ipp][0]-q[i][0])/(c[ipp]-c[i]);
+ ua[1] = udc*(q[ipp][1]-q[i][1])/(c[ipp]-c[i]);
+ }
+ else
+ {
+ beta[i]=0; beta[ipp]=0; beta[ip]=1;
+ ua[0] = udc*(q[ip][0]-q[i][0])/(c[ip]-c[i]);
+ ua[1] = udc*(q[ip][1]-q[i][1])/(c[ip]-c[i]);
+ }
+ }
+ else
+ {
+ beta[i]=0;
+ beta[ip]=kk[ip]*(c[ip]-c[i])/udc;
+ beta[ipp]=kk[ipp]*(c[ipp]-c[i])/udc;
+ }
+ }
+ for(int i=0;i<3;i++)
+ for(int j=0;j<3;j++)
+ a[i][j]= beta[i]*(ua[0]*dw[j][0]+ua[1]*dw[j][1]);
+ return 1;
+}
+
+
+AnyType MatrixUpWind0::operator()(Stack stack) const
+{
+ Matrice_Creuse<R> * sparce_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ MatriceMorse<R> * amorse =0;
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ Mesh * pTh = GetAny<pmesh>((*expTh)(stack));
+ ffassert(pTh);
+ Mesh & Th (*pTh);
+ {
+ map< pair<int,int>, R> Aij;
+ KN<double> cc(Th.nv);
+ double infini=DBL_MAX;
+ cc=infini;
+ for (int it=0;it<Th.nt;it++)
+ for (int iv=0;iv<3;iv++)
+ {
+ int i=Th(it,iv);
+ if ( cc[i]==infini) { // if nuset the set
+ mp->setP(&Th,it,iv);
+ cc[i]=GetAny<double>((*expc)(stack));
+ }
+ }
+
+ for (int k=0;k<Th.nt;k++)
+ {
+ const Triangle & K(Th[k]);
+ const Vertex & A(K[0]), &B(K[1]),&C(K[2]);
+ R2 Pt(1./3.,1./3.);
+ R u[2];
+ MeshPointStack(stack)->set(Th,K(Pt),Pt,K,K.lab);
+ u[0] = GetAny< R>( (*expu1)(stack) ) ;
+ u[1] = GetAny< R>( (*expu2)(stack) ) ;
+
+ int ii[3] ={ Th(A), Th(B),Th(C)};
+ double q[3][2]= { { A.x,A.y} ,{B.x,B.y},{C.x,C.y} } ; // coordinates of 3 vertices (input)
+ double c[3]={cc[ii[0]],cc[ii[1]],cc[ii[2]]};
+ double a[3][3];
+ if (gladys(q,u,c,a) )
+ {
+ for (int i=0;i<3;i++)
+ for (int j=0;j<3;j++)
+ if (fabs(a[i][j]) >= 1e-30)
+ Aij[make_pair(ii[i],ii[j])]+=a[i][j];
+ }
+ }
+ amorse= new MatriceMorse<R>(Th.nv,Th.nv,Aij,false);
+ }
+ sparce_mat->Uh=UniqueffId();
+ sparce_mat->Vh=UniqueffId();
+ sparce_mat->A.master(amorse);
+ sparce_mat->typemat=(amorse->n == amorse->m) ? TypeSolveMat(TypeSolveMat::GMRES) : TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ *mp=mps;
+
+ if(verbosity>3) { cout << " End Build MatrixUpWind : " << endl;}
+
+ return sparce_mat;
+}
+int Marco(const Mesh3::Element & K, R3 U,R c[4], double a[4][4] ) //PSI Deconninck
+{
+ ExecError("Not Implemented Sorry Marco!");
+ return 0;
+}
+AnyType MatrixUpWind3::operator()(Stack stack) const
+{
+ Matrice_Creuse<R> * sparce_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ MatriceMorse<R> * amorse =0;
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ Mesh3 * pTh = GetAny<pmesh3>((*expTh)(stack));
+ ffassert(pTh);
+ Mesh3 & Th (*pTh);
+ {
+ map< pair<int,int>, R> Aij;
+ KN<double> cc(Th.nv);
+ double infini=DBL_MAX;
+ cc=infini;
+ for (int it=0;it<Th.nt;it++)
+ for (int iv=0;iv<4;iv++)
+ {
+ int i=Th(it,iv);
+ if ( cc[i]==infini) { // if nuset the set
+ mp->setP(&Th,it,iv);
+ cc[i]=GetAny<double>((*expc)(stack));
+ }
+ }
+
+ for (int k=0;k<Th.nt;k++)
+ {
+ const Mesh3::Element & K(Th[k]);
+ const Mesh3::Vertex & A(K[0]), &B(K[1]),&C(K[2]),&D(K[3]);
+ R3 Pt(1./4.,1./4.,1./4.);
+ R3 U;
+ MeshPointStack(stack)->set(Th,K(Pt),Pt,K,K.lab);
+ U.x = GetAny< R>( (*expu1)(stack) ) ;
+ U.y = GetAny< R>( (*expu2)(stack) ) ;
+ U.z = GetAny< R>( (*expu3)(stack) ) ;
+
+ int ii[4] ={ Th(A), Th(B),Th(C),Th(D)};// number of 4 vertex
+
+ double c[4]={cc[ii[0]],cc[ii[1]],cc[ii[2]],cc[ii[3]]};
+ double a[4][4];
+ if (Marco(K,U,c,a) )
+ {
+ for (int i=0;i<4;i++)
+ for (int j=0;j<4;j++)
+ if (fabs(a[i][j]) >= 1e-30)
+ Aij[make_pair(ii[i],ii[j])]+=a[i][j];
+ }
+ }
+ amorse= new MatriceMorse<R>(Th.nv,Th.nv,Aij,false);
+ }
+ sparce_mat->Uh=UniqueffId();
+ sparce_mat->Vh=UniqueffId();
+ sparce_mat->A.master(amorse);
+ sparce_mat->typemat=(amorse->n == amorse->m) ? TypeSolveMat(TypeSolveMat::GMRES) : TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ *mp=mps;
+
+ if(verbosity>3) { cout << " End Build MatrixUpWind : " << endl;}
+
+ return sparce_mat;
+
+}
+
+
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+ Init init;
+*/
+ static void Load_Init()
++=======
++class Init { public:
++ Init();
++};
++ Init init;
++ Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ {
+ cout << " lood: init Mat Chacon " << endl;
+ Global.Add("MatUpWind0","(", new OneOperatorCode<MatrixUpWind0 >( ));
+ Global.Add("MatUpWind0","(", new OneOperatorCode<MatrixUpWind3 >( ));
++<<<<<<< HEAD
+ }
+LOADFUNC(Load_Init)
++=======
++ }
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/medit.cpp
index bc72e4f,1ed8101..bddf7ef
--- a/examples++-load/medit.cpp
+++ b/examples++-load/medit.cpp
@@@ -239,7 -239,7 +239,7 @@@ AnyType readsol_Op::operator()(Stack st
}
}
}
-- /* // A prendre en compte dans la d�finition de la metriques dans MMG
++ /* // A prendre en compte dans la d�finition de la metriques dans MMG
// MMG_swap data
if ( sol->offset == 6 ) {
tmp = sol->met[isol + 2];
diff --cc examples++-load/medit.cpp.orig
index bc72e4f,1ed8101..c2e1c07
--- a/examples++-load/medit.cpp.orig
+++ b/examples++-load/medit.cpp.orig
@@@ -2395,18 -2395,18 +2395,32 @@@ AnyType PopenMeditMesh3_Op<v_fes>::oper
}
// truc pour que la fonction
++<<<<<<< HEAD
+// static void Load_Init() soit appele a moment du chargement dynamique
++=======
+ // Init::Init() soit appele a moment du chargement dynamique
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
// du fichier
//
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
+ class Init { public:
+ Init();
+ };
+
+ LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
+
+ Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
typedef Mesh *pmesh;
typedef Mesh3 *pmesh3;
@@@ -2424,4 -2424,3 +2438,7 @@@
Global.Add("readsol","(",new OneOperatorCode< readsol_Op >);
}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/metis.cpp.orig
index 6bd6025,0000000..2c8150c
mode 100644,000000..100644
--- a/examples++-load/metis.cpp.orig
+++ b/examples++-load/metis.cpp.orig
@@@ -1,133 -1,0 +1,151 @@@
+// SUMMARY : add interface with partionning library scotch
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : F. Hecht
+// E-MAIL : F. Hecht <hecht at ljll.math.upmc.fr>
+// date : 2009 ????
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ */
+
+// for automatic compilation with ff-c++
+//ff-c++-LIBRARY-dep: metis
+//ff-c++-cpp-dep:
+//
+
+#include <ff++.hpp>
+#include <cmath>
+typedef KNM<double> * pRnm;
+typedef KN<double> * pRn;
+typedef string * pstring;
+extern "C" {
+#include <metis.h>
+}
+
+#ifdef METIS_VER_MAJOR
+// METIS_PartMeshDual(&ne, &nn, elmnts, &etype, &numflag, &nparts, &edgecut, epart, npart);
+extern "C" {
+real_t libmetis__ComputeElementBalance(idx_t ne, idx_t nparts, idx_t *where);
+}
+#else
+typedef idxtype idx_t ;
+#endif
++<<<<<<< HEAD
+template<class Mesh,int NO,typename R>
+KN<R> * partmetis(Stack s,KN<R> * const & part,Mesh * const & pTh,long const & lparts)
++=======
++template<class Mesh,int NO>
++KN<long> * partmetis(Stack s,KN<long> * const & part,Mesh * const & pTh,long const & lparts)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ ffassert(pTh);
+ const Mesh & Th(*pTh);
+ int nt=Th.nt,nv=Th.nv;
+ int nve = Mesh::Rd::d+1;
+
+ KN<idx_t> eptr(nt+1),elmnts(nve*nt), epart(nt), npart(nv);
+ for(int k=0,i=0;k<nt;++k)
+ {
+ eptr[k]=i;
+ for(int j=0;j<nve;j++)
+ elmnts[i++] = Th(k,j);
+ eptr[k+1]=i;
+ }
+ int numflag=0;
+ int nparts=lparts;
+ int edgecut;
+ int etype =nve-2; // triangle or tet . change FH fevr 2010
+ idx_t ncommon = 1;
+#ifdef METIS_VER_MAJOR
+ if(NO==0)
+ METIS_PartMeshNodal(&nt, &nv, eptr, (idx_t *) elmnts, 0,0, &nparts, 0,0, &edgecut, (idx_t *) epart, (idx_t *) npart);
+ else
+ METIS_PartMeshDual(&nt, &nv, eptr, (idx_t *) elmnts , 0,0, &ncommon, &nparts, 0,0, &edgecut, (idx_t *) epart,(idx_t *) npart);
+ if(verbosity)
+ printf(" --metisOA: %d-way Edge-Cut: %7d, Balance: %5.2f Nodal=0/Dual %d\n", nparts, nve, libmetis__ComputeElementBalance(nt, nparts, epart),NO);
+#else
+ if(NO==0)
+ METIS_PartMeshNodal(&nt, &nv, elmnts, &etype , &numflag, &nparts, &edgecut, epart, npart);
+ else
+ METIS_PartMeshDual(&nt, &nv, elmnts, &etype , &numflag, &nparts, &edgecut, epart, npart);
+ if(verbosity)
+ printf(" --metis: %d-way Edge-Cut: %7d, Balance: %5.2f Nodal=0/Dual %d\n", nparts, nve, ComputeElementBalance(nt, nparts, epart),NO);
+#endif
+ part->resize(nt);
+ *part=epart;
+ return part;
+}
+KN<long> * partmetisd(Stack s,KN<long> * const & part,Mesh * const & pTh,long const & lparts)
+{
+ ffassert(pTh);
+ const Mesh & Th(*pTh);
+ int nt=Th.nt,nv=Th.nv;
+ int nve = Mesh::Element::NbV;
+
+ KN<idx_t> elmnts(nve*nt), epart(nt), npart(nv);
+ for(int k=0,i=0;k<nt;++k)
+ for(int j=0;j<nve;j++)
+ elmnts[i++] = Th(k,j);
+ int numflag=0;
+ int nparts=lparts;
+ int edgecut;
+ int etype =nve-2; // triangle
+#ifdef METIS_VER_MAJOR
+ printf(" %d-way Edge-Cut: %7d, Balance: %5.2f\n", nparts, nve, libmetis__ComputeElementBalance(nt, nparts, epart));
+#else
+ printf(" %d-way Edge-Cut: %7d, Balance: %5.2f\n", nparts, nve, ComputeElementBalance(nt, nparts, epart));
+#endif
+ part->resize(nt);
+ *part=epart;
+ return part;
+}
++<<<<<<< HEAD
+/* class Init { public:
++=======
++class Init { public:
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ Init();
+};
+// E_F_StackF0F0
+
++<<<<<<< HEAD
+$1 */
+static void Load_Init(){
++=======
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if(verbosity && mpirank == 0)
+ cout << " lood: init metis " << endl;
+ Global.Add("metisnodal","(",new OneOperator3_<KN<long> *,KN<long> *,Mesh *,long , E_F_stackF0F0F0_<KN<long> *,KN<long> *,Mesh *,long> >(&partmetis<Mesh,0>));
+ Global.Add("metisdual","(",new OneOperator3_<KN<long> *,KN<long> *,Mesh *,long , E_F_stackF0F0F0_<KN<long> *,KN<long> *,Mesh *,long> >(&partmetis<Mesh,1>));
+ Global.Add("metisnodal","(",new OneOperator3_<KN<long> *,KN<long> *,Mesh3 *,long , E_F_stackF0F0F0_<KN<long> *,KN<long> *,Mesh3 *,long> >(&partmetis<Mesh3,0>));
+ Global.Add("metisdual","(",new OneOperator3_<KN<long> *,KN<long> *,Mesh3 *,long , E_F_stackF0F0F0_<KN<long> *,KN<long> *,Mesh3 *,long> >(&partmetis<Mesh3,1>));
+
++<<<<<<< HEAD
+ Global.Add("metisnodal","(",new OneOperator3_<KN<double> *,KN<double> *,Mesh *,long , E_F_stackF0F0F0_<KN<double> *,KN<double> *,Mesh *,long> >(&partmetis<Mesh,0>));
+ Global.Add("metisdual","(",new OneOperator3_<KN<double> *,KN<double> *,Mesh *,long , E_F_stackF0F0F0_<KN<double> *,KN<double> *,Mesh *,long> >(&partmetis<Mesh,1>));
+ Global.Add("metisnodal","(",new OneOperator3_<KN<double> *,KN<double> *,Mesh3 *,long , E_F_stackF0F0F0_<KN<double> *,KN<double> *,Mesh3 *,long> >(&partmetis<Mesh3,0>));
+ Global.Add("metisdual","(",new OneOperator3_<KN<double> *,KN<double> *,Mesh3 *,long , E_F_stackF0F0F0_<KN<double> *,KN<double> *,Mesh3 *,long> >(&partmetis<Mesh3,1>));
+
+}
+LOADFUNC(Load_Init)
++=======
++}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/mmg3d-v4.0.cpp.orig
index 5ea0209,0000000..fce9640
mode 100644,000000..100644
--- a/examples++-load/mmg3d-v4.0.cpp.orig
+++ b/examples++-load/mmg3d-v4.0.cpp.orig
@@@ -1,440 -1,0 +1,453 @@@
+// ORIG-DATE: Fev 2010
+// -*- Mode : c++ -*-
+//
+// SUMMARY : liaison medit freefem++ : adaptmesh in 3d
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// Modif : F. hecht : Frederic.hecht at upmc.fr
+// E-MAIL : jacques.morice at ann.jussieu.fr
+
+//
+// for automatic compilation with ff-c++
+//ff-c++-LIBRARY-dep: mmg3d-v4
+//ff-c++-cpp-dep:
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+
+
+// ./ff-c++ mmg3dv4.cpp -I../download/include/mmg3d/ -lmmg3d4
+
+#include "ff++.hpp"
+#include "msh3.hpp"
+//#define ADAPTLIBRARY"
+#include "dataff.h"
+
+using namespace Fem2D;
+//using namespace mmg3d;
+
+inline void add2(int *k,int n, int a)
+{
+ for (int i=0;i<n;++i)
+ k[i] += a;
+}
+void set_mesh(void *dataff,int *data,int ldata)
+{
+ DataFF *dff=(DataFF *) dataff;
+
+ int nnv= data[ff_id_vertex];
+ int nnt= data[ff_id_tet];
+ int nnbe= data[ff_id_tria];
+ Vertex3 *vv = new Vertex3[nnv];
+ Tet *tt= new Tet[nnt];
+ Triangle3 *bb=new Triangle3[nnbe];
+
+ Mesh3 * pTh= new Mesh3();
+ pTh->nv = nnv;
+ pTh->nt = nnt;
+ pTh->nbe =nnbe;
+
+ pTh->vertices = vv;
+ pTh->elements = tt;
+ pTh->borderelements = bb;
+
+ pTh->mes=0.;
+ pTh->mesb=0.;
+
+ dff->mesh= pTh;
+ if(verbosity>5) cout << " Set_mesh nv=" << nnv << " nTet " << nnt<< " NTria " <<nnbe << endl;
+}
+void end_mesh(void *dataff)
+{
+ DataFF *dff=(DataFF *) dataff;
+
+ Mesh3 & Th = *(Mesh3 *) dff->mesh;
+
+ Th.mes=0.;
+ Th.mesb=0.;
+
+ for (int i=0;i<Th.nbe;i++)
+ Th.mesb += Th.be(i).mesure();
+
+ // Add FH to be consitant we all constructor ... July 09
+ Th.BuildBound();
+ //Th.Save("TTTh.mesh");
+ if(verbosity>5)
+ cout << "end_mesh: Th.mes = " << Th.mes << " Th.mesb = " << Th.mesb << endl;
+ if(Th.nt > 0){
+ Th.BuildAdj();
+ Th.Buildbnormalv();
+ Th.BuildjElementConteningVertex();
+ }
+ // end add
+
+ if(verbosity>1)
+ cout << " -- End of Construct mesh3: mesure = " << Th.mes << " border mesure " << Th.mesb << endl;
+ ffassert(Th.mes>=0); // add F. Hecht sep 2009.
+
+}
+void set_v(void *dataff,int i,double *xyz,int lab)
+{
+ i--;
+ DataFF *dff=(DataFF *) dataff;
+ ffassert(dff->mesh);
+ Mesh3 & Th= * (Mesh3 *) dff->mesh;
+ Th.vertices[i].x = xyz[0];
+ Th.vertices[i].y = xyz[1];
+ Th.vertices[i].z = xyz[2];
+ Th.vertices[i].lab = lab;
+ if(verbosity>10)
+ cout << " set_v3 " <<i << " " << xyz[0] << " " << xyz[1] << " " << xyz[02] << " " << lab << endl;
+
+}
+void set_elmt(void *dataff,int id,int i,int *k,int lab)
+{
+ i--;
+ int n=0;
+ DataFF *dff=(DataFF *) dataff;
+ ffassert(dff->mesh);
+ Mesh3 & Th= *(Mesh3 *) dff->mesh;
+ if( id == 2)
+ {
+ n=3;
+ Mesh3::BorderElement & K(Th.be(i));
+ add2(k,3,-1);
+ K.set(Th.vertices,k,lab);
+ }
+
+ else if ( id== 3)
+ {
+ n=4;
+ Mesh3::Element & K(Th.t(i));
+ add2(k,4,-1);
+ K.set(Th.vertices,k,lab);
+ }
+ else
+ {
+ cout << " unknows id = " << id << " not 2 or 3 " << endl;
+ ffassert(0);
+ }
+
+ if(verbosity>10)
+ {
+ cout << " set_ele"<< n << " " <<i << " " ;
+ for(int j=0;j<n;j++)
+ cout << k[j] << " ";
+ cout << lab << endl;
+ }
+
+}
+void get_mesh(void *dataff,int *data,int ldata)
+{
+ DataFF *dff=(DataFF *) dataff;
+ assert(ldata>5);
+ for(int i=0;i<ldata;++i)
+ data[i]=0;
+ ffassert(dff->mesh);
+ Mesh3 & Th= *(Mesh3*) dff->mesh;
+ data[ff_id_vertex]= Th.nv;
+ data[ff_id_tria]= Th.nbe;
+ data[ff_id_tet]= Th.nt;
+ if(verbosity>9)
+ cout << " get_mesh " << Th.nv << " "<< Th.nbe << " "<< Th.nt << endl;
+
+}
+void get_v3(void *dataff,int i,double *xyz,int *lab)
+{
+ i--;
+ DataFF *dff=(DataFF *) dataff;
+ ffassert(dff->mesh);
+ Mesh3 & Th= *(Mesh3*) dff->mesh;
+ xyz[0] = Th.vertices[i].x ;
+ xyz[1] = Th.vertices[i].y ;
+ xyz[2] = Th.vertices[i].z ;
+ *lab = Th.vertices[i].lab ;
+ if(verbosity>10)
+ cout << " get_v3 " <<i << " " << xyz[0] << " " << xyz[1] << " " << xyz[2] << " " << *lab << endl;
+
+
+}
+void get_elmt(void *dataff,int id,int i,int *k,int *lab)
+{
+ i--;
+ DataFF *dff=(DataFF *) dataff;
+ ffassert(dff->mesh);
+ Mesh3 & Th= *(Mesh3*)dff->mesh;
+ int n =0;
+ if( id == 2)
+ {
+ n=3;
+ Mesh3::BorderElement & K(Th.be(i));
+ for (int j=0; j<n;++j)
+ k[j]=Th(K[j]);
+
+ *lab = K.lab;
+ }
+
+ else if ( id== 3)
+ {
+ n=4;
+ Mesh3::Element & K(Th.t(i));
+ for (int j=0; j<n;++j)
+ k[j]=Th(K[j]);
+ *lab=K.lab;
+ }
+ else {
+ cout << " id != 2, 3 , id = = "<< id << endl;
+ ffassert(0);
+ }
+ add2(k,n,+1);
+
+ if(verbosity>10)
+ {
+ cout << " get_ele"<< n << " " <<i << " " ;
+ for(int j=0;j<n;j++)
+ cout << k[j] << " ";
+ cout << *lab << endl;
+ }
+
+}
+
+
+
+class mmg3d_Op: public E_F0mps
+{
+public:
+ Expression eTh,xx,yy,zz;
+ static const int n_name_param = 5; //
+ static basicAC_F0::name_and_type name_param[] ;
+ Expression nargs[n_name_param];
+ KN_<long> karg(int i,Stack stack) const
+ { return nargs[i] ? GetAny<KN_<long> >( (*nargs[i])(stack) ): KN_<long>((long*) 0,0L) ;}
+
+ double arg(int i,Stack stack,double a ) const{ return nargs[i] ? GetAny< double >( (*nargs[i])(stack) ): a;}
+ string arg(int i,Stack stack,const char * a ) const{ return nargs[i] ? *GetAny< string * >( (*nargs[i])(stack) ): a;}
+ long arg(int i,Stack stack, long a ) const{ return nargs[i] ? GetAny< long >( (*nargs[i])(stack) ): a;}
+
+
+public:
+ mmg3d_Op(const basicAC_F0 & args ,Expression tth)
+ : eTh(tth),xx(0),yy(0),zz(0)
+ {
+ if(verbosity >1)
+ cout << "mmg3d v4 "<< endl;
+ args.SetNameParam(n_name_param,name_param,nargs);
+
+ const E_Array * a1=0 ;
+ if(nargs[1]) a1 = dynamic_cast<const E_Array *>(nargs[1]);
+
+ if(a1) {
+ if(a1->size() !=3)
+ CompileError("mmg3d(Th,displacement=[X,Y,Z],) ");
+ xx=to<double>( (*a1)[0]);
+ yy=to<double>( (*a1)[1]);
+ zz=to<double>( (*a1)[2]);
+ }
+ else if ( nargs[1] )
+ CompileError("mmg3d(Th,displacement=[X,Y,Z], .... ) ");
+ }
+
+ AnyType operator()(Stack stack) const ;
+};
+
+
+basicAC_F0::name_and_type mmg3d_Op::name_param[]= {
+ { "metric", &typeid(KN<double> *)}, // 0
+ { "displacement", &typeid(E_Array)}, // 1
+ { "displVect", &typeid(KN_<double>)}, // 2
+ { "opt", &typeid(string*)}, // 3
+ { "Mb",&typeid(long)} // 4
+};
+
+class mmg3d_ff : public OneOperator { public:
+ mmg3d_ff() : OneOperator( atype<pmesh3>(), atype<pmesh3>() ) {}
+
+ E_F0 * code(const basicAC_F0 & args) const
+ {
+ return new mmg3d_Op( args,t[0]->CastTo(args[0]) );
+ }
+};
+
+AnyType mmg3d_Op::operator()(Stack stack) const
+{
+ // initialisation
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ Mesh3 * pTh= GetAny<Mesh3 *>((*eTh)(stack));
+ ffassert( pTh );
+ Mesh3 &Th3=*pTh;
+ string sarg= arg(3,stack,"");
+ DataFF dff;
+ dff.memory= arg(4,stack,128L); // 128 Mb .. ????
+ ffassert( dff.memory < 2048 );// 2 GiGa bytes limite of integer ..
+ dff.typesol=0;
+ dff.np=pTh->nv;
+ dff.mesh=pTh;
+ dff.meshname="Th";
+ dff.imprim=verbosity;
+ dff.sol=0;
+ dff.mov=0;
+ dff.set_mesh =set_mesh;
+ dff.end_mesh =end_mesh;
+ dff.set_v = set_v;
+ dff.set_elmt = set_elmt;
+ dff.get_mesh = get_mesh;
+ dff.get_v3 = get_v3;
+ dff.get_elmt= get_elmt;
+
+ KN<double> *pmetric=0;
+
+ if( nargs[0] ){
+ pmetric = GetAny< KN<double> *>( (*nargs[0])(stack) );
+ ffassert(pmetric) ;
+ }
+
+ KN<double> cmetric;
+ if(pmetric)
+ {
+ int m=pmetric->N();
+ if( m == Th3.nv*6) //
+ {
+ cmetric = (*pmetric);
+ dff.typesol=6;
+ dff.np = Th3.nv;
+ for(int i=0;i <m; i += 6)
+ std::swap(cmetric[i+2],cmetric[i+3]);
+ dff.sol= &cmetric[0];
+ dff.solname="metrix-aniso";
+ }
+ else if ( m == Th3.nv)
+ {
+ dff.typesol = 1;
+ dff.np = Th3.nv;
+ dff.sol = &(*pmetric)[0];
+ dff.solname="metrix-iso";
+ }
+ else
+ ExecError(" mmg3d v4: incompatibility metric array mesh ");
+ }
+
+
+
+
+ bool BoolMoving=0;
+ KN<double> Moving(0);
+
+ if( nargs[1] || nargs[2] ){
+ BoolMoving=1;
+ if( nargs[2] ){
+ Moving = GetAny<double>( (*nargs[2])(stack) );
+ assert( Moving.N() == 3*Th3.nv );
+ dff.movename="move";
+ dff.mov = Moving;
+ if( Moving.N() != 3*Th3.nv ){ cerr << " Displacement vector is of size 3*Th.nv" << endl;
+ ExecError(" mmg3d v4");}
+ }
+ else{
+ MeshPoint *mp3(MeshPointStack(stack));
+ Moving.resize(3*Th3.nv);
+ for( int i=0; i<Th3.nv; ++i){
+ mp3->set( Th3.vertices[i].x, Th3.vertices[i].y, Th3.vertices[i].z );
+ if(xx) Moving[3*i] = GetAny<double>((*xx)(stack));
+ if(yy) Moving[3*i+1] = GetAny<double>((*yy)(stack));
+ if(zz) Moving[3*i+2] = GetAny<double>((*zz)(stack));
+ }
+ dff.mov = Moving;
+ dff.movename="move";
+ }
+ //if(verbosity > 2)
+ if(verbosity >2) cout << "displacement vector is loading" << endl;
+ }
+
+ int argc=1;
+ char * argv[1000];
+ char ff[10]="ff++";
+ KN<char> args(sarg.size()+1);
+ argv[0] = ff;
+ argv[1] = & args[0];
+ strcpy(args, sarg.c_str());
+ //cout << sarg << " == " << &args[0] << endl;
+ char cc='\0';
+ for(int i=0;i<args.N();cc=args[i++])
+ {
+ if (isspace(args[i]) && cc!='\\' ) cc=args[i]='\0';
+ else if ( !cc ) argv[argc++]=& args[i];
+ ffassert(argc<1000);
+ }
+
+ // for(int i=0;i< argc; ++i)
+// cout << " *** arg " << i << " " << argv[i] << endl;
+
+ int res= mainmmg3d(argc,argv,&dff);
+ Mesh3 * pTh3 = (Mesh3 *) dff.mesh;
+ if( res > 0){
+ dff.mesh=0;
+ cout << " problem of remeshing with mmg3d :: error" << res << endl;
+ }
+
+ if(! pTh3 ){
+ cout << " problem of remeshing with mmg3d v 4 (no mesh) :: error" << res << endl;
+ ExecError(" Error mmg3d" );}
+ else {
+ // end build of TH3...
+ if(verbosity > 10) cout << "buildGtree" << endl;
+ pTh3->BuildGTree();
+ }
+
+ *mp=mps;
+ Add2StackOfPtr2FreeRC(stack,pTh3);
+ return pTh3;
+}
+
+
++<<<<<<< HEAD
+/* class Init1 { public:
+ Init1();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++class Init1 { public:
++ Init1();
++};
++
++LOADINIT(Init1) // une variable globale qui serat construite au chargement dynamique
++
++Init1::Init1(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ //if (verbosity)
+ if(verbosity) cout << " load: mmg3d " << endl;
+
+ Global.Add("mmg3d","(",new mmg3d_ff);
+
+}
+
+
+#define WITH_NO_INIT
+#include "msh3.hpp"
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/msh3.cpp
index 0f01897,823f22c..6e23bb5
--- a/examples++-load/msh3.cpp
+++ b/examples++-load/msh3.cpp
@@@ -250,11 -250,11 +250,11 @@@ void TestSameTriangleMesh3( const Mesh
}
int TestElementMesh3( const Mesh3 & Th3 )
--// Test si le maillage � des �l�ments communs : Sommet, triangle, ...
++// Test si le maillage � des �l�ments communs : Sommet, triangle, ...
{
// FH 31/09/2009: Change int* to KN<int> to remove pb of missing free in some case
-- R3 Pinf(1e100,1e100,1e100),Psup(-1e100,-1e100,-1e100); // Extremit� de la bo�te englobante
-- double hmin=1e10; // longueur minimal des arr�tes
++ R3 Pinf(1e100,1e100,1e100),Psup(-1e100,-1e100,-1e100); // Extremit� de la bo�te englobante
++ double hmin=1e10; // longueur minimal des arr�tes
double hseuil;
KN<int> Numero_Som(Th3.nv);
int nv_t,nt_t,nbe_t;
@@@ -267,7 -267,7 +267,7 @@@
}
-- // calcul de la longueur minimal des arr�tes
++ // calcul de la longueur minimal des arr�tes
for (int k=0;k<Th3.nt;k++){
for (int e=0;e<6;e++){
if( Th3[k].lenEdge(e) < Norme2(Psup-Pinf)/1e9 )
@@@ -408,10 -408,10 +408,10 @@@
Mesh3 *TestElementMesh3_patch( const Mesh3 & Th3 )
--// Test si le maillage � des �l�ments communs : Sommet, triangle, ...
++// Test si le maillage � des �l�ments communs : Sommet, triangle, ...
{
-- R3 Pinf(1e100,1e100,1e100),Psup(-1e100,-1e100,-1e100); // Extremit� de la bo�te englobante
-- double hmin=1e10; // longueur minimal des arr�tes
++ R3 Pinf(1e100,1e100,1e100),Psup(-1e100,-1e100,-1e100); // Extremit� de la bo�te englobante
++ double hmin=1e10; // longueur minimal des arr�tes
double hseuil;
int *Numero_Som = new int [Th3.nv];
int nv_t,nt_t,nbe_t;
@@@ -423,7 -423,7 +423,7 @@@
Psup=Maxc(P,Psup);
}
-- // calcul de la longueur minimal des arr�tes
++ // calcul de la longueur minimal des arr�tes
for (int k=0;k<Th3.nt;k++){
for (int e=0;e<6;e++){
if( Th3[k].lenEdge(e) < Norme2(Psup-Pinf)/1e9 ) continue;
@@@ -923,7 -923,7 +923,7 @@@ void Som3D_mesh_product_Version_Sommet_
}
-- tab_NumSommet[ii] = NumSommet; // Numero du premier sommet 3D associ� au sommet 2D ii.
++ tab_NumSommet[ii] = NumSommet; // Numero du premier sommet 3D associ� au sommet 2D ii.
//cout << "ii, tab_NumSommet[ii]= "<< ii <<" "<< tab_NumSommet[ii] << endl;
for(int j=0; j <= Ni; j++){ //changer
@@@ -970,7 -970,7 +970,7 @@@
Th3.vertices[ tab_NumSommet[ ib[kk] ] + tab_Ni[ib[kk]] ].lab = imap2->second;
-- // label c�t�
++ // label c�t�
map<int,int>:: const_iterator imap3;
imap3=mapemil.find ( K.lab );
assert( imap3!=mapemil.end() );
@@@ -994,7 -994,7 +994,7 @@@
ElemBord = 0;
-- // bord d�finies en zmax
++ // bord d�finies en zmax
for(int ii=0; ii < Th2.nt; ii++){
int ijj[3];
@@@ -1548,7 -1548,7 +1548,7 @@@
}
}
-- // Au final : les sommers des tetraedres et la conectivit� des tetraedres finaux
++ // Au final : les sommers des tetraedres et la conectivit� des tetraedres finaux
assert(NumElement <= Th3.nt);
}
@@@ -1557,7 -1557,7 +1557,7 @@@
void dpent1_mesh(int idl[3],int nu[12],int &nbe,int &option){
// intent(inout) :: idl
// intent(out) :: nu,nbe,option
-- // option ne sert � rien
++ // option ne sert � rien
//* version simplifie pour le mailleur par couche 2D 3D
//-----------------------------------------------------------------------
// subroutine dpent1 (idl,nu,nbe,option)
@@@ -2517,7 -2517,7 +2517,7 @@@ AnyType Movemesh2D_3D_surf_Op::operator
int border_only = 0;
int recollement_border=1, point_confondus_ok=0;
-- // faire version de Transfo_Mesh2_tetgen pour ce cas pr�cis.
++ // faire version de Transfo_Mesh2_tetgen pour ce cas pr�cis.
Mesh3 *Th3= MoveMesh2_func( precis_mesh, Th, txx, tyy, tzz,
border_only, recollement_border, point_confondus_ok);
@@@ -3898,7 -3898,7 +3898,7 @@@ void PointCommun_hcode( const int &dim
Numero_Som[ii] = -1;
}
-- /* Resolution probleme dans le cas o� le maillage se colle */
++ /* Resolution probleme dans le cas o� le maillage se colle */
/* maintenant determinations des points confondus et numerotation*/
@@@ -4399,7 -4399,7 +4399,7 @@@ AnyType BuildLayeMesh_Op::operator()(St
// cas maillage volumique + surfacique
Mesh3 *Th3= build_layer(Th, nlayer, ni, zmin, zmax, maptet, maptrimil, maptrizmax, maptrizmin, mapemil, mapezmax, mapezmin);
-- // cas maillage surfacique simplement // A construire Jacques + donner le numero des edges que l'on veut pas creer � l'int�rieure
++ // cas maillage surfacique simplement // A construire Jacques + donner le numero des edges que l'on veut pas creer � l'int�rieure
if( !(xx) && !(yy) && !(zz) )
@@@ -4687,7 -4687,7 +4687,7 @@@ void GetManifolds( Expression mani, in
if( verbosity>1)
cout << " the number of manifold " << n << endl;
-- nbcmanifold = n; // nombre de manifold d�finis
++ nbcmanifold = n; // nombre de manifold d�finis
//manifold = new Expression[n];
mani_nbe = new int[n];
@@@ -5468,7 -5468,7 +5468,7 @@@ AnyType ExtractMesh2D_Op::operator()(St
if( boolsurf==1 && boolelement==0 ){
// case only surface mesh
-- // demander � F. pour la pertinence
++ // demander � F. pour la pertinence
KN<int> takevertex(Th.nv,-1);
KN<int> takebe(Th.neb,0);
int nbeLab=0;
@@@ -5538,7 -5538,7 +5538,7 @@@
//
//
///////////////////////////////////////////////////////////
--// recuperer une partie du maillage � l'aide des labels
++// recuperer une partie du maillage � l'aide des labels
class ExtractMesh_Op : public E_F0mps
{
diff --cc examples++-load/msh3.cpp.orig
index 0f01897,823f22c..ddf56e5
--- a/examples++-load/msh3.cpp.orig
+++ b/examples++-load/msh3.cpp.orig
@@@ -5832,9 -5832,13 +5832,19 @@@ bool AddLayers(Mesh3 * const & pTh, KN<
// because i include this file in tetgen.cpp (very bad)
#ifndef WITH_NO_INIT
++<<<<<<< HEAD
+
+static void Load_Init()
+{
++=======
+ class Init { public:
+ Init();
+ };
+
+ LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
+
+ Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
Dcl_Type<listMesh3>();
typedef Mesh *pmesh;
@@@ -5867,9 -5871,20 +5877,29 @@@
Global.Add("extract","(",new ExtractMesh2D);
Global.Add("AddLayers","(",new OneOperator4_<bool, Mesh3 * , KN<double> *,long, KN<double> * >(AddLayers));
++<<<<<<< HEAD
+ typedef Mesh3 *pmesh3;
+ // Global.Add("trunc","(", new Op_trunc_mesh3);
+}
+LOADFUNC(Load_Init)
+#endif
+
++=======
+
+ }
+ /*
+ class Init { public:
+ Init();
+ };
+
+ LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
+
+ Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
+
+ typedef Mesh3 *pmesh3;
+ Global.Add("trunc","(", new Op_trunc_mesh3);
+
+ }
+ */
+ #endif
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/mshmet.cpp.orig
index d147e62,0000000..8af4723
mode 100644,000000..100644
--- a/examples++-load/mshmet.cpp.orig
+++ b/examples++-load/mshmet.cpp.orig
@@@ -1,757 -1,0 +1,770 @@@
+// ORIG-DATE: Fev 2010
+// -*- Mode : c++ -*-
+//
+// SUMMARY : liaison medit freefem++ : adaptmesh in 3d
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// E-MAIL : jacques.morice at ann.jussieu.fr
+//
+// for automatic compilation with ff-c++
+//ff-c++-LIBRARY-dep: mshmet libMesh
+//ff-c++-cpp-dep:
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+
+// ./ff-c++ mshmet.cpp -I/Users/morice/Desktop/adaptmesh3d/mshmet.2009.09.16/sources -L/Users/morice/Desktop/adaptmesh3d/mshmet.2009.09.16/objects/i386/ -lmshmet -L/Users/morice/work/postdoc/freefem++prod/src/libMesh/ -lMesh
+
+// ./ff-c++ mshmet.cpp -I../download/include/mshmet/ -L../download/lib/mshmet/ -lmshmet -L/Users/morice/work/postdoc/freefem++prod/src/libMesh/ -lMesh
+
+#include "ff++.hpp"
+#include "msh3.hpp"
+//#define ADAPTLIBRARY
+//#include "libmesh5.h"
+#include "mshmetlib.h"
+
+using namespace Fem2D;
+using namespace mshmet;
+
+// 2d mesh function
+// Add FH thank to I. Bajc. (iztok.bajc at fmf.uni-lj.si) 03/14
+//
+static void myMSHMET_free( MSHMET_pMesh mesh, MSHMET_pSol sol)
+{
+ /* free mem */
+ free(mesh->point);
+ if ( mesh->nt ) free(mesh->tria);
+ if ( mesh->ne ) free(mesh->tetra);
+ free(mesh->adja);
+ free(mesh);
+ free(sol->sol);
+ free(sol->met);
+ free(sol);
+ }
+
+MSHMET_pMesh mesh_to_MSHMET_pMesh( const Mesh &Th ){
+ MSHMET_pMesh meshMSHMET;
+ meshMSHMET = (MSHMET_pMesh)calloc(1,sizeof(MSHMET_Mesh)) ;
+
+ meshMSHMET->dim = 2;
+ meshMSHMET->np = Th.nv;
+ meshMSHMET->nt = Th.nt;
+ meshMSHMET->ne = 0;
+
+ meshMSHMET->point = (MSHMET_pPoint)calloc(meshMSHMET->np+1,sizeof(MSHMET_Point));
+ meshMSHMET->tria = (MSHMET_pTria)calloc(meshMSHMET->nt+1,sizeof(MSHMET_Tria));
+ meshMSHMET->adja = (int*)calloc(3*meshMSHMET->nt+5,sizeof(int));
+
+ int k;
+ MSHMET_pPoint ppt;
+ for (k=1; k<=meshMSHMET->np; k++) {
+ ppt = &meshMSHMET->point[k];
+ ppt->c[0] = Th.vertices[k-1].x;
+ ppt->c[1] = Th.vertices[k-1].y;
+ ppt->c[2] = 0.;
+ //ppt->mark = Th.vertices[k-1].lab;
+ }
+
+
+ MSHMET_pTria ptriangle;
+ MSHMET_pPoint p0,p1,p2;
+ double ux,uy,h1,h2,h3,pe,rins;
+ int i;
+ for (k=1; k<=meshMSHMET->nt; k++) {
+ const Mesh::Triangle & K(Th.t(k-1));
+ ptriangle = &meshMSHMET->tria[k];
+ ptriangle->v[0] = Th.operator()(K[0])+1;
+ ptriangle->v[1] = Th.operator()(K[1])+1;
+ ptriangle->v[2] = Th.operator()(K[2])+1;
+ //ptriangle->mark = K.lab;
+
+ for (i=0; i<3; i++) {
+ ppt = &meshMSHMET->point[ptriangle->v[i]];
+ if ( !ppt->s ) ppt->s = k;
+ }
+ p0 = &meshMSHMET->point[ptriangle->v[0]];
+ p1 = &meshMSHMET->point[ptriangle->v[1]];
+ p2 = &meshMSHMET->point[ptriangle->v[2]];
+
+ ux = p1->c[0] - p0->c[0];
+ uy = p1->c[1] - p0->c[1];
+ h1 = sqrt(ux*ux + uy*uy);
+
+ ux = p2->c[0] - p0->c[0];
+ uy = p2->c[1] - p0->c[1];
+ h2 = sqrt(ux*ux + uy*uy);
+
+ ux = p2->c[0] - p1->c[0];
+ uy = p2->c[1] - p1->c[1];
+ h3 = sqrt(ux*ux + uy*uy);
+ /*
+ pe = 0.5 * (h1 + h2 + h3);
+ double aire = pe * (pe-h1) * (pe-h2) * (pe-h3);
+ //aire = sqrt(ptriangle->aire);
+ //rins = 2.0 * aire / pe;
+
+ //p0->aire += ptriangle->aire;
+ //p0->rins += rins;
+
+ //p1->aire += ptriangle->aire;
+ //p1->rins += rins;
+
+ //p2->aire += ptriangle->aire;
+ //p2->rins += rins;
+ */
+ }
+
+ return meshMSHMET;
+}
+
+
+// 3d mesh function
+
+MSHMET_pMesh mesh3_to_MSHMET_pMesh( const Mesh3 &Th3 ){
+ MSHMET_pMesh meshMSHMET;
+ meshMSHMET = (MSHMET_pMesh)calloc(1,sizeof(MSHMET_Mesh)) ;
+
+ meshMSHMET->dim = 3;
+ meshMSHMET->np = Th3.nv;
+ meshMSHMET->nt = 0;
+ meshMSHMET->ne = Th3.nt;
+
+ meshMSHMET->point = (MSHMET_pPoint)calloc(meshMSHMET->np+1,sizeof(MSHMET_Point));
+ meshMSHMET->tetra = (MSHMET_pTetra)calloc(meshMSHMET->ne+1,sizeof(MSHMET_Tetra));
+ meshMSHMET->adja = (int*)calloc(4*meshMSHMET->ne+5,sizeof(int));
+
+ int k;
+ MSHMET_pPoint ppt;
+ for (k=1; k<=meshMSHMET->np; k++) {
+ ppt = &meshMSHMET->point[k];
+ ppt->c[0] = Th3.vertices[k-1].x;
+ ppt->c[1] = Th3.vertices[k-1].y;
+ ppt->c[2] = Th3.vertices[k-1].z;
+ //ppt->mark = 0; //Th3.vertices[k-1].lab;
+ }
+
+
+
+ int i;
+ MSHMET_pTetra ptetra;
+ for (k=1; k<=meshMSHMET->ne; k++) {
+ const Tet & K(Th3.elements[k-1]);
+ ptetra = &meshMSHMET->tetra[k];
+ ptetra->v[0] = Th3.operator()(K[0])+1;
+ ptetra->v[1] = Th3.operator()(K[1])+1;
+ ptetra->v[2] = Th3.operator()(K[2])+1;
+ ptetra->v[3] = Th3.operator()(K[3])+1;
+ //ptetra->mark = 0;//K.lab;
+
+ for (i=0; i<4; i++) {
+ ppt = &meshMSHMET->point[ptetra->v[i]];
+ if ( meshMSHMET->dim == 3 && !ppt->s ) ppt->s = k;
+ }
+
+ }
+
+ return meshMSHMET;
+}
+
+
+
+MSHMET_pSol sol_mshmet(const int &dim, const int & np, const int &type, const int &size, int *typtab, const KN<double> &solutions){
+ static const int wrapperMetric[6]={0,1,3,2,4,5};
+ MSHMET_pSol sol;
+ int k,ia,i;
+
+ sol= (MSHMET_pSol)calloc(1,sizeof(MSHMET_Sol)) ;
+ sol->ver = 0;
+ sol->np = np;
+ sol->dim = dim;
+ sol->type = type; // nombre de solutions differentes
+ sol->size = size;
+ for(i=0; i<sol->type; i++)
+ sol->typtab[i] = typtab[i]; // types des differentes solutions
+
+ sol->sol = (double*) calloc(sol->np+1,sol->size*sizeof(double));
+ assert(sol->sol);
+
+ for (k=1; k<=sol->np; k++) {
+ ia = (k-1)*sol->size + 1;
+ for (i=0; i<sol->size; i++){
+ sol->sol[ia+i] = solutions[(ia-1)+i];
+ }
+ }
+
+ return sol;
+}
+
+void metric_mshmet( MSHMET_pSol sol, MSHMET_Info *info, const KN<double> &metric){
+ static const int wrapperMetric[6]={0,1,3,2,4,5};
+ int k,ia,i;
+
+ cout << " info->iso " << info->iso << endl;
+ if( info->iso == 1 ){
+ cout << " info->iso 11 " << info->iso << endl;
+ sol->met = (double*)calloc(sol->np+1,sizeof(double));
+ assert(sol->met);
+ // isotrope
+ for (k=1; k<=sol->np; k++) {
+ sol->met[k] = metric[ k-1 ];
+ }
+ }
+ else{
+ // anisotropie :: Hessian
+ sol->met = (double*)calloc(sol->np+1,6*sizeof(double));
+ assert(sol->met);
+
+ for (k=1; k<=sol->np; k++) {
+ ia = (k-1)*6 + 1;
+ for (i=0; i<6; i++){
+ sol->met[ia+i] = metric[ (ia-1)+wrapperMetric[i] ];
+ }
+ }
+ }
+
+}
+
+
+void metric_mshmet_to_ff_metric(MSHMET_pSol sol, MSHMET_Info *info, KN<double> &metric){
+ static const int invwrapperMetric[6]={0,1,3,2,4,5};
+ int k,ia,i;
+ if( info->iso == 1 ){
+ cout << " info->iso " << " metric "<< metric.N() <<" " << sol->np << endl;
+ // isotrope
+ for (k=1; k<=sol->np; k++) {
+ metric[ k-1 ] = sol->met[k];
+ //cout << "k " << k << " " << sol->met[k] << endl;
+ }
+ }
+ else{
+ for (k=1; k<=sol->np; k++) {
+ ia = (k-1)*6 + 1;
+ for (i=0; i< 6; i++)
+ metric[(ia-1)+i]= sol->met[ia + invwrapperMetric[i]];
+ }
+ }
+}
+
+
+class mshmet3d_Op: public E_F0mps
+{
+public:
+ typedef KN_<double> Result;
+ Expression eTh;
+ int nbsol;
+ int nbsolsize;
+ int typesol[GmfMaxTyp];
+ int dim;
+ vector<Expression> sol;
+
+ static const int n_name_param = 12; //
+ static basicAC_F0::name_and_type name_param[] ;
+ Expression nargs[n_name_param];
+
+ KN_<long> arg(int i,Stack stack,KN_<long> a ) const
+ { return nargs[i] ? GetAny<KN_<long> >( (*nargs[i])(stack) ): a;}
+ KN_<double> arg(int i,Stack stack,KN_<double> a ) const
+ { return nargs[i] ? GetAny<KN_<double> >( (*nargs[i])(stack) ): a;}
+ double arg(int i,Stack stack,double a ) const{ return nargs[i] ? GetAny< double >( (*nargs[i])(stack) ): a;}
+ int arg(int i,Stack stack, int a ) const{ return nargs[i] ? GetAny< long >( (*nargs[i])(stack) ): a;}
+ int arg(int i,Stack stack, bool a ) const{ return nargs[i] ? GetAny< bool >( (*nargs[i])(stack) ): a;}
+
+
+public:
+ mshmet3d_Op(const basicAC_F0 & args) : sol( args.size()-1 )
+ {
+
+ //cout << "mshmet3d"<< endl;
+ args.SetNameParam(n_name_param,name_param,nargs);
+ eTh=to<pmesh3>(args[0]);
+ dim=3;
+ nbsol = args.size()-1;
+ int ksol=0;
+ ffassert(nbsol<GmfMaxTyp);
+
+ for (int i=1;i<nbsol+1;i++)
+ if (args[i].left()==atype<E_Array>())
+ {
+ const E_Array * a = dynamic_cast<const E_Array *>(args[i].LeftValue());
+ ffassert(a);
+ ksol+=a->size();
+ }
+ else
+ ksol++;
+ sol.resize(ksol);
+
+ // typesol :: 1 sca, 2 vector, 3 symtensor
+
+ ksol=0;
+ nbsolsize=0;
+ for (int i=1;i<nbsol+1;i++)
+ if (args[i].left()==atype<E_Array>())
+ {
+ const E_Array * a = dynamic_cast<const E_Array *>(args[i].LeftValue());
+ ffassert(a);
+ int N=a->size();
+ nbsolsize=nbsolsize+N;
+ switch (N){
+
+ case 3 :
+ typesol[i-1]=2;
+ for (int j=0;j<N;j++)
+ sol[ksol++]=to<double>((*a)[j]);
+ break;
+ case 6 :
+ typesol[i-1]=3;
+ for (int j=0;j<N;j++)
+ sol[ksol++]=to<double>((*a)[j]);
+ break;
+ default :
+ CompileError(" 3D solution for mshmest is vector (3 comp) or symetric tensor (6 comp)");
+ break;
+ }
+ }
+ else
+ {
+ typesol[i-1]=1;
+ nbsolsize=nbsolsize+1;
+ sol[ksol++]=to<double>(args[i]);
+ }
+ }
+
+ static ArrayOfaType typeargs() { return ArrayOfaType( atype< pmesh3 >(), true); }// all type
+ static E_F0 * f(const basicAC_F0 & args) { return new mshmet3d_Op(args);}
+ AnyType operator()(Stack stack) const ;
+ operator aType () const { return atype< KN_<double> >();}
+};
+
+
+basicAC_F0::name_and_type mshmet3d_Op::name_param[]= {
+ { "loptions", &typeid(KN_<long>)}, //0
+ { "doptions", &typeid(KN_<double>)},
+ { "metric", &typeid(KN_<double>)},
+ { "normalization", &typeid(bool)},
+ { "aniso", &typeid(bool)},
+ { "levelset", &typeid(bool)},// 5
+ { "verbosity", &typeid(long)},
+ { "nbregul", &typeid(long)},
+ { "hmin", &typeid(double)},
+ { "hmax", &typeid(double)},//9
+ { "err", &typeid(double)},//10
+ { "width", &typeid(double)}//11
+
+};
+
+template<class T>
+ostream & dumpp(const T * p,int n,ostream & f)
+{
+ for(int i=0;i<n;++i)
+ f << p[i] << " ";
+ return f;
+}
+
+AnyType mshmet3d_Op::operator()(Stack stack) const
+{
+ // initialisation
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ Mesh3 * pTh= GetAny<Mesh3 *>((*eTh)(stack));
+ ffassert( pTh );
+ Mesh3 &Th3=*pTh;
+ int nv=Th3.nv;
+ int nt=Th3.nt;
+ int nbe=Th3.nbe;
+
+
+ KN<double> defaultfopt(4);
+ /*
+ info->hmin = fopt[0]; // 0.01;
+ info->hmax = fopt[1]; // 1.0;
+ info->eps = fopt[2]; // 0.01;
+ info->width = fopt[3]; // 0.05;
+ */
+ defaultfopt(0)= 0.01;
+ defaultfopt(1)= 1.0;
+ defaultfopt(2)= 0.01;
+ defaultfopt(3)= 0.00;
+ KN<long> defaultintopt(7);
+ /*
+ info->nnu = intopt[0]; // 0;
+ info->iso = intopt[1]; // 1;
+ info->ls = intopt[2]; // 0;
+ info->ddebug = intopt[3]; // 0;
+ info->imprim = intopt[4]; // 10;
+ info->nlis = intopt[5]; // 0;
+ info->metric = intopt[6]; // 0; // metric given besoin ???
+ */
+ defaultintopt(0)= 1;
+ defaultintopt(1)= 1;
+ defaultintopt(2)= 0;
+ defaultintopt(3)= 0;
+ defaultintopt(4)= verbosity;
+ defaultintopt(5)= 0;
+ defaultintopt(6)= 0;
+ if(nargs[11]) {defaultintopt[2]=1;defaultfopt[3]=0;}// level set ...
+ KN<int> intopt(arg(0,stack,defaultintopt));
+ KN<double> fopt(arg(1,stack,defaultfopt));
+ KN<double> *pmetric=new KN<double>(Th3.nv);
+ KN<double> &metric=*pmetric;
+
+
+ intopt[0]=arg(3,stack, intopt[0]!=0);// normaliz
+ intopt[1]=!arg(4,stack,intopt[1]==0);// aniso
+ intopt[2]=arg(5,stack,intopt[2]!=0);// levelset
+ intopt[4]=arg(6,stack,intopt[4]); // verbo
+ intopt[5]=arg(7,stack,intopt[5]); // nbregul
+ fopt[0]=arg(8,stack,fopt[0]); //hmin
+ fopt[1]=arg(9,stack,fopt[1]); //hmax
+ fopt[2]=arg(10,stack,fopt[2]);// err
+ fopt[3]=arg(11,stack,fopt[3]);// width
+
+
+ if(verbosity>2)
+ {
+ cout<< " -- mshmet : lopt " ; dumpp((int*) intopt,intopt.N(),cout) <<endl;
+ cout<< " : dopt " ; dumpp((double*)fopt,fopt.N(),cout) <<endl;
+ }
+
+ metric=0.;
+ if(intopt.N() != 7 )
+ ExecError(" Size of array of loption are wrong != 7");
+ if(fopt.N() != 4 )
+ ExecError(" Size of array of doption are wrong != 4");
+
+
+ if( intopt[1]==0){
+ metric.resize(6*Th3.nv);
+ metric=0.;
+ }
+
+ // definiton d'une metric par default
+ if( nargs[2] ){
+ metric = GetAny<KN_<double> >( (*nargs[2])(stack) );
+ assert(metric.N()==Th3.nv || metric.N()==6*Th3.nv);
+ intopt[6]=1;
+ if(metric.N()==Th3.nv) intopt[1]=1;
+ if(metric.N()==6*Th3.nv) intopt[1]=0;
+ }
+
+
+ MSHMET_pMesh mshmetmesh = mesh3_to_MSHMET_pMesh( Th3 );
+ int TypTab[nbsol];
+ for(int ii=0; ii<nbsol;ii++)
+ TypTab[ii] = typesol[ii];
+
+
+ KN<double> tabsol(nbsolsize*nv);
+ tabsol=0.;
+ {
+ MeshPoint *mp3(MeshPointStack(stack));
+
+ KN<bool> takemesh(nv);
+ takemesh=false;
+ for(int it=0;it<nt;it++){
+ for(int iv=0;iv<4;iv++){
+ int i=Th3(it,iv);
+
+ if(takemesh[i]==false){
+ mp3->setP(&Th3,it,iv);
+
+ for(int ii=0;ii<nbsolsize;ii++){
+ tabsol[i*nbsolsize+ii] = GetAny< double >( (*sol[ii])(stack) );
+ }
+ takemesh[i] = true;
+ }
+ }
+ }
+ }
+ if(verbosity>5)
+ cout << " min/max tabsol: " << tabsol.min() << " " <<tabsol.max() << endl;
+ MSHMET_pSol mshmetsol = sol_mshmet(dim, nv, nbsol, nbsolsize, TypTab, tabsol);
+ if( intopt[1] == 1)
+ mshmetmesh->info.iso = 1;
+ else
+ mshmetmesh->info.iso = 0;
+ if( nargs[2] ) metric_mshmet( mshmetsol, &mshmetmesh->info, metric);
+
+ int res = MSHMET_mshmet(intopt, fopt, mshmetmesh, mshmetsol);
+
+ if( res > 0){
+ cout << " problem with mshmet :: error " << res << endl;
+ exit(1);
+ }
+
+ metric_mshmet_to_ff_metric( mshmetsol, &mshmetmesh->info, metric);
+
+ // faire les free
+
+ myMSHMET_free( mshmetmesh, mshmetsol);
+
+ Add2StackOfPtr2Free(stack,pmetric);
+ *mp=mps;
+ return SetAny< KN<double> >(metric);
+}
+
+
+
+
+// mshmet2d
+class mshmet2d_Op: public E_F0mps
+{
+public:
+ typedef KN_<double> Result;
+ Expression eTh;
+ int nbsol;
+ int nbsolsize;
+ int typesol[GmfMaxTyp];
+ int dim;
+ vector<Expression> sol;
+
+ static const int n_name_param = 12; //
+ static basicAC_F0::name_and_type name_param[] ;
+ Expression nargs[n_name_param];
+
+ KN_<long> arg(int i,Stack stack,KN_<long> a ) const
+ { return nargs[i] ? GetAny<KN_<long> >( (*nargs[i])(stack) ): a;}
+ KN_<double> arg(int i,Stack stack,KN_<double> a ) const
+ { return nargs[i] ? GetAny<KN_<double> >( (*nargs[i])(stack) ): a;}
+ double arg(int i,Stack stack,double a ) const{ return nargs[i] ? GetAny< double >( (*nargs[i])(stack) ): a;}
+ long arg(int i,Stack stack, long a ) const{ return nargs[i] ? GetAny< long >( (*nargs[i])(stack) ): a;}
+
+
+public:
+ mshmet2d_Op(const basicAC_F0 & args) : sol( args.size()-1 )
+ {
+
+ cout << "mshmet2d"<< endl;
+ args.SetNameParam(n_name_param,name_param,nargs);
+ eTh=to<pmesh>(args[0]);
+ dim=3;
+ nbsol = args.size()-1;
+ int ksol=0;
+ ffassert(nbsol<GmfMaxTyp);
+
+ for (int i=1;i<nbsol+1;i++)
+ if (args[i].left()==atype<E_Array>())
+ {
+ const E_Array * a = dynamic_cast<const E_Array *>(args[i].LeftValue());
+ ffassert(a);
+ ksol+=a->size();
+ }
+ else
+ ksol++;
+ sol.resize(ksol);
+
+ // typesol :: 1 sca, 2 vector, 3 symtensor
+
+ ksol=0;
+ nbsolsize=0;
+ for (int i=1;i<nbsol+1;i++)
+ if (args[i].left()==atype<E_Array>())
+ {
+ const E_Array * a = dynamic_cast<const E_Array *>(args[i].LeftValue());
+ ffassert(a);
+ int N=a->size();
+ nbsolsize=nbsolsize+N;
+ switch (N){
+ case 2 :
+ typesol[i-1]=2;
+ for (int j=0;j<N;j++)
+ sol[ksol++]=to<double>((*a)[j]);
+ break;
+ case 3 :
+ typesol[i-1]=3;
+ for (int j=0;j<N;j++)
+ sol[ksol++]=to<double>((*a)[j]);
+ break;
+ default :
+ CompileError(" 2D solution for mshmest is vector (2 comp) or symetric tensor (3 comp)");
+ break;
+ }
+ }
+ else
+ {
+ typesol[i-1]=1;
+ nbsolsize=nbsolsize+1;
+ sol[ksol++]=to<double>(args[i]);
+ }
+ }
+
+ static ArrayOfaType typeargs() { return ArrayOfaType( atype< pmesh >(), true); }// all type
+ static E_F0 * f(const basicAC_F0 & args) { return new mshmet2d_Op(args);}
+ AnyType operator()(Stack stack) const ;
+ operator aType () const { return atype< KN_<double> >();}
+};
+
+
+basicAC_F0::name_and_type mshmet2d_Op::name_param[]= {
+ { "loptions", &typeid(KN_<long>)},
+ { "doptions", &typeid(KN_<double>)},
+ { "metric", &typeid(KN_<double>)}
+};
+
+AnyType mshmet2d_Op::operator()(Stack stack) const
+{
+ // initialisation
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ Mesh * pTh= GetAny<Mesh *>((*eTh)(stack));
+ ffassert( pTh );
+ Mesh &Th=*pTh;
+ int nv=Th.nv;
+ int nt=Th.nt;
+ int nbe=Th.neb;
+
+
+ KN<double> defaultfopt(4);
+ /*
+ info->hmin = fopt[0]; // 0.01;
+ info->hmax = fopt[1]; // 1.0;
+ info->eps = fopt[2]; // 0.01;
+ info->width = fopt[3]; // 0.05;
+ */
+ defaultfopt(0)= 0.01;
+ defaultfopt(1)= 1.0;
+ defaultfopt(2)= 0.01;
+ defaultfopt(3)= 0.05;
+ KN<long> defaultintopt(7);
+ /*
+ info->nnu = intopt[0]; // 0;
+ info->iso = intopt[1]; // 1;
+ info->ls = intopt[2]; // 0;
+ info->ddebug = intopt[3]; // 0;
+ info->imprim = intopt[4]; // 10;
+ info->nlis = intopt[5]; // 0;
+ info->metric = intopt[6]; // 0; // metric given besoin ???
+ */
+ defaultintopt(0)= 0;
+ defaultintopt(1)= 1;
+ defaultintopt(2)= 0;
+ defaultintopt(3)= 1;
+ defaultintopt(4)= 10;
+ defaultintopt(5)= 0;
+ defaultintopt(6)= 0;
+
+ KN<int> intopt(arg(0,stack,defaultintopt));
+ KN<double> fopt(arg(1,stack,defaultfopt));
+
+ KN<double> *pmetric = new KN<double>(Th.nv);
+ KN<double> &metric = *pmetric;
+
+ if( intopt[1]== 1){
+ metric.resize(6*Th.nv);
+ metric=0.;
+ }
+
+ // definiton d'une metric par default
+ if( nargs[2] ){
+ metric = GetAny<KN_<double> >( (*nargs[2])(stack) );
+ assert(metric.N()==Th.nv || metric.N()==6*Th.nv);
+ intopt[6]=1;
+ if(metric.N()==Th.nv) intopt[1]=1;
+ if(metric.N()==6*Th.nv) intopt[1]=0;
+ }
+
+
+ MSHMET_pMesh mshmetmesh = mesh_to_MSHMET_pMesh( Th );
+ int TypTab[nbsol];
+ for(int ii=0; ii<nbsol;ii++)
+ TypTab[ii] = typesol[ii];
+
+ KN<double> tabsol(nbsolsize*nv);
+ tabsol=0.;
+ {
+ MeshPoint *mp3(MeshPointStack(stack));
+
+ KN<bool> takemesh(nv);
+ takemesh=false;
+ for(int it=0;it<nt;it++){
+ for(int iv=0;iv<3;iv++){
+ int i=Th(it,iv);
+
+ if(takemesh[i]==false){
+ mp3->setP(&Th,it,iv);
+
+ for(int ii=0;ii<nbsolsize;ii++){
+ tabsol[i*nbsolsize+ii] = GetAny< double >( (*sol[ii])(stack) );
+ }
+ takemesh[i] = true;
+ }
+ }
+ }
+ }
+ MSHMET_pSol mshmetsol = sol_mshmet(dim, nv, nbsol, nbsolsize, TypTab, tabsol);
+ if( intopt[1] == 1)
+ mshmetmesh->info.iso = 1;
+ else
+ mshmetmesh->info.iso = 0;
+ if( nargs[2] ) metric_mshmet( mshmetsol, &mshmetmesh->info, metric);
+
+ int res = MSHMET_mshmet(intopt, fopt, mshmetmesh, mshmetsol);
+
+ if( res > 0){
+ cout << " problem with mshmet :: error " << res << endl;
+ exit(1);
+ }
+
+ metric_mshmet_to_ff_metric( mshmetsol, &mshmetmesh->info, metric);
+
+ // faire les free
+ myMSHMET_free( mshmetmesh, mshmetsol);
+ *mp=mps;
+
+ Add2StackOfPtr2Free(stack,pmetric);
+ return SetAny< KN<double> >(metric);
+}
+
+
+
++<<<<<<< HEAD
+/* class Init1 { public:
+ Init1();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++class Init1 { public:
++ Init1();
++};
++
++LOADINIT(Init1) // une variable globale qui serat construite au chargement dynamique
++
++Init1::Init1(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ //if (verbosity)
+ if(verbosity) cout << " load: mshmet " << endl;
+
+ Global.Add("mshmet","(",new OneOperatorCode<mshmet2d_Op>);
+ Global.Add("mshmet","(",new OneOperatorCode<mshmet3d_Op>);
+ //Global.Add("mshmet","(",new OneOperatorCode<mshmet2d_Op> );
+
+}
+
+
+#define WITH_NO_INIT
+#include "msh3.hpp"
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/myfunction2.cpp.orig
index 091e61f,0000000..3b1a6c0
mode 100644,000000..100644
--- a/examples++-load/myfunction2.cpp.orig
+++ b/examples++-load/myfunction2.cpp.orig
@@@ -1,21 -1,0 +1,32 @@@
+// Example C++ function "myfunction", dynamically loaded into "load.edp"
+// ---------------------------------------------------------------------
+// $Id$
+#include <ff++.hpp>
+using namespace Fem2D;
+double myf(string * s) {
+ cout << *s << endl;
+ return 0.;
+}
+double f(const double& x) { return x*x+1;}
+// Hack to do something at initialisation time
+// to add the name myfunction to the freefem++ table
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+$1 */
+static void Load_Init(){
+ Global.Add("Why","(",new OneOperator1<double,string*>(myf));
+ Global.Add("f","(",new OneOperator1_<double,double>(f));
+}
+LOADFUNC(Load_Init)
++=======
++class Init { public:
++ Init();
++};
++LOADINIT(Init);
++Init::Init(){
++ Global.Add("Why","(",new OneOperator1<double,string*>(myf));
++ Global.Add("f","(",new OneOperator1_<double,double>(f));
++}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/pcm2rnm.cpp.orig
index 4b11afa,0000000..f33dca8
mode 100644,000000..100644
--- a/examples++-load/pcm2rnm.cpp.orig
+++ b/examples++-load/pcm2rnm.cpp.orig
@@@ -1,121 -1,0 +1,133 @@@
+// SUMMARY : add interface to read pcm or pmm bitmap imahe image
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : F. Hecht
+// E-MAIL : F. Hecht <hecht at ljll.math.upmc.fr>
+// date : 2008 ????
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ */
+// for auto dependance ...
+//ff-c++-cpp-dep:pcm.cpp
+
+// tools to read ppm file
+/* use in freefem++ edp
+ see :
+ real[int,int] ff1("tt.pmm"); // read image and set to an array.
+ real[int] ff(ff1.nx*ff1.ny);
+ ff=ff1;
+ */
+// tools to read ppm file
+/* use in freefem++ edp file:
+ -----------------------------
+ complex[int,int] cc(1,1);
+ readpcm("tt.pcm",cc); // read the flow image and set to un complex matrix array.
+ or
+ real[int,int] u(1,1),v(1,1);
+ readpcm("tt.pcm",u,v); // read the flow image and set to 2 real matrix array.
+*/
+#include "pcm.hpp"
+#include <iostream>
+#include <cfloat>
+
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+using namespace std;
+
+#include "RNM.hpp"
+#include <cmath>
+
+
+long read1(const long& ,const long&){
+ return 1;
+}
+
+
+KNM<Complex> * read_pcm(string * filename,KNM<Complex> * p)
+ {
+
+ PCM pcm(filename->c_str());
+ p->resize(pcm.width,pcm.height);
+ pcm_complex *pc=pcm.image;
+ for(int j=0;j<pcm.height;++j)
+ for(int i=0;i<pcm.width;++i,pc++)
+ (*p)(i,j)= Complex(pc->r,pc->i);
+
+
+ return p;
+ }
+long read_pcm(string * const &filename,KNM<double> * const &u,KNM<double> * const &v)
+{
+
+ PCM pcm(filename->c_str());
+ cout << " pcm " << filename->c_str() << " : " <<pcm.width << " x " << pcm.height << endl;
+ u->resize(pcm.width,pcm.height);
+ v->resize(pcm.width,pcm.height);
+ pcm_complex *pc;
+ float x1=-1e+30,x2=-1e+30;
+ for(int j=0;j<pcm.height;++j)
+ for(int i=0;i<pcm.width;++i)
+ {
+ pc = pcm.Get(i,j);
+ if(pc)
+ {
+
+
+ (*u)(i,j)= pc->r;
+ (*v)(i,j)= pc->i;
+
+ x1 = max(x1,pc->r);
+ x2 = max(x2,pc->i);
+ if(i<0 && j < 0)
+ cout << i << " " << j << " " << pc->r << " " << pc->i << endl;
+ }
+ }
+ cout << " max uv : " << x1 << " " << x2 << endl;
+ return pcm.width*pcm.height;
+}
+
++<<<<<<< HEAD
+ /* class Init { public:
+ Init();
+};
+
+$1 */
+static void Load_Init(){
++=======
++ class Init { public:
++ Init();
++};
++
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ cout << " load: init pcm2rmn " << endl;
+
+
+ Global.Add("readpcm", "(",
+ new OneOperator2<KNM<Complex> *,string*,KNM<Complex> * >(&read_pcm),
+ new OneOperator3_<long,string*,KNM<double> *,KNM<double> * >(&read_pcm)
+ );
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/ppm2rnm.cpp.orig
index df35cf9,0000000..76e68de
mode 100644,000000..100644
--- a/examples++-load/ppm2rnm.cpp.orig
+++ b/examples++-load/ppm2rnm.cpp.orig
@@@ -1,326 -1,0 +1,338 @@@
+// tools to read ppm file
+/* use in freefem++ edp
+ see :
+ real[int,int] ff1("tt.pmm"); // read image and set to an array.
+ real[int] ff(ff1.nx*ff1.ny);
+ ff=ff1;
+ */
+#include <iostream>
+#include <cfloat>
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+using namespace std;
+
+#include "RNM.hpp"
+#include <cmath>
+typedef KNM<double> * pRnm;
+typedef KN<double> * pRn;
+typedef string * pstring;
+#include "ppmimg.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+ PPMimage *loadPPM(const char *imgname,ubyte *type,ubyte quiet) {
+ pPPMimage result;
+ FILE *fp;
+ int i,k,typimg,ret,r,g,b,s,maxval,bitsize;
+ const char *ptr;
+ char c,buff[1024],data[256];
+
+ /* search for image */
+ fprintf(stdout," Loading image: %s\n",imgname);
+ ptr = strstr(imgname,".ppm");
+ strcpy(data,imgname);
+ if ( !ptr ) {
+ ptr = strstr(imgname,".pgm");
+ if ( !ptr ) strcat(data,".ppm");
+ fp = fopen(data,"rb");
+ }
+ else
+ fp = fopen(data,"rb");
+ if ( !fp ) {
+ fprintf(stderr," ## UNABLE TO OPEN FILE %s.\n",data);
+ return(0);
+ }
+ if ( !quiet )
+ fprintf(stdout," opening %s\n",data);
+
+ if ( !fgets(buff,sizeof(buff),fp) ) {
+ fprintf(stderr," ## INVALID HEADER.\n");
+ return(0);
+ }
+
+ /* check header file */
+ if ( buff[0] != 'P' ) {
+ fprintf(stderr," ## INVALID IMAGE FORMAT (MUST BE 'PX').\n");
+ return(0);
+ }
+
+ switch(buff[1]) {
+ case '2': typimg = P2; break;
+ case '3': typimg = P3; break;
+ case '4': typimg = P4; break;
+ case '5': typimg = P5; break;
+ case '6': typimg = P6; break;
+ default:
+ fprintf(stderr," ## INVALID IMAGE FORMAT (MUST BE 'PX').\n");
+ return(0);
+ }
+
+ /* allocate memory to store imagee */
+ result = (PPMimage*) malloc(sizeof(PPMimage));
+ assert(result);
+
+ do {
+ ret = fscanf(fp,"%s",buff);
+ if ( ret == EOF ) break;
+ /* check and strip comments */
+ if ( buff[0] == '#' )
+ do
+ c = getc(fp);
+ while ( c != '\n' );
+ else break;
+ }
+ while (1);
+
+ /* read columns + lines */
+ ret = sscanf(buff,"%d",&s);
+ result->sizeX = (short)s;
+ ret += fscanf(fp,"%d",&s);
+ result->sizeY = (short)s;
+ if ( ret != 2 ) {
+ fprintf(stderr," ## ERROR LOADING IMAGE.\n");
+ free(result);
+ return(0);
+ }
+ if ( fscanf(fp,"%d",&maxval) != 1 ) {
+ fprintf(stderr," ## INVALID IMAGE SIZE.\n");
+ free(result);
+ return(0);
+ }
+
+ /* strip line */
+ while ( fgetc(fp) != '\n' ) ;
+
+ /* size based on type */
+ if ( typimg == P2 || typimg == P5 || typimg == P4 )
+ bitsize = result->sizeX*result->sizeY;
+ else
+ bitsize = 3*result->sizeX*result->sizeY;
+ if ( !quiet )
+ fprintf(stdout," image size: %dx%d %d bytes\n",
+ result->sizeX,result->sizeY,bitsize);
+
+ result->data = (ubyte*)malloc(1+bitsize*sizeof(ubyte));
+ assert(result->data);
+
+ /* read data file */
+ switch( typimg ) {
+ case P2: /* ascii file (grey) */
+ case P3: /* ascii file (color) */
+ for (i=0; i<bitsize; i++) {
+ int rr=fscanf(fp,"%d",&r);
+ result->data[i] = (ubyte)r;
+ }
+ break;
+
+ case P5: /* binary file (grey) */
+ case P6: /* binary file (color) */
+ ret = fread(result->data,sizeof(ubyte),bitsize,fp);
+ if ( ret != bitsize ) {
+ fprintf(stderr," ## ERROR LOADING IMAGE.\n");
+ free(result->data);
+ free(result);
+ return(0);
+ }
+ break;
+ }
+ fclose(fp);
+
+ if ( *type == DEFAULT )
+ if ( typimg == P2 || typimg == P5 )
+ *type = GREY;
+ else
+ *type = COLOR;
+
+ /* convert to grey levels */
+ else if ( *type == GREY && (typimg == P3 || typimg == P6) ) {
+ fprintf(stdout," converting to grey levels\n");
+ for (i=0,k=0; i<bitsize; i+=3,k++) {
+ r = (int)result->data[i];
+ g = (int)result->data[i+1];
+ b = (int)result->data[i+2];
+ result->data[k] = (ubyte)(0.3*r+0.59*g+0.11*b);
+ }
+ result->data = (ubyte*)realloc(result->data,sizeof(ubyte)*bitsize/3+1);
+ }
+
+ return(result);
+ }
+
+
+ int savePPM(const char *imgname,pPPMimage img,int typimg) {
+ FILE *out;
+ int i,c,bitsize;
+
+ /* open file */
+ out = fopen(imgname,"w");
+ if ( !out ) {
+ fprintf(stderr," ## UNABLE TO OPEN FILE %s.\n",imgname);
+ return 0;
+ }
+
+ /* write out image file */
+ bitsize = img->sizeX*img->sizeY;
+ switch(typimg) {
+ case P2:
+ fprintf(out,"P2\n");
+ fprintf(out,"# CREATOR: QIZIP Version 1, Rev. 2/2003, (c) INRIA\n");
+ fprintf(out,"%d %d\n",img->sizeX,img->sizeY);
+ fprintf(out,"255\n");
+ c = 0;
+ for (i=0; i<img->sizeX*img->sizeY; i++) {
+ fprintf(out,"%3d ",(int)img->data[i]);
+ if ( ++c == 17 ) {
+ c = 0;
+ fprintf(out,"\n");
+ }
+ }
+ fprintf(out,"\n");
+ break;
+ case P5:
+ fprintf(out,"P5\n");
+ fprintf(out,"# CREATOR: QIZIP Version 1, Rev. 2/2003, (c) INRIA\n");
+ fprintf(out,"%d %d\n",img->sizeX,img->sizeY);
+ fprintf(out,"255\n");
+ fwrite(img->data,sizeof(ubyte),bitsize,out);
+ break;
+ case P6:
+ fprintf(out,"P6\n");
+ fprintf(out,"# CREATOR: QIZIP Version 1, Rev. 2/2003, (c) INRIA\n");
+ fprintf(out,"%d %d\n",img->sizeX,img->sizeY);
+ fprintf(out,"255\n");
+ fwrite(img->data,sizeof(ubyte),3*bitsize,out);
+ break;
+ }
+ fclose(out);
+
+ return(1);
+ }
+
+ /* compute difference image */
+ pPPMimage diffImg(pPPMimage bits,pPPMimage img,ubyte itype) {
+ pPPMimage dif;
+ double psnr,dd;
+ int i,bitsize,dmax;
+
+ fprintf(stdout," Difference image\n");
+ bitsize = (int)bits->sizeX*bits->sizeY;
+ if ( itype == COLOR ) bitsize *= 3;
+
+ dif = (PPMimage *)malloc(sizeof(PPMimage));
+ if ( !dif ) {
+ fprintf(stderr," Sorry, not enough memory. Bye.\n");
+ return 0;
+ }
+ dif->sizeX = bits->sizeX;
+ dif->sizeY = bits->sizeY;
+ dif->data = (ubyte*)malloc(bitsize*sizeof(ubyte));
+ if ( !dif->data ) {
+ fprintf(stderr," Sorry, not enough memory. Bye.\n");
+ free(dif);
+ return 0;
+ }
+
+ dmax = 0;
+ psnr = 0.0f;
+ for (i=0; i<bitsize; i++) {
+ dd = abs((int)(bits->data[i]-img->data[i]));
+ dmax = max(dmax,dd);
+ psnr += (double)dd*dd;
+ dif->data[i] = (ubyte)(255-dd);
+ }
+ if ( psnr == 0.0f ) fprintf(stderr," PSNR problem!");
+ else {
+ psnr = 65025.0f / psnr;
+ psnr = 10.0 * log10(bitsize*psnr);
+ }
+ fprintf(stdout," PSNR = %.2f dmax = %d\n",psnr,dmax);
+
+ return(dif);
+ }
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+pRnm read_image( pRnm const & a,const pstring & b)
+{
+ ubyte type,quiet=1;
+ PPMimage * image =loadPPM(b->c_str(),&type, quiet);
+ if(!image) {
+ std::cerr << " error loadPPM image "<< *b << endl;
+ CompileError("error loadPPM image ");
+ return a;
+ }
+ if(verbosity)
+ cout << " size of image : " << image->sizeX << " x " << image->sizeY << " type =" << (int) type << endl;
+ int n = image->sizeX;
+ int m = image->sizeY ;
+ a->init(n,m);
+ ubyte * dd= image->data;
+
+ // cout << (double) dd[0] / 256. << " "
+ // << (double) dd[250] / 256. << " "
+ // << (double) dd[500] / 256. << "\n "
+ // ;
+ int k=0;
+ double *mm=*a;
+ for(int i=0;i<n;++i)
+ for(int j=0;j<m;++j)
+ *mm++= (double) dd[k++] / 256. ;
+ KN_<double> aa=*a;
+ // cout << aa[0] << " "<< aa[250] << "" << aa[500] << endl;
+ assert(k==n*m);
+ free(image->data);
+ free(image);
+ return a;
+}
+pRn seta( pRn const & a,const pRnm & b)
+{
+ *a=*b;
+ KN_<double> aa=*a;
+ // cout << aa[0] << " "<< aa[250] << "" << aa[500] << endl;
+ return a;
+}
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+};
+
+$1 */
+static void Load_Init(){
++=======
++class Init { public:
++ Init();
++};
++
++LOADINIT(Init);
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ cout << " lood: init ppm2rmn " << endl;
+
+
+ TheOperators->Add("<-",
+ new OneOperator2_<KNM<double> *,KNM<double> *,string*>(&read_image)
+ );
+ TheOperators->Add("=",
+ new OneOperator2_<KN<double> *,KN<double> *,KNM<double>* >(seta)
+ );
+ /*
+ map_type[typeid(KN<double> ).name()]->AddCast(
+ new E_F1_funcT<KN<double>,KNM<double>*>(UnRef<KN<double>,KNM<double> >));
+ // map_type[typeid(KN<double> ).name()]->AddCast(
+ //new E_F1_funcT<KN<double>*,KNM<double>*>(Cast<KN<double>*,KNM<double>*>));
+
+ */
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/qf11to25.cpp.orig
index 6aa87d2,0000000..1d81cd7
mode 100644,000000..100644
--- a/examples++-load/qf11to25.cpp.orig
+++ b/examples++-load/qf11to25.cpp.orig
@@@ -1,864 -1,0 +1,883 @@@
+#include <stdlib.h>
+#include <math.h>
+#include <iostream>
+#include <fstream>
+#include "error.hpp"
+#include "AFunction.hpp"
+using namespace std;
+
+
+#include "RNM.hpp"
+#include "rgraph.hpp"
+#include "fem.hpp"
+#include "QuadratureFormular.hpp"
+using namespace Fem2D ;
+/* awk -F[ t=:]* -f tt.awk coords.txt >QF.cpp
+
+/integration/ { if(ii) {print "};"
+ print "const QuadratureFormular QuadratureFormular_T_" ii "(3," ii " ," N ",P_QuadratureFormular_T_" ii ");"
+ print ""
+ print ""
+};ii=$3;N=$5;
+ print "static const QuadraturePoint P_QuadratureFormular_T_" $3 "[] = {";}
+!/integration/ {print "QuadraturePoint(" $4 "/2," $2"," $3"),"}
+END {print "};";
+ print "const QuadratureFormular QuadratureFormular_T_" ii "(3," ii " ," N ",P_QuadratureFormular_T_" ii ");"
+ print ""
+ print ""
+}
+*/
+/*
+static const QuadraturePoint P_QuadratureFormular_T_2[] = {
+QuadraturePoint(0.6666666666667/2,0.1666666666667,0.6666666666667),
+QuadraturePoint(0.6666666666667/2,0.6666666666667,0.1666666666667),
+QuadraturePoint(0.6666666666667/2,0.1666666666667,0.1666666666667),
+};
+const QuadratureFormular QuadratureFormular_T_2(3,2 ,3,P_QuadratureFormular_T_2);
+
+
+static const QuadraturePoint P_QuadratureFormular_T_4[] = {
+QuadraturePoint(0.2199034873106/2,0.0915762135098,0.0915762135098),
+QuadraturePoint(0.2199034873106/2,0.8168475729805,0.0915762135098),
+QuadraturePoint(0.2199034873106/2,0.0915762135098,0.8168475729805),
+QuadraturePoint(0.4467631793560/2,0.1081030181681,0.4459484909160),
+QuadraturePoint(0.4467631793560/2,0.4459484909160,0.1081030181681),
+QuadraturePoint(0.4467631793560/2,0.4459484909160,0.4459484909160),
+};
+const QuadratureFormular QuadratureFormular_T_4(3,4 ,6,P_QuadratureFormular_T_4);
+
+
+static const QuadraturePoint P_QuadratureFormular_T_5[] = {
+QuadraturePoint(0.0262712099504/2,0.0000000000000,1.0000000000000),
+QuadraturePoint(0.0262716612068/2,1.0000000000000,0.0000000000000),
+QuadraturePoint(0.0274163947600/2,0.0000000000000,0.0000000000000),
+QuadraturePoint(0.2348383865823/2,0.2673273531185,0.6728199218710),
+QuadraturePoint(0.2348412238268/2,0.6728175529461,0.2673288599482),
+QuadraturePoint(0.2480251793114/2,0.0649236350054,0.6716530111494),
+QuadraturePoint(0.2480304922521/2,0.6716498539042,0.0649251690029),
+QuadraturePoint(0.2518604605529/2,0.0654032456800,0.2693789366453),
+QuadraturePoint(0.2518660533658/2,0.2693767069140,0.0654054874919),
+QuadraturePoint(0.4505789381914/2,0.3386738503896,0.3386799893027),
+};
+const QuadratureFormular QuadratureFormular_T_5(3,5 ,10,P_QuadratureFormular_T_5);
+
+
+static const QuadraturePoint P_QuadratureFormular_T_7[] = {
+QuadraturePoint(0.0102558174092/2,1.0000000000000,0.0000000000000),
+QuadraturePoint(0.0102558174092/2,0.0000000000000,0.0000000000000),
+QuadraturePoint(0.0102558174092/2,0.0000000000000,1.0000000000000),
+QuadraturePoint(0.1116047046647/2,0.7839656651012,0.0421382841642),
+QuadraturePoint(0.1116047046647/2,0.1738960507345,0.7839656651012),
+QuadraturePoint(0.1116047046647/2,0.1738960507345,0.0421382841642),
+QuadraturePoint(0.1116047046647/2,0.0421382841642,0.1738960507345),
+QuadraturePoint(0.1116047046647/2,0.7839656651012,0.1738960507345),
+QuadraturePoint(0.1116047046647/2,0.0421382841642,0.7839656651012),
+QuadraturePoint(0.1679775595335/2,0.4743880861752,0.4743880861752),
+QuadraturePoint(0.1679775595335/2,0.4743880861752,0.0512238276497),
+QuadraturePoint(0.1679775595335/2,0.0512238276497,0.4743880861752),
+QuadraturePoint(0.2652238803946/2,0.2385615300181,0.5228769399639),
+QuadraturePoint(0.2652238803946/2,0.5228769399639,0.2385615300181),
+QuadraturePoint(0.2652238803946/2,0.2385615300181,0.2385615300181),
+};
+const QuadratureFormular QuadratureFormular_T_7(3,7 ,15,P_QuadratureFormular_T_7);
+
+
+static const QuadraturePoint P_QuadratureFormular_T_9[] = {
+QuadraturePoint(0.0519871420646/2,0.0451890097844,0.0451890097844),
+QuadraturePoint(0.0519871420646/2,0.0451890097844,0.9096219804312),
+QuadraturePoint(0.0519871420646/2,0.9096219804312,0.0451890097844),
+QuadraturePoint(0.0707034101784/2,0.7475124727339,0.0304243617288),
+QuadraturePoint(0.0707034101784/2,0.2220631655373,0.0304243617288),
+QuadraturePoint(0.0707034101784/2,0.7475124727339,0.2220631655373),
+QuadraturePoint(0.0707034101784/2,0.2220631655373,0.7475124727339),
+QuadraturePoint(0.0707034101784/2,0.0304243617288,0.7475124727339),
+QuadraturePoint(0.0707034101784/2,0.0304243617288,0.2220631655373),
+QuadraturePoint(0.0909390760952/2,0.1369912012649,0.2182900709714),
+QuadraturePoint(0.0909390760952/2,0.6447187277637,0.2182900709714),
+QuadraturePoint(0.0909390760952/2,0.1369912012649,0.6447187277637),
+QuadraturePoint(0.0909390760952/2,0.2182900709714,0.6447187277637),
+QuadraturePoint(0.0909390760952/2,0.2182900709714,0.1369912012649),
+QuadraturePoint(0.0909390760952/2,0.6447187277637,0.1369912012649),
+QuadraturePoint(0.1032344051380/2,0.0369603304334,0.4815198347833),
+QuadraturePoint(0.1032344051380/2,0.4815198347833,0.0369603304334),
+QuadraturePoint(0.1032344051380/2,0.4815198347833,0.4815198347833),
+QuadraturePoint(0.1881601469167/2,0.4036039798179,0.1927920403641),
+QuadraturePoint(0.1881601469167/2,0.4036039798179,0.4036039798179),
+QuadraturePoint(0.1881601469167/2,0.1927920403641,0.4036039798179),
+};
+const QuadratureFormular QuadratureFormular_T_9(3,9 ,21,P_QuadratureFormular_T_9);
+*/
+
+static QuadraturePoint P_QuadratureFormular_T_11[] = {
+QuadraturePoint(0.0114082494033/2,0.0000000000000,0.9451704450174),
+QuadraturePoint(0.0114082494033/2,0.9451704450173,0.0000000000000),
+QuadraturePoint(0.0132691285720/2,0.9289002405719,0.0685505797224),
+QuadraturePoint(0.0132691285720/2,0.0685505797224,0.9289002405717),
+QuadraturePoint(0.0155865773350/2,0.0243268355615,0.0243268355616),
+QuadraturePoint(0.0408274780428/2,0.1279662835335,0.0277838749488),
+QuadraturePoint(0.0408274780429/2,0.0277838749488,0.1279662835337),
+QuadraturePoint(0.0579849665116/2,0.0287083428360,0.7498347588657),
+QuadraturePoint(0.0579849665116/2,0.7498347588656,0.0287083428360),
+QuadraturePoint(0.0601385247663/2,0.7228007909707,0.2497602062385),
+QuadraturePoint(0.0601385247663/2,0.2497602062386,0.7228007909707),
+QuadraturePoint(0.0625273888433/2,0.0865562992839,0.8325513856997),
+QuadraturePoint(0.0625273888433/2,0.8325513856998,0.0865562992839),
+QuadraturePoint(0.0639684321504/2,0.3061619157672,0.0303526617491),
+QuadraturePoint(0.0639684321504/2,0.0303526617491,0.3061619157675),
+QuadraturePoint(0.0661325872161/2,0.4868610595047,0.4868610595047),
+QuadraturePoint(0.0668503236820/2,0.6657904293017,0.1765456154219),
+QuadraturePoint(0.0668503236821/2,0.1765456154221,0.6657904293016),
+QuadraturePoint(0.0686904305977/2,0.0293121007360,0.5295657488669),
+QuadraturePoint(0.0686904305977/2,0.5295657488667,0.0293121007360),
+QuadraturePoint(0.1002717543859/2,0.1444673824391,0.1444673824391),
+QuadraturePoint(0.1143136784099/2,0.3299740111411,0.5361815729050),
+QuadraturePoint(0.1143136784099/2,0.5361815729052,0.3299740111409),
+QuadraturePoint(0.1223648146752/2,0.5511507516862,0.1437790861923),
+QuadraturePoint(0.1223648146752/2,0.1437790861923,0.5511507516862),
+QuadraturePoint(0.1394422334178/2,0.3348066587327,0.1529619437161),
+QuadraturePoint(0.1394422334178/2,0.1529619437161,0.3348066587327),
+QuadraturePoint(0.1744377829182/2,0.3430183498147,0.3430183498147),
+};
+const QuadratureFormular QuadratureFormular_T_11(11 ,28,P_QuadratureFormular_T_11);
+
+
+static QuadraturePoint P_QuadratureFormular_T_13[] = {
+QuadraturePoint(0.0166240998757/2,0.0242935351590,0.9493059293846),
+QuadraturePoint(0.0166811699778/2,0.0265193427722,0.0242695130640),
+QuadraturePoint(0.0166830569067/2,0.9492126023551,0.0265067966437),
+QuadraturePoint(0.0175680870083/2,0.0033775763749,0.4767316412363),
+QuadraturePoint(0.0184474661845/2,0.4757672298101,0.5198921829102),
+QuadraturePoint(0.0197942410188/2,0.5190783193471,0.0055912706202),
+QuadraturePoint(0.0203540395855/2,0.8616839745321,0.0133996048618),
+QuadraturePoint(0.0206852863940/2,0.1249209759926,0.8613054321334),
+QuadraturePoint(0.0208271366086/2,0.0138565453861,0.1247733717358),
+QuadraturePoint(0.0317819778279/2,0.0211887064222,0.8438438351223),
+QuadraturePoint(0.0320472035241/2,0.8432296787219,0.1354563645830),
+QuadraturePoint(0.0320607681146/2,0.1354231797865,0.0213482820656),
+QuadraturePoint(0.0430765959183/2,0.3088853510679,0.0221919663014),
+QuadraturePoint(0.0438473415339/2,0.6685057595169,0.3089012879389),
+QuadraturePoint(0.0439209672733/2,0.0226545012557,0.6691709943321),
+QuadraturePoint(0.0479951923691/2,0.2808515408772,0.6924718155106),
+QuadraturePoint(0.0483806260733/2,0.6922446749051,0.0268723345026),
+QuadraturePoint(0.0484867423375/2,0.0268617447119,0.2810093973222),
+QuadraturePoint(0.0556964488024/2,0.1141778485470,0.7973581413586),
+QuadraturePoint(0.0561026364356/2,0.7974807922061,0.0879806508791),
+QuadraturePoint(0.0565190123693/2,0.0892807293894,0.1145020561128),
+QuadraturePoint(0.0689289890670/2,0.1052487892455,0.6686904119922),
+QuadraturePoint(0.0717213336089/2,0.6663022280740,0.2275051631832),
+QuadraturePoint(0.0727453920976/2,0.2307803737547,0.1054572561221),
+QuadraturePoint(0.0788807336737/2,0.1705059157540,0.5174064398658),
+QuadraturePoint(0.0810114345512/2,0.5086593973043,0.3170523855209),
+QuadraturePoint(0.0825725299055/2,0.3141823862281,0.1810706361659),
+QuadraturePoint(0.0842044567330/2,0.4617460817864,0.4678594539804),
+QuadraturePoint(0.0843585533305/2,0.0693087496081,0.4622856042085),
+QuadraturePoint(0.0851969868488/2,0.4651955259268,0.0724357805669),
+QuadraturePoint(0.0902845328052/2,0.2578625857893,0.6131395039177),
+QuadraturePoint(0.0914283143485/2,0.6112627766779,0.1300360834609),
+QuadraturePoint(0.0916279065409/2,0.1305182135934,0.2581713828884),
+QuadraturePoint(0.1025573374896/2,0.4281437991828,0.2362005969817),
+QuadraturePoint(0.1033159661413/2,0.3356995783730,0.4311026308588),
+QuadraturePoint(0.1035854367193/2,0.2305424298836,0.3456013949376),
+};
+const QuadratureFormular QuadratureFormular_T_13(13 ,36,P_QuadratureFormular_T_13);
+
+
+static QuadraturePoint P_QuadratureFormular_T_14[] = {
+QuadraturePoint(0.0010616711990/2,0.0000000000000,1.0000000000000),
+QuadraturePoint(0.0010616711990/2,1.0000000000000,0.0000000000000),
+QuadraturePoint(0.0010616711990/2,0.0000000000000,0.0000000000000),
+QuadraturePoint(0.0131460236101/2,0.0573330873026,0.0151382269814),
+QuadraturePoint(0.0131460236101/2,0.0573330873026,0.9275286857160),
+QuadraturePoint(0.0131460236101/2,0.9275286857160,0.0573330873026),
+QuadraturePoint(0.0131460236101/2,0.0151382269814,0.0573330873026),
+QuadraturePoint(0.0131460236101/2,0.9275286857160,0.0151382269814),
+QuadraturePoint(0.0131460236101/2,0.0151382269814,0.9275286857160),
+QuadraturePoint(0.0242881926949/2,0.8159625040711,0.1659719969565),
+QuadraturePoint(0.0242881926949/2,0.8159625040711,0.0180654989724),
+QuadraturePoint(0.0242881926949/2,0.1659719969565,0.8159625040711),
+QuadraturePoint(0.0242881926949/2,0.0180654989724,0.8159625040711),
+QuadraturePoint(0.0242881926949/2,0.1659719969565,0.0180654989724),
+QuadraturePoint(0.0242881926949/2,0.0180654989724,0.1659719969565),
+QuadraturePoint(0.0316799866332/2,0.3165475556378,0.0186886898773),
+QuadraturePoint(0.0316799866332/2,0.6647637544849,0.0186886898773),
+QuadraturePoint(0.0316799866332/2,0.0186886898773,0.6647637544849),
+QuadraturePoint(0.0316799866332/2,0.0186886898773,0.3165475556378),
+QuadraturePoint(0.0316799866332/2,0.3165475556378,0.6647637544849),
+QuadraturePoint(0.0316799866332/2,0.6647637544849,0.3165475556378),
+QuadraturePoint(0.0349317947036/2,0.0192662192492,0.4903668903754),
+QuadraturePoint(0.0349317947036/2,0.4903668903754,0.0192662192492),
+QuadraturePoint(0.0349317947036/2,0.4903668903754,0.4903668903754),
+QuadraturePoint(0.0383664533945/2,0.0875134669581,0.8249730660837),
+QuadraturePoint(0.0383664533945/2,0.0875134669581,0.0875134669581),
+QuadraturePoint(0.0383664533945/2,0.8249730660837,0.0875134669581),
+QuadraturePoint(0.0578369491210/2,0.0935526036219,0.2079865423167),
+QuadraturePoint(0.0578369491210/2,0.0935526036219,0.6984608540613),
+QuadraturePoint(0.0578369491210/2,0.2079865423167,0.0935526036219),
+QuadraturePoint(0.0578369491210/2,0.6984608540613,0.0935526036219),
+QuadraturePoint(0.0578369491210/2,0.6984608540613,0.2079865423167),
+QuadraturePoint(0.0578369491210/2,0.2079865423167,0.6984608540613),
+QuadraturePoint(0.0725821687394/2,0.0974892983467,0.5380088595149),
+QuadraturePoint(0.0725821687394/2,0.3645018421383,0.0974892983467),
+QuadraturePoint(0.0725821687394/2,0.5380088595149,0.0974892983467),
+QuadraturePoint(0.0725821687394/2,0.5380088595149,0.3645018421383),
+QuadraturePoint(0.0725821687394/2,0.3645018421383,0.5380088595149),
+QuadraturePoint(0.0725821687394/2,0.0974892983467,0.3645018421383),
+QuadraturePoint(0.0897856524107/2,0.2217145894873,0.5565708210253),
+QuadraturePoint(0.0897856524107/2,0.5565708210253,0.2217145894873),
+QuadraturePoint(0.0897856524107/2,0.2217145894873,0.2217145894873),
+QuadraturePoint(0.1034544533617/2,0.3860471669296,0.2279056661408),
+QuadraturePoint(0.1034544533617/2,0.2279056661408,0.3860471669296),
+QuadraturePoint(0.1034544533617/2,0.3860471669296,0.3860471669296),
+};
+const QuadratureFormular QuadratureFormular_T_14(14 ,45,P_QuadratureFormular_T_14);
+
+
+static QuadraturePoint P_QuadratureFormular_T_16[] = {
+QuadraturePoint(0.0006202599851/2,1.0000000000000,0.0000000000000),
+QuadraturePoint(0.0006315174712/2,0.0000000000000,1.0000000000000),
+QuadraturePoint(0.0007086601559/2,0.0000000000000,0.0000000000000),
+QuadraturePoint(0.0055163716168/2,0.9398863583577,0.0049848744634),
+QuadraturePoint(0.0062692407656/2,0.0543806683058,0.9386405618617),
+QuadraturePoint(0.0078531408826/2,0.0093940049164,0.0526424462697),
+QuadraturePoint(0.0094551483864/2,0.0164345086362,0.9469035517351),
+QuadraturePoint(0.0097824511271/2,0.9469487269862,0.0363373677167),
+QuadraturePoint(0.0099861643489/2,0.0426604005768,0.0151224541799),
+QuadraturePoint(0.0137553818816/2,0.0122269495439,0.8693773510664),
+QuadraturePoint(0.0140979178040/2,0.8673696521047,0.1204917285774),
+QuadraturePoint(0.0149646864337/2,0.8456744021389,0.0157763967870),
+QuadraturePoint(0.0156097503612/2,0.1395759632103,0.8448120870375),
+QuadraturePoint(0.0157683693348/2,0.1317821743231,0.0135009605584),
+QuadraturePoint(0.0175794546383/2,0.0157955126300,0.1455274938536),
+QuadraturePoint(0.0204113840270/2,0.7365462884436,0.0155697540908),
+QuadraturePoint(0.0209562878616/2,0.0139688430330,0.7379836894450),
+QuadraturePoint(0.0210713412998/2,0.2547895186039,0.7297615689771),
+QuadraturePoint(0.0217646760202/2,0.7316386522555,0.2543076683315),
+QuadraturePoint(0.0222288408699/2,0.0157253728951,0.2696239795791),
+QuadraturePoint(0.0224186693682/2,0.2662302843647,0.0144783956308),
+QuadraturePoint(0.0230122616993/2,0.8673504065214,0.0591679410400),
+QuadraturePoint(0.0236813902500/2,0.0741493666957,0.8634782575061),
+QuadraturePoint(0.0257464643368/2,0.0159285948360,0.4191238955238),
+QuadraturePoint(0.0257956801608/2,0.0156061028068,0.5809222921146),
+QuadraturePoint(0.0258072327610/2,0.5910094817484,0.0159251452651),
+QuadraturePoint(0.0260343232059/2,0.4034771496889,0.5806700368104),
+QuadraturePoint(0.0265768141609/2,0.5694745628526,0.4149495146302),
+QuadraturePoint(0.0265784761831/2,0.0678493700650,0.0761218678591),
+QuadraturePoint(0.0267532329238/2,0.4265968590272,0.0157509692312),
+QuadraturePoint(0.0375787806641/2,0.0670982507890,0.7741898312421),
+QuadraturePoint(0.0383065894195/2,0.7528310231480,0.0819119495639),
+QuadraturePoint(0.0384849695025/2,0.7753727783557,0.1577128457292),
+QuadraturePoint(0.0389619825852/2,0.1689073157787,0.7503943099742),
+QuadraturePoint(0.0394604111547/2,0.1687335832919,0.0708311507268),
+QuadraturePoint(0.0412364778098/2,0.0821244708436,0.1762996626771),
+QuadraturePoint(0.0512872438483/2,0.6288705363345,0.0807744953317),
+QuadraturePoint(0.0516405641935/2,0.0811413015266,0.3054373589776),
+QuadraturePoint(0.0518230042269/2,0.2969112065080,0.6227485988871),
+QuadraturePoint(0.0528527988181/2,0.0767542314171,0.6247247149546),
+QuadraturePoint(0.0538505573027/2,0.6223022333845,0.3011485821166),
+QuadraturePoint(0.0541895329319/2,0.3103786288051,0.0779098365079),
+QuadraturePoint(0.0584737146444/2,0.0819218215187,0.4603633038351),
+QuadraturePoint(0.0592863168363/2,0.4717022665013,0.0821554006797),
+QuadraturePoint(0.0594358276749/2,0.4546603415250,0.4637565033890),
+QuadraturePoint(0.0631800255863/2,0.1701091339237,0.6422277808188),
+QuadraturePoint(0.0632926845153/2,0.6406004329487,0.1898293537256),
+QuadraturePoint(0.0640707361772/2,0.1912267583717,0.1739955685343),
+QuadraturePoint(0.0812040595918/2,0.1885315767070,0.4798914070406),
+QuadraturePoint(0.0814437513530/2,0.4772929957691,0.3348356598119),
+QuadraturePoint(0.0814679201241/2,0.3126974621760,0.4957972197259),
+QuadraturePoint(0.0815050548084/2,0.4961225945946,0.1927553668904),
+QuadraturePoint(0.0815164664939/2,0.1928805312867,0.3161015807261),
+QuadraturePoint(0.0816931059623/2,0.3360041453816,0.1894892801290),
+QuadraturePoint(0.0923218334531/2,0.3337280550848,0.3343571021811),
+};
+const QuadratureFormular QuadratureFormular_T_16(16 ,55,P_QuadratureFormular_T_16);
+
+
+static QuadraturePoint P_QuadratureFormular_T_18[] = {
+QuadraturePoint(0.0025165756986/2,0.0116731059668,0.9812565951289),
+QuadraturePoint(0.0025273452007/2,0.9810030858388,0.0071462504863),
+QuadraturePoint(0.0033269295333/2,0.0106966317092,0.0115153933376),
+QuadraturePoint(0.0081503492125/2,0.9382476983551,0.0495570591341),
+QuadraturePoint(0.0086135525742/2,0.0126627518417,0.9370123620615),
+QuadraturePoint(0.0087786746179/2,0.0598109409984,0.0121364578922),
+QuadraturePoint(0.0097099585562/2,0.0137363297927,0.0612783625597),
+QuadraturePoint(0.0102466211915/2,0.9229527959405,0.0141128270602),
+QuadraturePoint(0.0108397688341/2,0.0633107354993,0.9220197291727),
+QuadraturePoint(0.0129385390176/2,0.0117265100335,0.1500520475229),
+QuadraturePoint(0.0136339823583/2,0.1554720587323,0.8325147121589),
+QuadraturePoint(0.0138477328147/2,0.8343293888982,0.0125228158759),
+QuadraturePoint(0.0139421540105/2,0.8501638031957,0.1371997508736),
+QuadraturePoint(0.0144121399968/2,0.0128816350522,0.8477627063479),
+QuadraturePoint(0.0153703455534/2,0.1510801608959,0.0136526924039),
+QuadraturePoint(0.0162489802253/2,0.0101917879217,0.5770438618345),
+QuadraturePoint(0.0169718304280/2,0.2813372399303,0.7066853759623),
+QuadraturePoint(0.0170088532421/2,0.7124374628501,0.0124569780990),
+QuadraturePoint(0.0170953520675/2,0.2763025250863,0.0121741311386),
+QuadraturePoint(0.0173888854559/2,0.0109658368561,0.4194306712466),
+QuadraturePoint(0.0174543962439/2,0.4289110517884,0.5599616067469),
+QuadraturePoint(0.0178406757287/2,0.4215420555115,0.0116475994785),
+QuadraturePoint(0.0178446863879/2,0.5711258590444,0.0118218313989),
+QuadraturePoint(0.0179046337552/2,0.5826868270511,0.4057889581177),
+QuadraturePoint(0.0181259756201/2,0.0130567806713,0.2725023750868),
+QuadraturePoint(0.0184784838882/2,0.0130760400964,0.7224712523233),
+QuadraturePoint(0.0185793564371/2,0.7263437062407,0.2602984019251),
+QuadraturePoint(0.0203217151777/2,0.0687230068637,0.0631417277210),
+QuadraturePoint(0.0213771661809/2,0.8652302101529,0.0720611837338),
+QuadraturePoint(0.0231916854098/2,0.0648599071037,0.8590433543910),
+QuadraturePoint(0.0274426710859/2,0.1483494943362,0.7888788352240),
+QuadraturePoint(0.0290301922340/2,0.0624359898396,0.1493935499354),
+QuadraturePoint(0.0294522738505/2,0.7871369011735,0.0656382042757),
+QuadraturePoint(0.0299436251629/2,0.0519104921610,0.5255635695605),
+QuadraturePoint(0.0307026948119/2,0.1543129927444,0.0716383926917),
+QuadraturePoint(0.0325263365863/2,0.2617842745603,0.0621479485288),
+QuadraturePoint(0.0327884208506/2,0.7667257872813,0.1658211554831),
+QuadraturePoint(0.0331234675192/2,0.2582103676627,0.6800119766139),
+QuadraturePoint(0.0346167526875/2,0.0679065925147,0.7571515437782),
+QuadraturePoint(0.0347081373976/2,0.5293578274804,0.4121503841107),
+QuadraturePoint(0.0347372049404/2,0.0666036150484,0.2612513087886),
+QuadraturePoint(0.0348528762454/2,0.0585675461899,0.3902236114535),
+QuadraturePoint(0.0348601561186/2,0.0644535360411,0.6373626559761),
+QuadraturePoint(0.0355471569975/2,0.6748138429151,0.0637583342061),
+QuadraturePoint(0.0360182996383/2,0.3914602310369,0.5503238090563),
+QuadraturePoint(0.0362926285843/2,0.6487701492307,0.2836728360263),
+QuadraturePoint(0.0381897702083/2,0.3946498220408,0.0605175522554),
+QuadraturePoint(0.0392252800118/2,0.5390137151933,0.0611990176936),
+QuadraturePoint(0.0482710125888/2,0.1627895082785,0.6861322141035),
+QuadraturePoint(0.0489912121566/2,0.6812436322641,0.1567968345899),
+QuadraturePoint(0.0497220833872/2,0.1542832878020,0.1667512624020),
+QuadraturePoint(0.0507065736986/2,0.2522727750445,0.2504803933395),
+QuadraturePoint(0.0509771994043/2,0.2547981532407,0.4994090649043),
+QuadraturePoint(0.0521360063667/2,0.1485580549194,0.5756023096087),
+QuadraturePoint(0.0523460874925/2,0.2930239606436,0.5656897354162),
+QuadraturePoint(0.0524440683552/2,0.2808991272310,0.1437921574248),
+QuadraturePoint(0.0527459644823/2,0.4820989592971,0.2518557535865),
+QuadraturePoint(0.0529449063728/2,0.5641878245444,0.1462966743153),
+QuadraturePoint(0.0542395594501/2,0.1307699644344,0.4489577586117),
+QuadraturePoint(0.0543470203419/2,0.1479692221948,0.3001174386829),
+QuadraturePoint(0.0547100548639/2,0.5638684222946,0.2813772089298),
+QuadraturePoint(0.0557288345913/2,0.4361157428790,0.4252053446420),
+QuadraturePoint(0.0577734264233/2,0.3603263935285,0.2599190004889),
+QuadraturePoint(0.0585393781623/2,0.4224188334674,0.1453238443303),
+QuadraturePoint(0.0609039250680/2,0.3719001833052,0.3780122703567),
+QuadraturePoint(0.0637273964449/2,0.2413645006928,0.3847563284940),
+};
+const QuadratureFormular QuadratureFormular_T_18(18 ,66,P_QuadratureFormular_T_18);
+
+
+static QuadraturePoint P_QuadratureFormular_T_20[] = {
+QuadraturePoint(0.0021744545399/2,0.0089411337112,0.0086983293702),
+QuadraturePoint(0.0028987135265/2,0.9792622629807,0.0102644133744),
+QuadraturePoint(0.0030846029337/2,0.0105475382112,0.9785514202515),
+QuadraturePoint(0.0034401633104/2,0.0023777061947,0.0636551098604),
+QuadraturePoint(0.0041898472012/2,0.0630425115795,0.0041506347509),
+QuadraturePoint(0.0044738051498/2,0.9308422496730,0.0048053482263),
+QuadraturePoint(0.0047054420814/2,0.0629076555490,0.9316790069481),
+QuadraturePoint(0.0048867935750/2,0.9315962246381,0.0626264881801),
+QuadraturePoint(0.0051927643369/2,0.0061951689415,0.9293587058564),
+QuadraturePoint(0.0074073058981/2,0.0287125819237,0.0310202122997),
+QuadraturePoint(0.0079755410301/2,0.9293844478305,0.0342152968219),
+QuadraturePoint(0.0083550522910/2,0.0375457566621,0.9257868884669),
+QuadraturePoint(0.0096166660864/2,0.0086895739064,0.1584971251510),
+QuadraturePoint(0.0096318257850/2,0.1547597053965,0.8363606657688),
+QuadraturePoint(0.0098577460758/2,0.8331025294185,0.0089257244824),
+QuadraturePoint(0.0102657880301/2,0.8374231073526,0.1529167304078),
+QuadraturePoint(0.0103188103111/2,0.1559362505234,0.0094966240058),
+QuadraturePoint(0.0106291001630/2,0.0098599642095,0.8342211493596),
+QuadraturePoint(0.0106881306895/2,0.4055873733289,0.0074389302008),
+QuadraturePoint(0.0106969021010/2,0.5964727898618,0.3956330809311),
+QuadraturePoint(0.0109026461714/2,0.0080747800416,0.4031319425903),
+QuadraturePoint(0.0109899783575/2,0.0075073977721,0.5851609594681),
+QuadraturePoint(0.0113423055229/2,0.3936764519237,0.5974896592899),
+QuadraturePoint(0.0120535642930/2,0.5846530726212,0.0087250464968),
+QuadraturePoint(0.0139619193821/2,0.4870804112120,0.0202129229912),
+QuadraturePoint(0.0141147991536/2,0.2683512811785,0.7202340088668),
+QuadraturePoint(0.0141930347046/2,0.7223956288748,0.2662399366456),
+QuadraturePoint(0.0144212676268/2,0.2716826742357,0.0112882698808),
+QuadraturePoint(0.0144704346855/2,0.0112580842046,0.7169695963325),
+QuadraturePoint(0.0144949769872/2,0.0115034734370,0.2740067110166),
+QuadraturePoint(0.0145386775694/2,0.7140525900564,0.0113511560497),
+QuadraturePoint(0.0145964190926/2,0.4902871053112,0.4936491841468),
+QuadraturePoint(0.0147314578466/2,0.0201423425209,0.4832573459601),
+QuadraturePoint(0.0167463963304/2,0.0361107464859,0.0935679501582),
+QuadraturePoint(0.0168955500458/2,0.8607998819851,0.0397379067075),
+QuadraturePoint(0.0169422662884/2,0.1005891526001,0.8586343419352),
+QuadraturePoint(0.0173070172095/2,0.0918740717058,0.0395513001973),
+QuadraturePoint(0.0174524546493/2,0.8604888296191,0.0966224057079),
+QuadraturePoint(0.0177217222159/2,0.0439842178673,0.8561886349107),
+QuadraturePoint(0.0282824024023/2,0.2011017606735,0.7449115835626),
+QuadraturePoint(0.0284996712488/2,0.7449993726263,0.0536865638166),
+QuadraturePoint(0.0285005646539/2,0.0532186641310,0.1963754275935),
+QuadraturePoint(0.0300647223478/2,0.7453984647401,0.1982065805550),
+QuadraturePoint(0.0302031277082/2,0.1957289932876,0.0555713833156),
+QuadraturePoint(0.0303987136077/2,0.1092532057988,0.6100036182413),
+QuadraturePoint(0.0305668796074/2,0.0567625702001,0.7409121894959),
+QuadraturePoint(0.0306067413002/2,0.0483837933475,0.6075135660978),
+QuadraturePoint(0.0309330068201/2,0.1080612809760,0.1122081510437),
+QuadraturePoint(0.0309773820835/2,0.6185605900991,0.2698753703035),
+QuadraturePoint(0.0313146250545/2,0.7721296013497,0.1114117395333),
+QuadraturePoint(0.0313573493392/2,0.6115734801133,0.3389367677931),
+QuadraturePoint(0.0314320469287/2,0.3381326103376,0.0494693938787),
+QuadraturePoint(0.0315182143894/2,0.1173084128254,0.7696451309795),
+QuadraturePoint(0.0324248137985/2,0.2674551260596,0.1115718808154),
+QuadraturePoint(0.0347512152386/2,0.6542100160026,0.1906548314700),
+QuadraturePoint(0.0350393454927/2,0.0538297481158,0.3358616826849),
+QuadraturePoint(0.0350717420310/2,0.1848840324117,0.1551831523851),
+QuadraturePoint(0.0352129215334/2,0.3376267104744,0.6081402596294),
+QuadraturePoint(0.0352615504981/2,0.6067102034499,0.0542632795598),
+QuadraturePoint(0.0366403220343/2,0.4612614085496,0.0688176670722),
+QuadraturePoint(0.0367733107670/2,0.1525465365671,0.6510240845749),
+QuadraturePoint(0.0371675662937/2,0.0700582543543,0.4661904392742),
+QuadraturePoint(0.0373371571606/2,0.4704201379032,0.4634826455353),
+QuadraturePoint(0.0403973346588/2,0.1216461693746,0.2381494875516),
+QuadraturePoint(0.0413580040638/2,0.6371404052702,0.1238399384513),
+QuadraturePoint(0.0421957791870/2,0.2379904515119,0.6370216452326),
+QuadraturePoint(0.0495451004037/2,0.1483929857177,0.4894188577780),
+QuadraturePoint(0.0500419261141/2,0.3598069571550,0.1452880866253),
+QuadraturePoint(0.0505794587115/2,0.4941441055095,0.3610216383818),
+QuadraturePoint(0.0520037210188/2,0.1440630687981,0.3513508341887),
+QuadraturePoint(0.0521533567886/2,0.5019764440004,0.1435491663293),
+QuadraturePoint(0.0524899152358/2,0.3555423834298,0.5016491599502),
+QuadraturePoint(0.0599159762516/2,0.2443439540771,0.2406052129104),
+QuadraturePoint(0.0599609997426/2,0.2437064989342,0.5109017277055),
+QuadraturePoint(0.0599915272129/2,0.5122200807321,0.2452737973543),
+QuadraturePoint(0.0634133183449/2,0.2526038315178,0.3700319555094),
+QuadraturePoint(0.0635311861108/2,0.3759895652851,0.2505406611631),
+QuadraturePoint(0.0637206605672/2,0.3729077987144,0.3753750277549),
+};
+const QuadratureFormular QuadratureFormular_T_20(20 ,78,P_QuadratureFormular_T_20);
+
+
+static QuadraturePoint P_QuadratureFormular_T_21[] = {
+QuadraturePoint(0.0006704436439/2,0.0035524391922,0.0035524391922),
+QuadraturePoint(0.0006704436439/2,0.0035524391922,0.9928951216156),
+QuadraturePoint(0.0006704436439/2,0.9928951216156,0.0035524391922),
+QuadraturePoint(0.0045472608074/2,0.9553548273730,0.0087898929093),
+QuadraturePoint(0.0045472608074/2,0.0358552797177,0.0087898929093),
+QuadraturePoint(0.0045472608074/2,0.9553548273730,0.0358552797177),
+QuadraturePoint(0.0045472608074/2,0.0087898929093,0.0358552797177),
+QuadraturePoint(0.0045472608074/2,0.0087898929093,0.9553548273730),
+QuadraturePoint(0.0045472608074/2,0.0358552797177,0.9553548273730),
+QuadraturePoint(0.0052077585320/2,0.8865264879047,0.1082329745017),
+QuadraturePoint(0.0052077585320/2,0.8865264879047,0.0052405375935),
+QuadraturePoint(0.0052077585320/2,0.0052405375935,0.1082329745017),
+QuadraturePoint(0.0052077585320/2,0.0052405375935,0.8865264879047),
+QuadraturePoint(0.0052077585320/2,0.1082329745017,0.8865264879047),
+QuadraturePoint(0.0052077585320/2,0.1082329745017,0.0052405375935),
+QuadraturePoint(0.0065435432887/2,0.0466397432150,0.9067205135700),
+QuadraturePoint(0.0065435432887/2,0.0466397432150,0.0466397432150),
+QuadraturePoint(0.0065435432887/2,0.9067205135700,0.0466397432150),
+QuadraturePoint(0.0092737841533/2,0.2075720456946,0.0082759241284),
+QuadraturePoint(0.0092737841533/2,0.2075720456946,0.7841520301770),
+QuadraturePoint(0.0092737841533/2,0.7841520301770,0.2075720456946),
+QuadraturePoint(0.0092737841533/2,0.0082759241284,0.7841520301770),
+QuadraturePoint(0.0092737841533/2,0.0082759241284,0.2075720456946),
+QuadraturePoint(0.0092737841533/2,0.7841520301770,0.0082759241284),
+QuadraturePoint(0.0095937782623/2,0.0858119489725,0.0314836947701),
+QuadraturePoint(0.0095937782623/2,0.8827043562574,0.0314836947701),
+QuadraturePoint(0.0095937782623/2,0.0314836947701,0.0858119489725),
+QuadraturePoint(0.0095937782623/2,0.0858119489725,0.8827043562574),
+QuadraturePoint(0.0095937782623/2,0.8827043562574,0.0858119489725),
+QuadraturePoint(0.0095937782623/2,0.0314836947701,0.8827043562574),
+QuadraturePoint(0.0114247809167/2,0.6688778233826,0.0095150760625),
+QuadraturePoint(0.0114247809167/2,0.0095150760625,0.3216071005550),
+QuadraturePoint(0.0114247809167/2,0.0095150760625,0.6688778233826),
+QuadraturePoint(0.0114247809167/2,0.6688778233826,0.3216071005550),
+QuadraturePoint(0.0114247809167/2,0.3216071005550,0.6688778233826),
+QuadraturePoint(0.0114247809167/2,0.3216071005550,0.0095150760625),
+QuadraturePoint(0.0117216964174/2,0.4379999543113,0.0099859785681),
+QuadraturePoint(0.0117216964174/2,0.0099859785681,0.5520140671206),
+QuadraturePoint(0.0117216964174/2,0.4379999543113,0.5520140671206),
+QuadraturePoint(0.0117216964174/2,0.0099859785681,0.4379999543113),
+QuadraturePoint(0.0117216964174/2,0.5520140671206,0.4379999543113),
+QuadraturePoint(0.0117216964174/2,0.5520140671206,0.0099859785681),
+QuadraturePoint(0.0188197155232/2,0.7974931072148,0.0405093994119),
+QuadraturePoint(0.0188197155232/2,0.0405093994119,0.1619974933734),
+QuadraturePoint(0.0188197155232/2,0.0405093994119,0.7974931072148),
+QuadraturePoint(0.0188197155232/2,0.1619974933734,0.7974931072148),
+QuadraturePoint(0.0188197155232/2,0.7974931072148,0.1619974933734),
+QuadraturePoint(0.0188197155232/2,0.1619974933734,0.0405093994119),
+QuadraturePoint(0.0235260980271/2,0.3864215551955,0.3864215551955),
+QuadraturePoint(0.0235260980271/2,0.3864215551955,0.2271568896090),
+QuadraturePoint(0.0235260980271/2,0.2271568896090,0.3864215551955),
+QuadraturePoint(0.0235571466151/2,0.8090129379329,0.0954935310336),
+QuadraturePoint(0.0235571466151/2,0.0954935310336,0.8090129379329),
+QuadraturePoint(0.0235571466151/2,0.0954935310336,0.0954935310336),
+QuadraturePoint(0.0268246207430/2,0.2745425238718,0.0479840480721),
+QuadraturePoint(0.0268246207430/2,0.0479840480721,0.6774734280561),
+QuadraturePoint(0.0268246207430/2,0.6774734280561,0.0479840480721),
+QuadraturePoint(0.0268246207430/2,0.6774734280561,0.2745425238718),
+QuadraturePoint(0.0268246207430/2,0.2745425238718,0.6774734280561),
+QuadraturePoint(0.0268246207430/2,0.0479840480721,0.2745425238718),
+QuadraturePoint(0.0314289776779/2,0.4053472446667,0.5429849622344),
+QuadraturePoint(0.0314289776779/2,0.0516677930989,0.4053472446667),
+QuadraturePoint(0.0314289776779/2,0.4053472446667,0.0516677930989),
+QuadraturePoint(0.0314289776779/2,0.5429849622344,0.0516677930989),
+QuadraturePoint(0.0314289776779/2,0.0516677930989,0.5429849622344),
+QuadraturePoint(0.0314289776779/2,0.5429849622344,0.4053472446667),
+QuadraturePoint(0.0337196192159/2,0.1877738615539,0.1068148267588),
+QuadraturePoint(0.0337196192159/2,0.7054113116872,0.1877738615539),
+QuadraturePoint(0.0337196192159/2,0.7054113116872,0.1068148267588),
+QuadraturePoint(0.0337196192159/2,0.1068148267588,0.7054113116872),
+QuadraturePoint(0.0337196192159/2,0.1877738615539,0.7054113116872),
+QuadraturePoint(0.0337196192159/2,0.1068148267588,0.1877738615539),
+QuadraturePoint(0.0427745294213/2,0.1195059712009,0.3057122990643),
+QuadraturePoint(0.0427745294213/2,0.1195059712009,0.5747817297348),
+QuadraturePoint(0.0427745294213/2,0.5747817297348,0.1195059712009),
+QuadraturePoint(0.0427745294213/2,0.5747817297348,0.3057122990643),
+QuadraturePoint(0.0427745294213/2,0.3057122990643,0.5747817297348),
+QuadraturePoint(0.0427745294213/2,0.3057122990643,0.1195059712009),
+QuadraturePoint(0.0441138932737/2,0.5981245743363,0.2009377128319),
+QuadraturePoint(0.0441138932737/2,0.2009377128319,0.5981245743363),
+QuadraturePoint(0.0441138932737/2,0.2009377128319,0.2009377128319),
+QuadraturePoint(0.0461469594684/2,0.2160775200005,0.3121360256673),
+QuadraturePoint(0.0461469594684/2,0.3121360256673,0.2160775200005),
+QuadraturePoint(0.0461469594684/2,0.2160775200005,0.4717864543321),
+QuadraturePoint(0.0461469594684/2,0.3121360256673,0.4717864543321),
+QuadraturePoint(0.0461469594684/2,0.4717864543321,0.3121360256673),
+QuadraturePoint(0.0461469594684/2,0.4717864543321,0.2160775200005),
+QuadraturePoint(0.0469152468624/2,0.4376579903849,0.4376579903849),
+QuadraturePoint(0.0469152468624/2,0.4376579903849,0.1246840192303),
+QuadraturePoint(0.0469152468624/2,0.1246840192303,0.4376579903849),
+QuadraturePoint(0.0551199980347/2,0.3333333333333,0.3333333333333),
+};
+const QuadratureFormular QuadratureFormular_T_21(21 ,91,P_QuadratureFormular_T_21);
+
+
+static QuadraturePoint P_QuadratureFormular_T_23[] = {
+QuadraturePoint(0.0006438298261/2,0.0087809303836,0.9903676436772),
+QuadraturePoint(0.0006438413076/2,0.9903675314220,0.0087809216232),
+QuadraturePoint(0.0010134735710/2,0.0027029276450,0.0335914404439),
+QuadraturePoint(0.0010134752576/2,0.0335909214524,0.0027028946710),
+QuadraturePoint(0.0019679929935/2,0.0091675068606,0.0091676353051),
+QuadraturePoint(0.0033467313784/2,0.9675568182558,0.0084737176656),
+QuadraturePoint(0.0033467339208/2,0.0084737200688,0.9675569435345),
+QuadraturePoint(0.0042873323375/2,0.0078781948792,0.0676784943862),
+QuadraturePoint(0.0042873459885/2,0.0676785477700,0.0078781659291),
+QuadraturePoint(0.0043003801372/2,0.9470266955047,0.0442974541187),
+QuadraturePoint(0.0043003849098/2,0.0442974755680,0.9470266676487),
+QuadraturePoint(0.0056934629205/2,0.9144243214882,0.0081735455132),
+QuadraturePoint(0.0056934640134/2,0.0081735424459,0.9144244234031),
+QuadraturePoint(0.0061643868015/2,0.2497452292741,0.3833232434720),
+QuadraturePoint(0.0061644756418/2,0.3833232646055,0.2497451268005),
+QuadraturePoint(0.0062014513591/2,0.8876850353557,0.1035328809446),
+QuadraturePoint(0.0062014531952/2,0.1035329228297,0.8876849931840),
+QuadraturePoint(0.0069636330294/2,0.0077255923618,0.1403190991974),
+QuadraturePoint(0.0069636331842/2,0.1403192425107,0.0077255934624),
+QuadraturePoint(0.0075066257720/2,0.8104591009652,0.1809642523926),
+QuadraturePoint(0.0075066264565/2,0.1809643003717,0.8104590515334),
+QuadraturePoint(0.0079074768339/2,0.8330767948684,0.0083010939677),
+QuadraturePoint(0.0079074772485/2,0.0083010907126,0.8330768545392),
+QuadraturePoint(0.0080353344623/2,0.0348407706147,0.0348406969482),
+QuadraturePoint(0.0087963441074/2,0.2740287679608,0.7173981847948),
+QuadraturePoint(0.0087963448112/2,0.7173982224778,0.2740287304386),
+QuadraturePoint(0.0091304195716/2,0.2394976858234,0.0081859182262),
+QuadraturePoint(0.0091304213611/2,0.0081859185845,0.2394975566677),
+QuadraturePoint(0.0092821748751/2,0.0068836152075,0.4843740892687),
+QuadraturePoint(0.0092821815662/2,0.4843741485699,0.0068836232949),
+QuadraturePoint(0.0094499806178/2,0.4960767772741,0.4960767529507),
+QuadraturePoint(0.0094627468484/2,0.6112936776245,0.3804323691239),
+QuadraturePoint(0.0094627485294/2,0.3804323980345,0.6112936466533),
+QuadraturePoint(0.0095555772285/2,0.7303890713524,0.0083987179701),
+QuadraturePoint(0.0095555792843/2,0.0083987168639,0.7303890895407),
+QuadraturePoint(0.0096138842488/2,0.6128525675612,0.0075475979695),
+QuadraturePoint(0.0096138846826/2,0.0075475961037,0.6128525484582),
+QuadraturePoint(0.0099991524212/2,0.0079525316513,0.3559773826721),
+QuadraturePoint(0.0099991551850/2,0.3559774870460,0.0079525358502),
+QuadraturePoint(0.0100301319277/2,0.9110236977966,0.0437233665345),
+QuadraturePoint(0.0100301346636/2,0.0437233605166,0.9110236807446),
+QuadraturePoint(0.0124936676185/2,0.0388480061835,0.0967030908282),
+QuadraturePoint(0.0124936726125/2,0.0967032117936,0.0388479942386),
+QuadraturePoint(0.0140197309137/2,0.0873226911312,0.0873226620391),
+QuadraturePoint(0.0143336216896/2,0.0421445202084,0.8485617789108),
+QuadraturePoint(0.0143336272125/2,0.8485617974961,0.0421445420915),
+QuadraturePoint(0.0153604142740/2,0.8477921333864,0.1067435942472),
+QuadraturePoint(0.0153604183425/2,0.1067435889398,0.8477921328146),
+QuadraturePoint(0.0184523825614/2,0.1833966521991,0.0416340521608),
+QuadraturePoint(0.0184523863146/2,0.0416340541167,0.1833965196930),
+QuadraturePoint(0.0195833983573/2,0.7611632251560,0.1941599202852),
+QuadraturePoint(0.0195834019994/2,0.1941599254144,0.7611632153938),
+QuadraturePoint(0.0197632751342/2,0.7579378747173,0.0439826608586),
+QuadraturePoint(0.0197632766677/2,0.0439826512395,0.7579378242308),
+QuadraturePoint(0.0198806391019/2,0.0369760535918,0.5363186076436),
+QuadraturePoint(0.0198806485776/2,0.5363187134342,0.0369760780935),
+QuadraturePoint(0.0207181838484/2,0.1001256948921,0.7912267093545),
+QuadraturePoint(0.0207181934893/2,0.7912266693524,0.1001257554673),
+QuadraturePoint(0.0208943071440/2,0.0379866714177,0.4157413128558),
+QuadraturePoint(0.0208943251956/2,0.4157414028965,0.0379867061535),
+QuadraturePoint(0.0214864573885/2,0.6507106491463,0.0420141226713),
+QuadraturePoint(0.0214864586007/2,0.0420141133438,0.6507105645084),
+QuadraturePoint(0.0222218133036/2,0.0425548444254,0.2920626023484),
+QuadraturePoint(0.0222218160203/2,0.2920627107240,0.0425548546753),
+QuadraturePoint(0.0223345305455/2,0.5389729538180,0.4193031469005),
+QuadraturePoint(0.0223345378739/2,0.4193031828489,0.5389729093610),
+QuadraturePoint(0.0224758924946/2,0.6549472009700,0.3007352636162),
+QuadraturePoint(0.0224758980440/2,0.3007352790917,0.6549471812731),
+QuadraturePoint(0.0229701395845/2,0.3752400771585,0.3453980130752),
+QuadraturePoint(0.0229703394438/2,0.3453980282786,0.3752400695673),
+QuadraturePoint(0.0232798376102/2,0.0994532168761,0.1598308695187),
+QuadraturePoint(0.0232798427506/2,0.1598309359585,0.0994531960132),
+QuadraturePoint(0.0269483199647/2,0.1797326661667,0.7124585430924),
+QuadraturePoint(0.0269483307107/2,0.7124584461943,0.1797327722240),
+QuadraturePoint(0.0280438758010/2,0.1066065678636,0.7001701784175),
+QuadraturePoint(0.0280438764607/2,0.7001701904096,0.1066065855677),
+QuadraturePoint(0.0287526270172/2,0.0993303629801,0.6065647984796),
+QuadraturePoint(0.0287526387271/2,0.6065648052521,0.0993303896769),
+QuadraturePoint(0.0298980829063/2,0.1023223542704,0.2533381579528),
+QuadraturePoint(0.0298980922759/2,0.2533382324938,0.1023223826189),
+QuadraturePoint(0.0309004358516/2,0.6166226715217,0.2769502060575),
+QuadraturePoint(0.0309004385956/2,0.2769500693109,0.6166227900624),
+QuadraturePoint(0.0314031017088/2,0.0904184571873,0.4981522637001),
+QuadraturePoint(0.0314031073955/2,0.4981522767248,0.0904185045149),
+QuadraturePoint(0.0319191553024/2,0.0928231860168,0.3738418516908),
+QuadraturePoint(0.0319191668378/2,0.3738418699229,0.0928232584790),
+QuadraturePoint(0.0321429924062/2,0.2521678840407,0.2521680925697),
+QuadraturePoint(0.0330395601388/2,0.5087500218708,0.3905580544330),
+QuadraturePoint(0.0330395631829/2,0.3905579116731,0.5087501437661),
+QuadraturePoint(0.0356169095589/2,0.1706141469096,0.5266738039554),
+QuadraturePoint(0.0356169276054/2,0.5266737761312,0.1706142257537),
+QuadraturePoint(0.0365741189998/2,0.3487581527629,0.2588055084886),
+QuadraturePoint(0.0365741515204/2,0.2588053596017,0.3487583491703),
+QuadraturePoint(0.0365977646990/2,0.1696614558053,0.3013522183964),
+QuadraturePoint(0.0365978053889/2,0.3013521806875,0.1696615963219),
+QuadraturePoint(0.0369945680114/2,0.2580202409759,0.4584741774478),
+QuadraturePoint(0.0369945775059/2,0.4584740860198,0.2580203819011),
+QuadraturePoint(0.0374053623787/2,0.1848898683498,0.1848898704551),
+QuadraturePoint(0.0375550258317/2,0.6130740338465,0.1921611994069),
+QuadraturePoint(0.0375550312530/2,0.1921611750994,0.6130740398389),
+QuadraturePoint(0.0388887693486/2,0.4180541160599,0.1650613336416),
+QuadraturePoint(0.0388887708342/2,0.1650612642036,0.4180541199244),
+QuadraturePoint(0.0392705643548/2,0.5159205739625,0.2982719005229),
+QuadraturePoint(0.0392705802517/2,0.2982718935750,0.5159205534362),
+QuadraturePoint(0.0398766879831/2,0.4098894602340,0.4098894317792),
+};
+const QuadratureFormular QuadratureFormular_T_23(23 ,105,P_QuadratureFormular_T_23);
+
+
+static QuadraturePoint P_QuadratureFormular_T_25[] = {
+QuadraturePoint(0.0014873417859/2,0.0082881595033,0.9848202768869),
+QuadraturePoint(0.0014889035262/2,0.4618422030241,0.5381577969759),
+QuadraturePoint(0.0015005944380/2,0.0071066441239,0.0080842361390),
+QuadraturePoint(0.0015059208313/2,0.9847613141699,0.0070015755134),
+QuadraturePoint(0.0015318868715/2,0.5374447869049,0.4625552130951),
+QuadraturePoint(0.0023032634487/2,0.0000000000000,0.4887676880140),
+QuadraturePoint(0.0023649067042/2,0.4914131929361,0.0000000000000),
+QuadraturePoint(0.0028751143611/2,0.0070345937020,0.9574158053697),
+QuadraturePoint(0.0029862488735/2,0.9564734714228,0.0364655449485),
+QuadraturePoint(0.0030384162737/2,0.0370198792045,0.0070908577166),
+QuadraturePoint(0.0032092459688/2,0.1024124542747,0.8936125594937),
+QuadraturePoint(0.0037029598435/2,0.5928065811509,0.0049451705600),
+QuadraturePoint(0.0037407186035/2,0.0050948422371,0.0996676659189),
+QuadraturePoint(0.0038452543223/2,0.0081562023689,0.0415561148784),
+QuadraturePoint(0.0038670778668/2,0.0424936107568,0.9494865260352),
+QuadraturePoint(0.0039192555178/2,0.9495543500844,0.0081794507292),
+QuadraturePoint(0.0039573282688/2,0.8932787471239,0.0053224326262),
+QuadraturePoint(0.0044032251724/2,0.0069317612927,0.9065401020433),
+QuadraturePoint(0.0045907108173/2,0.9035839030665,0.0894771171077),
+QuadraturePoint(0.0047023669435/2,0.0905665738209,0.0070525342005),
+QuadraturePoint(0.0050014843818/2,0.0083929332787,0.6663179931111),
+QuadraturePoint(0.0052387830156/2,0.6261245686071,0.0092197583153),
+QuadraturePoint(0.0054422104092/2,0.0062801592979,0.8335207460527),
+QuadraturePoint(0.0056931248912/2,0.8272539257367,0.1665134939330),
+QuadraturePoint(0.0059107422989/2,0.0062005875353,0.7424693255229),
+QuadraturePoint(0.0059687967687/2,0.1676900311185,0.0065717743528),
+QuadraturePoint(0.0067262190287/2,0.7199353069567,0.0064354534962),
+QuadraturePoint(0.0068307848624/2,0.2749740090237,0.7185296120719),
+QuadraturePoint(0.0069531259112/2,0.0079257582005,0.1766411374714),
+QuadraturePoint(0.0072460270642/2,0.0069981220752,0.2704767254004),
+QuadraturePoint(0.0072728189613/2,0.8125248773263,0.0082299533210),
+QuadraturePoint(0.0073008930847/2,0.0073536969970,0.5934167875453),
+QuadraturePoint(0.0073604666776/2,0.7283665935411,0.2648817553752),
+QuadraturePoint(0.0074119923255/2,0.1800642304565,0.8115848976682),
+QuadraturePoint(0.0074892214336/2,0.2658102467762,0.0068553525429),
+QuadraturePoint(0.0078604067260/2,0.0070892364520,0.3757632659744),
+QuadraturePoint(0.0078621726423/2,0.3774054302043,0.6148573533757),
+QuadraturePoint(0.0080506361066/2,0.0369649608668,0.9210792302893),
+QuadraturePoint(0.0081442860473/2,0.9203194109805,0.0426025082114),
+QuadraturePoint(0.0081478804152/2,0.0425477806431,0.0372689941794),
+QuadraturePoint(0.0092444146612/2,0.6191278394983,0.3724055713809),
+QuadraturePoint(0.0094674635165/2,0.3762697209178,0.0081436422011),
+QuadraturePoint(0.0097132210137/2,0.0956111149690,0.8771098372601),
+QuadraturePoint(0.0099753581151/2,0.0302473410377,0.0943858903393),
+QuadraturePoint(0.0103367803673/2,0.8739905691754,0.0313198990883),
+QuadraturePoint(0.0112263277166/2,0.8604133734958,0.1049019782046),
+QuadraturePoint(0.0114309118745/2,0.0347307852352,0.8609856462886),
+QuadraturePoint(0.0115550567487/2,0.1043606608343,0.0357152881004),
+QuadraturePoint(0.0135575856957/2,0.7797622824754,0.1872318199265),
+QuadraturePoint(0.0135984962900/2,0.0185865164256,0.4834397678794),
+QuadraturePoint(0.0137754813837/2,0.0324585286618,0.7783474916042),
+QuadraturePoint(0.0137961015942/2,0.8371293901157,0.0804060570156),
+QuadraturePoint(0.0138408839904/2,0.0836602075315,0.8421414817051),
+QuadraturePoint(0.0140634019977/2,0.0784070242501,0.0849927089145),
+QuadraturePoint(0.0140991451009/2,0.4929238648458,0.4892855914710),
+QuadraturePoint(0.0142004111991/2,0.1870637584073,0.0345210858281),
+QuadraturePoint(0.0144518424517/2,0.4892636967025,0.0190774755077),
+QuadraturePoint(0.0150245979639/2,0.0401982618372,0.1691143187109),
+QuadraturePoint(0.0152817804122/2,0.7894259278865,0.0412206731484),
+QuadraturePoint(0.0155550724169/2,0.1686260456429,0.7894860640585),
+QuadraturePoint(0.0164570886000/2,0.3750901913174,0.5895318272013),
+QuadraturePoint(0.0165275759573/2,0.0356362876880,0.3681256217699),
+QuadraturePoint(0.0166847554451/2,0.5887548164804,0.0359968962541),
+QuadraturePoint(0.0167409312985/2,0.0373308082182,0.6790704673533),
+QuadraturePoint(0.0168674663361/2,0.2820769993374,0.0373639992361),
+QuadraturePoint(0.0168882230165/2,0.6819277603320,0.2803330345725),
+QuadraturePoint(0.0172087112691/2,0.0374938324382,0.2634016180014),
+QuadraturePoint(0.0174681068264/2,0.6984079204127,0.0364154673322),
+QuadraturePoint(0.0176663899614/2,0.2654390894079,0.6980717436193),
+QuadraturePoint(0.0182967621475/2,0.1429848440800,0.7612254618453),
+QuadraturePoint(0.0183576852459/2,0.7623554007647,0.0943741220275),
+QuadraturePoint(0.0186392569521/2,0.0934222022749,0.1479799836832),
+QuadraturePoint(0.0189781060590/2,0.5759004479923,0.3821329641698),
+QuadraturePoint(0.0191847922578/2,0.3822427332525,0.0426716362301),
+QuadraturePoint(0.0194080442044/2,0.0411414081675,0.5718082874432),
+QuadraturePoint(0.0194720072193/2,0.0802462538379,0.7702204382042),
+QuadraturePoint(0.0200855080495/2,0.7625229819410,0.1559420577362),
+QuadraturePoint(0.0201673909332/2,0.1524941445131,0.0842965421322),
+QuadraturePoint(0.0221742162761/2,0.0622159195833,0.4538181318873),
+QuadraturePoint(0.0229702440508/2,0.1109539036076,0.4586014071171),
+QuadraturePoint(0.0233465117399/2,0.4575627212057,0.4795313560210),
+QuadraturePoint(0.0234883135338/2,0.4322865136374,0.1230591237472),
+QuadraturePoint(0.0240682099018/2,0.5865002850241,0.0834119779793),
+QuadraturePoint(0.0240910792953/2,0.0869359250818,0.6755677013351),
+QuadraturePoint(0.0245677049481/2,0.0929594906936,0.2326500892727),
+QuadraturePoint(0.0246536315719/2,0.6661932141454,0.2448294007406),
+QuadraturePoint(0.0246756530052/2,0.4780306362227,0.0661749044835),
+QuadraturePoint(0.0249704602710/2,0.4372215294577,0.4442145585244),
+QuadraturePoint(0.0250026544082/2,0.6779224504669,0.0929096534577),
+QuadraturePoint(0.0250490869426/2,0.2423431255660,0.0889793655129),
+QuadraturePoint(0.0250936250125/2,0.2288925420305,0.6780053081672),
+QuadraturePoint(0.0251482076226/2,0.3315065049959,0.5847381559741),
+QuadraturePoint(0.0255010290447/2,0.3424200526607,0.5139245722736),
+QuadraturePoint(0.0256544511979/2,0.0862630046475,0.3340976249234),
+QuadraturePoint(0.0257974750630/2,0.5113188946635,0.1380154720554),
+QuadraturePoint(0.0270007753993/2,0.1538977841001,0.6788062619562),
+QuadraturePoint(0.0274431536844/2,0.6779951348472,0.1663358925269),
+QuadraturePoint(0.0277072401488/2,0.1664600469411,0.1582214504849),
+QuadraturePoint(0.0278284415364/2,0.0950910318888,0.5666590332543),
+QuadraturePoint(0.0287207381105/2,0.3436048136712,0.0978960873457),
+QuadraturePoint(0.0288826834956/2,0.5560417025366,0.3468917820947),
+QuadraturePoint(0.0293302729759/2,0.1452404029513,0.3599534491052),
+QuadraturePoint(0.0318902879557/2,0.1619685156238,0.5810131373330),
+QuadraturePoint(0.0319083660286/2,0.5800164844262,0.2560674640672),
+QuadraturePoint(0.0320938960329/2,0.2450201223288,0.5881469552102),
+QuadraturePoint(0.0321618608780/2,0.2557621891794,0.1652244065047),
+QuadraturePoint(0.0322424127534/2,0.2205239985511,0.3496507466106),
+QuadraturePoint(0.0327072446421/2,0.4940183111285,0.2549448448453),
+QuadraturePoint(0.0329946316695/2,0.2531570689798,0.2543369115017),
+QuadraturePoint(0.0331828096025/2,0.5846891116357,0.1666603916479),
+QuadraturePoint(0.0334857162651/2,0.1660333602278,0.2523240191705),
+QuadraturePoint(0.0335468472792/2,0.2505426292461,0.4959007627528),
+QuadraturePoint(0.0337049042988/2,0.3519336802182,0.1805380367800),
+QuadraturePoint(0.0340361462767/2,0.3502668835419,0.4358582329881),
+QuadraturePoint(0.0342465235323/2,0.4400892485512,0.2120576104941),
+QuadraturePoint(0.0345528817251/2,0.4680855471546,0.3552681570774),
+QuadraturePoint(0.0356782875703/2,0.1770237763947,0.4670352922266),
+QuadraturePoint(0.0364656225016/2,0.3900920779501,0.3323152819300),
+QuadraturePoint(0.0365172708706/2,0.2805847774120,0.3898041176680),
+QuadraturePoint(0.0371924811018/2,0.3361523347440,0.2778500044356),
+};
+const QuadratureFormular QuadratureFormular_T_25(25 ,120,P_QuadratureFormular_T_25);
+
++<<<<<<< HEAD
++=======
++// Hack to do something at initialisation time
++// to add the name myfunction to the freefem++ table
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+template<class Rd>
+const GQuadratureFormular<Rd> * BuilQFd(const long & nex,const KNM_<double> & qf) {
+ ffassert( qf.M()== Rd::d+1) ;
+ int np = qf.N();
+ GQuadraturePoint<Rd> *pq= new GQuadraturePoint<Rd>[np];
+ for(int i=0;i<np;++i)
+ {
+ pq[i].a = qf(i,0);
+ for(int j=0;j<Rd::d;++j)
+ pq[i][j]=qf(i,j+1);
+ // cout << i << " " << pq[i].a << " " << (const Rd&) pq[i] << " " << qf(':',i) << endl;
+ }
+ return new GQuadratureFormular<Rd>(nex,np,pq,true) ;
+}
+
+template<typename T > T* CCopy(T * pr,T p)
+{
+ *pr = p;
+ return pr;
+}
+
+
+template<class Rd>
+const GQuadratureFormular<Rd> ** pBuilQFd(const GQuadratureFormular<Rd> ** const & pr,const long & nex,const KNM_<double> & qf)
+{
+ // cout << "pBuilQFd " << pr << " " << *pr << endl;
+ ffassert(pr );
+ *pr = BuilQFd<Rd>(nex,qf);
+ return pr;
+}
+
+
++<<<<<<< HEAD
++=======
++LOADINIT(Init);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// to add new FreeFem++ type ...
+
+#include "lex.hpp"
+extern mylex *zzzfff;
+
++<<<<<<< HEAD
+static void Load_Init(){
++=======
++Init::Init(){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ /*
+grep QuadratureFormular QF.cpp|grep ^const|awk -F"[_(]" '{print "Global.New(@qf" $3 "pT@,CConstant<const QuadratureFormular *>(&QuadratureFormular_T_"$3"));"}'|sed -e 's/@/"/g'
+ */
+ Global.New("qf11pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_11));
+ Global.New("qf13pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_13));
+ Global.New("qf14pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_14));
+ Global.New("qf16pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_16));
+ Global.New("qf18pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_18));
+ Global.New("qf20pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_20));
+ Global.New("qf21pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_21));
+ Global.New("qf23pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_23));
+ Global.New("qf25pT",CConstant<const QuadratureFormular *>(&QuadratureFormular_T_25));
+ Global.New("qf11pE",CConstant<const QuadratureFormular1d *>(new QuadratureFormular1d(-1+2*11,11,GaussLegendre(11),true)));
+ Global.New("qf12pE",CConstant<const QuadratureFormular1d *>(new QuadratureFormular1d(-1+2*12,12,GaussLegendre(12),true)));
+ Global.New("qf13pE",CConstant<const QuadratureFormular1d *>(new QuadratureFormular1d(-1+2*13,13,GaussLegendre(13),true)));
+
+ Global.Add("QF1d","(",new OneOperator2_<const GQuadratureFormular<R1> *,long,KNM_<double> >(BuilQFd<R1>));
+ Global.Add("QF2d","(",new OneOperator2_<const GQuadratureFormular<R2> *,long,KNM_<double> >(BuilQFd<R2>));
+ Global.Add("QF3d","(",new OneOperator2_<const GQuadratureFormular<R3> *,long,KNM_<double> >(BuilQFd<R3>));
+
+ Dcl_Type<const GQuadratureFormular<R1> **>(::InitializePtr<const GQuadratureFormular<R1> *>,::DeletePtr<const GQuadratureFormular<R1> *>);
+ Dcl_Type<const GQuadratureFormular<R2> **>(::InitializePtr<const GQuadratureFormular<R2> *>,::DeletePtr<const GQuadratureFormular<R2> *>);
+ Dcl_Type<const GQuadratureFormular<R3> **>(::InitializePtr<const GQuadratureFormular<R3> *>,::DeletePtr<const GQuadratureFormular<R3> *>);
+
+ zzzfff->Add("QF1",atype<const GQuadratureFormular<R1> ** >());
+ zzzfff->Add("QF2",atype<const GQuadratureFormular<R2> ** >());
+ zzzfff->Add("QF3",atype<const GQuadratureFormular<R3> ** >());
+
+ TheOperators->Add("<-",
+ new OneOperator3_<const GQuadratureFormular<R1> **,const GQuadratureFormular<R1> **,long,KNM_<double> >(pBuilQFd<R1>),
+ new OneOperator3_<const GQuadratureFormular<R2> **,const GQuadratureFormular<R2> **,long,KNM_<double> >(pBuilQFd<R2>),
+ new OneOperator3_<const GQuadratureFormular<R3> **,const GQuadratureFormular<R3> **,long,KNM_<double> >(pBuilQFd<R3>)
+
+
+
+ );
+ // cast ** -> *
+ map_type[typeid(const GQuadratureFormular<R1> *).name()]->AddCast( new E_F1_funcT<const GQuadratureFormular<R1> *,const GQuadratureFormular<R1> **>(UnRef<const GQuadratureFormular<R1> *>) );
+ map_type[typeid(const GQuadratureFormular<R2> *).name()]->AddCast( new E_F1_funcT<const GQuadratureFormular<R2> *,const GQuadratureFormular<R2> **>(UnRef<const GQuadratureFormular<R2> *>) );
+ map_type[typeid(const GQuadratureFormular<R3> *).name()]->AddCast( new E_F1_funcT<const GQuadratureFormular<R3> *,const GQuadratureFormular<R3> **>(UnRef<const GQuadratureFormular<R3> *>) );
+
+
+}
+
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/scotch.cpp.orig
index aa9f06b,0000000..504c6e0
mode 100644,000000..100644
--- a/examples++-load/scotch.cpp.orig
+++ b/examples++-load/scotch.cpp.orig
@@@ -1,152 -1,0 +1,164 @@@
+// SUMMARY : add interface with partionning library scotch
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : P. Jolivet
+// E-MAIL : Pierre Jolivet <pierre.jolivet at ljll.math.upmc.fr>
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ */
+// for automatic compilation with ff-c++
+//ff-c++-LIBRARY-dep: scotch
+//ff-c++-cpp-dep:
+//
+//
+// P. Jolivet april 2012
+// ----------------------------
+
+
+#include "ff++.hpp"
+#include <vector>
+#include <cmath>
+#include <scotch.h>
+
+template<class T, class V>
+class SCOTCH_Op : public E_F0mps {
+ public:
+ Expression partition;
+ Expression Th;
+ Expression lpartition;
+ static const int n_name_param = 1;
+ static basicAC_F0::name_and_type name_param[];
+ Expression nargs[n_name_param];
+ SCOTCH_Op(const basicAC_F0& args, Expression param1, Expression param2, Expression param3) : partition(param1), Th(param2), lpartition(param3) {
+ args.SetNameParam(n_name_param, name_param, nargs);
+ }
+
+ AnyType operator()(Stack stack) const;
+};
+
+// FFCS - keywords/dumptable is not able to scan class names if they contain spaces, even in template arguments
+template<class T, class V>
+basicAC_F0::name_and_type SCOTCH_Op<T,V>::name_param[] = {
+ {"weight", &typeid(KN<long>*)}
+};
+
+
+template<class T, class V>
+class SCOTCH : public OneOperator {
+ public:
+ SCOTCH() : OneOperator(atype<long>(), atype<KN<long>* >(), atype<V>(), atype<long>()) {}
+
+ E_F0* code(const basicAC_F0& args) const
+ {
+ return new SCOTCH_Op<T, V>(args, t[0]->CastTo(args[0]), t[1]->CastTo(args[1]), t[2]->CastTo(args[2]));
+ }
+};
+
+
+template<class T, class V>
+AnyType SCOTCH_Op<T, V>::operator()(Stack stack) const {
+ T* pTh = GetAny<T*>((*Th)(stack));
+ ffassert(pTh);
+ int nt = pTh->nt;
+ KN<long>* part = GetAny<KN<long>* >((*partition)(stack));
+ ffassert(part);
+
+ int nve = T::Rd::d+1;
+ long lpart = GetAny<long>((*lpartition)(stack));
+ ffassert(lpart > 1 && part->n == nt && lpart < nt);
+
+ KN<long>* weight = nargs[0] ? GetAny<KN<long>* >((*nargs[0])(stack)) : (KN<long>*) 0;
+
+ SCOTCH_Graph GraphSCOTCH;
+ SCOTCH_Strat StratSCOTCH;
+ SCOTCH_graphInit(&GraphSCOTCH);
+ SCOTCH_stratInit(&StratSCOTCH);
+ SCOTCH_Num baseval = 0;
+ SCOTCH_Num vertnbr = nt;
+ SCOTCH_Num edgenbr;
+ SCOTCH_Num* verttab = new SCOTCH_Num[vertnbr + 1];
+ vector<SCOTCH_Num> edgevec;
+ SCOTCH_Num prev;
+ int cptNode = 0;
+ int cptEdge = 0;
+ int accum = 0;
+ verttab[cptNode++] = baseval;
+ for (int it = 0; it < nt; ++it) {
+ for (int jt = 0; jt < nve; ++jt) {
+ int jtt = jt, itt = pTh->ElementAdj(it, jtt);
+ if( (itt != it) && (itt >= 0) ) {
+ ++accum;
+ edgevec.push_back(baseval + itt);
+ }
+ }
+ verttab[cptNode++] = accum;
+ }
+ edgenbr = accum;
+ SCOTCH_Num* edgetab = &edgevec[0];
+ SCOTCH_Num* velotab;
+
+ if(weight) {
+ velotab = new SCOTCH_Num[nt];
+ for(int i = 0; i < nt; ++i)
+ velotab[i] = (SCOTCH_Num)(*weight)[i];
+ } else
+ velotab = NULL;
+
+ SCOTCH_Num* vendtab = NULL;
+ SCOTCH_Num* vlbltab = NULL;
+ SCOTCH_Num* edlotab = NULL;
+ SCOTCH_graphBuild(&GraphSCOTCH, baseval, vertnbr, verttab, vendtab, velotab, vlbltab, edgenbr, edgetab, edlotab);
+ SCOTCH_graphCheck(&GraphSCOTCH);
+
+ KN<SCOTCH_Num> epart(nt);
+ SCOTCH_graphPart(&GraphSCOTCH, lpart, &StratSCOTCH, epart);
+ SCOTCH_graphExit(&GraphSCOTCH);
+ SCOTCH_stratExit(&StratSCOTCH);
+ *part = epart;
+ delete[] verttab;
+ if(velotab)
+ delete[] velotab;
+
+ return 1L;
+}
+
++<<<<<<< HEAD
+/* class Init {
++=======
++class Init {
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ public:
+ Init();
+};
+
++<<<<<<< HEAD
+Init init;*/
+static void Load_Init( ){
+ Global.Add("scotch", "(", new SCOTCH<Mesh, pmesh>);
+ Global.Add("scotch", "(", new SCOTCH<Mesh3, pmesh3>);
+}
+LOADFUNC(Load_Init)
++=======
++Init init;
++Init::Init( ){
++ Global.Add("scotch", "(", new SCOTCH<Mesh, pmesh>);
++ Global.Add("scotch", "(", new SCOTCH<Mesh3, pmesh3>);
++}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/splitedges.cpp.orig
index 6b67cf2,0000000..90b569f
mode 100644,000000..100644
--- a/examples++-load/splitedges.cpp.orig
+++ b/examples++-load/splitedges.cpp.orig
@@@ -1,248 -1,0 +1,271 @@@
++<<<<<<< HEAD
++=======
++// $Id$
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+#include "ff++.hpp"
+
+ using namespace Fem2D;
+
+Mesh * Split_Edges(Fem2D::Mesh * const & pTh, long *dK)
+{
+ bool v10 = verbosity>10;
+ bool vp = verbosity>1;
+ assert(pTh);
+ const Mesh & Th(*pTh); // le maillage d'origne a decoupe
+ using Fem2D::Triangle;
+ using Fem2D::Vertex;
+ using Fem2D::R2;
+ using Fem2D::BoundaryEdge;
+ using Fem2D::Mesh;
+ // using Fem2D::R;
+ int nbtn =Th.nt;
+ int nbvn =Th.nv;
+ int nebn =Th.neb;
+ for(int k=0;k<Th.nt;++k)
+ for(int e=0;e<3;++e)
+ if( dK[k] & (1<<e)) {
+ nbtn++;
+ int ee(e),kk;
+ kk=Th.ElementAdj(k,ee);
+ // if(kk<0 || kk==k) nebn++; // bug ?????????????????? cas de arete de bord interne ....
+ if (kk<=k) nbvn++;
+ }
+ // bug corrige ????
+ for (int i=0;i<Th.neb;i++)
+ {
+ int ek,k=Th.BoundaryElement(i,ek);
+ if( dK[k] & (1<<ek)) nebn++;
+ }
+ if(vp)
+ cout << " Split_Edges: nbv " << nbvn << " nbtn = " << nbtn << " nebn = " << nebn << endl;
+ int nbv=Th.nv; // nombre de sommet
+ int nbt=Th.nt; // nombre de triangles
+ int neb=Th.neb; // nombre d'aretes fontiere
+ // allocation des nouveaux items du maillage
+ Vertex * v= new Vertex[nbvn];
+ Triangle *t= new Triangle[nbtn];
+ BoundaryEdge *b= new BoundaryEdge[nebn];
+ // generation des nouveaus sommets
+ Vertex *vv=v;
+ // copie des anciens sommets (remarque il n'y a pas operateur de copy des sommets)
+ for (int i=0;i<nbv;i++)
+ {
+ Vertex & V=Th(i);
+ vv->x=V.x;
+ vv->y=V.y;
+ vv->lab = V.lab;
+ vv++;
+ }
+ KNM<int> NGP(3,nbt);
+ // generation des points barycentre dearete a decoupe
+ for (int k=0;k<nbt;k++)
+ for(int e=0;e<3;++e)
+ if( dK[k] & (1<<e)) {
+ int ee(e),kk;
+ kk=Th.ElementAdj(k,ee);
+ if (kk<=k) {
+ Triangle & K=Th[k];
+ int i0=(e+1)%3;
+ int i1=(e+2)%3;
+ R2 A = ( (R2) K[i0] + K[i1]) / 2.;
+ vv->x=A.x;
+ vv->y=A.y;
+ vv->lab = 0;
+ int j=vv-v;
+ NGP(e,k)=j;
+ if( (kk!=k) && (kk >=0 )) NGP(ee,kk)=j;
+ vv++;
+ }
+ }
+ ffassert(vv-v==nbvn);
+ // generation des triangles
+ Triangle *tt= t;
+ int nberr=0;
+
+ for (int k=0;k<nbt;k++)
+ {
+ Triangle & K=Th[k];
+ int j0=Th(k,0),j1=Th(k,1),j2=Th(k,2);
+ int p[]={0,1,2} ;
+ R Le[]={K.lenEdge2(0),K.lenEdge2(1),K.lenEdge2(2)};
+ if(Le[p[0]]<Le[p[1]]) Exchange(p[0],p[1]);
+ if(Le[p[1]]<Le[p[2]]) Exchange(p[1],p[2]);
+ if(Le[p[0]]<Le[p[1]]) Exchange(p[0],p[1]);
+ if(v10) cout << k << " \t " << j0 << " " << j1 << " " << j2 << " ------ " << tt-t << endl;
+ Triangle * t0[]={tt,tt,tt};
+ (*tt++).set(v,j0,j1,j2,Th[k].lab);
+ for(int ie=0;ie<3;++ie)
+ {
+ int e = p[ie];
+ int e1= (e+1)%3, e2=(e+2)%3;
+ Triangle * td = t0[e], &Kd=*td;
+ ffassert(td);
+
+ if( dK[k] & (1<<e)) {
+ Triangle *tn=tt++;
+ int iee= NGP(e,k);
+ int id[]={ int(&(Kd[0])-v),int(&(Kd[1])-v), int(&(Kd[2])-v)};
+ int in[]={ id[0],id[1],id[2]};
+ id[e1]=iee;
+ in[e2]=iee;
+
+
+ if(v10) cout << k << " \t " << in[0] << " " << in[1] << " " <<in[2] << " nn " << tn-t << " " << Le[e] << endl;
+ (*td).set(v,id[0],id[1],id[2],Th[k].lab);
+ if(v10) cout << k << " \t " << id[0] << " " << id[1] << " " <<id[2] << " dd " << td-t << endl;
+ (*tn).set(v,in[0],in[1],in[2],Th[k].lab);
+ t0[e]=0; // done ..
+ if( t0[e1] && t0[e2])
+ {
+ t0[e1]= td;
+ t0[e2]= tn;
+ }
+ }}
+ }
+ ffassert(tt-t==nbtn);
+ // les arete frontieres qui n'ont pas change
+ BoundaryEdge * bb=b;
+ for (int i=0;i<neb;i++)
+ {
+ int ek,k=Th.BoundaryElement(i,ek);
+ int i1=Th(Th.bedges[i][0]);
+ int i2=Th(Th.bedges[i][1]);
+ int lab=Th.bedges[i].lab;
+ if( dK[k] & (1<<ek)) {
+ int iee= NGP(ek,k);
+ assert(iee>0);
+ if(v10) cout << " " << i1 << " " << iee << " " << i2 << " " << lab << " " << endl;
+ *bb++ = BoundaryEdge(v,i1,iee,lab);
+ *bb++ = BoundaryEdge(v,iee,i2,lab);
+ }
+ else
+ *bb++ = BoundaryEdge(v,i1,i2,lab);
+ }
+ ffassert(bb-b==nebn);
+ // generation de la class Mesh a partir des 3 tableaux : v,t,b
+ {
+ Mesh * m = new Mesh(nbvn,nbtn,nebn,v,t,b);
+ R2 Pn,Px;
+ m->BoundingBox(Pn,Px);
+ m->quadtree=new Fem2D::FQuadTree(m,Pn,Px,m->nv);
+ m->decrement();
+ return m;
+ }
+}
+
+// truc pour que la fonction
++<<<<<<< HEAD
+// static void Load_Init() soit appele a moment du chargement dynamique
+// du fichier
+//
+/* class Init { public:
+ Init();
+};
+*/
++=======
++// Init::Init() soit appele a moment du chargement dynamique
++// du fichier
++//
++class Init { public:
++ Init();
++};
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+class SplitEdges : public E_F0mps
+{
+public:
+ typedef pmesh Result;
+ Expression expTh;
+ Expression spt;
+
+ SplitEdges(const basicAC_F0 & args)
+ {
+
+ args.SetNameParam();
+ expTh= to<pmesh>(args[0]); // a the expression to get the mesh
+ spt= to<double>(args[1]); // a the expression to get the mesh
+ }
+ static ArrayOfaType typeargs()
+ { return ArrayOfaType(
+ atype<pmesh>(),
+ atype<double>());
+ }
+ static E_F0 * f(const basicAC_F0 & args){ return new SplitEdges(args);}
+ AnyType operator()(Stack s) const ;
+
+};
+
+
+AnyType SplitEdges::operator()(Stack stack) const
+ {
+ Mesh * pTh = GetAny<pmesh>((*expTh)(stack));
+ MeshPoint *mp(MeshPointStack(stack)) , mps=*mp;
+ bool v10= verbosity>10;
+ ffassert(pTh);
+ Mesh & Th(*pTh);
+ KN<long> dK(Th.nt);
+ dK=0L;
+ int ne=0;
+ for (int k=0;k<Th.nt;k++)
+ for (int e=0;e<3;e++)
+ {
+ Triangle &K=Th[k];
+ int e1=(e+1)%3;
+ int e2=(e+2)%3;
+ R2 P1=K[e1],P2=K[e2];
+ R2 P=(P1+P2)/2.;
+ MeshPointStack(stack)->set(P.x,P.y);
+ double de = fabs(GetAny<double>((*spt)(stack)));
+ bool be= fabs(de)>1e-30;
+ if(be)
+ {
+ dK[k] += (1<<e);
+ ne++;
+ }
+
+ if(v10) cout << k << " " << e << " f " << P << " = " << de << " " << be << " " << dK[k] << " " << (1<<e) << endl;
+ int ee(e),kk;
+ kk=Th.ElementAdj(k,ee);
+ if( (kk<k) && (kk>=0))
+ {
+ bool bee = dK[kk] & (1<<ee);
+ if( bee != be) {
+ cout << " Bizarre edge right != compatible left " << k << " " << e << " P = " << P << " kk " << kk << " " << ee << " " << dK[kk] <<endl;
+ dK[k] = dK[k] | (1<<e);
+ dK[kk] = dK[kk] | (1<<ee);
+ }}
+ }
+ if(verbosity>0)
+ cout << " SplitEdges: nb split edge = " << ne << endl;
+ *mp=mps;
+ return SetAny<pmesh>( Split_Edges(pTh,(long *) dK));
+ }
+
++<<<<<<< HEAD
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++
++Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if (verbosity)
+ cout << " lood: Split3 " << endl;
+ Global.Add("SplitEdgeMesh","(", new OneOperatorCode<SplitEdges >( ));
+ // utilisation
+ // mesh Th,Th3;
+ // ... construction du maillage Th ici
+ // Th3=splitmesh3(Th);
+ /* example complet : splitmesh3.edp
+ load "splitedge"
+ mesh Th=square(5,5);
+ mesh Th3=SplitEdgeMesh(Th,x<0.51 && y < 0.49 );
+ plot(Th3,wait=1);
+ */
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/splitmesh3.cpp.orig
index bc6657a,0000000..f35ba9c
mode 100644,000000..100644
--- a/examples++-load/splitmesh3.cpp.orig
+++ b/examples++-load/splitmesh3.cpp.orig
@@@ -1,115 -1,0 +1,131 @@@
+// $Id$
+
+#include <iostream>
+#include <cfloat>
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+using namespace std;
+#include "rgraph.hpp"
+#include "RNM.hpp"
+#include <fem.hpp>
+#include <cmath>
+
+ using namespace Fem2D;
+
+Mesh * SplitMesh3(Fem2D::Mesh * const & pTh)
+{
+ assert(pTh);
+ const Mesh & Th(*pTh); // le maillage d'origne a decoupe
+ using Fem2D::Triangle;
+ using Fem2D::Vertex;
+ using Fem2D::R2;
+ using Fem2D::BoundaryEdge;
+ using Fem2D::Mesh;
+ // using Fem2D::R;
+ int nbv=Th.nv; // nombre de sommet
+ int nbt=Th.nt; // nombre de triangles
+ int neb=Th.neb; // nombre d'aretes fontiere
+ // allocation des nouveaux items du maillage
+ Vertex * v= new Vertex[nbv+nbt];
+ Triangle *t= new Triangle[nbt*3];
+ BoundaryEdge *b= new BoundaryEdge[neb];
+ // generation des nouveaus sommets
+ Vertex *vv=v;
+ // copie des anciens sommets (remarque il n'y a pas operateur de copy des sommets)
+ for (int i=0;i<nbv;i++)
+ {
+ Vertex & V=Th(i);
+ vv->x=V.x;
+ vv->y=V.y;
+ vv->lab = V.lab;
+ vv++;
+ }
+ // generation des points barycentre de trianngles
+ for (int k=0;k<nbt;k++)
+ {
+ Triangle & K=Th[k];
+ R2 G= ( (R2) K[0] + K[1] + K[2] ) / 3.;
+ vv->x=G.x;
+ vv->y=G.y;
+ vv->lab = 0;
+ vv++;
+ }
+
+ // generation des triangles
+ Triangle *tt= t;
+ int nberr=0;
+
+ for (int i=0;i<nbt;i++)
+ {
+ int i0=Th(i,0), i1=Th(i,1),i2=Th(i,2);
+ int ii = nbv + i; // numero du
+ // les 3 triangles par triangles origines
+ (*tt++).set(v,ii,i1,i2,Th[i].lab);
+ (*tt++).set(v,i0,ii,i2,Th[i].lab);
+ (*tt++).set(v,i0,i1,ii,Th[i].lab);
+ }
+
+ // les arete frontieres qui n'ont pas change
+ BoundaryEdge * bb=b;
+ for (int i=0;i<neb;i++)
+ {
+ int i1=Th(Th.bedges[i][0]);
+ int i2=Th(Th.bedges[i][1]);
+ int lab=Th.bedges[i].lab;
+ *bb++ = BoundaryEdge(v,i1,i2,lab);
+ }
+ // generation de la class Mesh a partir des 3 tableaux : v,t,b
+ {
+ Mesh * m = new Mesh(nbv+nbt,nbt*3,neb,v,t,b);
+ R2 Pn,Px;
+ m->BoundingBox(Pn,Px);
+ m->quadtree=new Fem2D::FQuadTree(m,Pn,Px,m->nv);
+ m->decrement();
+ return m;
+ }
+}
+
+// truc pour que la fonction
++<<<<<<< HEAD
+// static void Load_Init() soit appele a moment du chargement dynamique
+// du fichier
+//
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++// Init::Init() soit appele a moment du chargement dynamique
++// du fichier
++//
++class Init { public:
++ Init();
++};
++
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++
++Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if (verbosity)
+ cout << " lood: Split3 " << endl;
+ Global.Add("splitmesh3","(",new OneOperator1_<Mesh *,Mesh *>(SplitMesh3));
+ // utilisation
+ // mesh Th,Th3;
+ // ... construction du maillage Th ici
+ // Th3=splitmesh3(Th);
+ /* example complet : splitmesh3.edp
+ load "splitmesh3"
+ mesh Th=square(5,5);
+ mesh Th3=splitmesh3(Th);
+ plot(Th3,wait=1);
+ */
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/splitmesh6.cpp.orig
index 4198715,0000000..9c63d05
mode 100644,000000..100644
--- a/examples++-load/splitmesh6.cpp.orig
+++ b/examples++-load/splitmesh6.cpp.orig
@@@ -1,162 -1,0 +1,178 @@@
+// $Id$
+
+#include <iostream>
+#include <cfloat>
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+using namespace std;
+#include "rgraph.hpp"
+#include "RNM.hpp"
+#include <fem.hpp>
+#include <cmath>
+
+ using namespace Fem2D;
+
+Mesh * SplitMesh6(Fem2D::Mesh * const & pTh)
+{
+ assert(pTh);
+ const Mesh & Th(*pTh); // le maillage d'origne a decoupe
+ using Fem2D::Triangle;
+ using Fem2D::Vertex;
+ using Fem2D::R2;
+ using Fem2D::BoundaryEdge;
+ using Fem2D::Mesh;
+ // using Fem2D::R;
+ int nbv=Th.nv; // nombre de sommet
+ int nbt=Th.nt; // nombre de triangles
+ int neb=Th.neb; // nombre d'aretes fontiere
+ // allocation des nouveaux items du maillage
+ int nbe = 0;
+ for(int k=0; k <nbt; ++k)
+ for (int e = 0; e<3;++e)
+ {
+ int ee=e;
+ int kk = Th.ElementAdj(k,ee);
+ if( kk<=k) nbe++;
+ }
+ Vertex * v= new Vertex[nbv+nbt+nbe];
+ Triangle *t= new Triangle[nbt*6];
+ BoundaryEdge *b= new BoundaryEdge[neb*2];
+ // generation des nouveaus sommets
+ Vertex *vv=v;
+ KN<int> mm(3*nbt);
+ // copie des anciens sommets (remarque il n'y a pas operateur de copy des sommets)
+ for (int i=0;i<nbv;i++)
+ {
+ Vertex & V=Th(i);
+ vv->x=V.x;
+ vv->y=V.y;
+ vv->lab = V.lab;
+ vv++;
+ }
+ // generation des points barycentre de trianngles
+ for (int k=0;k<nbt;k++)
+ {
+ Triangle & K=Th[k];
+ R2 G= ( (R2) K[0] + K[1] + K[2] ) / 3.;
+ vv->x=G.x;
+ vv->y=G.y;
+ vv->lab = 0;
+ vv++;
+ }
+// generation des milieux des cote
+ int nn=0;
+ for(int k=0; k <nbt; ++k)
+ for (int e = 0; e<3;++e)
+ {
+ int ee=e;
+ int kk = Th.ElementAdj(k,ee);
+ if( (kk>=k) || (kk <0) ) {
+ int v0=Th(k,EdgesVertexTriangle[e][0]);
+ int v1=Th(k,EdgesVertexTriangle[e][1]);
+ R2 M = ((R2) Th(v0) + Th(v1)) /2.;
+ int lab=0;
+ BoundaryEdge *be=Th.TheBoundaryEdge(v0,v1);
+ if( be)
+ {
+ lab= be->lab;
+ }
+
+ vv->x=M.x;
+ vv->y=M.y;
+ vv->lab = lab;
+
+ mm[k*3+e]= vv-v;// numero du sommet
+ vv++;
+ nn++;
+ }
+ else mm[k*3+e] = mm[kk*3+ee];
+ }
+ cout << " nb edge = " << nbe << " == " << nn << endl;
+ ffassert(nbe==nn);
+
+ // generation des triangles
+ Triangle *tt= t;
+ int nberr=0;
+
+ for (int i=0;i<nbt;i++)
+ {
+ int i0=Th(i,0), i1=Th(i,1),i2=Th(i,2);
+ int j0=mm[i*3], j1=mm[i*3+1],j2=mm[i*3+2];
+ int ii = nbv + i; // numero du
+ // les 3 triangles par triangles origines
+ (*tt++).set(v,ii,i1,j0,Th[i].lab);
+ (*tt++).set(v,ii,j0,i2,Th[i].lab);
+ (*tt++).set(v,i0,ii,j1,Th[i].lab);
+ (*tt++).set(v,j1,ii,i2,Th[i].lab);
+ (*tt++).set(v,i0,j2,ii,Th[i].lab);
+ (*tt++).set(v,j2,i1,ii,Th[i].lab);
+ }
+
+ // les arete frontieres qui n'ont pas change
+ BoundaryEdge * bb=b;
+ for (int i=0;i<neb;i++)
+ {
+ int ki;
+ int k=Th.BoundaryElement(i,ki);
+ int i1=Th(Th.bedges[i][0]);
+ int i2=Th(Th.bedges[i][1]);
+ int ii = mm[3*k+ki];
+ int lab=Th.bedges[i].lab;
+ *bb++ = BoundaryEdge(v,i1,ii,lab);
+ *bb++ = BoundaryEdge(v,ii,i2,lab);
+ }
+ // generation de la class Mesh a partir des 3 tableaux : v,t,b
+ {
+ Mesh * m = new Mesh(nbv+nbt+nbe,nbt*6,neb*2,v,t,b);
+ R2 Pn,Px;
+ m->BoundingBox(Pn,Px);
+ m->quadtree=new Fem2D::FQuadTree(m,Pn,Px,m->nv);
+ m->decrement();
+ return m;
+ }
+}
+
+// truc pour que la fonction
++<<<<<<< HEAD
+// static void Load_Init() soit appele a moment du chargement dynamique
+// du fichier
+//
+/* class Init { public:
+ Init();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
++// Init::Init() soit appele a moment du chargement dynamique
++// du fichier
++//
++class Init { public:
++ Init();
++};
++
++LOADINIT(Init); // une variable globale qui serat construite au chargement dynamique
++
++Init::Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if (verbosity)
+ cout << " lood: Split6 " << endl;
+ Global.Add("splitmesh6","(",new OneOperator1_<Mesh *,Mesh *>(SplitMesh6));
+ // utilisation
+ // mesh Th,Th3;
+ // ... construction du maillage Th ici
+ // Th3=splitmesh3(Th);
+ /* example complet : splitmesh3.edp
+ load "splitmesh3"
+ mesh Th=square(5,5);
+ mesh Th3=splitmesh3(Th);
+ plot(Th3,wait=1);
+ */
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/symmetrizeCSR.cpp.orig
index 3903c08,0000000..aecb29b
mode 100644,000000..100644
--- a/examples++-load/symmetrizeCSR.cpp.orig
+++ b/examples++-load/symmetrizeCSR.cpp.orig
@@@ -1,80 -1,0 +1,90 @@@
+// SUMMARY : remove the upper part of a CSR if the supplied matrix is not symmetric
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : P. Jolivet
+// E-MAIL : Pierre Jolivet <pierre.jolivet at ljll.math.upmc.fr>
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ */
+
+#include "ff++.hpp"
+
+template<class T>
+long symmetrizeCSR(Matrice_Creuse<T>* const &A) {
+ MatriceMorse<T>* mA = static_cast<MatriceMorse<T>*>(&(*A->A));
+ if(!mA->symetrique) {
+ mA->symetrique = true;
+ std::vector<int> cl;
+ std::vector<T> a;
+ a.reserve(mA->nbcoef);
+ cl.reserve(mA->nbcoef);
+ unsigned int save = mA->lg[0];
+ for(unsigned int i = 0; i < mA->n; ++i) {
+ for(unsigned int j = save; j < mA->lg[i + 1]; ++j) {
+ int col = mA->cl[j];
+ if(col <= i) {
+ T val = mA->a[j];
+ if(abs(val) > 1e-14) {
+ a.push_back(val);
+ cl.push_back(col);
+ }
+ }
+ else
+ break;
+ }
+ save = mA->lg[i + 1];
+ mA->lg[i + 1] = cl.size();
+ }
+ delete [] mA->cl;
+ delete [] mA->a;
+ int* col = new int[cl.size()];
+ T* val = new T[cl.size()];
+ for(unsigned int i = 0; i < cl.size(); ++i) {
+ col[i] = cl[i];
+ val[i] = a[i];
+ }
+ mA->cl = col;
+ mA->a = val;
+ mA->nbcoef = cl.size();
+ }
+ return 1L;
+}
+
++<<<<<<< HEAD
+/* class Init {
++=======
++class Init {
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ public:
+ Init();
+};
+
+Init init;
++<<<<<<< HEAD
+*/
+static void Load_Init() {
+ Global.Add("symmetrizeCSR", "(", new OneOperator1_<long, Matrice_Creuse<double>* >(symmetrizeCSR<double>));
+}
+LOADFUNC(Load_Init)
++=======
++Init::Init() {
++ Global.Add("symmetrizeCSR", "(", new OneOperator1_<long, Matrice_Creuse<double>* >(symmetrizeCSR<double>));
++}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/tetgen.cpp
index ecf90e4,2be86dd..559f62e
--- a/examples++-load/tetgen.cpp
+++ b/examples++-load/tetgen.cpp
@@@ -1598,7 -1598,7 +1598,7 @@@ Mesh3 * ReconstructionRefine_tetgen(cha
}
--// Fonction Refine avec tetgen � l'aide d'une metrique
++// Fonction Refine avec tetgen � l'aide d'une metrique
Mesh3 * ReconstructionRefine_tetgen(char *switch_tetgen,const Mesh3 & Th3,
const int &nbhole, const double *tabhole,
diff --cc examples++-load/tetgen.cpp.orig
index ecf90e4,2be86dd..a559d86
--- a/examples++-load/tetgen.cpp.orig
+++ b/examples++-load/tetgen.cpp.orig
@@@ -2510,13 -2510,13 +2510,23 @@@ AnyType ConvexHull3D_tetg_file_Op::ope
}
++<<<<<<< HEAD
+/* class Init1 { public:
+ Init1();
+};
+
+$1 */
+
+static void Load_Init(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++=======
+ class Init1 { public:
+ Init1();
+ };
+
+ LOADINIT(Init1) // une variable globale qui serat construite au chargement dynamique
+
+ Init1::Init1(){ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
//if (verbosity)
if(verbosity) cout << " load: tetgen " << endl;
@@@ -2533,4 -2533,3 +2543,7 @@@
// a will correct this in next version ...
#define WITH_NO_INIT
#include "msh3.cpp"
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-load/thresholdings.cpp.orig
index 8d35dd4,0000000..3cfa38e
mode 100644,000000..100644
--- a/examples++-load/thresholdings.cpp.orig
+++ b/examples++-load/thresholdings.cpp.orig
@@@ -1,91 -1,0 +1,108 @@@
+// ORIG-DATE: September 2010
+// -*- Mode : c++ -*%
+//
+// SUMMARY : seuillage des matrices EF de freefem++
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// E-MAIL : jacques.morice at ann.jussieu.fr
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+
+#include "ff++.hpp"
+
+//using namespace Fem2D;
+
+template<class T> struct Thresholding{
+ Matrice_Creuse<T> *v;
+ Thresholding( Matrice_Creuse<T> * vv) : v(vv) {}
+ };
+
+template<class R>
+Matrice_Creuse<R> *thresholding2(const Thresholding<R> & t,const double &threshold)
+ {
+ Matrice_Creuse<R> * sparse_mat =t.v;
+ if(sparse_mat)
+ {
+ int n=sparse_mat->N(),m=sparse_mat->M();
+ map<pair<int,int>,R> M;
+ if (n >0 && m>0 && sparse_mat->A)
+ {
+ int nrt = sparse_mat->A->NbCoef();
+ sparse_mat->A->addMatTo(R(1.),M,false,0,0,false,threshold);
++<<<<<<< HEAD
+ // (M)[make_pair(n-1,m-1)]+=R();
++=======
++ (M)[make_pair(n-1,m-1)]+=R();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ bool sym=false; // bof bof
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::GMRES); // none square matrice (morse)
+ sparse_mat->A.master(new MatriceMorse<R>(n,m,M,sym));
+ nrt-=sparse_mat->A->NbCoef();
+ if(verbosity) cout << " thresholding= remove " << nrt << " them in the matrix " << sparse_mat << " " << threshold << endl;
+ }
+ else if(verbosity) cout << " empty matrix " <<sparse_mat << endl;
+ }
+ return t.v;
+ }
+
+template<class T>
+Thresholding<T> to_Thresholding( Matrice_Creuse<T> *v){ return Thresholding<T>(v);}
+
+
++<<<<<<< HEAD
+/* class Init1 { public:
+ Init1();
+};
+
+$1 */
+
+static void Load_Init()
++=======
++class Init1 { public:
++ Init1();
++};
++
++LOADINIT(Init1) // une variable globale qui serat construite au chargement dynamique
++
++Init1::Init1()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{ // le constructeur qui ajoute la fonction "splitmesh3" a freefem++
+ typedef Thresholding<double> TMR ;
+ typedef Thresholding<Complex> TMC ;
+ typedef Matrice_Creuse<double> MR ;
+ typedef Matrice_Creuse<Complex> MC ;
+ Dcl_Type< TMR > ();
+ Dcl_Type< TMC > ();
+ TMR t(0);
+ thresholding2(t,0.);
+ Add<MR *>("thresholding",".",new OneOperator1< TMR ,MR *>(to_Thresholding));
+ Add<TMR >("(","",new OneOperator2_<MR *, TMR , double >(thresholding2));
+ Add<MC *>("thresholding",".",new OneOperator1< TMC ,MC *>(to_Thresholding));
+ Add<TMC >("(","",new OneOperator2_<MC *, TMC, double >(thresholding2));
+
+}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/DDM-Schwarz-macro.idp.orig
index 8843a72,0000000..c7fbae2
mode 100644,000000..100644
--- a/examples++-mpi/DDM-Schwarz-macro.idp.orig
+++ b/examples++-mpi/DDM-Schwarz-macro.idp.orig
@@@ -1,396 -1,0 +1,406 @@@
+// MPIGMRSmacro.idp file.. version 0.1
+// include in MPIGMRES.edp file ..
+// Frederic Hecht 2010
+// LGPL licence
+// Author Frederic.Hecht at upmc.fr
+// -------------------------------
+
+// macro to def // send-recv message
+// -----------------------------------
+
+/******************************************************************/
+func real maxM(matrix & A)
+ {
+ int[int] I(1),J(1);
+ real[int] C(1);
+ [I,J,C] =A;
+ return C.max ;
+ }
+
+/******************************************************************/
+macro InitU(n,Vh,Th,aTh,U)
+Vh[int] U(n);
+for(int j=0;j<n;++j)
+ {
+ Th=aTh[j];
+ U[j]=0;
+ }
+//EOM
+
+/******************************************************************/
+macro ISendRecvAny(comm,jpart,Si,Ri)
+{ /* sorry no Irecv of complex objet ...*/
+ int n= jpart.n,nn=n+n;
+ if(vdebug) cout << mpirank << " --ISendRecvAny " << n << endl;
+ mpiRequest[int] rq(nn);
+
+ for (int j=0;j<n;++j)
+ Irecv(processor(jpart[j],comm,rq[j]),Ri[j]);
+ if(vdebug) cout << mpirank << " ++ISendRecvAny " << n << endl;
+
+ for (int j=0;j<n;++j)
+ Isend(processor(jpart[j],comm,rq[n+j]),Si[j]);
+for (int j=0;j<nn;++j)
+ {
+ int k= mpiWaitAny(rq);
+ if(vdebug)
+ cout << " ++ISendRecvAny wait: get " << k << endl;
+ }
+}
+//EOM
+
+/******************************************************************/
+macro SendRecvAny(comm,jpart,Si,Ri)
+{ verbosity=200;
+ int n= jpart.n;
+ for (int j=0;j<n;++j)
+ processor(comm,jpart[j]) << Si[j];
+ cout << " ** wait revc " << endl;
+ for (int j=0;j<n;++j)
+ processor(comm,jpart[j]) >> Ri[j];
+}
+// EOM
+
+/******************************************************************/
+macro CheckUV(comm,jpart,Si,Ri)
+{
+ int n= jpart.n;
+ int[int] rn(n),sn(n),in(n);
+ for (int j=0;j<n;++j)
+ { sn[j]= Si[j][].n;
+ processor(jpart[j],comm) << sn[j];
+ processor(jpart[j],comm) << ipart;
+ }
+ for (int j=0;j<n;++j)
+ processor(jpart[j],comm) >> rn[j];
+ for (int j=0;j<n;++j)
+ processor(jpart[j],comm) >> in[j];
+
+ int err=0;
+ for (int j=0;j<n;++j)
+ {
+ int rj=Ri[j][].n;
+ err += rj != rn[j];
+ cout << rj << " s ========= r " << rn[j] << " " << ipart << " <-> " << in[j] << " " << err << endl;
+
+ }
+ assert(err==0);
+}//EOM
+
+/******************************************************************/
+macro SendRecvUV(comm,jpart,Si,Ri)
+{
+ int n= jpart.n;
+ mpiRequest[int] rq(n);
+ for (int j=0;j<n;++j)
+ Irecv(processor(jpart[j],comm,rq[j]), Ri[j][]);
+
+ for (int j=0;j<n;++j)
+ processor(jpart[j],comm) << Si[j][];
+ /* for (int j=0;j<n;++j)
+ processor(jpart[j],comm) >> Ri[j][];*/
+
+ for (int j=0;j<n;++j)
+ int k= mpiWaitAny(rq);
+}
+// EOF
+
+ /* Trick */
+
+/**********************************************************/
+macro BuildPartitioning(sizeoverlaps,mesh,Thg,Thi,aThij,RAS,pii,jpart,comm,vdebug)
+/**********************************************************/
+
+int[int] jpart(mpiSize(comm)); /* list of jpart */
+mesh[int] aThij(1);
+mesh Thi;
+Thi=Thg;
+fespace Vhi(Thi,P1); /**/
+Vhi pii;
+
+{
+ int npart = mpiSize(comm);
+ fespace Phg(Thg,P0);
+ fespace Vhg(Thg,P1);
+
+ int njpart=0;
+ int ipart= mpiRank(comm);
+ /* a good trick : int#mesh = */
+ func intmesh= int2d;
+ func intmesh3=int3d;
+ /* end trick */
+int dplot1 =0;
+int vdebug1 = vdebug;
+Phg part;
+mesh Thin;
+/* build the partitioning ... */
+{
+ int[int] nupart(Thg.nt);
+ nupart=0;
+ if(npart>1 && ipart==0)
+ metisdual(nupart,Thg,npart);
+
+ broadcast(processor(0,comm),nupart);
+ for(int i=0;i<nupart.n;++i)
+ part[][i]=nupart[i];
+
+} /* build ... */
+
+
++<<<<<<< HEAD
+if(vdebug>10&& mpirank==0 && !NoGraphicWindow)
++=======
++if(vdebug>10&& mpirank==0)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ plot(part,fill=1,cmm="dual",wait=1);
+
+/* overlapping partition */
+
+ Phg suppi= abs(part-ipart)<0.1;
+ Vhg unssd; /* boolean function 1 in the subdomain 0 elswhere */
+ Thin=trunc(Thg,suppi>0,label=10); /* non-overlapping mesh, interfaces have label 10 */
+ int nnn = sizeoverlaps*2;/* to be sure */
+ AddLayers(Thg,suppi[],nnn,unssd[]); /* see above ! suppi and unssd are modified */
+ unssd[] *= nnn; /* to put value nnn a 0 */
+ real nnn0 = nnn - sizeoverlaps + 0.001 ;
+ Thi=trunc(Thg,unssd>nnn0 ,label=10); /* overlapping mesh, interfaces have label 10 */
+
+ settt
+
+
+ int npij=npart;
+ Vhi[int] pij(npij);/* local partition of unit + pii */
+
+
+ real nnn1= + 0.001 ;
+ { /*
+ construction of the partition of the unit,
+ let phi_i P1 FE function 1 on Thin and zero ouside of Thi and positive
+ the partition is build with
+ $$ p_i = phi_i/ \sum phi_i
+
+ to build the partition of one domain i
+ we nned to find all j such that supp(phi_j) \cap supp(phi_j) is not empty
+ <=> int phi_j
+ */
+ /* build a local mesh of thii such that all compuation of the unit partition are */
+ /* exact in thii */
+ mesh Thii=trunc(Thg,unssd>nnn1 ,label=10); /* overlapping mesh, interfaces have label 10 */
+
+
+ {
+ /* find all j mes (supp(p_j) \cap supp(p_i)) >0 */
+ /* compute all phi_j on Thii */
+ /* remark supp p_i include in Thi */
+ /* */
+ fespace Phii(Thii,P0);
+ fespace Vhii(Thii,P1);
+ Vhi sumphi=0;
+ jpart=0;
+ njpart=0;
+ int nlayer=RAS?1:sizeoverlaps;
+ if(ipart==0)
+ cout <<" nlayer=" << nlayer << endl;
+ pii= max(unssd-nnn+nlayer,0.)/nlayer;
+ if(dplot1) plot(pii,wait=1,cmm=" 0000");
+ sumphi[] += pii[];
+ if(dplot1) plot(sumphi,wait=1,cmm=" summ 0000");
+ Vhii phii=0;
+ real epsmes=1e-10*Thii.mesure;
+ /*cout << " epsmes = " << epsmes <<endl;*/
+ for (int i=0;i<npart;++i)
+ if(i != ipart )
+ {
+ Phii suppii=abs(i-part)<0.2;
+ if(suppii[].max > 0.5)
+ {
+ AddLayers(Thii,suppii[],nlayer,phii[]);
+ assert(phii[].min >= -1e-10);
+ real interij = int#mesh(Thi)( phii);
+ if(interij>epsmes)
+ {
+ pij[njpart]=abs(phii);
+ if(vdebug1>2) cout << " ***** " << int#mesh(Thi)(real(pij[njpart])<0) << " " <<pij[njpart][].min << " " << phii[].min << endl;
+ assert(int#mesh(Thi)(real(pij[njpart])<0) ==0);
+ if(dplot1) plot(pij[njpart],wait=1,cmm=" j = "+ i + " " + njpart);
+ sumphi[] += pij[njpart][];
+ if(dplot1) plot(sumphi,wait=1,cmm=" sum j = "+ i + " " + njpart);
+ jpart[njpart++]=i;
+ }}}
+
+
+
+ if(dplot1) plot(sumphi,wait=1,dim=3,cmm="sum ",fill=1 );
+ pii[]=pii[] ./ sumphi[];
+ for (int j=0;j<njpart;++j)
+ pij[j][] = pij[j][] ./ sumphi[];
+ jpart.resize(njpart);
+ for (int j=0;j<njpart;++j)
+ assert(pij[j][].max<=1);
+ {
+ cout << ipart << " number of jpart " << njpart << " : ";
+ for (int j=0;j<njpart;++j)
+ cout << jpart[j] << " ";
+ cout << endl;
+ }
+ sumphi[]=pii[];
+ for (int j=0;j<njpart;++j)
+ sumphi[]+= pij[j][];
+ if(vdebug1>2)
+ cout << " sum min " <<sumphi[].min << " " << sumphi[].max << endl;
+ assert(sumphi[].min> 1.-1e-6 && sumphi[].max< 1.+1e-6);
+ /* verification */
+ }}/* (Thii is remove here) */
+ /* end of the construction of the local partition of the unity ... */
+ /* on Thi ... */
+ /* ----------------------------------------------------------------- */
+if(mpiRank(comm)==0) cout << " *** end build partition " << endl;
+
+/* computation of number of intersection .. */
+/* ------------------------------------------ */
+
+/* here pii and the pij is the locate partition of the unite on */
+/* Thi ( mesh with overlap ).... */
+/*Thi=splitmesh(Thi,2); */
+if(dplot1 )
+ { plot(Thi,wait=1);
+ for(int j=0;j<njpart;++j)
+ plot(pij[j],cmm=" j="+j ,wait=1); }
+
+/* Partition of the unity on Thi .. */
+/* computation of message. */
+/* all j> we have to recive */
+/* data on intersection of the support of pij[0] and pij[j] */
+settt
+
+
+
+ aThij.resize(njpart);
+/* construction of the mesh intersect i,j part */
+for(int jp=0;jp<njpart;++jp)
+ aThij[jp] = trunc(Thi,pij[jp]>1e-6,label=10); /* mesh of the supp of pij */
+}
+if(mpiRank(comm)==0) cout << " *** end build mesh intersection " << endl;
+// EOM
+macro defPk1(i,j) i j //
+macro defPk2(i,j) [i j,i#1 j]//
+macro defPk3(i,j) [i j,i#1 j,i#2 j]//
+macro defPk4(i,j) [i j,i#1 j,i#2 j,i#3 j]//
+macro defPk5(i,j) [i j,i#1 j,i#2 j,i#3 j, i#4 j]//
+macro Times1(i) i //
+macro Times2(i) [i,i]//
+macro Times3(i) [i,i,i]//
+macro Times4(i) [i,i,i,i]//
+macro Times5(i) [i,i,i,i,i]//
+macro InitUdef(n,Vh,Th,aTh,U,N)
+Vh[int] defPk#N(U,)(n);
+for(int j=0;j<n;++j)
+ {
+ Th=aTh[j];
+ defPk#N(U,[j])=Times#N(0.);
+ }
+//EOM
+
+
+/******************************************************************/
+macro BuildTransferMat2(ipart,mesh,Pk,N,U2V,Thi,Whi,Whij,Thij,aThij,Usend,Vrecv,jpart,Pii,vdebug)
+/******************************************************************/
+/* construction of transfert matrix
+mesh: mesh or mesh3
+Pk : the Pk def
+N : the number of componant
+Whi: the FE space on Thi (def here)
+Whij: the array of FE on each intersection
+Thij: the mesh variable to change Whij mesh
+aThij: the array of intersect mesh with Thi
+
+jpart[j]: the j th Sub Domain intersecting Thi
+*/
+
+
+matrix[int] sMj(jpart.n), rMj(jpart.n); /* M of send to j */
+fespace Whi(Thi,Pk);
+mesh Thij=Thi;
+fespace Whij(Thij,Pk);/* */
+ matrix Pii;
+{
+
+ int njpart= jpart.n; /* njpart: number of intersection which */
+ Whi defPk#N(wpii,)=Times#N(pii);
+ Pii = wpii[];
+ for(int jp=0;jp<njpart;++jp)
+ {
+ int j=jpart[jp];
+ Thij = aThij[jp];
+ int [int] U2Vdata=[0];
+ matrix I = interpolate(Whij,Whi,U2Vc=U2Vdata); /* Whji <- Whi */
+ sMj[jp] = I*Pii; /* Whi -> s Whij */
+ rMj[jp] = interpolate(Whij,Whi,t=1,U2Vc=U2Vdata); /* Whji -> Whi */
+ if(vdebug>10) {
+ {Whi defPk#N(uuu,)=Times#N(1),defPk#N(vvv,)=Times#N(-1);
+ vvv[]+=I*uuu[]; cout << jp << " %%% " << vvv[].linfty << endl; assert(vvv[].linfty < 1e-6);}
+ {Whi defPk#N(uuu,)=Times#N(1),defPk#N(vvv,)=Times#N(-1) ;
+ vvv[]+=rMj[jp]'*uuu[]; cout << jp << " ### " << vvv[].linfty << endl; assert(vvv[].linfty < 1e-6);}}
+ }}
+if(ipart==0) cout << " *** end build transfert matrix " << endl;
+settt
+
+/* alloc array of send and recv data .. */
+
+InitUdef(jpart.n,Whij,Thij,aThij,Usend,N) /* initU(n,Vh,Th,aTh,U) */
+InitUdef(jpart.n,Whij,Thij,aThij,Vrecv,N) /* ... */
+if(ipart==0) cout << " *** end init data for send/revc " << endl;
+//
+/******************************************************************/
+macro BuildTransferMat(ipart,mesh,Pk,N,U2V,Thi,Whi,Whij,Thij,aThij,Usend,Vrecv,jpart,vdebug)
+ BuildTransferMat2(ipart,mesh,Pk,N,U2V,Thi,Whi,Whij,Thij,aThij,Usend,Vrecv,jpart,Pii,vdebug)
+ //
+/******************************************************************/
+
+
+/******************************************************************/
+// usage uplot is allu or [allu,allu1] :
+macro PLOTMPIALLU(mesh,Pk,defPk, Th, u, uplot, plotparm)
+{ int ver=verbosity;
+ verbosity=0;
++<<<<<<< HEAD
+ if(NoGraphicWindow==0)
+ {
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if(mpirank==0)
+ {
+ mesh Thi=Th;
+ mesh[int] ath(mpisize);
+ fespace Xh(Thi,Pk);
+ Xh[int] defPk(allu,)(mpisize);
+ allu[0][]=u;
+ ath[0]=Th;
+ mpiRequest[int] rq(mpisize);
+ for(int i= 1; i <mpisize;++i)
+ Irecv(processor(i,rq[i]),ath[i]);
+ for (int i=1;i<mpisize;++i)
+ int k= mpiWaitAny(rq);
+ for (int i=1;i<mpisize;++i)
+ { Thi=ath[i];
+ Irecv(processor(i,rq[i]),allu[i][]);}
+ for (int i=1;i<mpisize;++i)
+ int k= mpiWaitAny(rq);
+ plot(uplot,plotparm);
+ }
+ else
+ {
+ processor(0)<<Th;
+ processor(0)<<u;
+ }
+ mpiBarrier(mpiCommWorld);
++<<<<<<< HEAD
+ }
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ verbosity=ver;
+ return true;
+}
+//EOM ...
+/******************************************************************/
+
diff --cc examples++-mpi/MPICG.cpp.orig
index dc7a955,0000000..a5ec545
mode 100644,000000..100644
--- a/examples++-mpi/MPICG.cpp.orig
+++ b/examples++-mpi/MPICG.cpp.orig
@@@ -1,501 -1,0 +1,512 @@@
+// ORIG-DATE: 02/2009
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// E-MAIL : jacques.morice at ann.jussieu.fr
+//
+//ff-c++-LIBRARY-dep: mpi
+//ff-c++-cpp-dep:
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+
+
+#include "mpi.h"
+#include <iostream>
+using namespace std;
+
+#include "ff++.hpp"
+#include "CGNL.hpp"
+//#include "gmres.hpp"
+
+
+template<class R,class DJ,class P>
+int NLCG(const DJ & dJ,const P & C,KN_<R> &x,const int nbitermax, double &eps,long kprint,MPI_Comm * )
+{
+ // -------------
+ assert(&x && &dJ && &C);
+ typedef KN<R> Rn;
+ int n=x.N();
+
+ R ro=1;
+ Rn g(n),h(n),Ah(n), & Cg(Ah); // on utilise Ah pour stocke Cg
+ g=dJ*x;// dJ(x,g);
+ Cg = C*g; // gradient preconditionne
+ h =-Cg;
+ R g2 = (Cg,g);
+ if (g2 < 1e-30)
+ { if(kprint>1)
+ cout << "GCNL g^2 =" << g2 << " < 1.e-30 Nothing to do " << endl;
+ return 2; }
+ if (kprint>5 )
+ cout << " 0 GCNL g^2 =" << g2 << endl;
+ R reps2 =eps >0 ? eps*eps*g2 : -eps; // epsilon relatif
+ eps = reps2;
+ for (int iter=0;iter<=nbitermax;iter++)
+ {
+ ro = argmin(ro,dJ,x,h,g,Ah);
+
+ Cg = C*g;
+ R g2p=g2;
+ g2 = (Cg,g);
+ if ( kprint < nbitermax )
+ cout << "CGNL:" <<iter << ", ro = " << ro << " ||g||^2 = " << g2 << endl;
+ if (g2 < reps2) {
+ if (kprint< nbitermax )
+ cout << "CGNL converge: " << iter <<", ro = " << ro << " ||g||^2 = " << g2 << endl;
+ return 1;// ok
+ }
+ R gamma = g2/g2p;
+ h *= gamma;
+ h -= Cg; // h = -Cg * gamma* h
+ }
+ if(verbosity)
+ cout << " Non convergence of the NL cojugate gradient " <<endl;
+ return 0;
+}
+template<class T> struct MPI_TYPE {};
+template<> struct MPI_TYPE<long> {static const MPI_Datatype TYPE(){return MPI_LONG;}};
+template<> struct MPI_TYPE<int> {static const MPI_Datatype TYPE(){return MPI_INT;}};
+template<> struct MPI_TYPE<double> {static const MPI_Datatype TYPE(){return MPI_DOUBLE;}};
+template<> struct MPI_TYPE<char> {static const MPI_Datatype TYPE(){return MPI_BYTE;}};
+
+template<class R>
+R ReduceSum1(R s,MPI_Comm * comm)
+{
+ R r=0;
+ // nt MPI_Allreduce( void *sendbuf, void *recbuf, int count,
+ // MPI_Datatype datatype, MPI_Op op, MPI_Comm comm )
+ MPI_Allreduce( &s, &r, 1 ,MPI_TYPE<R>::TYPE(), MPI_SUM, *comm );
+ return r;
+}
+
+template<class R,class M,class P>
+int ConjuguedGradient2(const M & A,const P & C,KN_<R> &x,const KN_<R> &b,const int nbitermax, double &eps,long kprint,MPI_Comm * commworld)
+{
+ // ConjuguedGradient2 affine A*x = 0 est toujours appele avec les condition aux limites
+ // -------------
+ throwassert(&x && &A && &C);
+ typedef KN<R> Rn;
+ int n=x.N();
+ // if (verbosity>99) kprint=1;
+ R ro=1;
+ Rn g(n),h(n),Ah(n), & Cg(Ah); // on utilise Ah pour stocke Cg
+ g = A*x;
+ g -= b;
+ Cg = C*g; // gradient preconditionne
+ h =-Cg;
+ R g2 = ReduceSum1((Cg,g),commworld);
+ if (g2 < 1e-30)
+ { if(kprint<=nbitermax)
+ cout << "GC g^2 =" << g2 << " < 1.e-30 Nothing to do " << endl;
+ return 2; }
+ if (kprint<5 )
+ cout << " 0 GC g^2 =" << g2 << endl;
+ R reps2 =eps >0 ? eps*eps*g2 : -eps; // epsilon relatif
+ eps = reps2;
+ for (int iter=0;iter<=nbitermax;iter++)
+ {
+ R rop = ro;
+ x += rop*h; // x+ rop*h , g=Ax (x old)
+ // ((Ah = A*x - b) - g);
+ // Ah -= b; // Ax + rop*Ah = rop*Ah + g =
+ // Ah -= g; // Ah*rop
+ Ah = A*x;
+ Ah -= b; // Ax + rop*Ah = rop*Ah + g =
+ Ah -= g; // Ah*rop
+
+ R hAh =ReduceSum1((h,Ah),commworld);
+ R gh = ReduceSum1((g,h),commworld);
+ if (RNM::norm2(hAh)<1e-100) ExecError("CG2: Matrix is not defined (/0), sorry ");
+ ro = -gh*rop/hAh ; // ro optimal (produit scalaire usuel)
+ x += (ro-rop) *h;
+ g += (ro/rop) *Ah; // plus besoin de Ah, on utilise avec Cg optimisation
+ Cg = C*g;
+ R g2p=g2;
+ g2 = ReduceSum1((Cg,g),commworld);
+ if ( ( (iter%kprint) == kprint-1) )
+ cout << "CG:" <<iter << " ro = " << ro << " ||g||^2 = " << g2 << endl;
+ if (g2 < reps2) {
+ if (kprint <= nbitermax)
+ cout << "CG converges " << iter << " ro = " << ro << " ||g||^2 = " << g2 << endl;
+ return 1;// ok
+ }
+ R gamma = g2/g2p;
+ h *= gamma;
+ h -= Cg; // h = -Cg * gamma* h
+ }
+ // if (itermax <= nbitermax )
+ cout << "CG does'nt converge: " << nbitermax << " ||g||^2 = " << g2 << " reps2= " << reps2 << endl;
+ return 0;
+}
+
+
+template < class Operator, class Vector, class Preconditioner,
+class Matrix, class Real >
+int
+GMRES_MPI(const Operator &A, Vector &x, const Vector &b,
+ const Preconditioner &M, Matrix &H, int &m, int &max_iter,
+ Real &tol,MPI_Comm * commworld,long verbosity)
+{
+ Real resid;
+ int i, j = 1, k;
+ Vector s(m+1), cs(m+1), sn(m+1), w,r,Ax;
+ r=M*b;
+ Real normb = sqrt(ReduceSum1((r,r),commworld));
+
+ Ax=A * x;
+ Ax=b-Ax;
+ r = M*(Ax);
+ Real beta = sqrt(ReduceSum1((r,r),commworld));
+
+ if ( abs(normb) < 1.e-30)
+ normb = 1;
+
+ if ((resid = beta / normb) <= tol) {
+ tol = resid;
+ max_iter = 0;
+ return 0;
+ }
+
+ Vector *v = new Vector[m+1];
+
+ while (j <= max_iter) {
+ v[0] = r / beta;
+ s = 0.0;
+ s(0) = beta;
+
+ for (i = 0; i < m && j <= max_iter; i++, j++) {
+ w = M*(Ax=A * v[i]);
+ for (k = 0; k <= i; k++) {
+ H(k, i) = ReduceSum1((w, v[k]),commworld);
+ w -= H(k, i) * v[k];
+ }
+ H(i+1, i) = sqrt(ReduceSum1((w,w),commworld));
+ v[i+1] = w / H(i+1, i) ;
+
+ for (k = 0; k < i; k++)
+ ApplyPlaneRotation(H(k,i), H(k+1,i), cs(k), sn(k));
+
+ GeneratePlaneRotation(H(i,i), H(i+1,i), cs(i), sn(i));
+ ApplyPlaneRotation(H(i,i), H(i+1,i), cs(i), sn(i));
+ ApplyPlaneRotation(s(i), s(i+1), cs(i), sn(i));
+ if(verbosity>5 || (verbosity>2 && j%100==0) )
+ cout << "GMRES: " << j << " " << abs(s(i+1)) << " " << normb << " "
+ << abs(s(i+1)) / normb << " < " << tol << endl;
+
+ if ((resid = abs(s(i+1)) / normb) < tol) {
+ if(verbosity)
+ cout << "GMRES converges: " << j << " " << abs(s(i+1)) << " " << normb << " "
+ << abs(s(i+1)) / normb << " < " << tol << endl;
+
+ Update(x, i, H, s, v);
+ tol = resid;
+ max_iter = j;
+ delete [] v;
+ return 0;
+ }
+ }
+ if(!(j <= max_iter)) break;
+ Update(x, i-1 , H, s, v);
+ Ax = A*x;
+ Ax = b-Ax;
+
+ r = M*(Ax);
+ beta = sqrt(ReduceSum1((r,r),commworld));
+ if(verbosity>4)
+ cout << "GMRES: restart" << j << " " << beta << " " << normb << " "
+ << beta / normb << " < " << tol << endl;
+ if ((resid = beta / normb) < tol) {
+ tol = resid;
+ max_iter = j;
+ delete [] v;
+ return 0;
+ }
+ }
+
+ if(verbosity)
+ cout << "WARNING: GMRES do not converges: " << j <<"/" << max_iter << ", resid = " << resid
+ << ", tol= " << tol << ", normb "<< normb << endl;
+ tol = resid;
+ delete [] v;
+
+ return 1;
+}
+
+
+template<class R>
+class MPILinearCG : public OneOperator
+{
+public:
+ typedef KN<R> Kn;
+ typedef KN_<R> Kn_;
+ const int cas,CG;
+
+ class MatF_O: VirtualMatrice<R> { public:
+ Stack stack;
+ mutable Kn x;
+ C_F0 c_x;
+ Kn *b;
+
+ Expression mat1,mat;
+ typedef typename VirtualMatrice<R>::plusAx plusAx;
+ MatF_O(int n,Stack stk,const OneOperator * op,Kn *bb=0)
+ : VirtualMatrice<R>(n),stack(stk),
+ x(n),c_x(CPValue(x)),b(bb),
+ mat1(op->code(basicAC_F0_wa(c_x))),
+ mat( CastTo<Kn_>(C_F0(mat1,(aType)*op))) {
+ //ffassert(atype<Kn_ >() ==(aType) *op);
+ // WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+
+ }
+ ~MatF_O() {
+ // cout << " del MatF_O mat " << endl;
+ if(mat1 != mat)
+ delete mat;
+ delete mat1;
+ // cout << " del MatF_Ocx ..." << endl;
+ Expression zzz = c_x;
+ // cout << " zzz "<< zzz << endl;
+ delete zzz;
+ // WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+
+ }
+ void addMatMul(const Kn_ & xx, Kn_ & Ax) const {
+ ffassert(xx.N()==Ax.N());
+ x =xx;
+ Ax += GetAny<Kn_>((*mat)(stack));
+ if(b && &Ax!=b) Ax += *b; // Ax -b => add b (not in cas of init. b c.a.d &Ax == b
+ WhereStackOfPtr2Free(stack)->clean();
+ }
+ plusAx operator*(const Kn & x) const {return plusAx(this,x);}
+ virtual bool ChecknbLine(int n) const { return true;}
+ virtual bool ChecknbColumn(int m) const { return true;}
+
+ };
+
+
+ class E_LCG: public E_F0mps { public:
+ const int cas;// <0 => Nolinear
+ const int CG;
+ static const int n_name_param=7;
+
+ static basicAC_F0::name_and_type name_param[] ;
+
+
+ Expression nargs[n_name_param];
+
+ const OneOperator *A, *C;
+ Expression X,B;
+
+ E_LCG(const basicAC_F0 & args,int cc,int gc) :cas(cc),CG(gc)
+ {
+ args.SetNameParam(n_name_param,name_param,nargs);
+ { const Polymorphic * op= dynamic_cast<const Polymorphic *>(args[0].LeftValue());
+ ffassert(op);
+ A = op->Find("(",ArrayOfaType(atype<Kn* >(),false)); }
+ if (nargs[2])
+ { const Polymorphic * op= dynamic_cast<const Polymorphic *>(nargs[2]);
+ ffassert(op);
+ C = op->Find("(",ArrayOfaType(atype<Kn* >(),false)); }
+ else C =0;
+ X = to<Kn*>(args[1]);
+ if (args.size()>2)
+ B = to<Kn*>(args[2]);
+ else
+ B=0;
+ }
+
+ virtual AnyType operator()(Stack stack) const {
+ int ret=-1;
+
+ // WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+ try {
+ Kn &x = *GetAny<Kn *>((*X)(stack));
+ int n=x.N();
+ double eps = 1.0e-6;
+ int nbitermax= 100;
+ long verb = verbosity;
+
+ pcommworld vcommworld=0;
+ long dKrylov=50;
+ if (nargs[0]) eps= GetAny<double>((*nargs[0])(stack));
+ if (nargs[1]) nbitermax = GetAny<long>((*nargs[1])(stack));
+ if (nargs[3]) eps= *GetAny<double*>((*nargs[3])(stack));
+ if (nargs[4]) vcommworld = GetAny<pcommworld>((*nargs[4])(stack));
+ if (nargs[5]) dKrylov= GetAny<long>((*nargs[5])(stack));
+ if (nargs[6]) verb=Abs(GetAny<long>((*nargs[6])(stack)));
+ long gcverb=51L-Min(Abs(verb),50L);
+ if(verb==0) gcverb = 1000000000;// no print
+
+ MPI_Comm mpiCommWorld = MPI_COMM_WORLD;
+ MPI_Comm * commworld= vcommworld ? (MPI_Comm *) vcommworld: & mpiCommWorld ;
+ KN<R> bzero(B?1:n); // const array zero
+ bzero=R();
+ KN<R> *bb=&bzero;
+ if (B) {
+ Kn &b = *GetAny<Kn *>((*B)(stack));
+ R p = (b,b);
+ if (p)
+ {
+ // ExecError("Sorry MPILinearCG work only with nul right hand side, so put the right hand in the function");
+ }
+ bb = &b;
+ }
+ KN<R> * bbgmres =0;
+ if ( !B && !CG) bbgmres=bb; // none zero if gmres without B
+ MatF_O AA(n,stack,A,bbgmres);
+ if(bbgmres ){
+ *bbgmres= AA* *bbgmres; // Ok Ax == b -> not translation of b .
+ *bbgmres = - *bbgmres;
+ if(verbosity>1) cout << " ** GMRES set b = -A(0); : max=" << bbgmres->max() << " " << bbgmres->min()<<endl;
+ }
+
+ if(CG)
+ {
+
+
+ if (cas<0) {
+ if (C)
+ { MatF_O CC(n,stack,C);
+ ret = NLCG(AA,CC,x,nbitermax,eps, gcverb ,commworld );}
+ else
+ ret = NLCG(AA,MatriceIdentite<R>(n),x,nbitermax,eps, gcverb ,commworld);
+ }
+ else
+ if (C)
+ { MatF_O CC(n,stack,C);
+ ret = ConjuguedGradient2(AA,CC,x,*bb,nbitermax,eps, gcverb ,commworld);}
+ else
+ ret = ConjuguedGradient2(AA,MatriceIdentite<R>(n),x,*bb,nbitermax,eps, gcverb ,commworld);
+ }
+ else {// GMRES
+
+ KNM<R> H(dKrylov+1,dKrylov+1);
+ int k=dKrylov;//,nn=n;
+ if (cas<0) {
+ ErrorExec("NL GMRES: to do! sorry ",1);
+ /* if (C)
+ { MatF_O CC(n,stack,C);
+ ret = NLGMRES(AA,CC,x,nbitermax,eps, 51L-Min(Abs(verbosity),50L) );}
+ else
+ ret = NLGMRES(AA,MatriceIdentite<R>(n),x,nbitermax,eps, 51L-Min(Abs(verbosity),50L));
+ ConjuguedGradient */
+ }
+ else
+ {
+ if (C)
+ { MatF_O CC(n,stack,C);
+ ret=GMRES_MPI(AA,(KN<R> &)x, *bb,CC,H,k,nbitermax,eps,commworld,verb);}
+ else
+ ret=GMRES_MPI(AA,(KN<R> &)x, *bb,MatriceIdentite<R>(n),H,k,nbitermax,eps,commworld,verb);
+ }
+
+ }
+
+
+
+ if( nargs[3]) *GetAny<double*>((*nargs[3])(stack)) = -(eps);
+ }
+ catch(...)
+ {
+ // WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+ throw;
+ }
+ // WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+
+ return SetAny<long>(ret);
+
+ }
+ operator aType () const { return atype<long>();}
+
+ };
+
+ E_F0 * code(const basicAC_F0 & args) const {
+ return new E_LCG(args,cas,CG);}
+
+ MPILinearCG() : OneOperator(atype<long>(),
+ atype<Polymorphic*>(),
+ atype<KN<R> *>(),atype<KN<R> *>()),cas(2),CG(1){}
+
+ MPILinearCG(int cc,int CGG) : OneOperator(atype<long>(),
+ atype<Polymorphic*>(),
+ atype<KN<R> *>(),atype<KN<R> *>()),cas(cc),CG(CGG){}
+
+ MPILinearCG(int cc,int CGG,int ) : OneOperator(atype<long>(),
+ atype<Polymorphic*>(),
+ atype<KN<R> *>()),cas(cc),CG(CGG){}
+
+ MPILinearCG(int cc) : OneOperator(atype<long>(),
+ atype<Polymorphic*>(),
+ atype<KN<R> *>()),cas(cc),CG(1){}
+
+};
+
+
+
+
+template<class R>
+basicAC_F0::name_and_type MPILinearCG<R>::E_LCG::name_param[]= {
+ { "eps", &typeid(double) },
+ { "nbiter",&typeid(long) },
+ { "precon",&typeid(Polymorphic*)},
+ { "veps" , &typeid(double*) },
+ { "comm", &typeid(pcommworld)} ,
+ { "dimKrylov", &typeid(long) },
+ { "verbosity", &typeid(long) }
+};
+
+
+
+
+
++<<<<<<< HEAD
+/* --FH: class Init { public:
++=======
++class Init { public:
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ Init();
+};
+
+LOADINIT(Init);
++<<<<<<< HEAD
+*/
+static void Load_Init()
++=======
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ Global.Add("MPILinearCG","(",new MPILinearCG<R>()); // old form with rhs (must be zer
+ Global.Add("MPIAffineCG","(",new MPILinearCG<R>(1)); // without right handsize
+ Global.Add("MPILinearGMRES","(",new MPILinearCG<R>(0,0)); // with right handsize
+ Global.Add("MPIAffineGMRES","(",new MPILinearCG<R>(0,0,0)); // with right handsize
+ Global.Add("MPINLCG","(",new MPILinearCG<R>(-1)); // without right handsize
+
+}
+
++<<<<<<< HEAD
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/MPIplot.idp.orig
index 28af128,0000000..b78c8f3
mode 100644,000000..100644
--- a/examples++-mpi/MPIplot.idp.orig
+++ b/examples++-mpi/MPIplot.idp.orig
@@@ -1,36 -1,0 +1,42 @@@
+macro PLOTMPIALL(mesh,Pk, Th, u, plotparm)
+{ int ver=verbosity;
+ verbosity=0;
++<<<<<<< HEAD
+ if(NoGraphicWindow==0)
+ {
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if(mpirank==0)
+ {
+ mesh Thi=Th;
+ mesh[int] ath(mpisize);
+ fespace Xh(Thi,Pk);
+ Xh[int] uh(mpisize);
+ uh[0][]=u;
+ ath[0]=Th;
+ mpiRequest[int] rq(mpisize);
+ for(int i= 1; i <mpisize;++i)
+ Irecv(processor(i,rq[i]),ath[i]);
+ for (int i=1;i<mpisize;++i)
+ int k= mpiWaitAny(rq);
+ for (int i=1;i<mpisize;++i)
+ { Thi=ath[i];
+ Irecv(processor(i,rq[i]),uh[i][]);}
+ for (int i=1;i<mpisize;++i)
+ int k= mpiWaitAny(rq);
+ plot(uh,plotparm);
+ }
+ else
+ {
+ processor(0)<<Th;
+ processor(0)<<u;
+ }
+ mpiBarrier(mpiCommWorld);
++<<<<<<< HEAD
+ }
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ verbosity=ver;
+ return true;
+}
+//EOM ...
diff --cc examples++-mpi/MUMPS.cpp.orig
index 0000000,1db1efb..1db1efb
mode 000000,100755..100644
--- a/examples++-mpi/MUMPS.cpp.orig
+++ b/examples++-mpi/MUMPS.cpp.orig
diff --cc examples++-mpi/MUMPS_FreeFem.cpp.orig
index 01c0f1a,0000000..24e6233
mode 100644,000000..100644
--- a/examples++-mpi/MUMPS_FreeFem.cpp.orig
+++ b/examples++-mpi/MUMPS_FreeFem.cpp.orig
@@@ -1,2605 -1,0 +1,2619 @@@
+// ORIG-DATE: 02/2009
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// E-MAIL : jacques.morice at ann.jussieu.fr
+//
+//ff-c++-LIBRARY-dep: mumps parmetis ptscotch scalapack blas mpifc fc mpi pthread
+//ff-c++-cpp-dep:
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+
+
+#include <mpi.h>
+#include <iostream>
+using namespace std;
+
+#ifdef WIN32
+
+// ALH - this activates the Windows DLL default export mechanism
+
+__declspec(dllexport) int not_used;
+
+// FFCS - 23/4/13 - instanciate some global symbols which are not found by default in MS MPI Fortran libraries
+
+MPI_Fint* _imp__MPI_F_STATUS_IGNORE;
+MPI_Fint* _imp__MPI_F_STATUSES_IGNORE;
+#endif
+
+#include "rgraph.hpp"
+#include "error.hpp"
+#include "AFunction.hpp"
+
+//#include "lex.hpp"
+#include "MatriceCreuse_tpl.hpp"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "dmumps_c.h"
+#include "zmumps_c.h"
+
+// read options for MUMPS in freefem++
+int s_(char* str, const char* cmp[])
+{
+ int i = 0;
+ while( cmp[i] != 0){
+ if( strcmp(str, cmp[i]) == 0){
+ //cout << *str << " return" << i << endl;
+ return i+1 ;
+ }
+ i++;
+ }
+ //cout << *str << " return 0" << endl;
+ return 0;
+}
+
+void read_options_freefem(string *string_option, int *SYM, int *PAR){
+
+ static const char* comp[] = {"SYM", "PAR", 0};
+
+ char data[string_option->size()+1];
+ strcpy( data, string_option->c_str());
+ cout << "data=" << data << endl;
+ char * tictac;
+ tictac = strtok(data," =,\t\n");
+ cout << "tictac=" << data << endl;
+
+ while(tictac != NULL){
+
+ int id_option = s_(tictac, comp);
+ tictac = strtok(NULL," =,\t\n");
+ int val_options;
+
+ switch (id_option)
+ {
+ case 1 : // SYM
+ *SYM = atoi(tictac);
+ // strtol ???
+ if(*SYM != 0 && *SYM !=1)
+ cout << "SYM must be equal to 1 or 0 for MUMPS" << endl;
+
+ break;
+ case 2: // PAR
+ *PAR = atoi(tictac);
+ if(*PAR != 0 && *PAR !=1)
+ cout << "PAR must be equal to 1 or 0" << endl;
+ //strtol ???
+ break;
+ case 0: // Equivalent of case default
+ break;
+ }
+ tictac = strtok(NULL," =,\t\n");
+ }
+
+}
+
+class dSolveMUMPSmpi : public MatriceMorse<double>::VirtualSolver {
+
+ double eps;
+ mutable double epsr;
+ double tgv;
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+ mutable MPI_Comm comm;
+ double *a;
+ int *irn, *jcn;
+ int n, m, nz;
+
+ // parameter MUMPS
+
+ KN_<long> perm_r; /* row permutations from partial pivoting */
+ KN_<long> perm_c;
+ KN_<double> scale_r;
+ KN_<double> scale_c;
+ string string_option;
+ string data_option;
+ int SYM;
+ int PAR;
+ int myid;
+
+ // distribuer
+ int nz_loc;
+ int *jcn_loc, *irn_loc;
+ double *a_loc;
+
+
+
+ static const int JOB_INIT=-1;
+ static const int JOB_END=-2;
+ static const int USE_COMM_WORLD= -987654;
+
+ // variable reel
+ mutable DMUMPS_STRUC_C id;
+
+#define ICNTL(I) icntl[(I)-1] /* macro s.t. indices match documentation */
+#define CNTL(I) cntl[(I)-1] /* macro s.t. indices match documentation */
+#define RINFOG(I) rinfog[(I)-1] /* macro s.t. indices match documentation */
+#define INFOG(I) infog[(I)-1] /* macro s.t. indices match documentation */
+public:
+ dSolveMUMPSmpi(const MatriceMorse<double> &AA,int strategy,double ttgv, double epsilon,
+ double pivot,double pivot_sym, string param_string, string datafile, KN<long> ¶m_int,
+ KN<double> ¶m_double, KN<long> &pperm_r, KN<long> &pperm_c, KN<double> &pscale_r,KN<double> &pscale_c, MPI_Comm * mpicommw
+ ) :
+ eps(epsilon),epsr(0),
+ tgv(ttgv), string_option(param_string), data_option(datafile), perm_r(pperm_r), perm_c(pperm_c),
+ tol_pivot_sym(pivot_sym),tol_pivot(pivot), scale_r(pscale_r), scale_c(pscale_c)
+ {
+ long int starttime,finishtime;
+ long int timeused;
+
+ if(verbosity) starttime = clock();
+ int dataint[40];
+ double datadouble[15];
+ int ierr;
+
+ if(mpicommw==0){
+ comm=MPI_COMM_WORLD;
+ }
+ else
+ comm= *mpicommw;
+
+
+ /* ------------------------------------------------------------
+ INITIALIZE THE MUMPS PROCESS GRID.
+ ------------------------------------------------------------*/
+ ierr = MPI_Comm_rank(comm, &myid);
+
+ if( myid ==0){
+ n = AA.n;
+ m = AA.m;
+ nz = AA.nbcoef;
+
+ MPI_Bcast( &n, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &m, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &nz, 1, MPI_INT, 0, comm );
+ }
+ else{
+ MPI_Bcast( &n, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &m, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &nz, 1, MPI_INT, 0, comm );
+ }
+
+ if( !(param_int==NULL) )
+ assert( param_int.N() == 42);
+ if( !(param_double==NULL) )
+ assert( param_double.N() == 15);
+ if(perm_r)
+ assert( perm_r.N() == n);
+ if(perm_c)
+ assert( perm_c.N() == m);
+ if(scale_r)
+ assert( scale_r.N() == n);
+ if(scale_c)
+ assert( scale_c.N() == m);
+
+ if( n != m )
+ cerr << "only square matrix are supported by MUMPS" << endl;
+
+
+ // initialisation par defaut
+ SYM=0; PAR=1;
+
+ /*
+ if(!string_option.empty())
+ {
+ if(myid==0){
+ cout << "read string option" <<endl;
+ read_options_freefem(&string_option,&SYM,&PAR);
+
+ MPI_Bcast( &SYM, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &PAR, 1, MPI_INT, 0, comm );
+ }
+ else{
+ MPI_Bcast( &SYM, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &PAR, 1, MPI_INT, 0, comm );
+ }
+ }
+ */
+ if( !(param_int==NULL) ){
+ SYM = param_int[0];
+ PAR = param_int[1];
+ cout << "param :: myid =" << myid << endl;
+ }
+ else if( !data_option.empty() )
+ {
+ cout << "myid =" << myid << endl;
+ if(myid==0){
+
+ char * retfile= new char[data_option.size()+1];
+ strcpy(retfile, (&data_option)->c_str());
+ printf("read data option file %s\n",retfile);
+ FILE *pFile=fopen(retfile,"rt");
+
+ int i_data=0;
+ int d_data=0;
+ char data[256];
+ char *tictac;
+
+ fgets(data,256,pFile);
+ tictac = strtok(data," /!#\t\n");
+ SYM = atoi(tictac);
+
+ fgets(data,256,pFile);
+ tictac = strtok(data," /!#\t\n");
+ PAR = atoi(tictac);
+
+ while( !feof(pFile) && i_data < 40){
+ fgets(data,256,pFile);
+ tictac = strtok(data," /!#\t\n");
+ dataint[i_data] = (int)atol(tictac);
+ i_data++;
+ }
+ assert(i_data == 40);
+ while( !feof(pFile) && d_data < 15){
+ fgets(data,256,pFile);
+ tictac = strtok(data," /!#\t\n");
+ datadouble[d_data] = (double)atof(tictac);
+ d_data++;
+ }
+ assert(d_data == 15);
+ /*
+ for(int ii=0; ii< 40; ii++){
+ cout << "double int["<< ii <<"] ="<< dataint[ii] << endl;
+ }
+ for(int ii=0; ii< 15; ii++){
+ cout << "double data["<< ii <<"] ="<< datadouble[ii] << endl;
+ }
+ */
+ MPI_Bcast( &SYM, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &PAR, 1, MPI_INT, 0, comm );
+
+ cout << "myid =" << myid << " init parameter :: PAR & SYM " << PAR << " " << SYM << endl;
+
+ MPI_Bcast( dataint, 40, MPI_INT, 0, comm );
+ MPI_Bcast( datadouble, 15, MPI_DOUBLE, 0, comm );
+
+
+ fclose(pFile);
+ delete [] retfile;
+ }
+ else{
+
+
+ MPI_Bcast( &SYM, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &PAR, 1, MPI_INT, 0, comm );
+
+ cout << "myid =" << myid << " init parameter :: PAR & SYM " << PAR << " " << SYM << endl;
+
+
+ MPI_Bcast( dataint, 40, MPI_INT, 0, comm );
+ MPI_Bcast( datadouble, 15, MPI_DOUBLE, 0, comm );
+ }
+ }
+
+
+ /* Initialize a MUMPS instance. Use comm */
+ id.job=JOB_INIT;
+ id.par=PAR;
+ id.sym=SYM;
+ id.comm_fortran= (MUMPS_INT) MPI_Comm_c2f( comm );
+ //id.comm_fortran= (F_INT) comm;
+
+ if(verbosity>2) cout << " MUMPS_FreeFem init parameter :: PAR & SYM " << PAR << " " << SYM << endl;
+
+ dmumps_c(&id);
+
+ if(verbosity>10) cout << "fin init parameter" << endl;
+
+ /* set parameter of mumps */
+ if( !(param_int == NULL) || !(param_double == NULL) ){
+ if(!data_option.empty()){
+ printf("MUMPS ERROR: parameters are given on the file %s and in the array lparams and dparams => double definition of parameters.",data_option.c_str());
+ exit(1);
+ }
+
+ if( !(param_int == NULL) ){
+ cout << "internal parameter" << endl;
+ for(int ii=0; ii<40; ii++)
+ id.ICNTL(ii+1) = param_int[ii+2];
+ }
+ else{
+
+ // parameter by default
+ id.ICNTL(1)=-1; id.ICNTL(2)=-1; id.ICNTL(3)=-1; id.ICNTL(4)=0;
+ }
+ if( !(param_double == NULL) ){
+ cout << "internal parameter" << endl;
+ for(int ii=0; ii<15; ii++)
+ id.CNTL(ii+1) = param_double[ii];
+ }
+ }
+ else
+ if(!data_option.empty()){
+ for(int ii=0; ii<40; ii++)
+ id.ICNTL(ii+1) = dataint[ii];
+ for(int ii=0; ii<15; ii++)
+ id.CNTL(ii+1) = datadouble[ii];
+ }
+ else{
+ // parameter by default
+ if(verbosity>10)
+ cout << "default parameter" << endl;
+ id.ICNTL(1)=-1; id.ICNTL(2)=-1; id.ICNTL(3)=-1; id.ICNTL(4)=0;
+ }
+
+ // uniquement donner au host
+ if(myid==0)
+ {
+ if( !(perm_r==NULL) && id.ICNTL(7)==1){
+ for(int ii=0; ii<n; ii++) id.perm_in[ii] = pperm_r[ii];
+ }
+ // a decommenter
+ //if( !(perm_c==NULL) && id.ICNTL(6)==1){
+ //for(int ii=0; ii<m; ii++) id.perm_in[ii] = pperm_c[ii];
+ //}
+ if( !(scale_r==NULL) && !(scale_c==NULL) && id.ICNTL(8)==-1 ){
+ // param_double[0::n-1] :: row
+ // param_double[n::n+m-1] :: column
+ for(int ii=0; ii<n; ii++) id.rowsca[ii] = scale_r[ii];
+ for(int ii=0; ii<m; ii++) id.colsca[ii] = scale_c[ii];
+ }
+ }
+
+ irn = NULL;
+ jcn = NULL;
+
+ /* valeur par defaut mis dans le dur */
+ //id.ICNTL(5) = 0;
+ //id.ICNTL(18) = 0;
+
+ // Distribution depend de la valeur de ICNTL(18)
+ if( id.ICNTL(5) != 0 ){
+ printf("we consider only assembled format \n");
+ printf("forced assembled format ==> id.ICNTL(5) = 0; \n");
+ id.ICNTL(5) = 0;
+ exit(1);
+ }
+
+ if (myid == 0) {
+ id.n = n; id.nz =nz;
+ //id.irn=irn; id.jcn=jcn;
+ //id.a = a; //id.rhs = rhs;
+ }
+
+ if( id.ICNTL(18) == 0)
+ {
+
+ // CASE:: NON DISTRIBUTED MATRIX
+ if (myid == 0) { // nouveau
+
+ a=AA.a;
+ // ATTENTION
+ // AA.cl :: indice des colonnes (exacte) et AA.lg :: indice des lignes
+ // index of row and colummn by 1
+ jcn = AA.cl;
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]+1;
+
+ if( !(irn = (int*) malloc(sizeof(int)*nz)) ){
+ printf("problem allocation jcn ");
+ exit(1);
+ }
+
+ assert(AA.lg[n] == nz);
+ for(int ii=0; ii< n; ii++)
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+ irn[ii1] = ii+1;
+
+ // if (myid == 0) { // ancien
+ id.irn=irn; id.jcn=jcn;
+ id.a = a; //id.rhs = rhs;
+ }
+
+ /* Call the MUMPS package. */
+ // Analyse + Factorisation
+ id.job=4;
+ dmumps_c(&id);
+
+ }
+
+
+ if( id.ICNTL(18) == 1 || id.ICNTL(18) == 2 )
+ {
+
+ if(verbosity > 1) cout <<"id.ICNTL(18) = 1 || id.ICNTL(18) == 2 "<< endl;
+ // ATTENTION
+ // AA.cl :: indice des colonnes (exacte) et AA.lg :: indice des lignes
+ // index of row and column by 1
+
+ if (myid == 0) { // new host process
+
+ jcn = AA.cl;
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]+1;
+
+ if( !(irn = (int*) malloc(sizeof(int)*nz)) ){
+ printf("problem allocation irn ");
+ exit(1);
+ }
+
+ assert(AA.lg[n] == nz);
+ for(int ii=0; ii< n; ii++)
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+ irn[ii1] = ii+1;
+
+
+ //if (myid == 0) { // enlever new host
+ id.irn=irn; id.jcn=jcn;
+ }
+
+ /* Call the MUMPS package. */
+ // Analyse
+ id.job=1;
+ dmumps_c(&id);
+
+ if(id.ICNTL(18) == 1 ){
+
+ if( PAR == 0 ){
+ int *nz_loc_procs;
+ int *fst_nz_procs;
+ int *irn_g;
+ int *jcn_g;
+ double *a_g;
+ int commSize;
+
+ MPI_Comm_size(comm,&commSize);
+ cout << commSize << "commSize" << "nz =" << nz << endl;
+ if(myid==0){
+ // allocation des differents tableaux
+ nz_loc_procs = (int*) malloc ( commSize*sizeof(int) );
+ for(int ii=0; ii<commSize; ii++){
+ nz_loc_procs[ii]=0;
+ }
+ for(int ii=0; ii<nz; ii++){
+ nz_loc_procs[ id.mapping[ii] ]++;
+ }
+ assert(nz_loc_procs[0] == 0);
+ nz_loc_procs[0] = 2;
+
+ fst_nz_procs = (int*) malloc ( commSize*sizeof(int) );
+ fst_nz_procs[0] = 0;
+ for(int ii=1; ii<commSize; ii++){
+ fst_nz_procs[ii] = fst_nz_procs[ii-1]+nz_loc_procs[ii-1];
+ }
+
+ irn_g = (int*) malloc( sizeof(int)*(nz+2) );
+ jcn_g = (int*) malloc( sizeof(int)*(nz+2) );
+ a_g = (double*) malloc( sizeof(double)*(nz+2) );
+
+ int *index_p;
+ index_p = (int*) malloc ( commSize*sizeof(int) );
+ for(int ii=0; ii<commSize; ii++)
+ index_p[ii] =0;
+
+ irn_g[ 0 ] = 1;
+ jcn_g[ 0 ] = 1;
+ a_g [ 0 ] = 1.;
+
+ irn_g[ 1 ] = 1;
+ jcn_g[ 1 ] = 1;
+ a_g [ 1 ] = 1.;
+
+ for(int ii=0;ii<nz; ii++){
+ int jj1 = id.mapping[ii];
+ int jj2 = fst_nz_procs[jj1] + index_p[jj1];
+ assert(jj2 > 1);
+ irn_g[ jj2 ] = irn[ ii ];
+ jcn_g[ jj2 ] = jcn[ ii ];
+ a_g [ jj2 ] = AA.a[ ii ];
+ cout << "jj2= " << jj2 << endl;
+ assert( jj2 < nz+2);
+ index_p[jj1]++;
+ }
+ free(index_p);
+
+ }
+
+ MPI_Scatter( nz_loc_procs, 1, MPI_INT, &nz_loc, 1, MPI_INT, 0, comm);
+
+ // allocation des tableaux locaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (double*) malloc(sizeof(double)*nz_loc);
+
+ MPI_Scatterv( a_g, nz_loc_procs, fst_nz_procs, MPI_DOUBLE, a_loc, nz_loc, MPI_DOUBLE, 0, comm);
+ MPI_Scatterv( jcn_g, nz_loc_procs, fst_nz_procs, MPI_INT, jcn_loc, nz_loc, MPI_INT, 0, comm);
+ MPI_Scatterv( irn_g, nz_loc_procs, fst_nz_procs, MPI_INT, irn_loc, nz_loc, MPI_INT, 0, comm);
+ cout << "myid=" << myid <<" nz_loc=" << nz_loc << endl;
+ if( myid == 1){
+ cout << "nz_loc=" << nz_loc << endl;
+ for(int ii=0;ii<nz_loc; ii++){
+ cout << "a_loc[ii]" << a_loc[ii] << endl;
+
+ }
+ }
+
+ if( myid > 0){
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = a_loc;
+ }
+
+ if( myid == 0){
+ //free( irn_loc );
+ //free( jcn_loc );
+ //free( a_loc );
+ free( nz_loc_procs );
+ free( fst_nz_procs );
+ free( irn_g );
+ free( jcn_g );
+ free( a_g );
+ }
+ }
+
+
+ if( PAR == 1 ){
+ int *nz_loc_procs;
+ int *fst_nz_procs;
+ int *irn_g;
+ int *jcn_g;
+ double *a_g;
+ int commSize;
+
+ MPI_Comm_size(comm,&commSize);
+
+ if(myid==0){
+ // allocation des differents tableaux
+ nz_loc_procs = (int*) malloc ( commSize*sizeof(int) );
+ for(int ii=0; ii<commSize; ii++){
+ nz_loc_procs[ii]=0;
+ }
+ for(int ii=0; ii<nz; ii++){
+ nz_loc_procs[ id.mapping[ii] ]++;
+ }
+
+ fst_nz_procs = (int*) malloc ( commSize*sizeof(int) );
+
+ fst_nz_procs[0] = 0;
+ for(int ii=1; ii<commSize; ii++){
+ fst_nz_procs[ii] = fst_nz_procs[ii-1]+nz_loc_procs[ii-1];
+ }
+
+ irn_g = (int*) malloc(sizeof(int)*nz);
+ jcn_g = (int*) malloc(sizeof(int)*nz);
+ a_g = (double*) malloc(sizeof(double)*nz);
+
+ int *index_p;
+ index_p = (int*) malloc ( commSize*sizeof(int) );
+ for(int ii=0; ii<commSize; ii++)
+ index_p[ii] =0;
+
+ for(int ii=0;ii<nz; ii++){
+ int jj1 = id.mapping[ii];
+ int jj2 = fst_nz_procs[jj1] + index_p[jj1];
+
+ irn_g[ jj2 ] = irn[ ii ];
+ jcn_g[ jj2 ] = jcn[ ii ];
+ a_g [ jj2 ] = AA.a[ ii ];
+ index_p[jj1]++;
+ }
+ free(index_p);
+
+ }
+
+ MPI_Scatter( nz_loc_procs, 1, MPI_INT, &nz_loc, 1, MPI_INT, 0, comm);
+
+ // allocation des tableaux locaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (double*) malloc(sizeof(double)*nz_loc);
+
+ MPI_Scatterv( a_g, nz_loc_procs, fst_nz_procs, MPI_DOUBLE, a_loc, nz_loc, MPI_DOUBLE, 0, comm);
+ MPI_Scatterv( jcn_g, nz_loc_procs, fst_nz_procs, MPI_INT, jcn_loc, nz_loc, MPI_INT, 0, comm);
+ MPI_Scatterv( irn_g, nz_loc_procs, fst_nz_procs, MPI_INT, irn_loc, nz_loc, MPI_INT, 0, comm);
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = a_loc;
+
+
+ if( myid == 0){
+ free( nz_loc_procs );
+ free( fst_nz_procs );
+ free( irn_g );
+ free( jcn_g );
+ free( a_g );
+ }
+ }
+ // version all procs
+// if(myid==0){
+//
+// MPI_Bcast( id.mapping, nz, MPI_INT, 0, comm );
+//
+// nz_loc=0;
+// for(int ii=0;ii<nz; ii++){
+// if( id.mapping[ii] == myid) nz_loc++;
+// }
+//
+// irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// a_loc = (double*) malloc(sizeof(double)*nz_loc);
+//
+// int jj=0;
+// for(int ii=0;ii<nz; ii++)
+// if( id.mapping[ii] == myid){
+// irn_loc[jj] = irn[ ii ];
+// jcn_loc[jj] = jcn[ ii ];
+// a_loc[jj] = AA.a[ ii ];
+// jj++;
+// }
+// assert(jj==nz_loc);
+//
+// if(PAR==1){
+// id.nz_loc = nz_loc;
+// id.irn_loc = irn_loc;
+// id.jcn_loc = jcn_loc;
+// id.a_loc = a_loc;
+// }
+//
+// }
+// else{
+// int *mapping;
+// mapping = (int*) malloc(sizeof(int)*nz);
+// MPI_Bcast( mapping, nz, MPI_INT, 0, comm );
+// nz_loc=0;
+//
+// for(int ii=0;ii<nz; ii++)
+// if( mapping[ii] == myid) nz_loc++;
+//
+// irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// a_loc = (double*) malloc(sizeof(double)* nz_loc);
+//
+// //==============================
+// // besoin de irn, jcn, AA.a
+// //==============================
+//
+// int jj=0.;
+// for(int ii=0;ii<nz; ii++)
+// if( mapping[ii] == myid){
+// irn_loc[jj] = irn[ ii ];
+// jcn_loc[jj] = jcn[ ii ];
+// a_loc[jj] = AA.a[ ii ];
+// jj++;
+// }
+// assert(jj==nz_loc);
+//
+// free(mapping);
+//
+// id.nz_loc = nz_loc;
+// id.irn_loc = irn_loc;
+// id.jcn_loc = jcn_loc;
+// id.a_loc = a_loc;
+// }
+
+ /* Call the MUMPS package. */
+ // Factorisation
+ id.job=2;
+ dmumps_c(&id);
+
+ }
+
+
+ if(id.ICNTL(18) == 2 ){
+ printf("id.ICNTL(18)==2 not avaible yet \n");
+ exit(1);
+
+
+ if(PAR == 0){
+ printf("id.ICNTL(18)==2 with PAR=0 not available yet \n");
+ exit(1);
+ if(myid !=0) {
+
+ //==============================
+ // besoin de irn, jcn, AA.a
+ //==============================
+
+ int commSize;
+ ierr=MPI_Comm_size(comm,&commSize);
+ commSize=commSize-1;
+ int myidpar=myid-1;
+ int m_loc_fst = m/commSize;
+ int m_loc;
+ if( myidpar == commSize-1 && ( m_loc_fst*commSize != m ) )
+ m_loc = m-m_loc_fst*( commSize-1 );
+ else
+ m_loc = m_loc_fst;
+
+ int fst_row= myidpar*m_loc_fst;
+ nz_loc = AA.lg[fst_row+m_loc]-AA.lg[fst_row];
+
+ // allocation des tableaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (double*) malloc(sizeof(double)*nz_loc);
+
+ int fst_nnz = AA.lg[fst_row];
+ for(int ii=0; ii < nz_loc; ii++){
+ a_loc[ii] = AA.a[fst_nnz+ii];
+ jcn_loc[ii] = AA.cl[fst_nnz+ii]; // jcn=AA.cl a ete augmenter de 1 avant => pas ajouter 1
+ }
+
+ for(int ii=fst_row; ii< fst_row+m_loc; ii++){
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+ irn_loc[ii1-fst_nnz] = ii+1;
+ }
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = a_loc;
+ }
+ }
+ if(PAR == 1){
+
+ //==============================
+ // besoin de irn, jcn, AA.a
+ //==============================
+
+ int commSize;
+ ierr=MPI_Comm_size(comm,&commSize);
+ int m_loc_fst = m/commSize;
+ int m_loc;
+ if( myid == commSize-1 && ( m_loc_fst*commSize != m ) )
+ m_loc = m-m_loc_fst*( commSize-1 );
+ else
+ m_loc = m_loc_fst;
+
+ int fst_row= myid*m_loc_fst;
+ nz_loc = AA.lg[fst_row+m_loc]-AA.lg[fst_row];
+
+ // allocation des tableaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (double*) malloc(sizeof(double)*nz_loc);
+
+ int fst_nnz = AA.lg[fst_row];
+ for(int ii=0; ii < nz_loc; ii++){
+ a_loc[ii] = AA.a[fst_nnz+ii];
+ jcn_loc[ii] = AA.cl[fst_nnz+ii]; // jcn=AA.cl a ete augmenter de 1 avant => pas ajouter 1
+ }
+
+ for(int ii=fst_row; ii< fst_row+m_loc; ii++){
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+ irn_loc[ii1-fst_nnz] = ii+1;
+ }
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = a_loc;
+
+ }
+
+ /* Call the MUMPS package. */
+ // Factorisation
+ id.job=2;
+ dmumps_c(&id);
+ }
+ }
+
+ if( id.ICNTL(18) == 3 )
+ {
+ // indices et colonnes de la matrice
+
+// // Cas Matrice parallele ::
+// // ========================
+//
+// // Cas stockage Morse parallele
+// m_loc = AA.m_loc; // Nombre de lignes prise en compte
+// nz_loc = AA.nbcoef_loc; // Nombre de coefficients non nulles
+// // indice des colonnes
+// jcn_loc = AA.cl_loc; // indices des colonnes dans la matrice locale
+//
+// if( !(irn_loc = (int*) malloc(sizeof(int)*nz_loc)) ){
+// printf("problem allocation jcn ");
+// exit(1);
+// }
+// assert(AA.lg_loc[nrow_loc] == nz_loc);
+// for(int ii=0; ii< nrow_loc; ii++)
+// for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+// irn_loc[ii1] = ii+1;
+//
+// a_loc=AA.a_loc;
+//
+ // Pas de matrice parallele ==> utilisation astuce de SuperLU
+ // Matrice :: distribution bloc continue de lignes :: voir SuperLU
+ // Attention :: performance ???
+
+// //==================
+// // pour un proc :
+// // a: AA.a[fstow] , ..., AA.a[fstrow+nz_loc-1]
+// // jcn: AA.cl[fstrow] , ..., AA.cl[fstrow+nz_loc-1]
+// // irn: AA.lg[fstrow] , ..., AA.lg[fstrow+m_loc]
+// //==================
+// // apres reception :
+// // irn_reel:
+// // int jj=0,
+// // do ii=0,m_loc-1
+// // do ii1=irn_donnee[ii],irn_donnee[ii+1]-1
+// // irn_reel[jj] = fst_row+ii+1;
+// // jj++
+// // end do
+// // end do
+// //=================
+
+ cout <<"id.ICNTL(18) = 3, PAR="<< PAR << endl;
+
+ if(PAR == 0){
+
+
+// if(myid != 0) {
+// int commSize;
+// ierr=MPI_Comm_size(comm,&commSize);
+// commSize=commSize-1;
+// int myidpar=myid-1;
+// int m_loc_fst;
+// m_loc_fst= m/commSize;
+// int m_loc;
+// if( myidpar == commSize-1 && ( m_loc_fst*commSize != m ) )
+// m_loc = m-m_loc_fst*( commSize-1 );
+// else
+// m_loc = m_loc_fst;
+
+// int fst_row;
+// fst_row= myidpar*m_loc_fst;
+// nz_loc = AA.lg[fst_row+m_loc]-AA.lg[fst_row];
+
+// // allocation des tableaux
+// irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// a_loc = (double*) malloc(sizeof(double)* nz_loc);
+
+// int fst_nnz;
+// fst_nnz = AA.lg[fst_row];
+// for(int ii=0; ii < nz_loc; ii++){
+// a_loc[ii] = AA.a[fst_nnz+ii];
+// jcn_loc[ii] = AA.cl[fst_nnz+ii]+1;
+// }
+
+// for(int ii=fst_row; ii< fst_row+m_loc; ii++){
+// for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+// irn_loc[ii1-fst_nnz] = ii+1;
+// }
+
+// id.nz_loc = nz_loc;
+// id.irn_loc = irn_loc;
+// id.jcn_loc = jcn_loc;
+// id.a_loc = a_loc;
+// }
+
+
+ // definition de variables
+ int commSize;
+ int m_loc_fst;
+ int m_loc;
+ int fst_row;
+
+
+ int *nz_loc_procs;
+ int *fst_nz_procs;
+ int *m_loc_procs;
+ int *fst_row_procs;
+
+
+ double *tab_a;
+ int *tab_cl;
+ int *tab_lg;
+ int *tab_lg_loc;
+
+ MPI_Comm_size(comm,&commSize);
+
+ if( myid !=0){
+ int commSizemm;
+ int myidpar=myid-1;
+
+ commSizemm = commSize-1;
+ m_loc_fst= m/commSizemm;
+
+ if( myidpar == commSizemm-1 && ( m_loc_fst*commSizemm != m ) )
+ m_loc = m-m_loc_fst*( commSizemm-1 );
+ else
+ m_loc = m_loc_fst;
+
+ if(verbosity > 5){
+ fst_row = myidpar*m_loc_fst;
+ cout << " myid = " << myid << endl;
+ cout <<" m_loc = " << m_loc << endl;
+ cout <<" fst_row = " << fst_row << endl;
+ }
+
+ }
+ if( myid ==0){
+
+ int commSizemm;
+ commSizemm = commSize-1;
+ m_loc_fst= m/commSizemm;
+
+ fst_row_procs = (int* ) malloc( commSize*sizeof(int) );
+ m_loc_procs = (int* ) malloc( commSize*sizeof(int) );
+ fst_nz_procs = (int* ) malloc( commSize*sizeof(int) );
+ nz_loc_procs = (int* ) malloc ( commSize*sizeof(int) );
+
+
+ fst_row_procs [0] = 0;
+ m_loc_procs [0] = 0;
+
+ for( int ii= 1; ii<commSize; ii++){
+ fst_row_procs [ii] = (ii-1)*m_loc_fst;
+ m_loc_procs [ii] = m_loc_fst;
+ }
+
+ if( m_loc_fst*(commSize-1) != m )
+ m_loc_procs [commSize-1] = m-m_loc_fst*( (commSize-1)-1 );
+
+
+ nz_loc_procs [0] = 0;
+ fst_nz_procs [0] = 0;
+
+ for( int ii= 1; ii<commSize; ii++){
+ nz_loc_procs [ii] = AA.lg[fst_row_procs[ii]+m_loc_procs[ii] ] - AA.lg[fst_row_procs[ii]];
+ fst_nz_procs [ii] = AA.lg[fst_row_procs[ii]];
+ }
+
+
+ /*
+ tab_a= (int* ) malloc( nz*sizeof(double) );
+ tab_cl = (int* ) malloc( nz*sizeof(int) );
+ tab_lg = (int* ) malloc ( n*sizeof(int) );
+ */
+ tab_a = AA.a;
+ tab_cl = AA.cl;
+ tab_lg = AA.lg;
+ }
+
+ MPI_Scatter( nz_loc_procs, 1, MPI_INT, &nz_loc, 1, MPI_INT, 0, comm);
+ MPI_Scatter( m_loc_procs, 1, MPI_INT, &m_loc, 1, MPI_INT, 0, comm);
+ MPI_Scatter( fst_row_procs, 1, MPI_INT, &fst_row, 1, MPI_INT, 0, comm);
+
+ if(verbosity > 5){
+ cout << "after scatter " << myid << endl;
+ cout << " myid = " << myid << endl;
+ cout <<" m_loc = " << m_loc << endl;
+ cout <<" fst_row = " << fst_row << endl;
+ }
+ // allocation des tableaux locaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (double*) malloc(sizeof(double)*nz_loc);
+ tab_lg_loc = (int*) malloc(sizeof(int)*(m_loc) );
+
+
+
+ MPI_Scatterv( tab_a, nz_loc_procs, fst_nz_procs, MPI_DOUBLE, a_loc, nz_loc, MPI_DOUBLE, 0, comm);
+ MPI_Scatterv( tab_cl, nz_loc_procs, fst_nz_procs, MPI_INT, jcn_loc, nz_loc, MPI_INT, 0, comm);
+ MPI_Scatterv( tab_lg, m_loc_procs, fst_row_procs, MPI_INT, tab_lg_loc, m_loc, MPI_INT, 0, comm);
+
+
+ int jj=0;
+ for(int ii=0; ii<m_loc-1; ii++)
+ for(int ii1= tab_lg_loc[ii]; ii1 < tab_lg_loc[ii+1]; ii1++){
+ irn_loc[jj] = fst_row+ii+1;
+ jj++;
+ }
+
+ for(int ii1= tab_lg_loc[m_loc-1]; ii1 < tab_lg_loc[0]+nz_loc; ii1++){
+ irn_loc[jj] = fst_row+(m_loc-1)+1;
+ jj++;
+ }
+
+ for(int ii=0; ii < nz_loc; ii++){
+ jcn_loc[ii] = jcn_loc[ii]+1;
+ }
+
+ assert( jj == nz_loc );
+
+ free( tab_lg_loc );
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = a_loc;
+
+ if( myid == 0 ){
+ free( fst_row_procs );
+ free( m_loc_procs );
+ free( fst_nz_procs );
+ free( nz_loc_procs );
+ }
+
+ }
+ if(PAR ==1) {
+ /*
+ int commSize;
+ ierr=MPI_Comm_size(comm,&commSize);
+ int m_loc_fst;
+ m_loc_fst= m/commSize;
+ int m_loc;
+ if( myid == commSize-1 && ( m_loc_fst*commSize != m ) )
+ m_loc = m-m_loc_fst*( commSize-1 );
+ else
+ m_loc = m_loc_fst;
+
+ int fst_row;
+ fst_row = myid*m_loc_fst;
+
+ nz_loc = AA.lg[fst_row+m_loc]-AA.lg[fst_row];
+
+ // allocation des tableaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (double*) malloc(sizeof(double)* nz_loc);
+
+ int fst_nnz;
+ fst_nnz= AA.lg[fst_row];
+ for(int ii=0; ii < nz_loc; ii++){
+ a_loc[ii] = AA.a[fst_nnz+ii];
+ jcn_loc[ii] = AA.cl[fst_nnz+ii]+1;
+ }
+
+ for(int ii=fst_row; ii< fst_row+m_loc; ii++){
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++)
+ irn_loc[ii1-fst_nnz] = ii+1;
+ }
+
+ */
+
+ // definition de variables
+ int commSize;
+ int m_loc_fst;
+ int m_loc;
+ int fst_row;
+
+
+ int *nz_loc_procs;
+ int *fst_nz_procs;
+ int *m_loc_procs;
+ int *fst_row_procs;
+
+
+ double *tab_a;
+ int *tab_cl;
+ int *tab_lg;
+ int *tab_lg_loc;
+
+ MPI_Comm_size(comm,&commSize);
+ m_loc_fst= m/commSize;
+
+ if( myid == commSize-1 && ( m_loc_fst*commSize != m ) )
+ m_loc = m-m_loc_fst*( commSize-1 );
+ else
+ m_loc = m_loc_fst;
+
+ fst_row = myid*m_loc_fst;
+
+ if( myid ==0){
+ fst_row_procs = (int* ) malloc( commSize*sizeof(int) );
+ m_loc_procs = (int* ) malloc( commSize*sizeof(int) );
+ fst_nz_procs = (int* ) malloc( commSize*sizeof(int) );
+ nz_loc_procs = (int* ) malloc ( commSize*sizeof(int) );
+
+ for( int ii= 0; ii<commSize; ii++){
+ fst_row_procs [ii] = ii*m_loc_fst;
+ m_loc_procs [ii] = m_loc_fst;
+ }
+
+ if( m_loc_fst*commSize != m )
+ m_loc_procs [commSize-1] = m-m_loc_fst*( commSize-1 );
+
+ for( int ii= 0; ii<commSize; ii++){
+ nz_loc_procs [ii] = AA.lg[fst_row_procs[ii]+m_loc_procs[ii] ] - AA.lg[fst_row_procs[ii]];
+ fst_nz_procs [ii] = AA.lg[fst_row_procs[ii]];
+ }
+
+
+ /*
+ tab_a= (int* ) malloc( nz*sizeof(double) );
+ tab_cl = (int* ) malloc( nz*sizeof(int) );
+ tab_lg = (int* ) malloc ( n*sizeof(int) );
+ */
+ tab_a = AA.a;
+ tab_cl = AA.cl;
+ tab_lg = AA.lg;
+ }
+
+ MPI_Scatter( nz_loc_procs, 1, MPI_INT, &nz_loc, 1, MPI_INT, 0, comm);
+ cout << "nz_loc("<<myid<<")="<< nz_loc << endl;
+ cout << "m_loc("<<myid<<")="<< m_loc << endl;
+ // allocation des tableaux locaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (double*) malloc(sizeof(double)*nz_loc);
+ tab_lg_loc = (int*) malloc(sizeof(int)*(m_loc) );
+
+ MPI_Scatterv( tab_a, nz_loc_procs, fst_nz_procs, MPI_DOUBLE, a_loc, nz_loc, MPI_DOUBLE, 0, comm);
+ MPI_Scatterv( tab_cl, nz_loc_procs, fst_nz_procs, MPI_INT, jcn_loc, nz_loc, MPI_INT, 0, comm);
+ MPI_Scatterv( tab_lg, m_loc_procs, fst_row_procs, MPI_INT, tab_lg_loc, m_loc, MPI_INT, 0, comm);
+
+ int jj=0;
+ for(int ii=0; ii<m_loc-1; ii++)
+ for(int ii1= tab_lg_loc[ii]; ii1 < tab_lg_loc[ii+1]; ii1++){
+ irn_loc[jj] = fst_row+ii+1;
+ jj++;
+ }
+
+ for(int ii1= tab_lg_loc[m_loc-1]; ii1 < tab_lg_loc[0]+nz_loc; ii1++){
+ irn_loc[jj] = fst_row+(m_loc-1)+1;
+ jj++;
+ }
+
+ for(int ii=0; ii < nz_loc; ii++){
+ jcn_loc[ii] = jcn_loc[ii]+1;
+ }
+
+ assert( jj == nz_loc );
+
+ free( tab_lg_loc );
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = a_loc;
+
+ if( myid == 0 ){
+ free( fst_row_procs );
+ free( m_loc_procs );
+ free( fst_nz_procs );
+ free( nz_loc_procs );
+ }
+ }
+ /* Call the MUMPS package. */
+ // Analyse + Factorisation
+
+ id.job=1;
+ dmumps_c(&id);
+
+ id.job=2;
+ dmumps_c(&id);
+ }
+
+
+ // indices des colonnes commence par 1 avec mumps
+ // et 0 dans freefem ==> renumerotation
+ if( jcn != NULL )
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]-1;
+
+ if( irn != NULL && id.ICNTL(18) >0 ){
+ free(irn);
+ irn=NULL;
+ }
+
+
+
+ if( verbosity > 1){
+ /* information given by mumps*/
+ int Rinfo=20;
+ int Sinfo=40;
+ // in Freefem++ we give only global information
+ if(myid == 0){
+ printf("Global Output Information of MUMPS: RINFOG and INFOG \n");
+ printf("============= After Factorisation ==================\n");
+ for(int ii=0; ii< Rinfo; ii++)
+ printf( "RINFOG[%d]= %f \n", ii, id.RINFOG(ii+1) );
+ printf("=====================================================\n");
+ for(int ii=0; ii< Sinfo; ii++)
+ printf( "INFOG[%d]= %d \n", ii, id.INFOG(ii+1) );
+ printf("=====================================================\n");
+ }
+ }
+
+ if( verbosity )
+ if(myid==0){
+ finishtime = clock();
+ timeused= (finishtime-starttime)/(1000 );
+ printf("=====================================================\n");
+ cout << "MUMPS : time factorisation :: " << timeused << " ms" <<endl;
+ printf("=====================================================\n");
+ }
+
+
+ }
+ void Solver(const MatriceMorse<double> &AA,KN_<double> &x,const KN_<double> &b) const {
+ long int starttime,finishtime;
+ long int timeused;
+ /////////////////////////////
+ double *rhs;
+ int job;
+
+ if(verbosity) starttime = clock();
+
+ ffassert ( &x[0] != &b[0]);
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+
+ // indices des colonnes commence par 1 avec mumps
+ // et 0 dans freefem ==> renumerotation
+ if(jcn != NULL)
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]+1;
+
+
+ if ( !(rhs = (double*) malloc(sizeof(double)*m) ) ){
+ printf("Pb allocate rhs in MUMPS\n");
+ exit(1);
+ }
+
+ for(int ii=0; ii<m; ++ii){
+ rhs[ii] = b[ii];
+ }
+
+ if( myid == 0 )
+ id.rhs=rhs;
+
+ /* solve linear problem */
+
+ id.job=3;
+ dmumps_c(&id);
+
+ if( myid==0 ){
+ x=id.rhs;
+ MPI_Bcast( x, n, MPI_DOUBLE, 0, comm );
+ }
+ else
+ MPI_Bcast( x, n, MPI_DOUBLE, 0, comm );
+
+ // deallocation de rhs
+ free(rhs);
+
+ // indices des colonnes commence par 1 avec mumps
+ // et 0 dans freefem ==> renumerotation
+ if(jcn != NULL)
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]-1;
+
+ if(verbosity) cout << " x min max " << x.min() << " " <<x.max() << endl;
+
+
+
+
+ if( verbosity >1){
+ /* information given by mumps*/
+ int Rinfo=20;
+ int Sinfo=40;
+ // in Freefem++ we give only global information
+ if(myid == 0){
+ printf("Global Output Information of MUMPS: RINFOG and INFOG \n");
+ printf("============= After Solving ==================\n");
+ for(int ii=0; ii< Rinfo; ii++)
+ printf( "RINFOG[%d]= %f \n", ii, id.RINFOG(ii+1) );
+ printf("=====================================================\n");
+ for(int ii=0; ii< Sinfo; ii++)
+ printf( "INFOG[%d]= %d \n", ii, id.INFOG(ii+1) );
+ printf("=====================================================\n");
+ }
+ }
+
+ if( verbosity ){
+ if(myid==0){
+ finishtime = clock();
+ timeused= (finishtime-starttime)/(1000 );
+ printf("=====================================================\n");
+ cout << "MUMPS : time solve step :: " << timeused << " ms, Mem usage " << id.INFOG(16) << "Mb \n";
+ printf("=====================================================\n");
+ }
+ }
+ }
+
+ ~dSolveMUMPSmpi() {
+ if(verbosity>10)
+ cout << "~SolveMUMPS S:" << endl;
+
+ id.job=JOB_END;
+ dmumps_c(&id); /* Terminate instance */
+
+ if( irn != NULL){
+ free(irn);
+ irn=NULL;
+ }
+ /*
+ free(jcn_loc);
+ free(irn_loc);
+ free(a_loc);
+ */
+ }
+ void addMatMul(const KN_<R> & x, KN_<R> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<R> &) (*this) * x;
+ }
+
+};
+
+
+static mumps_double_complex *mumps_dc(Complex *p) { return (mumps_double_complex *) (void *) p;}
+static Complex *inv_mumps_dc(mumps_double_complex *p) { return (Complex *) (void *) p;}
+
+class zSolveMUMPSmpi : public MatriceMorse<Complex>::VirtualSolver {
+
+ double eps;
+ mutable double epsr;
+ double tgv;
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+ mutable MPI_Comm comm;
+
+ Complex *a;
+ int *irn, *jcn;
+ int n, m, nz;
+
+ // parameter MUMPS
+ KN<int> perm_r; /* row permutations from partial pivoting */
+ KN<int> perm_c;
+ KN<double> scale_r;
+ KN<double> scale_c;
+ string string_option;
+ string data_option;
+ int SYM;
+ int PAR;
+ int myid;
+
+ // distribuer
+ int nz_loc;
+ int *jcn_loc, *irn_loc;
+ Complex *a_loc;
+
+
+ static const int JOB_INIT=-1;
+ static const int JOB_END=-2;
+ static const int USE_COMM_WORLD= -987654;
+
+ // variable complex
+ mutable ZMUMPS_STRUC_C id;
+
+ /* variable d'informations */
+
+#define ICNTL(I) icntl[(I)-1] /* macro s.t. indices match documentation */
+#define CNTL(I) cntl[(I)-1] /* macro s.t. indices match documentation */
+#define RINFOG(I) rinfog[(I)-1] /* macro s.t. indices match documentation */
+#define INFOG(I) infog[(I)-1] /* macro s.t. indices match documentation */
+public:
+ zSolveMUMPSmpi(const MatriceMorse<Complex> &AA,int strategy,double ttgv, double epsilon,
+ double pivot,double pivot_sym, string param_string, string datafile, KN<long> ¶m_int,
+ KN<double> ¶m_double, KN<long> &pperm_r, KN_<long> &pperm_c, KN<double> &pscale_r,KN<double> &pscale_c, MPI_Comm * mpicommw) :
+ eps(epsilon),epsr(0),
+ tgv(ttgv), string_option(param_string), data_option(datafile), perm_r(pperm_r), perm_c(pperm_c),
+ tol_pivot_sym(pivot_sym),tol_pivot(pivot), scale_r(pscale_r), scale_c(pscale_c)
+ {
+ long int starttime,finishtime;
+ long int timeused;
+ if(verbosity) starttime = clock();
+ int dataint[40];
+ double datadouble[15];
+ int ierr;
+
+ if(mpicommw==0){
+ comm=MPI_COMM_WORLD;
+ }
+ else
+ comm= *mpicommw;
+
+ /* ------------------------------------------------------------
+ INITIALIZE THE MUMPS PROCESS GRID.
+ ------------------------------------------------------------*/
+ ierr = MPI_Comm_rank(comm, &myid);
+ if( myid ==0){
+ n = AA.n;
+ m = AA.m;
+ nz = AA.nbcoef;
+
+ MPI_Bcast( &n, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &m, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &nz, 1, MPI_INT, 0, comm );
+ }
+ else{
+ MPI_Bcast( &n, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &m, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &nz, 1, MPI_INT, 0, comm );
+ }
+
+
+ if( !(param_int==NULL) )
+ assert( param_int.N() == 42);
+ if( !(param_double==NULL) )
+ assert( param_double.N() == 15);
+ if(pperm_r)
+ assert( perm_r.N() == n);
+ if(pscale_r)
+ assert( scale_r.N() == n+m );
+ if(pscale_c)
+ assert( scale_c.N() == n+m );
+ if( n != m )
+ cerr << "only square matrix are supported by MUMPS" << endl;
+
+ /* ------------------------------------------------------------
+ INITIALIZE THE MUMPS PROCESS GRID.
+ ------------------------------------------------------------*/
+
+ // initialisation par defaut
+
+ SYM=0; PAR=1;
+
+ // if(!string_option.empty())
+ // {
+ // read_options_freefem(&string_option,&SYM,&PAR);
+ // }
+ if( !(param_int==NULL) ){
+ SYM = param_int[0];
+ PAR = param_int[1];
+ }
+ else
+ if(!data_option.empty())
+ {
+ if(myid==0){
+ char * retfile= new char[data_option.size()+1];
+ strcpy(retfile, (&data_option)->c_str());
+ printf("read data from file %s\n", retfile);
+ FILE *pFile=fopen(retfile,"rt");
+
+ int i_data=0;
+ int d_data=0.;
+ char data[256];
+ char *tictac;
+
+ fgets(data,256,pFile);
+ tictac = strtok(data," /!#\t\n");
+ SYM = atoi(tictac);
+
+ fgets(data,256,pFile);
+ tictac = strtok(data," /!#\t\n");
+ PAR = atoi(tictac);
+
+ while( !feof(pFile) && i_data < 40){
+ fgets(data,256,pFile);
+ tictac = strtok(data," /!#\t\n");
+ dataint[i_data] = (int)atol(tictac);
+ i_data++;
+ }
+ assert(i_data == 40);
+ while( !feof(pFile) && d_data < 15){
+ fgets(data,256,pFile);
+ tictac = strtok(data," /!#\t\n");
+ datadouble[d_data] = (double)atof(tictac);
+ d_data++;
+ }
+ assert(d_data == 15);
+ fclose(pFile);
+ delete [] retfile;
+
+ MPI_Bcast( &SYM, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &PAR, 1, MPI_INT, 0, comm );
+
+ MPI_Bcast( dataint, 40, MPI_INT, 0, comm );
+ MPI_Bcast( datadouble, 15, MPI_DOUBLE, 0, comm );
+
+ fclose(pFile);
+ delete [] retfile;
+ }
+ else{
+
+ MPI_Bcast( &SYM, 1, MPI_INT, 0, comm );
+ MPI_Bcast( &PAR, 1, MPI_INT, 0, comm );
+
+ MPI_Bcast( dataint, 40, MPI_INT, 0, comm );
+ MPI_Bcast( datadouble, 15, MPI_DOUBLE, 0, comm );
+ }
+ }
+
+ /* Initialize a MUMPS instance. Use comm */
+ id.job=JOB_INIT;
+ id.par=PAR;
+ id.sym=SYM;
+ id.comm_fortran=(MUMPS_INT) MPI_Comm_c2f(comm);
+
+ zmumps_c(&id);
+
+ /* set parameter of mumps */
+ if( !(param_int==NULL) || !(param_double==NULL) ){
+ if(!data_option.empty()){
+ printf("read option before with the file %s\n",data_option.c_str());
+ exit(1);
+ }
+
+ if( !(param_int==NULL) ){
+ for(int ii=0; ii<40; ii++)
+ id.ICNTL(ii+1) = param_int[ii+2];
+ }
+ else
+ // parameter by default
+ id.ICNTL(1)=-1; id.ICNTL(2)=-1; id.ICNTL(3)=-1; id.ICNTL(4)=0;
+
+ if( !(param_double==NULL) )
+ for(int ii=0; ii<15; ii++)
+ id.CNTL(ii+1) = param_double[ii];
+
+ }
+ else
+ if(!data_option.empty()){
+ for(int ii=0; ii<40; ii++)
+ id.ICNTL(ii+1) = dataint[ii];
+ for(int ii=0; ii<15; ii++)
+ id.CNTL(ii+1) = datadouble[ii];
+ }
+ else{
+ // parameter by default
+ id.ICNTL(1)=-1; id.ICNTL(2)=-1; id.ICNTL(3)=-1; id.ICNTL(4)=0;
+ }
+
+ // uniquement donner au host
+ if(myid==0){
+ if( !(perm_r==NULL) && id.ICNTL(7)==1){
+ for(int ii=0; ii<n; ii++) id.perm_in[ii] = pperm_r[ii];
+ }
+ // a decommenter
+ //if( !(perm_c==NULL) && id.ICNTL(6)==1){
+ //for(int ii=0; ii<m; ii++) id.perm_in[ii] = pperm_c[ii];
+ //}
+ if( !(scale_r==NULL) && !(scale_c==NULL) && id.ICNTL(8)==-1 ){
+ for(int ii=0; ii<n; ii++) id.rowsca[ii] = scale_r[ii];
+ for(int ii=0; ii<m; ii++) id.colsca[ii] = scale_c[ii];
+ }
+ }
+
+
+ /* valeur par defaut mis dans le dur */
+
+ irn = NULL;
+ jcn = NULL;
+
+
+ if( id.ICNTL(5) != 0 ){
+ printf("we consider only assembled format \n");
+ exit(1);
+ }
+
+
+ /* Define the problem on the host */
+ if (myid == 0) {
+ id.n = n; id.nz =nz;
+ //id.irn=irn; id.jcn=jcn;
+ //id.a = mumps_dc(a); //id.rhs = rhs;
+ }
+
+ if( id.ICNTL(18) == 0)
+ {
+ // CASE:: NON DISTRIBUTED MATRIX
+ a=AA.a;
+ // ATTENTION
+ // AA.cl :: indice des colonnes (exacte) et AA.lg :: indice des lignes
+ // index of row and colummn by 1
+ jcn = AA.cl;
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]+1;
+
+ if( !(irn = (int*) malloc(sizeof(int)*nz)) ){
+ printf("problem allocation jcn ");
+ exit(1);
+ }
+
+ assert(AA.lg[n] == nz);
+ for(int ii=0; ii< n; ii++)
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+ irn[ii1] = ii+1;
+
+ if (myid == 0) {
+ id.irn=irn; id.jcn=jcn;
+ id.a = mumps_dc(a); //id.rhs = rhs;
+ }
+
+ /* Call the MUMPS package. */
+ // Analyse + Factorisation
+ id.job=4;
+ zmumps_c(&id);
+
+ }
+
+
+ if( id.ICNTL(18) == 1 || id.ICNTL(18) == 2 )
+ {
+
+ cout <<"id.ICNTL(18) = 1 || id.ICNTL(18) == 2 "<< endl;;
+ // ATTENTION
+ // AA.cl :: indice des colonnes (exacte) et AA.lg :: indice des lignes
+ // index of row and column by 1
+
+ if(myid == 0) { // uniquement sur le proc 0
+ jcn = AA.cl;
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]+1;
+
+ if( !(irn = (int*) malloc(sizeof(int)*nz)) ){
+ printf("problem allocation irn ");
+ exit(1);
+ }
+
+ assert(AA.lg[n] == nz);
+ for(int ii=0; ii< n; ii++)
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+ irn[ii1] = ii+1;
+
+
+ //if (myid == 0) { // changement uniquement sur le proc 0
+ id.irn=irn; id.jcn=jcn;
+ }
+
+ /* Call the MUMPS package. */
+ // Analyse
+ id.job=1;
+ zmumps_c(&id);
+
+ if(id.ICNTL(18) == 1 ){
+
+ if( PAR == 0 ){
+ int *nz_loc_procs;
+ int *fst_nz_procs;
+ int *irn_g;
+ int *jcn_g;
+ Complex *a_g;
+ int commSize;
+
+ MPI_Comm_size(comm,&commSize);
+ cout << commSize << "commSize" << "nz =" << nz << endl;
+ if(myid==0){
+ // allocation des differents tableaux
+ nz_loc_procs = (int*) malloc ( commSize*sizeof(int) );
+ for(int ii=0; ii<commSize; ii++){
+ nz_loc_procs[ii]=0;
+ }
+ for(int ii=0; ii<nz; ii++){
+ nz_loc_procs[ id.mapping[ii] ]++;
+ }
+ assert(nz_loc_procs[0] == 0);
+ nz_loc_procs[0] = 2;
+
+ fst_nz_procs = (int*) malloc ( commSize*sizeof(int) );
+ fst_nz_procs[0] = 0;
+ for(int ii=1; ii<commSize; ii++){
+ fst_nz_procs[ii] = fst_nz_procs[ii-1]+nz_loc_procs[ii-1];
+ }
+
+ irn_g = (int*) malloc( sizeof(int)*(nz+2) );
+ jcn_g = (int*) malloc( sizeof(int)*(nz+2) );
+ a_g = (Complex*) malloc( 2*sizeof(double)*(nz+2) );
+
+ int *index_p;
+ index_p = (int*) malloc ( commSize*sizeof(int) );
+ for(int ii=0; ii<commSize; ii++)
+ index_p[ii] =0;
+
+ irn_g[ 0 ] = 1;
+ jcn_g[ 0 ] = 1;
+ a_g [ 0 ] = 1.;
+
+ irn_g[ 1 ] = 1;
+ jcn_g[ 1 ] = 1;
+ a_g [ 1 ] = 1.;
+
+ for(int ii=0;ii<nz; ii++){
+ int jj1 = id.mapping[ii];
+ int jj2 = fst_nz_procs[jj1] + index_p[jj1];
+ assert(jj2 > 1);
+ irn_g[ jj2 ] = irn[ ii ];
+ jcn_g[ jj2 ] = jcn[ ii ];
+ a_g [ jj2 ] = AA.a[ ii ];
+ cout << "jj2= " << jj2 << endl;
+ assert( jj2 < nz+2);
+ index_p[jj1]++;
+ }
+ free(index_p);
+
+ }
+
+ MPI_Scatter( nz_loc_procs, 1, MPI_INT, &nz_loc, 1, MPI_INT, 0, comm);
+
+ // allocation des tableaux locaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (Complex*) malloc(2*sizeof(double)*nz_loc);
+
+ MPI_Scatterv( a_g, nz_loc_procs, fst_nz_procs, MPI_DOUBLE_COMPLEX, a_loc, nz_loc, MPI_DOUBLE_COMPLEX, 0, comm);
+ MPI_Scatterv( jcn_g, nz_loc_procs, fst_nz_procs, MPI_INT, jcn_loc, nz_loc, MPI_INT, 0, comm);
+ MPI_Scatterv( irn_g, nz_loc_procs, fst_nz_procs, MPI_INT, irn_loc, nz_loc, MPI_INT, 0, comm);
+
+ if( myid > 0){
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = mumps_dc(a_loc);
+ }
+
+ if( myid == 0){
+ //free( irn_loc );
+ //free( jcn_loc );
+ //free( a_loc );
+ free( nz_loc_procs );
+ free( fst_nz_procs );
+ free( irn_g );
+ free( jcn_g );
+ free( a_g );
+ }
+ }
+
+
+ if( PAR == 1 ){
+ int *nz_loc_procs;
+ int *fst_nz_procs;
+ int *irn_g;
+ int *jcn_g;
+ Complex *a_g;
+ int commSize;
+
+ MPI_Comm_size(comm,&commSize);
+
+ if(myid==0){
+ // allocation des differents tableaux
+ nz_loc_procs = (int*) malloc ( commSize*sizeof(int) );
+ for(int ii=0; ii<commSize; ii++){
+ nz_loc_procs[ii]=0;
+ }
+ for(int ii=0; ii<nz; ii++){
+ nz_loc_procs[ id.mapping[ii] ]++;
+ }
+
+ fst_nz_procs = (int*) malloc ( commSize*sizeof(int) );
+
+ fst_nz_procs[0] = 0;
+ for(int ii=1; ii<commSize; ii++){
+ fst_nz_procs[ii] = fst_nz_procs[ii-1]+nz_loc_procs[ii-1];
+ }
+
+ irn_g = (int*) malloc(sizeof(int)*nz);
+ jcn_g = (int*) malloc(sizeof(int)*nz);
+ a_g = (Complex*) malloc(2*sizeof(double)*nz);
+
+ int *index_p;
+ index_p = (int*) malloc ( commSize*sizeof(int) );
+ for(int ii=0; ii<commSize; ii++)
+ index_p[ii] =0;
+
+ for(int ii=0;ii<nz; ii++){
+ int jj1 = id.mapping[ii];
+ int jj2 = fst_nz_procs[jj1] + index_p[jj1];
+
+ irn_g[ jj2 ] = irn[ ii ];
+ jcn_g[ jj2 ] = jcn[ ii ];
+ a_g [ jj2 ] = AA.a[ ii ];
+ index_p[jj1]++;
+ }
+ free(index_p);
+
+ }
+
+ MPI_Scatter( nz_loc_procs, 1, MPI_INT, &nz_loc, 1, MPI_INT, 0, comm);
+
+ // allocation des tableaux locaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (Complex*) malloc(2*sizeof(double)*nz_loc);
+
+ MPI_Scatterv( a_g, nz_loc_procs, fst_nz_procs, MPI_DOUBLE_COMPLEX, a_loc, nz_loc, MPI_DOUBLE_COMPLEX, 0, comm);
+ MPI_Scatterv( jcn_g, nz_loc_procs, fst_nz_procs, MPI_INT, jcn_loc, nz_loc, MPI_INT, 0, comm);
+ MPI_Scatterv( irn_g, nz_loc_procs, fst_nz_procs, MPI_INT, irn_loc, nz_loc, MPI_INT, 0, comm);
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = mumps_dc(a_loc);
+
+
+ if( myid == 0){
+ free( nz_loc_procs );
+ free( fst_nz_procs );
+ free( irn_g );
+ free( jcn_g );
+ free( a_g );
+ }
+ }
+
+
+
+
+ //printf("id.ICNTL(18)==1 pas prevus a construire \n");
+ //exit(1);
+
+ /* // version matrice sur tous les processeurs
+ if(myid==0){
+
+ MPI_Bcast( id.mapping, nz, MPI_INT, 0, comm );
+
+ nz_loc=0;
+ for(int ii=0;ii<nz; ii++){
+ if( id.mapping[ii] == myid) nz_loc++;
+ }
+
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (Complex*) malloc(sizeof(Complex)*nz_loc);
+
+ int jj=0;
+ for(int ii=0;ii<nz; ii++)
+ if( id.mapping[ii] == myid){
+ irn_loc[jj] = irn[ ii ];
+ jcn_loc[jj] = jcn[ ii ];
+ a_loc[jj] = AA.a[ ii ];
+ jj++;
+ }
+ assert(jj==nz_loc);
+
+ if(PAR==1){
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = mumps_dc(a_loc);
+ }
+
+ }
+ else{
+ int *mapping;
+ mapping = (int*) malloc(sizeof(int)*nz);
+ MPI_Bcast( mapping, nz, MPI_INT, 0, comm );
+ nz_loc=0;
+
+ for(int ii=0;ii<nz; ii++)
+ if( mapping[ii] == myid) nz_loc++;
+
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (Complex*) malloc(sizeof(Complex)* nz_loc);
+
+ int jj=0.;
+ for(int ii=0;ii<nz; ii++)
+ if( mapping[ii] == myid){
+ irn_loc[jj] = irn[ ii ];
+ jcn_loc[jj] = jcn[ ii ];
+ a_loc[jj] = AA.a[ ii ];
+ jj++;
+ }
+ assert(jj==nz_loc);
+
+ free(mapping);
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = mumps_dc(a_loc);
+
+
+
+ }
+ */
+
+ /* Call the MUMPS package. */
+ // Factorisation
+ id.job=2;
+ zmumps_c(&id);
+
+ }
+
+
+ if(id.ICNTL(18) == 2 ){
+ printf("id.ICNTL(18)==2 not yet available \n");
+ exit(1);
+
+ if(PAR == 0){
+ printf("id.ICNTL(18)==2 pas prevus \n");
+ exit(1);
+ if(myid !=0) {
+ int commSize;
+ ierr=MPI_Comm_size(comm,&commSize);
+ commSize=commSize-1;
+ int myidpar=myid-1;
+ int m_loc_fst = m/commSize;
+ int m_loc;
+ if( myidpar == commSize-1 && ( m_loc_fst*commSize != m ) )
+ m_loc = m-m_loc_fst*( commSize-1 );
+ else
+ m_loc = m_loc_fst;
+
+ int fst_row= myidpar*m_loc_fst;
+ nz_loc = AA.lg[fst_row+m_loc]-AA.lg[fst_row];
+
+ // allocation des tableaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (Complex*) malloc(sizeof(Complex)*nz_loc);
+
+ int fst_nnz = AA.lg[fst_row];
+ for(int ii=0; ii < nz_loc; ii++){
+ a_loc[ii] = AA.a[fst_nnz+ii];
+ jcn_loc[ii] = AA.cl[fst_nnz+ii]; // jcn=AA.cl a ete augmenter de 1 avant => pas ajouter 1
+ }
+
+ for(int ii=fst_row; ii< fst_row+m_loc; ii++){
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+ irn_loc[ii1-fst_nnz] = ii+1;
+ }
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = mumps_dc(a_loc);
+ }
+ }
+ if(PAR == 1){
+
+ int commSize;
+ ierr=MPI_Comm_size(comm,&commSize);
+ int m_loc_fst = m/commSize;
+ int m_loc;
+ if( myid == commSize-1 && ( m_loc_fst*commSize != m ) )
+ m_loc = m-m_loc_fst*( commSize-1 );
+ else
+ m_loc = m_loc_fst;
+
+ int fst_row= myid*m_loc_fst;
+ nz_loc = AA.lg[fst_row+m_loc]-AA.lg[fst_row];
+
+ // allocation des tableaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (Complex*) malloc(sizeof(Complex)*nz_loc);
+
+ int fst_nnz = AA.lg[fst_row];
+ for(int ii=0; ii < nz_loc; ii++){
+ a_loc[ii] = AA.a[fst_nnz+ii];
+ jcn_loc[ii] = AA.cl[fst_nnz+ii]; // jcn=AA.cl a ete augmenter de 1 avant => pas ajouter 1
+ }
+
+ for(int ii=fst_row; ii< fst_row+m_loc; ii++){
+ for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+ irn_loc[ii1-fst_nnz] = ii+1;
+ }
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = mumps_dc(a_loc);
+
+ }
+
+ /* Call the MUMPS package. */
+ // Factorisation
+ id.job=2;
+ zmumps_c(&id);
+ }
+ }
+
+ if( id.ICNTL(18) == 3 )
+ {
+ // indices et colonnes de la matrice
+
+// // Cas Matrice parallele ::
+// // ========================
+//
+// // Cas stockage Morse parallele
+// m_loc = AA.m_loc; // Nombre de lignes prise en compte
+// nz_loc = AA.nbcoef_loc; // Nombre de coefficients non nulles
+// // indice des colonnes
+// jcn_loc = AA.cl_loc; // indices des colonnes dans la matrice locale
+//
+// if( !(irn_loc = (int*) malloc(sizeof(int)*nz_loc)) ){
+// printf("problem allocation jcn ");
+// exit(1);
+// }
+// assert(AA.lg_loc[nrow_loc] == nz_loc);
+// for(int ii=0; ii< nrow_loc; ii++)
+// for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+// irn_loc[ii1] = ii+1;
+//
+// a_loc=AA.a_loc;
+//
+ // Pas de matrice parallele ==> utilisation astuce de SuperLU
+ // Matrice :: distribution bloc continue de lignes :: voir SuperLU
+ // Attention :: performance ???
+
+
+ cout <<"id.ICNTL(18) = 3, PAR="<< PAR << endl;
+
+ if(PAR == 0){
+// if(myid !=0) {
+// int commSize;
+// ierr=MPI_Comm_size(comm,&commSize);
+// commSize=commSize-1;
+// int myidpar=myid-1;
+// int m_loc_fst;
+// m_loc_fst= m/commSize;
+// int m_loc;
+// if( myidpar == commSize-1 && ( m_loc_fst*commSize != m ) )
+// m_loc = m-m_loc_fst*( commSize-1 );
+// else
+// m_loc = m_loc_fst;
+//
+// int fst_row;
+// fst_row= myidpar*m_loc_fst;
+// nz_loc = AA.lg[fst_row+m_loc]-AA.lg[fst_row];
+//
+// // allocation des tableaux
+// irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// a_loc = (Complex*) malloc(sizeof(Complex)* nz_loc);
+//
+// int fst_nnz;
+// fst_nnz = AA.lg[fst_row];
+// for(int ii=0; ii < nz_loc; ii++){
+// a_loc[ii] = AA.a[fst_nnz+ii];
+// jcn_loc[ii] = AA.cl[fst_nnz+ii]+1;
+// }
+// for(int ii=fst_row; ii< fst_row+m_loc; ii++){
+// for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+// irn_loc[ii1-fst_nnz] = ii+1;
+// }
+// id.nz_loc = nz_loc;
+// id.irn_loc = irn_loc;
+// id.jcn_loc = jcn_loc;
+// id.a_loc = mumps_dc(a_loc);
+// }
+
+ // definition de variables
+ int commSize;
+ int m_loc_fst;
+ int m_loc;
+ int fst_row;
+
+
+ int *nz_loc_procs;
+ int *fst_nz_procs;
+ int *m_loc_procs;
+ int *fst_row_procs;
+
+
+ Complex *tab_a;
+ int *tab_cl;
+ int *tab_lg;
+ int *tab_lg_loc;
+
+ MPI_Comm_size(comm,&commSize);
+
+ if( myid !=0){
+ int commSizemm;
+ int myidpar=myid-1;
+
+ commSizemm = commSize-1;
+ m_loc_fst= m/commSizemm;
+
+ if( myidpar == commSizemm-1 && ( m_loc_fst*commSizemm != m ) )
+ m_loc = m-m_loc_fst*( commSizemm-1 );
+ else
+ m_loc = m_loc_fst;
+
+ if(verbosity > 5){
+ fst_row = myidpar*m_loc_fst;
+ cout << " myid = " << myid << endl;
+ cout <<" m_loc = " << m_loc << endl;
+ cout <<" fst_row = " << fst_row << endl;
+ }
+
+ }
+ if( myid ==0){
+
+ int commSizemm;
+ commSizemm = commSize-1;
+ m_loc_fst= m/commSizemm;
+
+ fst_row_procs = (int* ) malloc( commSize*sizeof(int) );
+ m_loc_procs = (int* ) malloc( commSize*sizeof(int) );
+ fst_nz_procs = (int* ) malloc( commSize*sizeof(int) );
+ nz_loc_procs = (int* ) malloc ( commSize*sizeof(int) );
+
+
+ fst_row_procs [0] = 0;
+ m_loc_procs [0] = 0;
+
+ for( int ii= 1; ii<commSize; ii++){
+ fst_row_procs [ii] = (ii-1)*m_loc_fst;
+ m_loc_procs [ii] = m_loc_fst;
+ }
+
+ if( m_loc_fst*(commSize-1) != m )
+ m_loc_procs [commSize-1] = m-m_loc_fst*( (commSize-1)-1 );
+
+
+ nz_loc_procs [0] = 0;
+ fst_nz_procs [0] = 0;
+
+ for( int ii= 1; ii<commSize; ii++){
+ nz_loc_procs [ii] = AA.lg[fst_row_procs[ii]+m_loc_procs[ii] ] - AA.lg[fst_row_procs[ii]];
+ fst_nz_procs [ii] = AA.lg[fst_row_procs[ii]];
+ }
+
+
+ /*
+ tab_a= (int* ) malloc( nz*sizeof(double) );
+ tab_cl = (int* ) malloc( nz*sizeof(int) );
+ tab_lg = (int* ) malloc ( n*sizeof(int) );
+ */
+ tab_a = AA.a;
+ tab_cl = AA.cl;
+ tab_lg = AA.lg;
+ }
+
+ MPI_Scatter( nz_loc_procs, 1, MPI_INT, &nz_loc, 1, MPI_INT, 0, comm);
+ MPI_Scatter( m_loc_procs, 1, MPI_INT, &m_loc, 1, MPI_INT, 0, comm);
+ MPI_Scatter( fst_row_procs, 1, MPI_INT, &fst_row, 1, MPI_INT, 0, comm);
+
+ if(verbosity > 5){
+ cout << "after scatter " << myid << endl;
+ cout << " myid = " << myid << endl;
+ cout <<" m_loc = " << m_loc << endl;
+ cout <<" fst_row = " << fst_row << endl;
+ }
+ // allocation des tableaux locaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (Complex*) malloc(2*sizeof(double)*nz_loc);
+ tab_lg_loc = (int*) malloc(sizeof(int)*(m_loc) );
+
+
+
+ MPI_Scatterv( tab_a, nz_loc_procs, fst_nz_procs, MPI_DOUBLE_COMPLEX, a_loc, nz_loc, MPI_DOUBLE_COMPLEX, 0, comm);
+ MPI_Scatterv( tab_cl, nz_loc_procs, fst_nz_procs, MPI_INT, jcn_loc, nz_loc, MPI_INT, 0, comm);
+ MPI_Scatterv( tab_lg, m_loc_procs, fst_row_procs, MPI_INT, tab_lg_loc, m_loc, MPI_INT, 0, comm);
+
+
+ int jj=0;
+ for(int ii=0; ii<m_loc-1; ii++)
+ for(int ii1= tab_lg_loc[ii]; ii1 < tab_lg_loc[ii+1]; ii1++){
+ irn_loc[jj] = fst_row+ii+1;
+ jj++;
+ }
+
+ for(int ii1= tab_lg_loc[m_loc-1]; ii1 < tab_lg_loc[0]+nz_loc; ii1++){
+ irn_loc[jj] = fst_row+(m_loc-1)+1;
+ jj++;
+ }
+
+ for(int ii=0; ii < nz_loc; ii++){
+ jcn_loc[ii] = jcn_loc[ii]+1;
+ }
+
+ assert( jj == nz_loc );
+
+ free( tab_lg_loc );
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = mumps_dc(a_loc);
+
+ if( myid == 0 ){
+ free( fst_row_procs );
+ free( m_loc_procs );
+ free( fst_nz_procs );
+ free( nz_loc_procs );
+ }
+
+
+ }
+ if(PAR ==1) {
+
+
+// int commSize;
+// ierr=MPI_Comm_size(comm,&commSize);
+// int m_loc_fst;
+// m_loc_fst= m/commSize;
+// int m_loc;
+// if( myid == commSize-1 && ( m_loc_fst*commSize != m ) )
+// m_loc = m-m_loc_fst*( commSize-1 );
+// else
+// m_loc = m_loc_fst;
+//
+// int fst_row;
+// fst_row = myid*m_loc_fst;
+// nz_loc = AA.lg[fst_row+m_loc]-AA.lg[fst_row];
+//
+// allocation des tableaux
+// irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+// a_loc = (Complex*) malloc(sizeof(Complex)*nz_loc);
+//
+// int fst_nnz;
+// fst_nnz= AA.lg[fst_row];
+// for(int ii=0; ii < nz_loc; ii++){
+// a_loc[ii] = AA.a[fst_nnz+ii];
+// jcn_loc[ii] = AA.cl[fst_nnz+ii]+1;
+// }
+//
+// for(int ii=fst_row; ii< fst_row+m_loc; ii++){
+// for(int ii1=AA.lg[ii]; ii1 < AA.lg[ii+1]; ii1++ )
+// irn_loc[ii1-fst_nnz] = ii+1;
+// }
+//
+// id.nz_loc = nz_loc;
+// id.irn_loc = irn_loc;
+// id.jcn_loc = jcn_loc;
+// id.a_loc = mumps_dc(a_loc);
+
+ // definition de variables
+ int commSize;
+ int m_loc_fst;
+ int m_loc;
+ int fst_row;
+
+
+ int *nz_loc_procs;
+ int *fst_nz_procs;
+ int *m_loc_procs;
+ int *fst_row_procs;
+
+
+ Complex *tab_a;
+ int *tab_cl;
+ int *tab_lg;
+ int *tab_lg_loc;
+
+ MPI_Comm_size(comm,&commSize);
+ m_loc_fst= m/commSize;
+
+ if( myid == commSize-1 && ( m_loc_fst*commSize != m ) )
+ m_loc = m-m_loc_fst*( commSize-1 );
+ else
+ m_loc = m_loc_fst;
+
+ fst_row = myid*m_loc_fst;
+
+ if( myid ==0){
+ fst_row_procs = (int* ) malloc( commSize*sizeof(int) );
+ m_loc_procs = (int* ) malloc( commSize*sizeof(int) );
+ fst_nz_procs = (int* ) malloc( commSize*sizeof(int) );
+ nz_loc_procs = (int* ) malloc ( commSize*sizeof(int) );
+
+ for( int ii= 0; ii<commSize; ii++){
+ fst_row_procs [ii] = ii*m_loc_fst;
+ m_loc_procs [ii] = m_loc_fst;
+ }
+
+ if( m_loc_fst*commSize != m )
+ m_loc_procs [commSize-1] = m-m_loc_fst*( commSize-1 );
+
+ for( int ii= 0; ii<commSize; ii++){
+ nz_loc_procs [ii] = AA.lg[fst_row_procs[ii]+m_loc_procs[ii] ] - AA.lg[fst_row_procs[ii]];
+ fst_nz_procs [ii] = AA.lg[fst_row_procs[ii]];
+ }
+
+
+ /*
+ tab_a= (int* ) malloc( nz*sizeof(double) );
+ tab_cl = (int* ) malloc( nz*sizeof(int) );
+ tab_lg = (int* ) malloc ( n*sizeof(int) );
+ */
+ tab_a = AA.a;
+ tab_cl = AA.cl;
+ tab_lg = AA.lg;
+ }
+
+ MPI_Scatter( nz_loc_procs, 1, MPI_INT, &nz_loc, 1, MPI_INT, 0, comm);
+
+ // allocation des tableaux locaux
+ irn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ jcn_loc = (int*) malloc(sizeof(int)*nz_loc);
+ a_loc = (Complex*) malloc(2*sizeof(double)*nz_loc);
+ tab_lg_loc = (int*) malloc(sizeof(int)*(m_loc) );
+
+ MPI_Scatterv( tab_a, nz_loc_procs, fst_nz_procs, MPI_DOUBLE_COMPLEX, a_loc, nz_loc, MPI_DOUBLE_COMPLEX, 0, comm);
+ MPI_Scatterv( tab_cl, nz_loc_procs, fst_nz_procs, MPI_INT, jcn_loc, nz_loc, MPI_INT, 0, comm);
+ MPI_Scatterv( tab_lg, m_loc_procs, fst_row_procs, MPI_INT, tab_lg_loc, m_loc, MPI_INT, 0, comm);
+
+ int jj=0;
+ for(int ii=0; ii<m_loc-1; ii++)
+ for(int ii1= tab_lg_loc[ii]; ii1 < tab_lg_loc[ii+1]; ii1++){
+ irn_loc[jj] = fst_row+ii+1;
+ jj++;
+ }
+
+ for(int ii1= tab_lg_loc[m_loc-1]; ii1 < tab_lg_loc[0]+nz_loc; ii1++){
+ irn_loc[jj] = fst_row+(m_loc-1)+1;
+ jj++;
+ }
+
+ for(int ii=0; ii < nz_loc; ii++){
+ jcn_loc[ii] = jcn_loc[ii]+1;
+ }
+
+ assert( jj == nz_loc );
+
+ free( tab_lg_loc );
+
+ id.nz_loc = nz_loc;
+ id.irn_loc = irn_loc;
+ id.jcn_loc = jcn_loc;
+ id.a_loc = mumps_dc(a_loc);
+
+ if( myid == 0 ){
+ free( fst_row_procs );
+ free( m_loc_procs );
+ free( fst_nz_procs );
+ free( nz_loc_procs );
+ }
+
+
+ }
+ /* Call the MUMPS package. */
+ // Analyse + Factorisation
+
+ id.job=1;
+ zmumps_c(&id);
+
+ id.job=2;
+ zmumps_c(&id);
+ }
+
+
+
+
+ // indices des colonnes commence par 1 avec mumps
+ // et 0 dans freefem ==> renumerotation
+ if( jcn != NULL )
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]-1;
+
+ if( irn != NULL ) free(irn);
+
+
+ if( verbosity >1){
+ /* information given by mumps*/
+ int Rinfo=20;
+ int Sinfo=40;
+ // in Freefem++ we give only global information
+ if(myid == 0){
+ printf("Global Output Information of MUMPS: RINFOG and INFOG \n");
+ printf("============= After Factorisation ==================\n");
+ for(int ii=0; ii< Rinfo; ii++)
+ printf( "RINFOG[%d]= %f \n", ii, id.RINFOG(ii+1) );
+ printf("=====================================================\n");
+ for(int ii=0; ii< Sinfo; ii++)
+ printf( "INFOG[%d]= %d \n", ii, id.INFOG(ii+1) );
+ printf("=====================================================\n");
+ }
+ }
+ if( verbosity){
+ if(myid==0){
+ finishtime = clock();
+ timeused= (finishtime-starttime)/(1000 );
+ printf("=====================================================\n");
+ cout << "MUMPS : time factorisation :: " << timeused << " ms" <<endl;
+ printf("=====================================================\n");
+ }
+
+ }
+
+
+ }
+
+ void Solver(const MatriceMorse<Complex> &AA,KN_<Complex> &x,const KN_<Complex> &b) const {
+ long int starttime,finishtime;
+ long int timeused;
+ //*******************************************************************//
+ // depend pas de la forme de la matrice: distribuer ou assembler
+ Complex *rhs;
+ int job;
+
+ if(verbosity) starttime = clock();
+
+ ffassert ( &x[0] != &b[0]);
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+
+ // indices des colonnes commence par 1 avec mumps
+ // et 0 dans freefem ==> renumerotation
+ if(jcn != NULL)
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]+1;
+
+ if ( !(rhs = (Complex*) malloc(sizeof(Complex)*m) ) ){
+ printf("Pb allocate rhs in MUMPS\n");
+ exit(1);
+ }
+
+ for(int ii=0; ii<m; ++ii){
+ rhs[ii] = b[ii];
+ }
+
+ if( myid == 0 )
+ id.rhs=mumps_dc(rhs);
+
+ /* solve linear problem */
+ id.job=3;
+ zmumps_c(&id);
+
+
+ if( myid==0 ){
+ x=inv_mumps_dc(id.rhs);
+ MPI_Bcast( x, n, MPI_DOUBLE_COMPLEX, 0, comm );
+ }
+ else
+ MPI_Bcast( x, n, MPI_DOUBLE_COMPLEX, 0, comm );
+
+
+
+ // deallocation de rhs
+ free(rhs);
+
+ // indices des colonnes commence par 1 avec mumps
+ // et 0 dans freefem ==> renumerotation
+ if(jcn != NULL)
+ for(int ii=0; ii<nz; ii++)
+ jcn[ii] = jcn[ii]-1;
+
+
+ if( verbosity > 1){
+ /* information given by mumps*/
+ int Rinfo=20;
+ int Sinfo=40;
+ // in Freefem++ we give only global information
+ if(myid == 0){
+ printf("Global Output Information of MUMPS: RINFOG and INFOG \n");
+ printf("============= After Solving ==================\n");
+ for(int ii=0; ii< Rinfo; ii++)
+ printf( "RINFOG[%d]= %f \n", ii, id.RINFOG(ii+1) );
+ printf("=====================================================\n");
+ for(int ii=0; ii< Sinfo; ii++)
+ printf( "INFOG[%d]= %d \n", ii, id.INFOG(ii+1) );
+ printf("=====================================================\n");
+ }
+ }
+
+ if(verbosity)
+ if(myid==0){
+ finishtime = clock();
+ timeused= (finishtime-starttime)/(1000 );
+ printf("=====================================================\n");
+ cout << " MUMPS : time solve :: " << timeused << " ms" <<endl;
+ printf("=====================================================\n");
+ }
+
+ }
+
+ ~zSolveMUMPSmpi() {
+ //*******************************************************************//
+ // depend pas de la forme de la matrice: distribuer ou assembler
+ if(verbosity)
+ cout << "~SolveMUMPS Z:" << endl;
+
+ id.job=JOB_END;
+ zmumps_c(&id); /* Terminate instance */
+
+ }
+ void addMatMul(const KN_<Complex> & x, KN_<Complex> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<Complex> &) (*this) * x;
+ }
+
+};
+
+
+MatriceMorse<double>::VirtualSolver *
+BuildSolverMUMPSmpi(DCL_ARG_SPARSE_SOLVER(double,A))
+{
+ if(verbosity>9)
+ cout << " BuildSolverMUMPS<double>" << endl;
+ return new dSolveMUMPSmpi(*A,ds.strategy, ds.tgv, ds.epsilon, ds.tol_pivot, ds.tol_pivot_sym, ds.sparams, ds.data_filename,
+ ds.lparams, ds.dparams, ds.perm_r, ds.perm_c, ds.scale_r, ds.scale_c,(MPI_Comm *)ds.commworld);
+}
+
+
+
+
+MatriceMorse<Complex>::VirtualSolver *
+BuildSolverMUMPSmpi(DCL_ARG_SPARSE_SOLVER(Complex,A))
+{
+ if(verbosity>9)
+ cout << " BuildSolverMUMPS<Complex>" << endl;
+ return new zSolveMUMPSmpi(*A,ds.strategy, ds.tgv, ds.epsilon, ds.tol_pivot, ds.tol_pivot_sym, ds.sparams, ds.data_filename,
+ ds.lparams, ds.dparams, ds.perm_r, ds.perm_c, ds.scale_r, ds.scale_c,(MPI_Comm *)ds.commworld);
+}
+
+
++<<<<<<< HEAD
+/* class Init { public:
+ Init();
+ };*/
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// the 2 default sparse solver double and complex
+static DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ;
+static DefSparseSolver<Complex>::SparseMatSolver SparseMatSolver_C;
+// the default probleme solver
+static TypeSolveMat::TSolveMat TypeSolveMatdefaultvalue=TypeSolveMat::defaultvalue;
+
+bool SetDefault()
+{
+ if(verbosity)
+ cout << " SetDefault sparse to default" << endl;
+ DefSparseSolver<double>::solver =SparseMatSolver_R;
+ DefSparseSolver<Complex>::solver =SparseMatSolver_C;
+ TypeSolveMat::defaultvalue =TypeSolveMat::SparseSolver;
+}
+
+bool SetMUMPSmpi()
+{
+ if(verbosity)
+ cout << " SetDefault sparse solver to MUMPSmpi" << endl;
+ DefSparseSolver<double>::solver =BuildSolverMUMPSmpi;
+ DefSparseSolver<Complex>::solver =BuildSolverMUMPSmpi;
+ TypeSolveMat::defaultvalue = TypeSolveMatdefaultvalue;
+}
+
+
+
++<<<<<<< HEAD
+//LOADINIT(Init);
+static void Load_Init()
++=======
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ SparseMatSolver_R= DefSparseSolver<double>::solver;
+ SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+
+ if(verbosity>1)
+ cout << "\n Add: MUMPS , defaultsolver defaultsolverMUMPS " << endl;
+ TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+ DefSparseSolver<double>::solver =BuildSolverMUMPSmpi;
+ DefSparseSolver<Complex>::solver =BuildSolverMUMPSmpi;
+ if(! Global.Find("defaultsolver").NotNull() )
+ Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
+ Global.Add("defaulttoMUMPS","(",new OneOperator0<bool>(SetMUMPSmpi));
+}
+
+
+void ffinit()
+{
+
+ SparseMatSolver_R= DefSparseSolver<double>::solver;
+ SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+
+ if(verbosity>1)
+ cout << "\n Add: MUMPS , defaultsolver defaultsolverMUMPS " << endl;
+ TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+ DefSparseSolver<double>::solver =BuildSolverMUMPSmpi;
+ DefSparseSolver<Complex>::solver =BuildSolverMUMPSmpi;
+ if(! Global.Find("defaultsolver").NotNull() )
+ Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
+ Global.Add("defaulttoMUMPS","(",new OneOperator0<bool>(SetMUMPSmpi));
+}
+#include "InitFunct.hpp"
+addingInitFunct FFinit(100,ffinit,"MUMPS_FreeFem");
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init);
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/Makefile.am.orig
index dd2f2d3,0000000..d7893c3
mode 100644,000000..100644
--- a/examples++-mpi/Makefile.am.orig
+++ b/examples++-mpi/Makefile.am.orig
@@@ -1,112 -1,0 +1,124 @@@
+# ======================================================================
+# Laboratoire Jacques-Louis Lions
+# Université Pierre et Marie Curie-Paris6, UMR 7598, Paris, F-75005 France
+# http://www.ljll.math.upmc.fr/lehyaric
+# ======================================================================
+# This file is part of Freefem++
+#
+# Freefem++ is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# Freefem++ is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with Freefem++; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+# ======================================================================
+# headeralh default=0 freefem make multipleauthors start=19/03/10 upmc
+
++<<<<<<< HEAD
+TESTS= schwarz.edp DDM-Schwarz-Lame-2d.edp DDM-Schwarz-Lame-3d.edp DDM-Schwarz-Lap-2dd.edp DDM-Schwarz-Lap-3d.edp \
++=======
++TESTS=DDM-Schwarz-Lame-2d.edp DDM-Schwarz-Lame-3d.edp DDM-Schwarz-Lap-2dd.edp DDM-Schwarz-Lap-3d.edp \
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ DDM-Schwarz-Stokes-2d.edp LaplaceRT-3d-matrix-mumps.edp MPICGLap.edp MPIGMRES2D.edp MPIGMRES3D.edp MUMPS.edp \
+ NSI3d-carac-mumps.edp NSI3d-carac.edp Stokes-v1-matrix-mumps.edp Stokes-v1-matrix-superludist.edp \
+ Stokes-v2-matrix-mumps.edp Stokes-v3-matrix-mumps.edp VG.edp beam-3d-matrix-superludist.edp \
+ cavityNewtow-MUMPS.edp chaleur3D-hips.edp chaleur3D-mumps.edp chaleur3D-superludist.edp cmaes-mpi-VarIneq.edp \
+ essai.edp mortar-DN-4-mpi.edp testsolver_MUMPS.edp testsolver_SuperLU_DIST.edp testsolver_pastix.edp
+
+XFAIL_TESTS=$(TESTS)
+
+LOG_DRIVER=$(SHELL) $(top_srcdir)/test-driver-ff
+TESTS_ENVIRONMENT=TEST_FFPP=$(TEST_FFPPMPI) FLAGS_FFPP="-np 4 -nw" SKIP=$(SKIP_TESTS_MPI)
+
+LIST_IDP= AddLayer2d.idp DDM-Schwarz-macro.idp MPIGMRESmacro.idp getARGV.idp \
+AddLayer3d.idp DDM-funcs-v2.idp MPIplot.idp mortar-msh.idp Heat3d.idp
+
+EXTRA_DIST=*.edp *.idp regtests.sh \
+MPICG.cpp \
+MUMPS_FreeFem.cpp \
+complex_SuperLU_DIST_FreeFem.cpp \
+complex_pastix_FreeFem.cpp \
+dSuperLU_DIST.cpp \
+ffsuperludistoption-1.hpp \
+ffsuperludistoption.hpp \
+generaldefs.h \
+hips_FreeFem.cpp \
+hypre_FreeFem.cpp \
+interfacepastix.cpp \
+parms_FreeFem.cpp \
+real_SuperLU_DIST_FreeFem.cpp \
+real_pastix_FreeFem.cpp mpi-cmaes.cpp \
+ffmumps_fileparam.txt ffpastix_iparm_dparm.txt ffsuperlu_dist_fileparam.txt \
+MUMPS.cpp \
++<<<<<<< HEAD
+MUMPS.edp dmatrix.hpp \
+PETSc.hpp additional.idp removeDOF.cpp schwarz.cpp schwarz.edp stokes-2d.edp utility.cpp schwarz-2d.edp
++=======
++MUMPS.edp dmatrix.hpp
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+# FFCS - list modified to disable some downloaded tools depending on the platform (see
+# [[file:../../../configure.ac::tools_problems_all_platforms]] for reasons why some tools may be
+# deactivated).
+
+LIST_COMPILE=@TOOL_DYLIB_mumps@ @TOOL_DYLIB_hips@ @TOOL_DYLIB_superludist@ @TOOL_DYLIB_pastix@ MPICG.$(DYLIB_SUFFIX) \
++<<<<<<< HEAD
+ at TOOL_DYLIB_parms@ mpi-cmaes.$(DYLIB_SUFFIX) @TOOL_DYLIB_schwarz@
++=======
++ at TOOL_DYLIB_parms@ mpi-cmaes.$(DYLIB_SUFFIX)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+if FFCS_MPIOK
+
+# FFCS - do not set loadpath to be able to run an external version of FF on the examples in this directory with
+# [[../../mkffref]]
+
+all-local:$(LIST_COMPILE)
+ @echo Warning missing mpi plugin: `for i in $(LIST_COMPILE); do if test ! -s $i ; then j=1; echo "$i," ;fi; done`
+ echo "finish compile load mpi solver !"
+else
+all-local:
+endif
+
+.cpp.$(DYLIB_SUFFIX): ../examples++-load/ff-c++ ../examples++-load/WHERE_LIBRARY-download
+# FFCS needs an error exit code to make sure that all libraries are correctly compiled
+#
+# FFCS on Windows inserts all MPI options (include, lib, ...) in the $MPICXX compiler script, instead of "$CXX $MPI_xxx",
+# but it needs '-mpi' to do that
+#
+### -../examples++-load/ff-c++ -auto $<
+ ../examples++-load/ff-c++ -auto -mpi $<
+
+install-exec-local::
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/lib/mpi
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/include
+ $(mkinstalldirs) -m 755 $(DESTDIR)$(ff_prefix_dir)/etc
+ -for i in $(LIST_COMPILE); do \
+ if [ -f $$i ] ; then $(INSTALL) -m 555 $$i $(DESTDIR)$(ff_prefix_dir)/lib/mpi; fi; done
+ $(INSTALL) -m 555 $(LIST_IDP) $(DESTDIR)$(ff_prefix_dir)/idp
+
+
+freefem++.pref:Makefile
+ echo loadpath = \"../examples++-load/\" >freefem++.pref
+ echo includepath = \"../examples++-3d/\" >>freefem++.pref
+ echo includepath += \"../examples++-tutorial/\" >>freefem++.pref
+ echo loadpath += \"./\" >>freefem++.pref
+# force the build for freefem++.pref FH..
+DDM-Schwarz-Lame-2d.edp:freefem++.pref
+# FFCS - cleaning is useful sometimes
+clean-local::
+ -rm *.$(DYLIB_SUFFIX)
+ -rm *.$(OBJEXT)
+
+# Local Variables:
+# mode:makefile
+# ispell-local-dictionary:"british"
+# coding:utf-8
+# End:
diff --cc examples++-mpi/Stokes-v1-matrix-mumps.edp.orig
index eda15da,0000000..74735d7
mode 100644,000000..100644
--- a/examples++-mpi/Stokes-v1-matrix-mumps.edp.orig
+++ b/examples++-mpi/Stokes-v1-matrix-mumps.edp.orig
@@@ -1,81 -1,0 +1,85 @@@
+/*
+to change locatation of daynamic lib. set freefem++.pref file like :
+more freefem++.pref
+loadpath = "../examples++-load/"
+loadpath += "./"
+*/
+
+load "msh3"
+//load "medit"
+load "MUMPS_FreeFem"
+include "getARGV.idp"
+
+verbosity=0;
+real ttgv=1e10;
+string ssparams="nprow=1, npcol="+mpisize;
+
+
+
++<<<<<<< HEAD
+int nn=getARGV("-n",15);
++=======
++int nn=getARGV("-n",20);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+int pplot=getARGV("-plot",0);
+
+
+mesh Th2=square(nn,nn);
+fespace Vh2(Th2,P2); Vh2 ux,uz,p2;
+int[int] rup=[0,2], rdown=[0,1], rmid=[1,1,2,1,3,1,4,1];
+real zmin=0,zmax=1;
+mesh3 Th=buildlayers(Th2,nn,
+ zbound=[zmin,zmax], labelmid=rmid,
+ reffaceup = rup, reffacelow = rdown);
+
+fespace VVh(Th,[P2,P2,P2,P1]);
+fespace UUh(Th,[P2,P2,P2]);
+fespace Uh(Th,P2);
+fespace Ph(Th,P1);
+
+macro Grad(u) [dx(u),dy(u),dz(u)]// EOM
+macro div(u1,u2,u3) (dx(u1)+dy(u2)+dz(u3)) //EOM
+
+func fup = (1-x)*(x)*y*(1-y)*16;
+
+
+VVh [u1,u2,u3,p];
+VVh [v1,v2,v3,q];
+
+real timeI=mpiWtime();
+real time1=mpiWtime();
+varf vStokes([u1,u2,u3,p],[v1,v2,v3,q]) =
+ int3d(Th,qforder=3)( Grad(u1)'*Grad(v1) + Grad(u2)'*Grad(v2) + Grad(u3)'*Grad(v3) //' for emacs
+ - div(u1,u2,u3)*q - div(v1,v2,v3)*p + 1e-10*q*p )
+ + on(2,u1=fup,u2=0,u3=0) + on(1,u1=0,u2=0,u3=0) ;
+
+
+matrix MStokes=vStokes(VVh,VVh,tgv=ttgv);
+cout << "size of matrix " << MStokes.n << " x " << MStokes.m << " nn nzero coef = " << MStokes.nbcoef << endl;
+time1=mpiWtime()-time1;
+
+real timeF=mpiWtime();
+set(MStokes,solver=sparsesolver,tgv=ttgv,sparams=ssparams);
+timeF=mpiWtime()-timeF;
+
+real time2=mpiWtime();
+real[int] b=vStokes(0,VVh);
+time2=mpiWtime()-time2;
+
+real time3=mpiWtime();
+u1[] = MStokes^-1*b;
+time3=mpiWtime()-time3;
+
+timeI=mpiWtime()-timeI;
+
+cout << "============= CPU TIME ============" << endl;
+cout << "size of matrix " << MStokes.n << " x " << MStokes.m << " nn nzero coef = " << MStokes.nbcoef << endl;
+cout << " matrix " << time1 << endl;
+cout << " Fact " << timeF << endl;
+cout << " second member " << time2 << endl;
+cout << " solve " << time3 << endl;
+cout << " ------------" << endl;
+cout << " all " << timeI << endl;
+cout << "============= CPU TIME ============" << endl;
+//if(mpirank==0 && pplot) medit("UV2 PV2",Th,[u1,u2,u3],p);
+
diff --cc examples++-mpi/complex_SuperLU_DIST_FreeFem.cpp.orig
index fadbfbb,0000000..ecc2d74
mode 100644,000000..100644
--- a/examples++-mpi/complex_SuperLU_DIST_FreeFem.cpp.orig
+++ b/examples++-mpi/complex_SuperLU_DIST_FreeFem.cpp.orig
@@@ -1,843 -1,0 +1,861 @@@
+// for automatic compilation with ff-c++
+// FFCS - 23/5/12 - remove metis dependency because it interfers with identically-named libmetis.a from parmetis
+//ff-c++-LIBRARY-dep: superlu_dist blas parmetis mpi fc
+//ff-c++-cpp-dep:
+// ORIG-DATE: 02/2009
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// E-MAIL : jacques.morice at ann.jussieu.fr
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+
+/*
+ Interface freefem++ et SuperLU_DIST_2.3
+
+ /bin/sh ff-mpic++ zSuperLU_DIST.cpp -I/Users/morice/librairie/SuperLU_DIST_2.3/SRC/ -L/Users/morice/librairie/openmpi/lib/ -lmpi -lopen-pal -lopen-rte -L/Users/morice/librairie/PATCHVECLIB/ -lwrapperdotblas -framework veclib -L/Users/morice/librairie/ParMetis-3.1/ -lparmetis -lmetis -L/Users/morice/librairie/SuperLU_DIST_2.3/lib/ -lsuperlu_dist_2.3
+
+*/
+
+// FFCS - required to define __int64 for MSMPI
+#include <stdint.h>
+
+#include <mpi.h>
+#include <iostream>
+using namespace std;
+
+#include "rgraph.hpp"
+#include "error.hpp"
+#include "AFunction.hpp"
+
+//#include "lex.hpp"
+#include "MatriceCreuse_tpl.hpp"
+#include "superlu_zdefs.h"
+#include "ffsuperludistoption.hpp"
+
+
+template <class R> struct SuperLUmpiDISTDriver
+{
+
+};
+template <> struct SuperLUmpiDISTDriver<Complex>
+{
+ /* Driver routines */
+ /* Driver routines */
+ static Dtype_t R_SLU_T() { return SLU_Z;}
+ static doublecomplex *dc(Complex *p) { return (doublecomplex *) (void *) p;}
+ static doublecomplex **dc(Complex **p) { return (doublecomplex **) (void *) p;}
+
+ // Remplacement doublecomplex par Complex
+ static void
+ pgssvx(superlu_options_t *p1, SuperMatrix *p2,
+ ScalePermstruct_t *p3,
+ Complex *p4, int p5, int p6, gridinfo_t *p7,
+ LUstruct_t *p8, SOLVEstruct_t *p9, double *p10,
+ SuperLUStat_t *p11, int *p12)
+ {
+ pzgssvx( p1,p2,p3,
+ dc(p4),p5,p6,p7,p8,p9,p10,p11,p12 );
+ }
+
+ static void
+ pgssvx_ABglobal(superlu_options_t *p1, SuperMatrix *p2,
+ ScalePermstruct_t *p3,
+ Complex *p4, int p5, int p6, gridinfo_t *p7,
+ LUstruct_t *p8, double *p9,
+ SuperLUStat_t *p10, int *p11)
+
+ {
+ pzgssvx_ABglobal( p1,p2,p3,
+ dc(p4),p5,p6,p7,p8,p9,p10,p11 );
+ }
+
+
+ static void
+ Create_CompCol_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, int_t p4,
+ Complex *p5, int_t *p6, int_t *p7,
+ Stype_t p8, Dtype_t p9, Mtype_t p10)
+ {
+ zCreate_CompCol_Matrix_dist( p1,p2,p3,
+ p4,dc(p5),p6,p7,p8,p9,p10 );
+ }
+
+ static void
+ Create_CompRowLoc_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3,
+ int_t p4, int_t p5, int_t p6,
+ Complex *p7, int_t *p8, int_t *p9,
+ Stype_t p10, Dtype_t p11, Mtype_t p12)
+ {
+ zCreate_CompRowLoc_Matrix_dist( p1,p2,p3,
+ p4,p5,p6,dc(p7),p8,p9,p10,p11,p12 );
+ }
+
+ static void
+ CompRow_to_CompCol_dist(int_t p1, int_t p2, int_t p3,
+ Complex *p4, int_t *p5, int_t *p6,
+ Complex **p7, int_t **p8, int_t **p9)
+ {
+ zCompRow_to_CompCol_dist( p1,p2,p3,
+ dc(p4),p5,p6,dc(p7),p8,p9 );
+ }
+
+
+ static void
+ Create_Dense_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, Complex *p4,
+ int_t p5, Stype_t p6, Dtype_t p7,Mtype_t p8)
+ {
+ zCreate_Dense_Matrix_dist( p1,p2,p3,
+ dc(p4),p5,p6,p7,p8 );
+ }
+
+
+
+ static void
+ Create_SuperNode_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, int_t p4,
+ Complex *p5, int_t *p6,
+ int_t *p7, int_t *p8,
+ int_t *p9, int_t *p10,
+ Stype_t p11, Dtype_t p12, Mtype_t p13)
+ {
+ zCreate_SuperNode_Matrix_dist( p1,p2,p3,
+ p4,dc(p5),p6,p7,p8,p9,p10,p11,p12,p13 );
+ }
+
+ static void
+ Print_CompRowLoc_Matrix_dist(SuperMatrix *p1)
+ {
+ zPrint_CompRowLoc_Matrix_dist(p1);
+ }
+
+
+};
+
+template<class R>
+class ZSolveSuperLUmpi : public MatriceMorse<R>::VirtualSolver, public SuperLUmpiDISTDriver<R> {
+
+ double eps;
+ mutable double epsr;
+ double tgv;
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+
+
+ //mutable char equed[1];
+ //yes_no_t equil;
+ mutable SuperMatrix A;
+ NCformat *Astore;
+ //NCformat *Ustore;
+ //SCformat *Lstore;
+
+ mutable superlu_options_t options;
+ mutable mem_usage_t mem_usage;
+ mutable ScalePermstruct_t ScalePermstruct;
+ mutable LUstruct_t LUstruct;
+ mutable SOLVEstruct_t SOLVEstruct;
+ mutable gridinfo_t grid;
+
+ string string_option;
+ string data_option;
+ R *a;
+ int *asub, *xa;
+ int_t m, n, nnz;
+ // rajout pour //
+ int_t nprow,npcol; /* process rows and process columns*/
+
+
+ int matrixdist; // type of distributed matrix
+ MPI_Comm commworld ;
+
+ static const int assembled =0;
+ static const int distributedglobal =1;
+ static const int distributed =2;
+
+public:
+ ZSolveSuperLUmpi(const MatriceMorse<R> &AA,int strategy,double ttgv, double epsilon,
+ double pivot,double pivot_sym, string datafile,
+ string param_char, KN<long> &pperm_r, KN<long> &pperm_c, void * ccommworld ) :
+ eps(epsilon),epsr(0),
+ tgv(ttgv),string_option(param_char),data_option(datafile),
+ tol_pivot_sym(pivot_sym),tol_pivot(pivot)
+ {
+ commworld = ccommworld ? *static_cast<MPI_Comm*>( ccommworld) : MPI_COMM_WORLD;
+
+ R* B;
+ //R* X;
+ SuperLUStat_t stat;
+ int info, ldb, nrhs=0;
+ int i;
+ double* berr;
+
+ int iam;
+
+ // Add for distributed matrix
+ int_t m_loc, m_loc_fst, fst_row, nnz_loc, fst_nnz;
+ R *aloc;
+ int *asubloc, *xaloc;
+ // End Add for distributed matrix
+
+ // time variables
+ long int starttime,finishtime;
+ long int timeused;
+ if(verbosity) starttime = clock();
+
+ A.Store=0;
+ /* Defaults */
+ nrhs = 0;
+
+ /* lecture de nprow and npcol */
+ // Cas max deux procs
+ nprow = 1;
+ MPI_Comm_size(commworld,&npcol);
+
+ matrixdist=0;
+ /* set the default options */
+ set_default_options_dist(&options);
+ DiagScale_t optionDiagScale;
+
+ //if(verbosity > 10) print_options_dist(&options);
+
+ if(!string_option.empty()) read_nprow_npcol_freefem( &string_option, &nprow, &npcol, &matrixdist);
+ if(!string_option.empty()) read_options_freefem(&string_option,&options,&optionDiagScale);
+
+ if(!data_option.empty()) read_options_superlu_datafile(&data_option,&options,&nprow, &npcol, &matrixdist,&optionDiagScale);
+
+ //if(verbosity > 10) print_options_dist(&options);
+
+ /* ------------------------------------------------------------
+ INITIALIZE THE SUPERLU PROCESS GRID.
+ ------------------------------------------------------------*/
+ cout << "Complex superlu_gridinit " << commworld << " "<< ccommworld << " : " << nprow << "X" << npcol <<endl;
+ superlu_gridinit(commworld , nprow, npcol, &grid);
+ cout << " --\n";
+ /* Bail out if I do not belong in the grid. */
+ iam = grid.iam;
+ if ( iam >= nprow * npcol ){
+ //superlu_gridexit(&grid);
+ printf("this process is not used in superlu %d \n",iam);
+ }
+ else
+ {
+ // matrix to procs and vectors
+ if( matrixdist == assembled ){
+
+ if(!iam){
+ cout << "iam=" << iam << endl;
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
+
+ /* create the matrix for superlu_dist */
+ n=AA.n;
+ m=AA.m;
+ nnz=AA.nbcoef;
+
+ assert( AA.lg[n] == nnz );
+ printf("\tDimension\t%dx%d\t # nonzeros %d\n", m, n, nnz);
+
+ /* transform Row to Col */
+ // cela coute cher comme fonction //
+ // dallocateA_dist(n, nnz, &a, &asub, &xa);
+ // dCompRow_to_CompCol_dist(m,n,nnz,arow,asubrow,xarow,&a,&asub,&xa);
+
+ // FFCS - "this->" required by g++ 4.7
+ this->CompRow_to_CompCol_dist(m,n,nnz,AA.a,AA.cl,AA.lg,&a,&asub,&xa);
+
+ /* Broadcast matrix A to the other PEs. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ MPI_Bcast( a, nnz, SuperLU_MPI_DOUBLE_COMPLEX, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+ }
+ else{
+ /*
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
++<<<<<<< HEAD
+ Receive matrix A from PE 0. */
++=======
++ /* Receive matrix A from PE 0. */
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ /* Allocate storage for compressed column representation. */
+ // FFCS - "this->" required by g++ 4.7
+ zallocateA_dist(n, nnz, this->dc(&a), &asub, &xa);
+
+ MPI_Bcast( a, nnz, SuperLU_MPI_DOUBLE_COMPLEX, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+ }
+
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+
+ cout << "Debut: Create_CompCol_Matrix_dist" <<endl;
+ // FFCS - "this->" required by g++ 4.7
+ this->Create_CompCol_Matrix_dist(&A, m, n, nnz, a, asub, xa, SLU_NC, R_SLU, SLU_GE);
+ cout << "Fin: Create_CompCol_Matrix_dist" <<endl;
+ /* creation of pseudo solution + second member */
+
+ if ( !(B = new Complex[m] ) ){
+ //if ( !(B = doublecomplexMalloc_dist(m )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ if(verbosity)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+
+// /* set the default options */
+// set_default_options_dist(&options);
+// DiagScale_t optionDiagScale;
+// if(!string_option.empty()) read_options_freefem(&string_option,&options,&optionDiagScale);
+
+ /* Initialize ScalePermstruct and LUstruct. */
+ ScalePermstructInit(m, n, &ScalePermstruct);
+ if(!(pperm_r==NULL) || !(pperm_c==NULL) ) ScalePermstruct.DiagScale=optionDiagScale;
+ if( !(pperm_r==NULL) )
+ for(int ii=0; ii<m; ii++) ScalePermstruct.perm_r[ii] = pperm_r[ii];
+ if( !(pperm_c==NULL) )
+ for(int ii=0; ii<n; ii++) ScalePermstruct.perm_c[ii]= pperm_c[ii];
+
+ if( ScalePermstruct.DiagScale != NOEQUIL ){
+ printf("FreeFem++ doesn't support change of the original matrix");
+ exit(1);
+ }
+ LUstructInit(m, n, &LUstruct);
+
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+
+ ldb = m;
+ nrhs=1;
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ if(verbosity)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+ /* INIT LU struct*/
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+ //B.ncol = 0; /* Indicate not to solve the system */
+
+ nrhs=0;
+ SuperLUmpiDISTDriver<R>::pgssvx_ABglobal(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, berr, &stat, &info);
+
+ if(verbosity)
+ printf("LU factorization: pdgssvx()/p returns info %d\n", info);
+
+ if ( verbosity) PStatPrint(&options,&stat,&grid);
+ PStatFree(&stat);
+
+ }
+ //##########################################################
+ //
+ // matrix distributed with matrix global given
+ //
+ //##########################################################
+ else if( matrixdist == distributedglobal) {
+ if(!iam){
+
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
+
+ /* create the matrix for superlu_dist */
+ n=AA.n;
+ m=AA.m;
+ nnz=AA.nbcoef;
+ a=AA.a;
+ asub=AA.cl;
+ xa=AA.lg;
+
+ xa[n] = nnz;
+ printf("\tDimension\t%dx%d\t # nonzeros %d\n", m, n, nnz);
+
+ /* Broadcast matrix A to the other PEs. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ MPI_Bcast( AA.a, nnz, SuperLU_MPI_DOUBLE_COMPLEX, 0, grid.comm );
+ MPI_Bcast( AA.cl, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( AA.lg, n+1, mpi_int_t, 0, grid.comm );
+
+
+ }
+ else
+ {
+
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
+ /* Receive matrix A from PE 0. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ /* Allocate storage for compressed column representation. */
+ // FFCS - "this->" required by g++ 4.7
+ zallocateA_dist(n, nnz, this->dc(&a), &asub, &xa);
+
+ MPI_Bcast( a, nnz, SuperLU_MPI_DOUBLE_COMPLEX, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+ }
+
+ /* Compute the number of rows to be distributed to local process */
+ m_loc = m / (grid.nprow * grid.npcol);
+ m_loc_fst = m_loc;
+ /* When m / procs is not an integer */
+ if ((m_loc * grid.nprow * grid.npcol) != m) {
+ /*m_loc = m_loc+1;
+ m_loc_fst = m_loc;*/
+ if (iam == (grid.nprow * grid.npcol - 1)) /* last proc. gets all*/
+ m_loc = m - m_loc * (grid.nprow * grid.npcol - 1);
+ }
+
+ fst_row = iam * m_loc_fst;
+
+ nnz_loc = xa[fst_row+m_loc]-xa[fst_row];
+ // FFCS - "this->" required by g++ 4.7
+ zallocateA_dist(m_loc, nnz_loc, this->dc(&aloc), &asubloc, &xaloc);
+
+ //xaloc = (int_t*) intMalloc_dist(m_loc+1);
+ for(int ii=0; ii < m_loc; ii++){
+ xaloc[ii] = xa[fst_row+ii]-xa[fst_row];
+ }
+
+ xaloc[m_loc]=nnz_loc;
+
+ fst_nnz = xa[fst_row];
+ //aloc = new R[nnz_loc];
+ //aloc = (Complex*) doubleMalloc_dist(nnz_loc);
+ //asubloc = (int_t*) intMalloc_dist(nnz_loc);
+
+ for(int ii=0; ii < nnz_loc; ii++){
+ aloc[ii] = a[fst_nnz+ii];
+ asubloc[ii] = asub[fst_nnz+ii];
+ }
+
+ if( iam ){
+ SUPERLU_FREE( a );
+ SUPERLU_FREE( asub );
+ SUPERLU_FREE( xa );
+ }
+
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+
+ if(verbosity) cout << "Debut: Create_CompRowCol_Matrix_dist" <<endl;
+ // FFCS - "this->" required by g++ 4.7
+ if(verbosity) this->Create_CompRowLoc_Matrix_dist(&A, m, n, nnz_loc, m_loc, fst_row, aloc, asubloc, xaloc, SLU_NR_loc, R_SLU, SLU_GE);
+
+ cout << "Fin: Create_CompRowCol_Matrix_dist" <<endl;
+ /* creation of pseudo solution + second member */
+
+
+ if ( !(B = new Complex[m_loc]) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ for(int ii=0; ii < m_loc; ii++){
+ B[ii] = 1.; //BB[fst_row+ii];
+ }
+
+ if(verbosity)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+ /* set the default options */
+ set_default_options_dist(&options);
+ DiagScale_t optionDiagScale;
+ if(!string_option.empty()) read_options_freefem(&string_option,&options,&optionDiagScale);
+
+ m=A.nrow;
+ n=A.ncol;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+ /* Initialize ScalePermstruct and LUstruct. */
+ ScalePermstructInit(m, n, &ScalePermstruct);
+ if(pperm_r || pperm_c ) ScalePermstruct.DiagScale=optionDiagScale;
+ if(pperm_r)
+ for(int ii=0; ii<m; ii++) ScalePermstruct.perm_r[ii] = pperm_r[fst_row+ii];
+ if(pperm_c)
+ for(int ii=0; ii<n; ii++) ScalePermstruct.perm_c[ii] = pperm_c[ii];
+
+ LUstructInit(m, n, &LUstruct);
+
+
+
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+
+ ldb = m_loc;
+ //ldx = m_loc;
+
+ nrhs=1;
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+
+ nrhs=0;
+ SuperLUmpiDISTDriver<R>::pgssvx(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, &SOLVEstruct, berr, &stat, &info);
+
+ if(verbosity)
+ printf("LU factorization: pdgssvx()/p returns info %d\n", info);
+
+ if ( verbosity) PStatPrint(&options,&stat,&grid);
+ PStatFree(&stat);
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+
+ delete [] B;
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ nrhs=1;
+ SUPERLU_FREE(berr);
+
+ if(iam==0){
+ finishtime = clock();
+ timeused= (finishtime-starttime)/(1000 );
+ printf("=====================================================\n");
+ cout << "SuperLU_DIST : time factorisation :: " << timeused << " ms" <<endl;
+ printf("=====================================================\n");
+ }
+
+ }
+ }
+
+ void Solver(const MatriceMorse<R> &AA,KN_<R> &x,const KN_<R> &b) const {
+ R* B;
+ SuperLUStat_t stat;
+ int iam;
+ int info=0, ldb=m, nrhs=1;
+ int i;
+ double* berr;
+ double ferr;
+ double rpg, rcond;
+
+ int_t m_loc,m_loc_fst,fst_row;
+
+ // time variables
+ long int starttime,finishtime;
+ long int timeused;
+
+ iam = grid.iam;
+ if( iam < nprow*npcol){
+
+ if(verbosity) starttime = clock();
+
+ if(n != m) exit(1);
+
+ ffassert ( &x[0] != &b[0]);
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+ nrhs= 1;
+
+
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+
+ /* cas matrix assembled */
+ if( matrixdist == assembled ){
+
+ if( !(B = new R[m*nrhs] ) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ for(int ii=0; ii<n; ii++){
+ B[ii]=b[ii];
+ }
+
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ ldb = m;
+ //nrhs= 1;
+ SuperLUmpiDISTDriver<R>::pgssvx_ABglobal (&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, berr, &stat, &info );
+
+ if(verbosity)
+ printf("Triangular solve: dgssvx() returns info %d\n", info);
+
+ if(verbosity) PStatPrint(&options, &stat, &grid);
+
+ for(int ii=0; ii<n; ii++){
+ x[ii] = B[ii];
+ }
+
+ if(verbosity) cout << " x min max " << x.min() << " " <<x.max() << endl;
+
+ }
+ else if( matrixdist == distributedglobal) {
+ R* xtemp;
+ iam = grid.iam;
+ /* Compute the number of rows to be distributed to local process */
+ m_loc = m / (grid.nprow * grid.npcol);
+ m_loc_fst = m_loc;
+ /* When m / procs is not an integer */
+ if ((m_loc * grid.nprow * grid.npcol) != m) {
+ /*m_loc = m_loc+1;
+ m_loc_fst = m_loc;*/
+ if (iam == (grid.nprow * grid.npcol - 1)) /* last proc. gets all*/
+ m_loc = m - m_loc * (grid.nprow * grid.npcol - 1);
+ }
+
+ fst_row = iam * m_loc_fst;
+
+ if ( !(B = new R[m_loc] ) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ //printf("initilisation B:");
+ for(int ii=0; ii<m_loc; ++ii){
+ B[ii] = b[ii+fst_row];
+ //printf(" B[%d]= %f ",ii,B[ii]);
+ }
+ //printf(" :: fin \n");
+ //fflush(stdout);
+
+
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ //options.Equil = YES;
+ //options.Trans = TRANS;
+
+
+ ldb = m;
+ SuperLUmpiDISTDriver<R>::pgssvx(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, &SOLVEstruct, berr, &stat, &info );
+
+ if(verbosity)
+ printf("Triangular solve: dgssvx() returns info %d\n", info);
+
+ if ( !(xtemp = new R[AA.n]) ){
+ printf("probleme d allocation de xtemp\n");
+ exit(1);
+ }
+
+
+ int disp[nprow*npcol];
+ MPI_Allgather(&fst_row, 1, MPI_INT, disp, 1, MPI_INT, grid.comm);
+
+ int recv[nprow*npcol];
+ MPI_Allgather(&m_loc, 1, MPI_INT, recv, 1, MPI_INT, grid.comm);
+
+ MPI_Allgatherv(B, m_loc, SuperLU_MPI_DOUBLE_COMPLEX, xtemp, recv, disp, SuperLU_MPI_DOUBLE_COMPLEX, grid.comm);
+
+ for(int ii= 0; ii< AA.n ; ii++)
+ x[ii] = xtemp[ii];
+
+ if(verbosity) cout << " x min max " << x.min() << " " <<x.max() << endl;
+
+ delete [] xtemp;
+
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+
+
+ delete [] B;
+ SUPERLU_FREE( berr );
+
+ PStatFree(&stat);
+
+ if(iam==0){
+ finishtime = clock();
+ timeused= (finishtime-starttime)/(1000 );
+ printf("=====================================================\n");
+ cout << " SuperLU_DIST : time solve :: " << timeused << " ms" <<endl;
+ printf("=====================================================\n");
+ }
+
+ }
+ }
+
+ ~ZSolveSuperLUmpi() {
+ int iam;
+ iam = grid.iam;
+ if(iam < nprow*npcol){
+ if(verbosity)
+ cout << "~SolveSuperLUmpi Complex:" << endl;
+
+ if( matrixdist == assembled) {
+ //if( A.Store) Destroy_CompCol_Matrix_dist(&A);
+ //if( L.Store && U.Store ) {
+ Destroy_LU(n, &grid, &LUstruct);
+ ScalePermstructFree(&ScalePermstruct);
+ LUstructFree(&LUstruct);
+ //}
+ if ( options.SolveInitialized ) {
+ zSolveFinalize(&options, &SOLVEstruct);
+ }
+ }
+ else if( matrixdist == distributedglobal) {
+ if( A.Store) Destroy_CompRowLoc_Matrix_dist(&A);
+
+ Destroy_LU(n, &grid, &LUstruct);
+ ScalePermstructFree(&ScalePermstruct);
+ LUstructFree(&LUstruct);
+
+ if ( options.SolveInitialized ) {
+ zSolveFinalize(&options, &SOLVEstruct);
+ }
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+ }
+ printf("superlu_gridexit(&grid), %d\n",iam);
+ superlu_gridexit(&grid);
+
+ }
+ void addMatMul(const KN_<R> & x, KN_<R> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<R> &) (*this) * x;
+ }
+
+};
+
+
+
+
+MatriceMorse<Complex>::VirtualSolver *
+BuildSolverSuperLUmpi(DCL_ARG_SPARSE_SOLVER(Complex,A))
+{
+ if(verbosity>9)
+ cout << " BuildSolverSuperLUmpi<double>" << endl;
+ return new ZSolveSuperLUmpi<Complex>(*A,ds.strategy,ds.tgv,ds.epsilon,ds.tol_pivot,ds.tol_pivot_sym,
+ ds.data_filename, ds.sparams, ds.perm_r, ds.perm_c, ds.commworld);
+}
+
+
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ };*/
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// the 2 default sparse solver double and complex
+//DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
+DefSparseSolver<Complex>::SparseMatSolver SparseMatSolver_C;
+// the default probleme solver
+TypeSolveMat::TSolveMat TypeSolveMatdefaultvalue=TypeSolveMat::defaultvalue;
+
+bool SetDefault()
+{
+ if(verbosity)
+ cout << " SetDefault sparse to default" << endl;
+ //DefSparseSolver<double>::solver =SparseMatSolver_R;
+ DefSparseSolver<Complex>::solver =SparseMatSolver_C;
+ TypeSolveMat::defaultvalue =TypeSolveMat::SparseSolver;
+
+ return false;
+}
+
+bool SetSuperLUmpi()
+{
+ if(verbosity)
+ cout << " SetDefault sparse solver to SuperLUmpi double" << endl;
+ //DefSparseSolver<double>::solver =BuildSolverSuperLUmpi;
+ DefSparseSolver<Complex>::solver =BuildSolverSuperLUmpi;
+ TypeSolveMat::defaultvalue = TypeSolveMatdefaultvalue;
+
+ return false;
+}
+
+
+
++<<<<<<< HEAD
+
+static void Load_Init()
++=======
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ //SparseMatSolver_R= DefSparseSolver<double>::solver;
+ SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+
+ if(verbosity>1)
+ cout << "\n Add: Complex SuperLU_DIST, defaultsolver defaultsolverSuperLUdist" << endl;
+ TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+ //DefSparseSolver<double>::solver =BuildSolverSuperLUmpi;
+ DefSparseSolver<Complex>::solver =BuildSolverSuperLUmpi;
+ if(! Global.Find("defaultsolver").NotNull() )
+ Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
+ Global.Add("complexdefaulttoSuperLUdist","(",new OneOperator0<bool>(SetSuperLUmpi));
+}
+
++<<<<<<< HEAD
+
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/complex_pastix_FreeFem.cpp
index adc996b,537509c..c4c5784
--- a/examples++-mpi/complex_pastix_FreeFem.cpp
+++ b/examples++-mpi/complex_pastix_FreeFem.cpp
@@@ -219,7 -219,7 +219,7 @@@ void read_datafile_pastixff(const strin
}
// ATTENTION :: pastix_float_t
--// peut �tre soit un complex ou un reel cela depend de la maniere dont on a compiler pastix
++// peut �tre soit un complex ou un reel cela depend de la maniere dont on a compiler pastix
// CAS COMPLEX SEULEMENT
@@@ -333,7 -333,7 +333,7 @@@ public
Ncol = AA.m;
Nrow = AA.n;
nnz = AA.nbcoef;
-- // Avant : on ecrit la transpos�e
++ // Avant : on ecrit la transpos�e
// AA.cl : indices des colonnes
// AA.lg : pointeurs des lignes
diff --cc examples++-mpi/complex_pastix_FreeFem.cpp.orig
index adc996b,537509c..89c0803
--- a/examples++-mpi/complex_pastix_FreeFem.cpp.orig
+++ b/examples++-mpi/complex_pastix_FreeFem.cpp.orig
@@@ -635,9 -635,10 +635,16 @@@ BuildSolverpastix_complex_mpi(DCL_ARG_S
ds.lparams, ds.dparams, ds.perm_r, ds.perm_c,ds.commworld);
}
++<<<<<<< HEAD
+ /* class Init { public:
+ Init();
+ };*/
++=======
+
+ class Init { public:
+ Init();
+ };
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
// the 2 default sparse solver double and complex
//DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
@@@ -667,7 -668,8 +674,12 @@@ bool Setpastixmpi(
++<<<<<<< HEAD
+static void Load_Init()
++=======
+ LOADINIT(Init);
+ Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
{
//SparseMatSolver_R= DefSparseSolver<d>::solver;
@@@ -682,5 -684,3 +694,8 @@@
Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
Global.Add("complexdefaulttopastix","(",new OneOperator0<bool>(Setpastixmpi));
}
++<<<<<<< HEAD
+
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/dSuperLU_DIST.cpp.orig
index 54f5754,0000000..6acfe5f
mode 100644,000000..100644
--- a/examples++-mpi/dSuperLU_DIST.cpp.orig
+++ b/examples++-mpi/dSuperLU_DIST.cpp.orig
@@@ -1,740 -1,0 +1,758 @@@
+//ff-c++-LIBRARY-dep: metis superlu_dist parmetis blas mpi fc
+//ff-c++-cpp-dep:
+/*
+ Interface freefem++ et SuperLU_DIST_2.3
+
+ /bin/sh ff-mpic++ dSuperLU_DIST.cpp -I/Users/morice/librairie/SuperLU_DIST_2.3/SRC/ -L/Users/morice/librairie/openmpi/lib/ -lmpi -lopal -lorte -L/Users/morice/librairie/PATCHVECLIB/ -lwrapperdotblas -framework veclib -L/Users/morice/librairie/ParMetis-3.1/ -lparmetis -lmetis -L/Users/morice/librairie/SuperLU_DIST_2.3/lib/ -lsuperlu_dist_2.3
+
+*/
+#include <mpi.h>
+#include <iostream>
+using namespace std;
+
+#include "rgraph.hpp"
+#include "error.hpp"
+#include "AFunction.hpp"
+
+//#include "lex.hpp"
+#include "MatriceCreuse_tpl.hpp"
+
+#include "superlu_ddefs.h"
+#include "ffsuperludistoption-1.hpp"
+
+template <class R> struct SuperLUmpiDISTDriver
+{
+
+};
+
+template <> struct SuperLUmpiDISTDriver<double>
+{
+ /* Driver routines */
+ static Dtype_t R_SLU_T() { return SLU_D;}
+ static void
+
+ pgssvx(superlu_options_t *p1, SuperMatrix *p2, ScalePermstruct_t *p3,
+ double *p4, int p5, int p6, gridinfo_t *p7,
+ LUstruct_t *p8, SOLVEstruct_t *p9, double *p10,
+ SuperLUStat_t *p11, int *p12)
+ { pdgssvx( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12 ); }
+
+
+ static void
+ pgssvx_ABglobal(superlu_options_t *p1, SuperMatrix *p2,
+ ScalePermstruct_t *p3,
+ double *p4, int p5, int p6, gridinfo_t *p7,
+ LUstruct_t *p8, double *p9,
+ SuperLUStat_t *p10, int *p11)
+ { pdgssvx_ABglobal( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11); }
+
+ static void
+ Print_CompRowLoc_Matrix_dist(SuperMatrix *p1)
+ {
+ dPrint_CompRowLoc_Matrix_dist(p1);
+ }
+
+ static void
+ Create_CompCol_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, int_t p4,
+ double *p5, int_t *p6, int_t *p7,
+ Stype_t p8, Dtype_t p9, Mtype_t p10)
+ {
+ dCreate_CompCol_Matrix_dist(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
+ }
+
+ static void
+ Create_CompRowLoc_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3,
+ int_t p4, int_t p5, int_t p6,
+ double *p7, int_t *p8, int_t *p9,
+ Stype_t p10, Dtype_t p11, Mtype_t p12)
+ {
+ dCreate_CompRowLoc_Matrix_dist( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12);
+ }
+
+ static void
+ CompRow_to_CompCol_dist(int_t p1, int_t p2, int_t p3,
+ double *p4, int_t *p5, int_t *p6,
+ double **p7, int_t **p8, int_t **p9)
+ {
+ dCompRow_to_CompCol_dist( p1,p2,p3,p4,p5,p6,p7,p8,p9 );
+ }
+
+ static void
+ Create_Dense_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, double *p4,
+ int_t p5, Stype_t p6, Dtype_t p7,
+ Mtype_t p8)
+ {
+ dCreate_Dense_Matrix_dist( p1,p2,p3,p4,p5,p6,p7,p8 );
+ }
+
+ static void
+ Create_SuperNode_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, int_t p4,
+ double *p5, int_t *p6,
+ int_t *p7, int_t *p8,
+ int_t *p9, int_t *p10,
+ Stype_t p11, Dtype_t p12, Mtype_t p13)
+ {
+ dCreate_SuperNode_Matrix_dist(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10, p11,p12,p13);
+ }
+
+};
+
+template<class R>
+class SolveSuperLUmpi : public MatriceMorse<R>::VirtualSolver, public SuperLUmpiDISTDriver<R> {
+
+ double eps;
+ mutable double epsr;
+ double tgv;
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+
+
+ //mutable char equed[1];
+ //yes_no_t equil;
+ mutable SuperMatrix A;
+ NCformat *Astore;
+ //NCformat *Ustore;
+ //SCformat *Lstore;
+
+ mutable superlu_options_t options;
+ mutable mem_usage_t mem_usage;
+ mutable ScalePermstruct_t ScalePermstruct;
+ mutable LUstruct_t LUstruct;
+ mutable SOLVEstruct_t SOLVEstruct;
+ mutable gridinfo_t grid;
+
+ string string_option;
+ string data_option;
+ R *a;
+ int *asub, *xa;
+ int_t m, n, nnz;
+ // rajout pour //
+ int_t nprow,npcol; /* process rows and process columns*/
+
+
+ int matrixdist; // type of distributed matrix
+
+ static const int assembled =0;
+ static const int distributedglobal =1;
+ static const int distributed =2;
+
+public:
+ SolveSuperLUmpi(const MatriceMorse<R> &AA,string datafile,
+ string param_char, KN<long> &pperm_r, KN<long> &pperm_c, MPI_Comm * mpicommw) :
+ string_option(param_char),data_option(datafile)
+ {
+
+ R* B;
+ //R* X;
+ SuperLUStat_t stat;
+ int info, ldb, nrhs=0;
+ int i;
+ double* berr;
+
+ int iam;
+ // Add for distributed matrix
+ int_t m_loc, m_loc_fst, fst_row, nnz_loc, fst_nnz;
+ R *aloc;
+ int *asubloc, *xaloc;
+ // End Add for distributed matrix
+ A.Store=0;
+
+ int status;
+
+ /* Defaults */
+ nrhs = 0;
+
+ /* lecture de nprow and npcol */
+ // Cas max deux procs
+ nprow = 1;
+ npcol = 1;
+ matrixdist=0;
+ /* set the default options */
+ set_default_options_dist(&options);
+ DiagScale_t optionDiagScale;
+
+ //if(verbosity > 10) print_options_dist(&options);
+
+ if(!string_option.empty()) read_nprow_npcol_freefem( &string_option, &nprow, &npcol, &matrixdist);
+ if(!string_option.empty()) read_options_freefem(&string_option,&options,&optionDiagScale);
+
+ if(!data_option.empty()) read_options_superlu_datafile(&data_option,&options,&nprow, &npcol, &matrixdist,&optionDiagScale);
+
+ //if(verbosity > 10) print_options_dist(&options);
+
+ /* ------------------------------------------------------------
+ INITIALIZE THE SUPERLU PROCESS GRID.
+ ------------------------------------------------------------*/
+ cout << "superlu_gridinit" <<endl;
+ if(mpicommw)
+ superlu_gridinit(*mpicommw, nprow, npcol, &grid);
+ else
+ // FFCS - MPI::COMM_WORLD is not accepted on mingw64+MSMPI?
+ superlu_gridinit(MPI_COMM_WORLD, nprow, npcol, &grid);
+
+ /* Bail out if I do not belong in the grid. */
+ iam = grid.iam;
+ if ( iam >= nprow * npcol ){
+ //superlu_gridexit(&grid);
+ printf("this process is not used in superlu %d \n",iam);
+ }
+ else
+ {
+ // matrix to procs and vectors
+ if( matrixdist == assembled ){
+
+ if(!iam){
+ cout << "iam=" << iam << endl;
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
+
+ /* create the matrix for superlu_dist */
+ n=AA.n;
+ m=AA.m;
+ nnz=AA.nbcoef;
+
+ assert( AA.lg[n] == nnz );
+ printf("\tDimension\t%dx%d\t # nonzeros %d\n", m, n, nnz);
+
+ /* transform Row to Col */
+ // cela coute cher comme fonction //
+ //dallocateA_dist(n, nnz, &a, &asub, &xa);
+ //dCompRow_to_CompCol_dist(m,n,nnz,arow,asubrow,xarow,&a,&asub,&xa);
+
+ dCompRow_to_CompCol_dist(m,n,nnz,AA.a,AA.cl,AA.lg,&a,&asub,&xa);
+
+ /* Broadcast matrix A to the other PEs. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+ int infobcast=MPI_Bcast( a, nnz, MPI_DOUBLE, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+
+ }
+ else{
+ /*
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
++<<<<<<< HEAD
+ Receive matrix A from PE 0. */
++=======
++ /* Receive matrix A from PE 0. */
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ /* Allocate storage for compressed column representation. */
+ dallocateA_dist(n, nnz, &a, &asub, &xa);
+
+ int infobcast=MPI_Bcast( a, nnz, MPI_DOUBLE, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+ }
+
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+
+ cout << "Debut: Create_CompCol_Matrix_dist" <<endl;
+ // FFCS - "this->" required by g++ 4.7
+ this->Create_CompCol_Matrix_dist(&A, m, n, nnz, a, asub, xa, SLU_NC, R_SLU, SLU_GE);
+ cout << "Fin: Create_CompCol_Matrix_dist" <<endl;
+ /* creation of pseudo solution + second member */
+
+ if ( !(B = doubleMalloc_dist(m )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ if(verbosity)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+
+// /* set the default options */
+// set_default_options_dist(&options);
+// DiagScale_t optionDiagScale;
+// if(!string_option.empty()) read_options_freefem(&string_option,&options,&optionDiagScale);
+
+ /* Initialize ScalePermstruct and LUstruct. */
+ ScalePermstructInit(m, n, &ScalePermstruct);
+ if(pperm_r || pperm_c ) ScalePermstruct.DiagScale=optionDiagScale;
+ if(pperm_r)
+ for(int ii=0; ii<m; ii++) ScalePermstruct.perm_r[ii] = pperm_r[ii];
+ if(pperm_c)
+ for(int ii=0; ii<n; ii++) ScalePermstruct.perm_c[ii]= pperm_c[ii];
+
+ if( ScalePermstruct.DiagScale != NOEQUIL ){
+ printf("FreeFem++ doesn't support change of the original matrix");
+ exit(1);
+ }
+ LUstructInit(m, n, &LUstruct);
+
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+
+ ldb = m;
+ nrhs=1;
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ if(verbosity)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+ /* INIT LU struct*/
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+ //B.ncol = 0; /* Indicate not to solve the system */
+
+ nrhs=0;
+ SuperLUmpiDISTDriver<R>::pgssvx_ABglobal(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, berr, &stat, &info);
+
+ if(verbosity)
+ printf("LU factorization: pdgssvx()/p returns info %d\n", info);
+
+ if ( verbosity) PStatPrint(&options,&stat,&grid);
+ PStatFree(&stat);
+
+ }
+ //##########################################################
+ //
+ // matrix distributed with matrix global given
+ //
+ //##########################################################
+ else if( matrixdist == distributedglobal) {
+ if(!iam){
+
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
+
+ /* create the matrix for superlu_dist */
+ n=AA.n;
+ m=AA.m;
+ nnz=AA.nbcoef;
+ a=AA.a;
+ asub=AA.cl;
+ xa=AA.lg;
+
+ xa[n] = nnz;
+ printf("\tDimension\t%dx%d\t # nonzeros %d\n", m, n, nnz);
+
+ /* Broadcast matrix A to the other PEs. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ MPI_Bcast( AA.a, nnz, MPI_DOUBLE, 0, grid.comm );
+ MPI_Bcast( AA.cl, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( AA.lg, n+1, mpi_int_t, 0, grid.comm );
+
+
+ }
+ else{
+
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
+ /* Receive matrix A from PE 0. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ /* Allocate storage for compressed column representation. */
+ dallocateA_dist(n, nnz, &a, &asub, &xa);
+
+ MPI_Bcast( a, nnz, MPI_DOUBLE, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+ }
+
+ /* Compute the number of rows to be distributed to local process */
+ m_loc = m / (grid.nprow * grid.npcol);
+ m_loc_fst = m_loc;
+ /* When m / procs is not an integer */
+ if ((m_loc * grid.nprow * grid.npcol) != m) {
+ /*m_loc = m_loc+1;
+ m_loc_fst = m_loc;*/
+ if (iam == (grid.nprow * grid.npcol - 1)) /* last proc. gets all*/
+ m_loc = m - m_loc * (grid.nprow * grid.npcol - 1);
+ }
+
+ fst_row = iam * m_loc_fst;
+
+ nnz_loc = xa[fst_row+m_loc]-xa[fst_row];
+
+ xaloc = (int_t*) intMalloc_dist(m_loc+1);
+ for(int ii=0; ii < m_loc; ii++){
+ xaloc[ii] = xa[fst_row+ii]-xa[fst_row];
+ }
+
+ xaloc[m_loc]=nnz_loc;
+
+ fst_nnz = xa[fst_row];
+ aloc = (double*) doubleMalloc_dist(nnz_loc);
+ asubloc = (int_t*) intMalloc_dist(nnz_loc);
+
+ for(int ii=0; ii < nnz_loc; ii++){
+ aloc[ii] = a[fst_nnz+ii];
+ asubloc[ii] = asub[fst_nnz+ii];
+ }
+
+
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+
+ cout << "Debut: Create_CompRowCol_Matrix_dist" <<endl;
+ dCreate_CompRowLoc_Matrix_dist(&A, m, n, nnz_loc, m_loc, fst_row, aloc, asubloc, xaloc, SLU_NR_loc, R_SLU, SLU_GE);
+
+ cout << "Fin: Create_CompRowCol_Matrix_dist" <<endl;
+ /* creation of pseudo solution + second member */
+
+
+ if ( !(B = doubleMalloc_dist(m_loc)) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ for(int ii=0; ii < m_loc; ii++){
+ B[ii] = 1.; //BB[fst_row+ii];
+ }
+
+ if(verbosity)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+ /* set the default options */
+ set_default_options_dist(&options);
+ DiagScale_t optionDiagScale;
+ if(!string_option.empty()) read_options_freefem(&string_option,&options,&optionDiagScale);
+
+ m=A.nrow;
+ n=A.ncol;
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+ /* Initialize ScalePermstruct and LUstruct. */
+ ScalePermstructInit(m, n, &ScalePermstruct);
+ if(pperm_r || pperm_c ) ScalePermstruct.DiagScale=optionDiagScale;
+ if(pperm_r)
+ for(int ii=0; ii<m; ii++) ScalePermstruct.perm_r[ii] = pperm_r[fst_row+ii];
+ if(pperm_c)
+ for(int ii=0; ii<n; ii++) ScalePermstruct.perm_c[ii] = pperm_c[ii];
+
+ LUstructInit(m, n, &LUstruct);
+
+
+
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+
+ ldb = m_loc;
+ //ldx = m_loc;
+
+ nrhs=1;
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+
+ nrhs=0;
+ SuperLUmpiDISTDriver<R>::pgssvx(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, &SOLVEstruct, berr, &stat, &info);
+
+ if(verbosity)
+ printf("LU factorization: pdgssvx()/p returns info %d\n", info);
+
+ if ( verbosity) PStatPrint(&options,&stat,&grid);
+ PStatFree(&stat);
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+
+ SUPERLU_FREE( B );
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ nrhs=1;
+ SUPERLU_FREE(berr);
+ }
+ }
+
+ void Solver(const MatriceMorse<R> &AA,KN_<R> &x,const KN_<R> &b) const {
+ R* B;
+ SuperLUStat_t stat;
+ int iam;
+ int info=0, ldb=m, nrhs=1;
+ int i;
+ double* berr;
+ double ferr;
+ double rpg, rcond;
+
+ int_t m_loc,m_loc_fst,fst_row;
+
+ if(n != m) exit(1);
+
+ ffassert ( &x[0] != &b[0]);
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+ nrhs= 1;
+
+
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+
+ iam = grid.iam;
+ if( iam < nprow*npcol){
+ /* cas matrix assembled */
+ if( matrixdist == assembled ){
+
+ if( !(B = doubleMalloc_dist(m*nrhs)) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ for(int ii=0; ii<n; ii++){
+ B[ii]=b[ii];
+ }
+
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ ldb = m;
+ //nrhs= 1;
+ SuperLUmpiDISTDriver<R>::pgssvx_ABglobal (&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, berr, &stat, &info );
+
+ if(verbosity)
+ printf("Triangular solve: dgssvx() returns info %d\n", info);
+
+ if(verbosity) PStatPrint(&options, &stat, &grid);
+
+ for(int ii=0; ii<n; ii++){
+ x[ii] = B[ii];
+ }
+
+ if(verbosity) cout << " x min max " << x.min() << " " <<x.max() << endl;
+
+ }
+ else if( matrixdist == distributedglobal) {
+ double* xtemp;
+ iam = grid.iam;
+ /* Compute the number of rows to be distributed to local process */
+ m_loc = m / (grid.nprow * grid.npcol);
+ m_loc_fst = m_loc;
+ /* When m / procs is not an integer */
+ if ((m_loc * grid.nprow * grid.npcol) != m) {
+ /*m_loc = m_loc+1;
+ m_loc_fst = m_loc;*/
+ if (iam == (grid.nprow * grid.npcol - 1)) /* last proc. gets all*/
+ m_loc = m - m_loc * (grid.nprow * grid.npcol - 1);
+ }
+
+ fst_row = iam * m_loc_fst;
+
+ if ( !(B = doubleMalloc_dist(m_loc )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ //printf("initilisation B:");
+ for(int ii=0; ii<m_loc; ++ii){
+ B[ii] = b[ii+fst_row];
+ //printf(" B[%d]= %f ",ii,B[ii]);
+ }
+ //printf(" :: fin \n");
+ //fflush(stdout);
+
+
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ //options.Equil = YES;
+ //options.Trans = TRANS;
+
+
+ ldb = m;
+ SuperLUmpiDISTDriver<R>::pgssvx(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, &SOLVEstruct, berr, &stat, &info );
+
+ if(verbosity)
+ printf("Triangular solve: dgssvx() returns info %d\n", info);
+
+ if ( !(xtemp = doubleMalloc_dist(AA.n)) ){
+ printf("probleme d allocation de xtemp\n");
+ exit(1);
+ }
+
+
+ int disp[nprow*npcol];
+ MPI_Allgather(&fst_row, 1, MPI_INT, disp, 1, MPI_INT, grid.comm);
+
+ int recv[nprow*npcol];
+ MPI_Allgather(&m_loc, 1, MPI_INT, recv, 1, MPI_INT, grid.comm);
+
+ MPI_Allgatherv(B, m_loc, MPI_DOUBLE, xtemp, recv, disp, MPI_DOUBLE, grid.comm);
+
+ for(int ii= 0; ii< AA.n ; ii++)
+ x[ii] = xtemp[ii];
+
+ if(verbosity) cout << " x min max " << x.min() << " " <<x.max() << endl;
+
+ SUPERLU_FREE( xtemp );
+
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+
+
+ SUPERLU_FREE( B );
+ SUPERLU_FREE( berr );
+
+ PStatFree(&stat);
+ }
+ }
+
+ ~SolveSuperLUmpi() {
+ int iam;
+ iam = grid.iam;
+ if(iam < nprow*npcol){
+ if(verbosity)
+ cout << "~SolveSuperLUmpi double:" << endl;
+
+ if( matrixdist == assembled) {
+ //if( A.Store) Destroy_CompCol_Matrix_dist(&A);
+ //if( L.Store && U.Store ) {
+ Destroy_LU(n, &grid, &LUstruct);
+ ScalePermstructFree(&ScalePermstruct);
+ LUstructFree(&LUstruct);
+ //}
+ if ( options.SolveInitialized ) {
+ dSolveFinalize(&options, &SOLVEstruct);
+ }
+ }
+ else if( matrixdist == distributedglobal) {
+ if( A.Store) Destroy_CompRowLoc_Matrix_dist(&A);
+
+ Destroy_LU(n, &grid, &LUstruct);
+ ScalePermstructFree(&ScalePermstruct);
+ LUstructFree(&LUstruct);
+
+ if ( options.SolveInitialized ) {
+ dSolveFinalize(&options, &SOLVEstruct);
+ }
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+ }
+ printf("superlu_gridexit(&grid), %d\n",iam);
+ superlu_gridexit(&grid);
+ }
+ void addMatMul(const KN_<R> & x, KN_<R> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<R> &) (*this) * x;
+ }
+
+};
+
+
+
+
+MatriceMorse<double>::VirtualSolver *
+BuildSolverSuperLUmpi(DCL_ARG_SPARSE_SOLVER(double,A))
+{
+ if(verbosity>9)
+ cout << " BuildSolverSuperLUmpi<double>" << endl;
+ return new SolveSuperLUmpi<double>(*A,ds.data_filename, ds.sparams, ds.perm_r, ds.perm_c,static_cast<MPI_Comm*>(ds.commworld));
+}
+
+
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ };*/
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// the 2 default sparse solver double and complex
+DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
+//DefSparseSolver<Complex>::SparseMatSolver SparseMatSolver_C;
+// the default probleme solver
+TypeSolveMat::TSolveMat TypeSolveMatdefaultvalue=TypeSolveMat::defaultvalue;
+
+bool SetDefault()
+{
+ if(verbosity)
+ cout << " SetDefault sparse to default" << endl;
+ DefSparseSolver<double>::solver =SparseMatSolver_R;
+ //DefSparseSolver<Complex>::solver =SparseMatSolver_C;
+ TypeSolveMat::defaultvalue =TypeSolveMat::SparseSolver;
+
+ return false;
+}
+
+bool SetSuperLUmpi()
+{
+ if(verbosity)
+ cout << " SetDefault sparse solver to SuperLUmpi double" << endl;
+ DefSparseSolver<double>::solver =BuildSolverSuperLUmpi;
+ //DefSparseSolver<Complex>::solver =BuildSolverSuperLUmpi;
+ TypeSolveMat::defaultvalue = TypeSolveMatdefaultvalue;
+
+ return false;
+}
+
+
+
++<<<<<<< HEAD
+
+static void Load_Init()
++=======
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ SparseMatSolver_R= DefSparseSolver<double>::solver;
+ //SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+
+ if(verbosity>1)
+ cout << "\n Add: SuperLUmpi, defaultsolver defaultsolverSuperLUmpi" << endl;
+ TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+ DefSparseSolver<double>::solver =BuildSolverSuperLUmpi;
+ //DefSparseSolver<Complex>::solver =BuildSolverSuperLUmpi;
+ if(! Global.Find("defaultsolver").NotNull() )
+ Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
+ Global.Add("defaulttoSuperLUmpi","(",new OneOperator0<bool>(SetSuperLUmpi));
+}
+
++<<<<<<< HEAD
+
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/hips_FreeFem.cpp.orig
index 4e02187,0000000..d4cefe8
mode 100644,000000..100644
--- a/examples++-mpi/hips_FreeFem.cpp.orig
+++ b/examples++-mpi/hips_FreeFem.cpp.orig
@@@ -1,767 -1,0 +1,781 @@@
+// ORIG-DATE: 04/2009
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE : LGPL
+// ORG : INRIA FUTUR
+// AUTHOR : Guy Atenekeng
+// Modif by F. Hecht 2011
+// E-MAIL : Guy_Antoine_Atenekeng_Kahou at lri.fr
+//
+//ff-c++-LIBRARY-dep: hips metis blas mpi
+//ff-c++-cpp-dep:
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+#include <mpi.h>
+#include <iostream>
+using namespace std;
+
+#include "rgraph.hpp"
+#include "error.hpp"
+#include "AFunction.hpp"
+#include "MatriceCreuse_tpl.hpp"
+
+#ifndef MPI_SUCCESS
+#define MPI_SUCCESS
+#endif
+
+extern "C" {
+#include "hips.h"
+#include "metis.h"
+}
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define BUFLEN 200
+#define MCW MPI_COMM_WORLD
+
+
+int roscal(int n, int job,int nrm, double *AAv, int *p, int *pr, double * scaletmpr , int *ierr)
+{
+ /*---------------------------------------------------------------------
+ |
+ | This routine scales each row of mata so that the norm is 1.
+ |
+ |----------------------------------------------------------------------
+ | on entry:
+ | mata = the matrix (in SparRow form)
+ | nrm = type of norm
+ | 0 (\infty), 1 or 2
+ |
+ | on return
+ | diag = diag[j] = 1/norm(row[j])
+ |
+ | 0 --> normal return
+ | j --> row j is a zero row
+ |--------------------------------------------------------------------*/
+ /* local variables */
+ int i, k;
+ double scal;
+
+ for (i=0; i<n; i++) {
+ scal = 0.0;
+ // kr = &(AAv[pr[i]]);
+ if (nrm == 0) {
+ for (k=pr[i]; k<pr[i+1]; k++)
+ if (fabs(AAv[k]) > scal) scal = fabs(AAv[k]);
+ }
+ else if (nrm == 1) {
+ for (k=pr[i]; k<pr[i+1]; k++)
+ scal += fabs(AAv[k]);
+ }
+ else { /* nrm = 2 */
+ for (k=pr[i]; k<(pr[i+1]); k++)
+ scal += AAv[k]*AAv[k];
+ }
+ if (nrm == 2) scal = sqrt(scal);
+ if (scal == 0.0) {
+ *ierr=i;
+ return i+1;
+ }
+ else
+ scal = 1.0 / scal;
+ scaletmpr[i] = scal;
+ for (k=pr[i]; k<(pr[i+1]); k++)
+ AAv[k] = AAv[k] * scal;
+
+ }
+ *ierr=0;
+ return 0;
+}
+/*---------------end of roscalC-----------------------------------------
+ ----------------------------------------------------------------------*/
+int coscal(int n, int job,int nrm, double *AAv, int *p, int *pr, double * scaletmpc , int * ierr)
+{
+ /*---------------------------------------------------------------------
+ |
+ | This routine scales each column of mata so that the norm is 1.
+ |
+ |----------------------------------------------------------------------
+ | on entry:
+ | mata = the matrix (in SparRow form)
+ | nrm = type of norm
+ | 0 (\infty), 1 or 2
+ |
+ | on return
+ | diag = diag[j] = 1/norm(row[j])
+ |
+ | 0 --> normal return
+ | j --> column j is a zero column
+ |--------------------------------------------------------------------*/
+ /* local variables */
+ int i, j, k;
+ double *kr;
+ int *ki;
+ for (i=0; i<n; i++)
+ scaletmpc[i] = 0.0;
+ /*---------------------------------------
+ | compute the norm of each column
+ |--------------------------------------*/
+ for (i=0; i<n; i++) {
+ kr = &(AAv[pr[i]]);
+ ki = &(pr[i]);
+ if (nrm == 0) {
+ for (k=pr[i]; k<pr[i+1]; k++) {
+ j = pr[i];
+ if (fabs(AAv[k]) > scaletmpc[p[k]]) scaletmpc[p[k]] = fabs(AAv[k]);
+ }
+ }
+ else if (nrm == 1) {
+ for (k=pr[i]; k<pr[i+1]; k++)
+ scaletmpc[p[k]] += fabs(AAv[k]);
+ }
+ else {
+ for (k=pr[i]; k<pr[i+1]; k++)
+ scaletmpc[p[k]] += fabs(AAv[k])*fabs(AAv[k]);
+ }
+ }
+ if (nrm == 2) {
+ for (i=0; i<n; i++)
+ scaletmpc[i] = sqrt(scaletmpc[i]);
+ }
+ /*---------------------------------------
+ | invert
+ |--------------------------------------*/
+ for (i=0; i<n; i++) {
+ if (scaletmpc[i] == 0.0)
+ {
+ *ierr=i+1;
+ return i+1;
+ }
+ else
+ scaletmpc[i] = 1.0 / scaletmpc[i];
+ }
+ /*---------------------------------------
+ | C = A * D
+ |--------------------------------------*/
+ for (i=0; i<n; i++) {
+
+ for (k=pr[i]; k<pr[i+1]; k++)
+ AAv[k]=AAv[k]*scaletmpc[p[k]];
+
+ }
+ *ierr=0;
+ return 0;
+}
+/*---------------end of coscalC-----------------------------------------
+ ----------------------------------------------------------------------*/
+
+
+
+
+
+
+void parm_param(string datafile,KN<long> param_int,KN<double> param_double)
+{
+ char buf[BUFLEN];
+ int num,in_val;
+ double val;
+ FILE *fp;
+ char * filename=new char[datafile.length()+1];
+ strcpy(filename,datafile.c_str());
+ int i;
+ for(i=0;i<16;i++) param_int[i]=-1; for(i=0;i<9;i++) param_double[i]=-1.0;
+ /* read parameters for preconditioner and iteration from file 'filename' */
+ /* ---- start modification by MS */
+ if( (fp = fopen(filename, "r")) == NULL ){
+ fprintf(stderr, "Cannot open file inputs\n");
+ exit(1);
+ }
+ num = 0;
+
+ while(fgets(buf, BUFLEN, fp) != NULL) {
+ if(num<=15) {sscanf(buf, "%d", &in_val); param_int[num]=in_val;}
+ else
+ {sscanf(buf, "%lf", &val); param_double[num]=val;}
+ num++;
+ }
+ fclose(fp);
+}
+
+
+
+
+class HipsSolver : public MatriceMorse<double>::VirtualSolver {
+ double eps;
+ mutable double epsr;
+ double tgv;
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+ string data_option;
+ mutable INTS master;//
+ MPI_Comm comm;
+ mutable INTS id, i, j;
+ mutable INTS *unknownlist;
+ mutable double *x;
+ mutable INTS ln;
+ mutable INTS ierr;
+ mutable INTS n,nnz,nnzl;
+ mutable double * a;
+ mutable INTS *ia, *ja;
+ mutable int *pp;
+ int loc_size,pbegin, pend;
+ INTS domsize, nproc,proc_id;
+ mutable int sym_pattern, sym_matrix;
+ KN<long> param_int;
+ KN<double> param_double;
+ mutable double *scaletmpr, *scaletmpc;
+
+ mutable int *mapptr,*maptmp,*iwork,*riord,*iwork1,scale;
+ mutable int *pr, *p;
+ mutable double * AAv;
+
+
+private:
+ static const int MaxIds=100;
+ static int Ids[MaxIds];
+ static int GetId() {
+ static bool Initialized=false;
+ if(!Initialized)
+ {
+ Initialized=true;
+ if(verbosity>2)
+ cout << " Hips HIPS_Initialize " << MaxIds <<endl;
+ INTS ierr = HIPS_Initialize(MaxIds);
+ HIPS_ExitOnError(ierr);
+ for(int i=0;i<MaxIds;++i)
+ {
+ Ids[i]=-1; // ununsed
+ }
+ }
+ INTS id =-1;
+ for(int i=0;i<MaxIds;++i)
+ if( Ids[i] <0)
+ {
+ Ids[i]=i;
+ if(verbosity>8) cout << " find HipsSoler : id = " << i << "/" << MaxIds << endl;
+ return i;
+ }
+ cerr<< " All id of Hips are busy " << MaxIds << " try to store less matrix or change MaxIds (FH.) in " << endl;
+ ffassert(0);
+ return -1;
+ }
+public:
+ static void Def_iopt(long * param_intd)
+ {
+ param_intd[0]= HIPS_ITERATIVE ; // HIPS_STRA
+ param_intd[1]= 0 ; // HIPS_KRYLOV_METHOD
+ param_intd[2]= 1000 ; // HIPS_ITMAX
+ param_intd[3]= 40 ; // HIPS_KRYLOV_RESTART
+ param_intd[4]= 1 ; // HIPS_SYMMETRIC
+ param_intd[5]= 1 ; // HIPS_GRAPH_SYM
+ param_intd[6]= 0 ; // HIPS_PARTITION_TYPE
+ param_intd[7]= 2 ; // HIPS_LOCALLY
+ param_intd[8]= 0 ; // HIPS_FORTRAN_NUMBERING
+ param_intd[9]= 1 ; // HIPS_SCALE
+ param_intd[10]= 1 ; // HIPS_REORDER
+ param_intd[11]= 1 ; // HIPS_DOF
+ param_intd[12]= 2 ; // HIPS_SCALENBR
+ param_intd[13]= max(0L,verbosity-2) ; // HIPS_VERBOSE
+ param_intd[14]= 2 ; // HIPS_DOMSIZE
+ param_intd[15]= 2 ; // HIPS_SCHUR_METHOD
+ param_intd[16]= 2 ; // HIPS_ITMAX_SCHUR
+ }
+
+ static void Def_dopt(double *d)
+ {
+ d[0]= 1e-09 ; // HIPS_PREC
+ d[1]= 0.005 ; // HIPS_DROPTOL0
+ d[2]= 0.005 ; // HIPS_DROPTOL1
+ d[3]= 0.005 ; // HIPS_DROPTOLE
+ d[4]= 0.005 ; // HIPS_AMALG
+ d[5]= 0.005 ; // HIPS_DROPSCHUR
+ }
+
+public:
+
+
+ HipsSolver(const MatriceMorse<double> &AA,double eeps,string datafile, const KN<long> ¶m_int1,
+ const KN<double> ¶m_double1,int mmaster, MPI_Comm * mpicommw )
+ : eps(eeps),data_option(datafile) ,param_int(17), param_double(6),id(GetId())
+ {
+ master=mmaster;
+ if(mpicommw==0)
+ comm=MPI_COMM_WORLD;
+ else
+ comm= *mpicommw;
+
+ MPI_Comm_rank(comm, &proc_id);
+ MPI_Comm_size(comm, &nproc);
+ if(proc_id==0 || verbosity>2)
+ cout << " Hips Comm " << proc_id<< " / "<< nproc << endl;
+
+ Def_iopt(param_int);
+ Def_dopt(param_double);
+
+ static int dopt_wrapper[6] = {
+ HIPS_PREC ,
+ HIPS_DROPTOL0 ,
+ HIPS_DROPTOL1 ,
+ HIPS_DROPTOLE ,
+ HIPS_AMALG ,
+ HIPS_DROPSCHUR
+ };
+
+ static int iopt_wrapper[17] = {
+ -1,// DEf STRATEGIC not in H
+ HIPS_KRYLOV_METHOD ,
+ HIPS_ITMAX,
+ HIPS_KRYLOV_RESTART,
+ HIPS_SYMMETRIC,
+ HIPS_GRAPH_SYM,
+ HIPS_PARTITION_TYPE,
+ HIPS_LOCALLY,
+ HIPS_FORTRAN_NUMBERING,
+ HIPS_SCALE,
+ HIPS_REORDER,
+ HIPS_DOF,
+ HIPS_SCALENBR,
+ HIPS_VERBOSE,
+ HIPS_DOMSIZE,
+ HIPS_SCHUR_METHOD,
+ HIPS_ITMAX_SCHUR
+ } ;
+
+ int ic,sym=AA.symetrique ,symm=AA.symetrique;
+
+
+ if(!data_option.empty())
+ parm_param(datafile,param_int,param_double);
+ else
+ {
+ for(int i=0;i< min(param_int.N(),param_int1.N()); ++i)
+ if(param_int1[i]>-1) param_int[i]=param_int1[i];
+ for(int i=0;i< min(param_double.N(),param_double1.N()); ++i)
+ if(param_double1[i]>-0.9999) param_double[i]=param_double1[i];
+ }
+ // force param value ...
+ param_int[0]=max(min(param_int[0],2L),0L);
+ param_int[5]= sym;
+ param_int[4]= symm;
+
+ if(eps>0 &&( param_double1.N() ==0 || param_double1[0]<0) ) param_double[0]= eps;
+ else eps = param_double[0];
+
+ ic = param_int[0];
+ scale=param_int[9];
+
+ if(verbosity>3 && proc_id==0 )
+ {
+ cout << " Hips INT opts " << param_int << endl;
+ cout << " Hips REAL opts " << param_double << endl;
+ }
+
+ HIPS_SetDefaultOptions(id, param_int[0] );
+
+ for(int i=1;i<param_int.N();++i) // the fist value is teh STRATEGIE KING not aoption
+ if(param_int[i]>=0) HIPS_SetOptionINT(id,iopt_wrapper[i],param_int[i] );
+ for(int i=0;i<param_double.N();++i)
+ if(param_double[i]>=0.)HIPS_SetOptionREAL(id,dopt_wrapper[i],param_double[i] );
+
+ if(!data_option.empty())
+ parm_param(datafile,param_int,param_double);
+
+ HIPS_SetCommunicator(id,comm);
+
+ n=AA.n; nnz=AA.nbcoef;
+
+ int ierr;
+ /*
+ pr= new int[n+1];
+ p= new int[nnz];
+ AAv=new double[nnz];
+
+
+ for(int i=0;i<nnz;i++)
+ {
+ AAv[i]=AA.a[i];
+ p[i]=AA.cl[i];
+ if(i<=n) pr[i]=AA.lg[i];
+ }
+ */
+
+ int job, tmp;
+ if(scale) {
+ job = 1;
+ tmp = 2; /*-- compute 2-norm */
+ scaletmpr=new double[n];
+ scaletmpc=new double[n];
+
+ roscal(n,job,tmp,AA.a,AA.cl,AA.lg,scaletmpr,&ierr);
+ if (ierr) fprintf(stderr, "Error: in roscal, ierr = %d\n", ierr);
+ /*------- scale the RHS according to row scaling coefficients */
+
+ coscal(n,job,tmp,AA.a,AA.cl,AA.lg,scaletmpc,&ierr);
+ if (ierr) fprintf(stderr, "Error: in coscal, ierr = %d\n", ierr);
+
+ } /*--- end of branch on scaling */
+
+
+ int wgtflag=0, numflag=0, volume;
+
+ riord= new int[n]; //(int *)malloc(sizeof(int)*n);
+ if(riord==NULL) {
+ if(nproc==0)
+ printf("%s","Memory allocation failed in partition stage \n");
+ exit(1);
+ }
+ int option[5]; option[0]=0;
+ if(nproc>1){
+ METIS_PartGraphKway(&n, AA.lg, AA.cl, NULL, NULL, &wgtflag, &numflag,&nproc, option, &volume, riord);
+ }
+ else if(nproc==1){
+ for (int i=0; i<n; i++)
+ riord[i]=0;
+ }
+
+ iwork= new int[nproc+1];// (int *)malloc(sizeof(int)*n);
+ maptmp= new int [n];//(int *)malloc(sizeof(int)*n);
+ mapptr= new int [nproc+1];//(int *)malloc(sizeof(int)*(nproc+1));
+ iwork1= new int[nproc+1];//(int *)malloc(sizeof(int)*(nproc+1));
+
+ for(int i=0; i<=nproc; i++)
+ iwork[i]=iwork1[i]=0;
+
+ for(int j=0; j<n; j++)
+ {
+ iwork[riord[j]]++;
+ iwork1[riord[j]]++;
+ }
+ numflag=0;
+ for(int i=0; i<nproc; i++)
+ {
+ mapptr[i]=numflag;
+ numflag+=iwork[i];
+ }
+
+ mapptr[nproc]=numflag;
+
+ for (int i=0; i<nproc; i++){
+ iwork[i]=mapptr[i];
+ }
+ if(nproc==0)
+ iwork[0]=mapptr[0];
+
+ for(int i=0; i<n; i++){
+ maptmp[iwork[riord[i]]]=i;
+ iwork[riord[i]]++;
+ }
+ int nnzz;
+ nnzz=0;
+ for(int i=0;i<n;i++)
+ if(riord[i]==proc_id)
+ {
+ nnzz+=(AA.lg[i+1]-AA.lg[i]);
+ }
+ ierr = HIPS_GraphBegin(id, n, nnzz);
+ HIPS_ExitOnError(ierr);
+ nnzl=nnzz;
+ if(verbosity > 5)
+ cout << " Hips : proc " << proc_id << " / nzz = " << nnzz << " / nzzg " << nnz << endl;
+
+
+ for(int i=0;i<n;i++)
+ {
+ if(riord[i]==proc_id){
+ for(int j=AA.lg[i];j<AA.lg[i+1];j++)
+ {
+ ierr = HIPS_GraphEdge(id, i, AA.cl[j]);
+ HIPS_ExitOnError(ierr);
+ }
+ }
+
+ }
+
+ ierr = HIPS_GraphEnd(id);
+ HIPS_ExitOnError(ierr);
+ if(master==-1)
+ {
+
+ // HERE distributed matrix ????
+ ffassert(0); // to be done in future ...
+ }
+ if(proc_id==0)
+ {
+ ierr = HIPS_SetPartition(id, nproc, mapptr, maptmp);
+ HIPS_ExitOnError(ierr);
+ }
+ //symm=1;
+ if( nproc ==1)
+ {
+ ierr = HIPS_MatrixGlobalCSR(id, n, AA.lg, AA.cl, AA.a, 0, HIPS_ASSEMBLY_OVW, sym_matrix);
+ HIPS_ExitOnError(ierr);
+
+ }
+ else
+ {
+ ierr = HIPS_AssemblyBegin(id, nnzz, HIPS_ASSEMBLY_OVW, HIPS_ASSEMBLY_OVW, HIPS_ASSEMBLY_FOOL,symm);
+ HIPS_ExitOnError(ierr);
+ int kkk;
+ for(int i=0;i<n;i++)
+ {
+ if(riord[i]==proc_id){
+ for(int k=AA.lg[i];k<AA.lg[i+1];k++)
+ {
+ kkk++;
+ if(verbosity >100) cout << " " << proc_id << " a( " << i << ", " <<AA.cl[k] << ")= " << AA.a[k] << endl;
+ ierr = HIPS_AssemblySetValue(id, i, AA.cl[k], AA.a[k]);
+ HIPS_ExitOnError(ierr);
+ }
+ }
+
+ }
+ ffassert(kkk);
+ ierr = HIPS_AssemblyEnd(id);
+
+ HIPS_ExitOnError(ierr);
+
+ }
+
+ }
+
+ void Solver(const MatriceMorse<double> &AA,KN_<double> &x,const KN_<double> &b) const {
+ /***************************************************/
+ /* */
+ /* ENTER THE RIGHT-HAND-SIDE */
+ /* */
+ /***************************************************/
+ int i,nloc;
+ nloc=0;
+ int nnsize;
+ MPI_Comm_size(comm,&nnsize);
+ if(master==-1)
+ {
+
+ // HERE distributed rhs ????
+ ffassert(0); // to be done in future ...
+ }
+
+
+ COEF * rhsloc = new COEF[iwork1[proc_id]] ;//(COEF *)malloc(sizeof(COEF)*iwork1[proc_id]);
+ COEF * xx = new COEF[iwork1[proc_id]] ;// (COEF *)malloc(sizeof(COEF)*iwork1[proc_id]);
+ INTS * unknownlist = new INTS [iwork1[proc_id]] ;//(INTS *)malloc(sizeof(INTS)*iwork1[proc_id]);
+ COEF * xz = new COEF[n]; // (COEF *)malloc(sizeof(COEF)*n);
+
+ nloc=0;
+ // if(scale)
+ {
+ for(i=0;i<n;i++)
+ {
+ if(riord[i]==proc_id){
+ if(scale) rhsloc[nloc]=b[i]*scaletmpr[i];
+ unknownlist[nloc++]=i;
+ }
+ }
+ }
+ for(i=0;i<iwork1[proc_id];i++)
+ xx[i]=0.0;
+ ierr = HIPS_SetRHS(id, nloc, unknownlist, rhsloc, HIPS_ASSEMBLY_OVW, HIPS_ASSEMBLY_OVW, HIPS_ASSEMBLY_FOOL);
+ HIPS_ExitOnError(ierr);
+
+ /****************************************************/
+ /* Get the local solution */
+ /****************************************************/
+
+ ierr = HIPS_GetSolution(id, nloc, unknownlist, xx, HIPS_ASSEMBLY_FOOL);
+
+ HIPS_ExitOnError(ierr);
+ INTL nnzp;
+ ierr= HIPS_GetInfoINT(id,HIPS_INFO_NNZ_PEAK,&nnzp);
+
+
+ int *perm = new int[n], *invp= new int[n];
+
+ MPI_Gatherv(xx,iwork1[proc_id], MPI_DOUBLE, xz,iwork1,mapptr,MPI_DOUBLE,0,comm);
+ MPI_Gatherv(unknownlist,iwork1[proc_id], MPI_INT, perm,iwork1,mapptr,MPI_INT,0,comm);
+ MPI_Bcast(xz,n,MPI_DOUBLE,0, comm);
+ MPI_Bcast(perm,n,MPI_INT,0, comm);
+
+ for(int i=0;i<n;i++)
+ invp[perm[i]]=i;
+
+ {
+ for(int i=0;i<n;i++)
+ {
+ x[i]=xz[invp[i]];
+ if(scale) x[i]=x[i]*scaletmpc[i];
+ }
+ }
+ REAL residu;
+ INTL ninner,nouter;
+
+ ierr= HIPS_GetInfoREAL (id,HIPS_INFO_RES_NORM,&residu);
+ ierr= HIPS_GetInfoINT(id,HIPS_INFO_INNER_ITER,&ninner);
+ ierr= HIPS_GetInfoINT(id,HIPS_INFO_OUTER_ITER,&nouter);
+ if(residu >eps)
+ cout << "\n\n WARNING Hips Do not Converge " << id << " Resudual = " <<residu<< " / " <<eps
+ << " Itertion ninner :"<< ninner
+ <<" , outer : " << nouter <<"\n\n"<< endl;
+ else if( verbosity > 1 && proc_id==0 )
+ cout << " Hips " << id << ", Res = " <<residu << " / " <<eps
+ << " Iter inner : "<< ninner
+ <<" , outer : " << nouter << " nzz peak =" <<nnzp << " nnz " << nnz << endl;
+ /**************************************************/
+ /* Free HIPS internal structure for problem "id" */
+ /*************************************************/
+ //HIPS_INFO_RES_NORM
+ /*
+ */
+ delete [] xz;
+ delete [] perm;
+ delete [] invp;
+ delete [] rhsloc;
+ delete [] unknownlist;
+ delete [] xx;
+
+
+ }
+
+ ~HipsSolver()
+ {
+ assert(id>=0);
+ if( (verbosity>3 && proc_id==0 ) ||(verbosity>9) )
+ cout << " ~Hips_Solver S:" << id << endl;
+ // HIPS_SetOptionINT(id,HIPS_DISABLE_PRECOND,0);
+ // HIPS_ExitOnError(ierr);
+ ierr = HIPS_Clean(id);
+ HIPS_ExitOnError(ierr);
+
+ delete [] iwork1;
+ delete [] mapptr;
+
+ delete [] iwork;
+ delete [] maptmp;
+
+ if(id>0 && id< MaxIds) Ids[id]=-2;
+ id=-2;
+
+ }
+
+
+ void addMatMul(const KN_<double> & x, KN_<double> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<double> &) (*this) * x;
+ }
+private:// no copy
+ HipsSolver(const HipsSolver &);
+ HipsSolver & operator=(const HipsSolver &);
+}; // CLASS HipsSolver
+
+int HipsSolver::Ids[HipsSolver::MaxIds];
+
+
+
+
+inline MatriceMorse<double>::VirtualSolver *
+BuildSolverHipsSolvermpi(DCL_ARG_SPARSE_SOLVER(double,A))
+{
+ if(verbosity>9)
+ cout << " BuildSolverSuperLU<double>" << endl;
+ return new HipsSolver(*A,ds.epsilon,ds.data_filename, ds.lparams, ds.dparams,ds.master,(MPI_Comm *)ds.commworld);
+ }
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ }; */
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// the 2 default sparse solver double and complex
+DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
+//DefSparseSolver<Complex>::SparseMatSolver SparseMatSolver_C;
+// the default probleme solver
+TypeSolveMat::TSolveMat TypeSolveMatdefaultvalue=TypeSolveMat::defaultvalue;
+
+bool SetDefault()
+{
+ if(verbosity>1)
+ cout << " SetDefault sparse to default" << endl;
+ DefSparseSolver<double>::solver =SparseMatSolver_R;
+ //DefSparseSolver<Complex>::solver =SparseMatSolver_C;
+ TypeSolveMat::defaultvalue =TypeSolveMat::SparseSolver;
+ return 1;
+}
+bool HipsDefaults(KN<long>* piop,KN<double> * pdop)
+{
+ if(piop)
+ {
+ piop->resize(17);
+ HipsSolver::Def_iopt(*piop);
+ }
+ if(pdop)
+ {
+ pdop->resize(6);
+ HipsSolver::Def_dopt(*pdop);
+ }
+
+ return true;
+ }
+bool SetHipsSolver()
+{
+ if(verbosity>1)
+ cout << " SetDefault sparse solver to Hips" << endl;
+ DefSparseSolver<double>::solver =BuildSolverHipsSolvermpi;
+ //DefSparseSolver<Complex>::solver =BuildSolverHipsSolvermpi;
+ TypeSolveMat::defaultvalue =TypeSolveMatdefaultvalue;
+ return 1;
+}
++<<<<<<< HEAD
+
+static void Load_Init()
++=======
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ SparseMatSolver_R= DefSparseSolver<double>::solver;
+ //SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+
+ if(verbosity>1)
+ cout << "\n Add: Hips, defaultsolver defaultsolverHips" << endl;
+ TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+ DefSparseSolver<double>::solver =BuildSolverHipsSolvermpi;
+ // DefSparseSolver<Complex>::solver =BuildSolverHipsSolver;
+ if(! Global.Find("defaultsolver").NotNull() )
+ Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
+ Global.Add("defaulttoHips","(",new OneOperator0<bool>(SetHipsSolver));
+ if(! Global.Find("HipsDefaults").NotNull() )
+ Global.Add("HipsDefaults","(",new OneOperator2<bool,KN<long>*,KN<double> *>(HipsDefaults));
+
+}
+
+
+
+
++<<<<<<< HEAD
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/hypre_FreeFem.cpp
index ab9a1ed,5f98092..4fd5054
--- a/examples++-mpi/hypre_FreeFem.cpp
+++ b/examples++-mpi/hypre_FreeFem.cpp
@@@ -1643,7 -1643,7 +1643,7 @@@ public
if(X_loc!=NULL) free(X_loc); if(rhs!=NULL) free(rhs); if(xx!=NULL) free(xx);
if(b_loc!=NULL) free(b_loc); if(row!=NULL) free(row);
if(iwork1!=NULL) delete [] iwork1;
-- if(mapptr!=NULL) delete [] mapptr;
++ if(mapptr!=NULL) delete [] mapptr;
}
~HypreSolver() {
if(verbosity){
diff --cc examples++-mpi/hypre_FreeFem.cpp.orig
index ab9a1ed,5f98092..40922f8
--- a/examples++-mpi/hypre_FreeFem.cpp.orig
+++ b/examples++-mpi/hypre_FreeFem.cpp.orig
@@@ -1712,9 -1712,9 +1712,15 @@@ BuildHypreSolver(DCL_ARG_SPARSE_SOLVER(
}
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ };*/
++=======
+ class Init { public:
+ Init();
+ };
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
// the 2 default sparse solver double and complex
DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ;
@@@ -1745,7 -1745,8 +1751,12 @@@ bool SetHypreSolver(
}
++<<<<<<< HEAD
+static void Load_Init()
++=======
+ LOADINIT(Init);
+ Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
{
SparseMatSolver_R= DefSparseSolver<double>::solver;
@@@ -1758,4 -1759,7 +1769,11 @@@
Global.Add("defaulttoHyprempi","(",new OneOperator0<bool>(SetHypreSolver));
}
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
+
+
+
+
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/interfacepastix.cpp
index da1e638,49fb626..bfb6250
--- a/examples++-mpi/interfacepastix.cpp
+++ b/examples++-mpi/interfacepastix.cpp
@@@ -183,7 -183,7 +183,7 @@@ void read_datafile_pastixff(const strin
}
// ATTENTION :: pastix_float_t
--// peut �tre soit un complex ou un reel cela depend de la maniere dont on a compiler pastix
++// peut �tre soit un complex ou un reel cela depend de la maniere dont on a compiler pastix
// CAS DOUBLE SEULEMENT
@@@ -249,7 -249,7 +249,7 @@@ public
Ncol = AA.m;
Nrow = AA.n;
-- // Avant : on ecrit la transpos�e
++ // Avant : on ecrit la transpos�e
/*
ia = (pastix_int_t *) malloc( (Ncol+1)*sizeof(pastix_int_t));
for(int ii=0; ii < Ncol+1; ii++){
diff --cc examples++-mpi/interfacepastix.cpp.orig
index da1e638,49fb626..9d2da71
--- a/examples++-mpi/interfacepastix.cpp.orig
+++ b/examples++-mpi/interfacepastix.cpp.orig
@@@ -499,9 -499,9 +499,15 @@@ BuildSolverpastixmpi(DCL_ARG_SPARSE_SOL
}
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ };*/
++=======
+ class Init { public:
+ Init();
+ };
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
// the 2 default sparse solver double and complex
DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
@@@ -531,8 -531,8 +537,13 @@@ bool Setpastixmpi(
++<<<<<<< HEAD
+
+static void Load_Init()
++=======
+ LOADINIT(Init);
+ Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
{
SparseMatSolver_R= DefSparseSolver<double>::solver;
@@@ -547,5 -547,3 +558,8 @@@
Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
Global.Add("defaulttopastixmpi","(",new OneOperator0<bool>(Setpastixmpi));
}
++<<<<<<< HEAD
+
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/mpi-cmaes.cpp.orig
index 8ceb0f0,0000000..2a4d9ed
mode 100644,000000..100644
--- a/examples++-mpi/mpi-cmaes.cpp.orig
+++ b/examples++-mpi/mpi-cmaes.cpp.orig
@@@ -1,392 -1,0 +1,405 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Sylvain Auliac
+// E-MAIL : auliac at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+//ff-c++-LIBRARY-dep: mpi
+//ff-c++-cpp-dep: ../examples++-load/cmaes.cpp -I../examples++-load
+
+/*
+ This is a freefem interface of the Hansen's CMA-ES C optimizer.
+ The class CMAES is a quick C++ interface for the contents of the C files
+ then follow the real FreeFem++ stuff.
+*/
+
+
+#include <iostream>
+using namespace std;
+#include "ff++.hpp"
+#include "mpi.h"
+#include "cmaes_interface.h"
+
+
+
+template<class T> struct MPI_TYPE {};
+template<> struct MPI_TYPE<long> {static const MPI_Datatype TYPE(){return MPI_LONG;}};
+template<> struct MPI_TYPE<int> {static const MPI_Datatype TYPE(){return MPI_INT;}};
+template<> struct MPI_TYPE<double> {static const MPI_Datatype TYPE(){return MPI_DOUBLE;}};
+template<> struct MPI_TYPE<char> {static const MPI_Datatype TYPE(){return MPI_BYTE;}};
+
+
+class CMAES //Abstract class, because the fitness function prototype may differ from users to users
+{
+ public:
+ //typedef double (*FFT)(double const *); //Fitness Function Type
+ CMAES() : pop(0),fitvals(0),evo() {}
+ CMAES(int d,double *xstart,double *stddev,long seed,int lambda,const char *ipf="initials.par") : pop(0),fitvals(0),evo()
+ {
+ fitvals = init(d,xstart,stddev,seed,lambda,ipf);
+ cout << SayHello() << endl;
+ }
+ virtual ~CMAES() {exit();}
+
+ void resume_distribution(char *filename) {return cmaes_resume_distribution(&evo, filename);}
+ double * const * & SamplePopulation() {return pop = cmaes_SamplePopulation(&evo);}
+ double * UpdateDistribution() {return cmaes_UpdateDistribution(&evo,fitvals);}
+ const char * TestForTermination() const {return cmaes_TestForTermination(&evo);}
+ double * const * & ReSampleSingle(int index) {return pop = cmaes_ReSampleSingle(&evo,index);}
+ double const * ReSampleSingle_old(double *rgx) {return cmaes_ReSampleSingle_old(&evo,rgx);}
+ void UpdateEigensystem(int flgforce) {return cmaes_UpdateEigensystem(&evo, flgforce);}
+ virtual void PopEval() =0;
+ //{for(int i=0;i<popsize();++i) fitvals[i] = ff(pop[i]);} //the thing to parralelize
+
+ double axisratio() const {return cmaes_Get(&evo,"axisratio");} //between lengths of longest and shortest principal axis of the distribution ellipsoid
+ int eval() const {return floor(cmaes_Get(&evo,"eval"));} //number of function evaluations
+ double fitness() const {return cmaes_Get(&evo,"fitness");} //recent best function evaluation
+ double fbestever() const {return cmaes_Get(&evo,"fbestever");} //ever best function value
+ int generation() const {return floor(cmaes_Get(&evo,"generation"));}
+ int maxeval() const {return floor(cmaes_Get(&evo,"maxeval"));} //maximal number of function evaluations
+ int maxgen() const {return floor(cmaes_Get(&evo,"maxgen"));} //maximal number of generations
+ double maxaxislength() const {return cmaes_Get(&evo,"maxaxislength");}
+ double minaxislength() const {return cmaes_Get(&evo,"minaxislength");}
+ double maxstddev() const {return cmaes_Get(&evo,"maxstddev");}
+ double minstddev() const {return cmaes_Get(&evo,"minstddev");}
+ int dimension() const {return floor(cmaes_Get(&evo,"dimension"));}
+ int popsize() const {return floor(cmaes_Get(&evo,"lambda"));}
+ double sigma() const {return cmaes_Get(&evo,"sigma");}
+ double * diagC() const {return const_cast<double*>(cmaes_GetPtr(&evo,"diag(C)"));}
+ double * diagD() const {return const_cast<double*>(cmaes_GetPtr(&evo,"diag(D)"));}
+ double * stddev() const {return const_cast<double*>(cmaes_GetPtr(&evo,"stddev"));}
+ double * xbestever() const {return const_cast<double*>(cmaes_GetPtr(&evo,"xbestever"));}
+ double * xbest() const {return const_cast<double*>(cmaes_GetPtr(&evo,"xbest"));}
+ double * xmean() const {return const_cast<double*>(cmaes_GetPtr(&evo,"xmean"));}
+
+ void ReadSignals(char const * filename) const {cmaes_ReadSignals(&evo,filename);}
+ char * SayHello() const {return cmaes_SayHello(&evo);}
+ void WriteToFile(char const * keyword,char const * output_filename) const {cmaes_WriteToFile(&evo,keyword,output_filename);}
+
+ virtual double * operator() ()
+ {
+ //ReadSignals("signals.par");
+ while(!TestForTermination())
+ {
+ SamplePopulation();
+ PopEval();
+ UpdateDistribution();
+ //ReadSignals("signals.par");
+ }
+ cout << "Stop : " << TestForTermination() << endl;
+ return xmean();
+ }
+ cmaes_t& optimizer() {return evo;}
+ protected:
+ double * const * pop;
+ double * fitvals;
+ double*& init(int dimension,double *xstart,double *stddev,long seed,int lambda,const char *input_parameter_filename)
+ {return fitvals = cmaes_init(&evo,dimension,xstart,stddev,seed,lambda,input_parameter_filename);}
+ private:
+ void exit() {cmaes_exit(&evo);}
+ mutable cmaes_t evo;
+};
+
+
+
+
+/*
+ Now comes the FreeFem ++ part :
+*/
+
+extern Block *currentblock;
+
+typedef double R;
+
+class OptimCMA_ES : public OneOperator
+{
+ public:
+ typedef KN<R> Kn;
+ typedef KN_<R> Kn_;
+ const int cas;
+
+
+ class ffcalfunc // to call the freefem function .. J
+ {
+ public:
+ Stack stack;
+ Expression JJ,theparame;
+ mutable int counter;
+
+ ffcalfunc(Stack s,Expression JJJ,Expression epar) : stack(s),JJ(JJJ), theparame(epar), counter(0) {}
+ double J(Kn_ x) const
+ {
+ ++counter;
+ KN<double> *p=GetAny<KN<double> *>( (*theparame)(stack) );
+ *p=x;
+ double ret= GetAny<R>( (*JJ)(stack));
+ WhereStackOfPtr2Free(stack)->clean();
+ return ret;
+ }
+ };
+
+
+ class CMA_ES_MPI : public CMAES
+ {
+ public:
+ typedef KN<double> Rn;
+ typedef KN_<double> Rn_;
+
+
+ //CMA_ES_MPI() : CMAES(),x(0),fit(0) {}
+ /*CMA_ES(ffcalfunc &_ff,int d,Rn &xstart,double *stddev,long seed,int lambda)
+ : CMAES(d,xstart.n ? xstart:0,stddev,seed,lambda,"non"),x(&xstart),fit(&_ff) {}
+ CMA_ES(ffcalfunc &_ff,int d,Rn &xstart,const Rn &stddev,long seed,int lambda)
+ : CMAES(d,xstart.n ? xstart:0,stddev,seed,lambda,"non"),x(&xstart),fit(&_ff) {}*/
+
+ CMA_ES_MPI(ffcalfunc &_ff,Rn &xstart,const Rn &stddev,long seed,int lambda,MPI_Comm *_com)
+ : CMAES(),x(0),fit(&_ff),com(_com),myid(0),nproc(1),my_number_of_fitness_eval(0),index(0)
+ {
+ MPI_Comm_size(*com,&nproc);
+ MPI_Comm_rank(*com,&myid);
+ x = &xstart;
+ init(x->n,xstart.n ? xstart:0,stddev,seed,lambda,"non");
+ my_number_of_fitness_eval = (lambda/nproc) + (myid < (lambda%nproc) ? 1:0);
+ index = new int[nproc];
+ for(int i=0;i<nproc;++i)
+ {
+ int inofe = lambda/nproc + ((i-1)<(lambda%nproc) ? 1:0);
+ index[i] = i>0 ? index[i-1]+inofe : 0;
+ }
+ if(myid==0) cout << SayHello() << endl;
+ }
+ CMA_ES_MPI(ffcalfunc &_ff,Rn &xstart,const Rn &stddev,long seed,int lambda,MPI_Comm *_com,const char *ifname)
+ : CMAES(),x(0),fit(&_ff),com(_com),myid(0),nproc(1),my_number_of_fitness_eval(0),index(0)
+ {
+ MPI_Comm_size(*com,&nproc);
+ MPI_Comm_rank(*com,&myid);
+ x = &xstart;
+ init(x->n,xstart.n ? xstart:0,stddev,seed,lambda,ifname);
+ my_number_of_fitness_eval = (lambda/nproc) + (myid < (lambda%nproc) ? 1:0);
+ index = new int[nproc];
+ for(int i=0;i<nproc;++i)
+ {
+ int inofe = lambda/nproc + ((i-1)<(lambda%nproc) ? 1:0);
+ index[i] = i>0 ? index[i-1]+inofe : 0;
+ }
+ if(myid==0) cout << SayHello() << endl;
+ }
+ ~CMA_ES_MPI()
+ {
+ if(index) delete [] index;
+ index=0;
+ }
+
+ void PopEval()
+ {
+ //cout << endl << "***** in popeval myid = " << myid << "*****" << endl;
+ for(int i=0;i<my_number_of_fitness_eval;++i)
+ {
+ Rn_ popi(pop[i+index[myid]],dimension());
+ fitvals[i+index[myid]] = fit->J(popi);
+ }
+ }
+ double * operator() ()
+ {
+ while(!TestForTermination())
+ {
+ MPI_Barrier(*com);
+ SamplePopulation();//Every proc samples its own population... but only the one from proc 0 is used. Fortunately, this is a quick computation regarding the time spent on fitness function evaluation
+ for(int i=0;i<popsize();++i) MPI_Bcast(pop[i],dimension(),MPI_DOUBLE,0,*com); //send the population to every proc
+ PopEval(); //each proc do its work gently
+ for(int i=0;i<nproc;++i)
+ {
+ int nn = i<nproc-1 ? index[i+1] - index[i] : popsize()/nproc;
+ MPI_Bcast(&fitvals[index[i]],nn,MPI_DOUBLE,i,*com);
+ }
+ UpdateDistribution();//There again, only proc 0 would really need to update its distribution
+ }
+ if(myid==0) cout << "Stop : " << TestForTermination() << endl;
+ return xmean();
+ }
+ private:
+ CMA_ES_MPI(const CMA_ES_MPI &);
+ CMA_ES_MPI& operator=(const CMA_ES_MPI &);
+ ffcalfunc *fit;
+ Rn *x;
+ MPI_Comm *com;
+ int nproc,myid,my_number_of_fitness_eval;
+ int * index;
+ };
+
+
+
+ class E_CMA_ES: public E_F0mps
+ {
+ public:
+ const int cas;
+ static basicAC_F0::name_and_type name_param[] ;
+ static const int n_name_param =12;
+ Expression nargs[n_name_param];
+ Expression X;
+ C_F0 inittheparam,theparam,closetheparam;
+ Expression JJ;
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ R arg(int i,Stack stack,R a) const{ return nargs[i] ? GetAny<R>( (*nargs[i])(stack) ): a;}
+
+ E_CMA_ES(const basicAC_F0 & args,int cc) : cas(cc)
+ {
+ int nbj= args.size()-1;
+ Block::open(currentblock); // make a new block to
+ X = to<Kn*>(args[nbj]);
+ C_F0 X_n(args[nbj],"n");
+ // the expression to init the theparam of all
+ inittheparam = currentblock->NewVar<LocalVariable>("the parameter",atype<KN<R> *>(),X_n);
+ theparam = currentblock->Find("the parameter"); // the expression for the parameter
+ args.SetNameParam(n_name_param,name_param,nargs);
+ const Polymorphic * opJ=0;
+ if (nbj>0)
+ {
+ opJ= dynamic_cast<const Polymorphic *>(args[0].LeftValue());
+ assert(opJ);
+ }
+ JJ= to<R>(C_F0(opJ,"(",theparam));
+ closetheparam=currentblock->close(currentblock); // the cleanning block expression
+ }
+
+ virtual AnyType operator()(Stack stack) const
+ {
+ double cost = 1e100;
+ WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH mars 2005
+ Kn &x = *GetAny<Kn *>((*X)(stack));
+ long n=x.N();
+ long seed = arg(0,stack,0L); //The seed for random numbers generation
+ double initialStdDev = arg(1,stack,0.3); //Initial standard deviation
+ KN<double> iSD(n,1.);
+ iSD *= initialStdDev;
+ KN<double> initialStdDevs(nargs[2] ? GetAny<KN_<double> >((*nargs[2])(stack)) : (KN_<double>)iSD);
+ //cout << "dans le dylib :" << initialStdDevs << endl;
+ double stopTolFun = arg(3,stack,1.E-12);
+ double stopTolFunHist = arg(4,stack,0.);
+ double stopTolX = arg(5,stack,0.);
+ double stopTolUpXFactor = arg(6,stack,1.E3);
+ long popsize = arg(7,stack,4 + (long) floor(3*log(n)));
+ pcommworld vcommworld=0;
+ if (nargs[8]) vcommworld = GetAny<pcommworld>((*nargs[8])(stack));
+
+ MPI_Comm mpiCommWorld = MPI_COMM_WORLD;
+ MPI_Comm * commworld= vcommworld ? (MPI_Comm *) vcommworld : & mpiCommWorld ;
+ //long mu = arg(8,stack,popsize/2);
+
+ long iprint = verbosity;
+ ffcalfunc ffJ(stack,JJ,theparam);
+
+ //cout << endl << "ATTENTION : " << *commworld << endl;
+
+ int myid=0,nproc=1;
+
+ MPI_Comm_size(*commworld,&nproc);
+ MPI_Comm_rank(*commworld,&myid);
+
+
+
+ //cout << endl << "nbr de proc : " << nproc << " -- myid=" << myid << " -- world id=" << wr << endl;
+
+ CMA_ES_MPI *optim=0;
+ if(nargs[9]) optim = new CMA_ES_MPI(ffJ,x,initialStdDevs,seed,popsize,commworld,(GetAny<string*>((*nargs[9])(stack)))->c_str());
+ else optim = new CMA_ES_MPI(ffJ,x,initialStdDevs,seed,popsize,commworld);
+ if(!nargs[9])
+ {
+ optim->optimizer().sp.stopTolFun = stopTolFun;
+ optim->optimizer().sp.stopTolFunHist = stopTolFunHist;
+ optim->optimizer().sp.stopTolX = stopTolX;
+ optim->optimizer().sp.stopTolUpXFactor = stopTolUpXFactor;
+ long meval = arg(10,stack,static_cast<long>(optim->maxeval()));
+ long mgen = arg(11,stack,static_cast<long>(optim->maxgen()));
+ optim->optimizer().sp.stopMaxFunEvals = meval;
+ optim->optimizer().sp.stopMaxIter = mgen;
+ }
+
+ (*optim)();
+ cost = optim->fitness();
+ x = KN_<double>(optim->xbestever(),optim->dimension());
+
+ delete optim;
+ closetheparam.eval(stack); // clean memory
+ WhereStackOfPtr2Free(stack)->clean(); // FH mars 2005
+ return cost; //SetAny<long>(0); Modif FH july 2005
+ }
+
+ operator aType () const { return atype<double>();}
+ };
+
+ E_F0 * code(const basicAC_F0 & args) const {return new E_CMA_ES(args,cas);}
+
+ OptimCMA_ES(int c) : OneOperator(atype<double>(),atype<Polymorphic*>(),atype<KN<R> *>()),cas(c){}
+};
+
+basicAC_F0::name_and_type OptimCMA_ES::E_CMA_ES::name_param[]=
+{
+ {"seed", &typeid(long) },
+ {"initialStdDev", &typeid(double) },
+ {"initialStdDevs", &typeid(KN_<double>) },
+ {"stopTolFun", &typeid(double) },
+ {"stopTolFunHist", &typeid(double) },
+ {"stopTolX", &typeid(double) },
+ {"stopTolUpXFactor",&typeid(double) },
+ {"popsize", &typeid(long) },
+ {"comm", &typeid(pcommworld)},
+ {"paramFile", &typeid(string*) },
+ {"stopMaxFunEval", &typeid(long) },
+ {"stopMaxIter", &typeid(long) }
+
+ //{"mu", &typeid(long) }
+};
+
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ };*/
+
+
+static void Load_Init()
++=======
++class Init { public:
++ Init();
++};
++
++static Init init; // une variable globale qui serat construite au chargement dynamique
++
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ Global.Add("cmaesMPI","(",new OptimCMA_ES(1));
+
+}
+
+
+
+
+
+
++<<<<<<< HEAD
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/parms_FreeFem.cpp
index dea32b4,f27434a..6d35501
--- a/examples++-mpi/parms_FreeFem.cpp
+++ b/examples++-mpi/parms_FreeFem.cpp
@@@ -437,11 -437,11 +437,11 @@@ int assignprecon( char *precon_str, Dis
--#define minint(a, b) ( (a) < (b) ? (a) : (b) )
--#define maxint(a, b) ( (a) > (b) ? (a) : (b) )
--#define max(a, b) ( (a) > (b) ? (a) : (b) )
--#define min(a, b) ( a < b ? (a) : (b) )
--#define fabsmin(a, b) ( fabs(a) < fabs(b) ? (a) : (b) )
++#define minint(a, b) ( (a) < (b) ? (a) : (b) )
++#define maxint(a, b) ( (a) > (b) ? (a) : (b) )
++#define max(a, b) ( (a) > (b) ? (a) : (b) )
++#define min(a, b) ( a < b ? (a) : (b) )
++#define fabsmin(a, b) ( fabs(a) < fabs(b) ? (a) : (b) )
#define fabsmax(a, b) ( fabs(a) > fabs(b) ? (a) : (b) )
@@@ -955,8 -955,8 +955,8 @@@ public
fprintf(stdout, "The 2-NORM OF THE RELATIVE RESIDUAL IS %16.8g\n", res/res1);
-- }
--
++ }
++
double * xx= (double *)malloc(sizeof(double)*n);
@@@ -972,7 -972,7 +972,7 @@@
MPI_Gatherv(&(poloc[0]), nloc, MPI_INT, &(perm[0]), iwork, mapptr , MPI_INT, 0,comm );
MPI_Bcast(perm,AA.n,MPI_INT,0, comm);
-- int *invp=(int *)malloc(sizeof(int)*n);
++ int *invp=(int *)malloc(sizeof(int)*n);
for(i=0;i<n;i++) invp[perm[i]]=i;
if(dm->comm->myproc==0){for(i=0;i<n;i++) x[i]=xx[invp[i]]; }
diff --cc examples++-mpi/parms_FreeFem.cpp.orig
index dea32b4,f27434a..759c217
--- a/examples++-mpi/parms_FreeFem.cpp.orig
+++ b/examples++-mpi/parms_FreeFem.cpp.orig
@@@ -1021,9 -1021,9 +1021,15 @@@ BuilddSolvePARMS(DCL_ARG_SPARSE_SOLVER(
return new dSolvePARMS(*A,ds.data_filename, ds.lparams, ds.dparams,(MPI_Comm *)ds.commworld);
}
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ };*/
++=======
+ class Init { public:
+ Init();
+ };
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
// the 2 default sparse solver double and complex
DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ;
@@@ -1048,8 -1048,8 +1054,13 @@@ bool SetdSolvePARMS(
TypeSolveMat::defaultvalue = TypeSolveMatdefaultvalue;
return TRUE;
}
++<<<<<<< HEAD
+
+static void Load_Init()
++=======
+ LOADINIT(Init);
+ Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
{
SparseMatSolver_R= DefSparseSolver<double>::solver;
@@@ -1066,4 -1066,3 +1077,7 @@@
}
++<<<<<<< HEAD
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/real_SuperLU_DIST_FreeFem.cpp.orig
index b416ac8,0000000..fe0a112
mode 100644,000000..100644
--- a/examples++-mpi/real_SuperLU_DIST_FreeFem.cpp.orig
+++ b/examples++-mpi/real_SuperLU_DIST_FreeFem.cpp.orig
@@@ -1,813 -1,0 +1,831 @@@
+// for automatic compilation with ff-c++
+//ff-c++-LIBRARY-dep: superlu_dist blas parmetis metis mpi fc
+//ff-c++-cpp-dep:
+//
+// ORIG-DATE: 02/2009
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Jacques Morice
+// E-MAIL : jacques.morice at ann.jussieu.fr
+//
+
+/*
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Thank to the ARN () FF2A3 grant
+ ref:ANR-07-CIS7-002-01
+ */
+#include <mpi.h>
+
+#include <iostream>
+using namespace std;
+
+#include "rgraph.hpp"
+#include "error.hpp"
+#include "AFunction.hpp"
+
+//#include "lex.hpp"
+#include "MatriceCreuse_tpl.hpp"
+
+#include "superlu_ddefs.h"
+#include "ffsuperludistoption.hpp"
+
+template <class R> struct SuperLUmpiDISTDriver
+{
+
+};
+
+template <> struct SuperLUmpiDISTDriver<double>
+{
+ /* Driver routines */
+ static Dtype_t R_SLU_T() { return SLU_D;}
+ static void
+
+ pgssvx(superlu_options_t *p1, SuperMatrix *p2, ScalePermstruct_t *p3,
+ double *p4, int p5, int p6, gridinfo_t *p7,
+ LUstruct_t *p8, SOLVEstruct_t *p9, double *p10,
+ SuperLUStat_t *p11, int *p12)
+ { pdgssvx( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12 ); }
+
+
+ static void
+ pgssvx_ABglobal(superlu_options_t *p1, SuperMatrix *p2,
+ ScalePermstruct_t *p3,
+ double *p4, int p5, int p6, gridinfo_t *p7,
+ LUstruct_t *p8, double *p9,
+ SuperLUStat_t *p10, int *p11)
+ { pdgssvx_ABglobal( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11); }
+
+ static void
+ Print_CompRowLoc_Matrix_dist(SuperMatrix *p1)
+ {
+ dPrint_CompRowLoc_Matrix_dist(p1);
+ }
+
+ static void
+ Create_CompCol_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, int_t p4,
+ double *p5, int_t *p6, int_t *p7,
+ Stype_t p8, Dtype_t p9, Mtype_t p10)
+ {
+ dCreate_CompCol_Matrix_dist(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10);
+ }
+
+ static void
+ Create_CompRowLoc_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3,
+ int_t p4, int_t p5, int_t p6,
+ double *p7, int_t *p8, int_t *p9,
+ Stype_t p10, Dtype_t p11, Mtype_t p12)
+ {
+ dCreate_CompRowLoc_Matrix_dist( p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12);
+ }
+
+ static void
+ CompRow_to_CompCol_dist(int_t p1, int_t p2, int_t p3,
+ double *p4, int_t *p5, int_t *p6,
+ double **p7, int_t **p8, int_t **p9)
+ {
+ dCompRow_to_CompCol_dist( p1,p2,p3,p4,p5,p6,p7,p8,p9 );
+ }
+
+ static void
+ Create_Dense_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, double *p4,
+ int_t p5, Stype_t p6, Dtype_t p7,
+ Mtype_t p8)
+ {
+ dCreate_Dense_Matrix_dist( p1,p2,p3,p4,p5,p6,p7,p8 );
+ }
+
+ static void
+ Create_SuperNode_Matrix_dist(SuperMatrix *p1, int_t p2, int_t p3, int_t p4,
+ double *p5, int_t *p6,
+ int_t *p7, int_t *p8,
+ int_t *p9, int_t *p10,
+ Stype_t p11, Dtype_t p12, Mtype_t p13)
+ {
+ dCreate_SuperNode_Matrix_dist(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10, p11,p12,p13);
+ }
+
+};
+
+template<class R>
+class SolveSuperLUmpi : public MatriceMorse<R>::VirtualSolver, public SuperLUmpiDISTDriver<R> {
+
+ double eps;
+ mutable double epsr;
+ double tgv;
+ double tol_pivot_sym,tol_pivot; //Add 31 oct 2005
+
+
+ //mutable char equed[1];
+ //yes_no_t equil;
+ mutable SuperMatrix A;
+ NCformat *Astore;
+ //NCformat *Ustore;
+ //SCformat *Lstore;
+
+ mutable superlu_options_t options;
+ mutable mem_usage_t mem_usage;
+ mutable ScalePermstruct_t ScalePermstruct;
+ mutable LUstruct_t LUstruct;
+ mutable SOLVEstruct_t SOLVEstruct;
+ mutable gridinfo_t grid;
+
+ string string_option;
+ string data_option;
+ R *a;
+ int *asub, *xa;
+ int_t m, n, nnz;
+ // rajout pour //
+ int_t nprow,npcol; /* process rows and process columns*/
+
+
+ int matrixdist; // type of distributed matrix
+ MPI_Comm commworld ;
+ static const int assembled =0;
+ static const int distributedglobal =1;
+ static const int distributed =2;
+
+ int iam;
+
+public:
+ SolveSuperLUmpi(const MatriceMorse<R> &AA,int strategy,double ttgv, double epsilon,
+ double pivot,double pivot_sym, string datafile,
+ string param_char, KN<long> &pperm_r, KN<long> &pperm_c,void * ccommworld=0) :
+ eps(epsilon),epsr(0),
+ tgv(ttgv),string_option(param_char),data_option(datafile),
+ tol_pivot_sym(pivot_sym),tol_pivot(pivot)
+ {
+ commworld = ccommworld ? *static_cast<MPI_Comm*>( ccommworld) : MPI_COMM_WORLD;
+ int rank;
+ MPI_Comm_rank(commworld, &rank);
+ R* B;
+ //R* X;
+ SuperLUStat_t stat;
+ int info, ldb, nrhs=0;
+ int i;
+ double* berr;
+
+ //int iam;
+ // Add for distributed matrix
+ int_t m_loc, m_loc_fst, fst_row, nnz_loc, fst_nnz;
+ R *aloc;
+ int *asubloc, *xaloc;
+ // End Add for distributed matrix
+ A.Store=0;
+
+ int status;
+ // time variables
+
+ long int starttime,finishtime;
+ long int timeused;
+
+ // rajout debug
+ int myid;
+ if(verbosity) starttime = clock();
+
+
+ /* Defaults */
+ nrhs = 0;
+
+ /* lecture de nprow and npcol */
+ // Cas max deux procs
+ nprow = 1;
+ npcol = 1;
+ matrixdist=0;
+
+
+ if(!data_option.empty()) read_nprow_npcol_matrixdist_superlu_datafile(&data_option, &nprow, &npcol, &matrixdist);
+ if(!string_option.empty()) read_nprow_npcol_freefem( &string_option, &nprow, &npcol, &matrixdist);
+
+ /* ------------------------------------------------------------
+ INITIALIZE THE SUPERLU PROCESS GRID.
+ ------------------------------------------------------------*/
+ if( (verbosity>1) && (rank ==0))
+ cout << "Real superlu_gridinit" << " " << commworld << " " << ccommworld <<endl;
+ superlu_gridinit(commworld, nprow, npcol, &grid);
+
+ /* Bail out if I do not belong in the grid. */
+ iam = grid.iam;
+ if ( iam >= nprow * npcol ){
+ printf("this process is not used in superlu %d \n",iam);
+ }
+ else
+ {
+ /* set the default options */
+ set_default_options_dist(&options);
+ DiagScale_t optionDiagScale;
+
+ if(!string_option.empty()) read_options_freefem(&string_option,&options,&optionDiagScale);
+ if(!data_option.empty()) read_options_superlu_datafile(&data_option,&options,&nprow, &npcol, &matrixdist,&optionDiagScale);
+
+ // matrix to procs and vectors
+ if( matrixdist == assembled ){
+
+ if(!iam){
+ if(verbosity>5)
+ {
+
+ cout << "iam=" << iam << " " ;
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
+ }
+ /* create the matrix for superlu_dist */
+ n=AA.n;
+ m=AA.m;
+ nnz=AA.nbcoef;
+
+ assert( AA.lg[n] == nnz );
+ if(verbosity>5) printf("\tDimension\t%dx%d\t # nonzeros %d\n", m, n, nnz);
+
+ /* transform Row to Col */
+ // cela coute cher comme fonction //
+ //dallocateA_dist(n, nnz, &a, &asub, &xa);
+ //dCompRow_to_CompCol_dist(m,n,nnz,arow,asubrow,xarow,&a,&asub,&xa);
+
+ dCompRow_to_CompCol_dist(m,n,nnz,AA.a,AA.cl,AA.lg,&a,&asub,&xa);
+
+ /* Broadcast matrix A to the other PEs. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+ int infobcast=MPI_Bcast( a, nnz, MPI_DOUBLE, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+
+ }
+ else{
+ /*
+ printf("\tProcess grid\t%d X %d\n", grid.nprow, grid.npcol);
++<<<<<<< HEAD
+ Receive matrix A from PE 0. */
++=======
++ /* Receive matrix A from PE 0. */
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ /* Allocate storage for compressed column representation. */
+ dallocateA_dist(n, nnz, &a, &asub, &xa);
+
+ int infobcast=MPI_Bcast( a, nnz, MPI_DOUBLE, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+ }
+
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+ if(verbosity>6)
+ cout << "Debut: Create_CompCol_Matrix_dist" <<endl;
+ // FFCS - "this->" required by g++ 4.7
+ this->Create_CompCol_Matrix_dist(&A, m, n, nnz, a, asub, xa, SLU_NC, R_SLU, SLU_GE);
+ if(verbosity>6)
+ cout << "Fin: Create_CompCol_Matrix_dist" <<endl;
+ /* creation of pseudo solution + second member */
+
+ if ( !(B = doubleMalloc_dist(m )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ if(verbosity>2 && rank ==0)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+
+ /* Initialize ScalePermstruct and LUstruct. */
+ ScalePermstructInit(m, n, &ScalePermstruct);
+ if( !(pperm_r==NULL) || !(pperm_c==NULL) ) ScalePermstruct.DiagScale=optionDiagScale;
+ if( !(pperm_r==NULL) )
+ for(int ii=0; ii<m; ii++) ScalePermstruct.perm_r[ii] = pperm_r[ii];
+ if( !(pperm_c==NULL) )
+ for(int ii=0; ii<n; ii++) ScalePermstruct.perm_c[ii]= pperm_c[ii];
+
+ if( ScalePermstruct.DiagScale != NOEQUIL ){
+ printf("FreeFem++ doesn't support change of the original matrix");
+ exit(1);
+ }
+ LUstructInit(m, n, &LUstruct);
+
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+
+ ldb = m;
+ nrhs=1;
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ if(verbosity && rank ==0)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+ /* INIT LU struct*/
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+ //B.ncol = 0; /* Indicate not to solve the system */
+
+ nrhs=0;
+ SuperLUmpiDISTDriver<R>::pgssvx_ABglobal(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, berr, &stat, &info);
+
+ if(verbosity>2 && rank ==0)
+ printf("LU factorization: pdgssvx()/p returns info %d\n", info);
+
+ if ( verbosity) PStatPrint(&options,&stat,&grid);
+ PStatFree(&stat);
+
+ }
+ //##########################################################
+ //
+ // matrix distributed with matrix global given
+ //
+ //##########################################################
+ else if( matrixdist == distributedglobal) {
+ if(!iam){
+
+ if(verbosity>2) printf("\tProcess grid\t%d X %d iam=%d \n", grid.nprow, grid.npcol,iam);
+
+ /* create the matrix for superlu_dist */
+ n=AA.n;
+ m=AA.m;
+ nnz=AA.nbcoef;
+ a=AA.a;
+ asub=AA.cl;
+ xa=AA.lg;
+
+ xa[n] = nnz;
+ if(verbosity>6) printf("\tDimension\t%dx%d\t # nonzeros %d\n", m, n, nnz);
+
+ /* Broadcast matrix A to the other PEs. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ MPI_Bcast( AA.a, nnz, MPI_DOUBLE, 0, grid.comm );
+ MPI_Bcast( AA.cl, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( AA.lg, n+1, mpi_int_t, 0, grid.comm );
+
+
+ }
+ else{
+
+ if(verbosity>6)printf("\tProcess grid\t%d X %d iam=%d \n", grid.nprow, grid.npcol,iam);
+ /* Receive matrix A from PE 0. */
+ MPI_Bcast( &m, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &n, 1, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( &nnz, 1, mpi_int_t, 0, grid.comm );
+
+ /* Allocate storage for compressed column representation. */
+ dallocateA_dist(n, nnz, &a, &asub, &xa);
+
+ MPI_Bcast( a, nnz, MPI_DOUBLE, 0, grid.comm );
+ MPI_Bcast( asub, nnz, mpi_int_t, 0, grid.comm );
+ MPI_Bcast( xa, n+1, mpi_int_t, 0, grid.comm );
+
+ }
+
+ /* Compute the number of rows to be distributed to local process */
+ m_loc = m / (grid.nprow * grid.npcol);
+ m_loc_fst = m_loc;
+ /* When m / procs is not an integer */
+ if ((m_loc * grid.nprow * grid.npcol) != m) {
+ /*m_loc = m_loc+1;
+ m_loc_fst = m_loc;*/
+ if (iam == (grid.nprow * grid.npcol - 1)) /* last proc. gets all*/
+ m_loc = m - m_loc * (grid.nprow * grid.npcol - 1);
+ }
+
+ fst_row = iam * m_loc_fst;
+
+ nnz_loc = xa[fst_row+m_loc]-xa[fst_row];
+
+ xaloc = (int_t*) intMalloc_dist(m_loc+1);
+ for(int ii=0; ii < m_loc; ii++){
+ xaloc[ii] = xa[fst_row+ii]-xa[fst_row];
+ }
+
+ xaloc[m_loc]=nnz_loc;
+
+ fst_nnz = xa[fst_row];
+ aloc = (double*) doubleMalloc_dist(nnz_loc);
+ asubloc = (int_t*) intMalloc_dist(nnz_loc);
+
+ for(int ii=0; ii < nnz_loc; ii++){
+ aloc[ii] = a[fst_nnz+ii];
+ asubloc[ii] = asub[fst_nnz+ii];
+ }
+
+ if( iam ){
+ SUPERLU_FREE( a );
+ SUPERLU_FREE( asub );
+ SUPERLU_FREE( xa );
+ }
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+
+ if(verbosity>6) cout << "Debut: Create_CompRowCol_Matrix_dist" <<endl;
+ dCreate_CompRowLoc_Matrix_dist(&A, m, n, nnz_loc, m_loc, fst_row, aloc, asubloc, xaloc, SLU_NR_loc, R_SLU, SLU_GE);
+
+ if(verbosity>6) cout << "Fin: Create_CompRowCol_Matrix_dist" <<endl;
+ /* creation of pseudo solution + second member */
+
+
+ if ( !(B = doubleMalloc_dist(m_loc)) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ for(int ii=0; ii < m_loc; ii++){
+ B[ii] = 1.; //BB[fst_row+ii];
+ }
+
+ if(verbosity >2 && rank ==0)
+ printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+
+ /* set the default options */
+ //set_default_options_dist(&options);
+ //DiagScale_t optionDiagScale;
+ //if(!string_option.empty()) read_options_freefem(&string_option,&options,&optionDiagScale);
+
+ m=A.nrow;
+ n=A.ncol;
+ //printf("Dimension %dx%d; # nonzeros %d\n", A.nrow, A.ncol, nnz);
+ /* Initialize ScalePermstruct and LUstruct. */
+ ScalePermstructInit(m, n, &ScalePermstruct);
+ if(pperm_r || pperm_c ) ScalePermstruct.DiagScale=optionDiagScale;
+ if(pperm_r)
+ for(int ii=0; ii<m; ii++) ScalePermstruct.perm_r[ii] = pperm_r[fst_row+ii];
+ if(pperm_c)
+ for(int ii=0; ii<n; ii++) ScalePermstruct.perm_c[ii] = pperm_c[ii];
+
+ LUstructInit(m, n, &LUstruct);
+
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+
+ ldb = m_loc;
+ //ldx = m_loc;
+
+ nrhs=1;
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ /* ONLY PERFORM THE LU DECOMPOSITION */
+
+ nrhs=0;
+ SuperLUmpiDISTDriver<R>::pgssvx(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, &SOLVEstruct, berr, &stat, &info);
+
+ if(verbosity >1 && rank ==0)
+ printf("LU factorization: pdgssvx()/p returns info %d\n", info);
+
+ if ( verbosity > 2 ) PStatPrint(&options,&stat,&grid);
+ PStatFree(&stat);
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+
+ SUPERLU_FREE( B );
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ nrhs=1;
+ SUPERLU_FREE(berr);
+
+ if(iam==0){
+ finishtime = clock();
+ timeused= (finishtime-starttime)/(1000 );
+ if(verbosity>1)
+ {
+
+ printf("=====================================================\n");
+ cout << "SuperLU_DIST : time factorisation :: " << timeused << " ms" <<endl;
+ printf("=====================================================\n");
+ }
+ }
+ }
+ }
+
+ void Solver(const MatriceMorse<R> &AA,KN_<R> &x,const KN_<R> &b) const {
+ R* B;
+ SuperLUStat_t stat;
+ //int iam;
+ int info=0, ldb=m, nrhs=1;
+ int i;
+ double* berr;
+ double ferr;
+ double rpg, rcond;
+
+ int_t m_loc,m_loc_fst,fst_row;
+ // time variable
+ long int starttime,finishtime;
+ long int timeused;
+
+ if( iam < nprow*npcol){
+
+ if(verbosity) starttime = clock();
+
+ if(n != m) exit(1);
+
+ ffassert ( &x[0] != &b[0]);
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+
+ Dtype_t R_SLU = SuperLUmpiDISTDriver<R>::R_SLU_T();
+ nrhs= 1;
+
+
+
+ //iam = grid.iam;
+ //if( iam < nprow*npcol){
+ /* Initialize the statistics variables. */
+ PStatInit(&stat);
+ /* cas matrix assembled */
+ if( matrixdist == assembled ){
+
+ if( !(B = doubleMalloc_dist(m*nrhs)) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ for(int ii=0; ii<n; ii++){
+ B[ii]=b[ii];
+ }
+
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ ldb = m;
+ //nrhs= 1;
+ SuperLUmpiDISTDriver<R>::pgssvx_ABglobal (&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, berr, &stat, &info );
+
+ if(verbosity>3)
+ printf("Triangular solve: dgssvx() returns info %d\n", info);
+
+ if(verbosity) PStatPrint(&options, &stat, &grid);
+
+ for(int ii=0; ii<n; ii++){
+ x[ii] = B[ii];
+ }
+
+ if(verbosity>2) cout << " x min max " << x.min() << " " <<x.max() << endl;
+
+ }
+ else if( matrixdist == distributedglobal) {
+ double* xtemp;
+ //iam = grid.iam;
+ /* Compute the number of rows to be distributed to local process */
+ m_loc = m / (grid.nprow * grid.npcol);
+ m_loc_fst = m_loc;
+ /* When m / procs is not an integer */
+ if ((m_loc * grid.nprow * grid.npcol) != m) {
+ /*m_loc = m_loc+1;
+ m_loc_fst = m_loc;*/
+ if (iam == (grid.nprow * grid.npcol - 1)) /* last proc. gets all*/
+ m_loc = m - m_loc * (grid.nprow * grid.npcol - 1);
+ }
+
+ fst_row = iam * m_loc_fst;
+
+ if ( !(B = doubleMalloc_dist(m_loc )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+
+ //printf("initilisation B:");
+ for(int ii=0; ii<m_loc; ++ii){
+ B[ii] = b[ii+fst_row];
+ //printf(" B[%d]= %f ",ii,B[ii]);
+ }
+ //printf(" :: fin \n");
+ //fflush(stdout);
+
+
+ if ( !(berr = doubleMalloc_dist(nrhs )) ){
+ printf("probleme d allocation\n");
+ exit(1);
+ }
+ berr[0]=0.;
+
+ options.Fact = FACTORED; /* Indicate the factored form of A is supplied. */
+ //options.Equil = YES;
+ //options.Trans = TRANS;
+
+
+ ldb = m;
+ SuperLUmpiDISTDriver<R>::pgssvx(&options, &A, &ScalePermstruct, B, ldb, nrhs, &grid,
+ &LUstruct, &SOLVEstruct, berr, &stat, &info );
+
+ if(verbosity>3)
+ printf("Triangular solve: dgssvx() returns info %d\n", info);
+
+ if ( !(xtemp = doubleMalloc_dist(AA.n)) ){
+ printf("probleme d allocation de xtemp\n");
+ exit(1);
+ }
+
+
+ int disp[nprow*npcol];
+ MPI_Allgather(&fst_row, 1, MPI_INT, disp, 1, MPI_INT, grid.comm);
+
+ int recv[nprow*npcol];
+ MPI_Allgather(&m_loc, 1, MPI_INT, recv, 1, MPI_INT, grid.comm);
+
+ MPI_Allgatherv(B, m_loc, MPI_DOUBLE, xtemp, recv, disp, MPI_DOUBLE, grid.comm);
+
+ for(int ii= 0; ii< AA.n ; ii++)
+ x[ii] = xtemp[ii];
+
+ if(verbosity) cout << " x min max " << x.min() << " " <<x.max() << endl;
+
+ SUPERLU_FREE( xtemp );
+
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+
+
+ SUPERLU_FREE( B );
+ SUPERLU_FREE( berr );
+
+ PStatFree(&stat);
+
+ if(iam==0){
+ finishtime = clock();
+ timeused= (finishtime-starttime)/(1000 );
+ if(verbosity>1)
+ {
+
+
+ printf("=====================================================\n");
+ cout << "SuperLu_DIST: time solve step :: " << timeused << " ms" <<endl;
+ printf("=====================================================\n");
+ }
+ }
+ }
+
+ }
+
+ ~SolveSuperLUmpi() {
+ //int iam;
+ //iam = grid.iam;
+ if(iam < nprow*npcol){
+ if(verbosity>4)
+ cout << "~SolveSuperLUmpi double:" << endl;
+
+ if( matrixdist == assembled) {
+ //if( A.Store) Destroy_CompCol_Matrix_dist(&A);
+ //if( L.Store && U.Store ) {
+ Destroy_LU(n, &grid, &LUstruct);
+ ScalePermstructFree(&ScalePermstruct);
+ LUstructFree(&LUstruct);
+ //}
+ if ( options.SolveInitialized ) {
+ dSolveFinalize(&options, &SOLVEstruct);
+ }
+ }
+ else if( matrixdist == distributedglobal) {
+ Destroy_CompRowLoc_Matrix_dist(&A);
+
+ Destroy_LU(n, &grid, &LUstruct);
+ ScalePermstructFree(&ScalePermstruct);
+ LUstructFree(&LUstruct);
+
+ if ( options.SolveInitialized ) {
+ dSolveFinalize(&options, &SOLVEstruct);
+ }
+ }
+ else if( matrixdist == distributed) {
+ printf("in construction\n");
+ exit(1);
+ }
+ else{
+ printf("matrix choice for SuperLU_DIST is assembled, distributedglobal and distributed \n");
+ exit(1);
+ }
+ }
+ printf("Real superlu_gridexit(&grid), %d\n",iam);
+ superlu_gridexit(&grid);
+
+ }
+ void addMatMul(const KN_<R> & x, KN_<R> & Ax) const
+ {
+ ffassert(x.N()==Ax.N());
+ Ax += (const MatriceMorse<R> &) (*this) * x;
+ }
+
+};
+
+
+
+
+MatriceMorse<double>::VirtualSolver *
+BuildSolverSuperLUmpi(DCL_ARG_SPARSE_SOLVER(double,A))
+{
+ if(verbosity>9)
+ cout << " BuildSolverSuperLUmpi<double>" << endl;
+ return new SolveSuperLUmpi<double>(*A,ds.strategy,ds.tgv,ds.epsilon,ds.tol_pivot,ds.tol_pivot_sym,
+ ds.data_filename, ds.sparams, ds.perm_r, ds.perm_c, ds.commworld);
+}
+
+
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ };*/
++=======
++class Init { public:
++ Init();
++};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// the 2 default sparse solver double and complex
+DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
+//DefSparseSolver<Complex>::SparseMatSolver SparseMatSolver_C;
+// the default probleme solver
+TypeSolveMat::TSolveMat TypeSolveMatdefaultvalue=TypeSolveMat::defaultvalue;
+
+bool SetDefault()
+{
+ if(verbosity)
+ cout << " SetDefault sparse to default" << endl;
+ DefSparseSolver<double>::solver =SparseMatSolver_R;
+ //DefSparseSolver<Complex>::solver =SparseMatSolver_C;
+ TypeSolveMat::defaultvalue =TypeSolveMat::SparseSolver;
+
+ return false;
+}
+
+bool SetSuperLUmpi()
+{
+ if(verbosity)
+ cout << " SetDefault sparse solver to SuperLUmpi double" << endl;
+ DefSparseSolver<double>::solver =BuildSolverSuperLUmpi;
+ //DefSparseSolver<Complex>::solver =BuildSolverSuperLUmpi;
+ TypeSolveMat::defaultvalue = TypeSolveMatdefaultvalue;
+
+ return false;
+}
+
+
+
++<<<<<<< HEAD
+
+static void Load_Init()
++=======
++LOADINIT(Init);
++Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ SparseMatSolver_R= DefSparseSolver<double>::solver;
+ //SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+
+ if(verbosity>1)
+ cout << "\n Add: Real SuperLUdist, defaultsolver defaultsolverSuperLUdist" << endl;
+ TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+ DefSparseSolver<double>::solver =BuildSolverSuperLUmpi;
+ //DefSparseSolver<Complex>::solver =BuildSolverSuperLUmpi;
+ if(! Global.Find("defaultsolver").NotNull() )
+ Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
+ Global.Add("realdefaulttoSuperLUdist","(",new OneOperator0<bool>(SetSuperLUmpi));
+}
+
++<<<<<<< HEAD
+LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/real_pastix_FreeFem.cpp
index 760f525,967db35..13a67fd
--- a/examples++-mpi/real_pastix_FreeFem.cpp
+++ b/examples++-mpi/real_pastix_FreeFem.cpp
@@@ -243,7 -243,7 +243,7 @@@ void read_datafile_pastixff(const strin
}
// ATTENTION :: pastix_float_t
--// peut �tre soit un complex ou un reel cela depend de la maniere dont on a compiler pastix
++// peut �tre soit un complex ou un reel cela depend de la maniere dont on a compiler pastix
// CAS DOUBLE SEULEMENT
@@@ -360,7 -360,7 +360,7 @@@ public
Nrow = AA.n;
nnz = AA.nbcoef;
-- // Avant : on ecrit la transpos�e
++ // Avant : on ecrit la transpos�e
// AA.cl : indices des colonnes
// AA.lg : pointeurs des lignes
diff --cc examples++-mpi/real_pastix_FreeFem.cpp.orig
index 760f525,967db35..d2f84e8
--- a/examples++-mpi/real_pastix_FreeFem.cpp.orig
+++ b/examples++-mpi/real_pastix_FreeFem.cpp.orig
@@@ -668,9 -668,9 +668,15 @@@ BuildSolverpastix_real_mpi(DCL_ARG_SPAR
}
++<<<<<<< HEAD
+/* --FH: class Init { public:
+ Init();
+ };*/
++=======
+ class Init { public:
+ Init();
+ };
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
// the 2 default sparse solver double and complex
DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
@@@ -700,8 -700,8 +706,13 @@@ bool Setpastixmpi(
++<<<<<<< HEAD
+
+static void Load_Init()
++=======
+ LOADINIT(Init);
+ Init::Init()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
{
SparseMatSolver_R= DefSparseSolver<double>::solver;
@@@ -716,4 -716,3 +727,7 @@@
Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
Global.Add("realdefaulttopastix","(",new OneOperator0<bool>(Setpastixmpi));
}
++<<<<<<< HEAD
+ LOADFUNC(Load_Init)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-mpi/schwarz.edp.orig
index b0e4f77,0000000..c1b7b9c
mode 100644,000000..100644
--- a/examples++-mpi/schwarz.edp.orig
+++ b/examples++-mpi/schwarz.edp.orig
@@@ -1,62 -1,0 +1,133 @@@
++<<<<<<< HEAD
+load "schwarz"
+load "metis"
+load "utility"
+load "removeDOF"
+include "getARGV.idp"
+
+searchMethod = 1;
+
+macro minimalMesh()square(1, 1)// EOM
+macro generateTh(name)name = square(global, global, [x, y], label = l);// EOM
+macro grad(u)[dx(u), dy(u)]// EOM
+macro bbN(boundingMesh, overshoot, ThGlobal)
+ real[int] bb(4);
+ bb2d(bb, boundingMesh/*, intersection = possibleIntersection, offset = 2. * overlap / global*/);
+ bb(0) -= overshoot;
+ bb(1) += overshoot;
+ bb(2) -= overshoot;
+ bb(3) += overshoot;
+
+ ThGlobal = trunc(ThGlobal, (x >= bb(0) && x <= bb(1) && y >= bb(2) && y <= bb(3)));// EOM
+macro meshN()mesh// EOM
+macro intN()int2d// EOM
+macro measureN()area// EOM
+macro def(u)u// EOM
+macro init(u)u// EOM
+include "additional.idp"
+
+int overlap = getARGV("-overlap", 1);
+func Pk = P1;
+
+verbosity = getARGV("-v", 0);
+int s = getARGV("-split", 1);
+int global = getARGV("-global", 200);
+int solver = getARGV("-solver", 3); // 1: Additive Schwarz + CG, 2: RAS + GMRES, 3: GENEO + GMRES
+int i, j;
+int[int] l = [1, 2, 2, 2];
+
+mesh Th = minimalMesh;
+fespace Wh(Th, Pk);
+build(generateTh, Th, ThBorder, ThOverlap, s, D, numberIntersection, arrayIntersection, restrictionIntersection, Wh, Pk, mpiCommWorld)
+
+macro Varf(varfName, meshName, PhName)
+ varf varfName(u, v) = intN(meshName)((grad(u)' * grad(v))) + intN(meshName)(v) + on(1, u = 0.0);// EOM
+assemble(Mat, rhs, Wh, Th, ThBorder, Varf)
+
+dschwarz A(Mat, arrayIntersection, restrictionIntersection, scaling = D);
+
+if(mpisize > 1 && solver == 3) {
+ int[int] parm(1);
+ parm(0) = getARGV("-nu", 20);
+ macro EVproblem(varfName, meshName, PhName)
+ varf varfName(u, v) = intN(meshName)((grad(u)' * grad(v))) + on(1, u = 0.0);// EOM
+ EVproblem(vPbNoPen, Th, Ph)
+ matrix<real> noPen = vPbNoPen(Wh, Wh, solver = CG);
+ if(solver == 3) // standard GenEO, no need for RHS -> deduced from LHS (Neumann matrix)
+ attachCoarseOperator(mpiCommWorld, A, A = noPen, parameters = parm);
+}
+
+Wh<real> def(u); // this will be the solution
+
+DDM(A, u[], rhs, dim = getARGV("-gmres_restart", 60), iter = getARGV("-iter", 60), eps = getARGV("-eps", 1e-8), solver = solver);
+plotMPI(Th, u[], "Global solution", Pk, def, 3, 1)
++=======
++if ( mpisize != 2 ) {
++cout << " sorry number of processeur !=2 " << endl;
++exit(1);}
++verbosity=3;
++real pi=4*atan(1);
++int inside = 2;
++int outside = 1;
++border a(t=1,2){x=t;y=0;label=outside;};
++border b(t=0,1){x=2;y=t;label=outside;};
++border c(t=2,0){x=t ;y=1;label=outside;};
++border d(t=1,0){x = 1-t; y = t;label=inside;};
++border e(t=0, pi/2){ x= cos(t); y = sin(t);label=inside;};
++border e1(t=pi/2, 2*pi){ x= cos(t); y = sin(t);label=outside;};
++int n=4;
++mesh th,TH;
++
++if (mpirank == 0)
++ {
++ th = buildmesh( a(5*n) + b(5*n) + c(10*n) + d(5*n));
++ cout << " end th " << endl;
++// processor(1) << th ;
++// processor(1) >> TH;
++}
++else
++ {
++ TH = buildmesh ( e(5*n) + e1(25*n) );
++ cout << " end TH " << endl;
++// processor(0) << TH ;
++// processor(0) >> th;
++ }
++broadcast(processor(0),th);
++broadcast(processor(1),TH);
++
++
++
++fespace vh(th,P1);
++fespace VH(TH,P1);
++vh u=0,v; VH U,V;
++int i=0;
++
++problem PB(U,V,init=i,solver=Cholesky) =
++ int2d(TH)( dx(U)*dx(V)+dy(U)*dy(V) )
++ + int2d(TH)( -V) + on(inside,U = u) + on(outside,U= 0 ) ;
++problem pb(u,v,init=i,solver=Cholesky) =
++ int2d(th)( dx(u)*dx(v)+dy(u)*dy(v) )
++ + int2d(th)( -v) + on(inside ,u = U) + on(outside,u = 0 ) ;
++
++
++for ( i=0 ;i< 10; i++)
++{
++ cout << mpirank << " looP " << i << endl;
++ if (mpirank == 0)
++ {
++ PB;
++ processor(1) << U[];
++ processor(1) >> u[];
++ }
++ else
++ {
++ pb;
++ processor(0) >> U[];
++ processor(0) << u[];
++ }
++ // if (mpirank==0)
++ // plot(U,u,wait=true,ps="Uu"+i+".eps");
++};
++ if (mpirank==0)
++ plot(U,u,ps="Uu.eps");
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-tutorial/sparse-cmatrix.edp.orig
index 6cd3188,0000000..5e7aad5
mode 100644,000000..100644
--- a/examples++-tutorial/sparse-cmatrix.edp.orig
+++ b/examples++-tutorial/sparse-cmatrix.edp.orig
@@@ -1,156 -1,0 +1,162 @@@
+// sparse matrix test ---
+// example of the new matrix feature in version 1.40
+// -------------------------------------------------
++<<<<<<< HEAD
+for(int step=0; step <2; ++step)
+{
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+mesh TH = square(3,4);
+mesh th = square(2,3);
+mesh Th = square(4,4);
+
+complex ccc;
+ccc= 1;
+cout << ccc << endl;
+fespace VH(TH,P1);
+fespace Vh(th,P1);
+fespace Wh(Th,P1);
+
+matrix RB= interpolate(VH,Vh); // build interpolation matrix Vh->Vh
+matrix RBB= interpolate(Wh,Vh); // build interpolation matrix
+matrix<complex> B=RB;
+B = B*(1+2i);
+
+matrix<complex> BB=RBB;
+
+varf vA(u,v) = int2d(Th)(dx(u)*dx(v)+dy(u)*dy(v))+ int1d(Th)(u*v);
+matrix<complex> A=vA(Wh,Wh);
+Vh<complex> ml=0;
+cout << " ml " << ml[] << endl;
+varf vML(u,v) = int2d(th)(1.*v);
+ml[]=vML(0,Vh); // build the P1 mass lump of P1
+cout << ml[] << endl;
+matrix<complex> ML(ml[]); // matrix diagonal
+cout << "ML="<<ML << endl;
+cout << "B="<<B << endl;
+matrix<complex> BML=B*ML; // a faire
+matrix<complex> tB=B'; //'; transpose and conjugate
+cout << "tB=" << tB << endl;
+matrix<complex> MLtB=ML'*B'; //
+
+cout << "BML="<<BML << endl;
+cout << "MLtB=" << MLtB << endl;
+
+// WARNING if UMFPACK is not install
+// the UMFPACK solver is replace by LU
+// but LU need skyline matrix
+int typesolver=UMFPACK;
+if(HaveUMFPACK) typesolver=GMRES;
+ set(A,solver=typesolver); // set a solver
+
+VH<complex> uH=0;
+Vh<complex> uh=x+y+1i*(x-y);
+uH[]= B*uh[];
+Vh uHr = imag(uH);
+plot(uHr,wait=1);
+matrix<complex> BtA = BB'*A;//';
+matrix<complex> BtAB = BtA*BB;
+if(HaveUMFPACK)
+ set(BtAB,solver=UMFPACK);
+ else
+ set(BtAB,solver=GMRES);
+ Vh<complex> ff=1+1i;
+Vh<complex> xx;
+Vh xxr;
+cout << " ------ " << endl;
+
+xx[]=BtAB^-1*ff[];
+cout << " ------ " << endl;
+xx[]=BtAB^-1*ff[];
+cout << " ------ " << endl;
+xxr=imag(xx);
+plot(xxr, wait=1);
+
+{
+ int N=10;
+ complex [int,int] A(N,N);
+ complex [int] a(N),b(N),bb(N);
+ A =0;
+ for (int i=0;i<N;i++)
+ {
+ A(i,i)=1.+i;
+ if(i+1 < N) A(i,i+1)=-i-1i*i;
+ a[i]=i*(1.+2i);
+ }
+ b=A*a;
+
+ cout << " b =" << b << endl ;
+ cout << " a =" << a << endl ;
+ cout << " b'*b (hermissian product) = " << b'*b << endl; //';
+ cout << " a'*a = " << a'*a << endl;//';;
+ assert( abs(imag(b'*b)) <1e-5);//')));
+ cout << "xxxx\n";
+ matrix<complex> sparseA=A;
+
+ cout << sparseA << endl;
+ sparseA = 2*sparseA+sparseA;
+ sparseA = 4*sparseA+sparseA*(5+1i); // * 27
+ matrix<complex> sparseB=sparseA;//+sparseA+sparseA; ;
+ cout << sparseA << endl;
+ cout << sparseB << endl; // *81
+ cout << "sparseB = " << sparseB(0,0) << endl;
+ // ajoute version 2.0-2
+ sparseA=A;
+ verbosity=4;
+ if(HaveUMFPACK)
+ set(sparseA,solver=UMFPACK,tolpivot=1e-10,tolpivotsym=1e-9);
+ else
+ set(sparseA,solver=GMRES);
+ bb=sparseA^-1*a;
+ verbosity=1;
+ b = sparseA*bb;
+ b -= a;
+ cout << " nb coef sparseA " << sparseA.nbcoef << endl;
+ cout << " ||b.||_1 " << b.l1 << endl;
+ cout << " ||b.||_2 " << b.l2 << endl;
+ cout << " ||b.||_infty " << b.linfty << endl;
+ assert(b.l1 < 1e-10);
+}
+{// version 3.8
+ mesh Th=square(2,2);
+ fespace Xh(Th,P1);
+ varf vv(u,v)= int2d(Th)( ((2+1i)*u*v)')+int2d(Th)((3+2i)*v);//');
+ varf vr(u,v)= int2d(Th)( u*v);//');
+
+ matrix<complex> A=vv(Xh,Xh);
+ matrix Ar=vr(Xh,Xh);
+ complex[int] vc=vv(0,Xh);
+ real[int] vrr=vc.re,vii=vc.im;
+ vrr=vc.re;
+ vii=vc.im;
+ cout << "vc[0] = " <<vc[0] << " = " << vc.re[0] << " +i " << vc.im[0] <<endl;
+ cout << [ 1i, 1i]'*[ 1i, 1i] <<endl;//';
+ // real part un complex par of matrix .
+ Ar = A.re;
+ cout <<" A(0,0) = " << A(0,0) << " ";
+ cout << " A.re(0.0) = " << Ar(0,0) << " " ;
+ Ar = A.im;
+ cout << " A.im(0.0) = " << Ar(0,0) << endl ;
+
+
+ macro Grada(u) [ phia*dx(u) + phiax*u ,dy(u) ]// ...
+ func phia = exp(-2i*pi*x);
+ func phiax = -2i*pi*exp(-2i*pi*x);
+
+ varf va(u,v)= int2d(Th)( Grada(v)'*Grada(u) ) ;//');
+ A = va(Xh,Xh);
+ matrix<complex> At=A';
+ cout << A(1,2)' << " == " << At(2,1) << endl;
+ A = A+ (-1)*At;
+ cout << A << endl;
+ // copy and initialisation of complex matric with real matrix.
+ A = Ar;
+ matrix<complex> Ac=Ar;
+
+
+
+}
- }
++<<<<<<< HEAD
++}
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc examples++-tutorial/sparse-matrix.edp.orig
index 23e4ead,0000000..4d83f85
mode 100644,000000..100644
--- a/examples++-tutorial/sparse-matrix.edp.orig
+++ b/examples++-tutorial/sparse-matrix.edp.orig
@@@ -1,244 -1,0 +1,250 @@@
+// sparse matrix test ---
+// example of the new matrix feature in version 1.40
+// -------------------------------------------------
++<<<<<<< HEAD
+for(int step=0; step<2; ++step) // make to time the test to find memoire leak ..
+{
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+mesh TH = square(3,4);
+mesh th = square(2,3);
+mesh Th = square(4,4);
+
+
+fespace VH(TH,P1);
+fespace Vh(th,P1);
+fespace Wh(Th,P1);
+
+matrix B= interpolate(VH,Vh); // build interpolation matrix Vh->Vh
+matrix BB= interpolate(Wh,Vh); // build interpolation matrix
+varf vA(u,v) = int2d(Th)(dx(u)*dx(v)+dy(u)*dy(v))+ int1d(Th)(u*v);
+matrix A=vA(Wh,Wh);
+
+
+
+Vh ml=0;
+varf vML(u,v) = int2d(th)(1*v);
+ml[]=vML(0,Vh); // build the P1 mass lump of P1
+cout << ml[] << endl;
+matrix ML(ml[]); // matrix diagonal
+cout << "ML="<<ML << endl;
+cout << "B="<<B << endl;
+matrix BML=B*ML;
+matrix tB=B'; //'; transpose
+//cout << "tB=" << tB << endl;
+matrix MLtB=ML'*B'; //
+
+//cout << "BML="<<BML << endl;
+//cout << "MLtB=" << MLtB << endl;
+
+// WARNING if UMFPACK is not install
+// the UMFPACK solver is replace by LU
+// but LU need skyline matrix
+if(HaveUMFPACK)
+ set(A,solver=UMFPACK); // set a solver
+ else
+ set(A,solver=GMRES); // set a solver
+VH uH=0;
+Vh uh=x+y;
+uH[]= B*uh[];
+plot(uH,wait=1);
+matrix BtA = BB'*A;//';
+matrix BtAB = BtA*BB;
+if(HaveUMFPACK)
+ set(BtAB,solver=UMFPACK);
+ else
+ set(BtAB,solver=GMRES);
+Vh ff=1;
+Vh xx;
+cout << " ------ " << xx[].n << " = " << BtAB.n << "x" << BtAB.m << " " << ff[].n << endl;
+
+xx[]=BtAB^-1*ff[];
+cout << " ------ " << endl;
+xx[]=BtAB^-1*ff[];
+cout << " ------ " << endl;
+plot(xx, wait=1);
+
+{
+ int N=10;
+ real [int,int] A(N,N);
+ real [int] a(N),b(N),c(N);
+ int [int] II(N);
+ int [int] JJ(N);
+ int [int] III(N);
+ int [int] JJJ(N);
+ for (int i=0;i<N;i++)
+ {
+ II(i)=i*2;
+ III(i)=(i*1023)%N;
+ JJJ(i)=(i*7)%N;
+ JJ(i)=20-i;
+ }
+ A =0;
+ for (int i=0;i<N;i++)
+ {
+ A(i,i)=1+i;
+ if(i+1 < N) A(i,i+1)=-i;
+ a[i]=i;
+ }
+ b=a(III); // b(i)=a(iii(i))
+ c(III)=a; // c(III(i)) = a(i)
+ cout << " III = " << III << endl;
+ cout << " a(III) " << b << endl;
+ cout << " a(III^1) = " << c << endl;
+ for (int i=0;i<N;i++)
+ assert( int(c[int(b[i])]) == i);
+
+ matrix sA=A;
+ {
+ {
+ ofstream ff("A.matrix");
+ ff << sA;
+ }
+ matrix ssA;
+ {
+ ifstream ff("A.matrix");
+ ff >> ssA;
+ ssA = (1.)*sA+ (-1.)*ssA;
+ cout << ssA << endl;
+ }
+ }
+
+ matrix tAA=sA+sA';//';
+ matrix ttAA=sA'+sA;//';
+ // matrix tttAA=sA'-sA;
+ // matrix ttAA=sA'-sA;
+ A += 2*a*a'; //'// produit tensoriel
+ matrix A1= A(II^-1,JJ^-1); // do A1(II(i),JJ(j)) = A(i),j) $
+ matrix A2= A(III,JJJ); // do $A2(i,j) = A(III(i),JJJ(i)) $
+ matrix sA1= sA(II^-1,JJ^-1); // do A1(II(i),JJ(i)) = A(
+ matrix sA2= sA(III,JJJ); // do A = A
+
+ matrix A0 = (a*a')(II^-1,JJ^-1); //');
+ matrix A3 = (a*a')(III,JJJ);//');
+
+ cout << " ------------------- " << endl;
+ // cout << " A = " << A << endl;
+ // cout << " A1 = " << A1 <<endl;
+ cout << " 8,9 -> " <<II[8] << " " << JJ[9] <<" " << A(9,8)<< " " << A1(II[9],JJ[8]) << endl;
+ assert(A(9,1) == 2*a[9]*a[1]);
+
+ for (int i9=0;i9<N;++i9)
+ for (int j9=0;j9<N;++j9)
+ {
+
+ if( abs(A(j9,i9))> 0.01)
+ assert(A1(II[j9],JJ[i9]) == A(j9,i9));
+ if( abs(A(III(j9),JJJ(i9))) > 0.01)
+ assert(A2(j9,i9) == A(III(j9),JJJ(i9) )) ;
+ // cout << " i9,j9 -> " <<II[i9] << " " << JJ[j9] <<endl;
+ if( abs(a[i9]*a[j9])> 0.01)
+ assert(A0(II[i9],JJ[j9]) == a[i9]*a[j9]);
+ if( abs(a[III[i9]]*a[JJJ[j9]])> 0.01)
+ assert(A3(i9,j9) == a[III[i9]]*a[JJJ[j9]]);
+ }
+ b=A*a;
+ c=-9;
+ cout << "xxxx\n";
+ matrix sparseA=A;
+ //cout << sparseA << endl;
+ sparseA = 2*sparseA+sparseA;
+ sparseA = 4*sparseA+sparseA*5; // * 27
+ matrix sparseB=sparseA+sparseA+sparseA; ;
+ //cout << sparseA << endl;
+ //cout << sparseB << endl; // *81
+ cout << "sparseB = " << sparseB(0,0) << endl;
+
+ cout << " -------- block matrix \n " << endl;
+ matrix B = [ [sparseA, 0 , sparseA ],
+ [ 0, sparseA , 0 ] ,
+ [0, 0, sparseB' ]];//']];
+ matrix B2 = [ [sparseA], [sparseA]];
+
+ assert( B2.n == sparseA.n*2);
+ assert( B2.m == sparseA.m);
+
+ matrix B1 = [ [sparseA, sparseA] ];
+ assert( B1.m == sparseA.m*2); // FH. bug before version 2.11-4 (10/01/2007)
+ assert( B1.n == sparseA.n);
+
+
+ real[int] x([a,b,c]); // construct the block vector x form a,b,c,
+ // where the size is sum of size of a,b,c,
+ x=[a,b,c]; // set x to to the block vector (the vector x is resize if it necessary
+ cout << " abc =" << a[2] << " " << b[3] << " "<< c[4] << endl;
+ cout << " xxx =" << x[2] << " " << x[3+N] << " "<< x[4+N*2] << endl;
+ x = x*10;
+ [a,b,c]=x; // set the block vector a,b,c from concecutive part of x;
+ cout << " abc*10 == " << a[2] << " " << b[3] << " "<< c[4] << endl;
+
+
+ // remark the size of sum of size must be equal to the size of x.
+ //cout << " B = " << B << endl;
+ cout << B(8,29) << " === " << sparseA(8,9) << endl;
+ cout << B(28,27)
+ << " === " << sparseB(7,8) << endl;
+ B(8,29)=100; // change the value an existing coef
+ cout << " B(8,29) " << B(8,29) << endl;
+ cout << " -------- block matrix \n " << endl;
+}
+// build FE matrice with differente meshes (here 3)
+varf vM(u,v)=int1d(Th,qforder=1)(u*v);
+matrix MM=vM(Vh,VH);
+//cout << MM << endl;
+Vh unVh=0,wVh=0;
+VH unVH=0,wVH=0;
+unVh[]=1;
+unVH[]=1;
+wVh[] = MM' * unVH[] ; //'
+wVH[] = MM * unVh[] ;
+
+//cout << "wWh : " << wVh[] << endl;
+//cout <<" wVH : " << wVH[] << endl;
+// array of matrix v2.4-1
+cout << " array of matrix \n" ;
+matrix[int] aM(10);
+aM[0]= MM;
+aM[3]= MM;
+aM[9]= MM;
+// aM.resize(4);
+// aM.resize(10); bug on debian ? FH
+
+// add version 2.17 ---
+{
+ real[int] coef([1,2,3,5,6]);
+ int[int] lg( [1,3,6,9,100]);
+ int[int] cl( [1,4,9,0,0]);
+
+ // a diagonal matrix
+ matrix A=[coef];
+ cout << " A = " << A << endl;
+ // a raw matrix
+ matrix B=[lg,cl,coef];
+ cout << " B = " << B << endl;
+ [lg,cl,coef] = A;
+ cout<< " lg : " << lg << endl;
+ cout << " cl : " << cl << endl;
+ cout << " coef = "<< coef << endl;
+
+}
+
+// version 3.1-1
+cout << MM << endl;
+MM.resize(10,100);
+cout << MM << endl;
+
+{ // test renumbering of sub mesh ..
+ func Pk=P2;
+ int[int] n2ok(1);
+ mesh ThC = trunc(Th,x < 0.5,new2old=n2ok);
+ fespace VFh(Th,Pk);
+ fespace VCh(ThC,Pk);
+ verbosity= 100;
+ int[int] n2o=restrict(VCh,VFh,n2ok);
+ cout << " n2o " << n2o << endl;
+
+}
- }
++<<<<<<< HEAD
++}
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc src/bamg/Makefile.am.orig
index a834730,0000000..198d57e
mode 100644,000000..100644
--- a/src/bamg/Makefile.am.orig
+++ b/src/bamg/Makefile.am.orig
@@@ -1,22 -1,0 +1,34 @@@
+# Makefile using Automake + Autoconf
+# ----------------------------------
+# $Id$
+CXXLD=$(STATICTOOL) $(CXX)
+
+bin_PROGRAMS=$(BAMGPROG)
+EXTRA_PROGRAMS=bamg cvmsh2 #drawbdmesh
+bamg_SOURCES=bamg.cpp global.cpp
++<<<<<<< HEAD
+bamg_DEPENDENCIES=../fflib/Mesh2.o ../fflib/MeshDraw.o ../fflib/MeshGeom.o ../fflib/MeshQuad.o ../fflib/MeshRead.o ../fflib/MeshWrite.o ../fflib/Meshio.o ../fflib/Metric.o ../fflib/QuadTree.o ../fflib/R2.o ../fflib/SetOfE4.o ../fflib/write_hdf5.o ../fflib/write_xdmf.o
+
+cvmsh2_SOURCES=cvmsh2.cpp global.cpp
+cvmsh2_DEPENDENCIES=../fflib/Mesh2.o ../fflib/MeshDraw.o ../fflib/MeshGeom.o ../fflib/MeshQuad.o ../fflib/MeshRead.o ../fflib/MeshWrite.o ../fflib/Meshio.o ../fflib/Metric.o ../fflib/QuadTree.o ../fflib/R2.o ../fflib/SetOfE4.o ../fflib/write_hdf5.o ../fflib/write_xdmf.o
++=======
++bamg_DEPENDENCIES=../fflib/Mesh2.o ../fflib/MeshDraw.o ../fflib/MeshGeom.o ../fflib/MeshQuad.o ../fflib/MeshRead.o ../fflib/MeshWrite.o ../fflib/Meshio.o ../fflib/Metric.o ../fflib/QuadTree.o ../fflib/R2.o ../fflib/SetOfE4.o
++
++cvmsh2_SOURCES=cvmsh2.cpp global.cpp
++cvmsh2_DEPENDENCIES=../fflib/Mesh2.o ../fflib/MeshDraw.o ../fflib/MeshGeom.o ../fflib/MeshQuad.o ../fflib/MeshRead.o ../fflib/MeshWrite.o ../fflib/Meshio.o ../fflib/Metric.o ../fflib/QuadTree.o ../fflib/R2.o ../fflib/SetOfE4.o
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+#EXTRA_drawbdmesh_SOURCES= # ../Graphics/Xrgraph.cpp ../Graphics/Pcrgraph.cpp
+#drawbdmesh_DEPENDENCIES=../fflib/libff.a @STD_GRAPH_OBJ@
+#drawbdmesh_SOURCES= drawbdmesh.cpp
+#drawbdmesh_LDADD = @STD_GRAPH_OBJ@ $(LDADD) @STD_LIBS@ @LIBSNOCONSOLE@
+
++<<<<<<< HEAD
+LDADD= ../fflib/Mesh2.o ../fflib/MeshDraw.o ../fflib/MeshGeom.o ../fflib/MeshQuad.o ../fflib/MeshRead.o ../fflib/MeshWrite.o ../fflib/Meshio.o ../fflib/Metric.o ../fflib/QuadTree.o ../fflib/R2.o ../fflib/SetOfE4.o ../fflib/write_hdf5.o ../fflib/write_xdmf.o
+AM_CPPFLAGS=-I$(srcdir)/../fflib -I$(srcdir)/../bamglib -I$(srcdir)/../Graphics $(HDF5_CPPFLAGS)
++=======
++LDADD= ../fflib/Mesh2.o ../fflib/MeshDraw.o ../fflib/MeshGeom.o ../fflib/MeshQuad.o ../fflib/MeshRead.o ../fflib/MeshWrite.o ../fflib/Meshio.o ../fflib/Metric.o ../fflib/QuadTree.o ../fflib/R2.o ../fflib/SetOfE4.o
++AM_CPPFLAGS=-I$(srcdir)/../fflib -I$(srcdir)/../bamglib -I$(srcdir)/../Graphics
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+
diff --cc src/bamglib/Makefile.am.orig
index cd78546,0000000..21babce
mode 100644,000000..100644
--- a/src/bamglib/Makefile.am.orig
+++ b/src/bamglib/Makefile.am.orig
@@@ -1,11 -1,0 +1,15 @@@
+# Makefile using Automake + Autoconf
+# ----------------------------------
+# $Id$
+
+# This is not compiled as a separate library because its
+# interconnections with other libraries have not been solved.
+
+EXTRA_DIST=Mesh2.cpp Mesh2.h MeshDraw.cpp MeshGeom.cpp Meshgibbs.cpp \
+Meshio.cpp Meshio.h MeshQuad.cpp MeshRead.cpp meshtype.h MeshWrite.cpp \
+Metric.cpp Metric.h QuadTree.cpp QuadTree.h R2.cpp R2.h SetOfE4.cpp \
++<<<<<<< HEAD
+SetOfE4.h write_hdf5.cpp write_hdf5.hpp write_xdmf.cpp write_xdmf.hpp
++=======
++SetOfE4.h
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
diff --cc src/bamglib/Mesh2.cpp
index c8bf3f2,fef1ad0..b8c1094
--- a/src/bamglib/Mesh2.cpp
+++ b/src/bamglib/Mesh2.cpp
@@@ -2501,7 -2501,7 +2501,7 @@@ void Triangles::Insert(
quadtree->Add(*v0);
quadtree->Add(*v1);
-- // on ajoute les sommets un � un
++ // on ajoute les sommets un � un
Int4 NbSwap=0;
time1=CPUtime();
@@@ -2680,7 -2680,7 +2680,7 @@@ void Triangles::FindSubDomain(int OutSi
Triangle * tc = HeapTriangle[i]; // triangle courant
if( ! tc->Locked(na)) // arete non frontiere
{
-- Triangle * ta = tc->TriangleAdj(na) ; // n� triangle adjacent
++ Triangle * ta = tc->TriangleAdj(na) ; // n� triangle adjacent
if (ta->link == 0 ) // non deja chainer => on enpile
{
i++;
diff --cc src/bamglib/Mesh2.cpp.orig
index c8bf3f2,fef1ad0..7960975
--- a/src/bamglib/Mesh2.cpp.orig
+++ b/src/bamglib/Mesh2.cpp.orig
@@@ -97,7 -97,7 +97,11 @@@ Int4 AGoodNumberPrimeWith(Int4 n
}
class Triangles;
++<<<<<<< HEAD
+void MeshError(int Err,const Triangles *Th){
++=======
+ void MeshError(int Err,Triangles *Th){
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
cerr << " Fatal error in the meshgenerator " << Err << endl ;
#ifdef NOTFREEFEM
exit(1);
@@@ -4038,7 -4038,7 +4042,11 @@@ Edge** Triangles::MakeGeometricalEdgeTo
return e;
}
++<<<<<<< HEAD
+void Triangles::clear()
++=======
+ Triangles::~Triangles()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
{
assert(NbRef<=0);
if (CurrentTh == this) CurrentTh=0;
diff --cc src/bamglib/Mesh2.h.orig
index c842357,0000000..26000be
mode 100644,000000..100644
--- a/src/bamglib/Mesh2.h.orig
+++ b/src/bamglib/Mesh2.h.orig
@@@ -1,1509 -1,0 +1,1536 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdlib.h>
+#include <math.h>
+#include <limits.h>
+#include <time.h>
+#if (defined(unix) || defined(__unix)) && !defined(__AIX)
+#define SYSTIMES
+#include <sys/times.h>
+#include <unistd.h>
+#endif
+#ifdef DRAWING
+#include "rgraph.hpp"
+#endif
+
+extern long verbosity;
+extern int SHOW;
+#include "meshtype.h"
+
+#include "error.hpp"
+
+
+#include "R2.h"
+
+namespace bamg {
+
+
+
+const double Pi = 3.14159265358979323846264338328;
+const float fPi = 3.14159265358979323846264338328;
+
+
+class MeshIstream;
+class OFortranUnFormattedFile;
+class IFortranUnFormattedFile;
+
+extern int hinterpole;
+
+
+typedef P2<Icoor1,Icoor2> I2;
+
+inline int BinaryRand(){
+#ifdef RAND_MAX
+ const long HalfRandMax = RAND_MAX/2;
+ return rand() <HalfRandMax;
+#else
+ return rand() & 16384; // 2^14 (for sun because RAND_MAX is not def in stdlib.h)
+#endif
+
+}
+typedef P2<Real8,Real8> R2;
+typedef P2xP2<Int2,Int4> I2xI2;
+typedef P2<Real4,Real8> R2xR2;
+
+}
+
+#include "Metric.h"
+
+namespace bamg {
+inline float OppositeAngle(float a)
+ {return a<0 ? fPi + a :a - fPi ;}
+inline double OppositeAngle(double a)
+ {return a<0 ? Pi + a :a - Pi ;}
+
+#ifdef DRAWING
+extern Real4 xGrafCoef,yGrafCoef,xGrafOffSet,yGrafOffSet;
+extern R2 GrafPMin,GrafPMax;
+extern Real8 Grafh;
+#endif
+
+Icoor2 inline det(const I2 &a,const I2 & b,const I2 &c)
+{
+ Icoor2 bax = b.x - a.x ,bay = b.y - a.y;
+ Icoor2 cax = c.x - a.x ,cay = c.y - a.y;
+ return bax*cay - bay*cax;}
+
+
+
+// def de numerotation dans un triangles
+static const Int2 VerticesOfTriangularEdge[3][2] = {{1,2},{2,0},{0,1}};
+static const Int2 EdgesVertexTriangle[3][2] = {{1,2},{2,0},{0,1}};
+static const Int2 OppositeVertex[3] = {0,1,2};
+static const Int2 OppositeEdge[3] = {0,1,2};
+static const Int2 NextEdge[3] = {1,2,0};
+static const Int2 PreviousEdge[3] = {2,0,1};
+static const Int2 NextVertex[3] = {1,2,0};
+static const Int2 PreviousVertex[3] = {2,0,1};
+
+Int4 AGoodNumberPrimeWith(Int4 n);
+
+// remark all the angle are in radian beetwen [-Pi,Pi]
+
+
+class Geometry;
+//static Geometry *NULLGeometry=0;
+class Triangles;
+class Triangle;
+class QuadTree;
+class GeometricalEdge;
+class VertexOnGeom;
+class VertexOnEdge;
+/////////////////////////////////////////////////////////////////////////////////////
+const int IsVertexOnGeom = 8;
+const int IsVertexOnVertex = 16;
+const int IsVertexOnEdge = 32;
+/////////////////////////////////////////////////////////////////////////////////////
+#ifndef NOTFREEFEM
+class ErrorMesh : public Error
+{
+public:
++<<<<<<< HEAD
+ const Triangles *Th;
+ ErrorMesh(const char * Text,int l,const Triangles * TTh=0, const char *t2="") :
++=======
++ Triangles *Th;
++ ErrorMesh(const char * Text,int l,Triangles * TTh=0, const char *t2="") :
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ Error(MESH_ERROR,"Meshing error: ",Text,"\n number : ",l,", ",t2),Th(TTh) {}
+};
+#endif
+
+class Direction { //
+ private:
+ Icoor1 dir;
+ public:
+ Direction(): dir(MaxICoor){}; // no direction set
+ Direction(Icoor1 i,Icoor1 j) { Icoor2 n2 = 2*(Abs(i)+Abs(j));
+ Icoor2 r = MaxICoor* (Icoor2) i;
+ Icoor1 r1 = (Icoor1) (2*(r/ n2)); // odd number
+ dir = (j>0) ? r1 : r1+1; // odd -> j>0 even -> j<0
+ }
+ int sens( Icoor1 i,Icoor1 j) { int r =1;
+ if (dir!= MaxICoor) {
+ Icoor2 x(dir/2),y1(MaxICoor/2-Abs(x)),y(dir%2?-y1:y1);
+ r = (x*i + y*j) >=0;}
+ return r;}
+#ifdef DRAWING
+ void Draw() {
+ if (dir!= MaxICoor) {
+ Icoor2 x(dir/2),y1(MaxICoor/2-Abs(x)),y(dir%2?-y1:y1);
+ R2 D(x,y);
+ double eps = Grafh/Norme2(D)/20;
+ D = D*eps;
+ rmoveto(D.x,D.y);
+ }
+ }
+#endif
+
+
+
+
+};
+/////////////////////////////////////////////////////////////////////////////////////
+class Vertex {public:
+ I2 i; // allow to use i.x, and i.y in long int (beware of scale and centering)
+ R2 r; // allow to use r.x, and r.y in double
+ Metric m;
+ Int4 ReferenceNumber;
+ Direction DirOfSearch;
+ union {
+ Triangle * t; // one triangle which contained the vertex
+ Int4 color;
+ Vertex * to;// use in geometry Vertex to now the Mesh Vertex associed
+ VertexOnGeom * on; // if vint 8; // set with Triangles::SetVertexFieldOn()
+ Vertex * onbv; // if vint == 16 on Background vertex Triangles::SetVertexFieldOnBTh()
+ VertexOnEdge * onbe; // if vint == 32 on Background edge
+ };
+ Int1 vint; // the vertex number in triangle; varies between 0 and 2 in t
+ operator I2 () const {return i;} // operator de cast
+ operator const R2 & () const {return r;}// operator de cast
+// operator R2 & () {return r;}// operator de cast
+ Real8 operator()(R2 x) const { return m(x);}
+ operator Metric () const {return m;}// operator de cast
+ Int4 Optim(int = 1,int =0);
+ // Vertex(){}
+ // ~Vertex(){}
+ Real8 Smoothing(Triangles & ,const Triangles & ,Triangle * & ,Real8 =1);
+ int ref() const { return ReferenceNumber;}
+
+ friend ostream& operator <<(ostream& f, const Vertex & v)
+ {f << "(" << v.i << "," << v.r << MatVVP2x2(v.m) << ")" ; return f;}
+ inline void Set(const Vertex & rec,const Triangles &,Triangles &);
+
+#ifdef DRAWING
+ void Draw(Int4 =-1) const ;
+ void MoveTo() const { rmoveto(r.x,r.y); }
+ void LineTo() const { rlineto(r.x,r.y); }
+#endif
+};
+
+double QuadQuality(const Vertex &,const Vertex &,const Vertex &,const Vertex &);
+
+// extern Vertex *Meshend , *Meshbegin;
+
+/////////////////////////////////////////////////////////////////////////////////////
+class TriangleAdjacent {
+ friend ostream& operator <<(ostream& f, const TriangleAdjacent & ta)
+ {f << "{" << ta.t << "," << ((int) ta.a) << "}" ;
+ return f;}
+
+public:
+ Triangle * t; // le triangle
+ int a; // le numero de l arete
+
+ TriangleAdjacent(Triangle * tt,int aa): t(tt),a(aa &3) {};
+ TriangleAdjacent() {};
+
+ operator Triangle * () const {return t;}
+ operator Triangle & () const {return *t;}
+ operator int() const {return a;}
+ TriangleAdjacent & operator++()
+ {
+ a= NextEdge[a];
+ return *this;}
+ TriangleAdjacent operator--()
+ {
+ a= PreviousEdge[a];
+ return *this;}
+ inline TriangleAdjacent Adj() const ;
+ int swap();
+ inline void SetAdj2(const TriangleAdjacent& , int =0);
+ inline Vertex * EdgeVertex(const int &) const ;
+ inline Vertex * OppositeVertex() const ;
+ inline Icoor2 & det() const;
+ inline int Locked() const ;
+ inline int GetAllFlag_UnSwap() const ;
+ inline void SetLock();
+ inline int MarkUnSwap() const;
+ inline void SetMarkUnSwap();
+ inline void SetCracked();
+ inline int Cracked() const ;
+};// end of Vertex class
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+class Edge { public:
+ Vertex * v[2];
+ Int4 ref;
+ GeometricalEdge * on;
+ Vertex & operator[](int i){return *v[i];};
+ Vertex * operator()(int i){return v[i];};
+
+ void ReNumbering(Vertex *vb,Vertex *ve, Int4 *renu)
+ {
+ if (v[0] >=vb && v[0] <ve) v[0] = vb + renu[v[0]-vb];
+ if (v[1] >=vb && v[1] <ve) v[1] = vb + renu[v[1]-vb];
+ }
+
+ const Vertex & operator[](int i) const { return *v[i];};
+ R2 operator()(double t) const; // return the point
+ // on the curve edge a t in [0:1]
+ Edge * adj[2]; // the 2 adj edges if on the same curve
+ int Intersection(const Edge & e) const {
+ if (!(adj[0]==&e || adj[1]==&e))
+ cerr << "Bug : Intersection " << (void*) &e << " "
+ << adj[0] << " " << adj[1] << endl;
+ assert(adj[0]==&e || adj[1]==&e);
+ return adj[0]==&e ? 0 : 1;}
+ Real8 MetricLength() const ;
+ inline void Set(const Triangles &,Int4,Triangles &);
+
+#ifdef DRAWING
+ void Draw(Int4 = -1) const ;
+#endif
+}; // end of Edge class
+
+/////////////////////////////////////////////////////////////////////////////////////
+class GeometricalVertex :public Vertex {
+public:
+ int cas;
+ friend class Geometry;
+ GeometricalVertex * link; // link all the same GeometricalVertex circular (Crack)
+ int Corner() const {return cas&4;}
+ int Required()const {return cas&6;}// a corner is required
+ void SetCorner(){ cas |= 4;}
+ void SetRequired(){ cas |= 2;}
+ void Set(){cas=0;}
+ void Set(const Vertex & v)
+ { // add for bug in clang++ compile FH very strang and hard ...
+ i=v.i;
+ r=v.r;
+ m=v.m;
+ t=v.t;
+ vint=v.vint;
+ }
+ GeometricalVertex() :cas(0), link(this) {};
+ GeometricalVertex * The() { assert(link); return link;}// return a unique vertices
+ int IsThe() const { return link == this;}
+
+inline void Set(const GeometricalVertex & rec,const Geometry & Gh ,const Geometry & GhNew);
+ inline friend ostream& operator <<(ostream& f, const GeometricalVertex & s)
+ { f << s.r << "," << s.cas << ".";return f; }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////
+class GeometricalEdge {
+ public:
+ GeometricalVertex * v[2];
+ Int4 ref;
+ Int4 CurveNumber;
+ R2 tg[2]; // the 2 tangente
+ // if tg[0] =0 => no continuite
+ GeometricalEdge * Adj [2];
+ int SensAdj[2];
+// private:
+ int flag ;
+ public:
+ GeometricalEdge * link; // if Cracked() or Equi()
+
+// end of data
+
+ GeometricalVertex & operator[](int i){return *v[i];};
+ const GeometricalVertex & operator[](int i) const { return *v[i];};
+ GeometricalVertex * operator()(int i){return v[i];};
+ // inline void Set(const Geometry &,Int4,Geometry &);
+
+ R2 F(Real8 theta) const ; // parametrization of the curve edge
+ Real8 R1tg(Real8 theta,R2 &t) const ; // 1/radius of curvature + tangente
+ int Cracked() const {return flag & 1;}
+ int Dup() const { return flag & 32;}
+ int Equi()const {return flag & 2;}
+ int ReverseEqui()const {return flag & 128;}
+ int TgA()const {return flag &4;}
+ int TgB()const {return flag &8;}
+ int Tg(int i) const{return i==0 ? TgA() : TgB();}
+ int Mark()const {return flag &16;}
+ int Required() { return flag & 64;}
+ void SetCracked() { flag |= 1;}
+ void SetDup() { flag |= 32;} // not a real edge
+ void SetEqui() { flag |= 2;}
+ void SetTgA() { flag|=4;}
+ void SetTgB() { flag|=8;}
+ void SetMark() { flag|=16;}
+ void SetUnMark() { flag &= 1007 /* 1023-16*/;}
+ void SetRequired() { flag |= 64;}
+ void SetReverseEqui() {flag |= 128;}
+
+ inline void Set(const GeometricalEdge & rec,const Geometry & Th ,Geometry & ThNew);
+
+#ifdef DRAWING
+ void Draw(Int4 =-1);
+#endif
+
+};
+
+class Curve {public:
+ GeometricalEdge * be,*ee; // begin et end edge
+ int kb,ke; // begin vetex and end vertex
+ Curve *next; // next curve equi to this
+ bool master; // true => of equi curve point on this curve
+ inline void Set(const Curve & rec,const Geometry & Th ,Geometry & ThNew);
+ Curve() : be(0),ee(0),kb(0),ke(0),next(0),master(true) {}
+ void Reverse() { Exchange(be,ee); Exchange(kb,ke);} // revese the sens of the curse
+};
+
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+class Triangle {
+ friend class TriangleAdjacent;
+ friend ostream& operator <<(ostream& f, const Triangle & ta);
+
+
+ private: // les arete sont opposes a un sommet
+ Vertex * ns [3]; // 3 vertices if t is triangle, t[i] allowed by access function, (*t)[i] if pointer
+ Triangle * at [3]; // nu triangle adjacent
+ Int1 aa[3]; // les nu des arete dans le triangles (mod 4)
+ public:
+ Icoor2 det; // determinant du triangle (2 fois l aire des vertices entieres)
+ union {
+ Triangle * link ;
+ Int4 color;
+ };
+ void SetDet() {
+ if(ns[0] && ns[1] && ns[2]) det = bamg::det(*ns[0],*ns[1],*ns[2]);
+ else det = -1; }
+ Triangle() {}
+ Triangle(Triangles *Th,Int4 i,Int4 j,Int4 k);
+ Triangle(Vertex *v0,Vertex *v1,Vertex *v2);
+ inline void Set(const Triangle &,const Triangles &,Triangles &);
+ inline int In(Vertex *v) const { return ns[0]==v || ns[1]==v || ns[2]==v ;}
+ TriangleAdjacent FindBoundaryEdge(int ) const;
+
+ void ReNumbering(Triangle *tb,Triangle *te, Int4 *renu)
+ {
+ if (link >=tb && link <te) link = tb + renu[link -tb];
+ if (at[0] >=tb && at[0] <te) at[0] = tb + renu[at[0]-tb];
+ if (at[1] >=tb && at[1] <te) at[1] = tb + renu[at[1]-tb];
+ if (at[2] >=tb && at[2] <te) at[2] = tb + renu[at[2]-tb];
+ }
+ void ReNumbering(Vertex *vb,Vertex *ve, Int4 *renu)
+ {
+ if (ns[0] >=vb && ns[0] <ve) ns[0] = vb + renu[ns[0]-vb];
+ if (ns[1] >=vb && ns[1] <ve) ns[1] = vb + renu[ns[1]-vb];
+ if (ns[2] >=vb && ns[2] <ve) ns[2] = vb + renu[ns[2]-vb];
+ }
+
+
+ const Vertex & operator[](int i) const {return *ns[i];};
+ Vertex & operator[](int i) {return *ns[i];};
+
+ const Vertex * operator()(int i) const {return ns[i];};
+ Vertex * & operator()(int i) {return ns[i];};
+
+ TriangleAdjacent Adj(int i) const // triangle adjacent + arete
+ { return TriangleAdjacent(at[i],aa[i]&3);};
+
+ Triangle * TriangleAdj(int i) const
+ {return at[i&3];} // triangle adjacent + arete
+ Int1 NuEdgeTriangleAdj(int i) const
+ {return aa[i&3]&3;} // Number of the adjacent edge in adj tria
+
+ inline Real4 qualite() ;
+
+
+ void SetAdjAdj(Int1 a)
+ { a &= 3;
+ Triangle *tt=at[a];
+ aa [a] &= 55; // remove MarkUnSwap
+ Int1 aatt = aa[a] & 3;
+ if(tt){
+ tt->at[aatt]=this;
+ tt->aa[aatt]=a + (aa[a] & 60 ) ;}// Copy all the mark
+ }
+
+ void SetAdj2(Int1 a,Triangle *t,Int1 aat)
+ { at[a]=t;aa[a]=aat;
+ if(t) {t->at[aat]=this;t->aa[aat]=a;}
+ }
+
+ void SetTriangleContainingTheVertex()
+ {
+ if (ns[0]) (ns[0]->t=this,ns[0]->vint=0);
+ if (ns[1]) (ns[1]->t=this,ns[1]->vint=1);
+ if (ns[2]) (ns[2]->t=this,ns[2]->vint=2);
+ }
+
+ int swap(Int2 a1,int=0);
+ Int4 Optim(Int2 a,int =0);
+
+ int Locked(int a)const { return aa[a]&4;}
+ int Hidden(int a)const { return aa[a]&16;}
+ int Cracked(int a) const { return aa[a] & 32;}
+ // for optimisation
+ int GetAllflag(int a){return aa[a] & 1020;}
+ void SetAllFlag(int a,int f){aa[a] = (aa[a] &3) + (1020 & f);}
+
+ void SetHidden(int a){
+ Triangle * t = at[a];
+ if(t) t->aa[aa[a] & 3] |=16;
+ aa[a] |= 16;}
+ void SetCracked(int a){
+ Triangle * t = at[a];
+ if(t) t->aa[aa[a] & 3] |=32;
+ aa[a] |= 32;}
+
+ double QualityQuad(int a,int option=1) const;
+ Triangle * Quadrangle(Vertex * & v0,Vertex * & v1,Vertex * & v2,Vertex * & v3) const ;
+
+ void SetLocked(int a){
+ Triangle * t = at[a];
+ t->aa[aa[a] & 3] |=4;
+ aa[a] |= 4;}
+
+ void SetMarkUnSwap(int a){
+ Triangle * t = at[a];
+ t->aa[aa[a] & 3] |=8;
+ aa[a] |=8 ;}
+
+
+ void SetUnMarkUnSwap(int a){
+ Triangle * t = at[a];
+ t->aa[aa[a] & 3] &=55; // 23 + 32
+ aa[a] &=55 ;}
+
+
+
+#ifdef DEBUG
+ void inline checka(Int1 a);
+ void inline check();
+#endif
+
+#ifdef DRAWING
+ void Draw(Int4 i=-1) const;
+ int swapDRAW(Int2 a1);
+
+#endif
+
+}; // end of Triangle class
+
+
+
+
+class ListofIntersectionTriangles {
+/////////////////////////////////////////////////////////////////////////////////////
+class IntersectionTriangles {
+public:
+ Triangle *t;
+ Real8 bary[3]; // use if t != 0
+ R2 x;
+ Metric m;
+ Real8 s;// abscisse curviline
+ Real8 sp; // len of the previous seg in m
+ Real8 sn;// len of the next seg in m
+};
+/////////////////////////////////////////////////////////////////////////////////////
+class SegInterpolation {
+ public:
+ GeometricalEdge * e;
+ Real8 sBegin,sEnd; // abscisse of the seg on edge parameter
+ Real8 lBegin,lEnd; // length abscisse set in ListofIntersectionTriangles::Length
+ int last;// last index in ListofIntersectionTriangles for this Sub seg of edge
+ R2 F(Real8 s){
+ Real8 c01=lEnd-lBegin, c0=(lEnd-s)/c01, c1=(s-lBegin)/c01;
+ assert(lBegin<= s && s <=lEnd);
+ return e->F(sBegin*c0+sEnd*c1);}
+};
+
+ int MaxSize; //
+ int Size; //
+ Real8 len; //
+ int state;
+ IntersectionTriangles * lIntTria;
+ int NbSeg;
+ int MaxNbSeg;
+ SegInterpolation * lSegsI;
+ public:
+ IntersectionTriangles & operator[](int i) {return lIntTria[i];}
+ operator int&() {return Size;}
+ ListofIntersectionTriangles(int n=256,int m=16)
+ : MaxSize(n), Size(0), len(-1),state(-1),lIntTria(new IntersectionTriangles[n]) ,
+ NbSeg(0), MaxNbSeg(m), lSegsI(new SegInterpolation[m])
+ { if (verbosity>9)
+ cout << " construct ListofIntersectionTriangles"
+ << MaxSize << " " << MaxNbSeg<< endl;};
+ ~ListofIntersectionTriangles(){
+ if (lIntTria) delete [] lIntTria,lIntTria=0;
+ if (lSegsI) delete [] lSegsI,lSegsI=0;}
+ void init(){state=0;len=0;Size=0;}
+
+ int NewItem(Triangle * tt,Real8 d0,Real8 d1,Real8 d2);
+ int NewItem(R2,const Metric & );
+ void NewSubSeg(GeometricalEdge *e,Real8 s0,Real8 s1)
+ {
+ if (NbSeg>=MaxNbSeg) {
+ int mneo= MaxNbSeg;
+ MaxNbSeg *= 2;
+ if (verbosity>3)
+ cout <<" reshape lSegsI from " << mneo << " to "
+ << MaxNbSeg <<endl;
+ SegInterpolation * lEn = new SegInterpolation[MaxNbSeg];
+ assert(lSegsI && NbSeg < MaxNbSeg);
+ for (int i=0;i< NbSeg;i++)
+ lEn[i] = lSegsI[MaxNbSeg]; // copy old to new
+ delete [] lSegsI; // remove old
+ lSegsI = lEn;
+ }
+ if (NbSeg)
+ lSegsI[NbSeg-1].last=Size;
+ lSegsI[NbSeg].e=e;
+ lSegsI[NbSeg].sBegin=s0;
+ lSegsI[NbSeg].sEnd=s1;
+ NbSeg++;
+ }
+
+// void CopyMetric(int i,int j){ lIntTria[j].m=lIntTria[i].m;}
+// void CopyMetric(const Metric & mm,int j){ lIntTria[j].m=mm;}
+
+ void ReShape() {
+ int newsize = MaxSize*2;
+ IntersectionTriangles * nw = new IntersectionTriangles[newsize];
+ assert(nw);
+ for (int i=0;i<MaxSize;i++) // recopy
+ nw[i] = lIntTria[i];
+ if(verbosity>3)
+ cout << " ListofIntersectionTriangles ReShape MaxSize "
+ << MaxSize << " -> "
+ << newsize << endl;
+ MaxSize = newsize;
+ delete [] lIntTria;// remove old
+ lIntTria = nw; // copy pointer
+ }
+
+ void SplitEdge(const Triangles & ,const R2 &,const R2 &,int nbegin=0);
+ Real8 Length();
+ Int4 NewPoints(Vertex *,Int4 & nbv,Int4 nbvx);
+};
+
+
+/////////////////////////////////////////////////////////////////////////////////////
+class GeometricalSubDomain {
+public:
+ GeometricalEdge *edge;
+ int sens; // -1 or 1
+ Int4 ref;
+ inline void Set(const GeometricalSubDomain &,const Geometry & ,const Geometry &);
+
+};
+/////////////////////////////////////////////////////////////////////////////////////
+class SubDomain {
+public:
+ Triangle * head;
+ Int4 ref;
+ int sens; // -1 or 1
+ Edge * edge; // to geometrical
+ inline void Set(const Triangles &,Int4,Triangles &);
+
+};
+/////////////////////////////////////////////////////////////////////////////////////
+class VertexOnGeom { public:
+
+ Vertex * mv;
+ Real8 abscisse;
+ union{
+ GeometricalVertex * gv; // if abscisse <0;
+ GeometricalEdge * ge; // if abscisse in [0..1]
+ };
+ inline void Set(const VertexOnGeom&,const Triangles &,Triangles &);
+ int OnGeomVertex()const {return this? abscisse <0 :0;}
+ int OnGeomEdge() const {return this? abscisse >=0 :0;}
+ VertexOnGeom(): mv(0),abscisse(0){gv=0;}
+ VertexOnGeom(Vertex & m,GeometricalVertex &g) : mv(&m),abscisse(-1){gv=&g;}
+ // cout << " mv = " <<mv << " gv = " << gv << endl;}
+ VertexOnGeom(Vertex & m,GeometricalEdge &g,Real8 s) : mv(&m),abscisse(s){ge=&g;}
+ //cout << &g << " " << ge << endl;}
+ operator Vertex * () const {return mv;}
+ operator GeometricalVertex * () const {return gv;}
+ operator GeometricalEdge * () const {return ge;}
+// operator Real8 & () {return abscisse;}
+ operator const Real8 & () const {return abscisse;}
+ int IsRequiredVertex(){ return this? (( abscisse<0 ? (gv?gv->Required():0):0 )) : 0;}
+ void SetOn(){mv->on=this;mv->vint=IsVertexOnGeom;}
+ friend ostream& operator <<(ostream& f, const VertexOnGeom & vog){
+ f << vog.abscisse << " " << vog.mv << " " << vog.gv << " ; ";
+ if (vog.abscisse < 0) f << *vog.gv << " ;; " ;
+ // else f << *vog.ge << " ;; " ;
+ return f;}
+ inline void Set(const Triangles &,Int4,Triangles &);
+
+};
+/////////////////////////////////////////////////////////////////////////////////////
+class VertexOnVertex {public:
+ Vertex * v, *bv;
+ VertexOnVertex(Vertex * w,Vertex *bw) :v(w),bv(bw){}
+ VertexOnVertex() {};
+ inline void Set(const Triangles &,Int4,Triangles &);
+ void SetOnBTh(){v->onbv=bv;v->vint=IsVertexOnVertex;}
+};
+/////////////////////////////////////////////////////////////////////////////////////
+class VertexOnEdge {public:
+ Vertex * v;
+ Edge * be;
+ Real8 abcisse;
+ VertexOnEdge( Vertex * w, Edge *bw,Real8 s) :v(w),be(bw),abcisse(s) {}
+ VertexOnEdge(){}
+ inline void Set(const Triangles &,Int4,Triangles &);
+ void SetOnBTh(){v->onbe=this;v->vint=IsVertexOnEdge;}
+ Vertex & operator[](int i) const { return (*be)[i];}
+ operator Real8 () const { return abcisse;}
+ operator Vertex * () const { return v;}
+ operator Edge * () const { return be;}
+};
+
+ inline TriangleAdjacent FindTriangleAdjacent(Edge &E);
+ inline Vertex * TheVertex(Vertex * a); // for remove crak in mesh
+/////////////////////////////////////////////////////////////////////////////////////
+
+class CrackedEdge { // a small class to store on crack an uncrack information
+ friend class Triangles;
+ friend ostream& operator <<(ostream& f, const Triangles & Th) ;
+ class CrackedTriangle {
+ friend class Triangles;
+ friend class CrackedEdge;
+ friend ostream& operator <<(ostream& f, const Triangles & Th) ;
+ Triangle * t; // edge of triangle t
+ int i; // edge number of in triangle
+ Edge *edge; // the 2 edge
+ Vertex *New[2]; // new vertex number
+ CrackedTriangle() : t(0),i(0),edge(0) { New[0]=New[1]=0;}
+ CrackedTriangle(Edge * a) : t(0),i(0),edge(a) { New[0]=New[1]=0;}
+ void Crack(){
+ Triangle & T(*t);
+ int i0=VerticesOfTriangularEdge[i][0];
+ int i1=VerticesOfTriangularEdge[i][0];
+ assert(New[0] && New[1]);
+ T(i0) = New[0];
+ T(i1) = New[1];}
+ void UnCrack(){
+ Triangle & T(*t);
+ int i0=VerticesOfTriangularEdge[i][0];
+ int i1=VerticesOfTriangularEdge[i][0];
+ assert(New[0] && New[1]);
+ T(i0) = TheVertex(T(i0));
+ T(i1) = TheVertex(T(i1));}
+ void Set() {
+ TriangleAdjacent ta ( FindTriangleAdjacent(*edge));
+ t = ta;
+ i = ta;
+
+ New[0] = ta.EdgeVertex(0);
+ New[1] = ta.EdgeVertex(1);
+ // warning the ref
+
+ }
+
+ }; // end of class CrackedTriangle
+ public:
+ CrackedTriangle a,b;
+ CrackedEdge() :a(),b() {}
+ CrackedEdge(Edge * start, Int4 i,Int4 j) : a(start+i),b(start+j) {};
+ CrackedEdge(Edge * e0, Edge * e1 ) : a(e0),b(e1) {};
+
+ void Crack() { a.Crack(); b.Crack();}
+ void UnCrack() { a.UnCrack(); b.UnCrack();}
+ void Set() { a.Set(), b.Set();}
+};
+
+/////////////////////////////////////////////////////////////////////////////////////
+
+class Triangles {
+public:
+
+ enum TypeFileMesh {
+ AutoMesh=0,BDMesh=1,NOPOMesh=2,amMesh=3,am_fmtMesh=4,amdbaMesh=5,
++<<<<<<< HEAD
+//-----------------------------ajout format hdf5-----------------------------//
+ // ftqMesh=6,mshMesh=7};
+ ftqMesh=6,mshMesh=7,hdf5Mesh=8};
+//-----------------------------ajout format hdf5-----------------------------//
++=======
++ ftqMesh=6,mshMesh=7};
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ int static counter; // to kown the number of mesh in memory
+ int OnDisk; // true if on disk
+ Geometry & Gh; // Geometry
+ Triangles & BTh; // Background Mesh Bth==*this =>no background
+
+ Int4 NbRef; // counter of ref on the this class if 0 we can delete
+ Int4 nbvx,nbtx; // nombre max de sommets , de triangles
+
+ Int4 nt,nbv,nbt,nbiv,nbe; // nb of legal triangles, nb of vertex, of triangles,
+ // of initial vertices, of edges with reference,
+ Int4 NbOfQuad; // nb of quadrangle
+
+ Int4 NbSubDomains; //
+ Int4 NbOutT; // Nb of oudeside triangle
+ Int4 NbOfTriangleSearchFind;
+ Int4 NbOfSwapTriangle;
+ char * name, *identity;
+ Vertex * vertices; // data of vertices des sommets
+
+ Int4 NbVerticesOnGeomVertex;
+ VertexOnGeom * VerticesOnGeomVertex;
+
+ Int4 NbVerticesOnGeomEdge;
+ VertexOnGeom * VerticesOnGeomEdge;
+
+ Int4 NbVertexOnBThVertex;
+ VertexOnVertex *VertexOnBThVertex;
+
+ Int4 NbVertexOnBThEdge;
+ VertexOnEdge *VertexOnBThEdge;
+
+
+ Int4 NbCrackedVertices;
+
+
+ Int4 NbCrackedEdges;
+ CrackedEdge *CrackedEdges;
+
+
+ R2 pmin,pmax; // extrema
+ Real8 coefIcoor; // coef to integer Icoor1;
+
+ Triangle * triangles;
+ Edge * edges;
+
+ QuadTree *quadtree;
+ Vertex ** ordre;
+ SubDomain * subdomains;
+ ListofIntersectionTriangles lIntTria;
+ int warning ;
+// end of variable
+
+ Triangles(Int4 i);//:BTh(*this),Gh(*new Geometry()){PreInit(i);}
++<<<<<<< HEAD
+ void clear();
+ ~Triangles() {if(NbRef==0) {clear();NbRef=-1;}}
+ Triangles(const char * ,Real8=-1) ;
+
+
+ Triangles(Int4 nbvx,Triangles & BT,int keepBackVertices=1)
+ :Gh(BT.Gh),BTh(BT) {
+ try {GeomToTriangles1(nbvx,keepBackVertices);}
+ catch(...) { this->clear(); throw; } }
++=======
++
++ ~Triangles();
++ Triangles(const char * ,Real8=-1) ;
++
++ Triangles(Int4 nbvx,Triangles & BT,int keepBackVertices=1)
++ :Gh(BT.Gh),BTh(BT) {
++ try {GeomToTriangles1(nbvx,keepBackVertices);}
++ catch(...) { this->~Triangles(); throw; } }
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ Triangles(Int4 nbvx,Geometry & G)
+ :Gh(G),BTh(*this){
+ try { GeomToTriangles0(nbvx);}
++<<<<<<< HEAD
+ catch(...) { this->clear(); throw; } }
++=======
++ catch(...) { this->~Triangles(); throw; } }
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ Triangles(Triangles &,Geometry * pGh=0,Triangles* pBTh=0,Int4 nbvxx=0 ); // COPY OPERATEUR
+ // Triangles(Triangles &){ cerr << " BUG call copy opretor of Triangles" << endl;MeshError(111);}
+ Triangles(const Triangles &,const int *flag,const int *bb); // truncature
+
+
+ void SetIntCoor(const char * from =0);
+
+ // void RandomInit();
+ // void CubeInit(int ,int);
+
+ Real8 MinimalHmin() {return 2.0/coefIcoor;}
+ Real8 MaximalHmax() {return Max(pmax.x-pmin.x,pmax.y-pmin.y);}
+ const Vertex & operator[] (Int4 i) const { return vertices[i];};
+ Vertex & operator[](Int4 i) { return vertices[i];};
+ const Triangle & operator() (Int4 i) const { return triangles[i];};
+ Triangle & operator()(Int4 i) { return triangles[i];};
+ I2 toI2(const R2 & P) const {
+ return I2( (Icoor1) (coefIcoor*(P.x-pmin.x))
+ ,(Icoor1) (coefIcoor*(P.y-pmin.y)) );}
+ R2 toR2(const I2 & P) const {
+ return R2( (double) P.x/coefIcoor+pmin.x, (double) P.y/coefIcoor+pmin.y);}
+ void Add( Vertex & s,Triangle * t,Icoor2 * =0) ;
+ void Insert();
+ // void InsertOld();
+ void ForceBoundary();
+ void Heap();
+ void FindSubDomain(int );
+ Int4 ConsRefTriangle(Int4 *) const;
+ void ShowHistogram() const;
+ void ShowRegulaty() const; // Add FH avril 2007
+// void ConsLinkTriangle();
+
+ void ReMakeTriangleContainingTheVertex();
+ void UnMarkUnSwapTriangle();
+ void SmoothMetric(Real8 raisonmax) ;
+ void BoundAnisotropy(Real8 anisomax,double hminaniso= 1e-100) ;
+ void MaxSubDivision(Real8 maxsubdiv);
+ void WriteMetric(ostream &,int iso) ;
+ Edge** MakeGeometricalEdgeToEdge();
+ void SetVertexFieldOn();
+ void SetVertexFieldOnBTh();
+ Int4 SplitInternalEdgeWithBorderVertices();
+ void MakeQuadrangles(double costheta);
+ int SplitElement(int choice);
+ void MakeQuadTree();
+ void NewPoints( Triangles &,int KeepBackVertex =1 );
+ Int4 InsertNewPoints(Int4 nbvold,Int4 & NbTSwap) ;
+ void NewPointsOld( Triangles & );
+ void NewPoints(int KeepBackVertex=1){ NewPoints(*this,KeepBackVertex);}
+ void ReNumberingTheTriangleBySubDomain(bool justcompress=false);
+ void ReNumberingVertex(Int4 * renu);
+ void SmoothingVertex(int =3,Real8=0.3);
+ Metric MetricAt (const R2 &) const;
+ GeometricalEdge * ProjectOnCurve( Edge & AB, Vertex & A, Vertex & B,Real8 theta,
+ Vertex & R,VertexOnEdge & BR,VertexOnGeom & GR);
+
+
+ void WriteElements(ostream& f,Int4 * reft ,Int4 nbInT) const;
+
+
+ Int4 Number(const Triangle & t) const { return &t - triangles;}
+ Int4 Number(const Triangle * t) const { return t - triangles;}
+ Int4 Number(const Vertex & t) const { return &t - vertices;}
+ Int4 Number(const Vertex * t) const { return t - vertices;}
+ Int4 Number(const Edge & t) const { return &t - edges;}
+ Int4 Number(const Edge * t) const { return t - edges;}
+ Int4 Number2(const Triangle * t) const {
+ // if(t>= triangles && t < triangles + nbt )
+ return t - triangles;
+ // else return t - OutSidesTriangles;
+ }
+
+ Vertex * NearestVertex(Icoor1 i,Icoor1 j) ;
+ Triangle * FindTriangleContening(const I2 & ,Icoor2 [3],Triangle *tstart=0) const;
+ void Write(const char * filename,const TypeFileMesh type = AutoMesh);
+ void Write_am_fmt(ostream &) const ;
+ void Write_am(ostream &) const ;
+ void Write_ftq(ostream &) const ;
+ void Write_nopo(ostream &) const ;
+ void Write_msh(ostream &) const ;
++<<<<<<< HEAD
+//-----------------------------ajout format hdf5-----------------------------//
+ void Write_hdf5(const char * filename) const ;
+//-----------------------------ajout format hdf5-----------------------------//
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ void Write_amdba(ostream &) const ;
+
+ void Read(MeshIstream &,int version,Real8 cutoffradian);
+ void Read_am_fmt(MeshIstream &);
+ void Read_amdba(MeshIstream &);
+ void Read_am(MeshIstream &);
+ void Read_nopo(MeshIstream &);
+ void Read_ftq(MeshIstream &);
+ void Read_msh(MeshIstream &);
+
+ void ReadMetric(const char * fmetrix,const Real8 hmin,const Real8 hmax,const Real8 coef);
+ void IntersectConsMetric(const double * s,const Int4 nbsol,const int * typsols,
+ const Real8 hmin,const Real8 hmax, const Real8 coef,
+ const Real8 anisomax,const Real8 CutOff=1.e-4,const int NbJacobi=1,
+ const int DoNormalisation=1,
+ const double power=1.0,
+ const int choise=0);
+ void IntersectGeomMetric(const Real8 err,const int iso);
+
+
+ int isCracked() const {return NbCrackedVertices != 0;}
+ int Crack();
+ int UnCrack();
+
+#ifdef DEBUG
+ void inline Check();
+#endif
+#ifdef DRAWING
+ void Draw() const ;
+ void InitDraw() const ;
+ void inquire() ;
+#endif
+ friend ostream& operator <<(ostream& f, const Triangles & Th);
+ void Write(const char * filename);
+ void ConsGeometry(Real8 =-1.0,int *equiedges=0); // construct a geometry if no geo
+ void FillHoleInMesh() ;
+ int CrackMesh();
+ private:
+ void GeomToTriangles1(Int4 nbvx,int KeepBackVertices=1);// the real constructor mesh adaption
+ void GeomToTriangles0(Int4 nbvx);// the real constructor mesh generator
+ void PreInit(Int4,char * =0 );
+ //
+ void Write_nop5(OFortranUnFormattedFile * f,
+ Int4 &lnop5,Int4 &nef,Int4 &lgpdn,Int4 ndsr) const ;
+
+
+}; // End Class Triangles
+/////////////////////////////////////////////////////////////////////////////////////
+class Geometry {
+public:
+ int OnDisk;
+ Int4 NbRef; // counter of ref on the this class if 0 we can delete
+
+ char *name;
+ Int4 nbvx,nbtx; // nombre max de sommets , de Geometry
+ Int4 nbv,nbt,nbiv,nbe; // nombre de sommets, de Geometry, de sommets initiaux,
+ Int4 NbSubDomains; //
+ Int4 NbEquiEdges;
+ Int4 NbCrackedEdges;
+// Int4 nbtf;// de triangle frontiere
+ Int4 NbOfCurves;
+ int empty(){return (nbv ==0) && (nbt==0) && (nbe==0) && (NbSubDomains==0); }
+ GeometricalVertex * vertices; // data of vertices des sommets
+ Triangle * triangles;
+ GeometricalEdge * edges;
+ QuadTree *quadtree;
+ GeometricalSubDomain *subdomains;
+ Curve *curves;
+ ~Geometry();
+ Geometry(const Geometry & Gh); //Copy Operator
+ Geometry(int nbg,const Geometry ** ag); // intersection operator
+
+ R2 pmin,pmax; // extrema
+ Real8 coefIcoor; // coef to integer Icoor1;
+ Real8 MaximalAngleOfCorner;
+
+// end of data
+
+
+ I2 toI2(const R2 & P) const {
+ return I2( (Icoor1) (coefIcoor*(P.x-pmin.x))
+ ,(Icoor1) (coefIcoor*(P.y-pmin.y)) );}
+
+ Real8 MinimalHmin() {return 2.0/coefIcoor;}
+ Real8 MaximalHmax() {return Max(pmax.x-pmin.x,pmax.y-pmin.y);}
+ void ReadGeometry(const char * ) ;
+ void ReadGeometry(MeshIstream & ,const char *) ;
+
+ void EmptyGeometry();
+ Geometry() {EmptyGeometry();}// empty Geometry
+ void AfterRead();
+ Geometry(const char * filename) {EmptyGeometry();OnDisk=1;ReadGeometry(filename);AfterRead();}
+
+ void ReadMetric(const char *,Real8 hmin,Real8 hmax,Real8 coef);
+ const GeometricalVertex & operator[] (Int4 i) const { return vertices[i];};
+ GeometricalVertex & operator[](Int4 i) { return vertices[i];};
+ const GeometricalEdge & operator() (Int4 i) const { return edges[i];};
+ GeometricalEdge & operator()(Int4 i) { return edges[i];};
+ Int4 Number(const GeometricalVertex & t) const { return &t - vertices;}
+ Int4 Number(const GeometricalVertex * t) const { return t - vertices;}
+ Int4 Number(const GeometricalEdge & t) const { return &t - edges;}
+ Int4 Number(const GeometricalEdge * t) const { return t - edges;}
+ Int4 Number(const Curve * c) const { return c - curves;}
+
+ void UnMarkEdges() {
+ for (Int4 i=0;i<nbe;i++) edges[i].SetUnMark();}
+
+ GeometricalEdge * ProjectOnCurve(const Edge & ,Real8,Vertex &,VertexOnGeom &) const ;
+ GeometricalEdge * Contening(const R2 P, GeometricalEdge * start) const;
+ friend ostream& operator <<(ostream& f, const Geometry & Gh);
+ void Write(const char * filename);
+
+#ifdef DEBUG
+ void inline Check();
+#endif
+#ifdef DRAWING
+ void Draw() const ;
+ void InitDraw() const ;
+#endif
+
+}; // End Class Geometry
+
+/////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////
+/////////////////// END CLASS ////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////
+
+inline Triangles::Triangles(Int4 i) :Gh(*new Geometry()),BTh(*this){PreInit(i);}
+
+extern Triangles * CurrentTh;
+
+TriangleAdjacent CloseBoundaryEdge(I2 ,Triangle *, double &,double &) ;
+TriangleAdjacent CloseBoundaryEdgeV2(I2 A,Triangle *t, double &a,double &b);
+
+Int4 FindTriangle(Triangles &Th, Real8 x, Real8 y, double* a,int & inside);
+
+
+
+inline Triangle * Triangle::Quadrangle(Vertex * & v0,Vertex * & v1,Vertex * & v2,Vertex * & v3) const
+{
+// return the other triangle of the quad if a quad or 0 if not a quat
+ Triangle * t =0;
+ if (link) {
+ int a=-1;
+ if (aa[0] & 16 ) a=0;
+ if (aa[1] & 16 ) a=1;
+ if (aa[2] & 16 ) a=2;
+ if (a>=0) {
+ t = at[a];
+ // if (t-this<0) return 0;
+ v2 = ns[VerticesOfTriangularEdge[a][0]];
+ v0 = ns[VerticesOfTriangularEdge[a][1]];
+ v1 = ns[OppositeEdge[a]];
+ v3 = t->ns[OppositeEdge[aa[a]&3]];
+ }
+ }
+ return t;
+}
+
+inline double Triangle::QualityQuad(int a,int option) const
+{ // first do the logique part
+ double q;
+ if (!link || aa[a] &4)
+ q= -1;
+ else {
+ Triangle * t = at[a];
+ if (t-this<0) q= -1;// because we do 2 times
+ else if (!t->link ) q= -1;
+ else if (aa[0] & 16 || aa[1] & 16 || aa[2] & 16 || t->aa[0] & 16 || t->aa[1] & 16 || t->aa[2] & 16 )
+ q= -1;
+ else if(option)
+ {
+ const Vertex & v2 = *ns[VerticesOfTriangularEdge[a][0]];
+ const Vertex & v0 = *ns[VerticesOfTriangularEdge[a][1]];
+ const Vertex & v1 = *ns[OppositeEdge[a]];
+ const Vertex & v3 = * t->ns[OppositeEdge[aa[a]&3]];
+ q = QuadQuality(v0,v1,v2,v3); // do the float part
+ }
+ else q= 1;
+ }
+ return q;
+}
+
+
+inline void Vertex::Set(const Vertex & rec,const Triangles & ,Triangles & )
+ {
+ *this = rec;
+ }
+inline void GeometricalVertex::Set(const GeometricalVertex & rec,const Geometry & ,const Geometry & )
+ {
+ *this = rec;
+ }
+inline void Edge::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
+ {
+ *this = Th.edges[i];
+ v[0] = ThNew.vertices + Th.Number(v[0]);
+ v[1] = ThNew.vertices + Th.Number(v[1]);
+ if (on)
+ on = ThNew.Gh.edges+Th.Gh.Number(on);
+ if (adj[0]) adj[0] = ThNew.edges + Th.Number(adj[0]);
+ if (adj[1]) adj[1] = ThNew.edges + Th.Number(adj[1]);
+
+ }
+inline void GeometricalEdge::Set(const GeometricalEdge & rec,const Geometry & Gh ,Geometry & GhNew)
+ {
+ *this = rec;
+ v[0] = GhNew.vertices + Gh.Number(v[0]);
+ v[1] = GhNew.vertices + Gh.Number(v[1]);
+ if (Adj[0]) Adj[0] = GhNew.edges + Gh.Number(Adj[0]);
+ if (Adj[1]) Adj[1] = GhNew.edges + Gh.Number(Adj[1]);
+ }
+
+inline void Curve::Set(const Curve & rec,const Geometry & Gh ,Geometry & GhNew)
+{
+ *this = rec;
+ be = GhNew.edges + Gh.Number(be);
+ ee = GhNew.edges + Gh.Number(ee);
+ if(next) next= GhNew.curves + Gh.Number(next);
+}
+
+inline void Triangle::Set(const Triangle & rec,const Triangles & Th ,Triangles & ThNew)
+ {
+ *this = rec;
+ if ( ns[0] ) ns[0] = ThNew.vertices + Th.Number(ns[0]);
+ if ( ns[1] ) ns[1] = ThNew.vertices + Th.Number(ns[1]);
+ if ( ns[2] ) ns[2] = ThNew.vertices + Th.Number(ns[2]);
+ if(at[0]) at[0] = ThNew.triangles + Th.Number(at[0]);
+ if(at[1]) at[1] = ThNew.triangles + Th.Number(at[1]);
+ if(at[2]) at[2] = ThNew.triangles + Th.Number(at[2]);
+ if (link >= Th.triangles && link < Th.triangles + Th.nbt)
+ link = ThNew.triangles + Th.Number(link);
+ }
+inline void VertexOnVertex::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
+{
+ *this = Th.VertexOnBThVertex[i];
+ v = ThNew.vertices + Th.Number(v);
+
+}
+inline void SubDomain::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
+{
+ *this = Th.subdomains[i];
+ assert( head - Th.triangles >=0 && head - Th.triangles < Th.nbt);
+ head = ThNew.triangles + Th.Number(head) ;
+ assert(edge - Th.edges >=0 && edge - Th.edges < Th.nbe);
+ edge = ThNew.edges+ Th.Number(edge);
+}
+ inline void GeometricalSubDomain::Set(const GeometricalSubDomain & rec,const Geometry & Gh ,const Geometry & GhNew)
+{
+ *this = rec;
+ edge = Gh.Number(edge) + GhNew.edges;
+}
+inline void VertexOnEdge::Set(const Triangles & Th ,Int4 i,Triangles & ThNew)
+{
+ *this = Th.VertexOnBThEdge[i];
+ v = ThNew.vertices + Th.Number(v);
+}
+
+inline void VertexOnGeom::Set(const VertexOnGeom & rec,const Triangles & Th ,Triangles & ThNew)
+{
+ *this = rec;
+ mv = ThNew.vertices + Th.Number(mv);
+ if (gv)
+ {
+ if (abscisse < 0 )
+ gv = ThNew.Gh.vertices + Th.Gh.Number(gv);
+ else
+ ge = ThNew.Gh.edges + Th.Gh.Number(ge);
+ }
+}
+inline Real8 Edge::MetricLength() const
+ {
+ return LengthInterpole(v[0]->m,v[1]->m,v[1]->r - v[0]->r) ;
+ }
+
+inline void Triangles::ReMakeTriangleContainingTheVertex()
+ {
+ Int4 i;
+ for ( i=0;i<nbv;i++)
+ {
+ vertices[i].vint = 0;
+ vertices[i].t=0;
+ }
+ for ( i=0;i<nbt;i++)
+ triangles[i].SetTriangleContainingTheVertex();
+ }
+
+inline void Triangles::UnMarkUnSwapTriangle()
+ {
+ Int4 i;
+ for ( i=0;i<nbt;i++)
+ for(int j=0;j<3;j++)
+ triangles[i].SetUnMarkUnSwap(j);
+ }
+
+inline void Triangles::SetVertexFieldOn()
+ {
+ for (Int4 i=0;i<nbv;i++)
+ vertices[i].on=0;
+ for (Int4 j=0;j<NbVerticesOnGeomVertex;j++ )
+ VerticesOnGeomVertex[j].SetOn();
+ for (Int4 k=0;k<NbVerticesOnGeomEdge;k++ )
+ VerticesOnGeomEdge[k].SetOn();
+ }
+inline void Triangles::SetVertexFieldOnBTh()
+ {
+ for (Int4 i=0;i<nbv;i++)
+ vertices[i].on=0;
+ for (Int4 j=0;j<NbVertexOnBThVertex;j++ )
+ VertexOnBThVertex[j].SetOnBTh();
+ for (Int4 k=0;k<NbVertexOnBThEdge;k++ )
+ VertexOnBThEdge[k].SetOnBTh();
+
+ }
+
+inline void TriangleAdjacent::SetAdj2(const TriangleAdjacent & ta, int l )
+{ // set du triangle adjacent
+ if(t) {
+ t->at[a]=ta.t;
+ t->aa[a]=ta.a|l;}
+ if(ta.t) {
+ ta.t->at[ta.a] = t ;
+ ta.t->aa[ta.a] = a| l ;
+ }
+}
+
+
+inline int TriangleAdjacent::Locked() const
+{ return t->aa[a] &4;}
+inline int TriangleAdjacent::Cracked() const
+{ return t->aa[a] &32;}
+inline int TriangleAdjacent::GetAllFlag_UnSwap() const
+{ return t->aa[a] & 1012;} // take all flag except MarkUnSwap
+
+inline int TriangleAdjacent::MarkUnSwap() const
+{ return t->aa[a] &8;}
+
+inline void TriangleAdjacent::SetLock(){ t->SetLocked(a);}
+
+inline void TriangleAdjacent::SetCracked() { t->SetCracked(a);}
+
+inline TriangleAdjacent TriangleAdjacent::Adj() const
+{ return t->Adj(a);}
+
+inline Vertex * TriangleAdjacent::EdgeVertex(const int & i) const
+ {return t->ns[VerticesOfTriangularEdge[a][i]]; }
+inline Vertex * TriangleAdjacent::OppositeVertex() const
+{return t->ns[bamg::OppositeVertex[a]]; }
+inline Icoor2 & TriangleAdjacent::det() const
+{ return t->det;}
+inline TriangleAdjacent Adj(const TriangleAdjacent & a)
+{ return a.Adj();}
+
+inline TriangleAdjacent Next(const TriangleAdjacent & ta)
+{ return TriangleAdjacent(ta.t,NextEdge[ta.a]);}
+
+inline TriangleAdjacent Previous(const TriangleAdjacent & ta)
+{ return TriangleAdjacent(ta.t,PreviousEdge[ta.a]);}
+
+inline void Adj(GeometricalEdge * & on,int &i)
+ {int j=i;i=on->SensAdj[i];on=on->Adj[j];}
+
+inline Real4 qualite(const Vertex &va,const Vertex &vb,const Vertex &vc)
+{
+ Real4 ret;
+ I2 ia=va,ib=vb,ic=vc;
+ I2 ab=ib-ia,bc=ic-ib,ac=ic-ia;
+ Icoor2 deta=Det(ab,ac);
+ if (deta <=0) ret = -1;
+ else {
+ Real8 a = sqrt((Real8) (ac,ac)),
+ b = sqrt((Real8) (bc,bc)),
+ c = sqrt((Real8) (ab,ab)),
+ p = a+b+c;
+ Real8 h= Max(Max(a,b),c),ro=deta/p;
+ ret = ro/h;}
+ return ret;
+}
+
+
+inline Triangle::Triangle(Triangles *Th,Int4 i,Int4 j,Int4 k) {
+ Vertex *v=Th->vertices;
+ Int4 nbv = Th->nbv;
+ assert(i >=0 && j >=0 && k >=0);
+ assert(i < nbv && j < nbv && k < nbv);
+ ns[0]=v+i;
+ ns[1]=v+j;
+ ns[2]=v+k;
+ at[0]=at[1]=at[2]=0;
+ aa[0]=aa[1]=aa[2]=0;
+ det=0;
+}
+
+inline Triangle::Triangle(Vertex *v0,Vertex *v1,Vertex *v2){
+ ns[0]=v0;
+ ns[1]=v1;
+ ns[2]=v2;
+ at[0]=at[1]=at[2]=0;
+ aa[0]=aa[1]=aa[2]=0;
+ if (v0) det=0;
+ else {
+ det=-1;
+ link=NULL;};
+}
+
+inline Real4 Triangle::qualite()
+{
+ return det < 0 ? -1 : bamg::qualite(*ns[0],*ns[1],*ns[2]);
+}
+
+Int4 inline Vertex::Optim(int i,int koption)
+{
+ Int4 ret=0;
+ if ( t && (vint >= 0 ) && (vint <3) )
+ {
+ ret = t->Optim(vint,koption);
+ if(!i)
+ {
+ t =0; // for no future optime
+ vint= 0; }
+ }
+ return ret;
+}
+
+Icoor2 inline det(const Vertex & a,const Vertex & b,const Vertex & c)
+{
+ Icoor2 bax = b.i.x - a.i.x ,bay = b.i.y - a.i.y;
+ Icoor2 cax = c.i.x - a.i.x ,cay = c.i.y - a.i.y;
+ return bax*cay - bay*cax;}
+
+
+void swap(Triangle *t1,Int1 a1,
+ Triangle *t2,Int1 a2,
+ Vertex *s1,Vertex *s2,Icoor2 det1,Icoor2 det2);
+
+
+
+int inline TriangleAdjacent::swap()
+{ return t->swap(a);}
+
+
+
+int SwapForForcingEdge(Vertex * & pva ,Vertex * & pvb ,
+ TriangleAdjacent & tt1,Icoor2 & dets1,
+ Icoor2 & detsa,Icoor2 & detsb, int & nbswap);
+
+int ForceEdge(Vertex &a, Vertex & b,TriangleAdjacent & taret) ;
+
+// inline bofbof FH
+inline TriangleAdjacent FindTriangleAdjacent(Edge &E)
+ {
+ Vertex * a = E.v[0];
+ Vertex * b = E.v[1];
+
+ Triangle * t = a->t;
+ int i = a->vint;
+ TriangleAdjacent ta(t,EdgesVertexTriangle[i][0]); // Previous edge
+ assert(t && i>=0 && i < 3);
+ assert( a == (*t)(i));
+ int k=0;
+ do { // turn around vertex in direct sens (trigo)
+ k++;assert(k< 20000);
+ // in no crack => ta.EdgeVertex(1) == a otherwise ???
+ if (ta.EdgeVertex(1) == a && ta.EdgeVertex(0) == b) return ta; // find
+ ta = ta.Adj();
+ if (ta.EdgeVertex(0) == a && ta.EdgeVertex(1) == b) return ta; // find
+ --ta;
+ } while (t != (Triangle *)ta);
+ assert(0);
+ return TriangleAdjacent(0,0);// error
+ }
+
+inline Vertex * TheVertex(Vertex * a) // give a unique vertex with smallest number
+{ // in case on crack in mesh
+ Vertex * r(a), *rr;
+ Triangle * t = a->t;
+ int i = a->vint;
+ TriangleAdjacent ta(t,EdgesVertexTriangle[i][0]); // Previous edge
+ assert(t && i>=0 && i < 3);
+ assert( a == (*t)(i));
+ int k=0;
+ do { // turn around vertex in direct sens (trigo)
+ k++;assert(k< 20000);
+ // in no crack => ta.EdgeVertex(1) == a
+ if ((rr=ta.EdgeVertex(0)) < r) r = rr;
+ ta = ta.Adj();
+ if ((rr=ta.EdgeVertex(1)) < r) r =rr;
+ --ta;
+ } while (t != (Triangle*) ta);
+ return r;
+}
+
+inline double CPUtime(){
+#ifdef SYSTIMES
+ struct tms buf;
+ if (times(&buf)!=-1)
+ return ((double)buf.tms_utime+(double)buf.tms_stime)/(long) sysconf(_SC_CLK_TCK);
+ else
+#endif
+ return ((double) clock())/CLOCKS_PER_SEC;
+}
+
+#ifdef DEBUG
+void inline Triangle::checka(Int1 a) {
+ // verif de la coherence des adjacences de l arete a
+ a = a%4;
+ assert(a < 3 && a >= 0 );
+ Triangle *t1=this,*t2=at[a];
+ Int2 a1=a,a2=aa[a]%4;
+
+ assert(a2 < 3 && a2 >= 0 );
+ if (t2 && ( ((*t1).ns[VerticesOfTriangularEdge[a1][0]] != (*t2).ns[VerticesOfTriangularEdge[a2][1]])
+ || ((*t1).ns[VerticesOfTriangularEdge[a1][1]] != (*t2).ns[VerticesOfTriangularEdge[a2][0]])))
+ {
+ if (CurrentTh) cerr << " In Triangles beetween Triangle " << CurrentTh->Number(t1) << " and "
+ << CurrentTh->Number(t2) << endl;
+ cerr << "---- t1="<< t1 << " " << a1 <<", t2="<< t2 << " " << a2 << endl;
+ cerr <<"t1="<< t1 << " " << a1 << " " << t1->ns[VerticesOfTriangularEdge[a1][0]]
+ << " " << t1->ns[VerticesOfTriangularEdge[a1][1]] <<endl;
+ if (CurrentTh)
+ cerr <<"t1="<< t1 << " " << a1 << " " << CurrentTh->Number(t1->ns[VerticesOfTriangularEdge[a1][0]])
+ << " " << CurrentTh->Number(t1->ns[VerticesOfTriangularEdge[a1][1]]) <<endl;
+ if (t2) cerr <<"t2="<< t2 << " " << a2 << " "
+ << t2->ns[VerticesOfTriangularEdge[a2][0]]
+ << " " << t2->ns[VerticesOfTriangularEdge[a2][1]] <<endl;
+ if (t2 &&CurrentTh)
+ cerr <<"t2="<< t2 << " " << a2 << " "
+ << CurrentTh->Number(t2->ns[VerticesOfTriangularEdge[a2][0]])
+ << " " << CurrentTh->Number(t2->ns[VerticesOfTriangularEdge[a2][1]]) <<endl;
+ assert(0);
+ }
+ if (t2) assert(t1->aa[a1]/4 == t2->aa[a2]/4); // lock compatibite
+}
+
+
+void inline Triangle::check() {
+ Icoor2 det2=0;
+ // cout << " check " << this << endl;
+ int infv=ns[0] ? (( ns[1] ? ( ns[2] ? -1 : 2) : 1 )) : 0;
+ if (det<0) {
+ if (infv<0 )
+ { if (CurrentTh) cerr << " In Triangles " << CurrentTh->Number(this) << endl;
+ cerr << " det = " << det << " and " << infv << endl;
+ MeshError(5);
+ }}
+ else if (infv>=0 )
+ { if (CurrentTh) cerr << " In Triangles " << CurrentTh->Number(this) << endl;
+ cerr << " det = " << det << " and " << infv << endl;
+ MeshError(5);
+ }
+
+ if (det >=0)
+ if( det != (det2=bamg::det(*ns[0],*ns[1],*ns[2])))
+ { // penthickness(4);Draw();
+ if (CurrentTh) cerr << " In Triangles" << CurrentTh->Number(this)
+ << endl;
+ cerr << *ns[0] << *ns[1] << " " << *ns[2] << " " << endl;
+ cerr << " Bug in triangle " << this
+ << ":" << det << " != " << det2 << endl;
+ MeshError(5);
+ }
+ checka(0);
+ checka(1);
+ checka(2);
+// if (ns[0]) assert( ns[0] - Meshbegin >= 0 );
+// if (ns[0]) assert( Meshend - ns[0] >= 0 );
+// if (ns[1]) assert( ns[1] - Meshbegin >= 0 );
+// if (ns[1]) assert( Meshend - ns[1] >= 0 );
+// if (ns[2]) assert( ns[2] - Meshbegin >= 0 );
+// if (ns[2]) assert( Meshend - ns[2] >= 0 );
+ assert(ns[0] != ns[2]);
+ assert(ns[1] != ns[2]);
+ assert(ns[0] != ns[1]);
+}
+
+
+#endif
+
+
+
+
+#ifdef DRAWING
+extern Real4 xGrafCoef,yGrafCoef,xGrafOffSet,yGrafOffSet; // R2 -> I2 transform
+extern R2 Gpmin,Gpmax;
+//extern Real8 Gh;
+// cf routine ILineTo IMoveto
+
+extern void IMoveTo(long i,long j);
+extern void ILineTo(long i,long j);
+extern char Getxyc(long &i,long &j);
+extern void Draw(float ,float );
+extern void Draw(long ,long );
+extern void DrawMark(R2 r);
+//inline void DrawMark(D2 r) {DrawMark(R2(r.x,r.y));}
+inline void Move(I2 x) {IMoveTo(x.x,x.y);}
+inline void Move(R2 x) {rmoveto(x.x,x.y);}
+//inline void Move(D2 x) {rmoveto(x.x,x.y);}
+inline void Line(I2 x){ILineTo(x.x,x.y);}
+inline void Line(R2 x) {rlineto(x.x,x.y);}
+//inline void Line(D2 x) {rlineto(x.x,x.y);}
+#endif
+
+}
+
+
+
+
+
+
diff --cc src/bamglib/MeshWrite.cpp.orig
index 85fc101,0000000..ac466fc
mode 100644,000000..100644
--- a/src/bamglib/MeshWrite.cpp.orig
+++ b/src/bamglib/MeshWrite.cpp.orig
@@@ -1,1021 -1,0 +1,1906 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
++<<<<<<< HEAD
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++<<<<<<< HEAD
+*/
+#include "config.h"
++=======
++ */
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+#include <cstdio>
+#include <cstring>
+#include <cmath>
+#include <ctime>
+#include "Meshio.h"
+#include "Mesh2.h"
+#include "QuadTree.h"
+#include "SetOfE4.h"
++<<<<<<< HEAD
+#ifdef HAVE_HDF5
+//-----------------------------ajout format hdf5-----------------------------//
+#include "write_xdmf.hpp"
+#include "write_hdf5.hpp"
+#ifndef H5_NO_NAMESPACE
+#ifndef H5_NO_STD
+using std::cout;
+using std::endl;
+#endif // H5_NO_STD
+#endif
+
+#include "H5Cpp.h"
+
+#ifndef H5_NO_NAMESPACE
+using namespace H5;
+#endif
+#endif
+//-----------------------------ajout format hdf5-----------------------------//
+
+namespace bamg {
+
+ void Triangles::Write(const char * filename,const TypeFileMesh typein )
+ {
+ TypeFileMesh type = typein;
+ const char * gsuffix=".gmsh";
+ int ls=0;
+ int lll = strlen(filename);
+ if (type==AutoMesh)
+ {
+ type = BDMesh;
+ if (!strcmp(filename + lll - (ls=7),".am_fmt")) type = am_fmtMesh;
+ else if (!strcmp(filename + lll - (ls=6),".amdba")) type = amdbaMesh;
+ else if (!strcmp(filename + lll - (ls=3),".am")) type = amMesh;
+ else if (!strcmp(filename + lll - (ls=5),".nopo")) type = NOPOMesh;
+ else if (!strcmp(filename + lll - (ls=4),".msh")) type = mshMesh;
+//-----------------------------ajout format hdf5-----------------------------//
+ else if (!strcmp(filename + lll - (ls=3),".h5")) type = hdf5Mesh;
+//-----------------------------ajout format hdf5-----------------------------//
+ else if (!strcmp(filename + lll - (ls=4),".ftq")) type = ftqMesh;
+ else if (!strcmp(filename + lll - (ls=7),".AM_FMT")) type = am_fmtMesh;
+ else if (!strcmp(filename + lll - (ls=6),".AMDBA")) type = amdbaMesh;
+ else if (!strcmp(filename + lll - (ls=3),".AM")) type = amMesh;
+ else if (!strcmp(filename + lll - (ls=5),".NOPO")) type = NOPOMesh;
+ else if (!strcmp(filename + lll - (ls=4),".MSH")) type = mshMesh;
+ else if (!strcmp(filename + lll - (ls=4),".FTQ")) type = ftqMesh;
+ else ls=0;
+ }
+ if (verbosity>1)
+ {
+ cout << " -- Writing the file " << filename << " of type " ;
+ switch (type)
+ {
+ case BDMesh : cout << " BD Mesh " ; break;
+ case NOPOMesh : cout << " NOPO " ; break;
+ case amMesh : cout << " am " ; break;
+ case am_fmtMesh : cout << " am_fmt " ; break;
+ case amdbaMesh : cout << " amdba " ; break;
+ case ftqMesh : cout << " ftq " ; break;
+ case mshMesh : cout << " msh " ; break;
+//-----------------------------ajout format hdf5-----------------------------//
+ case hdf5Mesh : cout << " h5 " ; break;
+//-----------------------------ajout format hdf5-----------------------------//
+ default:
+ cerr << endl
+ << " Unkown type mesh file " << (int) type << " for Writing " << filename <<endl;
+ MeshError(1);
+ }
+ Int4 NbOfTria = nbt-2*NbOfQuad-NbOutT ;
+ if (NbOfTria) cout << " NbOfTria = " << NbOfTria;
+ if (NbOfQuad) cout << " NbOfQuad = " << NbOfQuad;
+ if (nbe) cout << " NbOfRefEdge = " << nbe ;
+ cout << endl;
+
+ }
+ ofstream f(filename /*,ios::trunc*/);
+ f.precision(12);
+
+ if (f)
+ switch (type)
+ {
+ case BDMesh :
+ {
+ if ( ! Gh.OnDisk)
+ {
+ delete [] Gh.name;
+ Gh.name = new char[lll+1+strlen(gsuffix)];
+ strcpy(Gh.name,filename);
+ if (Gh.name[lll-ls-1]=='.') strcpy(Gh.name+lll-ls, gsuffix+1);
+ else strcpy(Gh.name+lll-ls,gsuffix);
+ cout << " write geo in " << Gh.name << endl;
+ ofstream f(Gh.name) ;
+ f << Gh ;
+ Gh.OnDisk=true;
+ }
+ f << *this ;
+ break;
+ }
+ case NOPOMesh : Write_nopo(f) ; break;
+ case amMesh : Write_am(f) ; break;
+ case am_fmtMesh : Write_am_fmt(f); break;
+ case amdbaMesh : Write_amdba(f) ; break;
+ case ftqMesh : Write_ftq(f) ; break;
+ case mshMesh : Write_msh(f) ; break;
+//-----------------------------ajout format hdf5-----------------------------//
+ case hdf5Mesh : Write_hdf5(filename) ; break;
+//-----------------------------ajout format hdf5-----------------------------//
+ default:
+ cerr << " Unkown type mesh file " << (int) type << " for Writing " << filename <<endl;
+ MeshError(1);
+ }
+ else
+ {
+ cerr << " Error openning file " << filename << endl;
+ MeshError(1);
+ }
+ if(verbosity>5)
+ cout << "end write" << endl;
+
+ }
+ void Triangles::Write_nop5(OFortranUnFormattedFile * f,
+ Int4 &lnop5,Int4 &nef,Int4 &lgpdn,Int4 ndsr) const
+ {
+ ndsr =0;
+ Int4 * reft = new Int4[nbt];
+ //Int4 nbInT = ;
+ ConsRefTriangle(reft);
+ Int4 no5l[20];
+
+ Int4 i5 = 0;
+ Int4 i,j,k=0,l5;
+ // Int4 ining=0;
+ Int4 imax,imin;
+
+ lgpdn = 0;
+ nef=0;
+ // construction of a liste linked of edge
+ Edge ** head = new Edge *[nbv];
+ Edge ** link = new Edge * [nbe];
+ for (i=0;i<nbv;i++)
+ head[i]=0; // empty liste
+
+ for (i=0;i<nbe;i++)
+ {
+ j = Min(Number(edges[i][0]),Number(edges[i][1]));
+ link[i]=head[j];
+ head[j]=edges +i;
+ }
+ for ( i=0;i<nbt;i++)
+ {
+ no5l[0] = 0;
+ Int4 kining=0;
+ Int4 ining=0;
+ Int4 nmae =0;
+ Int4 np=0;
+ l5 = 2;
+ Triangle & t = triangles[i];
+ Triangle * ta; //
+ Vertex *v0,*v1,*v2,*v3;
+ if (reft[i]<0) continue;
+ ta = t.Quadrangle(v0,v1,v2,v3);
+ if (!ta)
+ { // a triangles
+ no5l[l5++] = Max(subdomains[reft[i]].ref,(Int4) 1);
+ np = 3;
+ no5l[l5++] = np;
+ no5l[0] = np;
+ no5l[l5++] = Number(triangles[i][0]) +1;
+ no5l[l5++] = Number(triangles[i][1]) +1;
+ no5l[l5++] = Number(triangles[i][2]) +1;
+ imax = Max3(no5l[l5-1],no5l[l5-2],no5l[l5-3]);
+ imin = Min3(no5l[l5-1],no5l[l5-2],no5l[l5-3]);
+ lgpdn = Max(lgpdn,imax-imin);
+ kining=l5++;
+ // ref of 3 edges
+ for (j=0;j<3;j++)
+ {
+ no5l[l5] = 0;
+ int i0 = (int) j;
+ int i1 = (i0+1) %3;
+ Int4 j1= no5l[4+i0];
+ Int4 j2= no5l[4+i1];
+ Int4 ji = Min(j1,j2)-1;
+ Int4 ja = j1+j2-2;
+ Edge * e=head[ji];
+ while (e)
+ if(Number((*e)[0])+Number((*e)[1]) == ja)
+ {
+ no5l[l5] = e->ref;
+ break;
+ }
+ else
+ e = link[Number(e)];
+ l5++;
+ }
+ if ( no5l[l5-1] || no5l[l5-2] || no5l[l5-3] )
+ ining=2;
+ else
+ l5 -= 3;
+
+ no5l[l5++] = triangles[i][0].ref();
+ no5l[l5++] = triangles[i][1].ref();
+ no5l[l5++] = triangles[i][2].ref();
+ if (ining || no5l[l5-1] || no5l[l5-2] || no5l[l5-3] )
+ ining= ining ? ining : 3;
+ else
+ l5 -= 3,ining=0;
+ }
+ else if ( &t<ta)
+ {
+ k++;
+ no5l[l5++] = Max(subdomains[reft[i]].ref,(Int4) 1);
+ np =4;
+ no5l[l5++] = np;
+ no5l[0] = np;
+
+ no5l[l5++] = Number(v0) +1;
+ no5l[l5++] = Number(v1) +1;
+ no5l[l5++] = Number(v2) +1;
+ no5l[l5++] = Number(v3) +1;
+
+ imax = Max(Max(no5l[l5-1],no5l[l5-2]),Max(no5l[l5-3],no5l[l5-4]));
+ imin = Min(Min(no5l[l5-1],no5l[l5-2]),Min(no5l[l5-3],no5l[l5-4]));
+ lgpdn = Max(lgpdn,imax-imin);
+
+
+ kining=l5++;
+ // ref of the 4 edges
+ // ref of 3 edges
+ for (j=0;j<4;j++)
+ {
+ no5l[l5] = 0;
+ int i0 = (int) j;
+ int i1 = (i0+1) %4;
+ Int4 j1= no5l[4+i0];
+ Int4 j2= no5l[4+i1];
+ Int4 ji = Min(j1,j2)-1;
+ Int4 ja = j1+j2-2;
+ Edge *e=head[ji];
+ while (e)
+ if(Number((*e)[0])+Number((*e)[1]) == ja)
+ {
+ no5l[l5] = e->ref;
+ break;
+ }
+ else
+ e = link[Number(e)];
+ l5++;
+ }
+ if ( no5l[l5-1] || no5l[l5-2] || no5l[l5-3] || no5l[l5-4] )
+ ining=2;
+ else
+ l5 -= 4;
+
+ no5l[l5++] = v0->ref();
+ no5l[l5++] = v1->ref();
+ no5l[l5++] = v2->ref();
+ no5l[l5++] = v3->ref();
+ if (ining || no5l[l5-1] || no5l[l5-2] || no5l[l5-3] || no5l[l5-4] )
+ ining= ining ? ining : 3;
+ else
+ l5 -= 4;
+
+ }
+ else l5=0;
+
+ if (l5)
+ {
+ if (ining)
+ {
+ nef ++;
+ nmae = l5-kining;
+ no5l[kining] = ining;
+ }
+ else l5--;
+ no5l[1]=nmae;
+ // for all ref
+ for (j=kining+1;j<l5;j++)
+ {
+ no5l[j] = Abs(no5l[j]);
+ ndsr = Max(ndsr,no5l[j]);
+ }
+
+ if (f && i < 10 && verbosity > 10)
+ {
+ cout << " e[ " << i << " @" << i5 << "]=";
+ for (j=0;j<l5;j++)
+ cout << " " << no5l[j];
+ cout << endl;
+ }
+
+ if (f)
+ for (j=0;j<l5;j++)
+ *f << no5l[j];
+ i5 += l5;
+ }
+ }
+ if(verbosity>10)
+ cout << " fin write nopo 5 i5=" << i5 << " " << i5*4 << endl;
+ lnop5=i5;
+ lgpdn++; // add 1
+ delete [] reft;
+ delete [] head;
+ delete [] link;
+
+ }
+
+ void Triangles::Write_nopo(ostream &ff) const
+
+ {
+ Int4 nef=0;
+ Int4 lpgdn=0;
+ Int4 ndsr=0;
+ Int4 i;
+ Int4 ndsd=1;
+ Int4 lnop5=0;
+
+ OFortranUnFormattedFile f(ff);
+
+ for (i=0;i<NbSubDomains ;i++)
+ ndsd=Max(ndsd,subdomains[i].ref);
+
+ // to compute the lnop5,nef,lpgdn,ndsr parameter
+ Write_nop5(0,lnop5,nef,lpgdn,ndsr);
+
+ f.Record();
+
+ f << Int4(13)<<Int4(6)<<Int4(32)<<Int4(0)<<Int4(27)<<Int4(0) ;
+ f << Int4(nbv+nbv) ;
+ f << lnop5;
+ f << Int4(1 )<<Int4(1)<<Int4(1 )<<Int4(1)<<Int4(2)<<Int4(1);
+
+ f.Record(33*sizeof(Int4));
+
+ f << Int4(32) ;
+
+ //char *c=identity;
+ time_t timer =time(0);
+ char buf[10];
+ strftime(buf ,10,"%y/%m/%d",localtime(&timer));
+ f.write4(identity,20);
+ f.write4(buf,2);
+ f.write4("created with BAMG",6);
+ f.write4("NOPO",1);
+
+
+ f << Int4(0) << Int4(1) << Int4(0) ;
+ f.Record();
+ Int4 nbquad= NbOfQuad;
+ Int4 nbtria= nbt-NbOutT - 2*NbOfQuad;
+
+ cout << " lnop5 = " << lnop5 << endl;
+ cout << " nbquad = " << nbquad << endl;
+ cout << " nbtrai = " << nbtria << endl;
+ cout << " lpgdn = " << lpgdn << endl;
+ cout << " nef = " << nef << endl;
+ cout << " np = " << nbv << endl;
+ cout << " ndsr = " << ndsr << endl;
+ f << Int4(27)
+ << Int4(2) << ndsr << ndsd << Int4(1) << nbtria+nbquad
+ << Int4(0) << Int4(0) << nbtria << nbquad << Int4(0)
+ << Int4(0) << Int4(0) << Int4(0) << nef << Int4(nbv)
+ << Int4(0) << Int4(0) << Int4(0) << Int4(0) << Int4(0)
+ << Int4(0) << nbv << Int4(2) << lpgdn << Int4(0)
+ << lnop5 << Int4(1) ;
+ f.Record();
+ f << (Int4) 2*nbv;
+ for (i=0;i<nbv;i++)
+ f << (float) vertices[i].r.x << (float) vertices[i].r.y;
+ f.Record();
+ f << lnop5;
+ Write_nop5(&f,lnop5,nef,lpgdn,ndsr);
+ // cout << "fin write nopo" << endl;
+ }
+
+ void Triangles::Write_am_fmt(ostream &f) const
+ {
+ Int4 i,j;
+ assert(this && nbt);
+ Int4 * reft = new Int4[nbt];
+ Int4 nbInT = ConsRefTriangle(reft);
+ f.precision(12);
+ f << nbv << " " << nbInT << endl;
+ for (i=0;i<nbt;i++)
+ if(reft[i]>=0)
+ {
+ f << Number(triangles[i][0]) +1 << " " ;
+ f << Number(triangles[i][1]) +1 << " " ;
+ f << Number(triangles[i][2]) +1 << " " ;
+ f << endl;
+ }
+ for (i=0;i<nbv;i++)
+ f << vertices[i].r.x << " " << vertices[i].r.y << endl;
+ for (j=i=0;i<nbt;i++)
+ if (reft[i]>=0)
+ f << subdomains[reft[i]].ref << (j++%10 == 9 ? '\n' : ' ');
+ f << endl;
+ for (i=0;i<nbv;i++)
+ f << vertices[i].ref() << (i%10 == 9 ? '\n' : ' ');
+ f << endl;
+ delete [] reft;
+
+
+ }
+
+ void Triangles::Write_am(ostream &ff) const
+ {
+ OFortranUnFormattedFile f(ff);
+ Int4 i,j;
+ assert(this && nbt);
+ Int4 * reft = new Int4[nbt];
+ Int4 nbInT = ConsRefTriangle(reft);
+ f.Record();
+ f << nbv << nbInT ;
+ f.Record();
+ for (i=0;i<nbt;i++)
+ if(reft[i]>=0)
+ {
+ f << Number(triangles[i][0]) +1 ;
+ f << Number(triangles[i][1]) +1 ;
+ f << Number(triangles[i][2]) +1 ;
+ }
+ for (i=0;i<nbv;i++)
+ {
+ float x= vertices[i].r.x;
+ float y= vertices[i].r.y;
+ f << x << y ;
+ }
+ for (j=i=0;i<nbt;i++)
+ if (reft[i]>=0)
+ f << subdomains[reft[i]].ref;
+ for (i=0;i<nbv;i++)
+ f << vertices[i].ref() ;
+ delete [] reft;
+ }
+
+ void Triangles::Write_ftq(ostream &f) const
+ {
+
+ Int4 i;
+ assert(this && nbt);
+ Int4 * reft = new Int4[nbt];
+ Int4 nbInT = ConsRefTriangle(reft);
+ f.precision(12);
+ Int4 nele = nbInT-NbOfQuad;
+ Int4 ntri = nbInT-2*NbOfQuad;
+ Int4 nqua = NbOfQuad;
+
+ f << nbv << " " << nele << " " << ntri << " " << nqua << endl;
+ Int4 k=0;
+ for( i=0;i<nbt;i++)
+ {
+ Triangle & t = triangles[i];
+ Triangle * ta; //
+ Vertex *v0,*v1,*v2,*v3;
+ if (reft[i]<0) continue;
+ ta = t.Quadrangle(v0,v1,v2,v3);
+ if (!ta)
+ { // a triangles
+ f << "3 "
+ << Number(triangles[i][0]) +1 << " "
+ << Number(triangles[i][1]) +1 << " "
+ << Number(triangles[i][2]) +1 << " "
+ << subdomains[reft[i]].ref << endl;
+ k++;
+ }
+ if ( &t<ta)
+ {
+ k++;
+ f << "4 " << Number(v0)+1 << " " << Number(v1)+1 << " "
+ << Number(v2)+1 << " " << Number(v3)+1 << " "
+ << subdomains[reft[i]].ref << endl;
+ }
+ }
+ assert(k == nele);
+
+ for (i=0;i<nbv;i++)
+ f << vertices[i].r.x << " " << vertices[i].r.y
+ << " " << vertices[i].ref() << endl;
+ delete [] reft;
+
+
+ }
+ void Triangles::Write_msh(ostream &f) const
+ {
+ Int4 i;
+ assert(this && nbt);
+ Int4 * reft = new Int4[nbt];
+ Int4 nbInT = ConsRefTriangle(reft);
+ f.precision(12);
+ f << nbv << " " << nbInT << " " << nbe << endl;
+
+ for (i=0;i<nbv;i++)
+ f << vertices[i].r.x << " " << vertices[i].r.y << " "
+ << vertices[i].ref() << endl;
+
+ for (i=0;i<nbt;i++)
+ if(reft[i]>=0)
+ f << Number(triangles[i][0]) +1 << " "
+ << Number(triangles[i][1]) +1 << " "
+ << Number(triangles[i][2]) +1 << " "
+ << subdomains[reft[i]].ref << endl;
+
+
+ for (i=0;i<nbe;i++)
+ f << Number(edges[i][0]) +1 << " " << Number(edges[i][1]) +1
+ << " " << edges[i].ref << endl;
+
+ delete [] reft;
+
+ }
+
+
+ //-----------------------------ajout format hdf5-----------------------------//
+ void Triangles::Write_hdf5(const char * f) const
+ {
+#ifdef HAVE_HDF5
+ Int4 i;
+ assert(this && nbt);
+ Int4 * reft = new Int4[nbt];
+ Int4 nbInT = ConsRefTriangle(reft);
+ float coord[nbv][2];
+ int Connectivity[nbInT][3];
+
+ for (i=0;i<nbv;i++)
+ {
+ coord[i][0]=vertices[i].r.x;
+ coord[i][1]=vertices[i].r.y;
+ }
+
+ for (i=0;i<nbt;i++)
+ {
+ if(reft[i]>=0)
+ {
+ Connectivity[i][0]=Number(triangles[i][0]);
+ Connectivity[i][1]=Number(triangles[i][1]);
+ Connectivity[i][2]=Number(triangles[i][2]);
+ }
+ }
+
+ // write hdf5 file
+ WriteHdf5 * Hdf5MeshFile2D = new WriteHdf5(f,nbInT,nbv);
+ Hdf5MeshFile2D->WriteHdf5MeshFile2D(coord, Connectivity);
+ delete Hdf5MeshFile2D;
+
+ // write xdmf file
+ WriteXdmf * XdmfMeshFile2D = new WriteXdmf(f,nbInT,nbv);
+ XdmfMeshFile2D->WriteXdmfMeshFile2D();
+ delete XdmfMeshFile2D;
+
+ delete [] reft;
+#else
+ cerr << " Sorry no hdf5 on with computer= no Write_hdf5 of" << f << endl;
+ MeshError(9999,this);
+#endif
+ }
+ //-----------------------------ajout format hdf5-----------------------------//
+
+
+
+
+
+ void Triangles::Write_amdba(ostream &f) const
+ {
+ assert(this && nbt);
+
+ Int4 i,j;
+ Int4 * reft = new Int4[nbt];
+ Int4 nbInT = ConsRefTriangle(reft);
+ f << nbv << " " << nbInT << endl;
+ cout.precision(12);
+ for (i=0;i<nbv;i++)
+ f << i+1 << " "
+ << vertices[i].r.x
+ << " " << vertices[i].r.y
+ << " " << vertices[i].ref() << endl;
+ j=1;
+ for (i=0;i<nbt;i++)
+ if(reft[i]>=0)
++=======
++
++
++namespace bamg {
++
++void Triangles::Write(const char * filename,const TypeFileMesh typein )
++{
++ TypeFileMesh type = typein;
++ const char * gsuffix=".gmsh";
++ int ls=0;
++ int lll = strlen(filename);
++ if (type==AutoMesh)
++ {
++ type = BDMesh;
++ if (!strcmp(filename + lll - (ls=7),".am_fmt")) type = am_fmtMesh;
++ else if (!strcmp(filename + lll - (ls=6),".amdba")) type = amdbaMesh;
++ else if (!strcmp(filename + lll - (ls=3),".am")) type = amMesh;
++ else if (!strcmp(filename + lll - (ls=5),".nopo")) type = NOPOMesh;
++ else if (!strcmp(filename + lll - (ls=4),".msh")) type = mshMesh;
++ else if (!strcmp(filename + lll - (ls=4),".ftq")) type = ftqMesh;
++ else if (!strcmp(filename + lll - (ls=7),".AM_FMT")) type = am_fmtMesh;
++ else if (!strcmp(filename + lll - (ls=6),".AMDBA")) type = amdbaMesh;
++ else if (!strcmp(filename + lll - (ls=3),".AM")) type = amMesh;
++ else if (!strcmp(filename + lll - (ls=5),".NOPO")) type = NOPOMesh;
++ else if (!strcmp(filename + lll - (ls=4),".MSH")) type = mshMesh;
++ else if (!strcmp(filename + lll - (ls=4),".FTQ")) type = ftqMesh;
++ else ls=0;
++ }
++ if (verbosity>1)
++ {
++ cout << " -- Writing the file " << filename << " of type " ;
++ switch (type)
++ {
++ case BDMesh : cout << " BD Mesh " ; break;
++ case NOPOMesh : cout << " NOPO " ; break;
++ case amMesh : cout << " am " ; break;
++ case am_fmtMesh : cout << " am_fmt " ; break;
++ case amdbaMesh : cout << " amdba " ; break;
++ case ftqMesh : cout << " ftq " ; break;
++ case mshMesh : cout << " msh " ; break;
++ default:
++ cerr << endl
++ << " Unkown type mesh file " << (int) type << " for Writing " << filename <<endl;
++ MeshError(1);
++ }
++ Int4 NbOfTria = nbt-2*NbOfQuad-NbOutT ;
++ if (NbOfTria) cout << " NbOfTria = " << NbOfTria;
++ if (NbOfQuad) cout << " NbOfQuad = " << NbOfQuad;
++ if (nbe) cout << " NbOfRefEdge = " << nbe ;
++ cout << endl;
++
++ }
++ ofstream f(filename /*,ios::trunc*/);
++ f.precision(12);
++
++ if (f)
++ switch (type)
++ {
++ case BDMesh :
++ {
++ if ( ! Gh.OnDisk)
++ {
++ delete [] Gh.name;
++ Gh.name = new char[lll+1+strlen(gsuffix)];
++ strcpy(Gh.name,filename);
++ if (Gh.name[lll-ls-1]=='.') strcpy(Gh.name+lll-ls, gsuffix+1);
++ else strcpy(Gh.name+lll-ls,gsuffix);
++ cout << " write geo in " << Gh.name << endl;
++ ofstream f(Gh.name) ;
++ f << Gh ;
++ Gh.OnDisk=true;
++ }
++ f << *this ;
++ break;
++ }
++ case NOPOMesh : Write_nopo(f) ; break;
++ case amMesh : Write_am(f) ; break;
++ case am_fmtMesh : Write_am_fmt(f); break;
++ case amdbaMesh : Write_amdba(f) ; break;
++ case ftqMesh : Write_ftq(f) ; break;
++ case mshMesh : Write_msh(f) ; break;
++ default:
++ cerr << " Unkown type mesh file " << (int) type << " for Writing " << filename <<endl;
++ MeshError(1);
++ }
++ else
++ {
++ cerr << " Error openning file " << filename << endl;
++ MeshError(1);
++ }
++ if(verbosity>5)
++ cout << "end write" << endl;
++
++}
++void Triangles::Write_nop5(OFortranUnFormattedFile * f,
++ Int4 &lnop5,Int4 &nef,Int4 &lgpdn,Int4 ndsr) const
++{
++ ndsr =0;
++ Int4 * reft = new Int4[nbt];
++ //Int4 nbInT = ;
++ ConsRefTriangle(reft);
++ Int4 no5l[20];
++
++ Int4 i5 = 0;
++ Int4 i,j,k=0,l5;
++ // Int4 ining=0;
++ Int4 imax,imin;
++
++ lgpdn = 0;
++ nef=0;
++ // construction of a liste linked of edge
++ Edge ** head = new Edge *[nbv];
++ Edge ** link = new Edge * [nbe];
++ for (i=0;i<nbv;i++)
++ head[i]=0; // empty liste
++
++ for (i=0;i<nbe;i++)
++ {
++ j = Min(Number(edges[i][0]),Number(edges[i][1]));
++ link[i]=head[j];
++ head[j]=edges +i;
++ }
++ for ( i=0;i<nbt;i++)
++ {
++ no5l[0] = 0;
++ Int4 kining=0;
++ Int4 ining=0;
++ Int4 nmae =0;
++ Int4 np=0;
++ l5 = 2;
++ Triangle & t = triangles[i];
++ Triangle * ta; //
++ Vertex *v0,*v1,*v2,*v3;
++ if (reft[i]<0) continue;
++ ta = t.Quadrangle(v0,v1,v2,v3);
++ if (!ta)
++ { // a triangles
++ no5l[l5++] = Max(subdomains[reft[i]].ref,(Int4) 1);
++ np = 3;
++ no5l[l5++] = np;
++ no5l[0] = np;
++ no5l[l5++] = Number(triangles[i][0]) +1;
++ no5l[l5++] = Number(triangles[i][1]) +1;
++ no5l[l5++] = Number(triangles[i][2]) +1;
++ imax = Max3(no5l[l5-1],no5l[l5-2],no5l[l5-3]);
++ imin = Min3(no5l[l5-1],no5l[l5-2],no5l[l5-3]);
++ lgpdn = Max(lgpdn,imax-imin);
++ kining=l5++;
++ // ref of 3 edges
++ for (j=0;j<3;j++)
++ {
++ no5l[l5] = 0;
++ int i0 = (int) j;
++ int i1 = (i0+1) %3;
++ Int4 j1= no5l[4+i0];
++ Int4 j2= no5l[4+i1];
++ Int4 ji = Min(j1,j2)-1;
++ Int4 ja = j1+j2-2;
++ Edge * e=head[ji];
++ while (e)
++ if(Number((*e)[0])+Number((*e)[1]) == ja)
++ {
++ no5l[l5] = e->ref;
++ break;
++ }
++ else
++ e = link[Number(e)];
++ l5++;
++ }
++ if ( no5l[l5-1] || no5l[l5-2] || no5l[l5-3] )
++ ining=2;
++ else
++ l5 -= 3;
++
++ no5l[l5++] = triangles[i][0].ref();
++ no5l[l5++] = triangles[i][1].ref();
++ no5l[l5++] = triangles[i][2].ref();
++ if (ining || no5l[l5-1] || no5l[l5-2] || no5l[l5-3] )
++ ining= ining ? ining : 3;
++ else
++ l5 -= 3,ining=0;
++
++
++ }
++ else if ( &t<ta)
++ {
++ k++;
++ no5l[l5++] = Max(subdomains[reft[i]].ref,(Int4) 1);
++ np =4;
++ no5l[l5++] = np;
++ no5l[0] = np;
++
++ no5l[l5++] = Number(v0) +1;
++ no5l[l5++] = Number(v1) +1;
++ no5l[l5++] = Number(v2) +1;
++ no5l[l5++] = Number(v3) +1;
++
++ imax = Max(Max(no5l[l5-1],no5l[l5-2]),Max(no5l[l5-3],no5l[l5-4]));
++ imin = Min(Min(no5l[l5-1],no5l[l5-2]),Min(no5l[l5-3],no5l[l5-4]));
++ lgpdn = Max(lgpdn,imax-imin);
++
++
++ kining=l5++;
++ // ref of the 4 edges
++ // ref of 3 edges
++ for (j=0;j<4;j++)
++ {
++ no5l[l5] = 0;
++ int i0 = (int) j;
++ int i1 = (i0+1) %4;
++ Int4 j1= no5l[4+i0];
++ Int4 j2= no5l[4+i1];
++ Int4 ji = Min(j1,j2)-1;
++ Int4 ja = j1+j2-2;
++ Edge *e=head[ji];
++ while (e)
++ if(Number((*e)[0])+Number((*e)[1]) == ja)
++ {
++ no5l[l5] = e->ref;
++ break;
++ }
++ else
++ e = link[Number(e)];
++ l5++;
++ }
++ if ( no5l[l5-1] || no5l[l5-2] || no5l[l5-3] || no5l[l5-4] )
++ ining=2;
++ else
++ l5 -= 4;
++
++ no5l[l5++] = v0->ref();
++ no5l[l5++] = v1->ref();
++ no5l[l5++] = v2->ref();
++ no5l[l5++] = v3->ref();
++ if (ining || no5l[l5-1] || no5l[l5-2] || no5l[l5-3] || no5l[l5-4] )
++ ining= ining ? ining : 3;
++ else
++ l5 -= 4;
++
++ }
++ else l5=0;
++
++ if (l5)
++ {
++ if (ining)
++ {
++ nef ++;
++ nmae = l5-kining;
++ no5l[kining] = ining;
++ }
++ else l5--;
++ no5l[1]=nmae;
++ // for all ref
++ for (j=kining+1;j<l5;j++)
++ {
++ no5l[j] = Abs(no5l[j]);
++ ndsr = Max(ndsr,no5l[j]);
++ }
++
++ if (f && i < 10 && verbosity > 10)
++ {
++ cout << " e[ " << i << " @" << i5 << "]=";
++ for (j=0;j<l5;j++)
++ cout << " " << no5l[j];
++ cout << endl;
++ }
++
++ if (f)
++ for (j=0;j<l5;j++)
++ *f << no5l[j];
++ i5 += l5;
++ }
++ }
++ if(verbosity>10)
++ cout << " fin write nopo 5 i5=" << i5 << " " << i5*4 << endl;
++ lnop5=i5;
++ lgpdn++; // add 1
++ delete [] reft;
++ delete [] head;
++ delete [] link;
++
++}
++
++void Triangles::Write_nopo(ostream &ff) const
++
++{
++ Int4 nef=0;
++ Int4 lpgdn=0;
++ Int4 ndsr=0;
++ Int4 i;
++ Int4 ndsd=1;
++ Int4 lnop5=0;
++
++ OFortranUnFormattedFile f(ff);
++
++ for (i=0;i<NbSubDomains ;i++)
++ ndsd=Max(ndsd,subdomains[i].ref);
++
++ // to compute the lnop5,nef,lpgdn,ndsr parameter
++ Write_nop5(0,lnop5,nef,lpgdn,ndsr);
++
++ f.Record();
++
++ f << Int4(13)<<Int4(6)<<Int4(32)<<Int4(0)<<Int4(27)<<Int4(0) ;
++ f << Int4(nbv+nbv) ;
++ f << lnop5;
++ f << Int4(1 )<<Int4(1)<<Int4(1 )<<Int4(1)<<Int4(2)<<Int4(1);
++
++ f.Record(33*sizeof(Int4));
++
++ f << Int4(32) ;
++
++ //char *c=identity;
++ time_t timer =time(0);
++ char buf[10];
++ strftime(buf ,10,"%y/%m/%d",localtime(&timer));
++ f.write4(identity,20);
++ f.write4(buf,2);
++ f.write4("created with BAMG",6);
++ f.write4("NOPO",1);
++
++
++ f << Int4(0) << Int4(1) << Int4(0) ;
++ f.Record();
++ Int4 nbquad= NbOfQuad;
++ Int4 nbtria= nbt-NbOutT - 2*NbOfQuad;
++
++ cout << " lnop5 = " << lnop5 << endl;
++ cout << " nbquad = " << nbquad << endl;
++ cout << " nbtrai = " << nbtria << endl;
++ cout << " lpgdn = " << lpgdn << endl;
++ cout << " nef = " << nef << endl;
++ cout << " np = " << nbv << endl;
++ cout << " ndsr = " << ndsr << endl;
++ f << Int4(27)
++ << Int4(2) << ndsr << ndsd << Int4(1) << nbtria+nbquad
++ << Int4(0) << Int4(0) << nbtria << nbquad << Int4(0)
++ << Int4(0) << Int4(0) << Int4(0) << nef << Int4(nbv)
++ << Int4(0) << Int4(0) << Int4(0) << Int4(0) << Int4(0)
++ << Int4(0) << nbv << Int4(2) << lpgdn << Int4(0)
++ << lnop5 << Int4(1) ;
++ f.Record();
++ f << (Int4) 2*nbv;
++ for (i=0;i<nbv;i++)
++ f << (float) vertices[i].r.x << (float) vertices[i].r.y;
++ f.Record();
++ f << lnop5;
++ Write_nop5(&f,lnop5,nef,lpgdn,ndsr);
++ // cout << "fin write nopo" << endl;
++}
++
++void Triangles::Write_am_fmt(ostream &f) const
++{
++ Int4 i,j;
++ assert(this && nbt);
++ Int4 * reft = new Int4[nbt];
++ Int4 nbInT = ConsRefTriangle(reft);
++ f.precision(12);
++ f << nbv << " " << nbInT << endl;
++ for (i=0;i<nbt;i++)
++ if(reft[i]>=0)
++ {
++ f << Number(triangles[i][0]) +1 << " " ;
++ f << Number(triangles[i][1]) +1 << " " ;
++ f << Number(triangles[i][2]) +1 << " " ;
++ f << endl;
++ }
++ for (i=0;i<nbv;i++)
++ f << vertices[i].r.x << " " << vertices[i].r.y << endl;
++ for (j=i=0;i<nbt;i++)
++ if (reft[i]>=0)
++ f << subdomains[reft[i]].ref << (j++%10 == 9 ? '\n' : ' ');
++ f << endl;
++ for (i=0;i<nbv;i++)
++ f << vertices[i].ref() << (i%10 == 9 ? '\n' : ' ');
++ f << endl;
++ delete [] reft;
++
++
++}
++
++void Triangles::Write_am(ostream &ff) const
++{
++ OFortranUnFormattedFile f(ff);
++ Int4 i,j;
++ assert(this && nbt);
++ Int4 * reft = new Int4[nbt];
++ Int4 nbInT = ConsRefTriangle(reft);
++ f.Record();
++ f << nbv << nbInT ;
++ f.Record();
++ for (i=0;i<nbt;i++)
++ if(reft[i]>=0)
++ {
++ f << Number(triangles[i][0]) +1 ;
++ f << Number(triangles[i][1]) +1 ;
++ f << Number(triangles[i][2]) +1 ;
++ }
++ for (i=0;i<nbv;i++)
++ {
++ float x= vertices[i].r.x;
++ float y= vertices[i].r.y;
++ f << x << y ;
++ }
++ for (j=i=0;i<nbt;i++)
++ if (reft[i]>=0)
++ f << subdomains[reft[i]].ref;
++ for (i=0;i<nbv;i++)
++ f << vertices[i].ref() ;
++ delete [] reft;
++}
++
++void Triangles::Write_ftq(ostream &f) const
++{
++
++ Int4 i;
++ assert(this && nbt);
++ Int4 * reft = new Int4[nbt];
++ Int4 nbInT = ConsRefTriangle(reft);
++ f.precision(12);
++ Int4 nele = nbInT-NbOfQuad;
++ Int4 ntri = nbInT-2*NbOfQuad;
++ Int4 nqua = NbOfQuad;
++
++ f << nbv << " " << nele << " " << ntri << " " << nqua << endl;
++ Int4 k=0;
++ for( i=0;i<nbt;i++)
++ {
++ Triangle & t = triangles[i];
++ Triangle * ta; //
++ Vertex *v0,*v1,*v2,*v3;
++ if (reft[i]<0) continue;
++ ta = t.Quadrangle(v0,v1,v2,v3);
++ if (!ta)
++ { // a triangles
++ f << "3 "
++ << Number(triangles[i][0]) +1 << " "
++ << Number(triangles[i][1]) +1 << " "
++ << Number(triangles[i][2]) +1 << " "
++ << subdomains[reft[i]].ref << endl;
++ k++;
++ }
++ if ( &t<ta)
++ {
++ k++;
++ f << "4 " << Number(v0)+1 << " " << Number(v1)+1 << " "
++ << Number(v2)+1 << " " << Number(v3)+1 << " "
++ << subdomains[reft[i]].ref << endl;
++ }
++ }
++ assert(k == nele);
++
++ for (i=0;i<nbv;i++)
++ f << vertices[i].r.x << " " << vertices[i].r.y
++ << " " << vertices[i].ref() << endl;
++ delete [] reft;
++
++
++}
++void Triangles::Write_msh(ostream &f) const
++{
++ Int4 i;
++ assert(this && nbt);
++ Int4 * reft = new Int4[nbt];
++ Int4 nbInT = ConsRefTriangle(reft);
++ f.precision(12);
++ f << nbv << " " << nbInT << " " << nbe << endl;
++
++ for (i=0;i<nbv;i++)
++ f << vertices[i].r.x << " " << vertices[i].r.y << " "
++ << vertices[i].ref() << endl;
++
++ for (i=0;i<nbt;i++)
++ if(reft[i]>=0)
++ f << Number(triangles[i][0]) +1 << " "
++ << Number(triangles[i][1]) +1 << " "
++ << Number(triangles[i][2]) +1 << " "
++ << subdomains[reft[i]].ref << endl;
++
++
++ for (i=0;i<nbe;i++)
++ f << Number(edges[i][0]) +1 << " " << Number(edges[i][1]) +1
++ << " " << edges[i].ref << endl;
++
++ delete [] reft;
++
++}
++
++void Triangles::Write_amdba(ostream &f) const
++{
++ assert(this && nbt);
++
++ Int4 i,j;
++ Int4 * reft = new Int4[nbt];
++ Int4 nbInT = ConsRefTriangle(reft);
++ f << nbv << " " << nbInT << endl;
++ cout.precision(12);
++ for (i=0;i<nbv;i++)
++ f << i+1 << " "
++ << vertices[i].r.x
++ << " " << vertices[i].r.y
++ << " " << vertices[i].ref() << endl;
++ j=1;
++ for (i=0;i<nbt;i++)
++ if(reft[i]>=0)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ f << j++ << " "
+ << Number(triangles[i][0]) +1 << " "
+ << Number(triangles[i][1]) +1 << " "
+ << Number(triangles[i][2]) +1 << " "
+ << subdomains[reft[i]].ref << endl ;
++<<<<<<< HEAD
+ f << endl;
+ delete [] reft;
+
+
+ }
+
+ void Triangles::Write(const char * filename)
+ {
+ ofstream f(filename);
+ if (f)
+ {
+ if (name) delete name;
+ name = new char[strlen(filename)+1];
+ strcpy(name,filename);
+ OnDisk =1;
+ f << *this;
+ }
+ }
+ void Triangles::WriteElements(ostream& f,Int4 * reft ,Int4 nbInT) const
+ {
+ const Triangles & Th= *this;
+ // do triangle and quad
+ if(verbosity>9)
+ cout << " In Triangles::WriteElements " << endl
+ << " Nb of In triangles " << nbInT-Th.NbOfQuad*2 << endl
+ << " Nb of Quadrilaterals " << Th.NbOfQuad << endl
+ << " Nb of in+out+quad triangles " << Th.nbt << " " << nbInT << endl;
+
+ Int4 k=nbInT-Th.NbOfQuad*2;
+ Int4 num =0;
+ if (k>0) {
+ f << "\nTriangles\n"<< k << endl;
+ for(Int4 i=0;i<Th.nbt;i++)
+ {
+ Triangle & t = Th.triangles[i];
+ if (reft[i]>=0 && !( t.Hidden(0) || t.Hidden(1) || t.Hidden(2) ))
+ { k--;
+ f << Th.Number(t[0])+1 << " " << Th.Number(t[1])+1
+ << " " << Th.Number(t[2])+1 << " " << Th.subdomains[reft[i]].ref << endl;
+ reft[i] = ++num;
+ }
+ }
+ }
+ if (Th.NbOfQuad>0) {
+ f << "\nQuadrilaterals\n"<<Th.NbOfQuad << endl;
+ k = Th.NbOfQuad;
+ for(Int4 i=0;i<Th.nbt;i++)
+ {
+ Triangle & t = Th.triangles[i];
+ Triangle * ta; //
+ Vertex *v0,*v1,*v2,*v3;
+ if (reft[i]<0) continue;
+ if ((ta=t.Quadrangle(v0,v1,v2,v3)) !=0 && &t<ta)
+ {
+ k--;
+ f << Th.Number(v0)+1 << " " << Th.Number(v1)+1 << " "
+ << Th.Number(v2)+1 << " " << Th.Number(v3)+1 << " "
+ << Th.subdomains[reft[i]].ref << endl;
+ reft[i] = ++num;
+ reft[Number(ta)] = num;
+ }
+ }
+ assert(k==0);
+ }
+ // warning reft is now the element number
+ }
+
+ ostream& operator <<(ostream& f, const Triangles & Th)
+ {
+ // Th.FindSubDomain();
+ // warning just on say the class is on the disk
+ // ((Triangles *) &Th)->OnDisk = 1;
+
+ Int4 * reft = new Int4[Th.nbt];
+ Int4 nbInT = Th.ConsRefTriangle(reft);
+ {
+ f << "MeshVersionFormatted 0" <<endl;
+ f << "\nDimension\n" << 2 << endl;
+ f << "\nIdentifier\n" ;
+ WriteStr(f,Th.identity);
+ f << "\n\nGeometry\n" ;
+ if( Th.Gh.OnDisk)
+ WriteStr(f,Th.Gh.name), f <<endl;
+ else
+ { // empty file name -> geom in same file
+ f << "\"\"" << endl << endl;
+ f << "# BEGIN of the include geometry file because geometry is not on the disk"
+ << Th.Gh << endl;
+ f << "End" << endl
+ << "# END of the include geometrie file because geometry is not on the disk"
+ << endl ;
+ }
+ }
+ {
+ f.precision(12);
+ f << "\nVertices\n" << Th.nbv <<endl;
+ for (Int4 i=0;i<Th.nbv;i++)
+ {
+ Vertex & v = Th.vertices[i];
+ f << v.r.x << " " << v.r.y << " " << v.ref() << endl;
+ }
+ }
+ Int4 ie;
+ {
+ f << "\nEdges\n"<< Th.nbe << endl;
+ for(ie=0;ie<Th.nbe;ie++)
+ {
+ Edge & e = Th.edges[ie];
+ f << Th.Number(e[0])+1 << " " << Th.Number(e[1])+1;
+ f << " " << e.ref <<endl;
+ }
+ if(Th.NbCrackedEdges)
+ {
+ f << "\nCrackedEdges\n"<< Th.NbCrackedEdges << endl;
+ for( ie=0;ie<Th.NbCrackedEdges;ie++)
+ {
+ Edge & e1 = *Th.CrackedEdges[ie].a.edge;
+ Edge & e2 = *Th.CrackedEdges[ie].b.edge;
+ f << Th.Number(e1)+1 << " " << Th.Number(e2)+1 <<endl;;
+ }
+ }
+ }
+
+ Th.WriteElements(f,reft,nbInT);
+ {
+ f << "\nSubDomainFromMesh\n" << Th.NbSubDomains<< endl ;
+ for (Int4 i=0;i<Th.NbSubDomains;i++)
+ f << 3 << " " << reft[Th.Number(Th.subdomains[i].head)] << " " << 1 << " "
+ << Th.subdomains[i].ref << endl;
+
+ }
+ if (Th.Gh.NbSubDomains)
+ {
+ f << "\nSubDomainFromGeom\n" << Th.Gh.NbSubDomains << endl ;
+ for (Int4 i=0;i<Th.NbSubDomains;i++)
+ {
+ f << 2 << " " << Th.Number(Th.subdomains[i].edge)+1 << " "
+ << Th.subdomains[i].sens << " " << Th.Gh.subdomains[i].ref << endl;
+ }
+ }
+ {
+ f << "\nVertexOnGeometricVertex\n"<< Th.NbVerticesOnGeomVertex << endl;
+ for (Int4 i0=0;i0<Th.NbVerticesOnGeomVertex;i0++)
+ {
+ VertexOnGeom & v =Th.VerticesOnGeomVertex[i0];
+ assert(v.OnGeomVertex()) ;
+ f << " " << Th.Number(( Vertex *)v)+1
+ << " " << Th.Gh.Number(( GeometricalVertex * )v)+1
+ << endl;
+ }
+ }
+ {
+ f << "\nVertexOnGeometricEdge\n"<< Th.NbVerticesOnGeomEdge << endl;
+ for (Int4 i0=0;i0<Th.NbVerticesOnGeomEdge;i0++)
+ {
+ const VertexOnGeom & v =Th.VerticesOnGeomEdge[i0];
+ assert(v.OnGeomEdge()) ;
+ f << " " << Th.Number((Vertex * )v)+1 ;
+ f << " " << Th.Gh.Number((const GeometricalEdge * )v)+1 ;
+ f << " " << (Real8 ) v << endl;
+ }
+ }
+ {
+ Int4 i0,k=0;
+
+ for (i0=0;i0<Th.nbe;i0++)
+ if ( Th.edges[i0].on ) k++;
+
+ f << "\nEdgeOnGeometricEdge\n"<< k << endl;
++=======
++ f << endl;
++ delete [] reft;
++
++
++}
++
++void Triangles::Write(const char * filename)
++{
++ ofstream f(filename);
++ if (f)
++ {
++ if (name) delete name;
++ name = new char[strlen(filename)+1];
++ strcpy(name,filename);
++ OnDisk =1;
++ f << *this;
++ }
++}
++void Triangles::WriteElements(ostream& f,Int4 * reft ,Int4 nbInT) const
++ {
++ const Triangles & Th= *this;
++ // do triangle and quad
++ if(verbosity>9)
++ cout << " In Triangles::WriteElements " << endl
++ << " Nb of In triangles " << nbInT-Th.NbOfQuad*2 << endl
++ << " Nb of Quadrilaterals " << Th.NbOfQuad << endl
++ << " Nb of in+out+quad triangles " << Th.nbt << " " << nbInT << endl;
++
++ Int4 k=nbInT-Th.NbOfQuad*2;
++ Int4 num =0;
++ if (k>0) {
++ f << "\nTriangles\n"<< k << endl;
++ for(Int4 i=0;i<Th.nbt;i++)
++ {
++ Triangle & t = Th.triangles[i];
++ if (reft[i]>=0 && !( t.Hidden(0) || t.Hidden(1) || t.Hidden(2) ))
++ { k--;
++ f << Th.Number(t[0])+1 << " " << Th.Number(t[1])+1
++ << " " << Th.Number(t[2])+1 << " " << Th.subdomains[reft[i]].ref << endl;
++ reft[i] = ++num;
++ }
++ }
++ }
++ if (Th.NbOfQuad>0) {
++ f << "\nQuadrilaterals\n"<<Th.NbOfQuad << endl;
++ k = Th.NbOfQuad;
++ for(Int4 i=0;i<Th.nbt;i++)
++ {
++ Triangle & t = Th.triangles[i];
++ Triangle * ta; //
++ Vertex *v0,*v1,*v2,*v3;
++ if (reft[i]<0) continue;
++ if ((ta=t.Quadrangle(v0,v1,v2,v3)) !=0 && &t<ta)
++ {
++ k--;
++ f << Th.Number(v0)+1 << " " << Th.Number(v1)+1 << " "
++ << Th.Number(v2)+1 << " " << Th.Number(v3)+1 << " "
++ << Th.subdomains[reft[i]].ref << endl;
++ reft[i] = ++num;
++ reft[Number(ta)] = num;
++ }
++ }
++ assert(k==0);
++ }
++ // warning reft is now the element number
++ }
++
++ostream& operator <<(ostream& f, const Triangles & Th)
++ {
++ // Th.FindSubDomain();
++ // warning just on say the class is on the disk
++ // ((Triangles *) &Th)->OnDisk = 1;
++
++ Int4 * reft = new Int4[Th.nbt];
++ Int4 nbInT = Th.ConsRefTriangle(reft);
++ {
++ f << "MeshVersionFormatted 0" <<endl;
++ f << "\nDimension\n" << 2 << endl;
++ f << "\nIdentifier\n" ;
++ WriteStr(f,Th.identity);
++ f << "\n\nGeometry\n" ;
++ if( Th.Gh.OnDisk)
++ WriteStr(f,Th.Gh.name), f <<endl;
++ else
++ { // empty file name -> geom in same file
++ f << "\"\"" << endl << endl;
++ f << "# BEGIN of the include geometry file because geometry is not on the disk"
++ << Th.Gh << endl;
++ f << "End" << endl
++ << "# END of the include geometrie file because geometry is not on the disk"
++ << endl ;
++ }
++ }
++ {
++ f.precision(12);
++ f << "\nVertices\n" << Th.nbv <<endl;
++ for (Int4 i=0;i<Th.nbv;i++)
++ {
++ Vertex & v = Th.vertices[i];
++ f << v.r.x << " " << v.r.y << " " << v.ref() << endl;
++ }
++ }
++ Int4 ie;
++ {
++ f << "\nEdges\n"<< Th.nbe << endl;
++ for(ie=0;ie<Th.nbe;ie++)
++ {
++ Edge & e = Th.edges[ie];
++ f << Th.Number(e[0])+1 << " " << Th.Number(e[1])+1;
++ f << " " << e.ref <<endl;
++ }
++ if(Th.NbCrackedEdges)
++ {
++ f << "\nCrackedEdges\n"<< Th.NbCrackedEdges << endl;
++ for( ie=0;ie<Th.NbCrackedEdges;ie++)
++ {
++ Edge & e1 = *Th.CrackedEdges[ie].a.edge;
++ Edge & e2 = *Th.CrackedEdges[ie].b.edge;
++ f << Th.Number(e1)+1 << " " << Th.Number(e2)+1 <<endl;;
++ }
++ }
++ }
++
++ Th.WriteElements(f,reft,nbInT);
++ {
++ f << "\nSubDomainFromMesh\n" << Th.NbSubDomains<< endl ;
++ for (Int4 i=0;i<Th.NbSubDomains;i++)
++ f << 3 << " " << reft[Th.Number(Th.subdomains[i].head)] << " " << 1 << " "
++ << Th.subdomains[i].ref << endl;
++
++ }
++ if (Th.Gh.NbSubDomains)
++ {
++ f << "\nSubDomainFromGeom\n" << Th.Gh.NbSubDomains << endl ;
++ for (Int4 i=0;i<Th.NbSubDomains;i++)
++ {
++ f << 2 << " " << Th.Number(Th.subdomains[i].edge)+1 << " "
++ << Th.subdomains[i].sens << " " << Th.Gh.subdomains[i].ref << endl;
++ }
++ }
++ {
++ f << "\nVertexOnGeometricVertex\n"<< Th.NbVerticesOnGeomVertex << endl;
++ for (Int4 i0=0;i0<Th.NbVerticesOnGeomVertex;i0++)
++ {
++ VertexOnGeom & v =Th.VerticesOnGeomVertex[i0];
++ assert(v.OnGeomVertex()) ;
++ f << " " << Th.Number(( Vertex *)v)+1
++ << " " << Th.Gh.Number(( GeometricalVertex * )v)+1
++ << endl;
++ }
++ }
++ {
++ f << "\nVertexOnGeometricEdge\n"<< Th.NbVerticesOnGeomEdge << endl;
++ for (Int4 i0=0;i0<Th.NbVerticesOnGeomEdge;i0++)
++ {
++ const VertexOnGeom & v =Th.VerticesOnGeomEdge[i0];
++ assert(v.OnGeomEdge()) ;
++ f << " " << Th.Number((Vertex * )v)+1 ;
++ f << " " << Th.Gh.Number((const GeometricalEdge * )v)+1 ;
++ f << " " << (Real8 ) v << endl;
++ }
++ }
++ {
++ Int4 i0,k=0;
++
++ for (i0=0;i0<Th.nbe;i0++)
++ if ( Th.edges[i0].on ) k++;
++
++ f << "\nEdgeOnGeometricEdge\n"<< k << endl;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ for (i0=0;i0<Th.nbe;i0++)
+ if ( Th.edges[i0].on )
+ f << (i0+1) << " " << (1+Th.Gh.Number(Th.edges[i0].on)) << endl;
+ if (Th.NbCrackedEdges)
+ {
+ f << "\nCrackedEdges\n"<< Th.NbCrackedEdges << endl;
+ for(i0=0;i0< Th.NbCrackedEdges; i0++)
+ {
+ f << Th.Number(Th.CrackedEdges[i0].a.edge) << " " ;
+ f << Th.Number(Th.CrackedEdges[i0].b.edge) << endl;
+ }
+ }
++<<<<<<< HEAD
+ }
+ if (&Th.BTh != &Th && Th.BTh.OnDisk && Th.BTh.name)
+ {
+ int *mark=new int[Th.nbv];
+ Int4 i;
+ for (i=0;i<Th.nbv;i++)
+ mark[i]=-1;
+ f << "\nMeshSupportOfVertices\n" <<endl;
+ WriteStr(f,Th.BTh.name);
+ f <<endl;
+ f << "\nIdentityOfMeshSupport" << endl;
+ WriteStr(f,Th.BTh.identity);
+ f<<endl;
+
+ f << "\nVertexOnSupportVertex" << endl;
+ f<< Th.NbVertexOnBThVertex << endl;
+ for(i=0;i<Th.NbVertexOnBThVertex;i++) {
+ const VertexOnVertex & vov = Th.VertexOnBThVertex[i];
+ Int4 iv = Th.Number(vov.v);
+ mark[iv] =0;
+ f << iv+1<< " " << Th.BTh.Number(vov.bv)+1 << endl;}
+
+ f << "\nVertexOnSupportEdge" << endl;
+ f << Th.NbVertexOnBThEdge << endl;
+ for(i=0;i<Th.NbVertexOnBThEdge;i++) {
+ const VertexOnEdge & voe = Th.VertexOnBThEdge[i];
+ Int4 iv = Th.Number(voe.v);
+ // assert(mark[iv] == -1]);
+ mark[iv] = 1;
+ f << iv+1 << " " << Th.BTh.Number(voe.be)+1 << " " << voe.abcisse << endl;}
+
+ f << "\nVertexOnSupportTriangle" << endl;
+ Int4 k = Th.nbv - Th.NbVertexOnBThEdge - Th.NbVertexOnBThVertex;
+ f << k << endl;
+ // Int4 kkk=0;
+ CurrentTh=&Th.BTh;
+ for (i=0;i<Th.nbv;i++)
+ if (mark[i] == -1) {
+ k--;
+ Icoor2 dete[3];
+ I2 I = Th.BTh.toI2(Th.vertices[i].r);
+ Triangle * tb = Th.BTh.FindTriangleContening(I,dete);
+ if (tb->link) // a true triangle
+ {
+ Real8 aa= (Real8) dete[1]/ tb->det, bb= (Real8) dete[2] / tb->det;
+ f << i+1 << " " << Th.BTh.Number(tb)+1 << " " << aa << " " << bb << endl ;
+ }
+ else
+ {
+ double aa,bb,det[3];
+ TriangleAdjacent ta=CloseBoundaryEdgeV2(I,tb,aa,bb);
+ int k = ta;
+ det[VerticesOfTriangularEdge[k][1]] =aa;
+ det[VerticesOfTriangularEdge[k][0]] = bb;
+ det[OppositeVertex[k]] = 1- aa -bb;
+ Triangle * tb = ta;
+ f << i+1 << Th.BTh.Number(tb)+1 << " " << det[1] << " " << det[2] <<endl;
+ }
+ }
+ assert(!k);
+ delete [] mark;
+
+
+ }
+ f << "\nEnd" << endl;
+ // Th.ConsLinkTriangle();
+ delete [] reft;
+ return f;
+
+ }
+
+
+
+ void Geometry::Write(const char * filename)
+ {
+ ofstream f(filename);
+ if (f)
+ {
+ if(verbosity>1)
+ cout << " -- write geometry in file " << filename << endl;
+ if (name) delete name;
+ name = new char[strlen(filename)+1];
+ strcpy(name,filename);
+ OnDisk =1;
+ f << *this;
+ }
+ }
+
+ ostream& operator <<(ostream& f, const Geometry & Gh)
+ {
+ Int4 NbCorner=0;
+ {
+ f << "MeshVersionFormatted 0" <<endl;
+ f << "\nDimension\n" << 2 << endl;
+ // f << "\nIdentifier\n" ;
+ // WriteStr(f,Gh.identity);
+ // f <<endl;
+ }
+ int nbreqv=0;
+ {
+
+ f.precision(12);
+ f << "\nVertices\n" << Gh.nbv <<endl;
+ for (Int4 i=0;i<Gh.nbv;i++)
+ {
+ GeometricalVertex & v = Gh.vertices[i];
+ if (v.Required()) nbreqv++;
+ f << v.r.x << " " << v.r.y << " " << v.ref() << endl;
+ if (v.Corner()) NbCorner++;
+ }
+ }
+
+ int nbcracked=0;
+
+ {
+ int nbreq=0;
+ f << "\nEdges\n"<< Gh.nbe << endl;
+ for(Int4 ie=0;ie<Gh.nbe;ie++)
+ {
+
+ GeometricalEdge & e = Gh.edges[ie];
+ if (e.Required()) nbreq++;
+ if (e.Cracked()) {
+ Int4 ie1 = Gh.Number(e.link);
+ if (ie <= ie1) ++nbcracked;}
+ f << Gh.Number(e[0])+1 << " " << Gh.Number(e[1])+1;
+ f << " " << e.ref <<endl;
+ }
+
+ if (nbcracked)
+ {
+ f << "\nCrackedEdges\n"<< nbcracked<< endl;
+ for(Int4 ie=0;ie<Gh.nbe;ie++)
+ {
+ GeometricalEdge & e = Gh.edges[ie];
+ if (e.Cracked()) {
+ Int4 ie1 = Gh.Number(e.link);
+ if (ie <= ie1) f << ie+1 << " " << ie1+1<< endl;
+ }
+ }
+ }
+ if(nbreq)
+ {
+ f << "\nRequiredEdges\n"<< nbreq<< endl;
+ for(Int4 ie=0;ie<Gh.nbe;ie++)
+ {
+ GeometricalEdge & e = Gh.edges[ie];
+ if (e.Required())
+ f << ie+1 << endl;
+ }
+ }
+
+
+
+ }
+
+ f << "\nAngleOfCornerBound\n"
+ << Gh.MaximalAngleOfCorner*180/Pi << endl;
++=======
++ }
++ if (&Th.BTh != &Th && Th.BTh.OnDisk && Th.BTh.name)
++ {
++ int *mark=new int[Th.nbv];
++ Int4 i;
++ for (i=0;i<Th.nbv;i++)
++ mark[i]=-1;
++ f << "\nMeshSupportOfVertices\n" <<endl;
++ WriteStr(f,Th.BTh.name);
++ f <<endl;
++ f << "\nIdentityOfMeshSupport" << endl;
++ WriteStr(f,Th.BTh.identity);
++ f<<endl;
++
++ f << "\nVertexOnSupportVertex" << endl;
++ f<< Th.NbVertexOnBThVertex << endl;
++ for(i=0;i<Th.NbVertexOnBThVertex;i++) {
++ const VertexOnVertex & vov = Th.VertexOnBThVertex[i];
++ Int4 iv = Th.Number(vov.v);
++ mark[iv] =0;
++ f << iv+1<< " " << Th.BTh.Number(vov.bv)+1 << endl;}
++
++ f << "\nVertexOnSupportEdge" << endl;
++ f << Th.NbVertexOnBThEdge << endl;
++ for(i=0;i<Th.NbVertexOnBThEdge;i++) {
++ const VertexOnEdge & voe = Th.VertexOnBThEdge[i];
++ Int4 iv = Th.Number(voe.v);
++ // assert(mark[iv] == -1]);
++ mark[iv] = 1;
++ f << iv+1 << " " << Th.BTh.Number(voe.be)+1 << " " << voe.abcisse << endl;}
++
++ f << "\nVertexOnSupportTriangle" << endl;
++ Int4 k = Th.nbv - Th.NbVertexOnBThEdge - Th.NbVertexOnBThVertex;
++ f << k << endl;
++ // Int4 kkk=0;
++ CurrentTh=&Th.BTh;
++ for (i=0;i<Th.nbv;i++)
++ if (mark[i] == -1) {
++ k--;
++ Icoor2 dete[3];
++ I2 I = Th.BTh.toI2(Th.vertices[i].r);
++ Triangle * tb = Th.BTh.FindTriangleContening(I,dete);
++ if (tb->link) // a true triangle
++ {
++ Real8 aa= (Real8) dete[1]/ tb->det, bb= (Real8) dete[2] / tb->det;
++ f << i+1 << " " << Th.BTh.Number(tb)+1 << " " << aa << " " << bb << endl ;
++ }
++ else
++ {
++ double aa,bb,det[3];
++ TriangleAdjacent ta=CloseBoundaryEdgeV2(I,tb,aa,bb);
++ int k = ta;
++ det[VerticesOfTriangularEdge[k][1]] =aa;
++ det[VerticesOfTriangularEdge[k][0]] = bb;
++ det[OppositeVertex[k]] = 1- aa -bb;
++ Triangle * tb = ta;
++ f << i+1 << Th.BTh.Number(tb)+1 << " " << det[1] << " " << det[2] <<endl;
++ }
++ }
++ assert(!k);
++ delete [] mark;
++
++
++ }
++ f << "\nEnd" << endl;
++ // Th.ConsLinkTriangle();
++ delete [] reft;
++ return f;
++
++}
++
++
++
++void Geometry::Write(const char * filename)
++{
++ ofstream f(filename);
++ if (f)
++ {
++ if(verbosity>1)
++ cout << " -- write geometry in file " << filename << endl;
++ if (name) delete name;
++ name = new char[strlen(filename)+1];
++ strcpy(name,filename);
++ OnDisk =1;
++ f << *this;
++ }
++}
++
++ostream& operator <<(ostream& f, const Geometry & Gh)
++{
++ Int4 NbCorner=0;
++ {
++ f << "MeshVersionFormatted 0" <<endl;
++ f << "\nDimension\n" << 2 << endl;
++// f << "\nIdentifier\n" ;
++// WriteStr(f,Gh.identity);
++// f <<endl;
++ }
++ int nbreqv=0;
++ {
++
++ f.precision(12);
++ f << "\nVertices\n" << Gh.nbv <<endl;
++ for (Int4 i=0;i<Gh.nbv;i++)
++ {
++ GeometricalVertex & v = Gh.vertices[i];
++ if (v.Required()) nbreqv++;
++ f << v.r.x << " " << v.r.y << " " << v.ref() << endl;
++ if (v.Corner()) NbCorner++;
++ }
++ }
++
++ int nbcracked=0;
++
++ {
++ int nbreq=0;
++ f << "\nEdges\n"<< Gh.nbe << endl;
++ for(Int4 ie=0;ie<Gh.nbe;ie++)
++ {
++
++ GeometricalEdge & e = Gh.edges[ie];
++ if (e.Required()) nbreq++;
++ if (e.Cracked()) {
++ Int4 ie1 = Gh.Number(e.link);
++ if (ie <= ie1) ++nbcracked;}
++ f << Gh.Number(e[0])+1 << " " << Gh.Number(e[1])+1;
++ f << " " << e.ref <<endl;
++ }
++
++ if (nbcracked)
++ {
++ f << "\nCrackedEdges\n"<< nbcracked<< endl;
++ for(Int4 ie=0;ie<Gh.nbe;ie++)
++ {
++ GeometricalEdge & e = Gh.edges[ie];
++ if (e.Cracked()) {
++ Int4 ie1 = Gh.Number(e.link);
++ if (ie <= ie1) f << ie+1 << " " << ie1+1<< endl;
++ }
++ }
++ }
++ if(nbreq)
++ {
++ f << "\nRequiredEdges\n"<< nbreq<< endl;
++ for(Int4 ie=0;ie<Gh.nbe;ie++)
++ {
++ GeometricalEdge & e = Gh.edges[ie];
++ if (e.Required())
++ f << ie+1 << endl;
++ }
++ }
++
++
++
++ }
++
++ f << "\nAngleOfCornerBound\n"
++ << Gh.MaximalAngleOfCorner*180/Pi << endl;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if (NbCorner)
+ {
+ f << "\nCorners\n" << NbCorner << endl;
+ for (Int4 i=0,j=0;i<Gh.nbv;i++)
+ {
+ GeometricalVertex & v = Gh.vertices[i];
+ if (v.Corner())
+ j++,f << Gh.Number(v)+1 << (j % 5 ? ' ' : '\n');
+ }
+
+
+ }
+
+ if(nbreqv)
+ {
+ f << "\nRequiredVertices\n"<< nbreqv<< endl;
+ for (Int4 j=0,i=0;i<Gh.nbv;i++)
+ {
+ GeometricalVertex & v = Gh.vertices[i];
+
+ if (v.Required())
+ j++,f << i+1 << (j % 5 ? ' ' : '\n');
+ }
+ f << endl;
+ }
+
+ {
++<<<<<<< HEAD
+ Int4 i;
+ f << "\nSubDomainFromGeom\n" ;
+ f << Gh.NbSubDomains<< endl;
+ for (i=0;i<Gh.NbSubDomains;i++)
+ f << "2 " << Gh.Number(Gh.subdomains[i].edge)+1 << " " << Gh.subdomains[i].sens
+ << " " << Gh.subdomains[i].ref << endl;
+ }
+ {
+ Int4 n=0,i;
+
+ for(i=0;i< Gh.nbe;i++)
+ {
+ if(Gh.edges[i].TgA() && Gh.edges[i][0].Corner() )
+ n++;
+ if(Gh.edges[i].TgB() && Gh.edges[i][1].Corner() )
+ n++;
+ }
+ if (n) {
+ f << "TangentAtEdges " << n << endl;
+ for(i=0;i< Gh.nbe;i++)
+ {
+ if (Gh.edges[i].TgA() && Gh.edges[i][0].Corner() )
+ f << i+1 << " 1 " << Gh.edges[i].tg[0].x
+ << " " << Gh.edges[i].tg[0].y << endl;
+ if (Gh.edges[i].TgB() && Gh.edges[i][1].Corner() )
+ f << i+1 << " 2 " << Gh.edges[i].tg[1].x
+ << " " << Gh.edges[i].tg[1].y << endl;
+ }
+
+ }}
+ // f << " Not Yet Implemented" << endl;
+
+ return f;
+ }
++=======
++ Int4 i;
++ f << "\nSubDomainFromGeom\n" ;
++ f << Gh.NbSubDomains<< endl;
++ for (i=0;i<Gh.NbSubDomains;i++)
++ f << "2 " << Gh.Number(Gh.subdomains[i].edge)+1 << " " << Gh.subdomains[i].sens
++ << " " << Gh.subdomains[i].ref << endl;
++ }
++ {
++ Int4 n=0,i;
++
++ for(i=0;i< Gh.nbe;i++)
++ {
++ if(Gh.edges[i].TgA() && Gh.edges[i][0].Corner() )
++ n++;
++ if(Gh.edges[i].TgB() && Gh.edges[i][1].Corner() )
++ n++;
++ }
++ if (n) {
++ f << "TangentAtEdges " << n << endl;
++ for(i=0;i< Gh.nbe;i++)
++ {
++ if (Gh.edges[i].TgA() && Gh.edges[i][0].Corner() )
++ f << i+1 << " 1 " << Gh.edges[i].tg[0].x
++ << " " << Gh.edges[i].tg[0].y << endl;
++ if (Gh.edges[i].TgB() && Gh.edges[i][1].Corner() )
++ f << i+1 << " 2 " << Gh.edges[i].tg[1].x
++ << " " << Gh.edges[i].tg[1].y << endl;
++ }
++
++ }}
++ // f << " Not Yet Implemented" << endl;
++
++ return f;
++}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+
+} // end of namespace bamg
diff --cc src/bamglib/meshtype.h.orig
index e7b0ae8,0000000..7839e56
mode 100644,000000..100644
--- a/src/bamglib/meshtype.h.orig
+++ b/src/bamglib/meshtype.h.orig
@@@ -1,71 -1,0 +1,75 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef MESHTYPE_H
+#define MESHTYPE_H
+#include <limits.h>
+namespace bamg {
+template<class T> inline T Square (const T &a) { return a*a;}
+template<class T> inline T Min (const T &a,const T &b){return a < b ? a : b;}
+template<class T> inline T Max (const T &a,const T & b){return a > b ? a : b;}
+template<class T> inline T Abs (const T &a){return a <0 ? -a : a;}
+template<class T> inline double Norme (const T &a){return sqrt(a*a);}
+template<class T> inline void Exchange (T& a,T& b) {T c=a;a=b;b=c;}
+// for pb on microsoft compiler
+template<class T> inline T Max3 (const T &a,const T & b,const T & c){return Max(Max(a,b),c);}
+template<class T> inline T Min3 (const T &a,const T & b,const T & c){return Min(Min(a,b),c);}
+
+typedef float Real4;
+typedef double Real8;
+typedef short Int1;
+typedef short Int2;
+typedef long Int4;
+
+#if LONG_BIT > 63
+// for alpha and silicon
+ typedef int Icoor1;
+ typedef long Icoor2;
+ const Icoor1 MaxICoor = 1073741823; // 2^30-1
+ const Icoor2 MaxICoor22 = Icoor2(2)*Icoor2(MaxICoor) * Icoor2(MaxICoor) ;
+
+#elif defined(BAMG_LONG_LONG)
+ typedef long Icoor1;
+ typedef long long Icoor2;
+ const Icoor1 MaxICoor = 1073741823;// 2^30-1
+// not a const due to a bug in hp compiler
+#define MaxICoor22 2305843004918726658LL
+//const Icoor2 MaxICoor22 = Icoor2(2)*Icoor2(MaxICoor) * Icoor2(MaxICoor) ;
+#else
+ typedef int Icoor1;
+ typedef double Icoor2;
+ const Icoor1 MaxICoor = 8388608; // 2^23
+ const Icoor2 MaxICoor22 = Icoor2(2)*Icoor2(MaxICoor) * Icoor2(MaxICoor) ;
+#endif
+ class Triangles;
++<<<<<<< HEAD
+extern void MeshError(int Err,const Triangles *Th=0) ;
++=======
++extern void MeshError(int Err,Triangles *Th=0) ;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+}
+#endif
diff --cc src/femlib/BamgFreeFem.cpp.orig
index a4f4d50,0000000..45e4888
mode 100644,000000..100644
--- a/src/femlib/BamgFreeFem.cpp.orig
+++ b/src/femlib/BamgFreeFem.cpp.orig
@@@ -1,967 -1,0 +1,978 @@@
+// ORIG-DATE: Dec 97
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+// #define TRACETRIANGLE 3
+//#pragma dont_inline on
+//#pragma global_optimizer off
+//#pragma inline_depth(0)
+
++<<<<<<< HEAD
+//#undef NDEBUG
++=======
++#undef NDEBUG
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+extern long verbosity ;
+//#define strcasecmp strcmp
+#include <cstdio>
+#include <string>
+#include <cmath>
+#include <ctime>
+#include <iomanip>
+#include <fstream>
++<<<<<<< HEAD
+#include "RNM.hpp"
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+using namespace std;
+
+#include "Meshio.h"
+#include "Mesh2.h"
+#include "QuadTree.h"
+#include "SetOfE4.h"
+
+#include "rgraph.hpp"
+#include "fem.hpp"
+#include "AFunction.hpp"
+#include "BamgFreeFem.hpp"
++<<<<<<< HEAD
++=======
++#include "RNM.hpp"
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+#include "FESpace.hpp"
+#include "Mesh2dn.hpp"
+#include "Mesh3dn.hpp"
+#include "MeshPoint.hpp"
+#include "PlotStream.hpp"
+#include <set>
+Fem2D::Mesh *bamg2msh( bamg::Triangles* tTh,bool renumbering)
+{
+ using namespace bamg;
+ bamg::Triangles & th (*tTh);
+ tTh->ReNumberingTheTriangleBySubDomain(!renumbering);// just compress
+ //tTh->NbRef++;
+ Int4 i,j,k=0;
+ int nv = tTh->nbv;
+ int nt = tTh->nbt - tTh->NbOutT;
+ int neb = tTh->nbe;
+
+ int nbcrakev = 0;
+ tTh->ReMakeTriangleContainingTheVertex();
+ Fem2D::Triangle * t = new Fem2D::Triangle[nt] ;
+ Fem2D::BoundaryEdge * b_e = new Fem2D::BoundaryEdge[neb];
+
+ Fem2D::Vertex vbase;
+ Fem2D::Vertex *vb(&vbase);
+ if (verbosity>5)
+ cout << " -- Before cracking mesh: Nb Triangles = " << nt << " Nb of Vertices " << nv << endl;
+ for ( i=0;i<nt;i++) // unset all triangles
+ for (j=0;j<3;j++)
+ t[i](j)=0;
+ // nv=0;
+ for (int iv=0;iv<th.nbv;iv++) // vertex
+ {
+ // cout << iv << " : " ;
+ const Vertex & v(th[iv]);
+ int kk=0; // nb cracked
+ int kc=0;
+ int kkk =0; // nb triangle with same number
+ Triangle * tbegin = v.t;
+ Fem2D::Vertex * vv = vb+iv;
+ int i = v.vint;
+ throwassert(tbegin && (i >= 0 ) && (i <3));
+ // turn around the vertex v
+ TriangleAdjacent ta(tbegin,EdgesVertexTriangle[i][0]);// previous edge
+ int k=0;
+ do {
+ int kv = VerticesOfTriangularEdge[ta][1];
+ k++;
+ Triangle * tt (ta);
+ throwassert( &v == & (* tt)[kv] );
+ if ( ta.Cracked() )
+ { // cout << " || " ;
+ if ( kk == 0) tbegin=ta,kkk=0; // begin by a cracked edge => restart
+ if ( kkk ) { kc =1;vv = vb + nv++; kkk = 0; } // new vertex if use
+ kk++;
+ // number of cracked edge view
+ }
+ if ( tt->link ) { // if good triangles store the value
+ int it = th.Number(tt);
+ throwassert(it < nt);
+ //int iiv=vv-vb;
+ t[it](kv) = vv;
+ /*
+ cout << it << " " << kv << " "<< iiv << endl;
+ if (&th(it)[kv] != &th[iiv])
+ cout << it << " " << kv << " "<< iiv << " != " << th.Number(th(it)[kv]) << endl ;
+ */
+ kkk++;
+ } else if (kk) { // crack + boundary
+ if ( kkk ) { kc =1;vv = vb + nv++; kkk = 0; } // new vertex if use
+ }
+
+ ta = Next(ta).Adj();
+ } while ( (tbegin != ta));
+ throwassert(k);
+ if (kc) nbcrakev++;
+ }
+ Fem2D::Vertex * v = new Fem2D::Vertex[nv];
+ // set the vertices --
+ for (i=0;i<nt;i++)
+ {
+ for (j=0;j<3;j++)
+ {
+ throwassert( t[i](j) );
+ int k = t[i](j) - vb;
+ t[i](j) = v+ k;
+ throwassert(k>=0 && k < nv);
+ Vertex & thv(th(i)[j]);
+ v[k].x = thv.r.x;
+ v[k].y = thv.r.y;
+ v[k].lab = thv.ref();
+ }
+ }
+ // warning in cracked edges
+ // construction of the edges --
+
+ if (nbcrakev && verbosity>2)
+ cout << " -- Nb of craked vertices = " << nbcrakev << " Nb of created vertices " << nv - th.nbv << endl;
+
+
+ for (i=0;i<tTh->nbe;i++)
+ {
+ int i0=tTh->Number(tTh->edges[i][0]),i1=tTh->Number(tTh->edges[i][1]);
+ throwassert(i0>=0 && i0 <nv);
+ throwassert(i1>=0 && i1 <nv);
+ b_e[i]=Fem2D::BoundaryEdge(v,i0,i1,tTh->edges[i].ref);
+ }
+ Int4 *reft = new Int4[tTh->nbt];
+ //Int4 nbref =
+ tTh->ConsRefTriangle(reft);
+ for( i=0,k=0;i<tTh->nbt;i++)
+ if(tTh->triangles[i].link)
+ {
+
+ Fem2D::R2 A(t[k][0]),B(t[k][1]),C(t[k][2]);
+ t[k].area = (( B-A)^(C-A))*0.5 ;
+ t[k].lab = tTh->subdomains[reft[i]].ref; // a faire
+ throwassert(k == i);
+ k++;
+ }
+ delete [] reft;
+ throwassert ( nt == k);
+ tTh->ReMakeTriangleContainingTheVertex();
+
+ if (verbosity)
+ cout << " -- mesh: Nb of Triangles = " << setw(6) << nt << ", Nb of Vertices " << nv << endl;
+
+ {
+ Fem2D::Mesh *m = new Fem2D::Mesh(nv,nt,neb,v,t,b_e);
+ if (renumbering) m->renum();
+ m->MakeQuadTree();
+ return m;
+ }
+}
+
+Fem2D::Mesh *bamg2msh(const bamg::Geometry &Gh)
+{
+ // ------------------
+ int nv= Gh.nbv;
+ int neb=Gh.nbe;
+ Fem2D::Triangle * t = 0 ;
+ Fem2D::BoundaryEdge * b_e = new Fem2D::BoundaryEdge[neb];
+ Fem2D::Vertex *v = new Fem2D::Vertex[nv] ;
+ for (int i=0;i<nv;i++)
+ {
+ const bamg::GeometricalVertex & vg( Gh[i]);
+ v[i].x=vg.r.x;
+ v[i].y=vg.r.y;
+ v[i].lab=vg.ref();
+
+ }
+ for (int ie=0;ie<neb;ie++)
+ {
+ const bamg::GeometricalEdge & e= Gh(ie);
+ int i0=Gh.Number(e[0]),i1=Gh.Number(e[0]);
+ b_e[ie]= Fem2D::BoundaryEdge(v,i0,i1,e.ref);
+ }
+
+ {
+ Fem2D::Mesh *m = new Fem2D::Mesh(nv,0,neb,v,t,b_e);
+ m->MakeQuadTree();
+ return m;
+ }
+ // ------------------
+}
+
+
+
+
+
+bamg::Triangles * msh2bamg(const Fem2D::Mesh & Th,double cutoffradian,long * reqedgeslab,int nreqedgeslab)
+
+{
+ using namespace bamg;
+ Triangles *Tn=new Triangles(Th.nv);
+ Tn->nbv = Th.nv;
+ Tn->nbt = Th.nt;
+ Tn->nbe = Th.neb;
+ Tn->name= new char[strlen("msh2bamg")+1];
+ strcpy(Tn->name,"msh2bamg");
+ // Tn->triangles = new Triangle [Tn->nbtx];
+ throwassert(Tn->triangles);
+ // Tn->vertices = new Vertex [Tn->nbvx];
+ // Tn->ordre = new (Vertex* [Tn->nbvx]);
+ Tn->edges = new Edge [Th.neb];
+
+ Int4 i;
+ Metric Mid(1.);
+ for (i = 0; i < Th.nv; i++)
+ {
+ Tn->vertices[i].r.x = Th(i).x;
+ Tn->vertices[i].r.y = Th(i).y;
+ Tn->vertices[i].m=Mid;
+ Tn->vertices[i].ReferenceNumber = Th(i).lab;
+ }
+
+ // Int4 i1 [nbt],i2 [nbt],i3 [nbt];
+ for (i = 0; i < Th.nt; i++)
+ {
+ int i1 = Th(Th[i][0]);
+ int i2 = Th(Th[i][1]);
+ int i3 = Th(Th[i][2]);
+ Tn->triangles[i]= Triangle( Tn,i1 ,i2 ,i3 );
+ Tn->triangles[i].color = Th[i].lab;
+ }
+ // Real8 cutoffradian = -1;
+ // add code un change boundary part ... frev 2009 JYU FH
+ set<int> labreq;
+ if(nreqedgeslab && verbosity) cout << " label of required edges " ;
+ for (int i=0; i <nreqedgeslab;++i)
+ {
+ if(verbosity)
+ cout << " " << reqedgeslab[i];
+ labreq.insert(reqedgeslab[i]);
+ }
+ bamg::GeometricalEdge paszero; // add JYU fevr 2009 for required edge ....
+ if(nreqedgeslab && verbosity) cout << endl;
+ int k=0;
+ for (i = 0; i < Th.neb; i++)
+ {
+ Tn->edges[i].v[0] = Tn->vertices + Th(Th.bedges[i][0]);
+ Tn->edges[i].v[1] = Tn->vertices + Th(Th.bedges[i][1]);
+ Tn->edges[i].ref = Th.bedges[i].lab;
+ Tn->edges[i].on = 0;
+ if( labreq.find( Tn->edges[i].ref) != labreq.end())
+ {
+ k++;
+ Tn->edges[i].on = &paszero;
+ }
+
+ }
+ if(verbosity)cout << " number of required edges : "<< k << endl;
+
+
+ Tn->ConsGeometry(cutoffradian);
+ Tn->Gh.AfterRead();
+ Tn->SetIntCoor();
+ Tn->FillHoleInMesh();
+ return Tn;
+}
+
+
+bamg::Triangles * msh2bamg(const Fem2D::Mesh & Th,double cutoffradian,
+ int nbdfv, int * ndfv,int nbdfe, int * ndfe,
+ long * reqedgeslab,int nreqedgeslab)
+{
+ using namespace bamg;
+ Triangles *Tn=new Triangles(Th.nv);
+ KN<int> equiedges(Th.neb);
+ for(int i=0;i<Th.neb;i++)
+ equiedges[i]=2*i;
+ if(nbdfe !=0 )
+ {
+ KN<int> kk(Th.neb),kn(Th.neb);
+ kk=0;
+ for(int i=0;i<Th.neb;i++)
+ {
+ int df=ndfe[i];
+ kk[df]++;
+ if(kk[df]==1) kn[df]=i;
+ else {
+ int k=kn[df],sens=0;
+ int di0=ndfv[Th(Th.bedges[i][0])];
+ int di1=ndfv[Th(Th.bedges[i][1])];
+ int dk0=ndfv[Th(Th.bedges[k][0])];
+ int dk1=ndfv[Th(Th.bedges[k][1])];
+ if ((di0==dk0) &&(di1==dk1) ) sens=0;
+ else if ((di1==dk0) &&(di0==dk1) ) sens=1;
+ else {
+ cout << "Error in periodic mesh " << di0 << " " << di1 << " <=> " << dk0 << " " << dk1 << endl;
+ ExecError("bug periodic mesh in ??? ");
+ }
+ equiedges[i]=2*k+sens;
+
+ }
+ }
+
+ }; // a faire pour les maillages periodique
+
+ Tn->nbv = Th.nv;
+ Tn->nbt = Th.nt;
+ Tn->nbe = Th.neb;
+ Tn->name= new char[strlen("msh2bamg")+1];
+ strcpy(Tn->name,"msh2bamg");
+ // Tn->triangles = new Triangle [Tn->nbtx];
+ throwassert(Tn->triangles);
+ // Tn->vertices = new Vertex [Tn->nbvx];
+ // Tn->ordre = new (Vertex* [Tn->nbvx]);
+ Tn->edges = new Edge [Th.neb];
+
+ Int4 i;
+ Metric Mid(1.);
+ for (i = 0; i < Th.nv; i++)
+ {
+ Tn->vertices[i].r.x = Th(i).x;
+ Tn->vertices[i].r.y = Th(i).y;
+ Tn->vertices[i].ReferenceNumber = Th(i).lab;
+ Tn->vertices[i].m=Mid;
+ }
+
+ // Int4 i1 [nbt],i2 [nbt],i3 [nbt];
+ for (i = 0; i < Th.nt; i++)
+ {
+ int i1 = Th(Th[i][0]);
+ int i2 = Th(Th[i][1]);
+ int i3 = Th(Th[i][2]);
+ Tn->triangles[i]= Triangle( Tn,i1 ,i2 ,i3 );
+ Tn->triangles[i].color = Th[i].lab;
+ }
+
+ // add code un change boundary part ... frev 2009 JYU FH
+ set<int> labreq;
+ if(nreqedgeslab && verbosity) cout << " label of required edges " ;
+ for (int i=0; i <nreqedgeslab;++i)
+ {
+ if(verbosity)
+ cout << " " << reqedgeslab[i];
+ labreq.insert(reqedgeslab[i]);
+ }
+ bamg::GeometricalEdge paszero; // add JYU fevr 2009 for required edge ....
+ if(nreqedgeslab && verbosity) cout << endl;
+ int k=0;
+
+ for (i = 0; i < Th.neb; i++)
+ {
+ Tn->edges[i].v[0] = Tn->vertices + Th(Th.bedges[i][0]);
+ Tn->edges[i].v[1] = Tn->vertices + Th(Th.bedges[i][1]);
+ Tn->edges[i].ref = Th.bedges[i].lab;
+ Tn->edges[i].on = 0;
+ if( labreq.find( Tn->edges[i].ref) != labreq.end())
+ {
+ k++;
+ Tn->edges[i].on = &paszero;
+ }
+ }
+ // Real8 cutoffradian = -1;
+ Tn->ConsGeometry(cutoffradian,equiedges);
+ Tn->Gh.AfterRead();
+ Tn->SetIntCoor();
+ Tn->FillHoleInMesh();
+ return Tn;
+}
+
+
+
+Fem2D::Mesh * BuildMesh(Stack stack, E_BorderN const * const & b,bool justboundary,int nbvmax,bool Requiredboundary)
+{
+
+
+ using namespace bamg;
+ using bamg::Abs;
+ using bamg::Max;
+ using bamg::Min;
+ using bamg::Pi;
+ Fem2D::MeshPoint & mp (*Fem2D::MeshPointStack(stack)), mps = mp;
+
+ int nbvx=0,nbe=0,nbsd=0;
+ for (E_BorderN const * k=b;k;k=k->next)
+ {
+ int nbd = k->NbBorder(stack);
+ for(int index=0; index<nbd; ++index )
+ {long n= Max(1L,Abs(k->Nbseg(stack,index))); ;
+ nbvx += n+1;
+ nbe += n;
+ nbsd++;
+ }
+ }
+ Geometry * Gh = new Geometry;
+
+ if(verbosity>2)
+ cout <<"\t\t" << " Begin: ConstGeometry from nb Border " << nbsd <<endl;
+ //throwassert(empty());
+ const char * filename = "FREEFEM.gh";
+ Gh->name=new char [strlen(filename)+1];
+ strcpy(Gh->name,filename);
+ Real8 Hmin = HUGE_VAL;// the infinie value
+ Int4 hvertices =0;
+ Int4 i,nn,n;
+ //Int4 dim=0;
+ Gh->MaximalAngleOfCorner =30.00*Pi/180.0;
+ Gh->nbv = 0;
+ Gh->nbvx = nbvx;
+
+ Gh->nbe = nbe;
+ Gh->edges = new GeometricalEdge[Gh->nbe];
+ bamg::Vertex *vertices = new Vertex[Gh->nbvx];// correction 2009/07/03
+ double lmin= HUGE_VAL;
+ // generation des points et des lignes
+ i=0;
+ for (E_BorderN const * k=b;k;k=k->next)
+ {
+ int nbd = k->NbBorder(stack);
+ for(int index=0; index<nbd; ++index )
+ {
+ assert(k->b->xfrom); // a faire
+ double & t = * k->var(stack);
+ double a(k->from(stack)),b(k->to(stack));
+ long * indx = k->index(stack);
+ if(indx) *indx = index;
+ else ffassert(index==0);
+ n=Max(Abs(k->Nbseg(stack,index)),1L);
+ t=a;
+ double delta = (b-a)/n;
+ for ( nn=0;nn<=n;nn++,i++, t += delta)
+ {
+ if (nn==n) t=b; // to remove roundoff error
+ mp.label = k->label();
+ k->code(stack); // compute x,y, label
+ // cout << " ----- " << i << " " << mp.P.x << " " << mp.P.y << endl;
+ vertices[i].r.x=mp.P.x;
+ vertices[i].r.y=mp.P.y;
+ vertices[i].ReferenceNumber= mp.label;
+ vertices[i].color = i;
+ if (nn>0) {
+ lmin=min(lmin,Norme2_2( vertices[i].r-vertices[i-1].r));
+ }
+ }
+ }
+}
+ lmin = sqrt(lmin);
+ double eps = (lmin)/16.;
+ int nbvprev = i;
+ long nbv=0;
+ Gh->pmin = vertices[0].r;
+ Gh->pmax = vertices[0].r;
+ // recherche des extrema des vertices pmin,pmax
+ for (i=0;i<nbvprev;i++)
+ {
+ Gh->pmin.x = Min(Gh->pmin.x,vertices[i].r.x);
+ Gh->pmin.y = Min(Gh->pmin.y,vertices[i].r.y);
+ Gh->pmax.x = Max(Gh->pmax.x,vertices[i].r.x);
+ Gh->pmax.y = Max(Gh->pmax.y,vertices[i].r.y);
+ }
+
+ double diameter=Max(Gh->pmax.x-Gh->pmin.x,Gh->pmax.y-Gh->pmin.y);
+ Gh->coefIcoor= (MaxICoor)/diameter;
+ Icoor1 epsI = (Icoor1) (Gh->coefIcoor*eps);
+ ffassert(Gh->coefIcoor >0);
+
+ if(lmin<diameter*1e-7) {
+ ExecError(" Error points border points to close < diameter*1e-7 ");}
+
+ if (verbosity>2)
+ {
+ cout <<"\t\t" << " Geom: min="<< Gh->pmin << "max ="<< Gh->pmax
+ << " hmin = " << Gh->MinimalHmin() << endl;
+ }
+ nbv = 0;
+ { // find common point
+ QuadTree quadtree;
+ Metric Id(1.);
+ for ( i=0;i<nbvprev;i++)
+ {
+ vertices[i].i = Gh->toI2(vertices[i].r);
+ vertices[i].m = Id;
+ Vertex *v= quadtree.ToClose(vertices[i],eps,epsI,epsI) ;
+ // quadtree.NearestVertex(vertices[i].i.x,vertices[i].i.y);
+ if( v && Norme1(v->r - vertices[i]) < eps )
+ { vertices[i].color=v->color; }
+ else {quadtree.Add(vertices[i]);
+ vertices[i].color = nbv++;}
+ }
+ /*
+ if (nbvprev-nbv==0)
+ {
+ reffecran();
+ bamg::R2 O((Gh->pmin+Gh->pmax)/2),D(Gh->pmax-Gh->pmin);
+ cadreortho(O.x,O.y,Max(D.x,D.y)*1.1);
+ xGrafCoef = Gh->coefIcoor;
+ yGrafCoef = Gh->coefIcoor;
+ xGrafOffSet = Gh->pmin.x;
+ yGrafOffSet = Gh->pmin.y;
+ quadtree.Draw();
+ for (int i=0;i<nbvprev;i++)
+ {
+ rmoveto(vertices[i].r.x,vertices[i].r.y);
+
+ char buf[100];
+ sprintf(buf,"%d",i);
+ plotstring(buf);
+ }
+ rattente(1);
+ }
+ */
+ } // to delete quadtree
+ if (verbosity>1)
+ cout << " Nb of common points " << nbvprev-nbv <<endl;
+
+ Gh->nbvx = nbv;
+ Gh->nbv = nbv;
+
+ Gh->vertices = new GeometricalVertex[nbv];
+ throwassert(Gh->nbvx >= Gh->nbv);
+ Gh->nbiv = Gh->nbv;
+ // Int4 k=0;
+ const Direction NoDirOfSearch;
+ // compression of points
+ int kkk;
+ for ( i=0,kkk=0;kkk<nbvprev;kkk++)
+ {
+ if (vertices[kkk].color == i) // if new points
+ {
+ Gh->vertices[i].r.x = vertices[kkk].r.x ;
+ Gh->vertices[i].r.y = vertices[kkk].r.y;
+ //Gh->vertices[i].link = Gh->vertices + i;
+ throwassert(Gh->vertices[i].IsThe());
+ Gh->vertices[i].ReferenceNumber = vertices[kkk].ReferenceNumber ;
+ Gh->vertices[i].DirOfSearch = NoDirOfSearch;
+ Gh->vertices[i].color =0;
+ Gh->vertices[i].Set();
+ // vertices[i].SetCorner();
+ if(Requiredboundary)
+ Gh->vertices[i].SetRequired();
+ i++;
+ }
+ }
+ throwassert(i==nbv);
+ R2 zero2(0,0);
+ if(verbosity>5)
+ cout <<"\t\t" << " Record Edges: Nb of Edge " << Gh->nbe <<endl;
+ throwassert(Gh->edges);
+ throwassert (Gh->nbv >0);
+ Real4 *len =0;
+ if (!hvertices)
+ {
+ len = new Real4[Gh->nbv];
+ for(i=0;i<Gh->nbv;i++)
+ len[i]=0;
+ }
+ int nnn=0;
+ i=0;
+ for (E_BorderN const * k=b;k;k=k->next)
+
+ { int nbd = k->NbBorder(stack);
+ for(int index=0; index<nbd; ++index )
+ {
+ double & t = * k->var(stack);
+ double a(k->from(stack)),b(k->to(stack));
+ n=Max(Abs(k->Nbseg(stack,index)),1L);
+ long * indx = (k->index(stack));
+ if(indx) *indx = index;
+ else ffassert(index==0);
+
+ double delta = (b-a)/n;
+ t=a+delta/2;
+ for ( nn=0;nn<n;nn++,i++, t += delta)
+ {
+
+ mp.label = k->label();
+ k->code(stack);
+ Int4 i1 = vertices[nnn].color, i2 = vertices[++nnn].color;
+ throwassert(i1 >= 0 && i1 < nbv);
+ throwassert(i2 >= 0 && i2 < nbv);
+ Gh->edges[i].ref = mp.label;
+ Gh->edges[i].v[0]= Gh->vertices + i1;
+ Gh->edges[i].v[1]= Gh->vertices + i2;
+ R2 x12 = Gh->vertices[i2].r-Gh->vertices[i1].r;
+ Real8 l12=Norme2(x12);
+ Gh->edges[i].tg[0]=zero2;
+ Gh->edges[i].tg[1]=zero2;
+ Gh->edges[i].SensAdj[0] = Gh->edges[i].SensAdj[1] = -1;
+ Gh->edges[i].Adj[0] = Gh->edges[i].Adj[1] = 0;
+ Gh->edges[i].flag = 0;
+ Gh->edges[i].link=0;
+ if(Requiredboundary)
+ Gh->edges[i].SetRequired();
+
+ if (!hvertices)
+ {
+ Gh->vertices[i1].color++;
+ Gh->vertices[i2].color++;
+ len[i1] += l12;
+ len[i2] += l12;
+ }
+
+ Hmin = Min(Hmin,l12);
+ }
+ nnn++;
+ }}
+
+ delete [] vertices; vertices=0;
+
+ throwassert(nnn==nbvprev);
+ throwassert(i==Gh->nbe);
+ // definition the default of the given mesh size
+ if (!hvertices)
+ {
+ for (i=0;i<Gh->nbv;i++)
+ if (Gh->vertices[i].color > 0)
+ Gh->vertices[i].m= Metric(len[i] /(Real4) Gh->vertices[i].color);
+ else
+ Gh->vertices[i].m= Metric(Hmin);
+ delete [] len;
+
+ if(verbosity>3)
+ cout <<"\t\t" << " Geom Hmin " << Hmin << endl;
+ }
+
+ Gh->NbSubDomains=nbsd;
+ if (Gh->NbSubDomains>0)
+ {
+ Gh->subdomains = new GeometricalSubDomain[ Gh->NbSubDomains];
+ Int4 i1=0;
+ i=0;
+ for (E_BorderN const * k=b;k;k=k->next)
+ {
+ int nbd = k->NbBorder(stack);
+ for(int index=0; index<nbd; ++index,i++)
+ {
+ long Nbseg =k->Nbseg(stack,index);
+ long n= Max(1L,Abs(Nbseg));
+ Gh->subdomains[i].sens = Nbseg >0 ? 1 : -1;
+ Gh->subdomains[i].edge=Gh->edges + i1;
+ Gh->subdomains[i].ref = i;
+ i1 += n;
+ }}
+ }
+ Gh->NbEquiEdges=0;
+ Gh->NbCrackedEdges=0;
+ Fem2D::Mesh * m=0;
+ if (justboundary)
+ m=bamg2msh(*Gh);
+ else
+ {
+ Gh->AfterRead();
+ int nbtx= nbvmax ? nbvmax : (Gh->nbv*Gh->nbv)/9 +1000;
+ if(verbosity> 99) cout << " ** Gh = " << endl << *Gh << endl << " *** " <<endl; ;
+ Triangles *Th = 0;
+ try {
+ Th =new Triangles( nbtx ,*Gh);
+ if(0)
+ {
+
+
+ Th->SetVertexFieldOn();
+ for( int i=0;i<Th->nbv;++i)
+ {
+ VertexOnGeom *on=0;
+ if( (on =Th->vertices[i].on) ) // we are on geometrie
+ {
+ if(on->abscisse <0) {
+ bamg::GeometricalVertex * gv= on->gv;
+ int iold = Gh->Number(gv);
+ }
+ else {// erreur car un point est sur un arete en non un sommet
+ bamg::GeometricalEdge * ge= on->ge;
+ int eold = Gh->Number(ge); //
+ int iold = Gh->Number( (*ge)[0] );
+ int jold = Gh->Number( (*ge)[1] );
+ int s = on->abscisse;
+
+ // cout << " error bizarre " << ge << endl;
+ }
+
+
+ }
+
+ }
+ }
+ }
+ catch(...)
+ {
+ Gh->NbRef=0;
+ delete Gh;
+ cout << " catch Err bamg " << endl;
+ throw ;
+ }
+ m=bamg2msh(Th,true);
+ delete Th;
+ }
+
+ delete Gh;
+ /* deja fait dans bamg2msh
+ Fem2D::R2 Pn,Px;
+ m->BoundingBox(Pn,Px);
+ m->quadtree=new Fem2D::FQuadTree(m,Pn,Px,m->nv);
+ ---------- */
+ mp=mps;
+ // m->decrement();
+ // Add2StackOfPtr2FreeRC(stack,m);// fait au niveau d'apres 07/2008 FH
+
+
+ return m;
+}
+
+void E_BorderN::BoundingBox(Stack stack,double &xmin,double & xmax, double & ymin,double & ymax) const
+{
+ Fem2D::MeshPoint & mp (*Fem2D::MeshPointStack(stack)), mps = mp;
+ for (E_BorderN const * k=this;k;k=k->next)
+ {
+ int nbd = k->NbBorder(stack);
+ for(int index=0; index<nbd; ++index )
+ {
+ assert(k->b->xfrom); // a faire
+ double & t = * k->var(stack);
+ double a(k->from(stack)),b(k->to(stack));
+ long * indx = (k->index(stack));
+ if(indx) *indx = index;
+ else ffassert(index==0);
+
+ long n=Max(Abs(k->Nbseg(stack,index)),1L);
+ t=a;
+ double delta = (b-a)/n;
+ for (int nn=0;nn<=n;nn++, t += delta)
+ {
+ if (nn==n) t=b; // to remove roundoff error
+ mp.label = k->label();
+ k->code(stack); // compute x,y, label
+ xmin=Min(xmin,mp.P.x);
+ xmax=Max(xmax,mp.P.x);
+ ymin=Min(ymin,mp.P.y);
+ ymax=Max(ymax,mp.P.y);
+ }
+ }}
+ mp=mps;
+}
+void E_BorderN::Plot(Stack stack) const
+{
+ using Fem2D::R2;
+
+ Fem2D::MeshPoint & mp (*Fem2D::MeshPointStack(stack)), mps = mp;
+ float x0,x1,y0,y1;
+ getcadre(x0,x1,y0,y1);
+ float h= (x1-x0)*0.01;
+ int nbd=0;
+ for (E_BorderN const * k=this;k;k=k->next)
+ {
+ int nbdr = k->NbBorder(stack);
+ for(int index=0; index<nbdr; ++index )
+ {
+ nbd++;
+ assert(k->b->xfrom); // a faire
+ double & t = * k->var(stack);
+ double a(k->from(stack)),b(k->to(stack));
+ long n=Max(Abs(k->Nbseg(stack,index)),1L);
+ long * indx = (k->index(stack));
+ if(indx) *indx = index;
+ else ffassert(index==0);
+
+ t=a;
+ double delta = (b-a)/n;
+ R2 P,Po;
+ for (int nn=0;nn<=n;nn++, t += delta)
+ {
+ if (nn==n) t=b; // to remove roundoff error
+ mp.label = k->label();
+ mp.P.z=0;
+ k->code(stack); // compute x,y, label
+ P=mp.P.p2();
+ couleur(2+mp.label);
+ if(nn!=0) { LineTo(P);
+ R2 uv(Po,P);
+ double l = Max(sqrt((uv,uv)),1e-20);
+
+ R2 dd = uv*(-h/l);
+ R2 dn = dd.perp()*0.5;
+
+ LineTo(P+dd+dn);
+ MoveTo(P+dd-dn);
+ LineTo(P);}
+ else {
+ DrawMark(mp.P.p2(),0.01);
+ MoveTo(mp.P.p2());
+
+ }
+
+
+ // cout << k->label()<< " " << nn << ", x,y = " << mp.P.x << " , " << mp.P.y << endl;
+ Po=P;
+ }
+ DrawMark(mp.P.p2(),0.01);
+ MoveTo(mp.P.p2());
+ }
+}
+ if(verbosity>9) cout << " -- Plot size : " << nbd << " Border \n";
+ mp=mps;
+}
+void E_BorderN::SavePlot(Stack stack,PlotStream & plot ) const
+{
+ using Fem2D::R2;
+
+ Fem2D::MeshPoint & mp (*Fem2D::MeshPointStack(stack)), mps = mp;
+ //float x0,x1,y0,y1;
+ //getcadre(x0,x1,y0,y1);
+ //float h= (x1-x0)*0.01;
+
+ long nbd1=0;// nb of sub border
+ for (E_BorderN const * k=this;k;k=k->next)
+ {
+ int nbdr = k->NbBorder(stack);
+ for(int index=0; index<nbdr; ++index )
+ nbd1++;
+ }
+ plot << nbd1;
+ int nbd=0;
+ for (E_BorderN const * k=this;k;k=k->next)
+ {
+ int nbdr = k->NbBorder(stack);
+ for(int index=0; index<nbdr; ++index )
+ {
+ nbd++;
+ assert(k->b->xfrom); // a faire
+ double & t = * k->var(stack);
+ double a(k->from(stack)),b(k->to(stack));
+ long n=Max(Abs(k->Nbseg(stack,index)),1L);
+ long * indx = (k->index(stack));
+ if(indx) *indx = index;
+ else ffassert(index==0);
+
+ t=a;
+ double delta = (b-a)/n;
+ R2 P,Po;
+ plot<< (long) n;
+ for (int nn=0;nn<=n;nn++, t += delta)
+ {
+ if (nn==n) t=b; // to remove roundoff error
+ mp.label = k->label();
+ mp.P.z=0;
+ k->code(stack); // compute x,y, label
+ P=mp.P.p2();
+ plot << (long) mp.label <<P.x << P.y;
+ }
+
+ }}
+ assert(nbd==nbd1);
+ if(verbosity>9) cout << " -- Plot size : " << nbd << " Border \n";
+ mp=mps;
+}
+
+Fem2D::Mesh * BuildMeshBorder(Stack stack, E_BorderN const * const & b)
+{
+ return BuildMesh(stack,b,true,0,true);
+}
+Fem2D::Mesh * BuildMesh(Stack stack, E_BorderN const * const & b,bool Requiredboundary)
+{
+ return BuildMesh(stack,b,false,0,Requiredboundary);
+}
+
+Fem2D::Mesh * ReadTriangulate( string * const & s) {
+ using namespace Fem2D;
+ KN<R2> xy;
+ char c;
+ int nv;
+ for(int step=0;step<2;step++)
+ {
+ nv=0;
+ ifstream f(s->c_str());
+ if(!f) {cerr <<" Error openning file " << *s << endl;
+ ExecError("Openning file ");}
+ while (f.good())
+ {
+ R2 P;
+ f >> P ;
+ if (!f.good()) break;
+ if (step) xy[nv]=P;
+ nv++;
+ while (f.get(c) && (c!='\n' && c!='\r' ) ) (void) 0; // eat until control (new line
+ }
+ if (!step && nv ) xy.init(nv); // alloc the array
+ }
+ if(verbosity)
+ cout << " we read " << nv << " coordinates xy "<< endl;
+
+ Mesh * m=new Mesh(nv,xy);
+ m->MakeQuadTree();
+// m->decrement(); // 07/2008 FH auto del ptr
+ // delete s; modif mars 2006 auto del ptr
+ return m;
+
+}
+Fem2D::Mesh * Triangulate( const KN_<double> & xx,const KN_<double> & yy)
+{
+ using namespace Fem2D;
+ ffassert(xx.N()==yy.N());
+ int nv=xx.N();
+ KN<R2> xy(nv);
+ for(int i=0;i<nv;++i)
+ xy[i]= R2(xx[i],yy[i]);
+ Mesh * m=new Mesh(nv,xy);
+ m->MakeQuadTree();
+ // m->decrement(); 07/2008 FH auto del ptr
+ // delete s; modif mars 2006 auto del ptr
+ return m;
+
+}
+Fem2D::Mesh * ReadMeshbamg( string * const & s) {
+ using bamg::Triangles;
+ Triangles * bTh= new Triangles(s->c_str());
+ // bTh->inquire();
+ Fem2D::Mesh * m=bamg2msh(bTh,false);// no renum
+ delete bTh;
+ // delete s; modif mars 2006 auto del ptr
+ // m->decrement(); 07/2008 FH auto del ptr
+ return m;
+}
+
+Fem2D::Mesh * buildmeshbamg( string * const & s, int nbvxin) {
+
+ using bamg::Triangles;
+ using bamg::Geometry;
+ Geometry Gh(s->c_str());
+ //double hmin = Gh.MinimalHmin();
+ //double hmax = Gh.MaximalHmax();
+ int nbvx = nbvxin ? nbvxin : ((Gh.nbv*Gh.nbv)/9 +1000);
+ Triangles * bTh= new Triangles(nbvx,Gh);
+ // bTh->inquire();
+ Fem2D::Mesh * m=bamg2msh(bTh,false);// no renum
+ delete bTh;
+ // delete s; modif mars 2006 auto del ptr
+ // m->decrement();
+ return m;
+}
diff --cc src/femlib/CheckPtr.cpp.orig
index 2fee089,0000000..d8e6934
mode 100644,000000..100644
--- a/src/femlib/CheckPtr.cpp.orig
+++ b/src/femlib/CheckPtr.cpp.orig
@@@ -1,516 -1,0 +1,534 @@@
+//#define NCHECKPTR // BUg with MPI ??? FH
+
+#if __APPLE__
+#include <malloc/malloc.h>
+#else
+#include <malloc.h>
+#endif
+
+static long verbosity;
+
+static long StorageUsed()
+{
+#if MALLOC_ZONE_SPECIFIC_FLAGS
+ struct mstats mem1;
+ mem1 = mstats();
+ return mem1.bytes_used;
+#elif M_MMAP_THRESHOLD
+ struct mallinfo mem1;
+ mem1=mallinfo();
+ return mem1.uordblks;
+#else
+ return 0;
+#endif
+
+}
+#ifndef NCHECKPTR
+#define DEBUGUNALLOC 1
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include <cstdlib>
+#include <cerrno>
+#include <cstdio>
+#include <new>
+
+void debugalloc()
+{ }
+
+void debugunalloc()
+{ static long count=0;
+ // debugalloc();
+ count++;}
+
+
+void exitalloc(int i)
+{ static long count=0;
+ count++;
+ exit(1);
+}
+
+// Modif: Juin 2001 for debuging missing delete point
+// -- THE MACRO
+// TO SHOW ALL ALLOCATION
+// #define SHOWALLOC
+// TO DEBUG ALL UN DELETE POINETUR
+
+
+int UnShowAlloc =1;
+
+int ShowAlloc(const char *s,size_t & lg);
+
+//inline void *operator new(size_t, void *place) { return place; }
+
+static int kerr=0;
+void * mymalloc(size_t l)
+{
+ char *p = (char*)malloc(l+16);
+ if (!p) return p;
+ for( int i = 0; i < 8 ; i++)
+ p[i] = 'a'+i,p[i+l+8] = 'z'-i; // put a marque before
+ return (void*) (p+8);
+}
+void myfree(char *p,size_t l=0,int nordre=0)
+{
+ if(p) {
+ p -= 8;
+ int k =0;
+ for( int i = 0; i < 8 ; i++)
+ {
+ if (p[i] != 'a' +i) k++;
+ if(l && (p[i+l+8] != 'z' -i)) k++;
+ }
+ for (size_t i=0;i<l;i++)
+ p[i+8]=127;
+ if(!k) free(p);
+ else {
+ debugalloc();
+ if (kerr++<20)
+ printf("@@@@@@@@@@@@@@@@@ Erreur myfree p= %p l=%ul n=%d\n",p,(unsigned int) l,nordre);
+
+ }
+ }
+}
+
+void *operator new(std::size_t) throw (std::bad_alloc);
+void *operator new[] (std::size_t) throw (std::bad_alloc);
+void operator delete(void * ) throw ();
+
+
+
+const int N100 = 100;
+class AllocData;
+
+class AllocExtern {
+ public:
+class OneAlloc {public:
+ void * p;
+ size_t l;
+ long n;
+ bool is_array ;
+ bool operator<(const OneAlloc & a) const { return n<a.n;}
+};
+
+ void HeapSort(OneAlloc **c,long n)
+ {
+ long l,j,r,i;
+ OneAlloc* crit;
+ c--; // on decale de 1 pour que le tableau commence a 1
+ if( n <= 1) return;
+ l = n/2 + 1;
+ r = n;
+ while (1) { // label 2
+ if(l <= 1 ) { // label 20
+ crit = c[r];
+ c[r--] = c[1];
+ if ( r == 1 ) { c[1]=crit; return;}
+ } else crit = c[--l];
+ j=l;
+ while (1) {// label 4
+ i=j;
+ j=2*j;
+ if (j>r) {c[i]=crit;break;} // L8 -> G2
+ if ((j<r) && (*c[j] < *c[j+1])) j++; // L5
+ if ( *crit < *c[j]) c[i]=c[j]; // L6+1 G4
+ else {c[i]=crit;break;} //L8 -> G2
+ }
+ }
+ }
+
+ class AllocData {public:
+ OneAlloc *a;
+ AllocData * next;
+ AllocData();
+ ~AllocData();
+ private:
+ AllocData(const AllocExtern::AllocData&);
+ void operator=(const AllocExtern::AllocData&);
+ };
+
+private:
+
+ static const long Maxundelptr = 2048;
+ static size_t StorageUsage;
+ static size_t AllocSize ;
+ static size_t MaxUsedSize;
+ static AllocData * AllocHead ;
+ static long NbAlloc;
+ static long NbAllocShow;
+ static long NbPtr;
+ static void * NextFree;
+ static long NbuDelPtr;
+ static long uDelPtr[Maxundelptr];
+ static bool after_end;
+ static char filename[128];
+ AllocData * NewAllocData();
+ OneAlloc *Alloc();
+public:
+
+ void * MyNewOperator(size_t ll,bool is_array );
+ void MyDeleteOperator(void * pp,bool is_array);
+ AllocExtern();
+ ~AllocExtern();
+ void init();
+ int ShowAlloc( const char *s,size_t & lg);
+ bool IsUnDelPtr(long nn) { // dichotomic find
+ long i=0;
+ long j=NbuDelPtr-1;
+ while (i<=j) {
+ long k = (i+j)/2, kn=uDelPtr[k];
+ if ( nn<kn) j=k-1;
+ else if ( nn > kn) i = k+1;
+ else
+ return true;}
+ return false;
+ }
+};
+
+static AllocExtern AllocExternData;
+size_t AllocExtern::StorageUsage=0;
+size_t AllocExtern::AllocSize =0;
+size_t AllocExtern::MaxUsedSize =0;
+AllocExtern::AllocData * AllocExtern::AllocHead =0;
+long AllocExtern::NbAlloc =0;
+long AllocExtern::NbAllocShow=0;
+long AllocExtern::NbPtr =0;
+void * AllocExtern::NextFree =0;
+long AllocExtern::NbuDelPtr =0;
+long AllocExtern::uDelPtr[Maxundelptr];
+bool AllocExtern::after_end =false;
+char AllocExtern::filename[128] ="ListOfUnAllocPtr.bin";
+
+AllocExtern::AllocData * AllocExtern::NewAllocData()
+{
+
+ AllocExtern::AllocData * ad = (AllocData *) mymalloc(sizeof(AllocData));
+ ad->a = (OneAlloc*) mymalloc(sizeof(OneAlloc)*N100);
+ for (int i=0;i<N100;i++)
+ ad->a[i].l=0,ad->a[i].p=NextFree,NextFree = & ad->a[i];
+ ad->next = AllocHead;
+ AllocHead = ad;
+#ifdef SHOWALLOC
+ printf("\t\tCheckPtr: OneAlloc[100] %lx\n",this);
+#endif
+ return ad;
+}
+
+
+
+AllocExtern::OneAlloc * AllocExtern::Alloc()
+{
+ OneAlloc * f = (OneAlloc *) NextFree;
+ if (!f)
+ AllocHead = NewAllocData();
+ f =(OneAlloc *) NextFree;
+ if (!f) exitalloc(1);
+ NextFree = f->p;
+ return f;
+}
+
+
+void * AllocExtern::MyNewOperator(size_t ll,bool is_array)
+{
+ if(after_end) return malloc(ll);
+ init();
+ AllocExtern::OneAlloc * a = Alloc();
+ a->p = mymalloc(ll);
+ a->l = ll+1; // pour les allocation null
+ a->n = ++NbAlloc;
+ a->is_array = is_array;
+ NbPtr++;
+ AllocSize += ll;
+#ifdef DEBUGUNALLOC
+ if ( (IsUnDelPtr(a->n) && (a->n >= DEBUGUNALLOC) ))
+ debugunalloc();
+#endif
+#ifdef SHOWALLOC
+ printf( "\t%d\tCheckPtr: New Alloc %ld %lx when %ld\n ",a->n, ll, a->p, a->n);
+#endif
+ MaxUsedSize = AllocSize < MaxUsedSize ? MaxUsedSize : AllocSize;
+ if( !ll && !a->p)
+ {
++<<<<<<< HEAD
+ if(verbosity>2) {
+ printf("\t\tCheckPtrMem Full Exit(10) New Alloc %ld %p when %ld\n ", ll, a->p, a->n);
+ printf ("\t\tCheckPtr:Max Memory used %10.3f kbytes " , MaxUsedSize/1024. );
+ printf (" Memory undelete %ld \n" , AllocSize);
+ }
++=======
++ printf("\t\tCheckPtrMem Full Exit(10) New Alloc %ld %p when %ld\n ", ll, a->p, a->n);
++ printf ("\t\tCheckPtr:Max Memory used %10.3f kbytes " , MaxUsedSize/1024. );
++ printf (" Memory undelete %ld \n" , AllocSize);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ exitalloc(1);
+ }
+ return (void*) ((char*)a->p);
+}
+
+void AllocExtern::MyDeleteOperator(void * pp,bool is_array)
+{
+ if(after_end) { /*free(pp)*/; return;}
+ init();
+ if (AllocHead)
+ {
+ AllocExtern::AllocData *p = AllocHead;
+ while (p)
+ {
+ for (int i=0;i<N100;i++)
+ if((p->a[i].l > 0) && (p->a[i].p == pp))
+ {
+#ifdef SHOWALLOC
+ printf("\t%d\tCheckPtr: delete Alloc %ld %lx when %ld \n",p->a[i].n,p->a[i].l-1, p->a[i].p, p->a[i].n);
+#endif
+ size_t ll = p->a[i].l-1;
+ for (size_t kkk=0;kkk<ll;kkk++)
+ ((char *) pp)[kkk]=18;
+
+ myfree((char*)pp,ll,p->a[i].n);
+
+ AllocSize -= ll;
+ NbPtr--;
+ p->a[i].l=0;
+ p->a[i].p = NextFree;
+ p->a[i].n =0;
+ if (p->a[i].is_array != is_array)
+ printf("\t\tCheckPtr: erreur delete [] ");
+ //if( p->a[i].n < NbAllocShow ) debugalloc();
+ NextFree = & p->a[i].p;
+ return;}
+ p = p->next;
+ }
+ if(pp)
+ {
+ printf( "\t\tCheckPtr: delete of bad pointer %p -----------\n",pp);
+ debugalloc();
+ }
+
+ } else
+ myfree((char*)pp);
+}
+void AllocExtern::init()
+{
+ static int count=0;
+ if(0== (count++))
+ {
+ sprintf(filename,"ListOfAllocPtr-%d.bin",(int) sizeof(void*));
+ StorageUsage=0;
+ AllocSize =0;
+ MaxUsedSize =0;
+ AllocHead =0;
+ NbAlloc =0;
+ NbPtr =0;
+ NextFree =0;
+ NbuDelPtr =0;
+ NbuDelPtr = 0;
+
+ after_end = false;
+
+ FILE *file=fopen(filename,"rb");
+
+ if (file)
+ {
+ fread(&NbuDelPtr,sizeof(long),1,file);
+ fread(uDelPtr,sizeof(long),NbuDelPtr,file);
+ if(NbuDelPtr> 100000000 && NbuDelPtr <0)
+ {
+ printf("Fatal error in the file %s is wrong (please remove)",filename);
+ exit(1);
+ }
+ fclose(file);
+ }
+ else
+ { // printf("fopen ListOfUnAllocPtr errno = %d\n",errno);
+ }
+ }
+}
+AllocExtern::AllocExtern()
+{
+ init();
+
+}
+
+AllocExtern::~AllocExtern()
+{
+ if(UnShowAlloc==0) return;
+ OneAlloc * list[Maxundelptr];
+
+ AllocData * p=AllocHead;
+ int k=0,kk=0;
+ int lln=0;
+
+ while (p) {int i=N100;
+ while(i--)
+ if (p->a[i].l >0 )
+ {
+ if ( p->a[i].n >= p->a[i].n) lln = p->a[i].n;
+ if ( p->a[i].n <= NbAllocShow )
+ k++;
+ else
+ if (kk<Maxundelptr)
+ list[kk++]=p->a+i;
+ }
+ p = p->next;
+ }
+ k+=kk;
+ kk=kk < Maxundelptr ? kk : Maxundelptr;
+ HeapSort(list,kk);
++<<<<<<< HEAD
+ if(verbosity > 2)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ for (int i= kk-10<0 ? 0 : kk-10 ;i<kk;i++)
+ {
+ printf ("\t\tCheckPtr:Undelete pointer %p size %ld when %ld\n", list[i]->p,list[i]->l,list[i]->n);
+ }
+ if (kk)
+ {
+ FILE *file=fopen(filename,"wb");
+ if (file)
+ {
+ NbuDelPtr=kk;
+ for (int i=0;i<kk;i++)
+ uDelPtr[i]=list[i]->n;
+ fwrite(&NbuDelPtr,sizeof(long),1,file);
+ fwrite(uDelPtr,sizeof(long),NbuDelPtr,file);
+ fclose(file);
+ }
+ }
+ else {}
+
++<<<<<<< HEAD
+ if(verbosity>2) {
+ if(k) printf ("\t\tCheckPtr:Nb of undelete pointer is %d last %d\n",k,lln);
+ printf ("\t\tCheckPtr:Max Memory used %10.3f kbytes " , MaxUsedSize/1024. );
+ printf (" Memory undelete %ld \n" , AllocSize);
+ }
++=======
++ if(k) printf ("\t\tCheckPtr:Nb of undelete pointer is %d last %d\n",k,lln);
++ printf ("\t\tCheckPtr:Max Memory used %10.3f kbytes " , MaxUsedSize/1024. );
++ printf (" Memory undelete %ld \n" , AllocSize);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ // clean store pointer
+ p=AllocHead;
+ while (p)
+ {
+ myfree((char*)p->a);
+ AllocData * pold = p;
+ p = p->next;
+ myfree((char*)pold);
+ }
+ AllocHead=0;
+ after_end=true;
+}
+// ------------------
+
+
+void *operator new(size_t ll ) throw (std::bad_alloc)
+{ void * p = AllocExternData.MyNewOperator(ll,false);
+ if (ll && !p) { printf("EXIT BECAUSE MEMORY FULL \n");
+ exitalloc(1); };
+ return p;}
+void *operator new[](size_t ll ) throw (std::bad_alloc)
+{ void * p = AllocExternData.MyNewOperator(ll,true);
+ if (ll && !p) { printf("EXIT BECAUSE MEMORY FULL \n");
+ exitalloc(1); };
+ return p;}
+
+
+void operator delete(void * pp) throw ()
+{ AllocExternData.MyDeleteOperator(pp,false);}
+void operator delete[](void * pp) throw ()
+{ AllocExternData.MyDeleteOperator(pp,true);}
+
+int AllocExtern::ShowAlloc(const char *s,size_t & lg) {
+ size_t m =StorageUsage;
+ StorageUsage =StorageUsed();
+ if (!NbAllocShow) {NbAllocShow=NbAlloc;}
++<<<<<<< HEAD
+ if(verbosity > 2)
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ printf ("----------CheckPtr:-----%s------ NbUndelPtr %ld Alloc: %ld NbPtr %ld Mem Usage: %zu diff: %ld\n",s,NbPtr,AllocSize,NbAlloc,StorageUsage,(long)(StorageUsage-m));
+ lg = AllocSize;
+ return NbPtr;
+}
+int ShowAlloc(const char *s,size_t & lg)
+{ return AllocExternData.ShowAlloc(s,lg);}
+#else
+#define XXXX
+#ifdef XXXX
+#include <cstdlib>
+#include <cerrno>
+#include <cstdio>
+#include <new>
+
+long CheckPtr___nbptr=0;
+size_t CheckPtr___memoryusage =0;
+
+void* operator new( size_t size ) throw(std::bad_alloc) {
+ CheckPtr___nbptr++;
+ void *p = malloc( size );
+
+ return p;
+}
+
+void* operator new[]( size_t size ) throw(std::bad_alloc) {
+ void *p = malloc(size);
+ CheckPtr___nbptr++;
+ return p;
+}
+
+void operator delete( void *p ) throw() {
+ free(p);
+ CheckPtr___nbptr--;
+
+}
+
+void operator delete[]( void *p ) throw() {
+ free(p);
+ CheckPtr___nbptr--;
+
+}
+
+int ShowAlloc(const char *s,size_t & lg)
+{
+ size_t m =StorageUsed();
+ long diff = m-CheckPtr___memoryusage;
+ if(verbosity > 0 && CheckPtr___memoryusage!=0 && m != CheckPtr___memoryusage)
+ printf("CheckPtr: Warning memory leak with malloc = %ld \n ",diff);
+ CheckPtr___memoryusage=m;
+ lg = 0; return CheckPtr___nbptr;}
+int UnShowAlloc =0;
+#else
+#include <stdlib.h>
+
+int ShowAlloc(const char *s,size_t & lg)
+{lg=0; return 0;}
+int UnShowAlloc =0;
+#endif
+#endif
diff --cc src/femlib/GenericMesh.hpp
index 8a3de7f,f517160..26c9b9f
--- a/src/femlib/GenericMesh.hpp
+++ b/src/femlib/GenericMesh.hpp
@@@ -517,7 -517,7 +517,7 @@@ public
int Contening(const Vertex * vv) const{ return ElementConteningVertex[ vv - vertices];}
void BuildAdj();
void BuildBoundaryElementAdj(); // Add J. Morice function that give the TheAdjacencesSurfaceLink :: Version avec un manifold
-- void BuildBoundaryElementAdj(const int &nbsurf, int* firstDefSurface, int* labelDefSurface, int* senslabelDefSurface); // version avec plusieurs vari�t�s
++ void BuildBoundaryElementAdj(const int &nbsurf, int* firstDefSurface, int* labelDefSurface, int* senslabelDefSurface); // version avec plusieurs vari�t�s
// void BuildBoundaryElementAdj_V2(const int &nbsurf, int* firstDefSurface, int* labelDefSurface, int* senslabelDefSurface); // bug inside a retoucher
void Buildbnormalv();
void BuildBound();
@@@ -941,7 -929,7 +929,7 @@@ void GenericMesh<T,B,V>::BuildBoundaryE
h.add(a,nk);
TheBoundaryElementAdjacencesLink[nk]=sens*(nk+1);
// nk est un nombre locale depend de la surfaces choisie
-- // element du bord est donn�e par :: surf_be[nk/3];
++ // element du bord est donn�e par :: surf_be[nk/3];
// arrete corespondante locale de l'element :: nk%3;
}
else
@@@ -1035,7 -1023,7 +1023,7 @@@
// cerr << "some element in the border element are not references in the Surface description" << endl;
// exit(1);
// }
--// assert(all_nbe_label == nbe); // autrement cela veut dire que certain element du bord n'ont pas �t� mis dans le descriptif
++// assert(all_nbe_label == nbe); // autrement cela veut dire que certain element du bord n'ont pas �t� mis dans le descriptif
// */
// int *organisation_be_label;
// organisation_be_label = new int[all_nbe_label];
diff --cc src/femlib/GenericMesh.hpp.orig
index 8a3de7f,f517160..424a2c6
--- a/src/femlib/GenericMesh.hpp.orig
+++ b/src/femlib/GenericMesh.hpp.orig
@@@ -686,19 -686,7 +686,23 @@@ public
delete [] vertices;
delete [] bnormalv;
if(gtree) delete gtree;
++<<<<<<< HEAD
+ ElementConteningVertex=0;
+ TheAdjacencesLink=0;
+ BoundaryElementHeadLink=0;
+ borderelements=0;
+ elements=0;
+ vertices=0;
+ bnormalv=0;
+ gtree=0;
+ nt=(0);
+ nv=(0);
+ nbe=(0);
+ mes=(0.);
+ mesb=(0.);
++=======
+
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
}
Serialize serialize() const;
@@@ -1280,9 -1268,8 +1284,14 @@@ DataFENodeDF GenericMesh<T,B,V>::BuildD
{
int i0=j++,i1=j++;
if(keys[i1]<keys[i0]) swap( keys[i0],keys[i1]);
++<<<<<<< HEAD
+ //typename HashTable<Key,Key>::iterator pe =
+ if(keys[i0]< keys[i1] ) // not equal ... Add nov. 2014
+ equi.add(keys[i0],keys[i1]);
++=======
+ //typename HashTable<Key,Key>::iterator pe =
+ equi.add(keys[i0],keys[i1]);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
// if(pe) assert(pe->k == keys[i0]);
}
@@@ -1293,18 -1280,15 +1302,30 @@@
for (int it=0,change=1;change;it++)
{
change=0;
++<<<<<<< HEAD
+ ffassert(it++<100);
+ for (typename HashTable<Key,Key>::iterator qe,pe=equi.begin() ; pe != equi.end(); ++pe)
+ {
+ if( verbosity>9999) cout << pe->k << " " << pe->v << endl;
+ ffassert( pe->k < pe->v);
+ qe=equi.find(pe->v);
+ if(qe)
+ {
+ if( verbosity>9999) cout << pe->k << " " << pe->v << " <=> " << qe->k <<endl;
+
+ change++;
+ ffassert( qe->k < qe->v);
++=======
+ assert(it<10);
+ for (typename HashTable<Key,Key>::iterator qe,pe=equi.begin() ; pe != equi.end(); ++pe)
+ {
+
+ assert( pe->k < pe->v);
+ qe=equi.find(pe->v);
+ if(qe)
+ { change++;
+ assert( qe->k < qe->v);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
pe->v = qe->v;
}
diff --cc src/femlib/MatriceCreuse.hpp.orig
index 1562079,0000000..9969e42
mode 100644,000000..100644
--- a/src/femlib/MatriceCreuse.hpp.orig
+++ b/src/femlib/MatriceCreuse.hpp.orig
@@@ -1,1039 -1,0 +1,1061 @@@
+#ifndef MatriceCreuse_h_
+#define MatriceCreuse_h_
+
+template<class T>
+ T Square(const T & r){return r*r;}
+
+
+#ifdef HAVE_LIBUMFPACK_XXXXXXXXXXXXX
+extern "C" {
+#ifdef HAVE_UMFPACK_H
+#include <umfpack.h>
+#else
+#ifdef HAVE_UMFPACK_UMFPACK_H
+#include <umfpack/umfpack.h>
+#else
+#ifdef HAVE_BIG_UMFPACK_UMFPACK_H
+#include <UMFPACK/umfpack.h>
+#else
+#ifdef HAVE_UFSPARSE_UMFPACK_H
+#include <ufsparse/umfpack.h>
+#else
+#ifdef HAVE_SUITESPARSE_UMFPACK_H
+#include <suitesparse/umfpack.h>
+#else
+
+ // Defaults to a local version of the UMFPACK headers
+#include "../../download/include/umfpack.h"
+
+#endif // HAVE_SUITESPARSE_UMFPACK_H
+#endif // HAVE_UFSPARSE_UMFPACK_H
+#endif // HAVE_BIG_UMFPACK_UMFPACK_H
+#endif // HAVE_UMFPACK_UMFPACK_H
+#endif // HAVE_UMFPACK_H
+}
+#endif
+
+#include "RNM.hpp"
+#include "fem.hpp"
+#include "FESpace.hpp"
+#include "DOperator.hpp"
+#include "QuadratureFormular.hpp"
+
+using Fem2D::Mesh;
+using Fem2D::FESpace;
+using Fem2D::FElement;
+using Fem2D::baseFElement;
+using Fem2D::FMortar;
+using Fem2D::TypeOfMortar;
+using Fem2D::QuadratureFormular;
+using Fem2D::QuadratureFormular1d;
+using Fem2D::QuadratureFormular_T_5;
+using Fem2D::QF_GaussLegendre3;
+const double EPSILON=1e-20;
+using Fem2D::onWhatIsEdge;
+
+//#define APROGRAMMER(a) {cerr << "A PROGRAMMER " #a << endl; exit (1) ;}
+#define ERREUR(a,b) {cerr << "ERREUR " #a<< b <<endl; throw(ErrorExec("FATAL ERREUR dans " __FILE__ "\n" #a " line: ",__LINE__)) ;}
+
+template <class R> class MatriceCreuse;
+template <class R> class MatriceElementaire;
+template <class R,class FESpace> class MatriceElementaireSymetrique;
+template <class R,class FESpace> class MatriceElementairePleine;
+template <class R> class MatriceMorse;
+template <class R> class MatriceProdTensoriel;
+
+//template <class R> R Square(R x){ return x*x;}
+
+template <class T> T* docpyornot(bool nocpy,T* p,int n)
+{
+ T * r=p;
+ if( !nocpy) { // do copy
+ r= new T[n]; ffassert(r);
+ if(p)
+ for(int i=0;i<n;i++)
+ r[i]=p[i];
+ }
+ else if( r==0) // always do allocation July 2009 for mpi matrice
+ { r= new T[n]; ffassert(r);}
+ return r;
+ }
+ template <class T,class TT> T* docpy(TT* p,int n)
+{
+ T * r=0;
+ if(p && n) { // do copy
+ r= new T[n]; ffassert(r);
+ for(int i=0;i<n;i++)
+ r[i]=T(p[i]); // pour cadna ???? FH
+ }
+ return r;
+ }
+
+
+
+template <class R>
+class MatriceElementaire {
+
+public:
+ enum TypeOfMatriceElementaire {Full=1,Symmetric=2};
+
+
+
+ int lga; // size of array a
+ R* a; // array coef --
+ int *ni,*nj; // list of df
+ // to build matrice on face or edge -----
+
+
+ int n,m; // n,m number of df
+ const TypeOfMatriceElementaire mtype;
+ KN<double> data; // to store value of basic function
+
+ const bool onFace ; // true if do int on face or edge with jump (VF or GD : Galerkin Discontinus)
+ // in with case add ...
++<<<<<<< HEAD
+ const int lnki,lnkj; // size of the 4 next array
++=======
++ const int lnk; // size of the 4 next array
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ int *nik,*nikk; // number of df in element k,kk for VF and GD methode
+ int *njk,*njkk; // number of df in element k,kk for VF and GD methode
+
+
+ MatriceElementaire(int datasize,int llga
+ ,int *nnj,int * nni,TypeOfMatriceElementaire t=Full)
+
+ : lga(llga),a(new R[lga]),
+ ni(nni),nj(nnj),n(0),m(0),mtype(t),data(datasize),
++<<<<<<< HEAD
+ onFace(false),lnki(0),lnkj(0),nik(0),nikk(0),njk(0),njkk(0)
++=======
++ onFace(false),lnk(0),nik(0),nikk(0),njk(0),njkk(0)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ {}
+
+
+ // for discontinous Galerkine method
+ MatriceElementaire(int datasize,int llga,int *nni,
+ int lk,
+ TypeOfMatriceElementaire t=Symmetric
+ )
+ :
+ lga(llga),a(new R[lga]),
+ ni(nni),nj(nni),n(0),m(0),mtype(t),data(datasize*(lk?2:1)) ,
+ onFace(lk!=0),
++<<<<<<< HEAD
+ lnki(lk),lnkj(lk),
++=======
++ lnk(lk),
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ nik(lk? new int[lk*2]:0),
+ nikk(nik+lk),
+ njk(nik),
+ njkk(nik+lk)
+ { ffassert(lk>=0);}
++<<<<<<< HEAD
+
+ // for discontinous Galerkine method
+ MatriceElementaire(int datasize,int llga,int *nni,int lki,int *nnj,int lkj,
+ TypeOfMatriceElementaire t=Full
+ )
+ :
+ lga(llga),a(new R[lga]),
+ ni(nni),nj(nnj),n(0),m(0),mtype(t),data(datasize*(lki+lkj?2:1)) ,
+ onFace(lki+lkj),
+ lnki(lki),lnkj(lkj),
+ nik(lki? new int[lki*2]:0),
+ nikk(nik+lki),
+ njk(lkj? new int[lkj*2]:0),
+ njkk(njk+lkj)
+ { ffassert(lki>=0);}// non teste ??? .... F. hecht ...
+
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ virtual ~MatriceElementaire() {
+ if(ni != nj)
+ delete [] nj;
+
+ delete [] ni;
+ delete [] a;
+ if ( nik) delete[] nik;
+ }
+
+ virtual R & operator() (int i,int j) =0;
+ virtual void call(int ,int ie,int label,void * data,void *Q=0) =0; //
+ const LinearComb<pair<MGauche,MDroit>,C_F0> * bilinearform;
+
+ MatriceElementaire & operator()(int k,int ie,int label,void * s=0,void *B=0) {
+ call(k,ie,label,s,B);
+ return *this;}
+};
+
+template <class FES>
+class MatDataFES {
+public:
+ typedef FES FESpace;
+ typedef typename FESpace::FElement FElement;
+
+ typedef typename FESpace::QFElement QFElement;
+ typedef typename FESpace::QFBorderElement QFBorderElement;
+ CountPointer<const FESpace> cUh,cVh;
+ const FESpace &Uh;
+ const FESpace &Vh;
+ const QFElement & FIT;
+ const QFBorderElement & FIE;
+ MatDataFES(const FESpace & UUh,const QFElement & fit, const QFBorderElement & fie)
+ :Uh(UUh),Vh(UUh),FIT(fit),FIE(fie) {}
+ MatDataFES(const FESpace & UUh,const FESpace & VVh,const QFElement & fit, const QFBorderElement & fie)
+ :Uh(UUh),Vh(VVh),FIT(fit),FIE(fie) {}
+
+
+};
+
+template <class R,class FES>
+class MatriceElementaireFES : public MatDataFES<FES> , public MatriceElementaire<R>
+{
+public:
+ typedef MatriceElementaire<R> MElm ;
+ using MElm::Full;
+ using MElm::Symmetric;
+
+ typedef typename MElm::TypeOfMatriceElementaire TypeOfMatriceElementaire;
+ typedef FES FESpace;
+
+ typedef typename FESpace::FElement FElement;
+ typedef typename FESpace::QFElement QFElement;
+ typedef typename FESpace::QFBorderElement QFBorderElement;
+
+ MatriceElementaireFES(const FESpace & UUh,const FESpace & VVh,int llga
+ ,int *nnj,int * nni,TypeOfMatriceElementaire t=Full,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+
+ :
+ MatDataFES<FES>(UUh,VVh,fit,fie),
+ MatriceElementaire<R>(UUh.esize()+VVh.esize(),llga,nnj,nni,t)
+ {}
+
+ MatriceElementaireFES(const FESpace & UUh,int llga,int *nni,
+ TypeOfMatriceElementaire t=Symmetric,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+ :
+ MatDataFES<FES>(UUh,UUh,fit,fie),
+ MatriceElementaire<R>(UUh.esize(),llga,nni,nni,t)
+ {}
+
+ // for discontinous Galerkine method
+ MatriceElementaireFES(const FESpace & UUh,int llga,int *nni,
+ int lk,
+ TypeOfMatriceElementaire t=Symmetric,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+ :
+ MatDataFES<FES>(UUh,UUh,fit,fie),
+ MatriceElementaire<R>(UUh.esize(),llga,nni,lk,t)
+ {}
++<<<<<<< HEAD
+
+ MatriceElementaireFES(const FESpace & UUh,const FESpace & VVh,int llga
+ ,int *nnj,int lkj,int * nni,int lki,TypeOfMatriceElementaire t=Full,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+
+ :
+ MatDataFES<FES>(UUh,VVh,fit,fie),
+ MatriceElementaire<R>(UUh.esize()+VVh.esize(),llga,nnj,lkj,nni,lki,t)
+ {}
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ ~MatriceElementaireFES() {}
+ const LinearComb<pair<MGauche,MDroit>,C_F0> * bilinearform;
+
+ MatriceElementaireFES & operator()(int k,int ie,int label,void * s=0,void *Q=0) {
+ this->call(k,ie,label,s,Q);
+ return *this;}
+};
+
+template <class R,class FES=FESpace>
+class MatriceElementairePleine:public MatriceElementaireFES<R,FES> {
+
+ /* --- stockage --
+ // n = 4 m = 5
+ // 0 1 2 3 4
+ // 5 6 7 8 9
+ // 10 11 12 13 14
+ // 15 16 17 18 19
+ ------------------*/
+public:
+ typedef FES FESpace;
+ typedef typename FESpace::Mesh Mesh;
+ typedef typename FESpace::QFElement QFElement;
+ typedef typename FESpace::QFBorderElement QFBorderElement;
+ typedef typename FESpace::FElement FElement;
+ typedef typename FESpace::Mesh::Rd Rd;
+
+
+ R & operator() (int i,int j) {return this->a[i*this->m+j];}
+ // MatPleineElementFunc element;
+ void (* element)(MatriceElementairePleine &,const FElement &,const FElement &, double*,int ie,int label,void *,Rd *) ;
+ void (* faceelement)(MatriceElementairePleine &,const FElement &,const FElement &,const FElement &,const FElement &, double*,int ie,int iee, int label,void *,Rd *) ;
+ void call(int k,int ie,int label,void *,void *B);
+
+ MatriceElementairePleine & operator()(int k,int ie,int label,void * stack=0,Rd *Q=0)
+ {call(k,ie,label,stack,Q);return *this;}
+ MatriceElementairePleine(const FESpace & VVh,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+ :MatriceElementaireFES<R,FES>(VVh,
+ Square(VVh.MaximalNbOfDF()),
+ new int[VVh.MaximalNbOfDF()],this->Full,fit,fie),
+ element(0),faceelement(0) {}
+
+ // matrice for VF or Galerkin Discontinus
+ MatriceElementairePleine(const FESpace & VVh,bool VF,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+ :MatriceElementaireFES<R,FES>(VVh,
+ Square(VVh.MaximalNbOfDF()*2),
+ new int[VVh.MaximalNbOfDF()*2],
+ VF?VVh.MaximalNbOfDF()*2:0,
+ this->Full,fit,fie),
+ element(0),faceelement(0) {}
+
+ MatriceElementairePleine(const FESpace & UUh,const FESpace & VVh,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+ :MatriceElementaireFES<R,FES>(UUh,VVh,
+ UUh.MaximalNbOfDF()*VVh.MaximalNbOfDF(),
+ new int[UUh.MaximalNbOfDF()],
+ new int[VVh.MaximalNbOfDF()],this->Full,fit,fie),
+ element(0),faceelement(0) {}
+
++<<<<<<< HEAD
+ MatriceElementairePleine(const FESpace & UUh,const FESpace & VVh,bool VF,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+ :MatriceElementaireFES<R,FES>(UUh,VVh,
+ UUh.MaximalNbOfDF()*VVh.MaximalNbOfDF()*4,
+ new int[UUh.MaximalNbOfDF()*2],VF?UUh.MaximalNbOfDF()*2:0,
+ new int[VVh.MaximalNbOfDF()*2],VF?VVh.MaximalNbOfDF()*2:0,this->Full,fit,fie),
+ element(0),faceelement(0) {}
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+};
+
+template <class R,class FES=FESpace>
+class MatriceElementaireSymetrique:public MatriceElementaireFES<R,FES> {
+
+
+
+ // --- stockage --
+ // 0
+ // 1 2
+ // 3 4 5
+ // 6 7 8 9
+ // 10 . . . .
+ //
+
+public:
+ typedef FES FESpace;
+ typedef typename FESpace::Mesh Mesh;
+ typedef typename FESpace::QFElement QFElement;
+ typedef typename FESpace::QFBorderElement QFBorderElement;
+ typedef typename FESpace::FElement FElement;
+ typedef typename FESpace::Mesh::Rd Rd;
+ R & operator()(int i,int j)
+ {return j < i ? this->a[(i*(i+1))/2 + j] : this->a[(j*(j+1))/2 + i] ;}
+ void (* element)(MatriceElementaireSymetrique &,const FElement &, double*,int ie,int label,void *,Rd *) ;
+ void (* mortar)(MatriceElementaireSymetrique &,const FMortar &,void *) ;
+ void call(int k,int ie,int label,void * stack,void *B);
+ MatriceElementaireSymetrique(const FESpace & VVh,
+ const QFElement & fit=*QFElement::Default,
+ const QFBorderElement & fie =*QFBorderElement::Default)
+ :MatriceElementaireFES<R,FES>(
+ VVh,
+ int(VVh.MaximalNbOfDF()*(VVh.MaximalNbOfDF()+1)/2),
+ new int[VVh.MaximalNbOfDF()],this->Symmetric,
+ fit,fie),
+ element(0),mortar(0) {}
+ MatriceElementaireSymetrique & operator()(int k,int ie,int label,void * stack=0,Rd *B=0)
+ {this->call(k,ie,label,stack,B);return *this;};
+};
+
+
+template <class R> class MatriceProfile;
+
+// classe modele pour matrice creuse
+// ---------------------------------
+template <class R>
+class MatriceCreuse : public RefCounter,public VirtualMatrice<R> {
+public:
+ MatriceCreuse(int NbOfDF,int mm,int ddummy)
+ : VirtualMatrice<R>(NbOfDF,mm),n(NbOfDF),m(mm),dummy(ddummy){}
+ MatriceCreuse(int NbOfDF)
+ : VirtualMatrice<R>(NbOfDF),n(NbOfDF),m(NbOfDF),dummy(1){}
+ int n,m,dummy;
+ virtual int size() const =0;
+
+ virtual MatriceCreuse & operator +=(MatriceElementaire<R> & )=0;
+ virtual void operator=(const R & v) =0; // Mise a zero
+ KN_<R> & MatMul(KN_<R> &ax,const KN_<R> &x) const {
+ ax= R();
+ addMatMul(x,ax);
+ return ax;}
+ virtual ostream& dump (ostream&) const =0;
+ virtual void Solve(KN_<R> & x,const KN_<R> & b) const =0;
+ virtual ~MatriceCreuse(){}
+ virtual R & diag(int i)=0;
+ virtual void SetBC(int i,double tgv)=0;
+ virtual R & operator()(int i,int j)=0;
+ virtual R * pij(int i,int j) const =0; // Add FH
+ virtual void resize(int n,int m) {AFAIRE("MatriceCreuse::resize");} // a faire dans les classe derive ... // add march 2009 FH
+ virtual MatriceMorse<R> *toMatriceMorse(bool transpose=false,bool copy=false) const {return 0;} // not
+ virtual bool addMatTo(R coef,std::map< pair<int,int>, R> &mij,bool trans=false,int ii00=0,int jj00=0,bool cnj=false,double threshold=0.)=0;
+ // Add FH april 2005
+ virtual R pscal(const KN_<R> & x,const KN_<R> & y) =0 ; // produit scalaire
+ virtual double psor(KN_<R> & x,const KN_<R> & gmin,const KN_<R> & gmax , double omega) =0;
+ virtual void setdiag(const KN_<R> & x)=0 ;
+ virtual void getdiag( KN_<R> & x) const =0 ;
+ // end add
+ virtual int NbCoef() const {return 0;};
+ virtual void setcoef(const KN_<R> & x)=0 ;
+ virtual void getcoef( KN_<R> & x) const =0 ;
+ // Add FH oct 2005
+ bool ChecknbLine(int nn) const { return n==nn;}
+ bool ChecknbColumn(int mm) const { return m==mm;}
+
+ // end ADD
+
+};
+
+template <class R>
+inline ostream& operator <<(ostream& f,const MatriceCreuse<R> & m)
+ {return m.dump(f);}
+
+template <class R>
+KN_<R> & operator/=(KN_<R> & x ,const MatriceProfile<R> & a) ;
+
+
+enum FactorizationType {
+ FactorizationNO=0,
+ FactorizationCholeski=1,
+ FactorizationCrout=2,
+ FactorizationLU=3};
+
+template <class R>
+class MatriceProfile:public MatriceCreuse<R> {
+public:
+ mutable R *L; // lower
+ mutable R *U; // upper
+ mutable R *D; // diagonal
+ int *pL; // profile L
+ int *pU; // profile U
+ mutable FactorizationType typefac;
+ FactorizationType typesolver;
+ ostream& dump (ostream&) const ;
+ MatriceProfile(const int n,const R *a);
+
+ template<class FESpace>
+ MatriceProfile(const FESpace &,bool VF=false);
+ MatriceProfile(int NbOfDF,R* d,
+ R* u, int * pu,
+ R* l, int * pl,
+ FactorizationType tf=FactorizationNO)
+ : MatriceCreuse<R>(NbOfDF),L(l),U(u),D(d),pL(pl),pU(pu),
+ typefac(tf),typesolver(FactorizationNO){}
+
+ const MatriceProfile t() const
+ {return MatriceProfile(this->n,D,L,pL,U,pU,typefac);}
+ const MatriceProfile lt() const
+
+
+ {return MatriceProfile(this->n,0,L,pL,0,0);}
+ const MatriceProfile l() const
+ {return MatriceProfile(this->n,0,0,0,L,pL);}
+ const MatriceProfile d() const
+ {return MatriceProfile(this->n,D,0,0,0,0);}
+ const MatriceProfile ld() const
+ {return MatriceProfile(this->n,D,0,0,L,pL);}
+ const MatriceProfile ldt() const
+ {return MatriceProfile(this->n,D,L,pL,0,0);}
+ const MatriceProfile du() const
+ {return MatriceProfile(this->n,D,U,pU,0,0);}
+ const MatriceProfile u() const
+ {return MatriceProfile(this->n,0,U,pU,0,0);}
+ const MatriceProfile ut() const
+
+
+ {return MatriceProfile(this->n,0,0,0,U,pU);}
+
+ void Solve(KN_<R> &x,const KN_<R> &b) const {
+ /*if (typefac==0) code faux // FH nov 2006
+ switch(typefac)
+ {
+ FactorizationCholeski: cholesky() ; break;
+ FactorizationCrout: crout(); break;
+ FactorizationLU: LU(); break;
+ }*/
+ if (&x != &b) x=b;x/=*this;}
+
+ int size() const ;
+ void resize(int n,int m) { AFAIRE("MatriceProfile::resize");} // a faire ... add march 2009 FH
+ ~MatriceProfile();
+ // KN_<R> operator* (const KN_<R> & ) const ;
+ void addMatMul(const KN_<R> &x,KN_<R> &ax) const;
+ void addMatTransMul(const KN_<R> &x,KN_<R> &ax) const
+ { this->t().addMatMul(x,ax);}
+ MatriceCreuse<R> & operator +=(MatriceElementaire<R> &);
+ void operator=(const R & v); // Mise a zero
+ void cholesky(double = EPSILON/8.) const ; //
+ void crout(double = EPSILON/8.) const ; //
+ void LU(double = EPSILON/8.) const ; //
+ R & diag(int i) { return D[i];}
+ void SetBC (int i,double tgv) {
+ if( tgv>=0) D[i]=tgv;
+ else { ffassert(tgv<0); } // to hard ..
+ }
+ R & operator()(int i,int j) { if(i!=j) ffassert(0); return D[i];} // a faire
+ R * pij(int i,int j) const { if(i!=j) ffassert(0); return &D[i];} // a faire Modif FH 31102005
+ MatriceMorse<R> *toMatriceMorse(bool transpose=false,bool copy=false) const ;
+
+ template<class F> void map(const F & f)
+ {
+ for(int i=0;i<this->n;++i)
+ D[i]=f(D[i]);
+ if (L)
+ for(int i=0;i<pL[this->n];++i)
+ L[i]=f(L[i]);
+ if (L && (L != U) )
+ for(int i=0;i<pL[this->m];++i)
+ U[i]=f(U[i]);
+ }
+
+ template<class RR> MatriceProfile(const MatriceProfile<RR> & A)
+ : MatriceCreuse<R>(A.n,A.m,0)
+ {
+
+ typefac=A.typefac;
+ pL= docpy<int,int>(A.pL,this->n+1);
+ D = docpy<R,RR>(A.D,this->n);
+ if ( A.pL == A.pU ) pU=pL;
+ else pU= docpy<int,int>(A.pU,this->m+1);
+
+ L= docpy<R,RR>(A.L,pL[this->n]);
+
+ if ( A.L == A.U ) U=L;
+ else U= docpy<R,RR>(A.U,pU[this->m]);
+
+
+ }
+
+
+ bool addMatTo(R coef,std::map< pair<int,int>, R> &mij,bool trans=false,int ii00=0,int jj00=0,bool cnj=false,double threshold=0.);
+
+ // Add FH april 2005
+ R pscal(const KN_<R> & x,const KN_<R> & y); // produit scalaire
+ double psor(KN_<R> & x,const KN_<R> & gmin,const KN_<R> & gmax , double omega);
+ void setdiag(const KN_<R> & x) ;
+ void getdiag( KN_<R> & x) const ;
+ // end add
+ // Add FH oct 2005
+ int NbCoef() const ;
+ void setcoef(const KN_<R> & x);
+ void getcoef( KN_<R> & x) const ;
+ // end add
+
+ /*----------------------------------------------------------------
+ D[i] = A[ii]
+ L[k] = A[ij] j < i avec: pL[i]<= k < pL[i+1] et j = pL[i+1]-k
+ U[k] = A[ij] i < j avec: pU[j]<= k < pU[j+1] et i = pU[i+1]-k
+ remarque pL = pU generalement
+ si L = U => la matrice est symetrique
+ -------------------------------------------------------------------
+ */
+ private:
+ void operator=(const MatriceProfile & A);
+};
+
+
+
+template <class R>
+class MatriceMorse:public MatriceCreuse<R> {
+// numebering is no-symmetric
+// the all line i :
+// k= lg[i] .. lg[i+1]+1
+// j = cl[k]
+// aij=a[k]
+// otherwise symmetric case
+// same but just the LOWER part is store (j <= i)
+// and aii exist always in symmetric case
+// -----------------------------------------
+
+public:
+ int nbcoef;
+ bool symetrique;
+ R * a;
+ int * lg;
+
+ int * cl;
+public:
+
+
+ class VirtualSolver :public RefCounter {
+ friend class MatriceMorse;
+ virtual void Solver(const MatriceMorse<R> &a,KN_<R> &x,const KN_<R> &b) const =0;
+};
+
+ MatriceMorse():MatriceCreuse<R>(0),nbcoef(0),symetrique(true),a(0),lg(0),cl(0),solver(0) {};
+ MatriceMorse(KNM_<R> & A, double tol) ;
+ MatriceMorse(const int n,const R *a);
+// :MatriceCreuse<R>(n),solver(0) {}
+ MatriceMorse(istream & f);
+
+ template<class FESpace> explicit
+ MatriceMorse(const FESpace & Uh,bool sym,bool VF=false)
+ :MatriceCreuse<R>(Uh.NbOfDF),solver(0) {Build(Uh,Uh,sym,VF);}
+
+ template<class FESpace> explicit
+ MatriceMorse(const FESpace & Uh,const FESpace & Vh,bool VF=false)
+ :MatriceCreuse<R>(Uh.NbOfDF,Vh.NbOfDF,0),solver(0)
+ {Build(Uh,Vh,false,VF);}
+
+ template<class FESpace> explicit
+ MatriceMorse(const FESpace & Uh,const FESpace & Vh,
+ void (*build)(MatriceMorse *,const FESpace & Uh,const FESpace & Vh,void *data),void *data=0
+ )
+ :MatriceCreuse<R>(Uh.NbOfDF,Vh.NbOfDF,0),solver(0)
+ {build(this,Uh,Vh,data);
+ }
+
+MatriceMorse(int nn,int mm,int nbc,bool sym,R *aa=0,int *ll=0,int *cc=0,bool dd=false, const VirtualSolver * s=0,bool transpose=false )
+ :MatriceCreuse<R>(nn,mm,dd && !transpose),
+ nbcoef(nbc),
+ symetrique(sym), // transpose = true => dummy false (new matrix)
+ a(docpyornot(this->dummy,aa,nbc)),
+ lg(docpyornot(this->dummy,ll,nn+1)),
+ cl(docpyornot(this->dummy,cc,nbc)),
+ solver(s)
+ { if(transpose) dotransposition(); };
+ void Solve(KN_<R> &x,const KN_<R> &b) const;
+ int size() const ;
+ void addMatMul(const KN_<R> &x,KN_<R> &ax) const;
+ void addMatTransMul(const KN_<R> &x,KN_<R> &ax) const;
+ MatriceMorse & operator +=(MatriceElementaire<R> &);
+ void operator=(const R & v)
+ { for (int i=0;i< nbcoef;i++) a[i]=v;}
+ virtual ~MatriceMorse(){ if (!this->dummy) { delete [] a; delete [] cl;delete [] lg;}}
+ ostream& dump(ostream & f) const ;
+ R * pij(int i,int j) const ;
+ R operator()(int i,int j) const {R * p= pij(i,j) ;throwassert(p); return *p;}
+ R & operator()(int i,int j) {R * p= pij(i,j) ;throwassert(p); return *p;}
+ R & diag(int i) {R * p= pij(i,i) ;throwassert(p); return *p;}
+ void SetBC (int i,double tgv) {
+ R * p= pij(i,i) ;
+ ffassert(p);
+ if( tgv>=0) *p=tgv;
+ else {
+ ffassert(!symetrique);
+ for (int k=lg[i];k<lg[i+1]; ++k) a[k]=0;// put the line to Zero.
+ *p = 1. ; // and the diag coef to 1.
+ }
+ }
+
+ void SetSolver(const VirtualSolver & s){solver=&s;}
+ void SetSolverMaster(const VirtualSolver * s){solver.master(s);}
+ bool sym() const {return symetrique;}
+ // Add FH april 2005
+ R pscal(const KN_<R> & x,const KN_<R> & y); // produit scalaire
+ double psor(KN_<R> & x,const KN_<R> & gmin,const KN_<R> & gmax , double omega);
+ void setdiag(const KN_<R> & x) ;
+ void getdiag( KN_<R> & x) const ;
+ // end add
+
+ // Add FH oct 2005
+ int NbCoef() const ;
+ void setcoef(const KN_<R> & x);
+ void getcoef( KN_<R> & x) const ;
+ // end add
+void resize(int n,int m) ; // add march 2009 ...
+template<class K>
+ MatriceMorse(int nn,int mm, std::map< pair<int,int>, K> & m, bool sym);
+
+ template<class RB,class RAB>
+ void prod(const MatriceMorse<RB> & B, MatriceMorse<RAB> & AB);
+
+ MatriceMorse<R> *toMatriceMorse(bool transpose=false,bool copy=false) const {
+ return new MatriceMorse(this->n,this->m,nbcoef,symetrique,a,lg,cl,copy, solver,transpose);}
+ bool addMatTo(R coef,std::map< pair<int,int>, R> &mij,bool trans=false,int ii00=0,int jj00=0,bool cnj=false,double threshold=0.);
+
+ template<typename RR,typename K> static RR CastTo(K b){return b;}
+
+ template<class K>
+ MatriceMorse(const MatriceMorse<K> & , R (*f)(K) );
+ template<class K>
+ MatriceMorse(const MatriceMorse<K> & );
+
+ private:
+ void dotransposition () ; // do the transposition
+ CountPointer<const VirtualSolver> solver;
+
+ void operator=(const MatriceMorse & );
+
+ template<class FESpace>
+ void Build(const FESpace & Uh,const FESpace & Vh,bool sym,bool VF=false);
+
+};
+
+
+template<class R> class StopGC { public: virtual bool Stop(int iter, R *, R * ){cout << " Stop !!!!!\n"; return false;} };
+template<class R,class M,class P,class S >// S=StopGC<Real>
+int ConjuguedGradient(const M & A,const P & C,const KN_<R> &b,KN_<R> &x,const int nbitermax, double &eps,long kprint=1000000000,S *Stop=0)
+{
+
+// ConjuguedGradient lineare A*x est appele avec des conditions au limites
+// non-homogene puis homogene pour calculer le gradient
+ if (verbosity>50)
+ kprint=2;
+ if (verbosity>99) cout << A << endl;
+ throwassert(&x && &b && &A && &C);
+ typedef KN<R> Rn;
+ int n=b.N();
+ throwassert(n==x.N());
+ Rn g(n), h(n), Ah(n), & Cg(Ah); // on utilise Ah pour stocke Cg
+ g = A*x;
+ double xx= RNM::real((x,conj(x)));
+ double epsold=eps;
+ g -= b;// g = Ax-b
+ Cg = C*g; // gradient preconditionne
+ h =-Cg;
+ double g2 = RNM::real((Cg,conj(g)));
+ if (g2 < 1e-30)
+ { if(verbosity>1 || (kprint<100000))
+ cout << "GC g^2 =" << g2 << " < 1.e-30 Nothing to do " << endl;
+ return 2; }
+ double reps2 =eps >0 ? eps*eps*g2 : -eps; // epsilon relatif
+ eps = reps2;
+ for (int iter=0;iter<=nbitermax;iter++)
+ {
+ Ah = A*h;
+ double hAh =RNM::real((h,conj(Ah)));
+ // if (Abs(hAh)<1e-30) ExecError("CG2: Matrix non defined, sorry ");
+ R ro = - RNM::real((g,conj(h)))/ hAh; // ro optimal (produit scalaire usuel)
+ x += ro *h;
+ g += ro *Ah; // plus besoin de Ah, on utilise avec Cg optimisation
+ Cg = C*g;
+ double g2p=g2;
+ g2 = RNM::real((Cg,conj(g)));
+ bool stop = Stop && Stop->Stop(iter,x,g);
+
+ if ( !(iter%kprint) && iter && (verbosity>3) )
+ cout << "CG:" <<iter << " ro = " << ro << " ||g||^2 = " << g2 << " " << stop << endl;
+
+ if (g2 < reps2 || stop) {
+ if ( !iter && !xx && g2 && epsold >0 ) {
+ // change fo eps converge to fast due to the
+ // penalization of boundary condition.
+ eps = epsold*epsold*g2;
+ if (verbosity>3 || (kprint<3))
+ cout << "CG converge to fast (pb of BC) restart: " << iter << " ro = "
+ << ro << " ||g||^2 = " << g2 << " <= " << reps2 << " new eps2 =" << eps <<endl;
+ reps2=eps;
+ }
+ else
+ {
+ if (verbosity>1 || (kprint<100000) )
+ cout << "CG converge: " << iter << " ro = " << ro << " ||g||^2 = " << g2 << endl;
+ return 1;// ok
+ }
+ }
+ double gamma = g2/g2p;
+ h *= gamma;
+ h -= Cg; // h = -Cg * gamma* h
+ }
+ if(verbosity)
+ cout << " GC: method doesn't converge in " << nbitermax
+ << " iteration , xx= " << xx<< endl;
+ return 0;
+}
+
+template<class R,class M,class P,class S>// S=StopGC<Real>
+int ConjuguedGradient2(const M & A,const P & C,KN_<R> &x,const KN_<R> &b,const int nbitermax, double &eps,long kprint=1000000000,S *Stop=0)
+{
+// ConjuguedGradient2 affine A*x = 0 est toujours appele avec les condition aux limites
+// -------------
+
+ throwassert(&x && &A && &C);
+ typedef KN<R> Rn;
+ int n=x.N();
+ // if (verbosity>99) kprint=1;
+ R ro=1;
+ Rn g(n),h(n),Ah(n), & Cg(Ah); // on utilise Ah pour stocke Cg
+ g = A*x;
+ g -= b;
+ Cg = C*g; // gradient preconditionne
+ h =-Cg;
+ R g2 = (Cg,g);
+ if (g2 < 1e-30)
+ { if(verbosity>1 || kprint< 1000000)
+ cout << "GC g^2 =" << g2 << " < 1.e-30 Nothing to do " << endl;
+ return 2; }
+ if (verbosity>5 || (kprint<2))
+ cout << " 0 GC g^2 =" << g2 << endl;
+ R reps2 =eps >0 ? eps*eps*g2 : -eps; // epsilon relatif
+ eps = reps2;
+ for (int iter=0;iter<=nbitermax;iter++)
+ {
+ R rop = ro;
+ x += rop*h; // x+ rop*h , g=Ax (x old)
+ // ((Ah = A*x - b) - g);
+ // Ah -= b; // Ax + rop*Ah = rop*Ah + g =
+ // Ah -= g; // Ah*rop
+ Ah = A*x;
+ Ah -= b; // Ax + rop*Ah = rop*Ah + g =
+ Ah -= g; // Ah*rop
+ R hAh =(h,Ah);
+ if (RNM::norm2(hAh)<1e-60) ExecError("CG2: Matrix is not defined (/0), sorry ");
+ ro = - (g,h)*rop/hAh ; // ro optimal (produit scalaire usuel)
+ x += (ro-rop) *h;
+ g += (ro/rop) *Ah; // plus besoin de Ah, on utilise avec Cg optimisation
+ Cg = C*g;
+ R g2p=g2;
+ g2 = (Cg,g);
+ bool stop = Stop && Stop->Stop(iter,x,g);
+ if ( ( (iter%kprint) == kprint-1) /*&& verbosity >1*/ )
+ cout << "CG:" <<iter << " ro = " << ro << " ||g||^2 = " << g2 << " " << stop << endl;
+ if (stop || g2 < reps2 ) {
+ if (kprint <= nbitermax )
+ cout << "CG converges " << iter << " ro = " << ro << " ||g||^2 = " << g2
+ << " stop=" << stop << " /Stop= " << Stop << endl;
+ return 1;// ok
+ }
+ R gamma = g2/g2p;
+ h *= gamma;
+ h -= Cg; // h = -Cg * gamma* h
+ }
+ //if (nbitermax <= nbitermax )
+ cout << "CG does'nt converge: " << nbitermax << " ||g||^2 = " << g2 << " reps2= " << reps2 << endl;
+ return 0;
+}
+
+template <class R>
+class MatriceIdentite:public VirtualMatrice<R> { public:
+ typedef typename VirtualMatrice<R>::plusAx plusAx;
+ MatriceIdentite(int n) :VirtualMatrice<R>(n) {};
+ void addMatMul(const KN_<R> & x, KN_<R> & Ax) const {
+ ffassert(x.N()==Ax.N());
+ Ax+=x; }
+ plusAx operator*(const KN<R> & x) const {return plusAx(this,x);}
+ bool ChecknbLine(int n) const { return true;}
+ bool ChecknbColumn(int m) const { return true;}
+
+};
+
+template<class R>
+class SolveGCDiag : public MatriceMorse<R>::VirtualSolver , public VirtualMatrice<R>{
+ int n;
+ int nbitermax;
+ double eps;
+ mutable double epsr;
+ KN<R> D1;
+ public:
+ typedef typename VirtualMatrice<R>::plusAx plusAx;
+ SolveGCDiag(const MatriceMorse<R> &A,int itmax,double epsilon=1e-6) :
+ VirtualMatrice<R>(A.n),
+ n(A.n),nbitermax(itmax?itmax: Max(100,n)),eps(epsilon),epsr(0),D1(n)
+ { //throwassert(A.sym());
+ for (int i=0;i<n;i++)
+ D1[i] = 1./A(i,i);}
+ void Solver(const MatriceMorse<R> &a,KN_<R> &x,const KN_<R> &b) const {
+ epsr = (eps < 0) ? (epsr >0 ? -epsr : -eps ) : eps ;
+ // cout << " epsr = " << epsr << endl;
+ ConjuguedGradient<R,MatriceMorse<R>,SolveGCDiag<R>,StopGC<R> >(a,*this,b,x,nbitermax,epsr );
+ }
+plusAx operator*(const KN_<R> & x) const {return plusAx(this,x);}
+
+
+ void addMatMul(const KN_<R> & x, KN_<R> & Ax) const
+ { ffassert(x.N()==Ax.N());
+ for (int i=0;i<n;i++)
+ Ax[i]+= D1[i]*x[i];}
+
+ bool ChecknbLine(int nn) const { return n==nn;}
+ bool ChecknbColumn(int mm) const { return n==mm;}
+
+};
+
+struct TypeSolveMat {
+ enum TSolveMat { NONESQUARE=0, LU=1, CROUT=2, CHOLESKY=3, GC = 4 , GMRES = 5, SparseSolver=6, SparseSolverSym=7 };
+ TSolveMat t;
+ bool sym;
+ bool profile;
+ TypeSolveMat(TSolveMat tt=LU) :t(tt),
+ sym(t == CROUT || t ==CHOLESKY || t==GC || t==SparseSolverSym ),
+ profile(t == CROUT || t ==CHOLESKY || t ==LU ) {}
+ bool operator==(const TypeSolveMat & a) const { return t == a.t;}
+ bool operator!=(const TypeSolveMat & a) const { return t != a.t;}
+ static TSolveMat defaultvalue;
+};
+
+// add FH , JM avril 2009
+template<class K,class V> class MyMap;
+class String;
+typedef void * pcommworld; // to get the pointeur to the comm word ... in mpi
+// to build
+#define VDATASPARSESOLVER 1
+int Data_Sparse_Solver_version() ; //{ return VDATASPARSESOLVER;}
+struct Data_Sparse_Solver {
+ bool initmat;
+ TypeSolveMat* typemat;
+ double epsilon;
+ const void * precon;
+ int NbSpace;
+ int strategy;
+ double tgv;
+ bool factorize;
+ double tol_pivot;
+ double tol_pivot_sym;
+ int itmax ;
+ string data_filename;
+ KN<long> lparams; // copy arry more secure ...
+ KN<double> dparams;
+
+ MyMap<String,String> * smap;
+
+ KN<long> perm_r;
+ KN<long> perm_c;
+ KN<double> scale_r;
+ KN<double> scale_c;
+ string sparams;
+ pcommworld commworld; // pointeur sur le commworld
+ int master; // master rank in comm add FH 02/2013 for MUMPS ... => VDATASPARSESOLVER exist
+ /*
+ int *param_int;
+ double *param_double;
+ string *param_char;
+ int *perm_r;
+ int *perm_c;
+ string *file_param_int;
+ string *file_param_double;
+ string *file_param_char;
+ string *file_param_perm_r;
+ string *file_param_perm_c;
+ */
+
+ Data_Sparse_Solver()
+ :
+ initmat(1),
+ typemat(0),
+ strategy(0),
+ tgv(1e30),
+ factorize(0),
+ epsilon(1e-6),
+ precon(0),
+ tol_pivot(-1),
+ tol_pivot_sym(-1),
+ NbSpace(50),
+ itmax(0),
+ // lparams(0,0),
+ // dparams(0,0),
+ smap(0) ,
+// perm_r(0,0),
+// perm_c(0,0),
+// scale_r(0,0),
+ // scale_c(0,0)
+
+ /*
+ param_int(0),
+ param_double(0),
+ param_char(0),
+ perm_r(0),
+ perm_c(0),
+ file_param_int(0),
+ file_param_double(0),
+ file_param_perm_r(0),
+ file_param_perm_c(0),
+ */
+ //sparams,
+ commworld(0),
+ master(0)
+ {}
+
+private:
+ Data_Sparse_Solver(const Data_Sparse_Solver& ); // pas de copie
+};
+
+// add Sep 2007 for generic Space solver
+#define DCL_ARG_SPARSE_SOLVER(T,A) Stack stack,const MatriceMorse<T> *A, Data_Sparse_Solver & ds
+#define ARG_SPARSE_SOLVER(A) stack,A, ds
+
+typedef MatriceMorse<double>::VirtualSolver *
+(*SparseRMatSolve)(DCL_ARG_SPARSE_SOLVER(double,A) );
+
+
+typedef MatriceMorse<Complex>::VirtualSolver *
+(*SparseCMatSolve)(DCL_ARG_SPARSE_SOLVER(Complex,A) );
+
+
+template<class R> struct DefSparseSolver {
+ typedef typename MatriceMorse<R>::VirtualSolver *
+ (*SparseMatSolver)(DCL_ARG_SPARSE_SOLVER(R,A) );
+
+ static SparseMatSolver solver;
+
+ static typename MatriceMorse<R>::VirtualSolver *
+
+ Build( DCL_ARG_SPARSE_SOLVER(R,A) )
+
+ {
+ typename MatriceMorse<R>::VirtualSolver *ret=0;
+ if(solver)
+ ret =(solver)(ARG_SPARSE_SOLVER(A));
+ return ret;
+ }
+};
+
+// add Dec 2012 F.H. for optimisation ..
+template<class R> struct DefSparseSolverSym {
+ typedef typename MatriceMorse<R>::VirtualSolver *
+ (*SparseMatSolver)(DCL_ARG_SPARSE_SOLVER(R,A) );
+
+ static SparseMatSolver solver;
+
+ static typename MatriceMorse<R>::VirtualSolver *
+
+ Build( DCL_ARG_SPARSE_SOLVER(R,A) )
+
+ {
+ typename MatriceMorse<R>::VirtualSolver *ret=0;
+ if(solver)
+ ret =(solver)(ARG_SPARSE_SOLVER(A));
+ return ret;
+ }
+};
+
+// End Sep 2007 for generic Space solver
+
+
+
+inline void C2RR(int n,Complex *c,double *cr,double *ci)
+{
+ for (int i=0;i<n;i++)
+ {
+ cr[i]=real(c[i]);
+ ci[i]=imag(c[i]);
+ }
+}
+
+inline void RR2C(int n,double *cr,double *ci,Complex *c)
+{
+ for (int i=0;i<n;i++)
+ {
+ c[i]=Complex(cr[i],ci[i]);
+ }
+}
+
+
+
+#endif
diff --cc src/femlib/MatriceCreuse_tpl.hpp.orig
index 31eecbf,0000000..cbad490
mode 100644,000000..100644
--- a/src/femlib/MatriceCreuse_tpl.hpp.orig
+++ b/src/femlib/MatriceCreuse_tpl.hpp.orig
@@@ -1,1947 -1,0 +1,1980 @@@
+#ifndef MatriceCreuse_tpl_
+#ifndef MatriceCreuse_h_
+#include "MatriceCreuse.hpp"
+#include <limits>
+#include <set>
+#include <list>
+#include <map>
+#endif
+
+#ifndef __MWERKS__
+// test blas
+// on MacOS9 under MWERKS
+// cblas_ddot macos-9 is not
+#ifdef HAVE_CBLAS_H
+extern "C" {
+#define FF_VERSION VERSION
+#undef VERSION
+#include <cblas.h>
+#undef VERSION
+#define VERSION VERSION
+}
+#define WITHBLAS 1
+#elif HAVE_VECLIB_CBLAS_H
+#include <vecLib/cblas.h>
+#define WITHBLAS 1
+#endif
+#endif
+#ifdef WITHBLAS
+template<class R> inline R blas_sdot(const int n,const R *sx,const int incx,const R *sy,const int incy)
+{
+ R s=R();
+
+ if(incx == 1 && incy == 1)
+ for (int k = 0; k< n; k++)
+ s += *sx++ * * sy++;
+ else
+ for (int k = 0; k< n; k++, sx += incx, sy += incy)
+ s += *sx * *sy;
+ return s;
+}
+
+template<class R> inline R blas_sdot( int n, R *sx, int incx, R *sy, int incy)
+{
+ R s=R();
+
+ if(incx == 1 && incy == 1)
+ for (int k = 0; k< n; k++)
+ s += *sx++ * * sy++;
+ else
+ for (int k = 0; k< n; k++, sx += incx, sy += incy)
+ s += *sx * *sy;
+ return s;
+}
+// OpenBlas PB with constant remove const ....
+template<> inline float blas_sdot(const int n, float *sx, int incx, float *sy, int incy)
+{
+ return cblas_sdot(n,sx,incx,sy,incy);
+}
+template<> inline double blas_sdot( int n, double *sx, int incx, double *sy, int incy)
+{
+ return cblas_ddot(n,sx,incx,sy,incy);
+}
+
+#ifdef OPENBLAS_CONFIG_H
+typedef openblas_complex_double *BLAS_ptr_complex16;
+#else
+typedef void *BLAS_ptr_complex16;
+
+#endif
+template<> inline complex<double> blas_sdot( int n, complex<double> *sx, int incx, complex<double> *sy, int incy)
+{
+ complex<double> s;
+ cblas_zdotu_sub(n,( double *)sx,incx,( double *)sy,incy,(BLAS_ptr_complex16)&s);
+ return s;
+}
+//template<> inline complex<float> blas_sdot( int n, complex<float> *sx, int incx, complex<float> *sy, int incy)
+//{
+// complex<float> s;
+// cblas_cdotu_sub(n,( void *)sx,incx,( void *)sy,incy,(BLAS_ptr_complex8)&s);
+// return s;
+//}
+
+#endif
+// end modif FH
+using Fem2D::HeapSort;
+using std::numeric_limits;
+
+// -----------
+template<class FElement>
+inline int BuildMEK_KK(const int l,int *p,int *pk,int *pkk,const FElement * pKE,const FElement*pKKE)
+{
+ // routine which find common dof on to adjacent element pKE and pKKE and make the link ..
+ // if pKKE== 0 then no adj element
+ // the idea is find common dof, but this work only if all dot a different
+ // in on elemnt, so we can have a bug
+ // in case of periodic boundary condition ..
+ // not correct ... F.Hecht ...
+
+ // -----
+ // routine build les array p, pk,pkk
+ // which return number of df int 2 element pKE an pKKE
+ // max l size of array p, pk, pkk
+ // p[i] is the global number of freedom
+ // pk[i] is is the local number in pKE ( -1 if not in pKE element)
+ // pkk[i] is is the local number in pKKE ( -1 if not in pKKE element)
+ const FElement (*pK[2])={pKE,pKKE};
+
+ int ndf=0; // number of dl
+ int * qk=pk, *qkk=pkk;
+ for (int k=0;k<2;k++)
+ if(pK[k])
+ {
+ if(k) Exchange(qk,qkk);
+ const FElement& FEK=*pK[k];
+ int nbdf =FEK.NbDoF();
+
+ for (int ii=0;ii<nbdf;ii++)
+ {
+ p[ndf] = 2*FEK(ii)+k; // copy the numbering
+ qk[ndf] = ii;
+ qkk[ndf++] = -1;
+ } // end for ii
+ }
+ ffassert(ndf <=l);
+ int bug=0;
+ // compression suppression des doublons
+ // attention un df peu aparaitre 2 fois (CL period) dans un element ..
+ Fem2D::HeapSort(p,pk,pkk,ndf);
+ int k=0;
+ for(int ii=1;ii<ndf;++ii)
+ if (p[k]/2==p[ii]/2) // doublons k,kk
+ {
+ if (pkk[ii]>=0) pkk[k]=pkk[ii];
+ if (pk[ii]>=0) pk[k]=pk[ii];
+ assert(pk[k] >=0 && pkk[k]>=0);
+ }
+ else { // copy
+ if(p[k]==p[ii]) bug++;
+ p[++k] =p[ii];
+ pk[k]=pk[ii];
+ pkk[k]=pkk[ii];
+ }
+ ndf=k+1;
+ for(int ii=0;ii<ndf;++ii)
+ p[ii]= p[ii]/2;// clean pp to revome bug(CL period)
+ if( bug && pKKE) {
+ static int count =0;
+ if( count++ < 2 && verbosity )
+ {
+ cerr << " May be a Bug in BuildMEK_KK , the code is not safe , periodic boundary condition on 1 element . " << bug << endl;
+ cerr << " They is a problem in this case (I am not sure) F.H. ????" << endl;
+ cerr << " exempt if the associed matrix voefficient is 0. "<< endl;
+ }
+ //ffassert(0); // bof bof ... remove of case of jump in internal edge ...
+ }
+ return ndf;
+} // BuildMEK_KK
+
+template<class R,class FES>
+void MatriceElementairePleine<R,FES>::call(int k,int ie,int label,void * stack,void *B) {
+ for (int i=0;i<this->lga;i++)
+ this->a[i]=0;
+ if(this->onFace)
+ {
+ throwassert(faceelement);
+ const Mesh &Th(this->Vh.Th);
+
+ int iie=ie,kk=Th.ElementAdj(k,iie);
+ if(kk==k|| kk<0) kk=-1;
+ if ( &this->Vh == &this->Uh)
+ {
+ FElement Kv(this->Vh[k]);
+ if(kk<0)
+ { // return ; // on saute ???? bof bof
++<<<<<<< HEAD
+ this->n=this->m=BuildMEK_KK<FElement>(this->lnki,this->ni,this->nik,this->nikk,&Kv,0);
++=======
++ this->n=this->m=BuildMEK_KK<FElement>(this->lnk,this->ni,this->nik,this->nikk,&Kv,0);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ int n2 =this->m*this->n;
+ for (int i=0;i<n2;i++) this->a[i]=0;
+ faceelement(*this,Kv,Kv,Kv,Kv,this->data,ie,iie,label,stack,reinterpret_cast<Rd*>(B));
+ }
+ else
+ {
+ FElement KKv(this->Vh[kk]);
++<<<<<<< HEAD
+ this->n=this->m=BuildMEK_KK<FElement>(this->lnki,this->ni,this->nik,this->nikk,&Kv,&KKv);
++=======
++ this->n=this->m=BuildMEK_KK<FElement>(this->lnk,this->ni,this->nik,this->nikk,&Kv,&KKv);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+
+ faceelement(*this,Kv,KKv,Kv,KKv,this->data,ie,iie,label,stack,reinterpret_cast<Rd*>(B));
+
+ }
+ }
+ else
+ {
++<<<<<<< HEAD
+ throwassert(faceelement);
+ const Mesh &Th(this->Vh.Th);
+
+ int iie=ie,kk=Th.ElementAdj(k,iie);
+ if(kk==k|| kk<0) kk=-1;
+ if ( &this->Vh == &this->Uh)
+ {
+ FElement Kv(this->Vh[k]);
+ FElement Ku(this->Uh[k]);
+ if(kk<0)
+ { // return ; // on saute ???? bof bof
+ this->n=BuildMEK_KK<FElement>(this->lnki,this->ni,this->nik,this->nikk,&Kv,0);
+ this->m=BuildMEK_KK<FElement>(this->lnkj,this->nj,this->njk,this->njkk,&Ku,0);
+ int n2 =this->m*this->n;
+ for (int i=0;i<n2;i++) this->a[i]=0;
+ faceelement(*this,Kv,Kv,Kv,Kv,this->data,ie,iie,label,stack,reinterpret_cast<Rd*>(B));
+ }
+ else
+ {
+ FElement KKv(this->Vh[kk]);
+ FElement KKu(this->Uh[kk]);
+ this->n=BuildMEK_KK<FElement>(this->lnki,this->ni,this->nik,this->nikk,&Kv,&KKv);
+ this->m=BuildMEK_KK<FElement>(this->lnkj,this->nj,this->njk,this->njkk,&Ku,&KKu);
+
+ faceelement(*this,Ku,KKu,Kv,KKv,this->data,ie,iie,label,stack,reinterpret_cast<Rd*>(B));
+
+ }
+ }
+ ERREUR("BUG ???? A FAIRE/ TO DO (see F. hecht) ", 0);
+ ffassert(0); // a faire F. Hecht desole
++=======
++ ERREUR("A FAIRE/ TO DO (see F. hecht) ", 0);
++ ffassert(0); // a faire F. Hecht desole
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ }
+ }
+ else {
+ throwassert(element);
+ const FElement&Kv(this->Vh[k]);
+ int nbdf =Kv.NbDoF();
+ for (int i=0;i<nbdf;i++)
+ this->ni[i] = Kv(i); // copy the numbering
+ this->m=this->n=nbdf;
+
+ if(this->ni != this->nj) { //
+ const FElement&Ku(this->Uh[k]);
+ int nbdf =Ku.NbDoF();
+ for (int i=0;i<nbdf;i++)
+ this->nj[i] = Ku(i); // copy the numbering
+ this->m=nbdf;
+ int n2 =this->m*this->n;
+ for (int i=0;i<n2;i++) this->a[i]=0;
+ element(*this,Ku,Kv,this->data,ie,label,stack,reinterpret_cast<Rd*>(B));
+ }
+ else
+ {
+ int n2 =this->m*this->n;
+ for (int i=0;i<n2;i++) this->a[i]=0;
+ element(*this,Kv,Kv,this->data,ie,label,stack,reinterpret_cast<Rd*>(B));
+ // call the elementary mat
+ }
+ }
+}
+
+template<class R,class FES>
+void MatriceElementaireSymetrique<R,FES>::call(int k,int ie,int label,void * stack,void *B) {
+ // mise a zero de la matrice elementaire, plus sur
+ for (int i=0;i<this->lga;i++)
+ this->a[i]=0;
+ if(this->onFace)
+ {
+ ffassert(0); // a faire
+ }
+ else {
+
+ if (k< this->Uh.Th.nt)
+ {
+ throwassert(element);
+ const FElement K(this->Uh[k]);
+ int nbdf =K.NbDoF();
+ for (int i=0;i<nbdf;i++)
+ this->ni[i] = K(i); // copy the numbering
+ this->m=this->n = nbdf;
+
+ element(*this,K,this->data,ie,label,stack,static_cast<Rd*>(B));
+ }// call the elementary mat
+ else
+ {
+ ffassert(0); // remove code for the 3d
+ /*
+ throwassert(mortar);
+ {
+ const FMortar K(&(this->Uh),k);
+ int nbdf = K.NbDoF();
+ for (int i=0;i<nbdf;i++)
+ this->ni[i] = K(i); // copy the numbering
+ this->m=this->n = nbdf;
+ // mise a zero de la matrice elementaire, plus sur
+
+ mortar(*this,K,stack);}
+ */
+ }
+ }
+}
+
+template<class R>
+MatriceProfile<R>::~MatriceProfile() {
+ if(!this->dummy)
+ { //cout << " del mat profile " << endl ;
+ if (U && (U !=L)) delete [] U;
+ if (D) delete [] D;
+ if (L) delete [] L;
+ if (pU && (pU != pL)) delete [] pU;
+ if (pL) delete [] pL;
+ //cout << " dl de MatriceProfile " << this << endl;
+ }
+}
+template<class R>
+int MatriceProfile<R>::size() const {
+ int s = sizeof(MatriceProfile<R>);
+ if (D) s += this->n*sizeof(R);
+ if (pL) s += this->n*sizeof(int);
+ if (pU && (pU != pL)) s += this->n*sizeof(int);
+ if (L) s += pL[this->n]*sizeof(int);
+ if (U && (U != L)) s += pU[this->n]*sizeof(int);
+ return s;
+}
+/*
+template<class R>
+int MatriceProfile<R>::MatriceProfile(const MatriceProfile<RR> & A )
+ : MatriceCreuse<R>(A.n,A.m,0)
+ {
+
+ typefac=A.typefac;
+ pL= docpy<int,int>(A.pL,n+1);
+ D = docpy<R,RR>(A.D,n);
+ if ( A.pL == A.pU ) pU=pL;
+ else pU= docpy<int,int>(A.pU,m+1);
+
+ L= docpy<R,RR>(A.L,pL[n]);
+
+ if ( A.L == A.U ) U=L;
+ else U= docpy<R,RR>(A.U,pU[m]);
+
+
+ }*/
+template<class R>
+ MatriceMorse<R> *MatriceProfile<R>::toMatriceMorse(bool transpose,bool copy) const
+ {
+ // A FAIRE;
+ ffassert(0); // TODO
+ return 0;
+ }
+
+ inline pair<int,int> ij_mat(bool trans,int ii00,int jj00,int i,int j) {
+ // warning trans sub matrix and not the block.
+ return trans ? make_pair<int,int>(j+ii00,i+jj00)
+ : make_pair<int,int>(i+ii00,j+jj00) ; }
+
+template<class R>
+bool MatriceProfile<R>::addMatTo(R coef,std::map< pair<int,int>, R> &mij,bool trans,int ii00,int jj00,bool cnj,double threshold)
+{
+ double eps0=max(numeric_limits<double>::min(), threshold);
+ if( RNM::norm2(coef)<eps0) return L == U ;
+ int i,j,kf,k;
+ if(D)
+ {
+ for( i=0;i<this->n;i++)
+ if( RNM::norm2(D[i])>eps0)
+ mij[ij_mat(trans,ii00,jj00,i,i)] += coef*(cnj? RNM::conj(D[i]) : D[i]);
+ }
+ else
+ {
+ for(int i=0;i<this->n;i++) // no dia => identity dai
+ mij[ij_mat(trans,ii00,jj00,i,i)] += coef;
+ }
+ if (L && pL )
+ for (kf=pL[0],i=0; i<this->n; i++ )
+ {
+ k=kf;
+ kf=pL[i+1];
+ for ( j=i-kf+k; k<kf; j++, k++ )
+ if(RNM::norm2(L[k])>eps0)
+ mij[ij_mat(trans,ii00,jj00,i,j)]= coef*(cnj? RNM::conj(L[k]) : L[k]);
+ }
+ if (U && pU)
+ for (kf=pU[0],j=0; j<this->m; j++)
+ {
+ k=kf;
+ kf=pU[j+1];
+ for ( i=j-kf+k; k<kf; i++, k++ )
+ if(RNM::norm2(U[k])>eps0)
+ mij[ij_mat(trans,ii00,jj00,i,j)]= coef*(cnj? RNM::conj(U[k]) : U[k]);
+ }
+ return L == U ; // symetrique
+}
+template<class R>
+MatriceProfile<R>::MatriceProfile(const int nn,const R *a)
+ :MatriceCreuse<R>(nn,nn,0),typefac(FactorizationNO)
+{
+ int *pf = new int [this->n+1];
+ int i,j,k;
+ k=0;
+ for (i=0;i<=this->n;k+=i++)
+ {
+ pf[i]=k;
+ // cout << " pf " << i<< " = " << k << endl;
+ }
+ ffassert( pf[this->n]*2 == this->n*(this->n-1));
+ pU = pf; // pointeur profile U
+ pL = pf; // pointeur profile L
+ U = new R[pf[this->n]];
+ L = new R[pf[this->n]];
+ D = new R[this->n];
+ const R *aij=a;
+ for (i=0;i<this->n;i++)
+ for (j=0;j<this->n;j++)
+ if (j<i) L[pL[i+1]-i+j] = *aij++;
+ else if (j>i) U[pU[j+1]-j+i] = *aij++;
+ else D[i] = *aij++;
+}
+
+template<class R>
+template<class FESpace>
+MatriceProfile<R>::MatriceProfile(const FESpace & Vh,bool VF)
+ :MatriceCreuse<R>(Vh.NbOfDF,Vh.NbOfDF,0),typefac(FactorizationNO)
+{
+ // for galerkine discontinue ....
+ // VF : true=> Finite Volume matrices (change the stencil)
+ // VF = false => Finite element
+ // F. Hecht nov 2003
+ // -----
+ this->dummy=0;
+ this->n = this->m = Vh.NbOfDF;
+ int i,j,k,ke,ie,mn,jl,iVhk;
+ int itab,tabk[5];
+ int *pf = new int [this->n+1];
+ for (i=0;i<this->n;i++) pf[i]=0;
+ for (ke=0;ke<Vh.NbOfElements;ke++)
+ {
+ itab=0;
+ tabk[itab++]=ke;
+ if(VF) itab += Vh.Th.GetAllElementAdj(ke,tabk+itab);
+ tabk[itab]=-1;
+ mn = this->n;
+ for( k=tabk[ie=0]; ie <itab; k=tabk[++ie])
+ { iVhk=(int) Vh(k);
+ for (jl=0;jl<iVhk;jl++) // modif Oct 2008 valgrind
+ {
+ j=Vh(k,jl) ;
+ mn = Min ( mn , Vh.FirstDFOfNode(j) ) ;}
+ }
+ //for( k=tabk[ie=0]; ie <itab; k=tabk[++ie])
+ {
+ k=ke; // bof bof a verifier finement .... FH
+ iVhk=(int) Vh(k);
+ //for (j=Vh(k,jl=0);jl<(int) Vh(k);j=Vh(k,++jl))
+ for (jl=0;jl<iVhk;jl++) // modif Oct 2008 valgrind
+ {
+ j=Vh(k,jl);
+ int df1 = Vh.LastDFOfNode(j);
+ for (int df= Vh.FirstDFOfNode(j); df < df1; df++ )
+ pf[df] = Max(pf[df],df-mn);
+ }
+ }
+ }
+ int l =0;
+ for (i=0;i<this->n;i++) {int tmp=l;l += pf[i]; pf[i]=tmp;}
+ pf[this->n] = l;
+ if(verbosity >3)
+ cout << " -- SizeOfSkyline =" <<l << endl;
+
+ pU = pf; // pointeur profile U
+ pL = pf; // pointeur profile L
+ D = 0; // diagonal
+ U = 0; // upper part
+ L = 0; // lower part
+}
+
+template<class R>
+void MatriceProfile<R>::addMatMul(const KN_<R> &x,KN_<R> &ax) const
+{if (x.n!= this->n ) ERREUR(MatriceProfile MatMut(xa,x) ," longueur incompatible x (in) ") ;
+ if (ax.n!= this->n ) ERREUR(MatriceProfile MatMut(xa,x) ," longueur incompatible ax (out)") ;
+ int i,j,k,kf;
+ ffassert(this->n == this->m);
+ if (D)
+ for (i=0;i<this->n;i++)
+ ax[i] += D[i]*x[i];
+ else
+ for (i=0;i<this->n;i++) // no dia => identyty dai
+ ax[i] +=x[i];
+
+ if (L && pL )
+ for (kf=pL[0],i=0; i<this->n; i++ )
+ {
+ k=kf;
+ kf=pL[i+1];
+ for ( j=i-kf+k; k<kf; j++, k++ )
+ ax[i] += L[k]*x[j],throwassert(i>=0 && i <this->n && j >=0 && j < this->m && k>=0 && k < pL[this->n]);
+ }
+
+ if (U && pU)
+ for (kf=pU[0],j=0; j<this->m; j++)
+ {
+ k=kf;
+ kf=pU[j+1];
+ for ( i=j-kf+k; k<kf; i++, k++ )
+ ax[i] += U[k]*x[j],throwassert(i>=0 && i <this->n && j >=0 && j < this->m && k>=0 && k < pU[this->n]);
+ }
+
+
+}
+
+
+template<class R>
+void MatriceProfile<R>::operator=(const R & v) {
+ if(v!=R())
+ { cerr << " Mise a zero d'une matrice MatriceProfile<R>::operator=(R v) uniquement v=" << v << endl;
+ throw(ErrorExec("exit",1));
+ }
+ typefac = FactorizationNO;
+ delete [] U;
+ delete [] L;
+ delete [] D;
+ U=L=D=0;
+}
+template<class R>
+MatriceCreuse<R> & MatriceProfile<R>::operator +=(MatriceElementaire<R> & me) {
+ int il,jl,i,j,k;
+ int * mi=me.ni, *mj=me.nj;
+ if (!D) // matrice vide
+ { D = new R[this->n];
+ L = pL[this->n] ? new R[pL[this->n]] :0 ;
+ for (i =0;i<this->n;i++) D[i] =0;
+ for (k =0;k<pL[this->n];k++) L[k] =0;
+ switch (me.mtype) {
+ case MatriceElementaire<R>::Full :
+ U = pU[this->n] ? new R[pU[this->n]] : 0;
+ for (k =0;k<pU[this->n];k++) U[k] =0;
+ break;
+ case MatriceElementaire<R>::Symmetric :
+ U = L;
+ break;
+ default:
+ cerr << "Big bug type MatriceElementaire unknown" << (int) me.mtype << endl;
+ throw(ErrorExec("exit",1));
+ break;
+ }
+ }
+ R * al = me.a;
+ switch (me.mtype) {
+ case MatriceElementaire<R>::Full : //throwassert(L !=U);
+ for (il=0; il<me.n; ++il) // modif overflow FH win32 oct 2005
+ { i=mi[il];
+ for ( jl=0; jl< me.m ; ++jl,++al) // modif overflow FH
+ { j=mj[jl] ;
+ if (j<i) L[ pL[i+1] - (i-j) ] += *al;
+ else if (j>i) U[ pU[j+1] - (j-i) ] += *al;
+ else D[i] += *al;}}
+ break;
+
+ case MatriceElementaire<R>::Symmetric : //throwassert(L ==U);
+ for (il=0; il<me.n; ++il) // modif overflow FH win32
+ { i=mi[il];
+ for (jl=0;jl<= il;++jl)
+ { j=mj[jl] ;
+ if (j<i) L[ pL[i+1] - (i-j) ] += *al++;
+ else if (j>i) U[ pU[j+1] - (j-i) ] += *al++;
+ else D[i] += *al++;}}
+ break;
+ default:
+ cerr << "Big bug type MatriceElementaire unknown" << (int) me.mtype << endl;
+ exit(1);
+ break;
+ }
+ return *this;
+}
+
+template<class R>
+ostream& MatriceProfile<R>::dump (ostream& f) const
+{f<< " matrix skyline " << this->n << '\t' << this->m << '\t' ;
+ f << " this " << endl;
+ f << " pL = " << pL << " L =" << L << endl
+ << " pU = " << pU << " U =" << U << endl
+ << " D = " << D << endl;
+ if ( (pL == pU) && (U == L) )
+ if (pL && L)
+ {f << " skyline symmetric " <<endl;
+ int i,j,k;
+ for (i = 0;i<this->n;i++)
+ { f << i << " {" << pL[i+1]-pL[i] << "}" <<'\t' ;
+ for (k=pL[i];k<pL[i+1];k++)
+ { j=i-(pL[i+1]-k);
+ f << j << " " << L[k] << "; ";
+ }
+ f << i << ":" << D[i] << endl ;
+ }
+ }
+ else f << "Skyline: pointeur null " <<endl;
+ else
+ {
+ f << " Skyline non symmetric " << endl;
+ int i,k;
+ for (i = 0;i<this->n;i++)
+ {
+ f << i ;
+ if (pL && L)
+ {
+ f << " jO=" << i-pL[i+1]+pL[i] << " L= " <<'\t' ;
+ for (k=pL[i];k<pL[i+1];k++)
+ {
+ f << " " << L[k] ;
+ }
+ }
+ if (D)
+ f << " D= " << D[i] << '\t' ;
+ else
+ f << " D=0 => 1 ; ";
+ if (pU && U)
+ {
+ f << " i0=" << i-pU[i+1]+pU[i] << " U= " <<'\t' ;
+ for (k=pU[i];k<pU[i+1];k++)
+ f << " " << U[k] ;
+
+ }
+ f << endl;
+ }
+
+ }
+ return f;
+}
+template<class R>
+void MatriceProfile<R>::cholesky(double eps) const {
+ double eps2=eps*eps;
+ R *ij , *ii , *ik , *jk , xii;
+ int i,j,k;
+ if (L != U) ERREUR(factorise,"Skyline matrix non symmetric");
+ U = 0; //
+ typefac = FactorizationCholeski;
+ if ( RNM::norm2(D[0]) <= 1.0e-60)
+ ERREUR(cholesky,"pivot (" << 0 << ")= " << D[0] )
+
+ D[0] = sqrt(D[0]);
+ ij = L ; // pointeur sur le terme ij de la matrice avec j<i
+ for (i=1;i<this->n;i++) // boucle sur les lignes
+ { ii = L+pL[i+1]; // pointeur sur le terme fin de la ligne +1 => ij < ii;
+ xii = D[i] ;
+ for ( ; ij < ii ; ij++) // pour les j la ligne i
+ { j = i -(ii - ij);
+ k = Max( j - (pL[j+1]-pL[j]) , i-(pL[i+1]-pL[i]) );
+ ik = ii - (i - k);
+ jk = L + pL[j+1] -(j - k);
+ k = j - k ;
+ R s= -*ij;
+#ifdef WITHBLAS
+ s += blas_sdot(k,ik,1,jk,1);
+#else
+ while(k--) s += *ik++ * *jk++;
+#endif
+ *ij = -s/D[j] ;
+ xii -= *ij * *ij ;
+ }
+ // cout << RNM::norm2(xii) << " " << Max(eps2*RNM::norm2(D[i]),1.0e-60) << " " << sqrt(xii) <<endl;
+ if ( RNM::norm2(xii) <= Max(eps2*RNM::norm2(D[i]),1.0e-60))
+ ERREUR(cholesky,"pivot (" << i << ")= " << xii << " < " << eps*abs(D[i]))
+ D[i] = sqrt(xii);
+ }
+}
+template<class R>
+void MatriceProfile<R>::crout(double eps) const {
+ R *ij , *ii , *ik , *jk , xii, *dkk;
+ int i,j,k;
+ double eps2=eps*eps;
+ if (L != U) ERREUR(factorise,"Skyline matrix non symmetric");
+ U = 0; //
+ typefac = FactorizationCrout;
+
+ ij = L ; // pointeur sur le terme ij de la matrice avec j<i
+ for (i=1;i<this->n;i++) // boucle sur les lignes
+ { ii = L+pL[i+1]; // pointeur sur le terme fin de la ligne +1 => ij < ii;
+ xii = D[i] ;
+ for ( ; ij < ii ; ij++) // pour les j la ligne i
+ { j = i -(ii - ij);
+ k = Max( j - (pL[j+1]-pL[j]) , i-(pL[i+1]-pL[i]) );
+ ik = ii - (i - k);
+ jk = L + pL[j+1] -(j - k);
+ dkk = D + k;
+ k = j - k ;
+ R s=-*ij;
+ while ( k-- ) s += *ik++ * *jk++ * *dkk++;
+ *ij = -s/ *dkk ; // k = j ici
+
+ xii -= *ij * *ij * *dkk;
+ }
+ if (RNM::norm2(xii) <= Max(eps2*RNM::norm2(D[i]),1.0e-60))
+ ERREUR(crout,"pivot (" << i << " )= " << abs(xii)<< " <= " << eps*abs(D[i]) << " eps = " << eps)
+ D[i] = xii;
+ }
+}
+template<class R>
+void MatriceProfile<R>::LU(double eps) const {
+ R s,uii;
+ double eps2=eps*eps;
+ int i,j;
+ if (L == U && ( pL[this->n] || pU[this->n] ) ) ERREUR(LU,"matrix LU symmetric");
+ if(verbosity>3)
+ cout << " -- LU " << endl;
+ typefac=FactorizationLU;
+
+ for (i=1;i<this->n;i++) // boucle sur les sous matrice de rang i
+ {
+ // for L(i,j) j=j0,i-1
+ int j0 = i-(pL[i+1]-pL[i]);
+ for ( j = j0; j<i;j++)
+ {
+ int k0 = Max(j0,j-(pU[j+1]-pU[j]));
+ R *Lik = L + pL[i+1]-i+k0; // lower
+ R *Ukj = U + pU[j+1]-j+k0; // upper
+ s =0;
+#ifdef WITHBLAS
+ s = blas_sdot(j-k0,Lik,1,Ukj,1);
+ Lik += j-k0;
+#else
+ for (int k=k0;k<j;k++) // k < j < i ;
+ s += *Lik++ * *Ukj++ ; // a(i,k)*a(k,j);
+#endif
+ *Lik -= s;
+ *Lik /= D[j]; // k == j here
+ }
+ // for U(j,i) j=0,i-1
+ j0=i-pU[i+1]+pU[i];
+ for (j=j0;j<i;j++)
+ {
+ s = 0;
+ int k0 = Max(j0,j-pL[j+1]+pL[j]);
+ R *Ljk = L + pL[j+1]-j+k0;
+ R *Uki = U + pU[i+1]-i+k0;
+#ifdef WITHBLAS
+ s = blas_sdot(j-k0,Ljk,1,Uki,1);
+ Uki += j-k0;
+#else
+ for (int k=k0 ;k<j;k++) //
+ s += *Ljk++ * *Uki++ ;
+#endif
+ *Uki -= s; // k = j here
+ }
+ // for D (i,i) in last because we need L(i,k) and U(k,i) for k<j
+ int k0 = i-Min(pL[i+1]-pL[i],pU[i+1]-pU[i]);
+ R *Lik = L + pL[i+1]-i+k0; // lower
+ R *Uki = U + pU[i+1]-i+k0; // upper
+ s =0;
+#ifdef WITHBLAS
+ s = blas_sdot(i-k0,Lik,1,Uki,1);
+#else
+ for (int k=k0;k<i;k++) // k < i < i ;
+ s += *Lik++ * *Uki++ ; // a(i,k)*a(k,i);
+#endif
+ // cout << " k0 " << k0 << " i = " << i << " " << s << endl;
+ uii = D[i] -s;
+
+ if (RNM::norm2(uii) <= Max(eps2*RNM::norm2(D[i]),1.0e-30))
+ ERREUR(LU,"pivot (" << i << " )= " << abs(uii) << " <= " << eps*abs(D[i]) << " eps = " << eps);
+
+ D[i] = uii;
+
+ }
+}
+
+
+template<class R>
+KN_<R> & operator/=(KN_<R> & x ,const MatriceProfile<R> & a)
+{
+ // --------------------------------------------------------------------
+ // si La diagonal D n'existe pas alors on suppose 1 dessus (cf crout)
+ // --------------------------------------------------------------------
+ R * v = &x[0];
+ int n = a.n;
+ if (x.n != n )
+ ERREUR (KN_<R> operator/(MatriceProfile<R>)," matrice et KN_<R> incompatible");
+ const R *ij ,*ii, *ik, *ki;
+ R *xk,*xi;
+ int i;
+ switch (a.typefac) {
+ case FactorizationNO:
+ if (a.U && a.L) {cerr << "APROGRAMMER (KN_<R><R>::operator/MatriceProfile)";throw(ErrorExec("exit",2));}
+
+ if ( a.U && !a.L )
+ { // matrice triangulaire superieure
+ // cout << " remonter " << (a.D ? "DU" : "U") << endl;
+ ki = a.U + a.pU[n];
+ i = n;
+ while ( i-- )
+ { ii = a.U + a.pU[i];
+ xi= xk = v + i ;
+ if (a.D) *xi /= a.D[i];// pour crout ou LU
+ while ( ki > ii)
+ *--xk -= *--ki * *xi ;
+ }
+ }
+ else if ( !a.U && a.L )
+ { // matrice triangulaire inferieure
+ // cout << " descente " <<( a.D ? "LD" : "L" ) <<endl;
+ ii = a.L;
+ for (i=0; i<n; i++)
+ { ij = ik = (a.L + a.pL[i+1]) ; // ii =debut,ij=fin+1 de la ligne
+ xk = v + i;
+ R ss = v[i];
+ while ( ik > ii)
+ ss -= *--ik * *--xk ;
+ if ( a.D) ss /= a.D[i];// pour crout ou LU
+ v[i] = ss ;
+ ii = ij;
+ }
+ }
+ else if (a.D)
+ { // matrice diagonale
+ // cout << " diagonal D" <<endl;
+ for (i=0;i<n;i++)
+ v[i]=v[i]/a.D[i];
+ }
+ break;
+ case FactorizationCholeski:
+ // cout << " FactorizationChosleski" << endl;
+ x /= a.ld();
+ x /= a.ldt();
+ break;
+ case FactorizationCrout:
+ // cout << " FactorizationCrout" << endl;
+ x /= a.l();
+ x /= a.d();
+ x /= a.lt();
+ break;
+ case FactorizationLU:
+ // cout << " FactorizationLU" << endl;
+ x /= a.l();
+ x /= a.du();
+ break;
+ /* default:
+ ERREUR (operator /=(MatriceProfile," Error unkown type of Factorization =" << typefac);
+ */
+ }
+ return x;
+}
+
+template <class R>
+ MatriceMorse<R>::MatriceMorse(KNM_<R> & A,double tol)
+ :MatriceCreuse<R>(A.N(),A.M(),false),solver(0)
+ {
+ double tol2=tol*tol;
+ symetrique = false;
+ this->dummy=false;
+ int nbcoeff=0;
+ for(int i=0;i<this->n;i++)
+ for(int j=0;j<this->m;j++)
+ if(RNM::norm2(A(i,j))>tol2) nbcoeff++;
+
+ nbcoef=nbcoeff;
+ nbcoeff=Max(nbcoeff,1); // pour toujours alloue quelque chose FH Bug dans CheckPtr
+ a=new R[nbcoeff] ;
+ lg=new int [this->n+1];
+ cl=new int [nbcoeff];
+ nbcoeff=0;
+ R aij;
+ for(int i=0;i<this->n;i++)
+ {
+ lg[i]=nbcoeff;
+ for(int j=0;j<this->m;j++)
+
+ if(RNM::norm2(aij=A(i,j))>tol2)
+ {
+ cl[nbcoeff]=j;
+ a[nbcoeff]=aij;
+ nbcoeff++;
+ }
+ }
+ lg[this->n]=nbcoeff;
+
+
+}
+template <class R>
+ MatriceMorse<R>::MatriceMorse(const int nn,const R *aa)
+ :MatriceCreuse<R>(nn),solver(0)
+ {
+ symetrique = true;
+ this->dummy=false;
+ this->n=nn;
+ nbcoef=this->n;
+ a=new R[this->n] ;
+ lg=new int [this->n+1];
+ cl=new int [this->n];
+ for(int i=0;i<this->n;i++)
+ {
+ lg[i]=i;
+ cl[i]=i;
+ a[i]=aa[i];
+ }
+lg[this->n]=this->n;
+}
+
+template<class R>
+template<class K>
+ MatriceMorse<R>::MatriceMorse(const MatriceMorse<K> & A,R (*f)(K ))
+ : MatriceCreuse<R>(A.n,A.m,A.dummy),nbcoef(A.nbcoef),
+ symetrique(A.symetrique),
+ a(new R[nbcoef]),
+ lg(new int [this->n+1]),
+ cl(new int[nbcoef]),
+ solver(0)
+{
+ ffassert(a && lg && cl);
+ for (int i=0;i<=this->n;i++)
+ lg[i]=A.lg[i];
+ for (int k=0;k<nbcoef;k++)
+ {
+ cl[k]=A.cl[k];
+ a[k]=f(A.a[k]);
+ }
+
+}
+
+template<class R>
+template<class K>
+MatriceMorse<R>::MatriceMorse(const MatriceMorse<K> & A)
+: MatriceCreuse<R>(A.n,A.m,A.dummy),nbcoef(A.nbcoef),
+symetrique(A.symetrique),
+a(new R[nbcoef]),
+lg(new int [this->n+1]),
+cl(new int[nbcoef]),
+solver(0)
+{
+ ffassert(a && lg && cl);
+ for (int i=0;i<=this->n;i++)
+ lg[i]=A.lg[i];
+ for (int k=0;k<nbcoef;k++)
+ {
+ cl[k]=A.cl[k];
+ a[k]=A.a[k];
+ }
+
+}
+
+
+
+template <class R>
+int MatriceMorse<R>::size() const
+{
+ return nbcoef*(sizeof(int)+sizeof(R))+ sizeof(int)*(this->n+1);
+}
+
+inline int WhichMatrix(istream & f)
+{
+ string line;
+ while ( isspace(f.peek()))
+ f.get();
+ if ( f.peek() =='#' )
+ {
+ line="";
+ while ( f.good() )
+ {
+ char c=f.get();
+ if(c=='\n' || c=='\r') { break;}
+ line += c;
+ }
+ if( line.find("(Morse)"))
+ return 2; // morse
+ else
+ return 0;
+ }
+ return 0;
+}
+template <class R>
+ MatriceMorse<R>::MatriceMorse(istream & f)
+: MatriceCreuse<R>(0,0,0),nbcoef(0),
+a(0),
+lg(0),
+cl(0),
+
+solver(0)
+{
+ string line;
+ int k=0;
+ while ( isspace(f.peek()))
+ f.get();
+ while ( f.peek() =='#' )
+ {
+ line="";
+ while ( f.good() )
+ {
+ char c=f.get();
+ if(c=='\n' || c=='\r') { break;}
+ line += c;
+ }
+ if( f.peek()=='\n' || f.peek()=='\r') f.get();
+ if(verbosity>9)
+ cout << "Read matrice: "<< k << " :" << line << endl;
+ k++;
+ }
+
+ f >> this->n >> this->m >> symetrique >>nbcoef;
+ if(verbosity>3)
+ cout << " read mat: " << this->n << " " << this->m << " " << symetrique << " " << nbcoef <<endl;
+ lg= new int [this->n+1];
+ cl= new int[nbcoef];
+ a= new R[nbcoef];
+ ffassert(f.good() && lg && a && cl );
+ int i,j,i0,j0;
+ i0=-1;j0=2000000000;
+ R aij;
+ int imx=-2000000000, jmx=-2000000000;
+ int imn= 2000000000, jmn= 2000000000;
+
+ for (int k =0;k<nbcoef; ++k)
+ {
+ f >> i >> j >> aij;
+ ffassert(f.good() );
+ i--;j--;
+ imx=max(imx,i);
+ jmx=max(jmx,j);
+ imn=min(imn,i);
+ jmn=min(jmn,j);
+ //cout << i << " " << j << " " << aij << endl;
+ if(i0!=i) {j0=-1;lg[i]=k;}
+ ffassert(i0<=i && j0<j);
+ lg[i+1]=k+1;
+ cl[k]=j;
+ a[k]=aij;
+ j0=j;i0=i;
+ }
+ ffassert( imx < this->n && jmx < this->m );
+ ffassert( imn >=0 && jmn >=0);
+
+}
+
+template <class R>
+ostream& MatriceMorse<R>::dump(ostream & f) const
+{
+ f << "# Sparse Matrix (Morse) " << endl;
+ f << "# first line: n m (is symmetic) nbcoef \n";
+ f << "# after for each nonzero coefficient: i j a_ij where (i,j) \\in {1,...,n}x{1,...,m} \n";
+
+ f << this->n << " " << this->m << " " << symetrique << " " << nbcoef <<endl;
+ int k=lg[0];
+ int pold= f.precision();
+ for (int i=0;i<this->n;i++)
+ {
+
+// f << i << " : " << lg[i] <<","<< lg[i+1]-1 << " : " ;
+ int ke=lg[i+1];
+ for (;k<ke;k++)
+ f << setw(9) << i+1 << ' ' << setw(9) << cl[k]+1 << ' ' << setprecision( 20) << a[k]<< '\n' ;
+ // if (RNM::norm2(a[k])) f << cl[k] << " " << a[k]<< ", ";
+ // else f << cl[k] << " 0., " ;
+ // f << endl;
+ }
+ f.precision(pold);
+ return f;
+}
+template <class R>
+inline R* MatriceMorse<R>::pij(int i,int j) const
+ {
+ if (! (i<this->n && j< this->m))
+ throwassert(i<this->n && j< this->m);
+ int i0=lg[i];
+ int i1=lg[i+1]-1;
+ while (i0<=i1) // dichotomie
+ {
+ int im=(i0+i1)/2;
+ if (j<cl[im]) i1=im-1;
+ else if (j>cl[im]) i0=im+1;
+ else return a+im;
+ }
+ return 0;
+ }
+template <class R>
+template <class FESpace>
+void MatriceMorse<R>::Build(const FESpace & Uh,const FESpace & Vh,bool sym,bool VF)
+{
+ typedef typename FESpace::Mesh Mesh;
+
+ // for galerkine discontinue ....
+ // VF : true=> Finite Volume matrices (change the stencil)
+ // VF = false => Finite element
+ // F. Hecht nov 2003
+ // -----
+ symetrique = sym;
+ this->dummy=false;
+ a=0;
+ lg=0;
+ cl=0;
+ // bool same = &Uh == & Vh;
+ ffassert( &Uh.Th == &Vh.Th); // same Mesh
+ const Mesh & Th(Uh.Th);
+ //int nbt = Th.nt;
+ //int nbv = Th.nv;
+ //int nbm = Th.NbMortars;
+ int nbe = Uh.NbOfElements;
+ int nbn_u = Uh.NbOfNodes;
+ int nbn_v = Vh.NbOfNodes;
+
+ KN<int> mark(nbn_v);
+ KN<int> pe_u(nbn_u+1+Uh.SizeToStoreAllNodeofElement());
+ // les element du node i
+ // sont dans pe_u[k] pour k \in [ pe_u[i] , pe_u[i+1] [
+ pe_u=0;
+ for (int k=0;k<nbe;k++)
+ {
+ int nbne=Uh(k);
+ for (int in=0;in<nbne;in++)
+ pe_u[(Uh(k,in)+1)]++;
+ }
+ int kk= nbn_u+1,kkk=kk;
+ pe_u[0]=kk;
+ for (int in1=1;in1<=nbn_u;in1++)
+ { // in1 = in + 1
+ kk += pe_u[in1];
+ pe_u[in1] = kkk; // store the last of in
+ kkk=kk;
+ }
+ if(verbosity>4)
+ cout <<" -- MatriceMorse<R>::Build " << kk << " " << nbn_u << " " << Uh.SizeToStoreAllNodeofElement()
+ << " " << nbn_u+1+Uh.SizeToStoreAllNodeofElement() << endl;
+ ffassert(kk== nbn_u+1+Uh.SizeToStoreAllNodeofElement());
+ for (int k=0;k<nbe;k++)
+ {
+ int nbne=Uh(k);
+ for (int in=0;in<nbne;in++)
+ pe_u[pe_u[(Uh(k,in)+1)]++] = k;
+ }
+
+
+ int color=0;
+ mark=color++;
+ lg = new int [this->n+1];
+ ffassert(lg);
+ for (int step=0;step<2;step++)
+ {
+ int ilg=0;
+ lg[0]=ilg;
+ int kij=0;
+ for (int in=0;in<nbn_u;in++)
+ {
+ int nbj=0; // number of j
+ int kijs=kij;
+ // for all triangle contening node in
+ for (int kk= pe_u[in];kk<pe_u[in+1];kk++)
+ {
+ int ke=pe_u[kk];// element of
+ int tabk[10];
+ int ltab=0;
+ tabk[ltab++]=ke;
+ if( VF) // if Finite volume then add Triangle adj in stencil ...
+ ltab+= Th.GetAllElementAdj(ke,tabk+ltab);
+ tabk[ltab]=-1;
+ for(int ik=0,k=tabk[ik];ik<ltab;k=tabk[++ik])
+ {
+ throwassert(k>=0 && k < nbe);
+ int njloc = Vh(k);
+ for (int jloc=0;jloc<njloc;jloc++)
+ {
+ int jn = Vh(k,jloc);
+ if (mark[jn] != color && (!sym || jn < in) )
+ {
+ mark[jn] = color;
+ int fdf=Vh.FirstDFOfNode(jn);
+ int ldf=Vh.LastDFOfNode(jn);
+ if (step)
+ for (int j=fdf;j<ldf;j++)
+ cl[kij++] = j;
+ nbj += ldf-fdf;
+ }
+ }}
+ }
+ int fdf=Uh.FirstDFOfNode(in);
+ int ldf=Uh.LastDFOfNode(in);
+ int kijl=kij;
+ if (step)
+ {
+ HeapSort(cl+kijs,kij-kijs);
+ for (int i=fdf;i<ldf;i++)
+ {
+ if (i!=fdf) // copy the ligne if not the first
+ for (int k=kijs;k<kijl;k++)
+ cl[kij++]=cl[k];
+ if (sym) // add block diag
+ for(int j=fdf;j<=i;j++)
+ cl[kij++]=j;
+ throwassert(kij==lg[i+1]);// verif
+ }
+ }
+ else
+ for (int i=fdf;i<ldf;i++)
+ {
+ if (sym) ilg += ++nbj; // for the diag block
+ else ilg += nbj;
+ lg[i+1]=ilg;
+ }
+ color++; // change the color
+ }
+ if (step==0) { // do allocation
+ nbcoef=ilg;
+ if (verbosity >3)
++<<<<<<< HEAD
+ cout << " -- MorseMatrix: Nb coef !=0 " << nbcoef << " n =" << this->n << " m = " << this->m << endl;
++=======
++ cout << " -- MorseMatrix: Nb coef !=0 " << nbcoef << endl;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ a = new R[nbcoef];
+ cl = new int [nbcoef];}
+ ffassert( a && cl);
+ for (int i=0;i<nbcoef;i++)
+ a[i]=0;
++<<<<<<< HEAD
+ }
+ if( verbosity > 999)
+ {
+ cout << " -- MorseMatrix: " << endl;
+ for(int i=0; i< this->n; ++i)
+ { cout << i << " : " ;
+ for(int k=lg[i];k<lg[i+1]; ++k)
+ cout << cl[k] << ' ';
+ cout << endl;
+ }
+ }
+
+}
+template<class R> inline void ConjArray( R *v, int n)
++=======
++
++ }
++
++}
++template<class R> inline void ConjArray( R *v, int n)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ for (int i=0;i<n;++i)
+ v[i] = RNM::conj(v[i]);
+}
+template<> inline void ConjArray<double>(double *v, int n) {}
+template<> inline void ConjArray<float>(float *v, int n) {}
+
+template<class R>
+ void MatriceMorse<R>::dotransposition()
+ {
+ if(symetrique) return;
+
+ ffassert(this->dummy==false);
+ int *llg= new int[nbcoef];
+ int *clg= new int[this->m+1];
+
+ for (int i=0;i<this->n;i++)
+ for (int k=lg[i];k<lg[i+1];k++)
+ llg[k]=i;
+
+ HeapSort(cl,llg,a,nbcoef);
+ for(int k=0;k<this->m;k++)
+ clg[k]=-1;
+
+ // build new line end (old column)
+ for(int k=0;k<nbcoef;k++)
+ clg[cl[k]+1]=k+1;
+
+ for(int kk=0, k=0;k<=this->m;k++)
+ if (clg[k]==-1)
+ clg[k]=kk;
+ else kk=clg[k];
+
+ clg[this->m]=nbcoef;
+ // sort the new column (old line)
+ for(int i=0;i<this->m;i++)
+ HeapSort(llg+clg[i],cl+clg[i],a+clg[i],clg[i+1]-clg[i]);
+ delete[] cl;
+ delete[] lg;
+ Exchange(this->n,this->m);
+ cl=llg;
+ lg=clg;
+ ConjArray(a,nbcoef);
+ }
+
+template<class R>
+ triplet<int,int,bool> BuildCombMat(std::map< pair<int,int>, R> & mij,const list<triplet<R,MatriceCreuse<R> *,bool> > &lM,bool trans,int ii00,int jj00,bool cnj=false)
+ {
+ // modif FH feb 2010 cnj => transpose -> conj & trans
+ typedef typename list<triplet<R,MatriceCreuse<R> *,bool> >::const_iterator lconst_iterator;
+
+ lconst_iterator begin=lM.begin();
+ lconst_iterator end=lM.end();
+ lconst_iterator i;
+
+ // std::map< pair<int,int>, R> mij;
+
+ int n=0,m=0;
+ bool sym=true;
+ for(i=begin;i!=end;i++++)
+ {
+ if(i->second) // M == 0 => zero matrix
+ {
+ MatriceCreuse<R> & M=*i->second;
+ bool transpose = i->third != trans;
+ ffassert( &M);
+ R coef=i->first;
+ if(verbosity>3)
+ cout << " BuildCombMat + " << coef << "*" << &M << " " << sym << " t = " << transpose << " " << i->third << endl;
+ // change to max FH dec 2007 to hard to satisfy
+ /* if (n==0)*/ { if(transpose) {m=max(m,M.n); n=max(n,M.m);} else{n=max(M.n,n); m=max(M.m,m);}}// Modif mars 2007 FH
+ /* else { if(transpose) ffassert(n== M.m && m==M.n); else ffassert(n== M.n && m==M.m);}*/
+ sym = M.addMatTo(coef,mij,transpose,ii00,jj00,transpose&&cnj) && sym;
+ }
+ }
+ int nbcoef=mij.size();
+ if(sym) nbcoef = (nbcoef+n)/2;
+
+ // return new MatriceMorse<R>(n,m,mij,sym);
+ return make_triplet(n,m,sym);
+ }
+
+template<class R>
+ MatriceMorse<R> * BuildCombMat(const list<triplet<R,MatriceCreuse<R> *,bool> > &lM,bool trans,int ii00,int jj00)
+ {
+
+ std::map< pair<int,int>, R> mij;
+ triplet<int,int,bool> nmsym=BuildCombMat(mij,lM,trans,ii00,jj00);
+
+ return new MatriceMorse<R>(nmsym.first,nmsym.second,mij,nmsym.third);
+
+ }
+template<class R>
+bool MatriceMorse<R>::addMatTo(R coef,std::map< pair<int,int>, R> &mij,bool trans,int ii00,int jj00,bool cnj,double threshold)
+{
+ double eps0=max(numeric_limits<double>::min(),threshold);
+ int i,j,k;
+ if (symetrique)
+ {
+ for ( i=0;i<this->n;i++)
+ for ( k=lg[i];k<lg[i+1];k++)
+ {
+ j=cl[k];
+ R cij = coef* ( cnj ? RNM::conj(a[k]) : a[k]);
+ if(RNM::norm2(cij)>eps0)
+ {
+ mij[ij_mat(trans,ii00,jj00,i,j)] += cij ;
+ if (i!=j)
+ mij[ij_mat(trans,ii00,jj00,j,i)] += cij;
+ }
+ }
+
+ }
+ else
+ {
+ for ( i=0;i<this->n;i++)
+ for ( k=lg[i];k<lg[i+1];k++)
+ {
+ j=cl[k];
+ R cij = coef* ( cnj ? RNM::conj(a[k]) : a[k]);
+
+ if(RNM::norm2(cij)>eps0)
+ mij[ij_mat(trans,ii00,jj00,i,j)] += cij;
+ }
+ }
+
+return symetrique;
+}
+
+
+template<class R>
+template<class K>
+MatriceMorse<R>::MatriceMorse(int nn,int mm, std::map< pair<int,int>, K> & m, bool sym):
+ MatriceCreuse<R>(nn,mm,0),
+ nbcoef(m.size()),symetrique(sym),
+ a(new R[nbcoef]),
+ lg(new int[nn+1]),
+ cl(new int[nbcoef]),
+ solver(0)
+{
+ int k=0;
+ bool nosym=!sym;
+ typename std::map< pair<int,int>, R>::iterator iter=m.begin(), mend=m.end();
+ // remarque lg est croissant Bug trouver par
+ for(int i=0;i<=nn;i++) lg[i]=0;
+ while(iter!=mend)
+ {
+ int i=iter->first.first;
+ int j=iter->first.second;
+ K & aij=iter->second;
+ assert( i < nn && j < mm);
+ if(j<=i || nosym)
+ {
+ cl[k]=j;
+ a[k]=aij;
+ lg[i+1]=++k;
+ }
+ ++iter;
+ }
+ // lg est croissant on bouche les trou
+ for(int i=1;i<=nn;i++) lg[i]=Max(lg[i-1],lg[i]);
+
+ ffassert(nbcoef==k);
+ }
+// FH mars 2009 ...
+template<class R>
+ void MatriceMorse<R>::resize(int nn,int mm)
+{
+ int nc=0;
+ int *nlg=new int[nn+1],*ncl=0;
+ int nm=min(nn,this->n);
+ nc =0;
+ nlg[0]=nc;
+ if (symetrique)
+ { if( nn != mm) AFAIRE("MatriceMorse<R>::resize symetric n!=m");
+ for (int i=0;i<nm;i++)
+ {
+ for (int k=lg[i];k<lg[i+1];k++)
+ { int j=cl[k];
+ if( j<this->m && RNM::norm2(a[k]))
+ ++nc;
+ }
+ nlg[i+1]=nc;
+ }
+
+ }
+ else
+ {
+ for (int i=0;i<nm;i++)
+ {
+ for (int k=lg[i];k<lg[i+1];k++)
+ {
+ int j=cl[k];
+ if(i<this->n && j<this->m && RNM::norm2(a[k]))
+ ++nc ;
+ }
+ nlg[i+1]=nc;
+ }
+ }
+ for(int i=nm+1;i<=nn;++i)
+ nlg[i]=nc;
+ ncl = new int[nc];
+ R *na=new R[nc];
+ nc=0;
+
+ if (symetrique)
+ { if( nn != mm) AFAIRE("MatriceMorse<R>::resize symetric n!=m");
+ for (int i=0;i<nm;i++)
+ for (int k=lg[i];k<lg[i+1];k++)
+ { int j=cl[k];
+ if( j<this->m && RNM::norm2(a[k]))
+ {na[nc]=a[k];
+ ncl[nc++]=j;}
+ }
+
+ }
+ else
+ {
+ for (int i=0;i<nm;i++)
+ for (int k=lg[i];k<lg[i+1];k++)
+ {
+ int j=cl[k];
+ if( j<this->m && RNM::norm2(a[k]))
+ {na[nc]=a[k];
+ ncl[nc++]=j;}
+ }
+ }
+
+ delete [] cl;
+ delete [] lg;
+ delete [] a;
+ cl=ncl;
+ lg=nlg;
+ a=na;
+ this->n=nn;
+ this->m=mm;
+ this->N=nn;
+ this->M=mm;
+ this->nbcoef=nc;
+ // cout << nn << " " << mm << " " << KN_<int>(lg,nn+1) << endl;
+
+}
+template<class RA>
+ template<class RB,class RAB>
+ void MatriceMorse<RA>::prod(const MatriceMorse<RB> & B, MatriceMorse<RAB> & AB)
+ {
+ // compute the s
+ bool sym=this == & B &&symetrique;
+ int *blg=B.lg;
+ int *bcl=B.cl;
+ ffassert(this->m==B.n);
+ bool delbl= B.symetrique;
+ if (delbl)
+ {
+ int nn=B.n;
+ blg = new int[nn+1];
+ for (int i=0;i<B.n;i++)
+ blg[i]=B.lg[i+1]-B.lg[i];
+ blg[nn]=0;
+
+ for (int i=0;i<nn;i++)
+ for (int k= B.lg[i];k<B.lg[i+1];k++)
+ { int j=B.cl[k];
+ assert(j <= i);
+ if (j!=i)
+ blg[j]++;
+ }
+
+ for (int i=1;i<=nn;i++)
+ blg[i]+=blg[i-1];
+ int nbnz = blg[nn];
+ bcl= new int[nbnz];
+
+ for (int i=0;i<B.n;i++)
+ for (int k= B.lg[i];k<B.lg[i+1];k++)
+ { int j=B.cl[k];
+ assert(j <= i);
+ bcl[--blg[i] ]=j;
+ if(i !=j)
+ bcl[--blg[j]]=i;
+ }
+ }
+
+ set<pair<int,int> > sij;
+ double eps0=numeric_limits<double>::min();
+
+ for (int i=0;i<this->n;i++)
+ for (int k=lg[i];k<lg[i+1];k++)
+ {
+ int j=cl[k];
+ if(RNM::norm2(a[k])<eps0) continue;
+ int ii[2],jj[2];
+ ii[0]=i;ii[1]=j;
+ jj[0]=j;jj[1]=i;
+ int kk=1;
+ if(symetrique && i != j) kk=2;
+ for (int ll=0;ll<kk;ll++)
+ {
+ int i=ii[ll];
+ int j=jj[ll];
+ if(j>=B.n) continue; // in case of not equal size A.m != B.n
+ for (int kkb=blg[j];kkb<blg[j+1];kkb++)
+ {
+ int kz= bcl[kkb];
+ RB bjk;
+ if (B.symetrique && kz > j)
+ bjk=B(kz,j);
+ else
+ bjk=B(j,kz);
+ if( RNM::norm2(bjk)>eps0 && (!sym || kz<=i))
+ sij.insert(make_pair(i,kz));
+ }
+ }
+
+ }
+ int nn=this->n;
+ int mm=B.m;
+ int * llg=new int[nn+1];
+ int * lcl=new int[sij.size()];
+ RAB * aa = new RAB[sij.size()];
+ for(int i=0;i<=nn;i++)
+ llg[i]=0;
+
+ for (set<pair<int,int> >::iterator iter=sij.begin();iter!=sij.end();++iter)
+ {
+ int i=iter->first;
+ // int j=iter->second;
+ llg[i]++;
+ }
+ for (int i=1;i<=nn;i++)
+ llg[i]+=llg[i-1];
+ ffassert(llg[this->n]==(long) sij.size());
+ for (set<pair<int,int> >::iterator iter=sij.begin();iter!=sij.end();++iter)
+ {
+ int i=iter->first;
+ int j=iter->second;
+ // cout << i << " , " << j << endl;
+ lcl[--llg[i]]=j;
+ }
+ for(int i=0;i<nn;i++)
+ HeapSort(lcl+llg[i],llg[i+1]-llg[i]);
+
+ AB.n=nn;
+ AB.m=mm;
+ AB.N=nn; // add missing jan 2008 FH
+ AB.M=mm; // add missing jan 2008 FH
+
+ AB.lg=llg;
+ AB.cl=lcl;
+ AB.a=aa;
+ AB.nbcoef=sij.size();
+ AB.symetrique=sym;
+ AB.dummy=false;
+ AB = RAB();
+ for (int i=0;i<this->n;i++)
+ for (int k=lg[i];k<lg[i+1];k++)
+ {
+ int j=cl[k];
+ RAB aij = a[k];
+ if(RNM::norm2(aij) <eps0 ) continue;
+ int ii[2],jj[2];
+ ii[0]=i;ii[1]=j;
+ jj[0]=j;jj[1]=i;
+ int kk=1;
+ if(symetrique && i != j) kk=2;
+ for (int ll=0;ll<kk;ll++)
+ {
+ int i=ii[ll];
+ int j=jj[ll];
+ if(j>=B.n) continue; // in case of not equal size A.m != B.n
+ for (int kb=blg[j];kb<blg[j+1];kb++)
+ {
+ int k= bcl[kb];
+ RB bjk;
+ if (B.symetrique && k > j)
+ bjk=B(k,j);
+ else
+ bjk=B(j,k);
+ // cout << i << "," << "," << j << "," << k << " " << aij << " " << bjk << endl;
+ if( RNM::norm2( bjk)> eps0 && (!sym || k<=i))
+ AB(i,k) += aij*bjk;
+ }
+ }
+
+ }
+
+ if (delbl) {
+ delete [] blg;
+ delete [] bcl;
+ }
+
+
+ }
+
+template<class R>
+ void MatriceMorse<R>::addMatMul(const KN_<R> & x, KN_<R> & ax) const
+{
+ int i,j,k;
+ if( ! (this->n==ax.N() && this->m==x.N()))
+ {cerr << " Err MatriceMorse<R>: ax += A x" <<endl;
+ cerr << " A.n " << this->n<< " != "<< ax.N() << " ax.n \n";
+ cerr << " A.m " << this->m<< " != " <<x.N() << " x.n \n" ;
+ ffassert(0);
+ abort();
+ }
+ if (symetrique)
+ {
+ for (i=0;i<this->n;i++)
+ for (k=lg[i];k<lg[i+1];k++)
+ {
+ j=cl[k];
+ ax[i] += a[k]*x[j];
+ if (i!=j)
+ ax[j] += a[k]*x[i];
+ }
+
+ }
+ else
+ {
+ for (i=0;i<this->n;i++)
+ for (k=lg[i];k<lg[i+1];k++)
+ {
+ j=cl[k];
+ ax[i] += a[k]*x[j];
+ }
+ }
+}
+
+template<class R>
+ void MatriceMorse<R>::addMatTransMul(const KN_<R> & x, KN_<R> & ax) const
+{
+ int i,j,k;
+ ffassert(this->m==ax.N());
+ ffassert(this->n==x.N());
+ if (symetrique)
+ {
+ for (i=0;i<this->n;i++)
+ for (k=lg[i];k<lg[i+1];k++)
+ {
+ j=cl[k];
+ ax[j] += a[k]*x[i];
+ if (i!=j)
+ ax[i] += a[k]*x[j];
+ }
+
+ }
+ else
+ {
+ for (i=0;i<this->n;i++)
+ for (k=lg[i];k<lg[i+1];k++)
+ {
+ j=cl[k];
+ ax[j] += a[k]*x[i];
+ }
+ }
+}
+
+
+template<class R>
+MatriceMorse<R> & MatriceMorse<R>::operator +=(MatriceElementaire<R> & me) {
++<<<<<<< HEAD
+ // R zero=R();
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ int il,jl,i,j;
+ int * mi=me.ni, *mj=me.nj;
+ if ((this->n==0) && (this->m==0))
+ {
+
+ // if(verbosity>3)
+ cout << " -- Morse Matrice is empt: let's build it" << endl;
+ ffassert(0);
+ /*
+ this->n=me.Uh.NbOfDF;
+ this->m=me.Vh.NbOfDF;
+ switch (me.mtype) {
+ case MatriceElementaire<R>::Full :
+ Build(me.Uh,me.Vh,false);
+ break;
+ case MatriceElementaire<R>::Symmetric :
+ Build(me.Uh,me.Vh,true);
+ break;
+ default:
+ cerr << "Big bug type MatriceElementaire is unknown" << (int) me.mtype << endl;
+ throw(ErrorExec("exit",1));
+ break; }
+ */
+ }
+ R * al = me.a;
+ R * aij;
+ switch (me.mtype) { // modif FH overfloat in array mi and mj => trap on win32
+ case MatriceElementaire<R>::Full : ffassert(!symetrique);
+ for (il=0; il<me.n; ++il) { i=mi[il];
+ for ( jl=0; jl< me.m ; ++jl,++al) {j=mj[jl];
+ aij = pij(i,j);
++<<<<<<< HEAD
+ // if( *al!=zero )
+ {
+ throwassert(aij);
+ *aij += *al;}}}
++=======
++ throwassert(aij);
++ *aij += *al;}}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ break;
+
+ case MatriceElementaire<R>::Symmetric : ffassert(symetrique);
+ for (il=0; il<me.n; ++il) { i=mi[il] ;
+ for (jl=0;jl< il+1 ; ++jl) { j=mj[jl];
+ aij = (j<i) ? pij(i,j) : pij(j,i);
+ throwassert(aij);
+ *aij += *al++;}}
+ break;
+ default:
+ cerr << "Big bug type MatriceElementaire unknown" << (int) me.mtype << endl;
+ exit(1);
+ break;
+ }
+ return *this;
+}
+
+template<class R>
+ void MatriceMorse<R>::Solve(KN_<R> &x,const KN_<R> &b) const{
+ if (solver)
+ solver->Solver(*this,x,b);
+ else
+ { cerr << "No Solver defined for this Morse matrix " << endl;
+ throw(ErrorExec("exit",1));}
+ }
+
+
+template<class R>
+double MatriceMorse<R>::psor(KN_<R> & x,const KN_<R> & gmin,const KN_<R> & gmax , double omega)
+{
+ double err=0;
+ int n=this->n;
+ ffassert(n==this->m);
+ ffassert(n==x.N());
+ ffassert(n==gmin.N());
+ ffassert(n==gmax.N());
+ if (symetrique)
+ {
+ ErrorExec("Error:sorry psor just for no symmetric Morse matrices",1);
+ }
+ else
+ {
+ for (int i=0;i<this->n;i++)
+ {
+ R xnew =x[i];
+ R aii=R();
+ for (int k=lg[i];k<lg[i+1];k++)
+ {
+ int j=cl[k];
+ if(j!= i)
+ xnew -= a[k]*x[j];
+ else aii=a[k];
+ }
+ if(aii != R())
+ xnew /= aii;
+ else ErrorExec("Error: psor diagonal coef = 0 ",1);
+ R dx = (xnew - x[i])*omega ;
+ R xi = RNM::Min(RNM::Max(x[i]+dx,gmin[i]),gmax[i]);
+ dx = x[i]- xi;
+ err = Max(err, RNM::norm2(dx));
+ x[i] = xi;
+ }
+ } return sqrt(err);
+
+}
+
+template<class R>
+double MatriceProfile<R>::psor(KN_<R> & x,const KN_<R> & gmin,const KN_<R> & gmax , double omega)
+{
+ double rr=0;
+ ErrorExec("Error:sorry psor just for no symmetric Morse matrices (will do in future FH??? )",2);
+ return rr;
+
+}
+
+template<class R>
+void MatriceProfile<R>::setdiag(const KN_<R> & x)
+{
+ ffassert(D);
+ ffassert( this->n == x.N());
+ KN_<R> d(D,this->n) ;
+ d=x;
+}
+template<class R>
+void MatriceProfile<R>::getdiag(KN_<R> & x) const
+{
+ ffassert(D);
+ ffassert( this->n == x.N());
+ KN_<R> d(D,this->n) ;
+ x=d;
+}
+template<class R>
+void MatriceMorse<R>::setdiag(const KN_<R> & x)
+{
+ ffassert( this->n == this->m&& this->n == x.N());
+ for (int i=0;i<this->n;++i)
+ {
+ R * p= pij(i,i);
+ if(p) *p = x[i];
+ else ffassert( RNM::norm2(x[i]) < 1e-30);}
+}
+template<class R>
+void MatriceMorse<R>::getdiag(KN_<R> & x) const
+{
+ ffassert( this->n == this->m && this->n == x.N());
+ for (int i=0;i<this->n;++i)
+ {
+ R * p= pij(i,i);
+ x[i]= p ? *p : R() ;
+ }
+
+}
+template<class R>
+R MatriceMorse<R>::pscal(const KN_<R> & x,const KN_<R> & y)
+{ // (x, Ay)
+ R sum=R();
+ int i,j,k;
+ ffassert(this->n==x.N());
+ ffassert(this->m==y.N());
+ if (symetrique)
+ {
+ for (i=0;i<this->n;i++)
+ for (k=lg[i];k<lg[i+1];k++)
+ {
+ j=cl[k];
+ sum += a[k]*x[i]*y[j];
+ if (i!=j)
+ sum += a[k]*x[j]*y[i];
+ }
+
+ }
+ else
+ {
+ for (i=0;i<this->n;i++)
+ for (k=lg[i];k<lg[i+1];k++)
+ {
+ j=cl[k];
+ sum += a[k]*x[i]*y[j];
+ }
+ }
+ return sum;
+}
+template<class R>
+R MatriceProfile<R>::pscal(const KN_<R> & x,const KN_<R> & y)
+{
+ if (y.n != this->n || x.n != this->n ) ERREUR(MatriceProfile pscal(xa,x) ," longueur incompatible c (out)") ;
+ int i,j,k,kf;
+ R sum = R();
+ ffassert(this->n == this->m);
+ if (D)
+ for (i=0;i<this->n;i++)
+ sum += D[i]*x[i]*y[i];
+ else
+ for (i=0;i<this->n;i++) // no dia => identyty dai
+ sum +=x[i]*y[i];
+
+ if (L && pL )
+ for (kf=pL[0],i=0; i<this->n; i++ )
+ {
+ k=kf;
+ kf=pL[i+1];
+ for ( j=i-kf+k; k<kf; j++, k++ )
+ sum += L[k]*x[i]*y[j],throwassert(i>=0 && i <this->n && j >=0 && j < this->m && k>=0 && k < pL[this->n]);
+ }
+ if (U && pU)
+ for (kf=pU[0],j=0; j<this->m; j++)
+ {
+ k=kf;
+ kf=pU[j+1];
+ for ( i=j-kf+k; k<kf; i++, k++ )
+ sum += U[k]*x[i]*y[j],throwassert(i>=0 && i <this->n && j >=0 && j < this->m && k>=0 && k < pU[this->n]);
+ }
+ return sum;
+}
+
+template<class R>
+void MatriceMorse<R>::getcoef(KN_<R> & x) const
+{
+ ffassert(x.N()==this->nbcoef);
+ x = KN_<R>(this->a,nbcoef);
+}
+template<class R>
+void MatriceMorse<R>::setcoef(const KN_<R> & x)
+{
+ ffassert(x.N()==nbcoef);
+ KN_<R>(this->a,nbcoef) = x;
+}
+template<class R>
+int MatriceMorse<R>::NbCoef() const
+{
+ return this->nbcoef;
+}
+
+template<class R>
+void MatriceProfile<R>::getcoef(KN_<R> & x) const
+{
+ ffassert(x.N()==this->NbCoef());
+ int k=0,kk;
+ if (D)
+ { kk=this->n;
+ x(SubArray(kk,k)) = KN_<R>(D,kk);
+ k += kk; }
+ if (L)
+ { kk= pL[this->n];
+ x(SubArray(kk,k)) = KN_<R>(L,kk);
+ k += kk; }
+ if (U && (U != L))
+ { kk= pU[this->n];
+ x(SubArray(kk,k)) = KN_<R>(U,kk);
+ k += kk; }
+
+}
+template<class R>
+void MatriceProfile<R>::setcoef(const KN_<R> & x)
+{
+ ffassert(x.N()==this->NbCoef());
+ int k=0,kk;
+ if (D)
+ { kk=this->n;
+ KN_<R>(D,kk)=x(SubArray(kk,k)) ;
+ k += kk; }
+ if (L)
+ { kk= pL[this->n];
+ KN_<R>(L,kk)=x(SubArray(kk,k)) ;
+ k += kk; }
+ if (U && (U != L))
+ { kk= pU[this->n];
+ KN_<R>(U,kk)=x(SubArray(kk,k)) ;
+ k += kk; }
+
+}
+template<class R>
+int MatriceProfile<R>::NbCoef() const
+{
+ int s=0;
+ if (D) s += this->n;
+ if (L) s += pL[this->n];
+ if (U && (U != L)) s += pU[this->n];
+ return s;
+}
+#endif
+
diff --cc src/femlib/Mesh3dn.cpp
index ee451e5,1c36397..43d0f31
--- a/src/femlib/Mesh3dn.cpp
+++ b/src/femlib/Mesh3dn.cpp
@@@ -183,9 -183,9 +183,9 @@@ namespace Fem2
// Add by J. Morice 11/10
// compute the hmin in a 3d mesh
// Remark: on peut le mettre dans generic mesh
-- // (attention aux boucles sur les arr�tes)
++ // (attention aux boucles sur les arr�tes)
double Mesh3::hmin() const{
-- R3 Pinf(1e100,1e100,1e100),Psup(-1e100,-1e100,-1e100); // Extremit� de la bo�te englobante
++ R3 Pinf(1e100,1e100,1e100),Psup(-1e100,-1e100,-1e100); // Extremit� de la bo�te englobante
double hmin=1e10;
for (int ii=0;ii< this->nv;ii++){
diff --cc src/femlib/Mesh3dn.cpp.orig
index ee451e5,1c36397..16c8255
--- a/src/femlib/Mesh3dn.cpp.orig
+++ b/src/femlib/Mesh3dn.cpp.orig
@@@ -238,7 -238,6 +238,10 @@@ namespace Fem2
// 2) delete points which is not in element or in border element
Mesh3::Mesh3(const string filename, const long change)
{
++<<<<<<< HEAD
+
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
int ok=load(filename);
cout << "read mesh ok " << ok << endl;
cout << ", nt " << nt << ", nv " << nv << " nbe: = " << nbe << endl;
@@@ -550,7 -549,7 +553,11 @@@
int i;
// f >> nv >> nt >> neb ;
string str;
++<<<<<<< HEAD
+ int err=0;
++=======
+
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
while(!f.eof())
{
f >> str;
@@@ -579,10 -578,8 +586,15 @@@
cout << " -- Nb of Elements " << nt << endl;
for (int i=0;i<nt;i++)
{
++<<<<<<< HEAD
+ this->t(i).Read1(f,this->vertices,this->nv);
+ if(this->t(i).mesure()<=0) err++; // Modif FH nov 2014
+ mes += this->t(i).mesure();
+ }
++=======
+ this->t(i).Read1(f,this->vertices,this->nv);
+ mes += this->t(i).mesure();}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
}
else if (str=="Triangles")
{
@@@ -623,12 -620,6 +635,15 @@@
BuildjElementConteningVertex();
}
*/
++<<<<<<< HEAD
+ if(err!=0)
+ {
+ cerr << " Mesh3::read: sorry bad mesh. Number of negative Tet " << err << endl;
+ this->~Mesh3();
+ ffassert(0);
+ }
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
}
int Mesh3::load(const string & filename)
@@@ -891,7 -882,7 +906,11 @@@ const string Gsbegin="Mesh3::GSave
}
void Mesh3::readmsh(ifstream & f,int offset)
{
++<<<<<<< HEAD
+ int err=0;
++=======
+
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
f >> nv >> nt >> nbe;
if(verbosity>2)
cout << " GRead : nv " << nv << " " << nt << " " << nbe << endl;
@@@ -912,10 -903,9 +931,16 @@@
int i[4],lab;
Element & K(this->elements[k]);
f >> i[0] >> i[1] >> i[2] >> i[3] >> lab;
++<<<<<<< HEAD
+ Add(i,4,offset);
+ K.set(this->vertices,i,lab);
+ mes += K.mesure();
+ err += K.mesure() <0;
++=======
+ Add(i,4,offset);
+ K.set(this->vertices,i,lab);
+ mes += K.mesure();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
}
}
@@@ -925,17 -915,11 +950,24 @@@
int i[4],lab;
BorderElement & K(this->borderelements[k]);
f >> i[0] >> i[1] >> i[2] >> lab;
++<<<<<<< HEAD
+ Add(i,3,offset);
++=======
+ Add(i,3,offset);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
K.set(this->vertices,i,lab);
mesb += K.mesure();
}
++<<<<<<< HEAD
+ if(err!=0)
+ {
+ cerr << " Mesh3::readmsh : sorry bad mesh. Number of negative Tet " << err << endl;
+ this->~Mesh3();
+ ffassert(0);
+ }
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
}
diff --cc src/femlib/RNM.hpp.orig
index 9bc707a,0000000..5ee56ac
mode 100644,000000..100644
--- a/src/femlib/RNM.hpp.orig
+++ b/src/femlib/RNM.hpp.orig
@@@ -1,1601 -1,0 +1,1606 @@@
+// ********** DO NOT REMOVE THIS BANNER **********
+// ORIG-DATE: 29 fev 2000
+// -*- Mode : c++ -*-
+//
+// SUMMARY : array modelisation
+// USAGE : LGPL
+// ORG : LJLL Universite Pierre et Marie Curie, Paris, FRANCE
+// AUTHOR : Frederic Hecht
+// E-MAIL : frederic.hecht at ann.jussieu.fr
+//
+
+/*
+
+
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+ */
+#ifndef KNM_H_
+#define KNM_H_
+// version sept 2008 FH.
+// ----------------------
+// une tentative qui ne marche pas
+// de tableau constant
+#include <complex>
+#include <iostream>
+#include <iomanip>
+#include <cmath>
+#include <cassert>
+
+
+using namespace std;
+#define const_R R
+#include <cstdlib>
+inline void Check_Kn(const char * str,const char * file,int line)
+{
+ cerr << "CHECK_KN: " << str << " in file: " << file << ", line " << line <<endl;
+#ifdef VersionFreeFempp
+ ffassert(0);
+#else
+ assert(0);
+#endif
+
+ abort();
+}
+
+#define K_bigassert(i) if (!(i)) Check_Kn(#i,__FILE__,__LINE__);
+#define RNM_FATAL_ERROR(i) Check_Kn(i,__FILE__,__LINE__);
+#ifdef CHECK_KN
+
+#define K_throwassert(i) if (!(i)) Check_Kn(#i,__FILE__,__LINE__);
+
+#else
+#define K_throwassert(i)
+#endif
+// version du 29 fev 2000
+// correction for (... lj++,ui++ qui apelle le produit scalaire
+// petite correction throwassert
+// ajoute de operateur /= et *= sur des vecteurs
+// suppression de constructeur qui pose de probleme
+// correction oper += ... dans RNM_op.h ligne 56 change = en oper
+// version de 25 nov 99 sans const R
+// ajoute de '.' pour extraire une colonne, ou ligne , ...
+// version du 22 nov 1999 cast to KN_<const R>
+// version du 21 nov 1999 correction delete
+// version du 13 nov 1999
+// version du 18 mars 99
+// F. Hecht
+// attention les indexations les indexations peuvent changer
+// puisque que l'on peut prendre la transposer d'une matrice
+// tableau
+// mais ils partent de 0
+// version corrigee du 15/11/98
+// version avec sous tableau --- mars 99
+// -------
+// remarque du 8 mars 99 FH
+// class pour prendre des sous-tableau
+// attention aux PB de continute dans les tableaux
+// on a supposer que les tableaux multi indices pouvait est vue comme
+// un tableau continue ce qui est generalement faux quand l'on en
+// prend un sous tableau
+// exemple: un tableau 3,5 est numerote comme:
+// 0 3 6 9 12
+// 1 4 7 10 13
+// 2 5 8 11 14
+// step
+// indexi n 1
+// indexj m n
+// est le sous tableau 3,3 n'est pas numeroter consecutivement
+//
+// Donc la fonction IsVector1() nous dit si un tableau
+// a un 2 ou 3 indices est ou non consecutif en memoire
+//
+// -- ajoute d'une classe VirtualMatrice
+// pour modeliser le produit matrice vecteur
+// x = A*v; via des fonctions virtuelle
+// ----------------------------------
+// version du 6 mars 2001 FH
+// --- initialisation --
+// --------------------------------
+// version du 9 oct 2001 FH
+// ajoute de constructeur par defaut d'une vecteur
+// + set , pour definir le vecteur
+// ou l'affectation (bof bof)
+// ---------------------
+// version sep 2002
+// ajoute operateur >> pour KN<R> et KN_<R>
+// --------------------
+// version april 2003
+// ajoute un gestion auto de
+// la fonction InternalError pour les matriceVirtuel
+// --------------------
+// version jan 2004
+// correction pour go ++
+// des operateur #= pour les matrices et tenseurs
+// ----------------------
+// version feb 2004
+// v(i(:)) = w // i(1:10)
+// w=u(i(:)) //
+// version mars 2004 make small correction
+// in ITAB operator problem if non type R a defi
+// -------------------
+// Modif pour version avec les Complex mai 2004
+// (u,v) donne le produit complex utiliser dans le produit matrice vecteur
+// (u,conj(v)) donne le produit hermitiene pour le gradient conjugue
+//
+// -- de fonction dans le cas real
+// modif for g++ 4.0 and xlc++ mai 2005
+// adding some this->
+// mars 2007
+// correction in operator operation:b -1*c
+// aout 2007,
+// correct y = A*x ; when y is unset
+// correct y += A*x ; when y is unset
+// re-correct += sep 2007
+// add size of the matrix in VirtualMatrix class.
+// mars 2010 add unset KNM case ...
+// sept 2014 add 1/v operator ...
+// ----------------
+
+namespace RNM {
+inline double conj(const double & x){return x;}
+inline float conj(const float &x){return x;}
+inline long conj(const long &x){return x;}
+inline double real(const double &x){return x;}
+inline float real(const float &x){return x;}
+ template<class T> T real(const complex<T>& v){ return std::real(v);}
+inline double norm2(const double x){return x*x;}
+inline float norm2(const float x){return x*x;}
+template<class T> T norm2(const complex<T>& v){ return std::norm(v);}
+
+template<class T> inline complex<T> conj(const complex<T>& v){ return std::conj<T>(v);}
+template<class T> inline T Min (const T &a,const T &b){return a < b ? a : b;}
+template<class T> inline T Max (const T &a,const T & b){return a > b ? a : b;}
+template<class T> inline T Abs (const T &a){return a <0 ? -a : a;}
+
+template<class T> inline void Exchange (T& a,T& b) {T c=a;a=b;b=c;}
+template<class T> inline T Max (const T &a,const T & b,const T & c){return Max(Max(a,b),c);}
+template<class T> inline T Min (const T &a,const T & b,const T & c){return Min(Min(a,b),c);}
+// specialisation cas complex ---
+template<class T>
+inline complex<T> Min(const complex<T> &a,complex<T> &b)
+{ return complex<T>(min(a.real(),b.real()),min(a.imag(),b.imag()));}
+template<class T>
+inline complex<T> Max(const complex<T> &a,const complex<T> &b)
+{ return complex<T>(max(a.real(),b.real()),max(a.imag(),b.imag()));}
+
+/*inline complex<double> Min(const complex<double> &a,complex<double> &b)
+{ return complex<double>(Min(real(a),real(b)),Min(imag(a),imag(b)));}
+inline complex<double> Max(const complex<double> &a,const complex<double> &b)
+{ return complex<double>(Max(real(a),real(b)),Max(imag(a),imag(b)));}
+*/ }
+// ----
+
+template<class R> class KNMK_ ;
+template<class R> class KNM_ ;
+template<class R> class KN_ ;
+template<class R> class TKN_ ; // KN_ Hermitain
+template<class R> class ConjKNM_ ;// take the conj of the matrix.
+template<class R> class notKN_ ; // KN_ not
+template<class R> class notnotKN_ ; // KN_ not not
+
+template<class R> class KNMK ;
+template<class R> class KNM ;
+template<class R> class KN ;
+
+template<class R> class conj_KN_ ;
+template<class R> class Add_KN_;
+template<class R> class Sub_KN_;
+template<class R> class Mulc_KN_; // vector b*a_i
+template<class R> class Divc_KN_;// vector b/a_i
+template<class R> class Add_Mulc_KN_;
+template<class R> class Mul_KNM_KN_;
+template<class R> class DotStar_KN_;
+template<class R> class DotSlash_KN_;
+
+template<class R> class outProduct_KN_;
+template<class R> class if_KN_;
+template<class R> class if_arth_KN_;
+template<class R> class ifnot_KN_;
+template<class R,class I> class KN_ITAB;
+
+template<class R,typename A,typename B> class F_KN_;
+
+
+#ifndef ffassert
+#define ffassert assert
+#endif
+
+// gestion des erreur interne --
+#ifndef InternalError
+typedef void (* TypeofInternalErrorRoutine)(const char *) ;
+static TypeofInternalErrorRoutine &InternalErrorRoutinePtr()
+{
+ static TypeofInternalErrorRoutine routine=0;
+ return routine;
+}
+
+static void InternalError(const char * str) {
+ if (InternalErrorRoutinePtr() ) (*InternalErrorRoutinePtr())(str);
+ cerr << str;
+ exit(1);
+}
+inline void SetInternalErrorRoutine(TypeofInternalErrorRoutine f)
+{
+ InternalErrorRoutinePtr()=f;
+}
+#endif
+// --
+template<class P,class Q>
+ struct PplusQ { const P & p;const Q & q;
+ PplusQ(const P & pp,const Q & qq) : p(pp),q(qq){}
+ };
+
+template<class R>
+struct VirtualMatrice { public:
+ int N,M;
+ VirtualMatrice(int nn,int mm): N(nn),M(mm) {}
+ VirtualMatrice(int nn): N(nn),M(nn) {}
+ // y += A x
+ virtual void addMatMul(const KN_<R> & x, KN_<R> & y) const =0;
+ virtual void addMatTransMul(const KN_<R> & , KN_<R> & ) const
+ { InternalError("VirtualMatrice::addMatTransMul not implemented "); }
+ virtual bool WithSolver() const {return false;} // by default no solver
+ virtual void Solve( KN_<R> & ,const KN_<R> & ) const
+ { InternalError("VirtualMatrice::solve not implemented "); }
+
+#ifdef VersionFreeFempp
+ virtual bool ChecknbLine (int n) const= 0;
+ virtual bool ChecknbColumn (int m) const =0;
+#else
+ virtual bool ChecknbLine (int n) const {return true;}
+ virtual bool ChecknbColumn (int m) const {return true;}
+#endif
+ struct plusAx { const VirtualMatrice * A; const KN_<R> x;
+ plusAx( const VirtualMatrice * B,const KN_<R> & y) :A(B),x(y)
+ { ffassert(B->ChecknbColumn(y.N())); }
+ };
+
+ plusAx operator*(const KN_<R> & x) const {return plusAx(this,x);}
+
+ struct plusAtx { const VirtualMatrice * A; const KN_<R> x;
+ plusAtx( const VirtualMatrice * B,const KN_<R> & y) :A(B),x(y)
+ {ffassert(B->ChecknbLine(y.N()));} };
+
+ struct solveAxeqb { const VirtualMatrice * A; const KN_<R> b;
+ solveAxeqb( const VirtualMatrice * B,const KN_<R> & y) :A(B),b(y)
+ {ffassert(B->ChecknbColumn(y.N()));} };
+
+ virtual ~VirtualMatrice(){}
+};
+
+
+
+//template <class R> class MatriceCreuseMulKN_;
+//template <class R> class MatriceCreuseDivKN_;
+
+class ShapeOfArray;
+
+class FromTo{ public:
+ long from,to;
+ FromTo(long i,long j):from(i),to(j) {K_throwassert(i<j);}
+ };
+
+class SubArray{ public:
+ const long n,step,start;
+// SubArray(char nn): n(-1),step(1),start(0) {}
+ explicit SubArray(long nn,long sta=0,long s=1): n(nn),step(s),start(sta) {}
+ SubArray(const FromTo& ft) : n(ft.to-ft.from+1),step(1),start(ft.from) {}
+ SubArray(const ShapeOfArray & ); // all
+ long end() const { return start+ step*n;}
+ long last() const { return start+ step*(n-1);}
+ long len1() const { return step*(n-1);}
+};
+
+
+class ShapeOfArray{ protected:
+ public:
+
+ long n; // n nb of item
+ long step; // step nb of between 2 item
+ long next; // the next array of same type in matrix for subarray
+ // by default no next ( in case of KN, and KNM -next is
+ // a counter of destruction (use in frefem++)
+ ShapeOfArray(const ShapeOfArray & s,long nn): n(s.n),step(s.n),next(nn) {}
+ ShapeOfArray(long nn): n(nn),step(1),next(-1) {}
+
+ ShapeOfArray(long nn,long s): n(nn),step(s),next(-1) {}
+
+ ShapeOfArray(long nn,long s,long nextt): n(nn),step(s),next(nextt) {}
+
+ ShapeOfArray(const ShapeOfArray &old,const SubArray &sub)
+ : n(sub.n),step(old.step*sub.step),next(old.next)
+ { K_throwassert((sub.last())*old.step <= old.last());} // a constructor
+
+ ShapeOfArray(const ShapeOfArray &old,long stepo,long start)
+ : n(old.n-start),step(old.step*stepo),next(old.next)
+ { K_throwassert(n>=0);}
+
+ long end() const { return n*step;}
+ long last() const { return (n-1)*step;}
+ long constant() const { return step==0;}
+ long index(long k) const { K_throwassert( (k>=0) && ( (k <n) || !step) );
+ return step*k;}
+ ShapeOfArray operator*(long stepp) const {return ShapeOfArray(n,step*stepp,next);}
+ bool SameShape(const ShapeOfArray & a) const
+ { return !step || !a.step || a.n == n ;}
+ long N(const ShapeOfArray & a) { return step ? n : a.n;} // size of 2 shape
+
+
+// protected:
+ long operator[](long k) const {
+ //if( k<0 || ( k<n && !step) )
+ // cout << "k,n,step=" << k << " " << n << " " << step << endl;
+ K_throwassert( (k>=0) && ( (k <n) || !step) );
+ return step*k;}
+ void init(long nn,long s=1,long nextt=-1) { n=nn; step=s; next=nextt;}
+};
+
+ostream & operator<<(ostream & f,const ShapeOfArray & s);
+
+inline bool SameShape(const ShapeOfArray & a,const ShapeOfArray & b)
+ { return !a.step || !b.step || a.n == b.n ;}
+
+inline long N(const ShapeOfArray & a,const ShapeOfArray & b)
+ { K_throwassert(SameShape(a,b)); return a.step ? a.n : b.n ;}
+
+inline SubArray::SubArray(const ShapeOfArray & s)
+ :n(s.n),step(s.step),start(0) {}
+
+
+
+template<class R>
+ostream & operator<<(ostream & f,const KN_<const_R> & v) ;
+
+template<class R> istream & operator>>(istream & f, KN_<R> & v);
+template<class R> istream & operator>>(istream & f, KN<R> & v);
+
+template<class R>
+class SetArray { public:
+ R o,step;
+ long n;
+ explicit SetArray(long nn,R oo=R(),R sstep=R(1)): o(oo),n(nn),step(sstep) {}
+ template<class K> SetArray(SetArray<K> sa): o(sa.o),n(sa.n),step(sa.step) {}
+
+ R operator[](long i) const { return i <= n ? o + R(i)*step : R();}
+ long size() const {return n;}
+};
+
+/// <<KN_>>
+template<class R>
+class KN_: public ShapeOfArray {
+protected:
+ R *v;
+public:
+ typedef R K; // type of data
+ long N() const {return n;}
+ bool unset() const { return !v;}
+ void set(R * vv,int nn,int st=1,int nx=-1) {v=vv;n=nn;step=st;next=nx;}
+ long size() const{return step?n*step:n;}
+ operator R *() const {return v;}
+ KN_(const KN_<R> & u) :ShapeOfArray(u),v(u.v){}
+ KN_(const KN_<R> & U,const SubArray & sa) : ShapeOfArray(U,sa),v(U.v + U.index(sa.start)) {}
+
+ KN_ operator()(const SubArray & sa) const { return KN_(*this,sa);} // sub array
+
+ R & operator[](long i) const {return v[index(i)];}
+ R & operator()(long i) const {return v[index(i)];}
+ R & operator[](int i) const {return v[index(i)];}
+ R & operator()(int i) const {return v[index(i)];}
+
+ R operator,(const KN_<const_R> & v) const; // dot product
+
+ KN_& operator =(const SetArray<R> & u) ;
+ KN_& operator +=(const SetArray<R> & u) ;
+ KN_& operator -=(const SetArray<R> & u) ;
+ KN_& operator *=(const SetArray<R> & u) ;
+ KN_& operator /=(const SetArray<R> & u) ;
+
+ KN_& operator =(const KN_<const_R> & u) ;
+ KN_& operator +=(const KN_<const_R> & u) ;
+ KN_& operator -=(const KN_<const_R> & u) ;
+
+ KN_& operator *=(const KN_<const_R> & u) ;
+ KN_& operator /=(const KN_<const_R> & u) ;
+
+
+ KN_& operator = (const_R a) ;
+ KN_& operator +=(const_R a) ;
+ KN_& operator -=(const_R a) ;
+ KN_& operator /=(const_R a) ;
+ KN_& operator *=(const_R a) ;
+
+ KN_& operator = (R* a) { return operator =(KN_<R>(a,n));}
+ KN_& operator += (R* a) { return operator+=(KN_<R>(a,n));}
+ KN_& operator -= (R* a) { return operator-=(KN_<R>(a,n));}
+ KN_& operator *= (R* a) { return operator*=(KN_<R>(a,n));}
+ KN_& operator /= (R* a) { return operator/=(KN_<R>(a,n));}
+
+
+
+ R min() const ;
+ R max() const ;
+ R sum() const ;
+ double norm() const ;
+ double l2() const ;
+ double l1() const ;
+ double linfty() const ;
+ double lp(double p) const ;
+
+ template<class T> long last(const T &) const;
+ template<class T> long first(const T &) const;
+
+ void map(R (*f)(R )); // apply the f fonction a all element of the array
+ void map(R (*f)(const R& )); // apply the f fonction a all element of the array
+
+ template<class T>
+ void set(R (*f)(const T& ),KN_<T> & u); // apply the f fonction a all element of the array u
+
+ KN_& operator =(const DotStar_KN_<R> & u) ;
+ KN_& operator+=(const DotStar_KN_<R> & u) ;
+ KN_& operator-=(const DotStar_KN_<R> & u) ;
+ KN_& operator*=(const DotStar_KN_<R> & u) ;
+ KN_& operator/=(const DotStar_KN_<R> & u) ;
+
+ KN_& operator =(const DotSlash_KN_<R> & u) ;
+ KN_& operator+=(const DotSlash_KN_<R> & u) ;
+ KN_& operator-=(const DotSlash_KN_<R> & u) ;
+ KN_& operator*=(const DotSlash_KN_<R> & u) ;
+ KN_& operator/=(const DotSlash_KN_<R> & u) ;
+
+ KN_& operator =(const if_KN_<R> & u) ;
+ KN_& operator+=(const if_KN_<R> & u) ;
+ KN_& operator-=(const if_KN_<R> & u) ;
+ KN_& operator*=(const if_KN_<R> & u) ;
+ KN_& operator/=(const if_KN_<R> & u) ;
+
+ KN_& operator =(const ifnot_KN_<R> & u) ;
+ KN_& operator+=(const ifnot_KN_<R> & u) ;
+ KN_& operator-=(const ifnot_KN_<R> & u) ;
+ KN_& operator*=(const ifnot_KN_<R> & u) ;
+ KN_& operator/=(const ifnot_KN_<R> & u) ;
+
+ KN_& operator =(const Add_KN_<R> & u) ;
+ KN_& operator+=(const Add_KN_<R> & u) ;
+ KN_& operator-=(const Add_KN_<R> & u) ;
+ KN_& operator*=(const Add_KN_<R> & u) ;
+ KN_& operator/=(const Add_KN_<R> & u) ;
+
+ template<class I,class T> KN_& operator = (const KN_ITAB<T,I> & u);
+ template<class I,class T> KN_& operator += (const KN_ITAB<T,I> & u);
+ template<class I,class T> KN_& operator -= (const KN_ITAB<T,I> & u);
+ template<class I,class T> KN_& operator *= (const KN_ITAB<T,I> & u);
+ template<class I,class T> KN_& operator /= (const KN_ITAB<T,I> & u);
+
+
+ KN_ITAB< KN_<R>,const KN_<int> > operator()(const KN_<int> &itab) ;
+ KN_ITAB< KN_<R>,const KN_<long> > operator()(const KN_<long> &itab) ;
+ KN_ITAB<const KN_<R>,const KN_<int> > operator()(const KN_<int> &itab) const ;
+ KN_ITAB<const KN_<R>,const KN_<long> > operator()(const KN_<long> &itab) const ;
+
+
+
+
+
+ KN_& operator =(const Sub_KN_<R> & u) ;
+ KN_& operator-=(const Sub_KN_<R> & u) ;
+ KN_& operator+=(const Sub_KN_<R> & u) ;
+ KN_& operator*=(const Sub_KN_<R> & u) ;
+ KN_& operator/=(const Sub_KN_<R> & u) ;
+
+ KN_& operator =(const Mulc_KN_<R> & u) ;
+ KN_& operator+=(const Mulc_KN_<R> & u) ;
+ KN_& operator-=(const Mulc_KN_<R> & u) ;
+ KN_& operator*=(const Mulc_KN_<R> & u) ;
+ KN_& operator/=(const Mulc_KN_<R> & u) ;
+
+ KN_& operator =(const Divc_KN_<R> & u) ;
+ KN_& operator+=(const Divc_KN_<R> & u) ;
+ KN_& operator-=(const Divc_KN_<R> & u) ;
+ KN_& operator*=(const Divc_KN_<R> & u) ;
+ KN_& operator/=(const Divc_KN_<R> & u) ;
+
+ KN_& operator =(const Add_Mulc_KN_<R> & u) ;
+ KN_& operator+=(const Add_Mulc_KN_<R> & u) ;
+ KN_& operator-=(const Add_Mulc_KN_<R> & u) ;
+ KN_& operator*=(const Add_Mulc_KN_<R> & u) ;
+ KN_& operator/=(const Add_Mulc_KN_<R> & u) ;
+
+ KN_& operator =(const if_arth_KN_<R> & u) ;
+ KN_& operator+=(const if_arth_KN_<R> & u) ;
+ KN_& operator-=(const if_arth_KN_<R> & u) ;
+ KN_& operator*=(const if_arth_KN_<R> & u) ;
+ KN_& operator/=(const if_arth_KN_<R> & u) ;
+
+
+ KN_& operator =(const Mul_KNM_KN_<R> & u) ;
+ KN_& operator+=(const Mul_KNM_KN_<R> & u) ;
+ KN_& operator-=(const Mul_KNM_KN_<R> & u) ;
+ KN_& operator*=(const Mul_KNM_KN_<R> & u) ;
+ KN_& operator/=(const Mul_KNM_KN_<R> & u) ;
+
+ // KN_& operator =(const MatriceCreuseMulKN_<R> & ) ;
+ // KN_& operator +=(const MatriceCreuseMulKN_<R> & ) ;
+ KN_& operator =(const typename VirtualMatrice<R>::plusAx & Ax)
+ {*this=R(); Ax.A->addMatMul(Ax.x,*this);return *this;}
+ KN_& operator =(const typename VirtualMatrice<R>::plusAtx & Ax)
+ {*this=R(); Ax.A->addMatTransMul(Ax.x,*this);return *this;}
+ KN_& operator +=(const typename VirtualMatrice<R>::plusAx & Ax)
+ { Ax.A->addMatMul(Ax.x,*this);return *this;}
+ KN_& operator +=(const typename VirtualMatrice<R>::plusAtx & Ax)
+ { Ax.A->addMatTransMul(Ax.x,*this);return *this;}
+ KN_& operator =(const typename VirtualMatrice<R>::solveAxeqb & Ab)
+ {*this=R(); Ab.A->Solve(*this,Ab.b);return *this;}
+
+ template<class A,class B,class C> KN_& operator = (const F_KN_<A,B,C> & u) ;
+ template<class A,class B,class C> KN_& operator += (const F_KN_<A,B,C> & u) ;
+ template<class A,class B,class C> KN_& operator -= (const F_KN_<A,B,C> & u) ;
+ template<class A,class B,class C> KN_& operator /= (const F_KN_<A,B,C> & u) ;
+ template<class A,class B,class C> KN_& operator *= (const F_KN_<A,B,C> & u) ;
+
+
+// KN_& operator =(const MatriceCreuseDivKN_<R> &) ;
+
+ friend ostream & operator<< <R>(ostream & f,const KN_<const_R> & v) ;
+
+ KN_(R *u,const ShapeOfArray & s):ShapeOfArray(s),v(u){}
+ KN_(R *u,long nn,long s):ShapeOfArray(nn,s),v(u){}
+ KN_(R *u,long nn,long s,long nextt):ShapeOfArray(nn,s,nextt),v(u){}
+ KN_(R *u,long nn):ShapeOfArray(nn),v(u){}
+
+
+ TKN_<R> t() ; // transpose
+ const TKN_<R> t() const ; // transpose
+ notKN_<R> operator!() ; // not
+ const notKN_<R> operator!() const ; // not
+
+ // operator KN<R> &();
+ // operator const KN<R> &() const;
+
+ private:
+
+ KN_& operator++(){K_throwassert(next>=0);v += next;return *this;} // ++U
+ KN_& operator--(){K_throwassert(next>=0);v -= next;return *this;} // --U
+ KN_ operator++(int ){K_throwassert(next>=0); KN_ old=*this;v = v +next;return old;} // U++
+ KN_ operator--(int ){K_throwassert(next>=0); KN_ old=*this;v = v -next;return old;} // U++
+
+ KN_(const KN_<R> & u,long offset) :ShapeOfArray(u),v(&u[offset]){}
+ KN_(const KN_<R> & u,const ShapeOfArray &sh,long startv=0)
+ :ShapeOfArray(sh*u.step),v(&u[startv]){}
+ KN_(const KN_<R> & u,long nnext,const ShapeOfArray &sh,long startv=0)
+ :ShapeOfArray(sh.n,sh.step*u.step,nnext),v(&u[startv]){ }
+
+
+// friend class KN_<R>;
+ friend class KNM_<R>;
+ friend class KNMK_<R>;
+ friend class KN<R>;
+ friend class KNM<R>;
+ friend class KNMK<R>;
+
+};
+
+template<class R>
+class KNM_: public KN_<R> {
+ public:
+ ShapeOfArray shapei;
+ ShapeOfArray shapej;
+ public:
+ long IsVector1() const { return (shapei.n*shapej.n) == this->n ;}
+ long N() const {return shapei.n;}
+ long M() const {return shapej.n;}
+ long size() const { return shapei.n*shapej.n;}
+
+ ConjKNM_<R> h() ; // take the conj for hermian operator
+ const ConjKNM_<R> h() const ; // take the conj for hermian operator
+
+ KNM_(R* u,const ShapeOfArray & s,
+ const ShapeOfArray & si,
+ const ShapeOfArray & sj)
+ : KN_<R>(u,s),shapei(si),shapej(sj){}
+ KNM_(R* u,long nn,long mm)
+ : KN_<R>(u,ShapeOfArray(nn*mm)),shapei(nn,1,nn),shapej(mm,nn,1){}
+ KNM_(R* u,long nn,long mm,long s)
+ : KN_<R>(u,ShapeOfArray(nn*mm,s)),shapei(nn,1,nn),shapej(mm,nn,1){}
+ KNM_(KN_<R> u,long n,long m)
+ : KN_<R>(u,ShapeOfArray(m*n)),shapei(n,1,n),shapej(m,n,1){ }
+
+ KNM_(const KN_<R> &u,const ShapeOfArray & si,const ShapeOfArray & sj,long offset=0)
+ : KN_<R>(&u[offset],si.last()+sj.last()+1,u.step),shapei(si),shapej(sj)
+ {K_throwassert( offset>=0 && this->n+ (this->v-(R*)u) <= u.n);}
+ KNM_(const KN_<R> &u,const ShapeOfArray & si,const ShapeOfArray & sj,long offset,long nnext)
+ : KN_<R>(&u[offset],si.last()+sj.last()+1,u.step,nnext),shapei(si),shapej(sj)
+ {K_throwassert( offset>=0 && this->n+ (this->v-(R*)u) <= u.n);}
+
+ KNM_(KNM_<R> U,const SubArray & si,const SubArray & sj)
+ :KN_<R>(U,SubArray(U.ij(si.len1(),sj.len1())+1,U.ij(si.start,sj.start))),
+ shapei(U.shapei,si),shapej(U.shapej,sj){}
+
+ KNM_(KNM_<R> U,const SubArray & sa,const SubArray & si,const SubArray & sj)
+ :KN_<R>(U,SubArray(sa)),shapei(U.shapei,si),shapej(U.shapej,sj){}
+
+ KNM_(const KNM_<R> & u)
+ :KN_<R>(u),shapei(u.shapei),shapej(u.shapej) {}
+
+ KNM_ operator()(const SubArray & sa,const SubArray & sb) const
+ { return KNM_(*this,sa,sb);} // sub array
+
+ long ij(long i,long j) const
+ { return shapei.index(i)+shapej.index(j);}
+ long indexij(long i,long j) const
+ { return this->index(shapei.index(i)+shapej.index(j));}
+ R & operator()(long i,long j) const
+ { return this->v[indexij(i,j)];}
+ R & operator()(int i,int j) const
+ { return this->v[indexij(i,j)];}
+
+ KN_<R> operator()(const SubArray & sa,long j) const
+ { return this->operator()(':',j)(sa);} // sub array
+
+ KN_<R> operator()(long i,const SubArray & sb) const
+ { return this->operator()(i,':')(sb);}
+
+ KN_<R> operator()(const char,long j ) const // une colonne j ('.',j)
+ { return KN_<R>(&this->v[this->index(shapej.index(j))],shapei*this->step);}
+ KN_<R> operator()(long i ,const char) const // une ligne i (i,'.')
+ { return KN_<R>(&this->v[this->index(shapei.index(i))],shapej*this->step);}
+ KN_<R> operator()(const char,int j ) const // une colonne j ('.',j)
+ { return KN_<R>(&this->v[this->index(shapej.index(j))],shapei*this->step);}
+ KN_<R> operator()(int i ,const char) const // une ligne i (i,'.')
+ { return KN_<R>(&this->v[this->index(shapei.index(i))],shapej*this->step);}
+ KN_<R> operator()(const char,const char) const // tous
+ { return *this;}
+ KNM_<R> t() const
+ { return KNM_<R>(this->v,*this,shapej,shapei);} // before { return KNM_<R>(*this,shapej,shapei,v);}
+
+ KNM_& operator =(const KNM_<const_R> & u) ;
+ KNM_& operator =(const_R a) ;
+ KNM_& operator+=(const_R a) ;
+ KNM_& operator-=(const_R a) ;
+ KNM_& operator/=(const_R a) ;
+ KNM_& operator*=(const_R a) ;
+ KNM_& operator+=(const KNM_<const_R> & u) ;
+ KNM_& operator-=(const KNM_<const_R> & u) ;
+ KNM_& operator*=(const KNM_<const_R> & u) ;
+ KNM_& operator/=(const KNM_<const_R> & u) ;
+
+ KNM_ &operator =(const outProduct_KN_<R> &);
+ KNM_ &operator +=(const outProduct_KN_<R> &);
+ KNM_ &operator -=(const outProduct_KN_<R> &);
+ KNM_ &operator /=(const outProduct_KN_<R> &); // bofbof
+ KNM_ &operator *=(const outProduct_KN_<R> &); // bofbof
+
+ KNM_ &operator =(const ConjKNM_<R> &);
+ KNM_ &operator +=(const ConjKNM_<R> &);
+ KNM_ &operator -=(const ConjKNM_<R> &);
+ KNM_ &operator /=(const ConjKNM_<R> &); // bofbof
+ KNM_ &operator *=(const ConjKNM_<R> &); // bofbof
+
+private:
+ KNM_& operator++() {this->v += this->next;return *this;} // ++U
+ KNM_& operator--() {this->v -= this->next;return *this;} // ++U
+ KNM_ operator++(int ){KNM_<R> old=*this;this->v = this->v +this->next;return old;} // U++
+ KNM_ operator--(int ){KNM_<R> old=*this;this->v = this->v -this->next;return old;} // U--
+
+
+ friend class KN_<R>;
+// friend class KNM_<R>;
+ friend class KNMK_<R>;
+ friend class KN<R>;
+ friend class KNM<R>;
+ friend class KNMK<R>;
+};
+
+template<class T,class I>
+struct KN_ITAB
+{
+ KN_ITAB(const T &vv,const I &iindex) : v(vv),index(iindex) {}
+ T v;
+ I index;
+ KN_ITAB & operator=(const T & t);
+ KN_ITAB & operator+=(const T & t);
+ KN_ITAB & operator-=(const T & t);
+ KN_ITAB & operator*=(const T & t);
+ KN_ITAB & operator/=(const T & t);
+ typename T::R & operator[](long i){ return v[index[i]];}
+ const typename T::R & operator[](long i) const { return v[index[i]];}
+ long N() const { return index.N();}
+};
+
+template<class R> KN_ITAB<const KN_<R>,const KN_<int> > KN_<R>::operator()(const KN_<int> &itab) const { return KN_ITAB<const KN_<R>,const KN_<int> > (*this,itab);}
+template<class R> KN_ITAB<const KN_<R>,const KN_<long> > KN_<R>::operator()(const KN_<long> &itab) const { return KN_ITAB<const KN_<R>,const KN_<long> > (*this,itab);}
+template<class R> KN_ITAB< KN_<R>,const KN_<int> > KN_<R>::operator()(const KN_<int> &itab) { return KN_ITAB<KN_<R>,const KN_<int> > (*this,itab);}
+template<class R> KN_ITAB< KN_<R>,const KN_<long> > KN_<R>::operator()(const KN_<long> &itab) { return KN_ITAB<KN_<R>,const KN_<long> > (*this,itab);}
+
+
+template<class R>
+struct TKN_:public KN_<R> {
+ TKN_(const KN_<R> &x) : KN_<R>(x) {}
+};
+
+template<class R>
+struct ConjKNM_:public KNM_<R> {
+ ConjKNM_(const KNM_<R> &x) : KNM_<R>(x) {}
+};
+
+template<class R>
+struct notKN_:public KN_<R> {
+ notKN_(const KN_<R> &x) : KN_<R>(x) {}
+ notnotKN_<R> operator!() ; // not
+ const notnotKN_<R> operator!() const ; // not
+};
+
+template<class R>
+struct notnotKN_:public KN_<R> {
+ notnotKN_(const notKN_<R> &x) : KN_<R>(x) {}
+ notKN_<R> operator!() ; // notnot
+ const notKN_<R> operator!() const ; // notnot
+};
+
+template<class R>
+TKN_<R> KN_<R>::t() { return *this;} // transpose
+template<class R>
+ConjKNM_<R> KNM_<R>::h() { return *this;} // conj of the matrix
+
+template<class R>
+const TKN_<R> KN_<R>::t() const { return *this;} // transpose
+template<class R>
+const ConjKNM_<R> KNM_<R>::h() const { return *this;} // conj of the matrix
+
+template<class R>
+notKN_<R> KN_<R>::operator!() { return *this;} // not
+
+template<class R>
+const notKN_<R> KN_<R>::operator!() const { return *this;} // not
+
+template<class R>
+notnotKN_<R> notKN_<R>::operator!() { return *this;} // not
+
+template<class R>
+const notnotKN_<R> notKN_<R>::operator!() const { return *this;} // not
+
+
+template<class R>
+struct outProduct_KN_ {
+ const KN_<R> a,b;
+ R c;
+ long N() const {return a.N(); }
+ long M() const {return b.N(); }
+ outProduct_KN_(const KN_<R> & aa, const KN_<R> &bb,R cc=(R)1) : a(aa),b(bb),c(cc) {}
+ outProduct_KN_(const KN_<R> * aa, const KN_<R> &bb,R cc=(R)1) : a(*aa),b(bb),c(cc) {}
+ outProduct_KN_(const KN_<R> * aa, const KN_<R> *bb,R cc=(R)1) : a(*aa),b(*bb),c(cc) {}
+ outProduct_KN_(const Mulc_KN_<R> & aa,const KN_<R> & bb) : a(aa.a),b(bb),c(aa.b) {}
+ outProduct_KN_ operator * (R cc) { return outProduct_KN_(a,b,c*cc);}
+};
+
+template<class R>
+struct if_KN_ {
+ const KN_<R> & a,&b;
+ R c;
+ if_KN_(const KN_<R> & aa, const KN_<R> &bb,R cc=1.) : a(aa),b(bb),c(cc) {}
+ if_KN_ operator * (R cc) { return if_KN_(a,b,c*cc);}
+};
+
+template<class R>
+struct ifnot_KN_ {
+ const KN_<R> & a,&b;
+ R c;
+ ifnot_KN_(const KN_<R> & aa, const KN_<R> &bb,R cc=1.) : a(aa),b(bb),c(cc) {}
+ ifnot_KN_ operator * (R cc) { return ifnot_KN_(a,b,c*cc);}
+};
+
+
+template<class R>
+outProduct_KN_<R> operator*(const KN_<R> &a,const TKN_<R> &b)
+{ return outProduct_KN_<R>(a,b);}
+
+template<class R>
+ifnot_KN_<R> operator*(const KN_<R> &a,const notKN_<R> &b)
+{ return ifnot_KN_<R>(b,a);}
+
+template<class R>
+ifnot_KN_<R> operator*(const KN_<R> &a,const notnotKN_<R> &b)
+{ return if_KN_<R>(b,a);}
+
+template<class R>
+ifnot_KN_<R> operator*(const notKN_<R> &b,const KN_<R> &a)
+{ return ifnot_KN_<R>(b,a);}
+
+template<class R>
+ifnot_KN_<R> operator*(const notnotKN_<R> &b,const KN_<R> & a)
+{ return if_KN_<R>(b,a);}
+
+
+template<class R>
+R operator*(const TKN_<R> &a,const KN_<R> &b)
+{ return (a,b);}
+
+template<class R>
+class KNMK_: public KN_<R> {
+ friend class KNMK<R>;
+ public:
+ ShapeOfArray shapei;
+ ShapeOfArray shapej;
+ ShapeOfArray shapek;
+ public:
+ long IsVector1() const { return (shapei.n*shapej.n*shapek.n) == this->n ;}
+ long N() const {return shapei.n;}
+ long M() const {return shapej.n;}
+ long K() const {return shapek.n;}
+ long size() const { return shapei.n*shapej.n*shapek.n;}
+ KNMK_(const ShapeOfArray & s,
+ const ShapeOfArray & si,
+ const ShapeOfArray & sj,
+ const ShapeOfArray & sk,
+ R * u)
+ : KN_<R>(u,s),shapei(si),shapej(sj),shapek(sk){}
+
+ KNMK_(R* u,long n,long m,long k)
+ : KN_<R>(u, ShapeOfArray(n*m*k)),shapei(n,1,n),shapej(m,n,1),shapek(k,n*m,n*m){};
+
+// KNMK_(const KN_<R> & u,long n,long m,long k)
+// : KN_<R>(ShapeOfArray(n*m*k)),shapei(n,1,n),shapekj(m,n,1),u),
+// shapek(k,n*m,n*m){};
+
+ KNMK_(const KNMK_<R> &U,const SubArray & si,const SubArray & sj,const SubArray & sk) :
+ KN_<R>(U,SubArray(U.ijk(si.len1(),sj.len1(),sk.len1())+1,
+ U.ijk(si.start,sj.start,sk.start))),
+ shapei(U.shapei,si),
+ shapej(U.shapej,sj),
+ shapek(U.shapek,sk){}
+
+ KNMK_(const KNMK_<R> & u) :KN_<R>(u),shapei(u.shapei),shapej(u.shapej),shapek(u.shapek) {}
+
+
+ long ijk(long i,long j,long k) const
+ { return shapei.index(i)+shapej.index(j)+shapek.index(k);}
+ long indexijk(long i,long j,long k) const
+ {return this->index(shapei.index(i)+shapej.index(j)+shapek.index(k));}
+
+ R & operator()(long i,long j,long k) const {return this->v[indexijk(i,j,k)];}
+ R & operator()(int i,int j,int k) const {return this->v[indexijk(i,j,k)];}
+
+// pas de tableau suivant
+ KN_<R> operator()(const char ,long j,long k) const { // le tableau (.,j,k)
+ return KN_<R>(*this,-1,shapei,shapej[j]+shapek[k]);}
+ KN_<R> operator()(long i,const char ,long k) const { // le tableau (i,.,k)
+ return KN_<R>(*this,-1,shapej,shapei[i]+shapek[k]);}
+ KN_<R> operator()(long i,long j,const char ) const { // le tableau (i,j,.)
+ return KN_<R>(*this,-1,shapek,shapei[i]+shapej[j]);}
+
+ KN_<R> operator()(const char ,int j,int k) const { // le tableau (.,j,k)
+ return KN_<R>(*this,-1,shapei,shapej[j]+shapek[k]);}
+ KN_<R> operator()(int i,const char ,int k) const { // le tableau (i,.,k)
+ return KN_<R>(*this,-1,shapej,shapei[i]+shapek[k]);}
+ KN_<R> operator()(int i,int j,const char ) const { // le tableau (i,j,.)
+ return KN_<R>(*this,-1,shapek,shapei[i]+shapej[j]);}
+//
+ KNM_<R> operator()(const char ,const char ,long k) const { // le tableau (.,.,k)
+ return KNM_<R>(*this,shapei,shapej,shapek[k],shapek.next);} // step = n*m
+ //attention les suivants ne marche pas
+ KNM_<R> operator()(const char ,long j,const char ) const { // le tableau (.,j,.)
+ return KNM_<R>(*this,shapei,shapek,shapej[j],-1/*shapej.next*/);} // step = n
+
+ KNM_<R> operator()(long i,const char ,const char ) const { // le tableau (i,.,.)
+ return KNM_<R>(*this,shapej,shapek,shapei[i],-1/*shapei.next*/);} // step = 1
+
+ KNM_<R> operator()(const char ,const char ,int k) const { // le tableau (.,.,k)
+ return KNM_<R>(*this,shapei,shapej,shapek[k],shapek.next);} // step = n*m
+ //attention les suivants ne marche pas
+ KNM_<R> operator()(const char ,int j,const char ) const { // le tableau (.,j,.)
+ return KNM_<R>(*this,shapei,shapek,shapej[j],-1/*shapej.next*/);} // step = n
+
+ KNM_<R> operator()(int i,const char ,const char ) const { // le tableau (i,.,.)
+ return KNM_<R>(*this,shapej,shapek,shapei[i],-1/*shapei.next*/);} // step = 1
+
+ KNMK_& operator =(const KNMK_<const_R> & u) ;
+ KNMK_& operator+=(const KNMK_<const_R> & u) ;
+ KNMK_& operator-=(const KNMK_<const_R> & u) ;
+ KNMK_& operator/=(const KNMK_<const_R> & u) ;
+ KNMK_& operator*=(const KNMK_<const_R> & u) ;
+ KNMK_& operator =(const_R a) ;
+ KNMK_& operator+=(const_R a) ;
+ KNMK_& operator-=(const_R a) ;
+ KNMK_& operator/=(const_R a) ;
+ KNMK_& operator*=(const_R a) ;
+
+ KNMK_ operator()(SubArray si,SubArray sj,SubArray sk) const
+ {return KNMK_(*this,si,sj,sk);}
+
+ private:
+// KNMK_& operator++(){v += next;return *this;} // ++U
+// KNMK_& operator--(){v -= next;return *this;} // --U
+// KNMK_ operator++(long ){KNMK_ old=*this;v = v +next;return old;} // U++
+// KNMK_ operator--(long ){KNMK_ old=*this;v = v -next;return old;} // U--
+
+
+friend class KNM_<R>;
+friend class KN_<R>;
+
+};
+
+
+
+template<class R>
+class KN :public KN_<R> { public:
+
+ typedef R K;
+
+ // explicit KN(const R & u):KN_<R>(new R(uu),1,0) {}
+ KN() : KN_<R>(0,0) {}
+ KN(long nn) : KN_<R>(new R[nn],nn) {}
+ KN(long nn, R * p) : KN_<R>(new R[nn],nn)
+ { KN_<R>::operator=(KN_<R>(p,nn));}
+ KN(long nn,R (*f)(long i) ) : KN_<R>(new R[nn],nn)
+ {for(long i=0;i<this->n;i++) this->v[i]=f(i);}
+ KN(long nn,const R & a) : KN_<R>(new R[nn],nn)
+ { KN_<R>::operator=(a);}
+ KN(long nn,long s,const R a) : KN_<R>(new R[nn],nn,s)
+ { KN_<R>::operator=(a);}
+ template<class S> KN(const KN_<S> & s):KN_<R>(new R[s.n],s.n)
+ {for (long i=0;i<this->n;i++) this->v[i] = s[i];}
+ template<class S> KN(const KN_<S> & s,R (*f)(S )):KN_<R>(new R[s.n],s.n)
+ {for (long i=0;i<this->n;i++) this->v[i] = f(s[i]);}
+ KN(const KN<R> & u):KN_<R>(new R[u.n],u.n)
+ { KN_<R>::operator=(u);}
+ KN(bool ,KN<R> & u):KN_<R>(u) {u.v=0;u.n=0;}// remove copy for return of local KN.
+
+ // explicit KN(const KN_<R> & u):KN_<R>(new R[u.n],u.n)
+ // { KN_<R>::operator=(u);}
+
+ ~KN(){delete [] this->v;}
+
+ void CheckSet() { if(!(this->n)) {cerr << "Error RNM set array\n";K_throwassert(0); exit(1);}}
+ KN& operator = (R* a) { CheckSet(); return operator =(KN_<R>(a,this->n));}
+ KN& operator += (R* a) { CheckSet(); return operator+=(KN_<R>(a,this->n));}
+ KN& operator -= (R* a) { CheckSet(); return operator-=(KN_<R>(a,this->n));}
+ KN& operator *= (R* a) { CheckSet(); return operator*=(KN_<R>(a,this->n));}
+ KN& operator /= (R* a) { CheckSet(); return operator/=(KN_<R>(a,this->n));}
+
+ KN& operator =(const SetArray<R> & u)
+ { if(this->unset()) this->set(new R[u.size()],u.size(),0,0); KN_<R>::operator= (u);return *this;}
+ KN& operator +=(const SetArray<R> & u)
+ { if(this->unset()) this->set(new R[u.size()],u.size(),0,0); KN_<R>::operator+= (u);return *this;}
+ KN& operator -=(const SetArray<R> & u)
+ { if(this->unset()) this->set(new R[u.size()],u.size(),0,0); KN_<R>::operator-= (u);return *this;}
+ KN& operator *=(const SetArray<R> & u)
+ { if(this->unset()) this->set(new R[u.size()],u.size(),0,0); KN_<R>::operator*= (u);return *this;}
+ KN& operator /=(const SetArray<R> & u)
+ { if(this->unset()) this->set(new R[u.size()],u.size(),0,0); KN_<R>::operator/= (u);return *this;}
+
+ KN& operator =(const_R a)
+ { if(this->unset()) this->set(new R[1],1,0,0); KN_<R>::operator= (a);return *this;}
+ KN& operator =(const KN_<R>& a)
+ { if(this->unset()) this->set(new R[a.N()],a.N()); KN_<R>::operator= (a);return *this;}
+ KN& operator =(const KN<R>& a)
+ { if(this->unset()) this->set(new R[a.N()],a.N()); KN_<R>::operator= (a);return *this;}
+ KN& operator =(const Add_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const DotStar_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const if_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const ifnot_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const DotSlash_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const Sub_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const Mulc_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const Divc_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const Add_Mulc_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+ KN& operator =(const if_arth_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.a.N()],u.a.N());KN_<R>::operator=(u);return *this;}
+
+
+ KN& operator =(const Mul_KNM_KN_<R> & u)
+ { if(this->unset()) this->set(new R[u.b.N()],u.b.N());KN_<R>::operator=(u);return *this;}
+// KN& operator =(const MatriceCreuseMulKN_<R> & Ax)
+// {if(this->unset()) set(new R[Ax.v.N()],Ax.v.N()); KN_<R>::operator=(Ax);return *this;}
+// KN& operator +=(const MatriceCreuseMulKN_<R> & Ax)
+// {if(this->unset()) set(new R[Ax.v.N()],Ax.v.N()); KN_<R>::operator+=(Ax);return *this;}
+// KN& operator =(const MatriceCreuseDivKN_<R> & A1x)
+// { if(this->unset()) set(new R[A1x.v.N()],A1x.v.N());KN_<R>::operator=(A1x);return *this;}
+ // correcton aout 2007 FH add N,M flied in VirtualMatrice
+ KN& operator =(const typename VirtualMatrice<R>::plusAx & Ax)
+ { if(this->unset() && Ax.A->N ) this->set(new R[Ax.A->N],Ax.A->N);KN_<R>::operator=(Ax);return *this;}
+ KN& operator =(const typename VirtualMatrice<R>::solveAxeqb & Ab)
+ { if(this->unset()) this->set(new R[Ab.b.N()],Ab.b.N());KN_<R>::operator=(Ab);return *this;}
+ KN& operator +=(const typename VirtualMatrice<R>::plusAx & Ax)
+ { if(this->unset() && Ax.A->N) {
+ this->set(new R[Ax.A->N],Ax.A->N);
+ KN_<R>::operator=(R());}
+ KN_<R>::operator+=(Ax);
+ return *this;}
+ KN& operator =(const typename VirtualMatrice<R>::plusAtx & Ax)
+ { if(this->unset()&&Ax.A->M) this->set(new R[Ax.A->M],Ax.A->M);KN_<R>::operator=(Ax);return *this;}
+ KN& operator +=(const typename VirtualMatrice<R>::plusAtx & Ax)
+ { if(this->unset()&&Ax.A->M) {
+ this->set(new R[Ax.A->M],Ax.A->M);
+ KN_<R>::operator=(R());}
+ KN_<R>::operator+=(Ax);
+ return *this;}
+// end correcton FH
+ template<class P,class Q>
+ KN& operator =(const PplusQ<P,Q> & PQ)
+ { *this=PQ.p; *this+=PQ.q;return *this; }
+ template<class P,class Q>
+ KN& operator +=(const PplusQ<P,Q> & PQ)
+ { *this+=PQ.p; *this+=PQ.q;return *this; }
+
+ KN& operator -=(const_R a)
+ { KN_<R>::operator-=(a);return *this;}
+ KN& operator -=(const KN_<R>& a)
+ { KN_<R>::operator-= (a);return *this;}
+ KN& operator -=(const Add_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+ KN& operator -=(const DotStar_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+ KN& operator -=(const DotSlash_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+ KN& operator -=(const Sub_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+ KN& operator -=(const Mulc_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+ KN& operator -=(const Divc_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+ KN& operator -=(const Add_Mulc_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+ KN& operator -=(const if_arth_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+ KN& operator -=(const Mul_KNM_KN_<R> & u)
+ { KN_<R>::operator-=(u);return *this;}
+
+ KN& operator +=(const_R a)
+ { KN_<R>::operator += (a);return *this;}
+ KN& operator += (const KN_<R>& a)
+ { KN_<R>::operator+= (a);return *this;}
+ KN& operator +=(const Add_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+ KN& operator +=(const DotStar_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+ KN& operator +=(const DotSlash_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+ KN& operator +=(const Sub_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+ KN& operator +=(const Mulc_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+ KN& operator +=(const Divc_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+ KN& operator +=(const Add_Mulc_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+ KN& operator +=(const if_arth_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+ KN& operator +=(const Mul_KNM_KN_<R> & u)
+ { KN_<R>::operator+=(u);return *this;}
+
+
+ KN& operator/=(const_R a)
+ { KN_<R>::operator/=(a);return *this;}
+ KN& operator /= (const KN_<R>& a)
+ { KN_<R>::operator/= (a);return *this;}
+ KN& operator /=(const Add_KN_<R> & u)
+ { KN_<R>::operator/=(u);return *this;}
+ KN& operator /=(const Sub_KN_<R> & u)
+ { KN_<R>::operator/=(u);return *this;}
+ KN& operator /=(const Mulc_KN_<R> & u)
+ { KN_<R>::operator/=(u);return *this;}
+ KN& operator /=(const Divc_KN_<R> & u)
+ { KN_<R>::operator/=(u);return *this;}
+
+ KN& operator /=(const Add_Mulc_KN_<R> & u)
+ { KN_<R>::operator/=(u);return *this;}
+ KN& operator /=(const if_arth_KN_<R> & u)
+ { KN_<R>::operator/=(u);return *this;}
+
+ KN& operator /=(const Mul_KNM_KN_<R> & u)
+ { KN_<R>::operator/=(u);return *this;}
+
+ KN& operator*=(const_R a)
+ { KN_<R>::operator*=(a);return *this;}
+ KN& operator*=(const KN_<const_R>& a)
+ { KN_<R>::operator*= (a);return *this;}
+ KN& operator *=(const Add_KN_<R> & u)
+ { KN_<R>::operator*=(u);return *this;}
+ KN& operator *=(const Sub_KN_<R> & u)
+ { KN_<R>::operator*=(u);return *this;}
+ KN& operator *=(const Mulc_KN_<R> & u)
+ { KN_<R>::operator*=(u);return *this;}
+ KN& operator *=(const Divc_KN_<R> & u)
+ { KN_<R>::operator*=(u);return *this;}
+ KN& operator *=(const Add_Mulc_KN_<R> & u)
+ { KN_<R>::operator*=(u);return *this;}
+ KN& operator *=(const if_arth_KN_<R> & u)
+ { KN_<R>::operator*=(u);return *this;}
+ KN& operator *=(const Mul_KNM_KN_<R> & u)
+ { KN_<R>::operator*=(u);return *this;}
+
+
+ template<class I,class T> KN& operator = (const KN_ITAB<T ,I> & ui)
+ { KN_<R>::operator =(ui); return *this;}
+ template<class I,class T> KN& operator += (const KN_ITAB<T ,I> & ui)
+ { KN_<R>::operator +=(ui); return *this;}
+ template<class I,class T> KN& operator -= (const KN_ITAB<T ,I> & ui)
+ { KN_<R>::operator -=(ui); return *this;}
+ template<class I,class T> KN& operator *= (const KN_ITAB<T ,I> & ui)
+ { KN_<R>::operator *=(ui); return *this;}
+ template<class I,class T> KN& operator /= (const KN_ITAB<T ,I> & ui)
+ { KN_<R>::operator /=(ui); return *this;}
+
+
+ // two opertor to cast to an array of constant
+// operator KN_<const_R> & ()
+// { return * (KN_<const_R>*) this;}
+// operator KN_<const_R> const & () const
+// { return *(const KN_<const_R>*) this;}
+// operator KN<const_R> & ()
+// { return (KN<const_R> &) *this;}
+// operator KN<const_R> const & () const
+// { return (const KN<const_R>& ) *this;}
+ static void fill0(R *v,int n) { if(n && v) for(int i=0;i<n;++i) v[i]=R();}
+ void init(long nn) {this->n=nn;this->step=1;this->next=-1;this->v=new R[nn];fill0(this->v,this->n) ;}
+ void init() {this->n=0;this->step=1;this->next=-1;this->v=0;}
+ void init(const KN_<R> & a){init(a.N()); operator=(a);}
+ void resize(long nn) {
+ if ( nn != this->n)
+ {
+ R *vo=this->v;
+ long no=std::min(this->n,nn), so=this->step;
+ ShapeOfArray::init(nn);
+ this->v=new R[this->n];
+ // copy
+ if(this->v && vo)
+ for(long i=0,j=0;j<no;i++,j+=so)
+ this->v[i]=vo[j];
+ delete [] vo;} }// mars 2010
++<<<<<<< HEAD
+ void destroy(){/*assert(this->next<0);*/ if(this->next++ ==-1) {delete [] this->v; this->v=0;this->n=0;}}// mars 2010
+ void increment() {/*assert(this->next<0);*/ this->next--;}
++=======
++ void destroy(){assert(this->next<0); if(this->next++ ==-1) {delete [] this->v; this->v=0;this->n=0;}}// mars 2010
++ void increment() {assert(this->next<0); this->next--;}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+};
+
+// Array with 2 indices
+// ---------------------
+
+template<class R>
+class KNM: public KNM_<R>{ public:
+ KNM() :KNM_<R>(0,0,0){}
+ KNM(long nn,long mm)
+ :KNM_<R>(new R[nn*mm],nn,mm){}
+ KNM(const KNM<R> & u) // PB si stepi ou stepj nulle
+ :KNM_<R>(new R[u.size()],u.N(),u.M())
+ { KN_<R>::operator=(u);}
+ explicit KNM(const KNM_<R> & u)
+ :KNM_<R>(new R[u.size()],u.N(),u.M())
+ { KNM_<R>::operator=(u);}
+
+ ~KNM(){delete [] this->v;}
+
+ KNM& operator=(const KNM_<const_R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ; KNM_<R>::operator=(u);return *this;}
+ KNM& operator=(const_R a)
+ { if(this->unset()) RNM_FATAL_ERROR(" KNM operator=(double)"); KNM_<R>::operator=(a);return *this;}
+ KNM& operator+=(const_R a)
+ { if(this->unset()) RNM_FATAL_ERROR(" KNM operator+=(double)"); KNM_<R>::operator+=(a);return *this;}
+ KNM& operator-=(const_R a)
+ {if(this->unset()) RNM_FATAL_ERROR(" KNM operator-=(double)"); KNM_<R>::operator-=(a);return *this;}
+ KNM& operator/=(const_R a)
+ {if(this->unset()) RNM_FATAL_ERROR(" KNM operator/=(double)"); KNM_<R>::operator/=(a);return *this;}
+ KNM& operator*=(const_R a)
+ {if(this->unset()) RNM_FATAL_ERROR(" KNM operator*=(double)"); KNM_<R>::operator*=(a);return *this;}
+ KNM& operator+=(const KNM_<const_R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ; KNM_<R>::operator+=(u);return *this;}
+ KNM& operator-=(const KNM_<const_R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator-=(u);return *this;}
+
+ KNM& operator/=(const KNM_<const_R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator/=(u);return *this;}
+ KNM& operator*=(const KNM_<const_R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ; KNM_<R>::operator*=(u);return *this;}
+
+
+ KNM &operator =(const outProduct_KN_<R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ; KNM_<R>::operator =(u);return *this;}
+ KNM &operator +=(const outProduct_KN_<R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ; KNM_<R>::operator+=(u);return *this;}
+ KNM &operator -=(const outProduct_KN_<R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ; KNM_<R>::operator-=(u);return *this;}
+ KNM &operator /=(const outProduct_KN_<R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator/=(u);return *this;}
+ KNM &operator *=(const outProduct_KN_<R> & u)
+ { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator*=(u);return *this;}
+
+
+ KNM &operator =(const ConjKNM_<R> &u) { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator=(u);return *this;}
+ KNM &operator +=(const ConjKNM_<R> &u) { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator+=(u);return *this;}
+ KNM &operator -=(const ConjKNM_<R> &u) { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator-=(u);return *this;}
+ KNM &operator /=(const ConjKNM_<R> &u) { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator/=(u);return *this;}
+ KNM &operator *=(const ConjKNM_<R> &u) { if(this->unset()) this->init(u.N(),u.M()) ;KNM_<R>::operator*=(u);return *this;}
+ // bofbof
+
+
+ // two opertors to cast to un array of constant
+// operator KNM_<const_R> & ()
+// { return * (KNM_<const_R>*) this;}
+// operator KNM_<const_R> const & () const
+// { return *(const KNM_<const_R>*) this;}
+
+// operator KNM<const_R> & ()
+// { return * (KNM<const_R>*) this;}
+// operator KNM<const_R> const & () const
+// { return *(const KNM<const_R>*) this;}
+
+ void init() { // add mars 2010 ...
+ this->n=0;this->step=1;this->next=-1;this->v=0;
+ this->shapei.init(0);
+ this->shapej.init(0);}
+
+ void init(long nn,long mm) {
+ ShapeOfArray::init(nn*mm);
+ this->shapei.init(nn,1,nn);
+ this->shapej.init(mm,nn,1),
+ this->v=new R[nn*mm];}
+
+ void resize(long nn,long mm) {
+ long kk=nn*mm;
+
+ long lso = this->size();
+ long n = this->shapei.n;
+ long m = this->shapej.n;
+
+ if( (n !=nn) || ( m != mm)) // correct FH Jav 2012 ..
+ {
+ KNM_ <R> old(*this);
+ long no=std::min(n,nn);
+ long mo=std::min(m,mm);
+ R *vo=this->v;
+
+ // new mat
+ ShapeOfArray::init(kk);
+ this->v=new R[this->n];
+ this->shapei.init(nn,1,nn);
+ this->shapej.init(mm,nn,1);
+
+ if(this->v && vo) // copy
+ (*this)(SubArray(no),SubArray(mo)) = old(SubArray(no),SubArray(mo));
+
+ delete []vo;
+ }
+
+ }
+ void destroy(){assert(this->next<0); if(this->next++ ==-1) {delete [] this->v; this->v=0;this->n=0;}}
+ void increment() {assert(this->next<0); this->next--;}
+
+// void destroy(){delete [] this->v;this->n=0 ;}
+
+};
+
+// Array with 3 indices
+// ---------------------
+template<class R>
+class KNMK: public KNMK_<R>{ public:
+
+ KNMK(long n,long m,long k)
+ :KNMK_<R>(new R[n*m*k],n,m,k){}
+ explicit KNMK(const KNMK_<R> & u)
+ :KNMK_<R>(new R[u.size()],u.N(),u.M(),u.K())
+ { KNMK_<R>::operator=(u);}
+ KNMK(const KNMK<R> & u)
+ :KNMK_<R>(new R[u.size()],u.N(),u.M(),u.K())
+ { KNMK_<R>::operator=(u);}
+
+ ~KNMK(){delete [] this->v;}
+
+ KNMK& operator=(const KNMK_<const_R> & u)
+ { KNMK_<R>::operator=(u);return *this;}
+ KNMK& operator=(const_R a)
+ { KNMK_<R>::operator=(a);return *this;}
+ KNMK& operator+=(const_R a)
+ { KNMK_<R>::operator+=(a);return *this;}
+ KNMK& operator-=(const_R a)
+ { KNMK_<R>::operator-=(a);return *this;}
+ KNMK& operator/=(const_R a)
+ { KNMK_<R>::operator/=(a);return *this;}
+ KNMK& operator*=(const_R a)
+ { KNMK_<R>::operator*=(a);return *this;}
+ KNMK& operator+=(const KNMK_<const_R> & u)
+ { KNMK_<R>::operator+=(u);return *this;}
+ // ici jd
+ KNMK& operator-=(const KNMK_<const_R> & u)
+ { KNMK_<R>::operator-=(u);return *this;}
+ KNMK& operator*=(const KNMK_<const_R> & u)
+ { KNMK_<R>::operator*=(u);return *this;}
+ KNMK& operator/=(const KNMK_<const_R> & u)
+ { KNMK_<R>::operator/=(u);return *this;}
+
+// two opertor to cast to un array of constant
+// operator KNMK_<const_R> & ()
+// { return * (KNMK_<const_R>*) this;}
+// operator KNMK_<const_R> const & () const
+// { return *(const KNMK_<const_R>*) this;}
+
+// operator KNMK<const_R> & ()
+// { return * (KNMK<const_R>*) this;}
+// operator KNMK<const_R> const & () const
+// { return *(const KNMK<const_R>*) this;}
+};
+
+// ------------- optimization ---------------------
+template<class R>
+class conj_KN_{public:
+ const KN_<const_R> & a;
+ conj_KN_(const KN_<const_R> & aa) : a(aa){}
+};
+
+
+inline const KN_<long> conj(const KN_<long> &a){ return a;}
+inline const KN_<double> conj(const KN_<double> &a){ return a;}
+inline const KN_<float> conj(const KN_<float> &a){ return a;}
+
+//template<class R> conj_KN_<R> conj(const KN<R> &a){ return a;}
+template<class R> conj_KN_<R> conj(const KN_<R> &a){ return a;}
+
+template<class R>
+class DotStar_KN_{public:
+ const KN_<const_R> a; const KN_<const_R> b;
+ DotStar_KN_(const KN_<const_R> & aa,const KN_<const_R> & bb) : a(aa),b(bb) {}
+ };
+
+
+template<class R>
+class DotSlash_KN_{public:
+ const KN_<const_R> a; const KN_<const_R> b;
+ DotSlash_KN_(const KN_<const_R> & aa,const KN_<const_R> & bb) : a(aa),b(bb) {}
+ };
+
+template<class R>
+class Add_KN_{public:
+ const KN_<const_R> a; const KN_<const_R> b;
+ Add_KN_(const KN_<const_R> & aa,const KN_<const_R> & bb)
+ : a(aa),b(bb) { K_throwassert(SameShape(a,b));}
+ };
+
+template<class R>
+class Sub_KN_{public:
+ const KN_<const_R> a; const KN_<const_R> b;
+ Sub_KN_(const KN_<const_R> & aa,const KN_<const_R> & bb)
+ : a(aa),b(bb) { K_throwassert(SameShape(a,b));}
+ };
+
+template<class R>
+class Mulc_KN_ { public:
+ const KN_<const_R> a; const_R b;
+ Mulc_KN_(const KN_<const_R> & aa,const_R bb) : a(aa),b(bb) {}
+ Mulc_KN_(const Mulc_KN_<R> & aa,const_R bb) : a(aa.a),b(aa.b*bb) {}
+ Mulc_KN_ operator-() const {return Mulc_KN_(a,-b);}
+ outProduct_KN_<R> operator*(const TKN_<double> & bb)
+{ return outProduct_KN_<R>(a,bb,b);}
+
+ };
+template<class R>
+class Divc_KN_ {
+ // // vector b/a_i ..
+public:
+ const KN_<const_R> a; const_R b;
+ Divc_KN_(const_R bb,const KN_<const_R> & aa) : a(aa),b(bb) {}
+ // Divc_KN_(const Divc_KN_<R> & aa,const_R bb) : a(aa.a),b(aa.b*bb) {}
+ Divc_KN_ operator-() const {return Divc_KN_(a,-b);}
+};
+
+template<class R>
+class Add_Mulc_KN_ { public:
+ const KN_<const_R> a,b;
+ const R ca,cb;
+ Add_Mulc_KN_(const Mulc_KN_<R> & aa,const Mulc_KN_<R> & bb)
+ : a(aa.a),b(bb.a),ca(aa.b),cb(bb.b) { K_throwassert(SameShape(a,b));}
+ Add_Mulc_KN_(const Mulc_KN_<R> & aa,const KN_<const_R> & bb,const R cbb)
+ : a(aa.a),b(bb),ca(aa.b),cb(cbb) { K_throwassert(SameShape(a,b));}
+ Add_Mulc_KN_(const KN_<const_R> & aa,const R caa,const KN_<const_R> & bb,const R cbb)
+ : a(aa),b(bb),ca(caa),cb(cbb) { K_throwassert(SameShape(a,b));}
+ };
+
+template<class R>
+class if_arth_KN_ { public:
+ const KN_<const_R> a,b,c;
+ if_arth_KN_(const KN_<R> & aa,const KN_<R> & bb,const KN_<R> & cc)
+ : a(aa),b(bb),c(cc){ K_throwassert(SameShape(a,b)&&SameShape(a,c));}
+ };
+
+
+
+template<class R>
+class Mul_KNM_KN_ { public:
+ const KNM_<const_R> &A;
+ const KN_<const_R> &b;
+ Mul_KNM_KN_(const KNM_<const_R> &aa,const KN_<const_R> &bb)
+ : A(aa),b(bb) {K_throwassert(SameShape(A.shapej,b));}
+};
+
+
+ostream & operator<<(ostream & f,const ShapeOfArray & s);
+
+template<class R> ostream & operator<<(ostream & f,const KN_<const_R> & v);
+template<class R> ostream & operator<<(ostream & f,const KNM_<const_R> & v);
+template<class R> ostream & operator<<(ostream & f,const KNMK_<const_R> & v);
+template<class R> inline ostream & operator<<(ostream & f,const KN<const_R> & v)
+ { return f << (const KN_<const_R> &) v;}
+template<class R> inline ostream & operator<<(ostream & f,const KNM<const_R> & v)
+ { return f << (const KNM_<const_R> &) v;}
+template<class R> inline ostream & operator<<(ostream & f,const KNMK<const_R> & v)
+ { return f << (const KNMK_<const_R> &) v;}
+
+
+template<class R> inline Add_KN_<R> operator+(const KN_<const_R> &a,const KN_<const_R> &b)
+ { return Add_KN_<R>(a,b);}
+template<class R> inline Sub_KN_<R> operator-(const KN_<const_R> &a,const KN_<const_R> &b)
+ { return Sub_KN_<R>(a,b);}
+template<class R> inline Mulc_KN_<R> operator*(const KN_<const_R> &a,const R &b)
+ { return Mulc_KN_<R>(a,b);}
+template<class R> inline Mulc_KN_<R> operator/(const KN_<const_R> &a,const R &b)
+ { return Mulc_KN_<R>(a,R(1)/b);}
+template<class R> inline Mulc_KN_<R> operator*(const R &b,const KN_<const_R> &a)
+ { return Mulc_KN_<R>(a,b);}
+template<class R> inline Divc_KN_<R> operator/(const R &b,const KN_<const_R> &a)
+{ return Divc_KN_<R>(b,a);}
+template<class R> inline Mulc_KN_<R> operator-(const KN_<const_R> &a)
+ { return Mulc_KN_<R>(a,R(-1));}
+
+
+
+template<class R> inline Add_Mulc_KN_<R> operator+(const Mulc_KN_<R>& a,const Mulc_KN_<R> &b)
+ { return Add_Mulc_KN_<R>(a,b);}
+template<class R> inline Add_Mulc_KN_<R> operator-(const Mulc_KN_<R>& a,const Mulc_KN_<R> &b)
+ { return Add_Mulc_KN_<R>(a,b.a,-b.b);}
+
+template<class R> inline Add_Mulc_KN_<R> operator+(const Mulc_KN_<R>& a,const KN_<const_R> &b)
+ { return Add_Mulc_KN_<R>(a,b,R(1));}
+template<class R> inline Add_Mulc_KN_<R> operator-(const Mulc_KN_<R>& a,const KN_<const_R> &b)
+ { return Add_Mulc_KN_<R>(a,b,R(-1));}
+
+template<class R> inline Add_Mulc_KN_<R> operator+(const KN_<const_R> & b,const Mulc_KN_<R>& a)
+ { return Add_Mulc_KN_<R>(a,b,R(1));}
+
+// modif FH mars 2007
+template<class R> inline Add_Mulc_KN_<R> operator-(const KN_<const_R> & a,const Mulc_KN_<R>& b)
+ { return Add_Mulc_KN_<R>(a,R(1),b.a,-b.b);}// modif FH mars 2007
+
+template<class R> inline Mul_KNM_KN_<R> operator*(const KNM_<const_R> & A,const KN_<const_R> & b)
+ { return Mul_KNM_KN_<R>(A,b);}
+
+
+template<class R> inline bool SameShape(const ShapeOfArray & a,const Add_Mulc_KN_<R> & b)
+ { return SameShape(a,b.a) ;}
+template<class R> inline bool SameShape(const ShapeOfArray & a,const if_arth_KN_<R> & b)
+ { return SameShape(a,b.a) ;}
+template<class R> inline bool SameShape(const ShapeOfArray & a,const Add_KN_<R> & b)
+ { return SameShape(a,b.a) ;}
+template<class R> inline bool SameShape(const ShapeOfArray & a,const Sub_KN_<R> & b)
+ { return SameShape(a,b.a) ;}
+template<class R> inline bool SameShape(const ShapeOfArray & a,const Mulc_KN_<R> & b)
+ { return SameShape(a,b.a) ;}
+template<class R> inline bool SameShape(const ShapeOfArray & a,const Divc_KN_<R> & b)
+{ return SameShape(a,b.a) ;}
+
+template<class R> inline bool SameShape(const ShapeOfArray & a,const DotStar_KN_<R> & b)
+ { return SameShape(a,b.a) ;}
+template<class R> inline bool SameShape(const ShapeOfArray & a,const DotSlash_KN_<R> & b)
+ { return SameShape(a,b.a) ;}
+template<class R> inline bool SameShape(const ShapeOfArray & a,const Mul_KNM_KN_<R> & b)
+ { return a.n==b.A.N() ;}
+ inline bool SameShape(const ShapeOfArray & ,const VirtualMatrice<double>::plusAx & )
+ { return true ;} // pas de test car la matrice peut etre rectangulaire
+ inline bool SameShape(const ShapeOfArray & ,const VirtualMatrice<double>::plusAtx & )
+ { return true ;} // pas de test car la matrice peut etre rectangulaire
+ inline bool SameShape(const ShapeOfArray & ,const VirtualMatrice<complex<double> >::plusAx & )
+ { return true ;} // pas de test car la matrice peut etre rectangulaire
+ inline bool SameShape(const ShapeOfArray & ,const VirtualMatrice<complex<double> >::plusAtx & )
+ { return true ;} // pas de test car la matrice peut etre rectangulaire
+
+ inline bool SameShape(const ShapeOfArray & ,const double)
+ { return true;}
+ inline bool SameShape(const ShapeOfArray & ,const complex<double>)
+ { return true;}
+ inline bool SameShape(const ShapeOfArray & ,const complex<float>)
+ { return true;}
+
+template<class R>
+ inline bool SameShape(KNM<R>& m, const outProduct_KN_<R>& p)
+ { return p.a.N()>=m.N() && m.M()>=p.b.N(); }
+
+template<class R> inline long SameAdress(const KN_<R> &a, const KN_<R> &b) { return &a[0]==&b[0];}
+// bof -bof
+//template<class R> inline
+// KN_<R>::operator KN<R> &() { return *(KN<R> *) (void *) this;}
+//template<class R> inline
+// KN_<R>::operator const KN<R> &() const { return *(const KN<R> *) ( const void *) this;}
+
+// operateur y=Ax-b ou y=Ax + b pour le GC
+template<class R>
+ PplusQ< typename VirtualMatrice<R>::plusAx, Mulc_KN_<R> > operator-(const typename VirtualMatrice<R>::plusAx & A,const KN_<R> & B)
+ { return PplusQ< typename VirtualMatrice<R>::plusAx, Mulc_KN_<R> >(A,Mulc_KN_<R>(B,R(-1.)));}
+
+template<class R>
+ PplusQ< typename VirtualMatrice<R>::plusAx, KN_<R> > operator+(const typename VirtualMatrice<R>::plusAx & A,const KN_<R> & B)
+ { return PplusQ< typename VirtualMatrice<R>::plusAx, KN_<R> >(A,B);}
+
+template<class R>
+ PplusQ< typename VirtualMatrice<R>::plusAx, Mulc_KN_<R> > operator-(const typename VirtualMatrice<R>::plusAx & A,const KN<R> & B)
+ { return PplusQ< typename VirtualMatrice<R>::plusAx, Mulc_KN_<R> >(A,Mulc_KN_<R>(B,R(-1.)));}
+
+template<class R>
+ PplusQ< typename VirtualMatrice<R>::plusAx, KN_<R> > operator+(const typename VirtualMatrice<R>::plusAx & A,const KN<R> & B)
+ { return PplusQ< typename VirtualMatrice<R>::plusAx, KN_<R> >(A,B);}
+
+
+template<class R>
+KN_<R> diagonal(const KNM<R> & A) {
+ K_throwassert(A.N() == A.M());
+ return KN_<R>(A,SubArray(A.N(),0,A.N()+1));}
+
+// to def inv permutation FH mars 2006
+class Inv_KN_long{ public:
+ KN_<long> t;
+ Inv_KN_long(const KN_<long> & v)
+ : t(v) {}
+ Inv_KN_long( KN_<long> const * & v)
+ : t(*v) {}
+ operator const KN_<long> & () const {return t;}
+};
+
+// For sparce solve to set array to be consecutif (step==1) if neccessarly
+template<class R>
+class KN_2Ptr { public:
+ // transfo de KN_ peut etre non concecutif (a.step != 1) en
+ // un tableau concecutif en memoire si necessaire
+ // avec recopie du tableau dans le tableau d'origne a la destruction.
+ KN_<R> a;
+ const KN_<R> ca;
+ KN<R> c; // tableau copie si non vide
+ KN_2Ptr(KN_<R> & vv) : a(vv),ca(vv),c() { assert(a.N()); if (ca.step !=1 ) c=ca;} // copy if non consecutif
+ KN_2Ptr(const KN_<R> & vv) : a(0,0),ca(vv),c() { assert(ca.N()); if (ca.step !=1 ) c=ca; }// copy if non consecutif
+ operator R *() { return c.unset() ? (R *) ca:(R *) c ;}
+ operator const R *() const { return c.unset() ? (R *) ca:(R *) c ;}
+ ~KN_2Ptr() { if(!a.unset() && !c.unset() ) {a=c; } } // recopy
+};
+
+template<class R,typename A,typename B=R> class F_KN_
+{
+ public:
+ A (*f)(B);
+ KN_<R> a;
+ long N() const {return a.N();}
+ F_KN_( A (*ff)(B),const KN_<R> & aa): f(ff),a(aa) {}
+ A operator[](long i) const { return f(a[i]);}
+ bool check(long n) const { return n <= a.N() || a.constant(); }
+ bool constant() const {return a.constant();}
+};
+
+template<class R,typename A,typename B>
+inline bool SameShape(const ShapeOfArray & a,const F_KN_<R,A,B> & b)
+ { return !a.step || b.constant() || a.n == b.N() ;}
+
+#include "RNM_tpl.hpp"
+#ifdef K_throwassert
+#undef K_throwassert
+#endif
+#endif
diff --cc src/fflib/AFunction.cpp.orig
index 6e6d861,0000000..8e438b8
mode 100644,000000..100644
--- a/src/fflib/AFunction.cpp.orig
+++ b/src/fflib/AFunction.cpp.orig
@@@ -1,1964 -1,0 +1,1996 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+//#pragma dont_inline on
+//#pragma inline_depth(1)
+
+#include "config-wrapper.h"
+
++<<<<<<< HEAD
+#include <cmath>
+#include <complex>
+// put here some def dur to c++11
+// problem with mixed with using namespace std;
+// to correct bug in g++ v 4.8.1 add std
+long isNaN(double x){return isnan(x);}
+long isInf(double x){return isinf(x);}
+long isNormal(double x){return std::isnormal(x);}
+#ifdef HAVE_JN
+double myyn(long n, double x){ return yn((int)n,x);}
+double myjn(long n, double x){ return jn((int) n,x);}
+#endif
+//int ShowAlloc(const char *s, size_t lg);
+
+// F. Hecht fev. 2015 ...
++=======
++#include <complex>
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+#include "AFunction.hpp"
+#include <cstdarg>
+#include <cstring>
+#include "error.hpp"
+#include "lex.hpp"
+
+#include "RNM.hpp"
+
+#include "Operator.hpp"
+// for exec routine
+#include "rgraph.hpp"
+#include "InitFunct.hpp"
+#include <queue>
+
+#include "array_init.hpp"
+
+// Add FH to get memroy used in test .. march 2014
+#if __APPLE__
+#include <malloc/malloc.h>
+#elif HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_TIMES
+#include <time.h>
+#endif
+long storageused()
+{
+#if HAVE_MSTATS
+ struct mstats mem1;
+ mem1 = mstats();
+ return mem1.bytes_used;
+#elif HAVE_MALLINFO
+ struct mallinfo mem1;
+ mem1=mallinfo();
+ return mem1.uordblks;
+#else
+ return 0;
+#endif
+
+}
+long storagetotal()
+{
+#if HAVE_MSTATS
+ struct mstats mem1;
+ mem1 = mstats();
+ return mem1.bytes_total;
+#elif HAVE_MALLINFO
+ struct mallinfo mem1;
+ mem1=mallinfo();
+ return mem1.keepcost;
+#else
+ return 0;
+#endif
+}
+// end add mach 2014 ...
+extern Map_type_of_map map_type_of_map ; // to store te type
+extern Map_type_of_map map_pair_of_type ; // to store te type
+
+extern basicForEachType * typevarreal, * typevarcomplex; // type of real and complex variable
+
+extern int TheCurrentLine; // unset: by default
+extern long mpisize,mpirank;
+// FH for g++ 3.4 the prototypage have change
+double VersionNumber();
+double Imag(const complex<double> & z){ return imag(z);}
+double Real(const complex<double> & z){ return real(z);}
+const basicForEachType * basicForEachType::type_C_F0 =0; // for any type un formal operation .... FH add 09/2012
+
+// FH
+
+template<class T> inline T Max (const T &a,const T & b){return a > b ? a : b;}
+template<class T> inline T Min (const T &a,const T & b){return a < b ? a : b;}
+template<class T> inline T Abs (const T &a){return a <0 ? -a : a;}
+template<class T> inline T Max (const T &a,const T & b,const T & c){return Max(Max(a,b),c);}
+template<class T> inline T Min (const T &a,const T & b,const T & c){return Min(Min(a,b),c);}
+template<class T> inline T Square (const T &a){return a*a;}
+
+struct SubArray2: public binary_function<long,long,SubArray> {
+ static SubArray f(const long & a,const long & b) {
+ // cout << "SubArray: " << a << " " << b << endl;
+ return SubArray(b-a+1,a);} };
+struct SubArray3: public ternary_function<long,long,long,SubArray> {
+ static SubArray f(Stack s,const long & a,const long & b,const long & c) {
+ // cout << "SubArray: " << a << " " << b << " " << c << endl;
+ return SubArray((b-a+1)/c,a,c);} };
+
+#ifdef OLDCPP
+template<class T> inline
+complex<T> polar(const T& r, const T& theta)
+{
+ return complex<T>(r * cos(theta), r * sin(theta));
+}
+#endif
+
+
+double preal( Complex * const& p){return real(*p);}
+
+
+template<class A,class B> A Build(B b) { return A(b);}
+
+
+
+
+long Exit(long i) {throw(ErrorExit("Exit",i));return 0;}
+bool Assert(bool b) {if (!b) throw(ErrorExec("exec assert",1));return true;}
+
+inline void MyAssert(int i,char * ex,char * file,long line)
+{if (i) {
+ cout << "CompileError assertion : " << ex << " in file " << file << " line = " << line << endl;
+ CompileError();}
+ }
+
+
+/*
+template<class R>
+class OneOperator0 : public OneOperator {
+ class E_F0_F :public E_F0 { public:
+ typedef R (*func)( ) ;
+ func f;
+ E_F0_F(func ff) : f(ff) {}
+ AnyType operator()(Stack ) const {return SetAny<R>( f()) ;}
+ operator aType () const { return atype<R>();}
+
+};
+
+ // aType r; // return type
+ typedef R (*func)() ;
+ func f;
+ public:
+ E_F0 * code(const basicAC_F0 & ) const
+ { return new E_F0_F(f);}
+ OneOperator0(func ff): OneOperator(map_type[typeid(R).name()]),f(ff){}
+};
+*/
+template<class R>
+class OneOperatorConst : public OneOperator {
+ E_F0 * e;
+ public:
+ E_F0 * code(const basicAC_F0 & ) const { return e;}
+ OneOperatorConst(E_F0 * ee): OneOperator(map_type[typeid(R).name()]),e(ee){}
+};
+
+class OneOperator_array : public OneOperator {public:
+ E_F0 * code(const basicAC_F0 & a) const
+ { return new E_Array(a);}
+ OneOperator_array(): OneOperator(atype<E_Array>(),true) {}
+};
+class OneOperator_border : public OneOperator {public:
+ E_F0 * code(const basicAC_F0 & a) const
+ { if (a.size()==1 && a[0].left()==atype<E_Array>() )
+ return new E_Border(dynamic_cast<const E_Array*>(a[0].LeftValue()));
+ else
+ return new E_Border(a);}
+ OneOperator_border(): OneOperator(atype<const E_Border *>(),true) {}
+};
+
+class OneOperator_border_label : public OneOperator {public:
+ class Op : public E_F0 {public:
+ const E_Border *b;
+ Op( const E_Border *bb) : b(bb) {}
+ AnyType operator()(Stack) const { return SetAny<long>(b->label);}
+ };
+ E_F0 * code(const basicAC_F0 & a) const
+ { const E_Border * b = dynamic_cast<const E_Border *>(a[0].LeftValue());
+ return new Op(b);}
+ OneOperator_border_label(): OneOperator(atype<long>(),atype<const E_Border *>()) {}
+};
+
+
+
+template<class RR> RR LIncremantation(RR* a){ return ++(*a);}
+template<class RR> RR RIncremantation(RR* a){ return (*a)++;}
+template<class RR> RR LDecremantation(RR* a){ return --(*a);}
+template<class RR> RR RDecremantation(RR* a){ return (*a)--;}
+
+template<class RR,class B>
+ RR * New_form_string(string * s) {B * r= new B(s);delete s;return r;}// correct Mars 2011 remove * if delete
+
+
+
+
+inline string ** get_elements( MyMap<String,String> * const & a,string* const & b)
+ { String* Sret= &((*a)[*b]); // correction FH feb 2004
+ // delete b; la chaine est detruire automatiquement en fin d'instruction FH jan 2010
+ return Sret->getap();}
+
+template<class RR> RR Abs(RR a) { return a<0?-a:a;}
+
+template<class R,class A,class B>
+R *MakePtrWithDel( A const & a)
+{ R *r= new B(a->c_str());
+ delete a;
+ return r;}
+
+template<class R,class RR>
+struct Op1_new_pstring: public unary_function<string*,R> {
+ static R f(string * const & a) {R r = new RR(a->c_str());
+ // delete a; (stack ptr) FH mars 2006
+ return r;} };
+
+template<class R,class RR>
+struct Op2_set_pstring: public binary_function<R,string*,R> {
+ static R f(R const & p,string * const & a) {*p = new RR(a->c_str());
+ if ( !*p || !**p) {
+ cerr << " Error openning file " << *a << endl;
+ ExecError("Error openning file");}
+ // delete a; modif mars 2006 FH
+ return p;} };
+
+template<class R,class RR>
+struct Op2_set_pstringiomode: public ternary_function<R,string*,ios::openmode,R> {
+ static R f(Stack s,R const & p,string * const & a,const ios::openmode & mode)
+ {*p = new RR(a->c_str(),mode);
+ // delete a; modif mars 2006 FH
+ return p;} };
+
+AnyType FWhile(Stack s ,Expression test,Expression ins)
+{
+ bool sptrclean=true;
+ AnyType a;
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(s);
+ while ( GetAny<bool>((*test)(s)))
+ try {
+ a=(*ins)(s);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ catch ( E_exception & e) {
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ if (e.code == E_exception::e_break) break;
+ else if (e.code == E_exception::e_continue) continue;
+ else throw e;
+ }
+ return a;
+}
+
+AnyType FFor(Stack s ,Expression i0,Expression i1,Expression i2,Expression ins)
+{
+ bool sptrclean=true;
+ AnyType a;
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(s);
+ for ( (*i0)(s);GetAny<bool>((*i1)(s));(*i2)(s))
+ {
+ try {
+ a=(*ins)(s);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ catch ( E_exception & e) {
+ if (verbosity>50)
+ cerr << "FFor " << e.what() << e.code << endl;
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ if (e.code == E_exception::e_break) break;
+ else if (e.code == E_exception::e_continue) continue;
+ else throw e;
+ }
+ }
+ return a;
+}
+
+AnyType TTry(Stack s ,Expression ins,Expression ccatch,Expression fin,Expression notused)
+{
+ assert(notused == 0);
+ AnyType a;
+ try {a=(*ins)(s);}
+ catch ( E_exception & e) {
+ throw e;
+ }
+ catch(...) {
+ if(verbosity> 2) cerr << "Try:: catch (...) exception " << endl;
+ a=(*ccatch)(s);
+ }
+
+ a=(*fin)(s);
+ return a;
+}
+
+AnyType FIf(Stack s ,Expression test,Expression i1,Expression i2,Expression )
+ { AnyType a;
+ if (GetAny<bool>((*test)(s)))
+ {
+ if(i1) a=(*i1)(s);//Add if FH oct 2010
+ }
+ else if (i2)
+ {
+ if(i2) a=(*i2)(s); //Add if FH oct 2010
+ }
+
+ return a;
+ }
+
+
+
+aType TypeArray(aType b,aType a)
+{ // type of b[a]
+ aType r=map_type_of_map[make_pair(a->right(),b->right())];
+ if (!r) {
+ cerr << "Sorry is not possible to make a map "<< *b->right() << " [" << *a->right() << "]" << endl;
+ cerr << " list: " << endl;
+ Map_type_of_map::const_iterator i;
+ for(i=map_type_of_map.begin();i!=map_type_of_map.end();i++)
+ cerr << "\t " << *i->first.second << " [" << *i->first.first << "]" << "=" << *i->second << endl;
+ CompileError();
+ }
+ return r;
+}
+
+aType TypeTemplate(aType b,aType a)
+{ // type of b[a]
+ aType r=map_type_of_map[make_pair(b,a)];
+ if (!r) {
+ cerr << "Sorry is not possible to make a map "<< *b << "<" << *a << ">" << endl;
+ cerr << " list: " << endl;
+ Map_type_of_map::const_iterator i;
+ for(i=map_type_of_map.begin();i!=map_type_of_map.end();i++)
+ cerr << "\t " << *i->first.second << " <" << *i->first.first << ">" << "=" << *i->second << endl;
+ CompileError();
+ }
+ return r;
+}
+aType TypeArray(aType c,aType b,aType a)
+{
+ // type of c[ b, a]
+ aType ba=map_pair_of_type[make_pair(b->right(),a->right())];
+ if (!ba) {
+ cerr << "Sorry is not possible to make a type of pair "<< *b->right() << ", " << *c->right() << " " << endl;
+ cerr << " list: " << endl;
+ Map_type_of_map::const_iterator i;
+ for(i=map_pair_of_type.begin();i!=map_pair_of_type.end();i++)
+ cerr << "\t (" << *i->first.second << " , " << *i->first.first << ") " << "=" << *i->second << endl;
+ CompileError();
+ }
+ return TypeArray(c,ba);
+}
+
+
+inline void ShowOn_cerr(const pair<const char * ,const OneOperator *> & i)
+{
+ cerr << "\t" << *i.first << ":" << endl;
+ i.second->Show(cerr);
+}
+
+
+
+void ShowKeyWord(ostream & f )
+ {
+ zzzfff->dump(f);
+
+ }
+
+ostream* dumptable(ostream* f)
+{
+
+ *f << " the keywords " << endl;
+ ShowKeyWord(*f);
+ *f << " the types " << endl;
+ ShowType(*f);
+ ListOfTOfId::const_iterator i=tables_of_identifier.begin();
+ for(;i!=tables_of_identifier.end();++i)
+ {
+ cout << " --------- table of identifier ---------\n";
+ TableOfIdentifier * ti=*i;
+ TableOfIdentifier::const_iterator mc=ti->m.begin();
+ TableOfIdentifier::const_iterator end=ti->m.end();
+ for (;mc != end;mc++)
+ {
+ *f << " - " << mc->first << ", type :" << *mc->second.first << endl;
+ const Polymorphic * op =dynamic_cast<const Polymorphic *>(mc->second.second) ;
+ if ( op ) *f << *op << endl;
+ }
+
+ }
+
+ return f;
+}
+
+
+long exec(string *s)
+ {
+ int r=execute(s->c_str());
+ // delete s; modif mars 2006 FH
+ return r;}
+
+
+
+
+ class ostream_precis { public:
+ ostream_precis(ostream * ff) :f(ff) {}
+ ostream * f;
+ operator long () const {return f->precision();}
+ };
+
+ ostream_precis ostream_precision(ostream **f){ return ostream_precis(*f);}
+ ostream_precis ostream_precision(ostream *f){ return ostream_precis(f);}
+ long get_precis( ostream_precis pf) { return pf.f->precision();}
+ long set_precis( ostream_precis pf, long l) { return pf.f->precision(l);}
+
+class ostream_seekp { public:
+ ostream_seekp(ostream * ff) :f(ff) {}
+ ostream * f;
+ operator long () const {return f->tellp();}
+};
+
+
+class istream_seekg { public:
+ istream_seekg(istream * ff) :f(ff) {}
+ istream * f;
+ operator long () const {return f->tellg();}
+};
+
+ostream_seekp ff_oseekp(ostream **f){ return ostream_seekp(*f);}
+ostream_seekp ff_oseekp(ostream *f){ return ostream_seekp(f);}
+istream_seekg ff_iseekg(istream **f){ return istream_seekg(*f);}
+istream_seekg ff_iseekg(istream *f){ return istream_seekg(f);}
+
+long ffseekp( ostream_seekp pf, long l) { pf.f->clear();long ll= pf.f->tellp(); return pf.f->seekp(l),ll;}
+long fftellp( ostream_seekp pf) { pf.f->clear(); return pf.f->tellp() ;}
+long ffseekg( istream_seekg pf, long l) { pf.f->clear(); return pf.f->seekg(l),l;}
+long fftellg( istream_seekg pf) { return pf.f->tellg() ;}
+
+ class istream_good { public:
+ istream_good(istream * ff) :f(ff) {}
+ istream * f;
+ operator bool () const {return f->good();}
+ };
+ inline istream_good to_istream_good(istream **f){ return istream_good(*f);}
+ inline istream_good to_istream_good(istream *f){ return istream_good(f);}
+
+ inline long get_good( istream_good pf) { return pf.f->good();}
+ inline bool get_eof(istream ** p){ return (**p).eof();}
+
+typedef ios_base& ( * ostream_manipulateur )(ios_base&);
+
+ios_base& default1(ios_base& f)
+{
+ f.flags( (ios_base::fmtflags) 0 ) ; // (/*ios_base::scientific | */ios_base::fixed) );
+ return f;
+}
+
+
+template< ostream_manipulateur pf>
+inline ostream **set_os(ostream **f)
+{
+ **f << pf ; return f;
+}
+
+inline ostream **set_os_flush(ostream **f)
+{
+ (**f).flush() ; return f;
+}
+inline ostream *set_os_flush(ostream *f)
+{
+ (*f).flush() ; return f;
+}
+template< ostream_manipulateur pf>
+inline ostream *set_os1(ostream *f)
+{
+ *f << pf ; return f;
+}
+
+
+template<class R>
+class OneOperator_0 : public OneOperator {
+ class E_F0_F :public E_F0mps { public:
+ typedef R (*func)( ) ;
+ func f;
+ E_F0_F(func ff) : f(ff) {}
+ AnyType operator()(Stack ) const {return SetAny<R>( f()) ;}
+ operator aType () const { return atype<R>();}
+
+ };
+
+ typedef R (*func)() ;
+ func f;
+public:
+ E_F0 * code(const basicAC_F0 & ) const
+ { return new E_F0_F(f);}
+ OneOperator_0(func ff): OneOperator(map_type[typeid(R).name()]),f(ff){}
+};
+
+
+void init_by_array(unsigned long init_key[], int key_length);
+long genrand_int32(void);
+void init_genrand(unsigned long);
+long genrandint (long s) { init_genrand( (unsigned long ) s); return 0;}
+long genrandint32 () {return (long) genrand_int32();}
+
+template<class A,class B,bool RO=true>
+struct MIMul {
+ static bool MeshIndependent(Expression a,Expression b)
+ {
+ bool mia= a->MeshIndependent() ;
+ bool mib= b->MeshIndependent();
+ if ( mia && mib) return true;
+ else
+ {
+ if (mia && a->EvaluableWithOutStack() )
+ {
+ A va = GetAny<A>((*a)(NullStack));
+ // cout << " va = " << va << endl;
+ if ( va == A() )
+ {
+ // cout << " va = " << va << endl;
+ return true;
+ }
+ }
+ if (mib && b->EvaluableWithOutStack() )
+ {
+ B vb = GetAny<B>((*b)(NullStack));
+ // cout << " vb = " << vb << endl;
+ if ( vb == B() )
+ { //cout << " vb = " << vb << endl;
+ return true; }
+ }
+ return false;
+ }
+
+ }
+ static bool ReadOnly() { return RO;}
+
+};
+// add frev 2007
+class TransE_Array: public E_F0 { public:
+ const E_Array * v;
+ int size() const {return v->size();}
+ size_t nbitem() const {return v->size();}
+ bool MeshIndependent(){return v->MeshIndependent();}
+ TransE_Array(const E_Array * e): v(e) {ffassert(e);}
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+};
+
+
+// add frev 2007
+class opTrans : public OneOperator{
+public:
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+ opTrans(): OneOperator(atype<TransE_Array>(),atype<E_Array>() ) {}
+ E_F0 * code(const basicAC_F0 & args) const {
+ return new TransE_Array(dynamic_cast<const E_Array*>((Expression) args[0])); }
+};
+
+/*
+class opTTrans : public OneOperator{
+public:
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+ opTTrans(): OneOperator(atype<E_Array>(),atype<TransE_Array>() ) {}
+ E_F0 * code(const basicAC_F0 & args) const {
+ return dynamic_cast<const TransE_Array*>((Expression) args[0])->v; }
+};
+*/
+
+class opDot : public OneOperator{
+public:
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+ bool MeshIndependent() const { return false;}
+
+ opDot(aType A, aType B): OneOperator(atype<C_F0>(),A,B) {}
+ opDot(): OneOperator(atype<C_F0>(),atype<TransE_Array >(),atype<E_Array>() ) {}
+
+ E_F0 * code(const basicAC_F0 & ) const {ffassert(0);}
+ C_F0 code2(const basicAC_F0 &args) const;
+};
+
+
+class opColumn : public OneOperator{
+public:
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+ bool MeshIndependent() const { return false;}
+
+ opColumn(aType A, aType B): OneOperator(atype<C_F0>(),A,B) {if( A== basicForEachType::type_C_F0)pref=-100;}
+ opColumn(aType A): OneOperator(atype<C_F0>(),ArrayOfaType(A,true)) {pref=-100;}
+
+ // opColumn(): OneOperator(atype<C_F0>(),atype<TransE_Array >(),atype<E_Array>() ) {}
+
+ E_F0 * code(const basicAC_F0 & ) const {ffassert(0);}
+ C_F0 code2(const basicAC_F0 &args) const;
+};
+
+class opSum : public OneOperator{
+public:
+ const char * op;
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+ bool MeshIndependent() const { return false;}
+
+ opSum(const char *opp,aType A, aType B): OneOperator(atype<C_F0>(),A,B),op(opp) {}
+
+ E_F0 * code(const basicAC_F0 & ) const {ffassert(0);}
+ C_F0 code2(const basicAC_F0 &args) const;
+};
+
+
+/*
+class opArray : public OneOperator{
+public:
+ const char * op;
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+ bool MeshIndependent() const { return false;}
+
+ opSum(const char *opp,aType A, aType B): OneOperator(atype<C_F0>(),A,B),op(opp) {}
+
+ E_F0 * code(const basicAC_F0 & ) const {ffassert(0);}
+ C_F0 code2(const basicAC_F0 &args) const;
+};
+*/
+
+class opFormal : public OneOperator{
+public:
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+ bool MeshIndependent() const { return false;}
+ C_F0 (*thecode2)(const basicAC_F0 &args);
+ opFormal(aType A,C_F0 (c2)(const basicAC_F0 &args) ): OneOperator(atype<C_F0>(),A),thecode2(c2) {}
+ E_F0 * code(const basicAC_F0 & ) const {ffassert(0);}
+ C_F0 code2(const basicAC_F0 &args) const { return (*thecode2)(args);}
+};
+// fin frev 2007
+// nov 2007 v[i]
+class opVI : public OneOperator{
+public:
+ AnyType operator()(Stack s) const {ffassert(0);return 0L;}
+ bool MeshIndependent() const { return false;}
+
+ opVI(aType A): OneOperator(atype<C_F0>(),A,atype<long>()) {}
+
+ E_F0 * code(const basicAC_F0 & ) const {ffassert(0);}
+ C_F0 code2(const basicAC_F0 &args) const;
+};
+// fin nov 2007
+// add 2010 feb. FH
+C_F0 TryConj(const C_F0 & c) {
+ // here put the conj operator ...
+ ArrayOfaType at(c.left());
+ basicAC_F0_wa p(c);
+ const OneOperator * ff=TheOperators->Find("\'",at);
+ if (ff) {
+ if(verbosity>10)
+ cout << " ( do Conj) " ;
+ return ff->code2(p);
+ }
+
+ return c; }
+// fin add 2010 feb.
+// avril 2007
+
+C_F0 formalMatCofactor(const basicAC_F0 &args)
+{
+ bool ta =args[0].left()==atype<TransE_Array>();
+ const TransE_Array * tea=0;
+ const E_Array * ea=0;
+ if( ta) tea = dynamic_cast<const TransE_Array*>((Expression) args[0]);
+ else ea = dynamic_cast<const E_Array*>((Expression) args[0]);
+ assert( ea || tea );
+ const E_Array & a= ta ? *tea->v : *ea;
+ int ma =1;
+ int na=a.size();
+ if(na <1 ) CompileError(" Cofactor ([ ...]) ");
+ bool maa= a[0].left()==atype<E_Array>();
+ if(maa) {
+ ma= a[0].LeftValue()->nbitem();
+ for (int i=1;i<na;i++)
+ if( ma != (int) a[i].LeftValue()->nbitem())
+ CompileError(" a matrix with variable number of columm");
+
+ }
+
+ int na1=na,ma1=ma;
+ if(ta) RNM::Exchange(na1,ma1);
+ if(na1 != ma1) CompileError(" CoFactor: no square matrix ");
+ if(na1 > 3 || ( na1 <1) ) CompileError(" CoFactor: square matrix size is more then 3 ");
+ KNM<CC_F0> A(na1,na1);
+ KNM<CC_F0> C(na1,na1);
+ if(maa)
+ for (int i=0;i<na;++i)
+ {
+ const E_Array * li= dynamic_cast<const E_Array *>(a[i].LeftValue());
+ ffassert(li);
+ for (int j=0; j<ma;++j)
+ if(!ta) A(i,j) = (*li)[j];
+ else A(j,i) = TryConj((*li)[j]);
+ }
+ else
+ for (int i=0;i<na;++i)
+ if(!ta) A(i,0) = a[i];
+ else A(0,i) = TryConj(a[i]);
+
+
+ AC_F0 v,cc;
+ if(na1==2)
+ {
+ for(int i=0;i<na1;++i)
+ for(int j=0;j<na1;++j)
+ if( (i+j) %2 == 0)
+ C(i,j) = A(1-i,1-j);
+ else
+ C(i,j) = C_F0(TheOperators,"-",A(1-i,1-j));
+ }
+ else if( na1 ==3)
+ {
+ int i1,i2,j1,j2;
+ for(int i=0;i<3;++i)
+ for(int j=0;j<3;++j)
+ {
+ i1 = (i+1)%3;
+ i2 = (i+2)%3;
+ j1 = (j+1)%3;
+ j2 = (j+2)%3;
+
+ C(i,j) = A(i1,j1)*A(i2,i2)-A(i1,j2)*A(i2,j1);
+ }
+ }
+ v=C(0,0);
+
+ for (int i=0;i<na1;++i)
+ { cc = C(i,0);
+ for (int j=1;j<ma1;++j)
+ cc+= C(i,j);
+ C_F0 vi(TheOperators,"[]",cc);
+ if(i==0) v=vi;
+ else v+= vi;
+ }
+ return C_F0(TheOperators,"[]",v);
+
+
+}
+
+C_F0 formalMatTrace(const basicAC_F0 &args)
+{
+ bool ta =args[0].left()==atype<TransE_Array>();
+ const TransE_Array * tea=0;
+ const E_Array * ea=0;
+ if( ta) tea = dynamic_cast<const TransE_Array*>((Expression) args[0]);
+ else ea = dynamic_cast<const E_Array*>((Expression) args[0]);
+ assert( ea || tea );
+ const E_Array & a= ta ? *tea->v : *ea;
+ int ma =1;
+ int na=a.size();
+ if(na <1 ) CompileError(" trace [ ...] ");
+ bool maa= a[0].left()==atype<E_Array>();
+ if(maa) {
+ ma= a[0].LeftValue()->nbitem();
+ for (int i=1;i<na;i++)
+ if( ma != (int) a[i].LeftValue()->nbitem())
+ CompileError(" first matrix with variable number of columm");
+
+ }
+
+ int na1=na,ma1=ma;
+ if(ta) RNM::Exchange(na1,ma1);
+ if(na1 != ma1) CompileError(" trace: no square matrix ");
+ KNM<CC_F0> A(na1,ma1);
+
+ if(maa)
+ for (int i=0;i<na;++i)
+ {
+ const E_Array * li= dynamic_cast<const E_Array *>(a[i].LeftValue());
+ ffassert(li);
+ for (int j=0; j<ma;++j)
+ if(!ta) A(i,j) = (*li)[j];
+ else A(j,i) = TryConj((*li)[j]);
+ }
+ else
+ for (int i=0;i<na;++i)
+ if(!ta) A(i,0) = a[i];
+ else A(0,i) = TryConj(a[i]);
+
+
+ CC_F0 s;
+ s= A(0,0);
+ for (int i=0;i<na1;++i)
+ s = C_F0(TheOperators,"+",s,A(i,i));
+ return s;
+
+}
+
+
+C_F0 formalMatDet(const basicAC_F0 &args)
+{
+ bool ta =args[0].left()==atype<TransE_Array>();
+ const TransE_Array * tea=0;
+ const E_Array * ea=0;
+ if( ta) tea = dynamic_cast<const TransE_Array*>((Expression) args[0]);
+ else ea = dynamic_cast<const E_Array*>((Expression) args[0]);
+ assert( ea || tea );
+ const E_Array & a= ta ? *tea->v : *ea;
+ int ma =1;
+ int na=a.size();
+ if(na <1 ) CompileError(" trace [ ...] ");
+ bool maa= a[0].left()==atype<E_Array>();
+ if(maa) {
+ ma= a[0].LeftValue()->nbitem();
+ for (int i=1;i<na;i++)
+ if( ma != (int) a[i].LeftValue()->nbitem())
+ CompileError(" matrix with variable number of columm");
+
+ }
+
+ int na1=na,ma1=ma;
+ if(ta) RNM::Exchange(na1,ma1);
+ if(na1 != ma1) CompileError(" trace: no square matrix ");
+ KNM<CC_F0> A(na1,ma1);
+
+ if(maa)
+ for (int i=0;i<na;++i)
+ {
+ const E_Array * li= dynamic_cast<const E_Array *>(a[i].LeftValue());
+ ffassert(li);
+ for (int j=0; j<ma;++j)
+ if(!ta) A(i,j) = (*li)[j];
+ else A(j,i) = TryConj((*li)[j]);
+ }
+ else
+ for (int i=0;i<na;++i)
+ if(!ta) A(i,0) = a[i];
+ else A(0,i) = TryConj(a[i]);
+
+
+ if(na1==1)
+ return A(0,0);
+ else if( na1==2 )
+ {
+ C_F0 s1(TheOperators,"*",A(0,0),A(1,1));
+ C_F0 s2(TheOperators,"*",A(0,1),A(1,0));
+ return C_F0(TheOperators,"-",s1,s2);
+ }
+ else if( na1==3 )
+ {
+ int i=0,ii=(i+1)%3,iii=(i+2)%3;
+ A(i,0)*A(i,0);
+ C_F0 det = A(i,0)*A(ii,1)*A(iii,2) - A(i,0)*A(ii,2)*A(iii,1);
+ i++;ii=(i+1)%3,iii=(i+2)%3;
+ det += A(i,0)*A(ii,1)*A(iii,2) - A(i,0)*A(ii,2)*A(iii,1);
+ i++;ii=(i+1)%3,iii=(i+2)%3;
+ det += A(i,0)*A(ii,1)*A(iii,2) - A(i,0)*A(ii,2)*A(iii,1);
+ return det;
+ }
+ else
+ {
+ CompileError("FH: sorry only det of 1x1 and 2x2 matrix ");
+ }
+ return C_F0();
+
+}
+
++<<<<<<< HEAD
++=======
++#ifdef HAVE_JN
++double myyn(long n, double x){ return yn((int)n,x);}
++double myjn(long n, double x){ return jn((int) n,x);}
++#endif
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+// Add juin 2007
+template<class A,class B=A,class R=A>
+struct evalE_mul {
+ static AnyType eval(Stack s,const E_F0 * ab,const E_F0 * a,const E_F0 * b, bool & meshidenp)
+ {
+ A aa = GetAny<A>((*a)(s)) ;
+ B bb = GetAny<B>((*b)(s)) ;
+ R rr(aa*bb);
+ bool mia=a->MeshIndependent();
+ bool mib=b->MeshIndependent();
+
+ if (( aa == A()) && mia ) meshidenp=true;
+ else if(( bb == B()) && mib ) meshidenp=true;
+ else meshidenp = mib && mia;
+ cout << " meshidenp ??? " << meshidenp << " " << rr << endl;
+ return SetAny<R>(static_cast<R>(rr));
+ }
+};
+istream *Getline(istream * f, string ** s)
+{
+ if( *s==0) *s=new string;
+ getline(*f,**s);
+ size_t l = (**s).length();
+ if( l > 0 && ((**s)[l-1]=='\r')) (**s).resize(l-1); //
+ return f;
+}
+// Fin Add ne marche pas ....
+// fiun avril 2007
+// Hack to Bypass a bug in freefem FH ...
+template<>
+class ForEachType<void *>: public basicForEachType{public:// correction july 2009..... FH Hoooo.... (Il y a un bug DUR DUR FH ...)
+ ForEachType(Function1 iv=0,Function1 id=0,Function1 OOnReturn=0):basicForEachType(typeid(void *),sizeof(void *),0,0,iv,id,OOnReturn) { }
+};
+
+inline double walltime(){
+#ifdef HAVE_GETTIMEOFDAY
+
+
+ struct timeval currentWallTime;
+ double msecTime;
+
+ gettimeofday(¤tWallTime, NULL);
+
+ //time with milliseconds
+ msecTime = ( currentWallTime.tv_sec*1000. + currentWallTime.tv_usec/1000. )/1000.0;
+
+ // return time with milliseconds
+ return msecTime;
+
+
+#else
+
+ // add for Pichon mars 2010
+ time_t currentWallTime;
+ time(¤tWallTime);
+ return (double)currentWallTime;
+#endif
+}
+
+inline long fftime()
+{
+#ifdef HAVE_GETTIMEOFDAY
+ time_t tloc;
+ return time(&tloc);
+#endif
+ return -1;
+}
+
+long atoi(string* p) {return atoi(p->c_str());}// add march 2010
+double atof(string* p) {return atof(p->c_str());}// add march 2010
++<<<<<<< HEAD
+double NaN(string* p) {
+return nan(p->c_str());}// add march 2012
+double NaN() {return nan("");}// add march 2012
++=======
++double NaN(string* p) {return nan(p->c_str());}// add march 2012
++double NaN() {return nan("");}// add march 2012
++
++long isNaN(double x){return isnan(x);}
++long isInf(double x){return isinf(x);}
++long isNormal(double x){return isnormal(x);}
++//int ShowAlloc(const char *s, size_t lg);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+int ShowAlloc(const char *s,size_t & lg);
+long ShowAlloc1(string * s,long * np) { size_t lg; long n= ShowAlloc(s->c_str(),lg); *np=lg; return n;}
+long ShowAlloc1(string * s) { size_t lg; long n= ShowAlloc(s->c_str(),lg); return n;}
+void Init_map_type()
+{
+ TheOperators=new Polymorphic(),
+ TheRightOperators=new Polymorphic();
+ // cout << sizeof(string) << endl;
+ map_type[typeid(AnyType).name()] = new ForTypeAnyType();
+ map_type[typeid(void).name()] = new ForTypeVoid();
+
+ Dcl_Type<Expression>(0);
+ Dcl_TypeandPtr<double>(0,0,::InitializeDef<double>,0);
+ Dcl_TypeandPtr<long>(0,0,::InitializeDef<long>,0);
+ Dcl_TypeandPtr<bool>(0,0,::InitializeDef<bool>,0);
+ Dcl_TypeandPtr<Complex>(0,0,::InitializeDef<Complex>,0);
+ Dcl_Type<void*>(); // add FH ... for mpi comm world
+ Dcl_Type<char*>();
+ Dcl_Type<const char *>();
+ Dcl_Type<char>();
+ Dcl_TypeandPtr<string*>(0,0,::InitializePtr<string*>,::DeletePtr<string*>);
+ Dcl_TypeandPtr<ostream*>(0,0,::InitializePtr<ostream*>,::DeletePtr<ostream*>);
+ Dcl_TypeandPtr<istream*>(0,0,::InitializePtr<istream*>,::DeletePtr<istream*>);
+ Dcl_Type< ostream_precis > ();
+ Dcl_Type< ostream_seekp > ();
+ Dcl_Type< istream_seekg > ();
+ Dcl_Type< istream_good > ();
+ Dcl_Type< NothingType > ();
+
+ Dcl_Type<Polymorphic*>();
+
+// Dcl_Type<C_F0>();
+ basicForEachType::type_C_F0 = map_type[typeid(C_F0).name()] = new TypeLineFunction;
+ Dcl_Type<E_Array>();
+ Dcl_Type<TransE_Array >();// add
+ Dcl_Type<const E_Border *>();
+ Dcl_Type<const E_BorderN *>();
+
+
+
+ Dcl_Type<SubArray>();
+ Dcl_Type<pair<long,long> >();
+
+ initArrayDCLlong();
+ initArrayDCLdouble();
+ initArrayDCLComplex();
+
+ Dcl_Type<ios::openmode>();
+
+// les types des variables
+
+ zzzfff->Add("real",typevarreal=atype<double*>());
+ zzzfff->Add("int",atype<long*>());
+ zzzfff->Add("complex",typevarcomplex=atype<Complex*>());
+ zzzfff->Add("bool",atype<bool*>());
+ zzzfff->Add("string",atype<string**>());
+ zzzfff->Add("ifstream",atype<istream**>());
+ zzzfff->Add("ofstream",atype<ostream**>());
+ zzzfff->AddF("func",atype<C_F0>());
+
+
+
+// end of know types
+
+ map_type[typeid(bool).name()]->AddCast(
+ new E_F1_funcT<bool,bool*>(UnRef<bool>),
+ new E_F1_funcT<bool,long>(Cast<bool,long>),
+ new E_F1_funcT<bool,double>(Cast<bool,double>)
+ );
+
+
+ map_type[typeid(long).name()]->AddCast(
+ new E_F1_funcT<long,long*>(UnRef<long>),
+ new E_F1_funcT<long,double>(Cast<long,double>),
+ new E_F1_funcT<long,bool>(Cast<long,bool>),
+ new E_F1_funcT<long,ostream_precis>(Cast<long,ostream_precis>),
+ new E_F1_funcT<long,ostream_seekp>(Cast<long,ostream_seekp>),
+ new E_F1_funcT<long,istream_seekg>(Cast<long,istream_seekg>)
+ );
+
+
+ map_type[typeid(double).name()]->AddCast(
+ new E_F1_funcT<double,double*>(UnRef<double>),
+ new E_F1_funcT<double,long>(Cast<double,long>),
+ new E_F1_funcT<double,bool>(Cast<double,bool>)
+
+ );
+
+ map_type[typeid(Complex).name()]->AddCast(
+ new E_F1_funcT<Complex,Complex*>(UnRef<Complex>),
+ new E_F1_funcT<Complex,long>(Cast<Complex,long>),
+ new E_F1_funcT<Complex,double>(Cast<Complex,double>)
+ );
+
+ map_type[typeid(string*).name()]->AddCast(
+ new E_F1_funcT<string*,string**>(UnRefCopyPtr<string>),
+ new E_F1_funcT<string*,long>(FCast<string*,long,toString>),
+ new E_F1_funcT<string*,double>(FCast<string*,double,toString>),
+ new E_F1_funcT<string*,bool>(FCast<string*,bool,toString>),
+ new E_F1_funcT<string*,Complex>(FCast<string*,Complex,toString>)
+ );
+ // a changer --------------- modif
+ map_type[typeid(string*).name()]->AddCast(
+ new E_F1_funcT<string*,char *>(FCast<string*,char *,toStringC>),
+ new E_F1_funcT<string*,const char *>(FCast<string* ,const char *,toStringCconst>)
+ );
+
+ map_type[typeid(long).name()]->AddCast(new OneOperator_border_label);
+
+ Global.New("verbosity",CPValue<long>(verbosity));
+ Global.New("searchMethod",CPValue<long>(searchMethod)); //pichon
+
+ Global.New("cout",CConstant<ostream*>(&cout));
+ Global.New("cerr",CConstant<ostream*>(&cerr));// add jan 2014 FH.
+ Global.New("cin",CConstant<istream*>(&cin));
+ Global.New("append",CConstant<ios::openmode>(ios::app));
+ Global.New("binary",CConstant<ios::openmode>(ios::binary)); // add FH april 2014
+ TheOperators->Add("|",new OneBinaryOperator<Op2_pipe<ios::openmode> >); // add FH april 2014
+ Global.New("endl",CConstant<const char*>("\n"));
+ Global.New("true",CConstant<bool>(true));
+ Global.New("false",CConstant<bool>(false));
+ Global.New("pi",CConstant<double>(3.14159265358979323846264338328));
+ Global.New("version",CConstant<double>(VersionNumber()));
+
+ Global.New("CPUTime",CConstant<bool*>(&showCPU));
+ // def de Zero et One
+ pZero = new C_F0(CConstant<double>(0.0));
+ pOne = new C_F0(CConstant<double>(1.0));
+ pminusOne = new C_F0(CConstant<double>(-1.0));
+
+ TheOperators->Add(":",
+ new OneOperatorConst<char>(new EConstant<char>(':')),
+ new OneBinaryOperator<SubArray2>,
+ new OneTernaryOperator3<SubArray3>);
+
+
+ TheOperators->Add("+",
+ new OneBinaryOperator<Op2_add<long,long,long> >,
+ new OneBinaryOperator<Op2_add<double,double,double> >,
+ new OneBinaryOperator<Op2_add<double,double,long> >,
+ new OneBinaryOperator<Op2_add<double,long,double> >,
+ new OneBinaryOperator<Op2_add<long,bool,bool> >,
+ new OneBinaryOperator<Op2_add<long,long,bool> >,
+ new OneBinaryOperator<Op2_add<long,bool,long> >,
+ new OneBinaryOperator<Op2_add<Complex,Complex,Complex> >,
+ new OneBinaryOperator<Op2_add<Complex,Complex,double> >,
+ new OneBinaryOperator<Op2_add<Complex,double,Complex> >,
+ new OneBinaryOperator<Op2_add<Complex,Complex,long> >,
+ new OneBinaryOperator<Op2_add<Complex,long,Complex> > ,
+ new OneBinaryOperator_st<Op2_padd<string,string*,string*> > // a changer to do FH string * mars 2006
+ );
+ TheOperators->Add("-",
+ new OneBinaryOperator<Op2_sub<long,long,long> >,
+ new OneBinaryOperator<Op2_sub<double,double,double> >,
+ new OneBinaryOperator<Op2_sub<double,double,long> >,
+ new OneBinaryOperator<Op2_sub<double,long,double> >,
+ new OneBinaryOperator<Op2_sub<long,bool,bool> >,
+ new OneBinaryOperator<Op2_sub<Complex,Complex,Complex> >,
+ new OneBinaryOperator<Op2_sub<Complex,Complex,double> >,
+ new OneBinaryOperator<Op2_sub<Complex,double,Complex> >,
+ new OneBinaryOperator<Op2_sub<Complex,Complex,long> >,
+ new OneBinaryOperator<Op2_sub<Complex,long,Complex> >
+ );
+
+ TheOperators->Add("*",
+ new OneBinaryOperator<Op2_mul<long,long,long>,OneBinaryOperatorMI,evalE_mul<long> >,
+ new OneBinaryOperator<Op2_mul<double,double,double>,MIMul<double,double>,evalE_mul<double> >,
+ new OneBinaryOperator<Op2_mul<double,double,long>, MIMul<double,long>,evalE_mul<double,long,double> >,
+ new OneBinaryOperator<Op2_mul<double,long,double>,MIMul<long,double>,evalE_mul<long,double,double> >,
+ new OneBinaryOperator<Op2_mul<Complex,Complex,Complex> >,
+ new OneBinaryOperator<Op2_mul<Complex,Complex,double> >,
+ new OneBinaryOperator<Op2_mul<Complex,double,Complex> >,
+ new OneBinaryOperator<Op2_mul<Complex,Complex,long> >,
+ new OneBinaryOperator<Op2_mul<Complex,long,Complex> >
+ );
+ TheOperators->Add("/",
+ new OneBinaryOperator<Op2_div<long,long,long> >,
+ new OneBinaryOperator<Op2_div<double,double,double> >,
+ new OneBinaryOperator<Op2_div<double,double,long> >,
+ new OneBinaryOperator<Op2_div<double,long,double> >,
+ new OneBinaryOperator<Op2_div<Complex,Complex,Complex> >,
+ new OneBinaryOperator<Op2_div<Complex,Complex,double> >,
+ new OneBinaryOperator<Op2_div<Complex,double,Complex> >,
+ new OneBinaryOperator<Op2_div<Complex,Complex,long> >,
+ new OneBinaryOperator<Op2_div<Complex,long,Complex> >
+ );
+
+ TheOperators->Add("%",
+ new OneBinaryOperator<Op2_mod<long,long,long> >
+ );
+
+
+ TheOperators->Add("+",
+ new OneUnaryOperator<Op1_plus<double> >,
+ new OneUnaryOperator<Op1_plus<long> >,
+ new OneUnaryOperator<Op1_plus<Complex> >);
+
+ TheOperators->Add("-",
+ new OneUnaryOperator<Op1_neg<double> >,
+ new OneUnaryOperator<Op1_neg<long> >,
+ new OneUnaryOperator<Op1_neg<Complex> >);
+
+ TheOperators->Add("^",
+ new OneBinaryOperator<Op2_pow<long,long,long> >,
+ // new OneBinaryOperator<Op2_pow<double,long,double> >,
+ new OneBinaryOperator<Op2_pow<double,double,double> >,
+ new OneBinaryOperator<Op2_pow<double,double,long> >,
+ // new OneBinaryOperator<Op2_pow<Complex,Complex,double> >,
+ // new OneBinaryOperator<Op2_pow<Complex,double,Complex> >,
+ new OneBinaryOperator<Op2_pow<Complex,Complex,Complex> >
+ );
+
+ TheOperators->Add("<",
+ new OneBinaryOperator<Op2_lt<long,long> >,
+ new OneBinaryOperator<Op2_lt<double,double> >,
+ new OneBinaryOperator<Op2_plt<string*,string*> > // FH string * mars 2006
+ );
+ TheOperators->Add("<=",
+ new OneBinaryOperator<Op2_le<long,long> >,
+ new OneBinaryOperator<Op2_le<double,double> >,
+ new OneBinaryOperator<Op2_ple<string*,string*> > // FH string * mars 2006
+ );
+ TheOperators->Add(">",
+ new OneBinaryOperator<Op2_gt<long,long> >,
+ new OneBinaryOperator<Op2_gt<double,double> >,
+ new OneBinaryOperator<Op2_pgt<string*,string*> > // string * mars 2006
+ );
+ TheOperators->Add(">=",
+ new OneBinaryOperator<Op2_ge<long,long> >,
+ new OneBinaryOperator<Op2_ge<double,double> >,
+ new OneBinaryOperator<Op2_pge<string*,string*> > // FH string * mars 2006
+ );
+ TheOperators->Add("==",
+ new OneBinaryOperator<Op2_eq<long,long> >,
+ new OneBinaryOperator<Op2_eq<double,double> >,
+ new OneBinaryOperator<Op2_eq<Complex,Complex> >,
+ new OneBinaryOperator<Op2_peq<string*,string*> > // FH string * mars 2006
+ );
+
+ TheOperators->Add("!=",
+ new OneBinaryOperator<Op2_ne<long,long> >,
+ new OneBinaryOperator<Op2_ne<double,double> >,
+ new OneBinaryOperator<Op2_ne<Complex,Complex> >,
+ new OneBinaryOperator<Op2_pne<string*,string*> > // FH string * mars 2006
+ );
+
+ TheOperators->Add("!",
+ new OneUnaryOperator<Op1_not<bool > >
+ );
+
+ TheOperators->Add("&&", new OneBinaryOperator<Op2_and > );
+ TheOperators->Add("&", new OneBinaryOperator<Op2_and > );
+ TheOperators->Add("||", new OneBinaryOperator<Op2_or> );
+ TheOperators->Add("|", new OneBinaryOperator<Op2_or> );
+
+ // Unary_Op_Comparaision
+
+ TheOperators->Add("=",
+ new OneBinaryOperator<set_eq<bool> ,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<set_eq<long> ,OneBinaryOperatorMIWO>,
+ new OneBinaryOperator<set_eq<double> ,OneBinaryOperatorMIWO>,
+ new OneBinaryOperator<set_eq<Complex> ,OneBinaryOperatorMIWO>,
+ new OneBinaryOperator<set_peq<string> ,OneBinaryOperatorMIWO> // FH string * mars 2006
+ );
+
+ TheOperators->Add("?:",
+ new Operator_Aritm_If<bool >,
+ new Operator_Aritm_If<long >,
+ new Operator_Aritm_If<double >,
+ new Operator_Aritm_If<Complex >,
+ new Operator_Aritm_If<string* > // (OK???) to do FH string * mars 2006
+ );
+
+/*
+ ArrayOperator<double>();
+ ArrayOperator<Complex>();
+ ArrayOperator<long>();
+*/
+// initArrayOperators() ;
+ initArrayOperatorlong();
+ initArrayOperatordouble();
+ initArrayOperatorComplex();
+ initStringOperator();
+
+
+ TheOperators->Add("+=",
+ new OneBinaryOperator<set_eq_add<long>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<set_eq_add<double>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<set_eq_add<Complex>,OneBinaryOperatorMIWO >
+ );
+
+
+ TheOperators->Add("-=",
+ new OneBinaryOperator<set_eq_sub<long>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<set_eq_sub<double>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<set_eq_sub<Complex>,OneBinaryOperatorMIWO >
+ );
+
+
+
+ TheOperators->Add("*=",
+ new OneBinaryOperator<set_eq_mul<long> ,OneBinaryOperatorMIWO>,
+ new OneBinaryOperator<set_eq_mul<double>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<set_eq_mul<Complex>,OneBinaryOperatorMIWO >
+ );
+
+
+ TheOperators->Add("/=",
+ new OneBinaryOperator<set_eq_div<long>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<set_eq_div<double>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<set_eq_div<Complex>,OneBinaryOperatorMIWO >
+ );
+
+ TheOperators->Add("+",
+ // new OneBinaryOperator<Op2_addp<const E_BorderN *,const E_BorderN *,const E_BorderN * > >,
+ new AddBorderOperator
+ );
+
+ // add frev 2007
+ TheOperators->Add("\'", new opTrans);
+
+ // TheOperators->Add("\'", new opTTrans);
+ TheOperators->Add("*",new opDot(atype<TransE_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("*",new opDot(atype<E_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("*",new opColumn(atype<E_Array >() ) ); // [ ]* C_F0 (all)
+ TheOperators->Add("*",new opColumn(basicForEachType::type_C_F0,atype<E_Array >() ) ); // [ ]* C_F0 (all)
+ TheOperators->Add("*",new opColumn(basicForEachType::type_C_F0,atype<TransE_Array >() ) ); // [ ]* C_F0 (all)
+// type_C_F0
+ TheOperators->Add("::",new opColumn(atype<E_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("*",new opDot(atype<E_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+ TheOperators->Add("*",new opDot(atype<TransE_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+
+ // car le type de retour depent des objets du tableau
+ atype<E_Array >()->Add("[","",new opVI(atype<E_Array >()) );
+ atype<TransE_Array >()->Add("[","",new opVI(atype<TransE_Array >()) );
+ TheOperators->Add("+",new opSum("+",atype<TransE_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("+",new opSum("+",atype<E_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("+",new opSum("+",atype<E_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+ TheOperators->Add("+",new opSum("+",atype<TransE_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+ TheOperators->Add("-",new opSum("-",atype<TransE_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("-",new opSum("-",atype<E_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("-",new opSum("-",atype<E_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+ TheOperators->Add("-",new opSum("-",atype<TransE_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+ TheOperators->Add(".*",new opSum("*",atype<TransE_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add(".*",new opSum("*",atype<E_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add(".*",new opSum("*",atype<E_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+ TheOperators->Add(".*",new opSum("*",atype<TransE_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+ TheOperators->Add("./",new opSum("/",atype<TransE_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("./",new opSum("/",atype<E_Array >(),atype<E_Array>() ) ); // a faire mais dur
+ TheOperators->Add("./",new opSum("/",atype<E_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+ // correct in sept. 2009
+ TheOperators->Add("./",new opSum("/",atype<TransE_Array >(),atype<TransE_Array>() ) ); // a faire mais dur
+
+
+ // il faut refechir ..... FH
+ // il faut definir le type d'un tableau bof, bof (atype<C_F0>())
+ TheOperators->Add(">>",
+ new OneBinaryOperator<Op_Read<bool>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<Op_Read<long>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<Op_Read<double>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<Op_Read<Complex>,OneBinaryOperatorMIWO >,
+ new OneBinaryOperator<Op_ReadP<string>,OneBinaryOperatorMIWO >
+
+ );
+
+ TheOperators->Add("<<",
+ new OneBinaryOperator<Print<bool> >,
+ new OneBinaryOperator<Print<long> >,
+ new OneBinaryOperator<Print<double> >,
+ new OneBinaryOperator<Print<Complex> >,
+ new OneBinaryOperator<PrintP<string*> > // FH string * mars 2006
+ );
+
+
+ TheRightOperators->Add("++",
+ new OneOperator1<long,long*, E_F_F0<long,long*,false> >(&RIncremantation<long>));
+ TheRightOperators->Add("--",
+ new OneOperator1<long,long*, E_F_F0<long,long*,false> >(&RDecremantation<long>));
+ TheOperators->Add("++",
+ new OneOperator1<long,long*, E_F_F0<long,long*,false> >(&LIncremantation<long>));
+ TheOperators->Add("--",
+ new OneOperator1<long,long*, E_F_F0<long,long*,false> >(&LDecremantation<long>));
+// init
+ TheOperators->Add("<-",
+ new OneOperator2<string**,string**,string*>(&set_copyp_new<string>), // FH string * mars 2006
+ new OneOperator2_<double*,double*,double>(&set_copyp), //
+ new OneOperator2_<long*,long*,long>(&set_copyp),
+ new OneOperator2_<bool*,bool*,bool>(&set_copyp), // mars 2006
+ new OneOperator2_<Complex*,Complex*,Complex>(&set_copy),
+ // new OneOperator2_<istream**,istream**,istream*>(&set_copy_new<istream>),
+ // new OneOperator2_<ostream**,ostream**,ostream*>(&set_copy_new<ostream>),
+// new OneUnaryOperator<Op1_new_pstring<istream*,ifstream> >,
+// new OneUnaryOperator<Op1_new_pstring<ostream*,ofstream> >,
+ new OneBinaryOperator<Op2_set_pstring<istream**,ifstream> >, // FH string * mars 2006
+ new OneBinaryOperator<Op2_set_pstring<ostream**,ofstream> >, // FH string * mars 2006
+ new OneTernaryOperator3<Op2_set_pstringiomode<ostream**,ofstream> > , // FH string * mars 2006
+ new OneTernaryOperator3<Op2_set_pstringiomode<istream**,ifstream> > // FH string * april 2014
+ );
+
+ atype<istream* >()->AddCast( new E_F1_funcT<istream*,istream**>(UnRef<istream* >));
+ atype<ostream* >()->AddCast( new E_F1_funcT<ostream*,ostream**>(UnRef<ostream* >));
+
+// Add<istream**>("<-","(", new OneUnaryOperator<Op1_new_pstring<istream*,ifstream> >);
+ Add<ostream**>("<-","(", new OneUnaryOperator<Op1_new_pstring<ostream*,ofstream> >); // FH string * mars 2006
+
+ // Polymorphic * precis =new Polymorphic();
+ // Add<ostream*>("precision",".",precis);
+ Add<ostream**>("precision",".",new OneOperator1<ostream_precis,ostream**>(ostream_precision));
+ Add<ostream*>("precision",".",new OneOperator1<ostream_precis,ostream*>(ostream_precision));
+
+ // add FH jan 2010 ...
+ Add<ostream**>("seekp",".",new OneOperator1<ostream_seekp,ostream**>(ff_oseekp));
+ Add<ostream*>("seekp",".",new OneOperator1<ostream_seekp,ostream*>(ff_oseekp));
+
+ Add<istream**>("seekg",".",new OneOperator1<istream_seekg,istream**>(ff_iseekg));
+ Add<istream*>("seekg",".",new OneOperator1<istream_seekg,istream*>(ff_iseekg));
+ Add<ostream**>("tellp",".",new OneOperator1<ostream_seekp,ostream**>(ff_oseekp));
+ Add<ostream*>("tellp",".",new OneOperator1<ostream_seekp,ostream*>(ff_oseekp));
+
+ Add<istream**>("tellg",".",new OneOperator1<istream_seekg,istream**>(ff_iseekg));
+ Add<istream*>("tellg",".",new OneOperator1<istream_seekg,istream*>(ff_iseekg));
+
+ // Add<istream_seekp>("(","",new OneOperator1<long,istream_seekp>(fftellp),
+// new OneOperator2<long,istream_seekp,long>(ffseekp));
+ Add<ostream_seekp>("(","",new OneOperator1<long,ostream_seekp>(fftellp),
+ new OneOperator2<long,ostream_seekp,long>(ffseekp));
+ Add<istream_seekg>("(","",new OneOperator1<long,istream_seekg>(fftellg),
+ new OneOperator2<long,istream_seekg,long>(ffseekg));
+ // end add jan 2010 ..
+ Add<ostream_precis>("(","",new OneOperator1<long,ostream_precis>(get_precis),
+ new OneOperator2<long,ostream_precis,long>(set_precis));
+// add v 1.41
+ Add<istream**>("good",".",new OneOperator1<istream_good,istream**>(to_istream_good));
+ Add<istream*>("good",".",new OneOperator1<istream_good,istream*>(to_istream_good));
+ Add<istream*>("good",".",new OneOperator1<istream_good,istream*>(to_istream_good));
+ Add<istream_good>("(","",new OneOperator1<long,istream_good>(get_good));
+
+ Add<istream**>("eof",".",new OneOperator1<bool,istream**>(get_eof));
+// add v 2.8
+ Add<ostream**>("scientific",".",new OneOperator1<ostream**,ostream**>(set_os<scientific>));
+ Add<ostream**>("fixed",".",new OneOperator1<ostream**,ostream**>(set_os<fixed>));
+ Add<ostream**>("showbase",".",new OneOperator1<ostream**,ostream**>(set_os<showbase>));
+ Add<ostream**>("noshowbase",".",new OneOperator1<ostream**,ostream**>(set_os<noshowbase>));
+ Add<ostream**>("showpos",".",new OneOperator1<ostream**,ostream**>(set_os<showpos>));
+ Add<ostream**>("noshowpos",".",new OneOperator1<ostream**,ostream**>(set_os<noshowpos>));
+ Add<ostream**>("default",".",new OneOperator1<ostream**,ostream**>(set_os<default1>));
+ Add<ostream**>("flush",".",new OneOperator1<ostream**,ostream**>(set_os_flush));// ADD may 2010
+
+ Add<ostream*>("scientific",".",new OneOperator1<ostream*,ostream*>(set_os1<scientific>));
+ Add<ostream*>("fixed",".",new OneOperator1<ostream*,ostream*>(set_os1<fixed>));
+ Add<ostream*>("showbase",".",new OneOperator1<ostream*,ostream*>(set_os1<showbase>));
+ Add<ostream*>("noshowbase",".",new OneOperator1<ostream*,ostream*>(set_os1<noshowbase>));
+ Add<ostream*>("showpos",".",new OneOperator1<ostream*,ostream*>(set_os1<showpos>));
+ Add<ostream*>("noshowpos",".",new OneOperator1<ostream*,ostream*>(set_os1<noshowpos>));
+ Add<ostream*>("default",".",new OneOperator1<ostream*,ostream*>(set_os1<default1>));
+ Add<ostream*>("flush",".",new OneOperator1<ostream*,ostream*>(set_os_flush));// ADD may 2010
+
+ Global.Add("getline","(",new OneOperator2<istream*,istream*,string **>(Getline));
+// add 2.16
+ Global.Add("trace","(",new opFormal(atype<E_Array>(),formalMatTrace ));
+ Global.Add("det","(",new opFormal(atype<E_Array>(),formalMatDet ));
+// end add
+
+ // add 3.20
+ Global.Add("Cofactor","(",new opFormal(atype<E_Array>(),formalMatCofactor ));
+
+ TheOperators->Add("[]",new OneOperator_array );
+ TheOperators->Add("[border]",new OneOperator_border );
+
+
+ Global.Add("cos","(",new OneOperator1<double>(cos));
+// Global.Add("square","(",new OneOperator1_<double>(Square));
+ Global.Add("square","(",new OneOperator1<long,long,E_F_F0<long,const long &> >(Square));// add FH Mai 2011
+ Global.Add("square","(",new OneOperator1<double,double,E_F_F0<double,const double &> >(Square));
+ Global.Add("square","(",new OneOperator1<Complex,Complex,E_F_F0<Complex,const Complex &> >(Square));// add FH Mai 2011
++<<<<<<< HEAD
+ //add for Olivier FH July 2014
+ Global.Add("sqr","(",new OneOperator1<long,long,E_F_F0<long,const long &> >(Square));//
+ Global.Add("sqr","(",new OneOperator1<double,double,E_F_F0<double,const double &> >(Square));
+ Global.Add("sqr","(",new OneOperator1<Complex,Complex,E_F_F0<Complex,const Complex &> >(Square));//
++=======
++ //add for Olivier FH July 2017
++ Global.Add("sqr","(",new OneOperator1<long,long,E_F_F0<long,const long &> >(Square));// add FH Mai 2011
++ Global.Add("sqr","(",new OneOperator1<double,double,E_F_F0<double,const double &> >(Square));
++ Global.Add("sqr","(",new OneOperator1<Complex,Complex,E_F_F0<Complex,const Complex &> >(Square));// add FH Mai 2011
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ Global.Add("round","(",new OneOperator1<double>(round)); // add june 2007
+ Global.Add("lround","(",new OneOperator1<long,double>(lround)); // add june 2007
+ Global.Add("floor","(",new OneOperator1<double>(floor)); // add march 2006
+ Global.Add("ceil","(",new OneOperator1<double>(ceil)); // add march 2006
+ Global.Add("rint","(",new OneOperator1<double>(rint)); // add june 2006
+ Global.Add("lrint","(",new OneOperator1<long,double>(lrint)); // add mars 2014
+
+ Global.Add("sin","(",new OneOperator1<double>(sin));
+ Global.Add("tan","(",new OneOperator1<double>(tan));
+ Global.Add("atan","(",new OneOperator1<double>(atan));
+ Global.Add("sinh","(",new OneOperator1<double>(sinh));
+ Global.Add("cosh","(",new OneOperator1<double>(cosh));
+ Global.Add("tanh","(",new OneOperator1<double>(tanh));
+
+ Global.Add("atoi","(",new OneOperator1<long,string*>(atoi));// add march 2010
+ Global.Add("atof","(",new OneOperator1<double,string*>(atof));// add march 2010
+
+#ifdef HAVE_ATANH
+ Global.Add("atanh","(",new OneOperator1<double>(atanh));
+#endif
+ Global.Add("asin","(",new OneOperator1<double>(asin));
+ Global.Add("acos","(",new OneOperator1<double>(acos));
+#ifdef HAVE_ASINH
+ Global.Add("asinh","(",new OneOperator1<double>(asinh));
+#endif
+#ifdef HAVE_ACOSH
+ Global.Add("acosh","(",new OneOperator1<double>(acosh));
+#endif
+#ifdef HAVE_ERFC
+ Global.Add("erf","(",new OneOperator1<double>(erf));
+ Global.Add("erfc","(",new OneOperator1<double>(erfc));
+#endif
+#ifdef HAVE_TGAMMA
+ Global.Add("tgamma","(",new OneOperator1<double>(tgamma));
+ Global.Add("lgamma","(",new OneOperator1<double>(lgamma));
+#endif
+ // function de bessel j0, j1, jn, y0, y1, yn -- bessel functions of first and second kind
+#ifdef HAVE_JN
+ Global.Add("j0","(",new OneOperator1<double>(j0));
+ Global.Add("j1","(",new OneOperator1<double>(j1));
+ Global.Add("jn","(",new OneOperator2<double,long,double>(myjn));
+ Global.Add("y0","(",new OneOperator1<double>(y0));
+ Global.Add("y1","(",new OneOperator1<double>(y1));
+ Global.Add("yn","(",new OneOperator2<double,long,double>(myyn));
+#endif
+ Global.Add("exp","(",new OneOperator1<double>(exp));
+ Global.Add("log","(",new OneOperator1<double>(log));
+ Global.Add("log10","(",new OneOperator1<double>(log10));
+ Global.Add("pow","(",new OneOperator2<double,double>(pow));
+// Global.Add("pow","(",new OneOperator2<double,double,long>(pow));
+ Global.Add("max","(",new OneOperator2_<double,double>(Max<double> ));
+ Global.Add("min","(",new OneOperator2_<double,double>(Min<double> ));
+ Global.Add("max","(",new OneOperator2_<long,long>(Max));
+ Global.Add("min","(",new OneOperator2_<long,long>(Min));
+ Global.Add("atan2","(",new OneOperator2<double>(atan2));
+ Global.Add("hypot","(",new OneOperator2<double>(hypot));// add Jan 2014
+
+ Global.Add("atan","(",new OneOperator2<double>(atan2));
+ Global.Add("sqrt","(",new OneOperator1<double>(sqrt,2));
+ Global.Add("abs","(",new OneOperator1<double>(Abs));
+ Global.Add("abs","(",new OneOperator1<long>(Abs));
+ Global.Add("cos","(",new OneOperator1_<Complex>(cos));
+ Global.Add("sin","(",new OneOperator1_<Complex>(sin));
+ Global.Add("sinh","(",new OneOperator1_<Complex>(sinh));
+ Global.Add("cosh","(",new OneOperator1_<Complex>(cosh));
+ Global.Add("log","(",new OneOperator1_<Complex>(log));
+ // Global.Add("log10","(",new OneOperator1_<Complex>(log10));
+ Global.Add("tan","(",new OneOperator1_<Complex>(tan));
+ Global.Add("exp","(",new OneOperator1_<Complex>(exp));
+ //Complex (* powcc )( const Complex &, const Complex &) =pow;
++<<<<<<< HEAD
+
+ Global.Add("pow","(",new OneBinaryOperator<Op2_pow<Complex,Complex,Complex> >);
+ //new OneOperator2_<Complex,Complex>(pow ));
++=======
++ Global.Add("pow","(",new OneOperator2_<Complex,Complex>(pow ));
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ Global.Add("sqrt","(",new OneOperator1_<Complex>(sqrt,0));
+ Global.Add("conj","(",new OneOperator1_<Complex>(conj,0));
+ Global.Add("conj","(",new OneOperator1_<double>(RNM::conj,1));
+ TheOperators->Add("\'",new OneOperator1_<Complex>(conj,0));
+ TheOperators->Add("\'",new OneOperator1_<double>(RNM::conj,1)); // add F. Feb 2010 of conj of varf..
+
+
+ Global.Add("imag","(",new OneOperator1_<double,Complex>(Imag));
+ // Big probleme real is a type
+ Add<double>("<--","(",new OneOperator1_<double,Complex>(Real));
+ // Global.Add("real","(",new OneOperator1_<double,Complex>(Real));
+ // Add<double>(typevarreal->right()->name(),".",new OneOperator1_<double,Complex>(Real));
+ // Global.Add(typevarreal->right()->name(),".",new OneOperator1_<double,Complex>(Real));
+ // Add<double*>(typevarreal->left()->name(),".",new OneOperator1_<double,Complex*>(preal));
+
+ Global.Add("abs","(",new OneOperator1_<double,Complex>(abs));
+
+ Global.Add("arg","(",new OneOperator1_<double,Complex>(arg));
+ Global.Add("norm","(",new OneOperator1_<double,Complex>(norm));
+ Global.Add("exit","(",new OneOperator1<long>(Exit));
+ Global.Add("assert","(",new OneOperator1<bool>(Assert));
+
+ Global.Add("clock","(",new OneOperator0<double>(CPUtime));
+ Global.Add("time","(",new OneOperator0<double>(walltime));// add mars 2010 for Pichon.
+ Global.Add("ltime","(",new OneOperator0<long>(fftime));// add mars 2014 ( the times unix fonction)
+ Global.Add("storageused","(",new OneOperator0<long>(storageused));
+ Global.Add("storagetotal","(",new OneOperator0<long>(storagetotal));
+
+ Global.Add("dumptable","(",new OneOperator1<ostream*,ostream*>(dumptable));
+ Global.Add("exec","(",new OneOperator1<long,string* >(exec)); //FH string * mars 2006
+ Global.Add("system","(",new OneOperator1<long,string* >(exec)); //FH string fevr 2011
+
+ Global.Add("polar","(",new OneOperator2_<Complex,double,double>(polar));
+ // rand generator ---
+ unsigned long init[4]={0x123, 0x234, 0x345, 0x456}, length=4;
+ init_by_array(init, length);
+ extern long genrand_int31(void);
+ extern double genrand_real1(void);
+ extern double genrand_real2(void);
+ extern double genrand_real3(void);
+ extern double genrand_res53(void) ;
+
+ Global.Add("randint32","(",new OneOperator_0<long>(genrandint32));
+ Global.Add("randint31","(",new OneOperator_0<long>(genrand_int31));
+ Global.Add("randreal1","(",new OneOperator_0<double>(genrand_real1));
+ Global.Add("randreal2","(",new OneOperator_0<double>(genrand_real2));
+ Global.Add("randreal3","(",new OneOperator_0<double>(genrand_real3));
+ Global.Add("randres53","(",new OneOperator_0<double>(genrand_res53));
+ Global.Add("randinit","(",new OneOperator1<long>(genrandint));
+
+ // NaN and Inf
+ Global.Add("ShowAlloc","(",new OneOperator1<long,string*>(ShowAlloc1));// debuging
+ Global.Add("ShowAlloc","(",new OneOperator2<long,string*,long*>(ShowAlloc1));// debuging
+ Global.Add("NaN","(",new OneOperator0<double>(NaN));
+ Global.Add("NaN","(",new OneOperator1<double,string* >(NaN));
+ Global.Add("isNaN","(",new OneOperator1<long,double>(isNaN));
+ Global.Add("isInf","(",new OneOperator1<long,double>(isInf));
+ Global.Add("isNormal","(",new OneOperator1<long,double>(isNormal));
+
+
+
+typedef MyMap<String,String> MyMapSS;
+
+ map_type[typeid(MyMapSS*).name()] = new ForEachType<MyMapSS*>(Initialize<MyMapSS >,Delete<MyMapSS >) ;
+//Dcl_TypeandPtr_<KN_<string*> ,KN<string*>* > (0,0,0,::Destroy<KN<K> >, ::ClearReturnKK_<K,KN<K>,KN_<K> >,::ClearReturnpKK<K,KN<K> >);
+
+ // map_type[typeid(KN2String*).name()] = new ForEachType<MyMapIS*>(Initialize<KN2String >,Delete<MyMapIS >) ;
+ map_type_of_map[make_pair(atype<string*>(),atype<string*>())]=atype<MyMapSS*>();
+ atype<MyMapSS*>()->Add("[","",new OneOperator2_<string**,MyMapSS*,string*>(get_elements));
+
+
+
+ tables_of_identifier.push_back(&Global);
+
+
+}
+//int ShowAlloc(const char *s,size_t & lg);
+
+
+
+
+ void ClearMem()
+ {
+ size_t lg;
+ ShowAlloc("ClearMem: begin" , lg);
+ delete pZero;
+ delete pOne;
+ delete pminusOne;
+
+ tables_of_identifier.clear();
+ for (map<const string,basicForEachType *>::iterator i=map_type.begin();i!=map_type.end();++i)
+ delete i->second;
+
+ map_type.clear();
+ map_type_of_map.clear();
+ map_pair_of_type.clear();
+ Global.clear();
+ if(TheOperators)
+ TheOperators->clear();
+ if(TheRightOperators)
+ TheRightOperators->clear();
+
+ CodeAlloc::clear();
+ ShowAlloc("ClearMem: end" , lg);
+
+ }
+static addingInitFunct TheaddingInitFunct(-10000,Init_map_type);
+
+C_F0 opVI::code2(const basicAC_F0 &args) const
+{
+ Expression p=args[1];
+ if ( ! p->EvaluableWithOutStack() )
+ {
+ bool bb=p->EvaluableWithOutStack();
+ //cout << bb << " " << * p << endl;
+ CompileError(" [...][p], The p must be a constant , sorry");}
+ long pv = GetAny<long>((*p)(NullStack));
+ bool ta =args[0].left()==atype<TransE_Array>();
+ const TransE_Array * tea=0;
+ const E_Array * ea=0;
+ if( ta) tea = dynamic_cast<const TransE_Array*>((Expression) args[0]);
+ else ea = dynamic_cast<const E_Array*>((Expression) args[0]);
+ assert( ea || tea );
+ const E_Array & a= ta ? *tea->v : *ea;
+ // cout << " pv =" << pv << " size = "<< a.size() << endl;
+ if(!(pv >=0 && pv <a.size()))
+ {
+ cerr << "\n\nerror [ ... ][" << pv <<" ] " << " the size of [ ...] is "<< a.size() << endl;
+ lgerror(" bound of [ .., .. , ..][ . ] operation ");
+ }
+
+ //ffassert(pv >=0 && pv <a.size());
+ return (* a.v)[pv];
+}
+
+C_F0 opDot::code2(const basicAC_F0 &args) const
+{
+ bool ta =args[0].left()==atype<TransE_Array>();
+ bool tb = args[1].left()==atype<TransE_Array>();
+ const TransE_Array * tea=0;
+ const TransE_Array * teb=0;
+ const E_Array * ea=0;
+ const E_Array * eb=0;// E_F0
+ if( ta) tea = dynamic_cast<const TransE_Array*>((Expression) args[0]);
+ else ea = dynamic_cast<const E_Array*>((Expression) args[0]);
+ if( tb) teb = dynamic_cast<const TransE_Array*>((Expression) args[1]);
+ else eb = dynamic_cast<const E_Array*>((Expression) args[1]);
+ assert( ea || tea );
+ assert( eb || teb );
+ const E_Array & a= ta ? *tea->v : *ea;
+ const E_Array & b= tb ? *teb->v : *eb;
+ int ma =1;
+ int mb =1;
+ int na=a.size();
+ int nb=b.size();
+ if(na <1 && nb < 1) CompileError(" empty array [ ...]'*[ ... ] ");
+ bool mab= b[0].left()==atype<E_Array>();
+ bool maa= a[0].left()==atype<E_Array>();
+ if(maa) {
+ ma= a[0].LeftValue()->nbitem();
+ for (int i=1;i<na;i++)
+ if( ma != (int) a[i].LeftValue()->nbitem())
+ CompileError(" first matrix with variable number of columm");
+
+ }
+ if(mab) {
+ mb= b[1].LeftValue()->nbitem();
+ for (int i=1;i<nb;i++)
+ if( mb != (int) b[i].LeftValue()->nbitem())
+ CompileError(" second matrix with variable number of columm");
+ }
+ int na1=na,ma1=ma,nb1=nb,mb1=mb;
+ if(ta) RNM::Exchange(na1,ma1);
+ if(tb) RNM::Exchange(nb1,mb1);
+
+ KNM<CC_F0> A(na1,ma1), B(nb1,mb1);
+ if ( A.M() != B.N())
+ {
+ cout << " formal prod array or matrix : [ .. ] * [ .. ] " << endl;
+ cout << " first array : matrix " << maa << " trans " << ta << " " << na << "x" << ma <<endl;
+ cout << " second array : matrix " << mab << " trans " << tb << " " << nb << "x" << mb <<endl;
+ CompileError(" no same size [ ...]'*[ ... ] sorry ");
+ }
+
+ if(maa)
+ for (int i=0;i<na;++i)
+ {
+ const E_Array * li= dynamic_cast<const E_Array *>(a[i].LeftValue());
+ ffassert(li);
+ for (int j=0; j<ma;++j)
+ if(!ta) A(i,j) = (*li)[j];
+ else A(j,i) = TryConj((*li)[j]);
+ }
+ else
+ for (int i=0;i<na;++i)
+ if(!ta) A(i,0) = a[i];
+ else A(0,i) = TryConj(a[i]);
+
+ if(mab)
+ for (int i=0;i<nb;++i)
+ {
+ const E_Array * li= dynamic_cast<const E_Array *>(b[i].LeftValue());
+ ffassert(li);
+ for (int j=0; j<mb;++j)
+ if(!tb) B(i,j) = (*li)[j];
+ else B(j,i) = TryConj((*li)[j]);
+ }
+ else
+ for (int i=0;i<nb;++i)
+ if(!tb) B(i,0) = b[i];
+ else B(0,i) = TryConj(b[i]);
+
+ KNM<CC_F0> C(na1,mb1);
+ CC_F0 s,abi;
+ for (int i=0;i<na1;++i)
+ for (int j=0;j<mb1;++j)
+ {
+ s= C_F0(TheOperators,"*",A(i,0),B(0,j));
+ for (int k=1;k<ma1;++k) {
+ abi = C_F0(TheOperators,"*",A(i,k),B(k,j));
+ s = C_F0(TheOperators,"+",s,abi);}
+ C(i,j)=s;
+ };
+ // cout << "\n ***na1 nb1 == = "<< na1 << " " << nb1 << endl;
+ if( na1==1 && mb1 ==1)
+ return C(0,0);
+ else if ( mb1 ==1 ) // || (na1==1)) // correct du car ' on conj encore r . mars 2010
+ {
+ AC_F0 v;
+ v=C(0,0);
+ int i0=na1!=1,j0=mb1!=1, nn= mb1*na1;
+ for (int i=1;i<nn;++i)
+ v+=C(i0*i,j0*i);
+ C_F0 r(TheOperators,"[]",v);
+ if(mb1==1) return r;
+ else return C_F0(TheOperators,"\'",r);// Bug car on conj encore r . mars 2010
+ }
+ else
+ {
+ AC_F0 v,cc;
+ v=C(0,0);
+ for (int i=0;i<na1;++i)
+ { cc = C(i,0);
+ for (int j=1;j<mb1;++j)
+ cc+= C(i,j);
+ C_F0 vi(TheOperators,"[]",cc);
+ if(i==0) v=vi;
+ else v+= vi;
+ }
+ return C_F0(TheOperators,"[]",v);
+ }
+/*
+ if ( !mab && ! maa)
+ {
+
+ if( na != nb)
+ CompileError(" no same size [ ...]'*[ ... ] sorry ");
+
+ if( ta && ! tb)
+ {
+ s= C_F0(TheOperators,"*",a[0],b[0]);
+ for (int i=1;i<na;++i)
+ {
+ abi = C_F0(TheOperators,"*",a[i],b[i]);
+ s = C_F0(TheOperators,"+",s,abi);
+ }
+ return s;//Type_Expr(s); //new C_F0(s); ATTENTION le type est variable ici FH
+ }
+
+ if(!ma && mb)
+ {
+ }
+
+ }*/
+
+ cout << " formal prod array or matrix : [ .. ] * [ .. ] " << na << "x" << nb << endl;
+ cout << " formal prod array or matrix : [ .. ] * [ .. ] " << endl;
+ cout << " first array : matrix " << maa << " trans " << ta << " " << na << "x" << ma <<endl;
+ cout << " second array : matrix " << mab << " trans " << tb << " " << nb << "x" << mb <<endl;
+ CompileError(" not implemented sorry ..... (FH) to do ???? ");
+ return C_F0();
+
+}
+C_F0 opColumn::code2(const basicAC_F0 &args) const
+{
+ bool ta =args[0].left()==atype<TransE_Array>();
+ bool tb = args[1].left()==atype<TransE_Array>();
+ const TransE_Array * tea=0;
+ const TransE_Array * teb=0;
+ const E_Array * ea=0;
+ const E_Array * eb=0;// E_F0
+ if( ta) tea = dynamic_cast<const TransE_Array*>((Expression) args[0]);
+ else ea = dynamic_cast<const E_Array*>((Expression) args[0]);
+ if( tb) teb = dynamic_cast<const TransE_Array*>((Expression) args[1]);
+ else eb = dynamic_cast<const E_Array*>((Expression) args[1]);
+
+ // ffassert( ea || tea );
+
+ if( (eb || teb) && ( ea || tea ) )
+ {
+ const E_Array & a= ta ? *tea->v : *ea;
+ const E_Array & b= tb ? *teb->v : *eb;
+ int ma =1;
+ int mb =1;
+ int na=a.size();
+ int nb=b.size();
+ if(na <1 && nb < 1) CompileError(" empty array [ ...]':[ ... ] ");
+ bool mab= b[0].left()==atype<E_Array>();
+ bool maa= a[0].left()==atype<E_Array>();
+ if(maa) {
+ ma= a[0].LeftValue()->nbitem();
+ for (int i=1;i<na;i++)
+ if( ma != (int) a[i].LeftValue()->nbitem())
+ CompileError(" first matrix with variable number of columm");
+
+ }
+ if(mab) {
+ mb= b[1].LeftValue()->nbitem();
+ for (int i=1;i<nb;i++)
+ if( mb != (int) b[i].LeftValue()->nbitem())
+ CompileError(" second matrix with variable number of columm");
+ }
+ int na1=na,ma1=ma,nb1=nb,mb1=mb;
+ if(ta) RNM::Exchange(na1,ma1);
+ if(tb) RNM::Exchange(nb1,mb1);
+
+ KNM<CC_F0> A(na1,ma1), B(nb1,mb1);
+ if ( (na1!=nb1 ) || (ma1 != mb1) || (na1 * ma1 ==0) )
+ {
+ cout << "\n formal array or matrix : [ .. ] : [ .. ] " << endl;
+ cout << " first array : matrix " << maa << " trans " << ta << " " << na << "x" << ma <<endl;
+ cout << " second array : matrix " << mab << " trans " << tb << " " << nb << "x" << mb <<endl;
+ CompileError(" no same size [ ...] : [ ... ] sorry ");
+ }
+
+ if(maa)
+ for (int i=0;i<na;++i)
+ {
+ const E_Array * li= dynamic_cast<const E_Array *>(a[i].LeftValue());
+ ffassert(li);
+ for (int j=0; j<ma;++j)
+ if(!ta) A(i,j) = (*li)[j];
+ else A(j,i) = TryConj((*li)[j]);
+ }
+ else
+ for (int i=0;i<na;++i)
+ if(!ta) A(i,0) = a[i];
+ else A(0,i) = TryConj(a[i]);
+
+ if(mab)
+ for (int i=0;i<nb;++i)
+ {
+ const E_Array * li= dynamic_cast<const E_Array *>(b[i].LeftValue());
+ ffassert(li);
+ for (int j=0; j<mb;++j)
+ if(!tb) B(i,j) = (*li)[j];
+ else B(j,i) = TryConj((*li)[j]);
+ }
+ else
+ for (int i=0;i<nb;++i)
+ if(!tb) B(i,0) = b[i];
+ else B(0,i) = TryConj(b[i]);
+
+ //KNM<CC_F0> C(na1,mb1);
+ CC_F0 s,aibi;
+
+ for (int i=0;i<na1;++i)
+ for (int j=0;j<ma1;++j)
+ {
+ aibi = C_F0(TheOperators,"*",A(i,j),B(i,j));
+ if( (i==0) && (j==0))
+ s = aibi;
+ else
+ s = C_F0(TheOperators,"+",s,aibi);
+ };
+ // if( na1==1 && mb1 ==1)
+ return s;
+ }
+ else if ( ea || tea )
+ { // modif 2 /08/ 2013 FH .. bug in [ a0,a1,... ]'*b
+ // [a0,a1,... ]*b or [ a0,a1,... ]'*b => [ a0*b',a1*b',
+ const E_Array & a= ta ? *tea->v : *ea;
+ int na=a.size();
+ AC_F0 v;
+ v = 0; // empty
+ C_F0 b =ta ? TryConj(args[1]) :args[1];
+ for (int i=0;i<na;++i)
+ v += C_F0(TheOperators,"*",a[i],b) ;
+ return ta ? C_F0(TheOperators,"\'",C_F0(TheOperators,"[]",v)) : C_F0(TheOperators,"[]",v);
+
+ }
+ else if(eb || teb)
+ { // modif 2 /08/ 2013 FH .. bug in a*[ b0,b1,... ]'
+ const E_Array & b= tb ? *teb->v : *eb;
+ int nb=b.size();
+ C_F0 a =tb ? TryConj(args[0]) :args[0];
+ AC_F0 v;
+ v = 0; // empty
+ for (int i=0;i<nb;++i)
+ v += C_F0(TheOperators,"*",a,b[i]) ;
+ return tb ? C_F0(TheOperators,"\'",C_F0(TheOperators,"[]",v)) : C_F0(TheOperators,"[]",v);
+
+ }
+ else ffassert(0);
+ /*
+ cout << " formal : array or matrix : [ .. ] : [ .. ] " << na << "x" << nb << endl;
+ cout << " formal : array or matrix : [ .. ] : [ .. ] " << endl;
+ cout << " first array : matrix " << maa << " trans " << ta << " " << na << "x" << ma <<endl;
+ cout << " second array : matrix " << mab << " trans " << tb << " " << nb << "x" << mb <<endl;
+ CompileError(" not implemented sorry ..... (FH) to do ???? ");
+
+ */
+ return C_F0();
+}
+
+
+C_F0 opSum::code2(const basicAC_F0 &args) const
+{
+
+ bool ta =args[0].left()==atype<TransE_Array>();
+ bool tb = args[1].left()==atype<TransE_Array>();
+ const TransE_Array * tea=0;
+ const TransE_Array * teb=0;
+ const E_Array * ea=0;
+ const E_Array * eb=0;// E_F0
+ if( ta) tea = dynamic_cast<const TransE_Array*>((Expression) args[0]);
+ else ea = dynamic_cast<const E_Array*>((Expression) args[0]);
+ if( tb) teb = dynamic_cast<const TransE_Array*>((Expression) args[1]);
+ else eb = dynamic_cast<const E_Array*>((Expression) args[1]);
+ assert( ea || tea );
+ assert( eb || teb );
+ const E_Array & a= ta ? *tea->v : *ea;
+ const E_Array & b= tb ? *teb->v : *eb;
+ int na=a.size();
+ int nb=b.size();
+ if(na != nb) CompileError(" formal [ [...] [] ] : [ [..], [..] , ... ] ");
+
+
+ AC_F0 v;
+ v = 0; // empty
+ for (int i=0;i<na;++i)
+ v += C_F0(TheOperators,op,ta ? TryConj(a[i]) : a[i],tb ? TryConj(b[i]): b[i]) ;
+ return C_F0(TheOperators,"[]",v);
+
+}
+
+
+
+
+
+
diff --cc src/fflib/AFunction.hpp
index 07becb4,5470c9d..84ee565
--- a/src/fflib/AFunction.hpp
+++ b/src/fflib/AFunction.hpp
@@@ -1829,7 -1825,7 +1825,7 @@@ inline Type_Expr NewVariable(aType t,s
size_t o= align8(off);// align
// off += t->un_ptr_type->size;
// bug off += t->size;
-- off += t->un_ptr_type->size; // correction 16/09/2003 merci � Richard MICHEL
++ off += t->un_ptr_type->size; // correction 16/09/2003 merci � Richard MICHEL
return Type_Expr(t,new T(o,t));
}
diff --cc src/fflib/AFunction.hpp.orig
index 07becb4,5470c9d..3e4ac8d
--- a/src/fflib/AFunction.hpp.orig
+++ b/src/fflib/AFunction.hpp.orig
@@@ -1584,11 -1584,7 +1584,15 @@@ class basicAC_F0_wa : public basicAC_F
a= new C_F0[nb];
a[0]=e;
for (int i=1;i<nb;i++) a[i]=b[i-1];}
++<<<<<<< HEAD
+ ~basicAC_F0_wa(){delete [] a;
+ a=0;
+ delete named_parameter;
+ named_parameter=0;}
+
++=======
+ ~basicAC_F0_wa(){delete [] a;}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
basicAC_F0_wa(const basicAC_F0 & b) {
named_parameter=0;
@@@ -3204,7 -3200,7 +3208,11 @@@ inline int E_F0::find(const MapOfE_F
return rr;
}
++<<<<<<< HEAD
+extern queue<pair<const E_Routine*,int> > * debugstack;
++=======
+ extern queue<pair<const E_Routine*,int> > debugstack;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
struct NothingType { // a type to do nothing
NothingType() {};
diff --cc src/fflib/AFunction2.cpp
index 5aebc32,e42468d..0b41582
--- a/src/fflib/AFunction2.cpp
+++ b/src/fflib/AFunction2.cpp
@@@ -265,7 -265,7 +265,7 @@@ C_F0::C_F0(const Polymorphic * pop,cons
OneOperator::~OneOperator(){
OneOperator * d=next;
next=0;
-- if(! CodeAlloc::cleanning) // hash FH (pour les fuite de m�moire)
++ if(! CodeAlloc::cleanning) // hash FH (pour les fuite de m�moire)
while(d)
{
OneOperator * dd=d->next;
diff --cc src/fflib/AFunction2.cpp.orig
index 5aebc32,e42468d..9658a8e
--- a/src/fflib/AFunction2.cpp.orig
+++ b/src/fflib/AFunction2.cpp.orig
@@@ -44,7 -44,7 +44,11 @@@
#include "rgraph.hpp"
#include "InitFunct.hpp"
++<<<<<<< HEAD
+queue<pair<const E_Routine*,int> > *debugstack=0;
++=======
+ queue<pair<const E_Routine*,int> > debugstack;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
class vectorOfInst : public E_F0mps { public:
@@@ -712,7 -712,7 +716,11 @@@ struct CleanE_Routine
};
AnyType E_Routine::operator()(Stack s) const {
++<<<<<<< HEAD
+ debugstack->push(pair<const E_Routine*,int>(this,TheCurrentLine));
++=======
+ debugstack.push(pair<const E_Routine*,int>(this,TheCurrentLine));
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
const int lgsave=BeginOffset*sizeof(void*);
char save[lgsave];
AnyType ret=Nothing;
@@@ -734,7 -734,7 +742,11 @@@
ret=(*code)(s); }
catch( E_exception & e) {
// cout << " catch " << e.what() << " clean & throw " << endl;
++<<<<<<< HEAD
+ if (e.type() == E_exception::e_return)
++=======
+ if (e.type() == E_exception::e_return)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
ret = e.r;
else
ErrorExec("E_exception: break or contine not in loop ",1);
@@@ -744,16 -744,16 +756,26 @@@
(*clean)(s);
WhereStackOfPtr2Free(s)->clean(); // FH mars 2005
memcpy(s,save,lgsave); // restore
++<<<<<<< HEAD
+ TheCurrentLine=debugstack->front().second;
+ debugstack->pop();
++=======
+ TheCurrentLine=debugstack.front().second;
+ debugstack.pop();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
throw ;
}
(*clean)(s); // the clean is done in CleanE_Routine delete .
// delete [] listparam; after return
memcpy(s,save,lgsave); // restore
++<<<<<<< HEAD
+ TheCurrentLine=debugstack->front().second;
+ debugstack->pop();
++=======
+ TheCurrentLine=debugstack.front().second;
+ debugstack.pop();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
// il faudrait que les variable locale soit detruire apres le return
// cf routine clean, pour le cas ou l'on retourne un tableau local.
// plus safe ????? FH. (fait 2008)
@@@ -858,14 -858,13 +880,24 @@@ void ShowDebugStack(
cerr << " current line = " << TheCurrentLine
<< " mpirank " << mpirank << " / " << mpisize <<endl;
else
++<<<<<<< HEAD
+ cerr << " current line = " << TheCurrentLine << endl;
+ if(debugstack)
+ while ( debugstack->size() )
+ {
+
+ cerr << " call " << debugstack->front().first->name<< " at line "
+ <<debugstack->front().second << endl;
+ debugstack->pop();
++=======
+ cerr << " current line = " << TheCurrentLine << endl;
+ while ( debugstack.size() )
+ {
+
+ cerr << " call " << debugstack.front().first->name<< " at line "
+ <<debugstack.front().second << endl;
+ debugstack.pop();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
}
}
diff --cc src/fflib/InitFunct.hpp.orig
index 291b75c,0000000..7d2f6a7
mode 100644,000000..100644
--- a/src/fflib/InitFunct.hpp.orig
+++ b/src/fflib/InitFunct.hpp.orig
@@@ -1,80 -1,0 +1,84 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifndef INITSFUNCT_HPP_
+#define INITSFUNCT_HPP_
+#include "ffapi.hpp"
+
+void addInitFunct(int i,void (* f)(),const char *name) ;
+void callInitsFunct() ;
+
+class addingInitFunct { public:
+ addingInitFunct(int i,void (* f)(),const char *name="") { addInitFunct(i,f,name);}
+} ;
+
+//
+#if WIN32
+#define LOADINITIO { \
+ streambuf * so =ffapi::cout()->rdbuf() ; \
+ streambuf * si =ffapi::cin()->rdbuf() ; \
+ streambuf * se =ffapi::cerr()->rdbuf() ; \
+ if( so && cout.rdbuf() != so ) cout.rdbuf(so); \
+ if( si && cin.rdbuf() != si ) cin.rdbuf(si); \
+ if( se && cerr.rdbuf() != se ) cerr.rdbuf(se); \
+}
+#else
+#define LOADINITIO { \
+ streambuf * so =ffapi::cout()->rdbuf() ; \
+ streambuf * si =ffapi::cin()->rdbuf() ; \
+ streambuf * se =ffapi::cerr()->rdbuf() ; \
+ if( so && cout.rdbuf() != so ) cout.rdbuf(so); \
+ if( si && cin.rdbuf() != si ) cin.rdbuf(si); \
+ if( se && cerr.rdbuf() != se ) cerr.rdbuf(se); \
+ stdout = ffapi::ffstdout();\
+ stderr = ffapi::ffstderr();\
+ stdin = ffapi::ffstdin();\
+}
+#endif
+
+
+#define LOADINITNM(EXEC,NM) \
+ static void AutoLoadInit() { LOADINITIO ; \
+ if(verbosity>9) cout << "\n loadfile " NM "\n" ; \
+ EXEC; } \
+ int DoLoadInit() { \
+ if(verbosity>9) \
+ cout << " **** " << NM << " ****\n" ; \
+ addInitFunct(10000,&AutoLoadInit,NM); \
+ return 2;} \
+ \
+ static int callDoLoadInit=DoLoadInit();
+
++<<<<<<< HEAD
+#define LOADINIT(TI) LOADINITNM(TI init obsolete,__FILE__)
++=======
++#define LOADINIT(TI) LOADINITNM(TI init,__FILE__)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+#define LOADFUNC(FC) LOADINITNM(FC() ,__FILE__)
+
+
+#endif
diff --cc src/fflib/Makefile.am.orig
index 0626f37,0000000..1695523
mode 100644,000000..100644
--- a/src/fflib/Makefile.am.orig
+++ b/src/fflib/Makefile.am.orig
@@@ -1,68 -1,0 +1,75 @@@
+# Makefile using Automake + Autoconf
+# ----------------------------------
+# $Id$
+
+noinst_LIBRARIES=libff.a
+
+# FFCS - 28/11/11 - ffapi.cpp cannot be part of libff.a because it
+# needs to be compiled with different options depending on the
+# executable it is included in (eg with/without MPI)
+
+libff_a_SOURCES2= UMFPack_Solver.cpp \
+AFunction.cpp AFunction2.cpp \
+ array_long.cpp array_real.cpp array_complex.cpp \
+lex.cpp lgmesh.cpp lgmesh3.cpp \
+CodeAlloc.cpp lgmat.cpp global.cpp \
+../femlib/Drawing.cpp ../femlib/gibbs.cpp \
+../femlib/CheckPtr.cpp ../femlib/fem.cpp \
+../femlib/QuadratureFormular.cpp ../femlib/FESpace.cpp \
+../femlib/Element_RT.cpp ../femlib/mshptg.cpp ../femlib/FQuadTree.cpp \
+../bamglib/QuadTree.cpp ../bamglib/R2.cpp ../bamglib/Meshio.cpp \
+../bamglib/Mesh2.cpp ../bamglib/Metric.cpp ../femlib/BamgFreeFem.cpp \
+../bamglib/MeshDraw.cpp ../bamglib/MeshGeom.cpp \
+../bamglib/MeshQuad.cpp ../bamglib/SetOfE4.cpp ../bamglib/MeshRead.cpp \
++<<<<<<< HEAD
+../bamglib/write_hdf5.cpp ../bamglib/write_hdf5.hpp ../bamglib/write_xdmf.cpp \
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+../bamglib/MeshWrite.cpp problem.cpp mt19937ar.cpp \
+../Graphics/DefColor.cpp \
+ InitFunct.cpp ../Algo/lgalgo.cpp \
+../femlib/Element_P2h.cpp load.cpp lgfem.cpp AFunction.hpp AnyType.hpp \
+error.hpp ../femlib/gmres.hpp InitFunct.hpp lex.hpp lgfem.hpp lgmesh3.hpp \
+lgmesh.hpp lgsolver.hpp \
+Operator.hpp problem.hpp Serialize.hpp showverb.hpp String.hpp \
+throwassert.hpp versionnumber.hpp CodeAlloc.hpp \
+array_init.hpp array_tlp.hpp array_resize.hpp \
+strversionnumber.hpp ffstack.hpp AddNewFE.h \
+environment.cpp environment.hpp string_def.cpp \
+../femlib/FESpacen.cpp \
+../femlib/P012_1d.cpp \
+../femlib/P012_2d.cpp \
+../femlib/P012_3d.cpp \
+../femlib/Mesh1dn.cpp \
+../femlib/Mesh2dn.cpp \
+../femlib/Mesh3dn.cpp \
+../femlib/GQuadTree.cpp \
+../femlib/libmesh5.c \
+glumesh2D.cpp \
+PlotStream.hpp \
+endian.hpp \
+ff++.hpp \
+../Eigen/arpackff.hpp \
+../femlib/splitsimplex.cpp AFunction_ext.hpp \
+ffapi.hpp P1IsoValue.cpp P1IsoValue.hpp
+
+libff_a_SOURCES=$(libff_a_SOURCES2) strversionnumber.cpp
+
+# eigenvalue.cpp is optional (see configure.ac)
+EXTRA_libff_a_SOURCES=../Eigen/eigenvalue.cpp
+libff_a_LIBADD=@EIGENOBJ@
+libff_a_DEPENDENCIES=@EIGENOBJ@
+
++<<<<<<< HEAD
+AM_CPPFLAGS=-I$(srcdir)/../lglib -I$(srcdir)/../bamglib -I$(srcdir)/../Graphics -I$(srcdir)/../femlib $(HDF5_CPPFLAGS)
++=======
++AM_CPPFLAGS=-I$(srcdir)/../lglib -I$(srcdir)/../bamglib -I$(srcdir)/../Graphics -I$(srcdir)/../femlib
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+# -I$(top_srcdir)/arpack/arpack++/include
+
+# Build date changes at every change
+EXTRA_DIST=strversionnumber.m4
+BUILT_SOURCES=strversionnumber.cpp
+strversionnumber.cpp: $(libff_a_SOURCES2) ../../configure
+ m4 -DVersionFreeFemDate="`date`" strversionnumber.m4 > $@
+FORCE:
diff --cc src/fflib/P1IsoValue.cpp.orig
index 8d27ce6,0000000..8ae3a16
mode 100644,000000..100644
--- a/src/fflib/P1IsoValue.cpp.orig
+++ b/src/fflib/P1IsoValue.cpp.orig
@@@ -1,434 -1,0 +1,469 @@@
+//
+// P1IsoValue.cpp
+// ff
+//
+// Created by Frédéric Hecht on 07/03/2014.
+//
+//
+#include <cassert>
+#include <cmath>
+using namespace std;
+#include "P1IsoValue.hpp"
+using namespace Fem2D;
+extern long verbosity;
+//typedef double R;
+
+inline R3 bary(const R3 K[4],R f[4],int i0,int i1,R v)
+{
+ R d=f[i0]-f[i1];
+ assert(fabs(d)>1e-20);
+ R l1= (f[i0] - v)/ d; // == 1 si v = f[i1]
+ R l0 = 1. -l1;
+ assert(l0 >=-1e-10 && l1 >= -1e-10);
+ return K[i0]*l0 + K[i1]*l1; // == K[i1] si l1 ==1 => v = f[i1]
+}
+
+inline R2 bary(const R2 K[3],R f[3],int i0,int i1,R v)
+{
+ R d=f[i0]-f[i1];
+ assert(fabs(d)>1e-20);
+ R l1= (f[i0] - v)/ d; // == 1 si v = f[i1]
+ R l0 = 1. -l1;
+ assert(l0 >=-1e-10 && l1 >= -1e-10);
+ return K[i0]*l0 + K[i1]*l1; // == K[i1] si l1 ==1 => v = f[i1]
+}
+
+static inline int signep4(int i0,int i1,int i2,int i3)
+{ // calcul du signe dans la permutation
+ int s =1;
+ if(i0>i1) s=-s,Exchange(i0,i1);
+ if(i1>i2) s=-s,Exchange(i1,i2);
+ if(i2>i3) s=-s,Exchange(i2,i3); // i3 max
+ if(i0>i1) s=-s,Exchange(i0,i1);
+ if(i1>i2) s=-s,Exchange(i1,i2); // i2 max < i
+ if(i0>i1) s=-s,Exchange(i0,i1);
+ return s;
+}
+inline int signe_permutation(int i0,int i1,int i2,int i3)
+{
+ int p=1;
+ if(i0>i1) Exchange(i0,i1), p = -p;
+ if(i0>i2) Exchange(i0,i2), p = -p;
+ if(i0>i3) Exchange(i0,i3), p = -p;
+ if(i1>i2) Exchange(i1,i2), p = -p;
+ if(i1>i3) Exchange(i1,i3), p = -p;
+ if(i2>i3) Exchange(i2,i3), p = -p;
+ return p;
+}
+inline void pen23tet(R3 P[6],R3 Q[3][4])
+{
+ //int d1[3][4]= { {1,6,2,3}, {1,5,2,6}, {1,6,4,5}};
+ int d0[3][4]= { {0,5,1,2}, {0,4,1,5}, {0,5,3,4}};
+ /* the 6 way to spilt a pent en tet ...
+ DATA PDD /1,0,2,3,4,5,0,6/
+ DATA (MU(I, 1),I=1,12) /1,6,2,3, 1,5,2,6, 1,6,4,5/
+ DATA (MU(I, 2),I=1,12) /1,6,2,3, 1,4,2,6, 2,6,4,5/
+ DATA (MU(I, 3),I=1,12) /1,4,2,3, 2,6,3,4, 2,6,4,5/
+ DATA (MU(I, 4),I=1,12) /1,5,2,3, 1,5,3,6, 1,6,4,5/
+ DATA (MU(I, 5),I=1,12) /1,5,2,3, 1,5,3,4, 3,6,4,5/
+ DATA (MU(I, 6),I=1,12) /1,4,2,3, 2,5,3,4, 3,6,4,5/
+ */
+ for(int k=0; k<3; ++k)
+ for(int i=0; i<4;++i)
+ Q[k][i]=P[d0[k][i]];
+}
++<<<<<<< HEAD
+int UnderIso(double *f,R2 Q[2][3] ,double area2[2], double eps)
++=======
++int UnderIso(double *f,R2 Q[2][3] ,double area2[2], const double eps)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ const R2 *K = R2::KHat;
+ const int p1[]= {1,2,0};
+ const int p2[]= {2,0,1};
+ R v=0;
+ // build the negative tetra under zero iso value of f ..
+ double fmx=f[0], fmn=f[0];
+ fmx = std::max(fmx,f[1]);
+ fmn = std::min(fmn,f[1]);
+ fmx = std::max(fmx,f[2]);
+ fmn = std::min(fmn,f[2]);
+ if( fmn >= v - eps)
+ {
+ area2[0]=1;
+ return 0; // no intersection ..
+ }
+ if( fmx <= v+ eps)
+ {
+ area2[0]=1;
+ return 1;
+ }; // full triz ..
+
+ int np[4],nm[4];
+ int km=0,kp=0;
+
+ int ntria=0;
+ for (int i=0;i<3;++i)
+ {
+ if(f[i]<=v+eps) nm[km++]=i;
+ else np[kp++] = i;
+ }
+ if(km == 0)
+ {
+ area2[0]=0;
+ return 0;
+ }
+ else if( km == 1)
+ { // 1 tet j, j+1, j+2, j+3
+ int j0=nm[0];
+ int j1=p1[j0], j2=p2[j0];
+ Q[0][0]=K[j0];
+ Q[0][1]=bary(K,f,j0,j1,v);
+ Q[0][2]=bary(K,f,j0,j2,v);
+ ntria=1;
+ }
+ else if( km == 2)
+ {// 1 prisme
+ ntria=2;
+ int j0 = np[0];
+ int j1=p1[j0], j2=p2[j0];
+ R2 Q1=bary(K,f,j0,j1,v);
+ R2 Q2=bary(K,f,j0,j2,v);
+ Q[0][0]=K[j1];
+ Q[0][1]=K[j2];
+ Q[0][2]=Q2;
+ Q[1][0]=K[j1];
+ Q[1][1]=Q2;
+ Q[1][2]=Q1;
+ }
+ else if( km == 3)
+ {
+ area2[0]=1;
+ return 1;
+ }
+ // vol computation
+ for(int k=0; k< ntria; ++k)
+ {
+ area2[k]=det(Q[k][0],Q[k][1],Q[k][2]);
+ //cout <<area2[k] << endl;
+ assert(area2[k] >= - eps);
+ }
+
+ return ntria;
+
+}
++<<<<<<< HEAD
+int UnderIso(double *f,R3 Q[3][4] ,double vol6[3], double eps)
++=======
++int UnderIso(double *f,R3 Q[3][4] ,double vol6[3], const double eps)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ const R3 *K = R3::KHat;
+ const int p1[]= {1,2,3,0};
+ const int p2[]= {2,0,0,2};
+ const int p3[]= {3,3,1,1};
+ R v=0;
+ // build the negative tetra under zero iso value of f ..
+ double fmx=f[0], fmn=f[0];
+ fmx = std::max(fmx,f[1]);
+ fmn = std::min(fmn,f[1]);
+ fmx = std::max(fmx,f[2]);
+ fmn = std::min(fmn,f[2]);
+ fmx = std::max(fmx,f[3]);
+ fmn = std::min(fmn,f[3]);
+ if( fmn >= v - eps)
+ {
+ vol6[0]=1;
+ return 0; // no intersection ..
+ }
+ if( fmx <= v+ eps)
+ {
+ vol6[0]=1;
+ return 1;
+ }; // full tet ..
+
+ // hard case ..
+// count number
+ vol6[0]=1;
+
+ int np[4],nm[4];
+ int km=0,kp=0;
+
+ int ntet=0;
+ for (int i=0;i<4;++i)
+ {
+ if(f[i]<=v+eps) nm[km++]=i;
+ else np[kp++] = i;
+ }
+ if(km == 0)
+ {
+ vol6[0]=0;
+ return 0;
+ }
+ else if( km == 1)
+ { // 1 tet j, j+1, j+2, j+3
+ int j0=nm[0];
+ int j1=p1[j0], j2=p2[j0], j3=p3[j0];
+ Q[0][0]=K[j0];
+ Q[0][1]=bary(K,f,j0,j1,v);
+ Q[0][2]=bary(K,f,j0,j2,v);
+ Q[0][3]=bary(K,f,j0,j3,v);
+ ntet=1;
+ }
+ else if( km == 2)
+ {// 1 prisme i0,i1, j0,j1, k0, k0
+ ntet=3;
+ int i0=nm[0];
+ int i1=nm[1];
+ int k0=np[0];
+ int k1=np[1];
+ if(signe_permutation(i0,i1,k0,k1)<0)
+ std::swap(k0,k1);
+
+ R3 P[6];
+ P[0]=K[i0];
+ P[1]=bary(K,f,i0,k0,v);
+ P[2]=bary(K,f,i0,k1,v);
+ P[3]=K[i1];
+ P[4]=bary(K,f,i1,k0,v);
+ P[5]=bary(K,f,i1,k1,v);
+ pen23tet(P,Q);
+
+ }
+ else if( km == 3)
+ { // prisme
+ ntet=3;
+ int k0=np[0];
+ int i1=p1[k0];
+ int i2=p2[k0];
+ int i3=p3[k0];
+ assert(signe_permutation(k0,i1,i2,i3)>0);
+ R3 P[6];
+ P[3]=K[i1];
+ P[4]=K[i2];
+ P[5]=K[i3];
+ P[0]=bary(K,f,i1,k0,v);
+ P[1]=bary(K,f,i2,k0,v);
+ P[2]=bary(K,f,i3,k0,v);
+ pen23tet(P,Q);
+
+
+ }
+ else if( km == 4)
+ {
+ vol6[0]=1;
+ return 1;
+ }
+// vol computation
+ for(int k=0; k< ntet; ++k)
+ {
+ vol6[k]=det(Q[k][0],Q[k][1],Q[k][2],Q[k][3]);
+ assert(vol6[k] >= - eps);
+ if( vol6[k] <eps && verbosity> 99 )
+ cout <<k << " bizarre " << km << " "
+ << Q[k][0]<< " "
+ << Q[k][1]<< " "
+ <<Q[k][2]<< " "
+ << Q[k][3]<< endl;
+ }
+
+ return ntet;
+}
+
++<<<<<<< HEAD
+int IsoLineK(double *f,Fem2D::R3 *Q, double eps)
++=======
++int IsoLineK(double *f,Fem2D::R3 *Q,const double eps)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+
+ static const int nvfaceTet[4][3] ={{3,2,1}, {0,2,3},{ 3,1,0},{ 0,1,2}} ;
+
+ const R3 *K=R3::KHat;
+ int kv=0,vk[4],tv[4],kf;
+ for(int i=0;i<4;++i)
+ {
+ if( abs(f[i]) <= eps)
+ {
+ tv[kv++]=i;
+ vk[i]=1;
+ }
+ else
+ vk[kf=i]=0;
+ }
+ if(kv==3)
+ {
+ // cout << " full face " << kf << endl;
+ // a face complete kf..
+ // warning
+ int i1=1,i2=2;
+ if(f[kf] <0) i1=2,i2=1;
+ Q[0]=K[nvfaceTet[kf][0]];
+ Q[1]=K[nvfaceTet[kf][i1]];
+ Q[2]=K[nvfaceTet[kf][i2]];
+
+ return (f[kf] >0) ? 3:0;// to take one fulL face not to times ...
+ }
+
+ R v=0;
+ int nP=0;
+ int np[4],nm[4],nps[4],nms[4];;
+ int km=0,kp=0,kms=0,kps=0;
+
+ for (int i=0;i<4;++i)
+ {
+ if(f[i]<=v+eps) nm[km++]=i;
+ if(f[i]>=v-eps) np[kp++]=i;
+ // strict ..
+ if(f[i]<v-eps) nms[kms++]=i;
+ if(f[i]>v+eps) nps[kps++]=i;
+ }
+
+ // cout << "IsoLineK: km kp "<< km << " " << kp << endl;
+ int h=-1,b[3];
+ if(kps==1 && km==3)
+ {
+ h = nps[0];
+ b[0]=nvfaceTet[h][0];
+ b[1]=nvfaceTet[h][1];
+ b[2]=nvfaceTet[h][2];
+ }
+ if(kms==1 && kp == 3)
+ {
+ h = nms[0];
+ b[0]=nvfaceTet[h][0];
+ b[2]=nvfaceTet[h][1];
+ b[1]=nvfaceTet[h][2];
+ }
+ if(kp==2 && km==2)
+ {// cas quad
+ if(signep4(nm[0],nm[1],np[0],np[1]) < 0)
+ Exchange(nm[0],nm[1]);
+ Q[0]=bary(K,f,nm[0],np[0],v);
+ Q[1]=bary(K,f,nm[0],np[1],v);
+ Q[2]=bary(K,f,nm[1],np[1],v);
+ Q[3]=bary(K,f,nm[1],np[0],v);
+ nP=4;
+ }
+ else if (h>=0)
+ { // cas triangle
+ Q[0]=bary(K,f,h,b[0],v);
+ Q[1]=bary(K,f,h,b[1],v);
+ Q[2]=bary(K,f,h,b[2],v);
+ nP=3;
+ }
+
+ return nP;
+}
+
++<<<<<<< HEAD
+int IsoLineK(double *f,Fem2D::R2 *Q, double eps)
++=======
++int IsoLineK(double *f,Fem2D::R2 *Q,const double eps)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ int debug=0;
+ R2 P[3]={ R2(0.,0.),R2(1.,0.),R2(0.,1.)};
+ int kv=0,ke=0,e=3;
+ int tv[3],te[3],vk[3],i0[3],i1[3];
+ for(int i=0;i<3;++i)
+ {
+ if( abs(f[i]) <= eps) {
+ e -= tv[kv++]=i;
+ vk[i]=1;
+ }
+ else
+ vk[i]=0;
+ }
+ if(debug) cout << " ** " << kv << endl;
+ if(kv>1) // on 2 vertex on the isoline ....
+ {
+ if(kv==2)
+ {
+ if(f[e] > 0.)
+ {
+ int j0=(e+1)%3;
+ int j1=(e+2)%3;
+ te[ke]=e+3,i0[ke]=j0,i1[ke]=j0,++ke;
+ te[ke]=e,i0[ke]=j1,i1[ke]=j1,++ke;
+ // pb d'unicity, need to see the adj triangle ...
+ //return 10+e ; // edge number + 10
+ }
+ else return 0; // skip edge ...
+
+ }
+ else return 0; // const funct...
+ }
+ else // see internal edge ..
++<<<<<<< HEAD
+ for(int ee=0;ee<3;++ee)
+ {
+ int j0=(ee+1)%3;
+ int j1=(ee+2)%3;
+ if( vk[j0]) // the intial point on iso line
+ {
+ if(0. < f[j1])
+ te[ke]=ee,i0[ke]=j0,i1[ke]=j0,++ke;
+ else
+ te[ke]=ee+3,i0[ke]=j0,i1[ke]=j0,++ke;
+ }
+ else if (vk[j1]); // skip the final point on iso line
+ else if( f[j0] < 0. && 0. < f[j1]) // good sens
+ te[ke]=ee,i0[ke]=j0,i1[ke]=j1,++ke;
+ else if ( f[j0] > 0. && 0. > f[j1]) // inverse sens
+ te[ke]=ee+3,i0[ke]=j1,i1[ke]=j0,++ke;
++=======
++ for(int e=0;e<3;++e)
++ {
++ int j0=(e+1)%3;
++ int j1=(e+2)%3;
++ if( vk[j0]) // the intial point on iso line
++ {
++ if(0. < f[j1])
++ te[ke]=e,i0[ke]=j0,i1[ke]=j0,++ke;
++ else
++ te[ke]=e+3,i0[ke]=j0,i1[ke]=j0,++ke;
++ }
++ else if (vk[j1]); // skip the final point on iso line
++ else if( f[j0] < 0. && 0. < f[j1]) // good sens
++ te[ke]=e,i0[ke]=j0,i1[ke]=j1,++ke;
++ else if ( f[j0] > 0. && 0. > f[j1]) // inverse sens
++ te[ke]=e+3,i0[ke]=j1,i1[ke]=j0,++ke;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ }
+ if( ke==2)
+ {
+ // the K[i1[0]] , Q[0], Q[1] must be direct ...
+ // the K[i0[1]] , Q[0], Q[1] must be direct ...
+ // Warning no trivail case .. make a plot to see
+ // with is good
+ // the first edge must be
+
+ if(te[0]<3) // oriente the line
+ {
+ assert(te[1] >=3);
+ std::swap(te[0],te[1]);
+ std::swap(i0[0],i0[1]);
+ std::swap(i1[0],i1[1]);
+ if(debug) cout << " swap " << endl;
+ }
+ for(int i=0;i<2;++i)
+ {
+ int j0=i0[i],j1=i1[i];
+ if( j0== j1)
+ Q[i] = P[j0];
+ else
+ Q[i] = (P[j0]*(f[j1]) - P[j1]*(f[j0]) ) /(f[j1]-f[j0]);
+ if(debug) cout << i << " " << j0 << " " << j1 << " : "
+ << Q[i] << "***" << endl;
+ }
+ if(!vk[i1[0]])
+ assert( det(P[i1[0]],Q[0],Q[1]) > 0);
+ if(!vk[i0[1]])
+ assert( det(P[i0[1]],Q[1],Q[0]) > 0);
+ return 2;
+ }
+ // remark, the left of the line is upper .
+ return 0;
+}
diff --cc src/fflib/P1IsoValue.hpp.orig
index 76ce7c0,0000000..1feea0a
mode 100644,000000..100644
--- a/src/fflib/P1IsoValue.hpp.orig
+++ b/src/fflib/P1IsoValue.hpp.orig
@@@ -1,49 -1,0 +1,56 @@@
+//
+// P1IsoValue.h
+// ff
+//
+// Created by Frédéric Hecht on 07/03/2014.
+//
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#ifndef __ff__P1IsoValue__
+#define __ff__P1IsoValue__
+
+#include <cmath>
+#include <cstdlib>
+#include <iostream>
+
+
+#include "ufunction.hpp"
+namespace Fem2D
+{
+#include "R3.hpp"
+}
++<<<<<<< HEAD
+int IsoLineK(double *f,Fem2D::R3 *Q, double eps);
+int IsoLineK(double *f,Fem2D::R2 *Q, double eps);
+int UnderIso(double *f,Fem2D::R3 Q[3][4] ,double vol[3], double eps);
+int UnderIso(double *f,Fem2D::R2 Q[2][3] ,double area[2], double eps);
++=======
++int IsoLineK(double *f,Fem2D::R3 *Q,const double eps);
++int IsoLineK(double *f,Fem2D::R2 *Q,const double eps);
++int UnderIso(double *f,Fem2D::R3 Q[3][4] ,double vol[3], const double eps);
++int UnderIso(double *f,Fem2D::R2 Q[2][3] ,double area[2], const double eps);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+
+
+#endif /* defined(__ff__P1IsoValue__) */
diff --cc src/fflib/array_tlp.hpp.orig
index 01f6d79,0000000..811e969
mode 100644,000000..100644
--- a/src/fflib/array_tlp.hpp.orig
+++ b/src/fflib/array_tlp.hpp.orig
@@@ -1,1451 -1,0 +1,1464 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+//#pragma dont_inline on
+//#pragma inline_depth(1)
+
+#include "config-wrapper.h"
+
+#include <complex>
+#include "AFunction.hpp"
+#include <cstdarg>
+#include <cstring>
+#include "error.hpp"
+#include "lex.hpp"
+
+#include "RNM.hpp"
+
+#include "Operator.hpp"
+// for exec routine
+#include "rgraph.hpp"
+#include "InitFunct.hpp"
+#include <queue>
+#include "array_resize.hpp"
+#include "HeapSort.hpp"
+
+template <class T>
+struct affectation: binary_function<T, T, T>
+{
+ T& operator()(T& x, const T& y) const {return (x=y);}
+};
+
+template <class T>
+struct affectation_add: binary_function<T, T, T>
+{
+ T& operator()(T& x, const T& y) const {return (x+=y);}// correct FH 25/10/2013
+};
+
+template <class T>
+struct affectation_sub: binary_function<T, T, T>
+{
+ T& operator()(T& x, const T& y) const {return (x-=y);}// correct FH 25/10/2013
+};
+
+
+
+extern Map_type_of_map map_type_of_map ; // to store te type
+extern Map_type_of_map map_pair_of_type ; // to store te type
+
+extern basicForEachType * typevarreal, * typevarcomplex; // type of real and complex variable
+
+extern int TheCurrentLine; // unset: by default
+extern long mpisize,mpirank;
+
+template<class T> inline T Max (const T &a,const T & b){return a > b ? a : b;}
+template<class T> inline T Min (const T &a,const T & b){return a < b ? a : b;}
+template<class T> inline T Abs (const T &a){return a <0 ? -a : a;}
+template<class T> inline T Max (const T &a,const T & b,const T & c){return Max(Max(a,b),c);}
+template<class T> inline T Min (const T &a,const T & b,const T & c){return Min(Min(a,b),c);}
+template<class T> inline T Square (const T &a){return a*a;}
+
+
+
+template<class K>
+struct Op2_dotproduct: public binary_function<Transpose<KN_<K> >,KN<K> *,K> {
+ static K f( Transpose<KN_<K> > const & a, KN<K> * const& b)
+ { return (conj(a.t),*b);} };
+
+template<class K>
+struct Op2_dotproduct_: public binary_function<Transpose<KN_<K> >,KN_<K> ,K> {
+ static K f( Transpose<KN_<K> > const & a, KN_<K> const& b)
+ { return (conj(a.t),b);} };
+
+template<class A,class B> A Build(B b) { return A(b);}
+
+template<class T>
+void HeapSort(T *c,long n,long o)
+{ // trie un tableau c de n valeur avec un decalage de o.
+ // le tableau: c[i*o] , pour i = 0 a n-1
+ long l,j,r,i;
+ T crit;
+ c-=o; // on decale de o pour que le tableau commence a o
+ if( n <= 1) return;
+ l = (n/2 + 1)*o;
+ r = n*o;
+ while (1) { // label 2
+ if(l <= o ) { // label 20
+ crit = c[r];
+ c[r] = c[o];
+ r-=o;
+ if ( r == o ) { c[o]=crit; return;}
+ } else crit = c[l-=o];
+ j=l;
+ while (1) {// label 4
+ i=j;
+ j=2*j;
+ if (j>r) {c[i]=crit;break;} // L8 -> G2
+ if ((j<r) && (c[j] < c[j+o])) j+=o; // L5
+ if (crit < c[j]) c[i]=c[j]; // L6+1 G4
+ else {c[i]=crit;break;} //L8 -> G2
+ }
+ }
+}
+
+template<class R,class A> A SortKn(const A & ca)
+{
+ A a(ca);
+ HeapSort<R>(&a[0],a.n,a.step);
+ return a;}
+
+template<class R,class RR,class A,class B> A SortKn(const A & ca,const B & cb)
+{
+ cout << "SortKn " << endl;
+ const A &a(ca);
+ const B &b(cb);
+ ffassert(a.n == b.n);
+ ffassert(a.step == b.step && b.step ==1);
+ HeapSort<R,RR>(&a[0],&b[0],a.n);
+ cout << b << endl;
+return a;}
+
+template<class R,class RR> KN<R> * SortpKn2( KN<R> * const & pa,KN<RR> * const & pb){
+ // cout << " SortpKn2 " << endl;
+ KN<R> &a(*pa);
+ KN<RR> &b(*pb);
+ ffassert(a.n == b.n);
+ ffassert(a.step == b.step && b.step ==1);
+ HeapSort<R,RR>(&a[0],&b[0],a.n);
+ return pa;}
+
+template<class R> KN<R> * SortpKn( KN<R> * const & pa){
+ KN<R> &a(*pa);
+ HeapSort<R>(&a[0],a.n,a.step);
+ return pa;}
+
+template<class R>
+class QuantileKN: public KN_<R> { public:
+ QuantileKN(const KN_<R> &a): KN_<R>(a) {}
+ QuantileKN(KN<R> * p): KN_<R>(*p) {}
+ operator R *() const {return this->KN_<R>::operator R *() ;}
+};
+
+
+template<class R> R Quantile(QuantileKN<R> const & a,const double & q){
+ KN<R> b(a);
+ HeapSort<R>(b,b.n,b.step);
+ long m=lrint(b.n*q);
+ if( m >= b.n) m=b.n-1;
+ if( m < 0) m=0;
+ R qq=b[m];
+ // cout << "Quantile: m = " << m << " " << b <<endl;
+ return qq;}
+
+
+
+inline void MyAssert(int i,char * ex,char * file,long line)
+{if (i) {
+ cout << "CompileError assertion : " << ex << " in file " << file << " line = " << line << endl;
+ CompileError();}
+ }
+
+
+template<class K>
+inline K * get_element( MyMap<String,K> * const & a,string* const & b)
+ { K * ret= &((*a)[*b]); // correction FH feb 2004
+ // cout << "get_element " << *b << " : " << ret << " = "<< * ret << endl;
+ // delete b; modif mars 2006 auto del ptr
+ return ret;}
+
+template<>
+inline string ** get_element<string*>( MyMap<String,string*> * const & a,string* const & b)
+ { string** ret= &((*a)[*b]); // correction FH feb 2004
+ if( *ret ==0) *ret = new string(""); // string vide ???
+ // cout << "get_element " << *b << " : " << ret << " = "<< * ret << endl;
+ // delete b; modif mars 2006 auto del ptr
+ return ret;}
+
+inline string ** get_elements( MyMap<String,String> * const & a,string* const & b)
+ { String* Sret= &((*a)[*b]); // correction FH feb 2004
+ // delete b; modif mars 2006 auto del ptr
+ return Sret->getap();}
+
+template<class RR,class A,class B>
+RR * get_element_(const A & a,const B & b){
+ if( b<0 || a.N() <= b)
+ { cerr << " Out of bound 0 <=" << b << " < " << a.N() << " array type = " << typeid(A).name() << endl;
+ ExecError("Out of bound in operator []");}
+ return &((a)[b]);}
+
+
+template<class RR,class A,class B>
+RR * get_elementp_(const A & a,const B & b){
+ if( b<0 || a->N() <= b)
+ { cerr << " Out of bound 0 <=" << b << " < " << a->N() << " array type = " << typeid(A).name() << endl;
+ ExecError("Out of bound in operator []");}
+ return &((*a)[b]);}
+
+template<class K>
+KN_<K> fSubArray(const KN_<K> & a,const SubArray & b)
+ { return a(b);}
+template<class K>
+KN_<K> fSubArrayp( KN<K> * const & a,const SubArray & b)
+ { return (*a)(b);}
+
+template<class K>
+KNM_<K> fSubArraybb(const KNM_<K> & a,const SubArray & b,const SubArray & c)
+{ return a(b,c);}
+template<class K>
+KNM_<K> fSubArraypbb( KNM<K> * const & a,const SubArray & b,const SubArray & c)
+{ return (*a)(b,c);}
+
+template<class K>
+KN_<K> fSubArrayib(const KNM_<K> & a,const long &i,const SubArray & b)
+{ return a(i,b);}
+template<class K>
+KN_<K> fSubArraybi(const KNM_<K> & a,const SubArray & b,const long &i)
+{ return a(b,i);}
+
+template<class K>
+KN_<K> fSubArraypib( KNM<K> *const & a,const long &i,const SubArray & b)
+{ return (*a)(i,b);}
+template<class K>
+KN_<K> fSubArraypbi( KNM<K> *const & a,const SubArray & b,const long &i)
+{ return (*a)(b,i);}
+
+
+template<class A>
+A fSubArrayc(const A & a,const char & b)
+ { return a;}
+
+template<class RR,class A,class B,class C>
+RR * get_elementp2_(const A & a,const B & b,const C & c){
+ if( b<0 || a->N() <= b || c<0 || a->M() <= c )
+ { cerr << " Out of bound 0 <=" << b << " < " << a->N() << " " << c << " < " << a->M()
+ << " array type = " << typeid(A).name() << endl;
+ ExecError("Out of bound in operator (,)");}
+ return &((*a)(b,c));}
+
+template<class RR,class A,class B,class C>
+RR get_element_is(const A & a,const B & b,const C & c){
+ // cout << b << " .... " << ((*a)(SubArray(1,b),c)) << endl;;
+ return ((*a)(b,'.')(c));}
+
+template<class RR,class A,class B,class C>
+RR get_element_si(const A & a,const B & b,const C & c){
+ // cout << c << " .... " << ((*a)(b,SubArray(1,c) )) << endl;;
+ return ((*a)('.',c)(b));}
+
+template<class RR,class A,class B,class C>
+RR get_element_lineorcol(const A & a,const B & b,const C & c){
+ // cout << b << " .... " << ((*a)(SubArray(1,b),c)) << endl;;
+ if(c == ':' && (b<0 || a->N() <= b))
+ ExecError("Out of bound");
+ if(b == ':' && (c<0 || a->M() <= c))
+ ExecError("Out of bound");
+ return ((*a)(b,c));
+ }
+
+template<class RR,class A,class B,class C>
+RR get_element_is_(const A & a,const B & b,const C & c){
+ // cout << b << " .... " << ((*a)(SubArray(1,b),c)) << endl;;
+return ((a)(b,'.')(c));}
+
+template<class RR,class A,class B,class C>
+RR get_element_si_(const A & a,const B & b,const C & c){
+ // cout << c << " .... " << ((*a)(b,SubArray(1,c) )) << endl;;
+return ((a)('.',c)(b));}
+
+template<class RR,class A,class B,class C>
+RR get_element_lineorcol_(const A & a,const B & b,const C & c){
+ // cout << b << " .... " << ((*a)(SubArray(1,b),c)) << endl;;
+return ((a)(b,c));}
+
+template<class RR,class A,class B,class C>
+RR * get_elementp2__(const A & a,const B & b,const C & c){
+ if( b<0 || a.N() <= b || c<0 || a.M() <= c )
+ { cerr << " Out of bound 0 <=" << b << " < " << a.N() << " " << c << " < " << a.M()
+ << " array type = " << typeid(A).name() << endl;
+ ExecError("Out of bound in operator (,)");}
+return &((a)(b,c));}
+
+
+
+
+template<class RR,bool isinit>
+class InitArrayfromArray : public OneOperator {
+public:
+ typedef KN<RR> * A;
+ typedef KN<RR> * R;
+ typedef E_Array B;
+
+ class CODE : public E_F0 { public:
+ Expression a0;
+ int N;
+ Expression * tab;
+ int * what;// 0 RR, 1 KN<RR>,
+ const bool mi;
+
+ CODE(Expression a,const E_Array & tt)
+ : a0(a),N(tt.size()),
+ tab(new Expression [N]),
+ what(new int[N]) ,
+ mi(tt.MeshIndependent())
+
+ {
+ assert(&tt);
+ // int err=0;
+ for (int i=0;i<N;i++)
+ if(atype<RR>()->CastingFrom(tt[i].right() ) )
+ {
+ tab[i]=atype<RR>()->CastTo(tt[i]);
+ what[i]=0;
+ }
+ else if(atype<KN_<RR> >()->CastingFrom(tt[i].right() ) )
+ {
+ tab[i]=atype<KN_<RR> >()->CastTo(tt[i].RightExp());
+ what[i]=1;
+ }
+ else
++<<<<<<< HEAD
+ CompileError(" InitArrayfromArray: we are waiting for scalar or vector of scalar");
++=======
++ CompileError(" we are waiting for scalar or vector of scalar");
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ }
+
+ AnyType operator()(Stack stack) const
+ {
++<<<<<<< HEAD
+ //extern void xxxx();
+ //xxxx();
++=======
++ extern void xxxx();
++ xxxx();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ A a=GetAny<A>((*a0)(stack));
+ KN<AnyType> v(N);
+ KN<int> nn(N+1);
+ for (int i=0;i<N;i++)
+ v[i]= (*(tab[i]))(stack);
+
+ int n=0;
+ for (int i=0;i<N;i++)
+ {
+ if (what[i]==0) nn[i]=1;
+ else if (what[i]==1) nn[i]=GetAny<KN_<RR> >(v[i]).size();
+ n += nn[i];
+ }
+ if (isinit)
+ a->init(n);
+ else
+ a->resize(n);
+
+ for (int i=0,j=0 ;i<N; j += nn[i++])
+
+ if (what[i]==0)
+ (*a)[j]= GetAny<RR>(v[i]);
+ else if (what[i]==1)
++<<<<<<< HEAD
+ (*a)(SubArray(nn[i],j)) = GetAny<KN_<RR> >((*(tab[i]))(stack));// correct bug nov 2014
+ // (due to resize=> pointer change Fh
++=======
++ (*a)(SubArray(nn[i],j)) = GetAny<KN_<RR> >(v[i]);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ return SetAny<R>(a);
+ }
+ bool MeshIndependent() const {return mi;} //
+ ~CODE() { delete [] tab; delete[] what;}
+ operator aType () const { return atype<R>();}
+ }; // end sub class CODE
+
+
+ public:
+ E_F0 * code(const basicAC_F0 & args) const
+ { return new CODE(t[0]->CastTo(args[0]),*dynamic_cast<const E_Array*>( t[1]->CastTo(args[1]).LeftValue()));}
+ InitArrayfromArray(): OneOperator(atype<R>(),atype<A>(),atype<B>()) {}
+
+};
+
+template<class RR,bool isinit>
+class InitMatfromAArray : public OneOperator {
+public:
+ typedef KNM<RR> * A;
+ typedef KNM<RR> * R;
+ typedef E_Array B;
+
+ class CODE : public E_F0 { public:
+ Expression a0;
+ int N;
+ int M;
+ Expression ** tab;
+ const bool mi;
+
+ CODE(Expression a,const E_Array & tt)
+ : a0(a),N(tt.size()),M(0),
+ tab(new Expression* [N]),
+ mi(tt.MeshIndependent())
+
+ {
+ assert(&tt);
+ // int err=0;
+ for (int i=0;i<N;i++)
+ {
+ const E_Array *li = dynamic_cast<const E_Array *>(tt[i].LeftValue());
+ if (li)
+ {
+ const E_Array & lli = *li;
+ // -- check ---
+ if( i == 0) {
+ M = lli.size(); ffassert( M>0 );
+ for (int i=0;i<N;i++) tab[i] = new Expression [M];
+ }
+ else {
+ if ( M != li->size() ) {
+ cout << " line " << i << " the size of the column change " << M << " to " << li->size() << endl;
+ CompileError(" Is not a matrix, M is not constant" ); } }
+
+ for (int j=0;j<M;j++)
+ tab[i][j]=atype<RR>()->CastTo( lli[j]);
+ }
+ else // li == 0
+ CompileError(" we are waiting for vector of scalar [ , , , ] ");
+ }
+
+ }
+
+ AnyType operator()(Stack stack) const
+ {
+ A a=GetAny<A>((*a0)(stack));
+ if (isinit)
+ a->init(N,M);
+ else
+ a->resize(N,M);
+
+ for (int i =0;i<N;++i)
+ for (int j =0;j<M;++j)
+ (*a)(i,j)= GetAny< RR >( (*(tab[i][j]))(stack)) ;
+ return SetAny<R>(a);
+ }
+ bool MeshIndependent() const {return mi;} //
+ ~CODE() { for (int i=0;i<N;i++) delete [] tab[i]; delete [] tab; }
+ operator aType () const { return atype<R>();}
+ }; // end sub class CODE
+
+
+ public:
+ E_F0 * code(const basicAC_F0 & args) const
+ { return new CODE(t[0]->CastTo(args[0]),*dynamic_cast<const E_Array*>( t[1]->CastTo(args[1]).LeftValue()));}
+ InitMatfromAArray(): OneOperator(atype<R>(),atype<A>(),atype<B>()) {}
+
+};
+
+template<typename RR>
+class SetArrayofKNfromKN : public OneOperator {
+public:
+ typedef KN_<RR> A; // Warning B type of 1 parameter
+ typedef KN_<RR> R;
+ typedef E_Array B; // A type of 2 parameter
+
+ class CODE : public E_F0 { public:
+ Expression a0;
+ int N;
+ Expression * tab;
+ int * what;// 0 RR, 1 KN<RR>,
+ const bool mi;
+
+ CODE(Expression a,const E_Array & tt)
+ : a0(a),N(tt.size()),
+ tab(new Expression [N]),
+ what(new int[N]) ,
+ mi(tt.MeshIndependent())
+ {
+ assert(&tt);
+ // int err=0;
+ for (int i=0;i<N;i++)
+ if(atype<RR*>()->CastingFrom(tt[i].left() ) )
+ {
+ tab[i]=atype<RR*>()->CastTo(tt[i]);
+ what[i]=0;
+ }
+ else if(atype<KN_<RR> >()->CastingFrom(tt[i].right() ) )
+ {
+ tab[i]=atype<KN_<RR> >()->CastTo(tt[i].RightExp());
+ what[i]=1;
+ }
+ else
+ CompileError(" we are waiting for scalar or vector of scalar");
+ }
+
+ AnyType operator()(Stack stack) const
+ {
+ A a=GetAny<A>((*a0)(stack));
+ KN<AnyType> v(N);
+ KN<int> nn(N+1);
+ for (int i=0;i<N;i++)
+ v[i]= (*(tab[i]))(stack);
+
+ int n=0;
+ for (int i=0;i<N;i++)
+ {
+ if (what[i]==0) nn[i]=1;
+ else if (what[i]==1) nn[i]=GetAny<KN_<RR> >(v[i]).size();
+ n += nn[i];
+ }
+ ffassert(n == a.size());
+ for (int i=0,j=0 ;i<N; j += nn[i++])
+
+ if (what[i]==0)
+ * GetAny<RR*>(v[i]) = a[j];
+ else if (what[i]==1) { // hack FH
+ KN_<RR> tab(GetAny<KN_<RR> >(v[i]));
+ tab =a(SubArray(nn[i],j));
+ }
+ return SetAny<R>(a);
+ }
+ bool MeshIndependent() const {return mi;} //
+ ~CODE() { delete [] tab; delete[] what;}
+ operator aType () const { return atype<R>();}
+ }; // end sub class CODE
+
+
+ public: // warning hack A and B
+ E_F0 * code(const basicAC_F0 & args) const
+ { return new CODE(t[1]->CastTo(args[1]),*dynamic_cast<const E_Array*>( t[0]->CastTo(args[0]).RightValue()));}
+ SetArrayofKNfromKN(): OneOperator(atype<R>(),atype<B>(),atype<A>()) {} // warning with A and B
+
+};
+
+
+
+template<class K> long get_n(KN<K> * p){ return p->N();}
+template<class K> long get_n(KNM<K> * p){ return p->N();}
+template<class K> long get_m(KNM<K> * p){ return p->M();}
+template<class K> K get_max(KN<K> * p){ return p->max();}
+template<class K> K get_min(KN<K> * p){ return p->min();}
+template<class K> long get_imax(KN<K> * p){ long i =0; for(long k=1;k< p->N(); ++k) if( (*p)[k]>(*p)[i] ) i=k; return i ;}
+template<class K> long get_imin(KN<K> * p){ long i =0; for(long k=1;k< p->N(); ++k) if( (*p)[k]<(*p)[i] ) i=k; return i ;}
+
+template<class K> K get_sum(KN<K> * p){ return p->sum();}
+template<class K> double get_l2(KN<K> * p){ return p->l2();}
+template<class K> double get_l1(KN<K> * p){ return p->l1();}
+template<class K> double get_linfty(KN<K> * p){ return p->linfty();}
+
+template<class K> K get_max(KNM<K> * p){ return p->max();}
+template<class K> K get_min(KNM<K> * p){ return p->min();}
+template<class K> K get_sum(KNM<K> * p){ return p->sum();}
+template<class K> double get_l2(KNM<K> * p){ return p->l2();}
+template<class K> double get_l1(KNM<K> * p){ return p->l1();}
+template<class K> double get_linfty(KNM<K> * p){ return p->linfty();}
+
+template<class K,class T > K get_sum0(const T & p){ return p.sum();}
+template<class K,class T > K get_max0(const T &p){ return p.max();}
+template<class K,class T > K get_min0(const T &p){ return p.min();}
+template<class K,class T> K get_l2_0(const T &p){ return p.l2();}
+template<class K,class T> K get_l1_0(const T &p){ return p.l1();}
+template<class K,class T> K get_linfty_0(const T &p){ return p.linfty();}
+
+
+
+ class ostream_precis { public:
+ ostream_precis(ostream * ff) :f(ff) {}
+ ostream * f;
+ operator long () const {return f->precision();}
+ };
+
+template<class A,class B> B castto(const A & a){ return a;}
+
+/*
+template<class K>
+AnyType ClearReturnpKN(Stack stack, const AnyType & a)
+{
+ KN<K> * m = GetAny<K>(a);
+ Add2StackOfPtr2FreeRC(stack, (K*) (*m) );
+ if(verbosity>1)
+ cout << "AddIncrement:: increment + Add2StackOfPtr2FreeRC " << endl;
+ return new KN<K>(true, *m);
+}*/
+
+template<typename K,typename KK>
+AnyType ClearReturnpKK(Stack stack, const AnyType & a)
+{
+ // a ne faire que pour les variables local au return...
+ // pour l'instant on copie pour fqire mqrche
+ // a repense FH mqi 2009....
+ KK * m = GetAny<KK * >(a);
+ // KN<K> *cm=new KN<K>(true, *m); bug quant KN est une variable global
+ // KN<K> *cm=new KN<K>( *m); // on duplique le tableau comme en C++ (dur dur ?????? FH)
+ m->increment();
+ Add2StackOfPtr2FreeRC(stack,m);
+ if(verbosity>400)
+ cout << "ClearReturnpKK:: increment + Add2StackOfPtr2FreeRC nb ref " << -m->next << endl;
+ return m;
+}
+template<typename K,typename KK,typename KK_>
+AnyType ClearReturnpKK_(Stack stack, const AnyType & a)
+{
+ // il faut faire un copie du tableau
+ KK_ * m = GetAny<KK_ * >(a);
+ KK *cm=new KK(*m);
+
+ Add2StackOfPtr2Free(stack,cm);// detruire la copie
+ if(verbosity>400)
+ cout << "ClearReturnpKK_:: copie Add2StackOfPtr2Free " << endl;
+ return (KK_ *) cm;
+}
+template<typename K,typename KK,typename KK_>
+AnyType ClearReturnKK_(Stack stack, const AnyType & a)
+{
+ // il faut faire un copie du tableau
+ KK_ m = GetAny<KK_>(a);
+ KK *cm=new KK(m);
+
+ Add2StackOfPtr2Free(stack,cm);// detruire la copie
+ if(verbosity>400)
+ cout << "ClearReturnKK_:: copie Add2StackOfPtr2Free " << endl;
+ return SetAny<KK_>(*cm);
+}
+template<typename K,typename KK_,typename KK>
+AnyType CopieKK_pKK(Stack stack,const AnyType &a) {
+ KK_ m = GetAny<KK_>(a);
+ KK *cm=new KK(m);
+ if(verbosity>400)
+ cout << "CopieKK_pKK:: copie Add2StackOfPtr2Free "<< cm << endl;
+ Add2StackOfPtr2Free(stack,cm);// detruire la copie
+return cm;}
+
+
+template<typename KK,typename KK_>
+AnyType UnRefpKN(Stack,const AnyType &a) {
+ KK_ a_(*PGetAny<KK >(a));
+ return SetAny<KK_ >(a_);}
+
+template<class A> inline AnyType DestroyKN(Stack,const AnyType &x){
+ KN<A> * a=PGetAny<KN<A> >(x);
+ SHOWVERB(cout << "DESTROY " <<typeid(A).name() << " " << a << endl);
+ for(int i=0;i<a->N(); ++i)
+ (*a)[i].destroy();
+ a->destroy();
+ return Nothing;
+}
+
+template<class K>
+void ArrayDCL()
+{
+ // Dcl_TypeandPtr<KN<K> >(0,0,0,::Destroy<KN<K> >, 0 , ::ClearReturnKN<K> );
+
+ //Dcl_Type<KN<K> *>(0,::Destroy<KN<K> >, ::ClearReturnpKK<K,KN<K> > );
+ //Dcl_TypeandPtr<KN_<K> >(0,0,0,0,::ClearReturnKK_<K,KN<K>,KN_<K> >,::ClearReturnpKK_<K,KN<K>,KN_<K> >);
+ Dcl_TypeandPtr_<KN_<K> ,KN<K>* > (0,0,::InitP<KN<K> >,::Destroy<KN<K> >, ::ClearReturnKK_<K,KN<K>,KN_<K> >,::ClearReturnpKK<K,KN<K> >); // add init 0
+
+ // Dcl_Type<KN<Complex> *>(0,::Destroy<KN<Complex> >);
+ // Dcl_Type<KN<K> *>(0,::Destroy<KN<K> >); // Modif 17102005
+ // attention un exp KN<> * right est un KN<> et non un KN<> *
+
+ // Dcl_Type<KNM<K> *>(0,::Destroy<KNM<K> > ,::ClearReturnpKK<K,KNM<K> >);
+ Dcl_TypeandPtr_<KNM_<K> ,KNM<K>* > (0,0,0,::Destroy<KNM<K> >, ::ClearReturnKK_<K,KNM<K>,KNM_<K> >,::ClearReturnpKK<K,KNM<K> >);
+ Dcl_Type< KN<KNM<K> >* >(0,::DestroyKN<KNM<K> >,::ClearReturnpKK<KNM<K>,KN<KNM<K> > >);
+ Dcl_Type< KN<KN<K> >* >(0,::DestroyKN<KN<K> >,::ClearReturnpKK<KN<K>,KN<KN<K> > >);
+
+ Dcl_Type< outProduct_KN_<K>* >();
+ Dcl_Type< Transpose<KN_<K> > > ();
+ Dcl_Type< Transpose< KNM<K> *> >();
+
+ Dcl_Type<Add_KN_<K> >();
+
+ Dcl_Type<DotStar_KN_<K> >();
+ Dcl_Type<DotSlash_KN_<K> >();
+ Dcl_Type<Sub_KN_<K> >();
+ Dcl_Type<Mulc_KN_<K> >();
+ Dcl_Type<Divc_KN_<K> >();
+ Dcl_Type<Mul_KNM_KN_<K> >();
+ Dcl_Type<Add_Mulc_KN_<K> *>();
+ Dcl_Type<if_arth_KN_<K> *>();
+ // for B(I) and B(I^-1)
+ Dcl_Type<pair<KN_<K>,Inv_KN_long> *>();
+ Dcl_Type<pair<KN_<K>,KN_<long> > *>();
+
+ map_type[typeid(KN<K> * ).name()]->AddCast(
+ new E_F1_funcT<KN<K>*,KN_<K> >(CopieKK_pKK<K,KN_<K>,KN<K> > )
+ );
+// add august 2009 FH to see full matrix as a array
+ map_type[typeid(KN_<K> ).name()]->AddCast(
+ new E_F1_funcT<KN_<K>,KNM<K>* >(UnRef<KN_<K>,KNM<K> *> ));
+
+
+ map_type[typeid(KN_<K> ).name()]->AddCast(
+ // new E_F1_funcT<KN_<K>,KN_<K>*>(UnRefpKN_<K> ),
+ new E_F1_funcT<KN_<K>,KN<K>*>(UnRefpKN<KN<K>,KN_<K> > )
+ // inutil cas KN<K> est right expression de KN<K>*
+// new E_F1_funcT<KN_<K>,KN<K> >(Cast<KN_<K>,KN<K> >)
+
+ );
+ map_type[typeid(KNM_<K> ).name()]->AddCast(
+ new E_F1_funcT<KNM_<K>,KNM<K>*>(UnRefpKN<KNM<K>,KNM_<K> > )
+ );
+
+ // ,new E_F1_funcT<KN_<K>,K>(ValueToKN_<K>),
+ // new E_F1_funcT<KN_<K>,K*>(PtrToKN_<K>)
+/*
+ // Ajoute FH
+ map_type[typeid(KN<K> ).name()]->AddCast(
+ new E_F1_funcT<KN<K>,KN<K>*>(UnRef<KN<K> >)
+ // ,new E_F1_funcT<KN_<K>,K>(ValueToKN_<K>),
+ // new E_F1_funcT<KN_<K>,K*>(PtrToKN_<K>)
+ ); */
+ map_type_of_map[make_pair(atype<long>(),atype<K>())]=atype<KN<K>*>(); // vector
+ map_pair_of_type[make_pair(atype<long>(),atype<long>())] =atype<pair<long,long> >();
+ map_type_of_map[make_pair(atype<pair<long,long> >(),atype<K>())]=atype<KNM<K>*>(); // matrix
+ map_type_of_map[make_pair(atype<long>(),atype<KN_<K> >())]=atype<KN<KN<K> >*>();// tableau de tableau
+ map_type_of_map[make_pair(atype<long>(),atype<KNM_<K> >())]=atype<KN<KNM<K> >*>();// tableau de matrix
+
+}
+
+
+
+template<class A,class B> pair<A,B> * pBuild(const A & a,const B & b)
+ { return new pair<A,B>(a,b);}
+
+// add mars 2006
+template<class K,class L,class OP>
+struct set_A_BI: public binary_function<KN_<K>,pair<KN_<K>, KN_<L> > *,KN_<K> > {
+ static KN_<K> f(const KN_<K> & a, pair<KN_<K>, KN_<L> > * const & b) {
+ KN_<K> x(a);
+ OP op;
+ const KN_<K> & y(b->first);
+ const KN_<L> & I(b->second);
+ L N = x.N();
+ L n = y.N();
+
+ L maxI=I(SubArray(N)).max() ;
+ L minI=I(SubArray(N)).min() ;
+
+ if( maxI >= n || I.N() < N)
+ { cerr << " Out of Bound x=y(I) : 0 <= " << minI << " < "<< maxI << "< " << n << endl;
+ cerr << " or I.N() " << I.N() << " > " << N << endl;
+ ExecError("Out of Bound error");
+ }
+
+ for(int i=0;i<N;i++)
+ if(I[i]>=0)
+ op(x(i),y(I[i]));
+ delete b;
+ return a;
+
+ }
+};
+
+template<class K,class L,class OP>
+struct set_AI_B: public binary_function<pair<KN_<K>, KN_<L> > * ,KN_<K>, NothingType > {
+ static NothingType f( pair<KN_<K>, KN_<L> > * const & b,const KN_<K> & a) {
+ KN_<K> x(a);
+ OP op;
+ const KN_<K> & y(b->first);
+ const KN_<L> & I(b->second);
+ L N = I.N();
+ L n = y.N();
+
+ L maxI=I(SubArray(N)).max() ;
+ L minI=I(SubArray(N)).min() ;
+
+ if( maxI >= n || x.N() < N )
+ { cerr << " Out of Bound x(I)=y : 0 <= " << minI << " < "<< maxI << "< " << n << endl;
+ cerr << " or x.N() " << I.N() << " > " << N << endl;
+ ExecError("Out of Bound error");
+ }
+
+ for(int i=0;i<N;i++)
+ if(I[i] >=0)
+ op(y(I[i]),x[i]);
+ delete b;
+ return NothingType();
+
+ }
+};
+
+template<class K>
+struct Op3_paac: public ternary_function<KN_<K>,KN_<K>,K,if_arth_KN_<K>*> {
+static if_arth_KN_<K>* f(Stack s,const KN_<K> & a,const KN_<K> & b,const K & c ) {
+ //K cc(c);
+ KN_<K> kc(new(NewAllocTmp(s,sizeof(c))) K(c),1,0);
+ return new if_arth_KN_<K>(a,b,kc);}
+};
+template<class K>
+struct Op3_paca: public ternary_function<KN_<K>,K,KN_<K>,if_arth_KN_<K>*> {
+ static if_arth_KN_<K>* f(Stack s,const KN_<K> & a,const K & b,const KN_<K> & c ) {
+ //K bb(b);
+ KN_<K> kb(new(NewAllocTmp(s,sizeof(b))) K(b),1,0);
+ return new if_arth_KN_<K>(a,kb,c);}
+};
+
+template<class K>
+struct Op3_pacc: public ternary_function<KN_<K>,K,K,if_arth_KN_<K>*> {
+ static if_arth_KN_<K>* f(Stack s,const KN_<K> & a,const K & b,const K & c ) {
+ K cc(c),bb(b);
+ KN_<K> kc(new(NewAllocTmp(s,sizeof(c))) K(c),1,0),
+ kb(new(NewAllocTmp(s,sizeof(b))) K(b),1,0);
+ return new if_arth_KN_<K>(a,kb,kc);}
+};
+
+template<class K>
+struct SetArray2: public binary_function<K,K,SetArray<K> > {
+ static SetArray<K> f(const K & a,const K & b) {
+ // cout << "SubArray: " << a << " " << b << endl;
+ // SetArray(long nn,R oo=R(),R sstep=R(1)): o(oo),n(nn),step(sstep) {}
+ long n= long(abs((b-a)));
+ ffassert(n);
+ K s= (b-a)/K(n);
+ n++;
+ if(verbosity>100)
+ cout << " SetArray " << n << " " << a << " " << s << endl;
+ return SetArray<K>(n,a,s);} };
+
+template<class K>
+struct SetArray3: public ternary_function<K,K,K,SetArray<K> > {
+ static SetArray<K> f(Stack s,const K & a,const K &b,const K & c) {
+ // cout << "SubArray: " << a << " " << b << " " << c << endl;
+ long n= long(1+abs((c-a)/b));
+ if(verbosity>100)
+ cout << " SetArray " << n << " : " << " " << a << " " << b << " " << c << endl;
+ return SetArray<K>(n,a,b);} };
+
+template<class R,class A> R * set_init_array( R* const & a,const A & b){
+ SHOWVERB( cout << " set_init " << typeid(R).name() << " " << &b << endl);
+ a->init(b.size());
+ *a=b;
+return a;}
+template<class R,class A> R * set_array( R* const & a,const A & b){
+ SHOWVERB( cout << " set_init " << typeid(R).name() << " " << &b << endl);
+ a->resize(b.size());
+ *a=b;
+return a;}
+// missing FH august 2009
+template<class R,class A> R * set_arrayp( R* const & a,const A & b){
+ SHOWVERB( cout << " set_init " << typeid(R).name() << " " << &b << endl);
+ a->resize(b->size());
+ *a=*b;
+return a;}
+template<class R,class A> R set_array_( R const & a,const A & b){
+ SHOWVERB( cout << " set_array_ " << typeid(R).name() << " " << &b << endl);
+ ffassert(a.N()==b.size());
+ R aa=a;
+ aa=b;
+return a;}
+// xxxxxxxxxxx
+template<class K> KNM<K> * set_initmat_t(KNM<K> * a,Transpose<KNM<K> * > b ){
+ ConjKNM_<K> tb=b.t->t(); ;
+ a->init(tb.N(),tb.M());
+ *a=tb;
+ return a;}
+template<class K> KNM<K> * set_initmat(KNM<K> * a,KNM<K> * b ){
+
+ a->init(b->N(),b->M());
+ *a=*b;
+ return a;}
+template<class K> KNM<K> * set_mat_t(KNM<K> * a,Transpose<KNM<K> * > b ){
+ ConjKNM_<K> tb=b.t->t(); ;
+ a->resize(tb.N(),tb.M());// correction mars 2013
+ *a=tb;
+ return a;}
+template<class K> KNM<K> * addto_mat_t(KNM<K> * a,Transpose<KNM<K> * > b ){
+ ConjKNM_<K> tb=b.t->t(); ;
+ *a+=tb;
+ return a;}
+template<class K> KNM<K> * subto_mat_t(KNM<K> * a,Transpose<KNM<K> * > b ){
+ ConjKNM_<K> tb=b.t->t(); ;
+ *a-=tb;
+ return a;}
+template<class K> KNM<K> * set_mat(KNM<K> * a,KNM<K> * b ){
+
+ a->resize(b->N(),b->M());
+ *a=*b;
+ return a;}
+
+template<class K>
+class OneOperator_2KN_ : public OneOperator {public:
+ class Op : public E_F0 {
+ public:
+ int N;
+ Expression *tab;
+
+ Op( const E_Array &bb) : N(bb.size()), tab(new Expression[N])
+ {
+ for(int i=0;i<N;++i)
+ tab[i]=atype<K>()->CastTo( bb[i]);
+ }
+ AnyType operator()(Stack s) const {
+ K * p = Add2StackOfPtr2FreeA<K>(s,new K[N]); // mark to be delete ..
+ KN<K> A(N, p);
+ for(int i=0;i<N;++i)
+ A[i]= GetAny<K>( (*tab[i])(s));
+ return SetAny<KN_<K> >(A);}
+ };
+ E_F0 * code(const basicAC_F0 & a) const
+ { const E_Array * b = dynamic_cast<const E_Array *>(a[0].LeftValue());
+ ffassert(b);
+ return new Op(*b);}
+ OneOperator_2KN_<K>(): OneOperator(atype<KN_<K> >(),atype<E_Array>()) { pref=-1;}
+};
+
+extern aType aaaa_knlp;
+template<class K,class Z>
+void ArrayOperator()
+{
+ // juin 2009 remove type KN_< > *
+ // and set KN<> * 9left expression) qnd KN_<> is the associated expression..
+ // => lot of change because KN<>* and KN_< > can generqte ambuguity.
+ // so remove all to code with KN<>* type.
+ // the remove cqde are in comment :
+ // the comment begin //-
+ // and the if(0) in comment /* */
+
+
+ Dcl_Type< Resize<KN<K> > > ();
+ Dcl_Type< Resize<KNM<K> > > ();
+ aType knrp = atype<KN<K> *>();
+ aType knr_ = atype<KN_<K> >();
+ //- typedef KN<Z> ZN;
+
+ // add dec 2009. ne marche pas ( incompatible avec MatrixBlock) a comprendre ????? FH.
+ // // xxxxxxxxxx 2010 feb. retest .. FH
+ // il y a plusieurs problems
+ // 1) [1,2,3.] -> tableau de quel type int, real , complex ????
+ //
+ // map_type[typeid(KN_<K>).name()]->AddCast(new OneOperator_2KN_<K>);
+ // fin add
+ // ----
+ aType knlp= aaaa_knlp ;
+
+ atype<KN<K>* >()->Add("[","",new OneOperator2_<K*,KN<K>*,Z >(get_elementp_<K,KN<K>*,Z>));
+ atype<KN<K>* >()->Add("(","",new OneOperator2_<K*,KN<K>*,Z >(get_elementp_<K,KN<K>*,Z>));
+ atype<KN_<K> >()->Add("(","",new OneOperator2_<KN_<K>,KN_<K>,char >(fSubArrayc<KN_<K> >));
+ atype<KN_<K> >()->Add("(","",new OneOperator2_<KN_<K>,KN_<K>,SubArray>(fSubArray<K> ));
+ atype<KN<K>*>()->Add("(","",new OneOperator2_<KN_<K>,KN<K>*,SubArray>(fSubArrayp<K> ));
+ atype<KN<K>* >()->Add("(","",new OneOperator2_<KN<K>*,KN<K>*,char >(fSubArrayc<KN<K>* >));
+//
+
+ atype<KNM_<K> >()->Add("(","",new OneOperator3_<KNM_<K>,KNM_<K>,SubArray,SubArray>(fSubArraybb<K> ));
+ atype<KNM<K>* >()->Add("(","",new OneOperator3_<KNM_<K>,KNM<K>*,SubArray,SubArray>(fSubArraypbb<K> ));
+ /*
+ atype<KN_<K> >()->Add("(","",new OneOperator3_<KN_<K>,KNM_<K>,SubArray,long>(fSubArraybi<K> ));
+ atype<KN_<K> >()->Add("(","",new OneOperator3_<KN_<K>,KNM_<K>,long,SubArray>(fSubArrayib<K> ));
+ atype<KN_<K> >()->Add("(","",new OneOperator3_<KN_<K>,KNM<K>*,SubArray,long>(fSubArraypbi<K> ));
+ atype<KN_<K> >()->Add("(","",new OneOperator3_<KN_<K>,KNM<K>*,long,SubArray>(fSubArraypib<K> ));
+ */
+//
+
+ atype<KN_<K> >()->Add("[","",new OneOperator2_<K*,KN_<K>,Z >(get_element_<K,KN_<K>,Z>));
+ atype<KN_<K> >()->Add("(","",new OneOperator2_<K*,KN_<K>,Z >(get_element_<K,KN_<K>,Z>));
+
+
+ atype<KNM<K>* >()->Add("(","",new OneOperator3_<KN_<K>,KNM<K>*,Z,SubArray >(get_element_is<KN_<K>,KNM<K>*,Z,SubArray>));
+ atype<KNM<K>* >()->Add("(","",new OneOperator3_<KN_<K>,KNM<K>*,SubArray,Z >(get_element_si<KN_<K>,KNM<K>*,SubArray,Z>));
+ atype<KNM<K>* >()->Add("(","",new OneOperator3_<KN_<K>,KNM<K>*,Z,char >(get_element_lineorcol<KN_<K>,KNM<K>*,Z,char>));
+ atype<KNM<K>* >()->Add("(","",new OneOperator3_<KN_<K>,KNM<K>*,char,Z >(get_element_lineorcol<KN_<K>,KNM<K>*,char,Z>));
+ atype<KNM<K>* >()->Add("(","",new OneOperator3_<K*,KNM<K>*,Z,Z >(get_elementp2_<K,KNM<K>*,Z,Z>));
+
+ atype<KNM_<K> >()->Add("(","",new OneOperator3_<KN_<K>,KNM_<K>,Z,SubArray >(get_element_is_<KN_<K>,KNM_<K>,Z,SubArray>));
+ atype<KNM_<K> >()->Add("(","",new OneOperator3_<KN_<K>,KNM_<K>,SubArray,Z >(get_element_si_<KN_<K>,KNM_<K>,SubArray,Z>));
+ atype<KNM_<K> >()->Add("(","",new OneOperator3_<KN_<K>,KNM_<K>,Z,char >(get_element_lineorcol_<KN_<K>,KNM_<K>,Z,char>));
+ atype<KNM_<K> >()->Add("(","",new OneOperator3_<KN_<K>,KNM_<K>,char,Z >(get_element_lineorcol_<KN_<K>,KNM_<K>,char,Z>));
+ atype<KNM_<K> >()->Add("(","",new OneOperator3_<K*,KNM_<K>,Z,Z >(get_elementp2__<K,KNM_<K>,Z,Z>));
+
+
+ Add<KN<K> *>("sum",".",new OneOperator1<K,KN<K> *>(get_sum));
+ Add<KN<K> *>("min",".",new OneOperator1<K,KN<K> *>(get_min));
+ Add<KN<K> *>("max",".",new OneOperator1<K,KN<K> *>(get_max));
+
+ Add<KN<K> *>("l2",".",new OneOperator1<double,KN<K> *>(get_l2));
+ Add<KN<K> *>("l1",".",new OneOperator1<double,KN<K> *>(get_l1));
+ Add<KN<K> *>("linfty",".",new OneOperator1<double,KN<K> *>(get_linfty));
+// add july 2009
+ Add<KNM<K> *>("sum",".",new OneOperator1<K,KNM<K> *>(get_sum));
+ Add<KNM<K> *>("min",".",new OneOperator1<K,KNM<K> *>(get_min));
+ Add<KNM<K> *>("max",".",new OneOperator1<K,KNM<K> *>(get_max));
+ Add<KNM<K> *>("l2",".",new OneOperator1<double,KNM<K> *>(get_l2));
+ Add<KNM<K> *>("l1",".",new OneOperator1<double,KNM<K> *>(get_l1));
+ Add<KNM<K> *>("linfty",".",new OneOperator1<double,KNM<K> *>(get_linfty));
+// end add
+
+ Add<KN_<K> >("sum",".",new OneOperator1_<K,KN_<K> >(get_sum0<K,KN_<K> >));
+ Add<KN_<K> >("min",".",new OneOperator1_<K,KN_<K> >(get_min0<K,KN_<K> >));
+ Add<KN_<K> >("max",".",new OneOperator1_<K,KN_<K> >(get_max0<K,KN_<K> >));
+ Add<KN_<K> >("l2",".",new OneOperator1_<double,KN_<K> >(get_l2_0<double,KN_<K> >));
+ Add<KN_<K> >("l1",".",new OneOperator1_<double,KN_<K> >(get_l1_0<double,KN_<K> >));
+ Add<KN_<K> >("linfty",".",new OneOperator1_<double,KN_<K> >(get_linfty_0<double,KN_<K> >));
+
+// add july 2009
+ Add<KNM_<K> >("sum",".",new OneOperator1_<K,KNM_<K> >(get_sum0<K,KNM_<K> >));
+ Add<KNM_<K> >("min",".",new OneOperator1_<K,KNM_<K> >(get_min0<K,KNM_<K> >));
+ Add<KNM_<K> >("max",".",new OneOperator1_<K,KNM_<K> >(get_max0<K,KNM_<K> >));
+ Add<KNM_<K> >("l2",".",new OneOperator1_<double,KNM_<K> >(get_l2_0<double,KNM_<K> >));
+ Add<KNM_<K> >("l1",".",new OneOperator1_<double,KNM_<K> >(get_l1_0<double,KNM_<K> >));
+ Add<KNM_<K> >("linfty",".",new OneOperator1_<double,KNM_<K> >(get_linfty_0<double,KNM_<K> >));
+// end add
+
+
+/*
+ Add<KN<K> >("sum",".", new OneOperator1_<K,KN<K> >(get_sum0<K,KN<K> >));
+ Add<KN<K> >("min",".", new OneOperator1_<K,KN<K> >(get_min0<K,KN<K> >));
+ Add<KN<K> >("max",".", new OneOperator1_<K,KN<K> >(get_max0<K,KN<K> >));
+ Add<KN<K> >("l2",".", new OneOperator1_<double,KN<K> >(get_l2_0<double,KN<K> >));
+ Add<KN<K> >("l1",".", new OneOperator1_<double,KN<K> >(get_l1_0<double,KN<K> >));
+ Add<KN<K> >("linfty",".",new OneOperator1_<double,KN<K> >(get_linfty_0<double,KN<K> >));
+*/
+
+ Add<KN<K> *>("resize",".",new OneOperator1< Resize<KN<K> >,KN<K> *>(to_Resize));
+ Add<KNM<K> *>("resize",".",new OneOperator1< Resize<KNM<K> >,KNM<K> *>(to_Resize));
+
+ Add<Resize<KN<K> > >("(","",new OneOperator2_<KN<K> *,Resize<KN<K> > , Z >(resize1));
+ Add<Resize<KNM<K> > >("(","",new OneOperator3_<KNM<K> *,Resize<KNM<K> > , Z, Z >(resize2));
+
+
+ TheOperators->Add("<-",
+ new OneOperator2_<KN<K> *,KN<K> *,Z>(&set_init),
+ new InitArrayfromArray<K,true>
+ // new OneOperator2_<KN<K> *,KN<K> *,KN<K> >(&set_init),
+ // new OneOperator2_<KN<K> *,KN<K> *,KN_<K> >(&set_init) ????
+ // new OneOperator2_<KN<K> *,KN<K> *,KN<K> * >(&set_initp)
+ );
+ TheOperators->Add("<-",
+ new OneOperator2_<KN< KN<K> > *,KN< KN<K> > * ,Z >(&set_init));
+ TheOperators->Add("<-",
+ new OneOperator2_<KN< KNM<K> > *,KN< KNM<K> > * ,Z >(&set_init));
+
+ TheOperators->Add("<-",
+ new OneOperator3_<KNM<K> *,KNM<K> *,Z,Z>(&set_init2),
+ new InitMatfromAArray<K,true>
+ );
+
+ Add<KN<K> *>("<-","(",new OneOperator2_<KN<K> *,KN<K> *,Z>(&set_init));
+ // Add<KN<K> *>("<-","(",new OneOperator2_<KN<K> *,KN<K> *,KN<K> >(&set_init));
+ //Add<KN<K> *>("<-","(",new OneOperator2_<KN<K> *,KN<K> *,KN_<K> >(&set_init));
+ // Add<KN<K> *>("<-","(",new OneOperator2_<KN<K> *,KN<K> *,KN<K> * >(&set_initp));
+ Add<KNM<K> *>("<-","(",new OneOperator3_<KNM<K> *,KNM<K> *,Z,Z>(&set_init2));
+ TheOperators->Add("<-",new OneOperator2<KNM<K> *,KNM<K> *,Transpose<KNM<K> * > >(&set_initmat_t));// may 2011 FH..
+ TheOperators->Add("=",new OneOperator2<KNM<K> *,KNM<K> *,Transpose<KNM<K> * > >(&set_mat_t));// may 2011 FH..
+ TheOperators->Add("+=",new OneOperator2<KNM<K> *,KNM<K> *,Transpose<KNM<K> * > >(&addto_mat_t));// oct 2011 FH..
+ TheOperators->Add("-=",new OneOperator2<KNM<K> *,KNM<K> *,Transpose<KNM<K> * > >(&subto_mat_t));// oct 2011 FH..
+// TheOperators->Add("-=",new OneOperator2<KNM<K> *,KNM<K> *,Transpose<KNM<K> * > >(&subto_mat_t<-1>));// oct 2011 FH..
+ // Add<KNM<K> *>("<-","(",new OneOperator2<KNM<K> *,KNM<K> *,KNM<K> * >(&set_initmat));// may 2011 FH..
+ // Add<KNM<K> *>("=","(",new OneOperator2<KNM<K> *,KNM<K> *,Transpose<KNM<K> * > >(&set_mat_t));// may 2011 FH..
+ // Add<KNM<K> *>("=","(",new OneOperator2<KNM<K> *,KNM<K> *,KNM<K> * >(&set_mat));// may 2011 FH..
+
+ // Add<KNM<K> *>("=","(",new OneOperator2_<KNM<K> *,KNM<K> *,Transpose<KNM<K> * > >(&set_tt));
+
+ Add<KN<K> *>("<-","(",new InitArrayfromArray<K,true>);
+ Add<KNM<K> *>("<-","(",new InitMatfromAArray<K,true>);
+ Add<KN<K> *>("n",".",new OneOperator1<Z,KN<K> *>(get_n));
+ Add<KNM<K> *>("n",".",new OneOperator1<Z,KNM<K> *>(get_n));
+ Add<KNM<K> *>("m",".",new OneOperator1<Z,KNM<K> *>(get_m));
+ //ajout ars 2012 FH
+ Add<KN<KN<K> > *>("n",".",new OneOperator1<long,KN<KN<K> > *>(get_n));
+ Add<KN<KNM<K> > *>("n",".",new OneOperator1<long,KN<KNM<K> > *>(get_n));
+ atype<KN<KN<K> > * >()->Add("[","",new OneOperator2_<KN<K>*,KN<KN<K> >*,Z >(get_elementp_<KN<K>,KN<KN<K> >*,Z>));
+ atype<KN<KNM<K> > * >()->Add("[","",new OneOperator2_<KNM<K>*,KN<KNM<K> >*,Z >(get_elementp_<KNM<K>,KN<KNM<K> >*,Z>));
+ Dcl_Type< Resize<KN<KN<K> > > > ();
+ Dcl_Type< Resize<KN<KNM<K> > > >();
+ Add<KN<KN<K> > * >("resize",".",new OneOperator1< Resize<KN<KN<K> > >,KN<KN<K> > *>(to_Resize));
+ Add<KN<KNM<K> > * >("resize",".",new OneOperator1< Resize<KN<KNM<K> > >,KN<KNM<K> > *>(to_Resize));
+ Add<Resize<KN<KN<K> > > >("(","",new OneOperator2_<KN<KN<K> > *,Resize<KN<KN<K> > > , long >(resize1));
+ Add<Resize<KN<KNM<K> > > >("(","",new OneOperator2_<KN<KNM<K> > *,Resize<KN<KNM<K> > > , long >(resize1));
+
+
+// AddOpeqarray<set_eqarray,KN,K>("=");
+
+ TheOperators->Add("=", new InitArrayfromArray<K,false>
+ );
+ TheOperators->Add("=", new InitMatfromAArray<K,false>
+ );
+ TheOperators->Add("=", new SetArrayofKNfromKN<K>
+ );
+ if(0) // a change il faut regle un PB ambiguite ...
+ TheOperators->Add("=",
+ new OneBinaryOperator<set_eqarray<KN<K> ,K > > ,
+ new OneBinaryOperator<set_eqarray<KN<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray<KN<K> ,DotStar_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray<KN<K> ,DotSlash_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray<KN<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray<KN<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray<KN<K> ,Divc_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray<KN<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray<KN<K> ,KN_<K> > > , // Add FH juin 2005
+ new OneBinaryOperator<set_eqarraypd<KN<K> ,Add_Mulc_KN_<K>* > > , // Add FH aug 2005
+ new OneBinaryOperator<set_eqarraypd<KN<K> ,if_arth_KN_<K>* > >
+ // new OneBinaryOperator<set_eqarrayp<KN<K> ,KN<K>* > > // test aug 2009
+ );
+ // add august 2007
+
+ TheOperators->Add("<-",
+ // new OneBinaryOperator<set_eqarray<KN<K> ,K > > ,
+ new OneBinaryOperator<init_eqarray<KN<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<init_eqarray<KN<K> ,DotStar_KN_<K> > > ,
+ new OneBinaryOperator<init_eqarray<KN<K> ,DotSlash_KN_<K> > > ,
+ new OneBinaryOperator<init_eqarray<KN<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<init_eqarray<KN<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<init_eqarray<KN<K> ,Divc_KN_<K> > > ,
+ new OneBinaryOperator<init_eqarray<KN<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<init_eqarray<KN<K> ,KN_<K> > > , // Add FH juin 2005
+ new OneBinaryOperator<init_eqarraypd<KN<K> ,Add_Mulc_KN_<K>* > > , // Add FH aug 2005
+ new OneBinaryOperator<init_eqarraypd<KN<K> ,if_arth_KN_<K>* > >
+ // new OneBinaryOperator<init_eqarrayp<KN<K> ,KN<K>* > >
+ );
+
+
+ TheOperators->Add("=",
+ new OneBinaryOperator<set_eqarray<KNM<K> ,K > > ,
+ new OneBinaryOperator<set_eqarrayp<KNM<K> , KNM<K> * > >
+
+ );
+
+ TheOperators->Add("=",
+ new OneBinaryOperator<set_eq_array<KN_<K> ,K > > ,
+ new OneBinaryOperator<set_eq_array<KN_<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array<KN_<K> ,DotStar_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array<KN_<K> ,DotSlash_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array<KN_<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array<KN_<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array<KN_<K> ,Divc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array<KN_<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_arraypd<KN_<K> ,if_arth_KN_<K>* > > ,
+ new OneBinaryOperator<set_eq_arraypd<KN_<K> ,Add_Mulc_KN_<K>* > > , // Add FH aug 2005
+ new OneBinaryOperator<set_eq_array<KN_<K> ,KN_<K> > >, // add FH juin 2005
+ new OneBinaryOperator<set_eq_arraypd<KN_<K> ,KN<K>* > >
+
+ //- new OneBinaryOperator<set_eq_arrayp<KN_<K> ,KN<K>* > >
+ );
+// ajoute mars 2010 FH
+ TheOperators->Add("<-",
+ new OneBinaryOperator<init_eqarray<KNM<K> ,KNM_<K> > >
+ );
+
+ TheOperators->Add("=",
+ new OneBinaryOperator<set_eqarray<KNM<K> ,KNM_<K> > >
+
+ // new OneBinaryOperator<set_eq_array<KNM_<K> ,K > > ,
+ // new OneBinaryOperator<set_eq_array<KNM_<K> ,KNM_<K> > >,
+ // new OneBinaryOperator<set_eq_arraypd<KNM_<K> ,KNM<K>* > >
+ );
+
+// end add ...
+/*if(0)
+ TheOperators->Add("+=",
+ new OneBinaryOperator<set_eqarray_add<KN<K> ,K > > ,
+ new OneBinaryOperator<set_eqarray_add<KN<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_add<KN<K> ,DotStar_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_add<KN<K> ,DotSlash_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_add<KN<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_add<KN<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_add<KN<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarraypd_add<KN<K> ,Add_Mulc_KN_<K>* > > ,
+ new OneBinaryOperator<set_eqarraypd_add<KN<K> ,if_arth_KN_<K>* > > ,
+ new OneBinaryOperator<set_eqarray_add<KN<K> ,KN_<K> > > , // Add FH juin 2005
+ new OneBinaryOperator<set_eqarrayp_add<KN<K> ,KN<K>* > >
+
+ );
+*/
+ TheOperators->Add("+=",
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,K > > ,
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,DotStar_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,DotSlash_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,Divc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_arraypd_add<KN_<K> ,Add_Mulc_KN_<K>* > > ,
+ new OneBinaryOperator<set_eq_arraypd_add<KN_<K> ,if_arth_KN_<K>* > > ,
+ new OneBinaryOperator<set_eq_array_add<KN_<K> ,KN_<K> > > // add FH juin 2005
+
+ // new OneBinaryOperator<set_eq_arrayp_add<KN_<K> ,KN<K>* > >
+ );
+/* if(0)
+ TheOperators->Add("-=",
+ new OneBinaryOperator<set_eqarray_sub<KN<K> ,K > > ,
+ new OneBinaryOperator<set_eqarray_sub<KN<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_sub<KN<K> ,DotStar_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_sub<KN<K> ,DotSlash_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_sub<KN<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_sub<KN<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_sub<KN<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarraypd_sub<KN<K> ,Add_Mulc_KN_<K>* > > ,
+ new OneBinaryOperator<set_eqarraypd_sub<KN<K> ,if_arth_KN_<K>* > > ,
+ new OneBinaryOperator<set_eqarray_sub<KN<K> ,KN_<K> > > , // Add FH juin 2005
+ new OneBinaryOperator<set_eqarrayp_sub<KN<K> ,KN<K>* > >
+ );*/
+
+ TheOperators->Add("-=",
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,K > > ,
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,DotStar_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,DotSlash_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,Divc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_arraypd_sub<KN_<K> ,Add_Mulc_KN_<K>* > > ,
+ new OneBinaryOperator<set_eq_arraypd_sub<KN_<K> ,if_arth_KN_<K>* > > ,
+ //- new OneBinaryOperator<set_eq_arrayp_sub<KN_<K> ,KN<K>* > >
+ new OneBinaryOperator<set_eq_array_sub<KN_<K> ,KN_<K> > > // Add FH juin 2005
+ );
+
+/* if(0)
+ TheOperators->Add("*=",
+ new OneBinaryOperator<set_eqarray_mul<KN<K> ,K > > ,
+ new OneBinaryOperator<set_eqarray_mul<KN<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_mul<KN<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_mul<KN<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_mul<KN<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarraypd_mul<KN<K> ,Add_Mulc_KN_<K>* > > ,
+ new OneBinaryOperator<set_eqarrayp_mul<KN<K> ,KN<K>* > >
+ );*/
+
+ TheOperators->Add("*=",
+ new OneBinaryOperator<set_eq_array_mul<KN_<K> ,K > > );
+ TheOperators->Add(".*=",
+ new OneBinaryOperator<set_eq_array_mul<KN_<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_mul<KN_<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_mul<KN_<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_mul<KN_<K> ,Divc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_mul<KN_<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_arraypd_mul<KN_<K> ,Add_Mulc_KN_<K>* > > ,
+ //- new OneBinaryOperator<set_eq_arrayp_mul<KN_<K> ,KN<K>* > >
+ new OneBinaryOperator<set_eq_array_mul<KN_<K> ,KN_<K> > >
+ );
+// FH correction 01 nov 2005 FH copy paste mistake eq_ exchange ok v2.0-3
+/* if(0)
+ TheOperators->Add("/=",
+ new OneBinaryOperator<set_eqarray_div<KN<K> ,K > > ,
+ new OneBinaryOperator<set_eqarray_div<KN<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_div<KN<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_div<KN<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarray_div<KN<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eqarraypd_div<KN<K> ,Add_Mulc_KN_<K>* > > ,
+ new OneBinaryOperator<set_eqarray_div<KN<K> ,KN_<K> > >
+ );*/
+
+ TheOperators->Add("/=",
+ new OneBinaryOperator<set_eq_array_div<KN_<K> ,K > > );
+ TheOperators->Add("./=",
+ new OneBinaryOperator<set_eq_array_div<KN_<K> ,Add_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_div<KN_<K> ,Sub_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_div<KN_<K> ,Mulc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_div<KN_<K> ,Divc_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_array_div<KN_<K> ,Mul_KNM_KN_<K> > > ,
+ new OneBinaryOperator<set_eq_arraypd_div<KN_<K> ,Add_Mulc_KN_<K>* > > ,
+ new OneBinaryOperator<set_eq_array_div<KN_<K> ,KN_<K> > >
+ );
+// end correction
+ TheOperators->Add("+",
+ new OneBinaryOperator<Op2_add0<Add_KN_<K>,KN_<K>,KN_<K> > >,
+ //- new OneBinaryOperator<Op2_add0<Add_KN_<K>,KN_<K>,KN_<K> > >(knrp,knrp),
+ new OneBinaryOperator<Op2_add__n<Add_Mulc_KN_<K>,Mulc_KN_<K>,Mulc_KN_<K> > >,
+ new OneBinaryOperator<Op2_add__n<Add_Mulc_KN_<K>,KN_<K>,Mulc_KN_<K> > >,
+ new OneBinaryOperator<Op2_add__n<Add_Mulc_KN_<K>,Mulc_KN_<K> ,KN_<K> > >
+ );
+
+ TheOperators->Add("-",
+ new OneBinaryOperator<Op2_sub0<Sub_KN_<K>,KN_<K> ,KN_<K> > >,
+ //- new OneBinaryOperator<Op2_sub0<Sub_KN_<K>,KN_<K> ,KN_<K> > >(knrp,knrp),
+ new OneUnaryOperator<Op1_sub<Mulc_KN_<K>,KN_<K> > >,
+ new OneBinaryOperator<Op2_sub__n<Add_Mulc_KN_<K>,Mulc_KN_<K>,Mulc_KN_<K> > >,
+ new OneBinaryOperator<Op2_sub__n<Add_Mulc_KN_<K>,KN_<K>,Mulc_KN_<K> > >,
+ new OneBinaryOperator<Op2_sub__n<Add_Mulc_KN_<K>,Mulc_KN_<K> ,KN_<K> > >
+ );
+
+ TheOperators->Add("*",
+ //- new OneBinaryOperator<Op2_mulpc<Mulc_KN_<K>,KN<K>*,K> >,
+ //- new OneBinaryOperator<Op2_mulcp<Mulc_KN_<K>,K,KN<K>*> >,
+ new OneBinaryOperator<Op2_mulc<Mulc_KN_<K>,KN_<K>,K> >,
+ new OneBinaryOperator<Op2_mulc<Mulc_KN_<K>,K,KN_<K> > >,
+ new OneBinaryOperator<Op2_mulpcp<Mul_KNM_KN_<K>,KNM<K>*,KN<K>*> >,
+ // new OneBinaryOperator<Op2_mulp<Mul_KNM_KN_<K>,KNM_<K>,KN_<K>> >, // - add #1 mqi 2009
+ // new OneBinaryOperator<Op2_dotproduct<K> >,
+ new OneBinaryOperator<Op2_dotproduct_<K> >
+ //- ,new OneBinaryOperator<Op2_pbuild<outProduct_KN_<K>,KN<K>*,Transpose<KN_<K> > > >
+ ,new OneBinaryOperator<Op2_pbuild<outProduct_KN_<K>,KN_<K>,Transpose<KN_<K> > > >
+ ,new OneBinaryOperator<Op2_pbuild<outProduct_KN_<K>,Mulc_KN_<K>,Transpose<KN_<K> > > >
+
+ );
+
+ TheOperators->Add("/",
+ new OneBinaryOperator<Op2_divc<Divc_KN_<K>,K,KN_<K> > >,
+ new OneBinaryOperator<Op2_divc<Mulc_KN_<K>,KN_<K>,K > >
+
+ );
+
+// nouvel operateur
+ TheOperators->Add("+=",
+ new OneBinaryOperator<set_eqarraypd_add<KNM<K> ,outProduct_KN_<K>* > >
+ );
+
+ TheOperators->Add("-=",
+ new OneBinaryOperator<set_eqarraypd_sub<KNM<K> ,outProduct_KN_<K>* > >
+ );
+
+ TheOperators->Add("=",
+ new OneBinaryOperator<set_eqarraypd<KNM<K> ,outProduct_KN_<K>* > >
+ );
+// tested ok ... FH
+ TheOperators->Add("?:",
+ new OneTernaryOperator3<Op3_p<if_arth_KN_<K>, KN_<K> > > ,
+ new OneTernaryOperator3<Op3_paac<K > > ,
+ new OneTernaryOperator3<Op3_pacc<K > > ,
+ new OneTernaryOperator3<Op3_paca<K > >
+
+ );
+// end ...
+
+// add mars 2006
+// atype<KN_<K> >()->Add("(","",new OneOperator2_< pair<KN_<K>,KN_<long> > * ,KN_<K> , KN_<long> >(pBuild< KN_<K> , KN_<long> >));
+ atype<KN_<K> >()->Add("(","",new OneOperator2_< pair<KN_<K>,KN_<long> > * ,KN_<K> , KN_<long> >(pBuild< KN_<K> , KN_<long> >,atype<KN_<K> >(), atype<KN_<long> >() ));
+ atype<KN<K> *>()->Add("(","",new OneOperator2_< pair<KN_<K>,KN_<long> > * ,KN_<K> , KN_<long> >(pBuild< KN_<K> , KN_<long> >,atype<KN<K> * >(), atype<KN_<long> >() ));
+ //atype<KN_<K> >()->Add("(","",new OneOperator2_< pair<KN_<K>,KN_<long> > * ,KN_<K> , KN_<long> >(pBuild< KN_<K> , KN_<long> >,atype<KN_<K> >(), knlp ));
+ //atype<KN<K> *>()->Add("(","",new OneOperator2_< pair<KN_<K>,KN_<long> > * ,KN_<K> , KN_<long> >(pBuild< KN_<K> , KN_<long> >,atype<KN<K> * >(), knlp ));
+
+ TheOperators->Add("=",
+ new OneBinaryOperator<set_A_BI< K,Z,affectation<K> > > ,
+ new OneBinaryOperator<set_AI_B< K,Z,affectation<K> > >
+ );
+ TheOperators->Add("+=",
+ new OneBinaryOperator<set_A_BI< K,Z,affectation_add<K> > > ,
+ new OneBinaryOperator<set_AI_B< K,Z,affectation_add<K> > >
+ );
+ TheOperators->Add("-=",
+ new OneBinaryOperator<set_A_BI< K,Z,affectation_sub<K> > > ,
+ new OneBinaryOperator<set_AI_B< K,Z,affectation_sub<K> > >
+ );
+// fin
+ TheOperators->Add("\'",
+ // new OneOperator1<Transpose<KN_<K> >,KN<K> *>(&Build<Transpose<KN_<K> >,KN<K> *>),
+ new OneOperator1<Transpose<KN_<K> >,KN_<K> >(&Build<Transpose<KN_<K> >,KN_<K> >),
+ new OneOperator1<Transpose<KNM<K> * >, KNM<K> * >(&Build<Transpose<KNM<K> * >,KNM<K> * >)
+ );
+
+ TheOperators->Add(".*",
+ new OneBinaryOperator<Op2_build<DotStar_KN_<K>,KN_<K>,KN_<K> > > //-,
+ //- new OneBinaryOperator<Op2_build<DotStar_KN_<K>,KN_<K>,KN_<K> > >(knrp,knrp),
+ //- new OneBinaryOperator<Op2_build<DotStar_KN_<K>,KN_<K>,KN_<K> > >(knr_,knrp),
+ //- new OneBinaryOperator<Op2_build<DotStar_KN_<K>,KN_<K>,KN_<K> > >(knrp,knr_)
+
+ );
+
+
+ TheOperators->Add("./",
+ new OneBinaryOperator<Op2_build<DotSlash_KN_<K>,KN_<K>,KN_<K> > > //-,
+ //- new OneBinaryOperator<Op2_build<DotSlash_KN_<K>,KN_<K>,KN_<K> > >(knrp,knrp),
+ //- new OneBinaryOperator<Op2_build<DotSlash_KN_<K>,KN_<K>,KN_<K> > >(knr_,knrp),
+ //- new OneBinaryOperator<Op2_build<DotSlash_KN_<K>,KN_<K>,KN_<K> > >(knrp,knr_)
+ );
+
+ TheOperators->Add("<<",
+ // new OneBinaryOperator<PrintPnd<KN<K>*> >,
+ new OneBinaryOperator<Print<KNM_<K> > >,
+ new OneBinaryOperator<Print<KN_<K> > >
+ );
+ TheOperators->Add("<<",
+ new OneBinaryOperator< PrintPnd< KN< KNM<K> >* > >,
+ new OneBinaryOperator< PrintPnd< KN< KN<K> >* > >
+ );
+
+
+ TheOperators->Add(">>",
+ new OneBinaryOperator<Op_ReadKN<K> >
+ );
+
+ map_type[typeid(MyMap<String,K>*).name()] = new ForEachType<MyMap<String,K>*>(Initialize<MyMap<String,K> >,Delete<MyMap<String,K> >) ;
+
+ map_type_of_map[make_pair(atype<string*>(),atype<K>())]=atype<MyMap<String,K>*>();
+
+ atype<MyMap<String,K>*>()->Add("[","",new OneOperator2_<K*,MyMap<String,K>*,string*>(get_element<K>));
+
+ // Add Mai 2009
+ Dcl_Type<SetArray<K> >();
+ TheOperators->Add("::",
+
+ new OneBinaryOperator<SetArray2<K> >,
+ new OneTernaryOperator3<SetArray3<K> >);
+ TheOperators->Add("<-",
+ new OneOperator2_<KN<K> *,KN<K> *,SetArray<K> >(&set_init_array));
+
+ TheOperators->Add("=",
+ new OneOperator2_<KN<K> *,KN<K> *,SetArray<K> >(&set_array),
+ new OneOperator2_<KN<K> *,KN<K> *,KN<K> * >(&set_arrayp), // to reomve ambiguity aug 2009
+ new OneOperator2_<KN_<K> ,KN_<K> ,SetArray<K> >(-1,&set_array_) // missing aug 2009 a(:)=1:3 less prioritaire
+ );
+
+
+}
+
+template<class R,class A,class B=A,class BB=B>
+class OneOperator1F_KN_ : public OneOperator {
+ aType r; // return type
+ typedef A (*func)( B ) ;
+ func f;
+ public:
+ E_F0 * code(const basicAC_F0 & args) const
+ { return new Op(f,t[0]->CastTo(args[0]));}
+ OneOperator1F_KN_(func ff):
+ OneOperator(map_type[typeid(R).name()],map_type[typeid(BB).name()]),f(ff){}
+
+ class Op :public E_F0 { public:
+ typedef A (*func)(B ) ;
+ func f;
+ Expression a;
+ Op(func ff,Expression aa) : f(ff),a(aa) {}
+ AnyType operator()(Stack s) const {return SetAny<R>( R(f, GetAny<BB>( (*a)(s)) ) );}
+ bool EvaluableWithOutStack() const
+ {return a->EvaluableWithOutStack() ;} //
+ bool MeshIndependent() const
+ {return a->MeshIndependent();} //
+
+};
+
+};
+template<class K,class KK>
+void ArrayOperatorF()
+{
+ Dcl_Type<F_KN_<K,K,KK> >();
+
+
+ Global.Add("exp","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(exp));
+ Global.Add("log","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(log));
+ Global.Add("log10","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(log10));
+ Global.Add("sqrt","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(sqrt));
+ Global.Add("sin","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(sin));
+ Global.Add("cos","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(cos));
+ Global.Add("tan","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(tan));
+ Global.Add("cosh","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(cosh));
+ Global.Add("sinh","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(sinh));
+ Global.Add("tanh","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(tanh));
+ // Global.Add("acos","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(acos));
+ // Global.Add("asin","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(asin));
+ // Global.Add("atan","(",new OneOperator1F_KN_<F_KN_<K,K,KK>,K,KK,KN_<K> >(atan));
+
+ TheOperators->Add("=",new OneBinaryOperator<set_eq_array<KN_<K> ,F_KN_<K,K,KK> > > ); // add FH juin 2005
+ TheOperators->Add("+=",new OneBinaryOperator<set_eq_array_add<KN_<K> ,F_KN_<K,K,KK> > > ); // add FH juin 2005
+ TheOperators->Add("-=",new OneBinaryOperator<set_eq_array_sub<KN_<K> ,F_KN_<K,K,KK> > > ); // add FH juin 2005
+ TheOperators->Add("/=",new OneBinaryOperator<set_eq_array_div<KN_<K> ,F_KN_<K,K,KK> > > ); // add FH juin 2005
+ TheOperators->Add("*=",new OneBinaryOperator<set_eq_array_mul<KN_<K> ,F_KN_<K,K,KK> > > ); // add FH juin 2005
+
+}
diff --cc src/fflib/ffapi.cpp.orig
index da6bcbb,0000000..a2407f3
mode 100755,000000..100755
--- a/src/fflib/ffapi.cpp.orig
+++ b/src/fflib/ffapi.cpp.orig
@@@ -1,312 -1,0 +1,323 @@@
+#ifdef WITH_PETSC
+#include <petsc.h>
+#endif
+
+/// \file
+/// ======================================================================
+/// Written by Antoine Le Hyaric
+/// Laboratoire Jacques-Louis Lions
+/// Université Pierre et Marie Curie-Paris6, UMR 7598, Paris, F-75005 France
+/// http://www.ljll.math.upmc.fr/lehyaric
+/// ======================================================================
+/// This file is part of Freefem++
+///
+/// Freefem++ is free software; you can redistribute it and/or modify
+/// it under the terms of the GNU Lesser General Public License as
+/// published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+///
+/// Freefem++ is distributed in the hope that it will be useful,
+/// but WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+/// GNU Lesser General Public License for more details.
+///
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with Freefem++; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+/// 02110-1301 USA
+/// ======================================================================
+/// headeralh cpp freefem start=21/01/10 upmc
+
+// Proposed FreeFem++ Application Programming Interface
+// ----------------------------------------------------
+
+// headerfilter
+#include "ffapi.hpp"
+#ifdef FFLANG
+#include "socket.hpp"
+#include "spawn.hpp"
+#include "buffer.hpp"
+#endif
+#include <iostream>
+#include <cstdio>
+#ifndef FFLANG
+#include <cstdio>
+#endif
+#ifdef FFLANG
+#include "options.hpp"
+#include <stdlib.h>
+#endif
+#ifndef FFLANG
+#ifdef WIN32
+#include <fcntl.h>
+#endif
+#endif
+#ifndef FFLANG
+#ifdef PARALLELE
+#include "mpi.h"
+#endif
+#endif
++<<<<<<< HEAD
+// Add dec 2014
+#include <vector>
+typedef void (*AtEnd)();
+vector<AtEnd> AtFFEnd;
+void ff_finalize()
+{
+ for (vector<AtEnd>::const_reverse_iterator i=AtFFEnd.rbegin(); i !=AtFFEnd.rend(); ++ i)
+ (**i)();
+ AtFFEnd.clear();
+}
+void ff_atend(AtEnd f)
+{
+ AtFFEnd.push_back(f);
+}
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// FFCS-specific implementations for the FF API
+// --------------------------------------------
+
+/// FFLANG defined means that FFCS is being compiled. I am fairly confident that FFCS will not be defined while
+/// compiling the original FF.
+
+/// Need to choose a non-zero stream number because FF will check it (as global variable ThePlotStream)
+#define FFAPISTREAM 1
+
+/// if FFCS is around, we need to bufferize all communications to avoid mixing up CMD_FFG and CMD_STDOUT messages
+#ifdef FFLANG
+void bufferwrite(const char *b,const int l){
+ Socket::dialoglock->WAIT(); // need #include "socket.hpp"
+
+ // thank to the buffering, there is only one CMD_FFG tag for multiple visualization data items.
+ onlyffsock()<<CMD_FFG; // need #include "spawn.hpp"
+ onlyffsock()<<l;
+
+ // this call contains the socket MAGIC number
+ onlyffsock().bufferedwrite(static_cast<const char*>(b),l);
+
+ Socket::dialoglock->Free();
+}
+
+Buffer buffer(NULL,bufferwrite); // need #include "buffer.hpp"
+#endif
+
+namespace ffapi{
+
+ // Get a pointer to the local cin/cout (which is distinct from ffcs's stdin/stdout under Windows because each DLL owns
+ // separate cin/cout objects).
+
+ // need #include <iostream>
+ std::istream *cin(){return &std::cin;}
+ std::ostream *cout(){return &std::cout;}
+ std::ostream *cerr(){return &std::cerr;}
+
+ // FFCS - ::stdout not accepted under mingw32
+ // need #include <cstdio>
+ FILE *ffstdout(){return stdout;}
+ FILE *ffstderr(){return stderr;}
+ FILE *ffstdin(){return stdin;}
+
+ void newplot(){}
+
+ FILE *ff_popen(const char *command, const char *type){
+#ifdef FFLANG
+
+ // this happens right at the begining of FF, so the socket
+ // communication must not be started yet (only when actual
+ // visualization data needs to be transfered).
+
+ PROGRESS;
+ return (FILE*)FFAPISTREAM;
+#else
+
+ // need #include <cstdio>
+ return popen(command,type);
+#endif
+ }
+
+ int ff_pclose(FILE *stream){
+#ifdef FFLANG
+ // nothing to close in FFCS
+ return 0;
+#else
+ return pclose(stream);
+#endif
+ }
+
+ size_t fwriteinit(const void *ptr, size_t size, size_t nmemb,FILE *stream){
+
+ // printf() is useful for debug because it is not redirected through
+ // the FFCS socket. But it is asynchronous with cout so it may end up
+ // in the middle of the lines checked by test/compare. So deactivate
+ // it by default.
+#ifdef DEBUG_FFAPI
+#ifdef FFLANG
+ printf("debug: ffapi: using TCP sockets\n");
+#else
+ printf("debug: ffapi: using an anonymous pipe\n");
+#endif // FFLANG
+#endif // DEBUG_FFAPI
+
+#ifdef FFLANG
+
+ // Ask FFCS to analyze the visualization flux header. I could just skip this stage, but it will be useful to check
+ // the coherency between FFCS and FF when FF evolves in the future.
+
+ Socket::dialoglock->WAIT();
+ onlyffsock()<<CMD_FFGINIT;
+ Socket::dialoglock->Free();
+#endif
+ return ff_fwrite(ptr,size,nmemb,stream);
+ }
+
+ size_t ff_fwrite(const void *ptr, size_t size, size_t nmemb,FILE *stream){
+#ifdef FFLANG
+
+ // if the ffsock pointer is null here, it means that the pointer exported from the FFCS shared library is not a
+ // valid one (this has been the case with Windows DLLs in the past).
+
+ // we won't make use of the stream, but make sure that the call from
+ // FF is coherent with what we know.
+ assert(stream==(FILE*)FFAPISTREAM);
+
+ buffer.write(static_cast<const char*>(ptr),size*nmemb);
+
+ // stops the server flux at one precise point (point value expressed during a previous crash while reading server
+ // data in the client in visudata.cpp). Use abort() to call the debugger (which can display the call stack and show
+ // where the problematic pipe value came from).
+
+ // need #include "options.hpp"
+ if(options->AbortFFGraphicsDataAt==buffer.getpoint())abort(); // need #include <stdlib.h>
+
+#else
+ fwrite(ptr,size,nmemb,stream);
+#endif
+ return 0;
+ }
+
+ int ff_fflush(FILE *stream){
+#ifdef FFLANG
+ assert(stream==(FILE*)FFAPISTREAM);
+
+ // we need to flush both the buffer and the socket to avoid a separate callback for flush in the buffer
+ buffer.flush();
+
+ // ff_fflush() is used by FF only at the end of a plot, so we can use this location to send a marker for the
+ // sequential java client to deal with one complete plot at a time.
+ Socket::dialoglock->WAIT();
+ onlyffsock()<<CMD_FFGEND;
+ onlyffsock().writeflush();
+ Socket::dialoglock->Free();
+
+#else
+ fflush(stream);
+#endif
+ return 0;
+ }
+
+ int ff_ferror(FILE *stream){
+#ifndef FFLANG
+ return ferror(stream);
+#else
+ return 0;
+#endif
+ }
+
+ int ff_feof(FILE *stream){
+#ifndef FFLANG
+ return feof(stream);
+#else
+ return 0;
+#endif
+ }
+
+ void wintextmode(FILE *f){
+#ifndef FFLANG
+#ifdef WIN32
+ // need #include <fcntl.h>
+ _setmode(fileno(f),O_TEXT);
+#endif
+#endif
+ }
+
+ void winbinmode(FILE *f){
+#ifndef FFLANG
+#ifdef WIN32
+ _setmode(fileno(f),O_BINARY);
+#endif
+#endif
+ }
+
+ void mpi_init(int &argc, char** &argv){
+ /// only call MPI_Init() if this has not already been done in ffcs/src/server.cpp
+#ifndef FFLANG
+#ifdef PARALLELE
+ // need #include "mpi.h"
+ int provided;
+ MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided);
+ if(provided < MPI_THREAD_SERIALIZED) {
+ MPI_Comm_rank(MPI_COMM_WORLD, &provided);
+ if(provided == 0)
+ std::cout << "MPI_THREAD_SERIALIZED not supported !" << std::endl;
+ }
++<<<<<<< HEAD
+#ifdef WITH_PETSCxxxxx
++=======
++#ifdef WITH_PETSC
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ PetscInitialize(&argc, &argv, 0, "");
+#endif
+
+#endif
+#endif
+ }
+
+ void mpi_finalize(){
+#ifndef FFLANG
+#ifdef PARALLELE
++<<<<<<< HEAD
+#ifdef WITH_PETSCxxxxxxxx
++=======
++#ifdef WITH_PETSC
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ PetscFinalize();
+#endif
+ MPI_Finalize();
+#endif
+#endif
+ }
+
+ bool protectedservermode(){
+#ifdef FFLANG
+ return !options->LocalClient;
+#else
+ return false;
+#endif
+ }
+
+ void init(){
+ ffapi::fwriteinit;
+ ffapi::winbinmode;
+ ffapi::wintextmode;
+ ffapi::mpi_finalize;
+ ffapi::cin;
+ ffapi::cerr;
+ ffapi::cout;
+ ffapi::ff_feof;
+ ffapi::newplot;
+ ffapi::ff_popen;
+ ffapi::mpi_init;
+ ffapi::ff_ferror;
+ ffapi::ff_fflush;
+ ffapi::ff_fwrite;
+ ffapi::ff_pclose;
+ ffapi::protectedservermode;
+ }
+}
+
+/// Local Variables:
+/// mode:c++
+/// ispell-local-dictionary:"british"
+/// coding:utf-8
+/// End:
diff --cc src/fflib/ffapi.hpp.orig
index 26bc4c2,0000000..6d3f5a5
mode 100755,000000..100755
--- a/src/fflib/ffapi.hpp.orig
+++ b/src/fflib/ffapi.hpp.orig
@@@ -1,115 -1,0 +1,124 @@@
+/// \file
+/// ======================================================================
+/// Written by Antoine Le Hyaric
+/// Laboratoire Jacques-Louis Lions
+/// Université Pierre et Marie Curie-Paris6, UMR 7598, Paris, F-75005 France
+/// http://www.ljll.math.upmc.fr/lehyaric
+/// ======================================================================
+/// This file is part of Freefem++
+///
+/// Freefem++ is free software; you can redistribute it and/or modify
+/// it under the terms of the GNU Lesser General Public License as
+/// published by the Free Software Foundation; either version 2.1 of
+/// the License, or (at your option) any later version.
+///
+/// Freefem++ is distributed in the hope that it will be useful,
+/// but WITHOUT ANY WARRANTY; without even the implied warranty of
+/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+/// GNU Lesser General Public License for more details.
+///
+/// You should have received a copy of the GNU Lesser General Public
+/// License along with Freefem++; if not, write to the Free Software
+/// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+/// 02110-1301 USA
+/// ======================================================================
+/// headeralh cpp freefem start=21/01/10 upmc
+
+// Proposed FreeFem++ Application Programming Interface
+// ----------------------------------------------------
+
+// headerfilter
+#ifndef FFAPI_HPP
+#include <iostream>
+#include <sstream>
+#include <cstdio>
+using namespace std;
+#endif //FFAPI_HPP
+
+#ifndef FFAPI_HPP
+#define FFAPI_HPP
++<<<<<<< HEAD
+ void ff_finalize();
+ void ff_atend( void (*atendff)());
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+namespace ffapi{
+
+ // Redirecting the FF data stream
+ // ------------------------------
+
+ // Getting a pointer to FF stdin and stdout enables extra DLLs to use standard IO even when they are redirected (eg
+ // through FFCS).
++<<<<<<< HEAD
+
+ void init();
++=======
++
++ void init();
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ // need #include <iostream>
+ // need #include <sstream>
+ // need using namespace std;
+ std::istream *cin();
+ std::ostream *cout();
+ std::ostream *cerr();
+
+ // <<mingw32_stdout>> Cannot name these functions identically to the original file pointers under MingW32 (compile
+ // error). Impacts [[file:InitFunct.hpp::LOADINITIO]]. Changed from stdxxx_ptr() to ffstdxxx() according to the way FF
+ // itself was changed.
+
+ FILE *ffstdout();
+ FILE *ffstderr();
+ FILE *ffstdin();
+
+ /// Initiate graphical pipe output. I need a separate function for this to warn ffcs to check the corresponding ffglut
+ /// magic number
+
+ size_t fwriteinit(const void *ptr, size_t size, size_t nmemb,FILE *stream);
+
+ /// Indicates the begining of a new plot to avoid sending socket control data with each plot item.
+
+ void newplot();
+
+ /// Redefinition of standard system calls
+
+ FILE *ff_popen(const char *command, const char *type);
+ int ff_pclose(FILE *stream);
+ size_t ff_fwrite(const void *ptr, size_t size, size_t nmemb,FILE *stream);
+ int ff_fflush(FILE *stream);
+ int ff_ferror(FILE *stream);
+ int ff_feof(FILE *stream);
+
+ // Windows file mode
+ // -----------------
+
+ /// Changing file mode needs to be disabled when the file is a TCP socket to FFCS. Since the treatment is different in
+ /// FF and in FFLANG executables, they have to be stored in a DLL that changes between these two programs.
+
+ void wintextmode(FILE *f);
+ void winbinmode(FILE *f);
+
+ // Transfer basic MPI control
+ // --------------------------
+
+ void mpi_init(int &argc, char **& argv);
+ void mpi_finalize();
+
+ // Permanent server control
+ // ------------------------
+
+ /// if true, FF is considered to be accessible from remote anonymous connections and some commands (like shell
+ /// commands) are not allowed.
+
+ bool protectedservermode();
+}
+
+#endif // FFAPI_HPP
+
+/// Local Variables:
+/// mode:c++
+/// ispell-local-dictionary:"british"
+/// coding:utf-8
+/// End:
diff --cc src/fflib/lex.cpp.orig
index 4c831e0,0000000..5501241
mode 100644,000000..100644
--- a/src/fflib/lex.cpp.orig
+++ b/src/fflib/lex.cpp.orig
@@@ -1,860 -1,0 +1,864 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include <complex>
+#include <string>
+#include <iostream>
+#include "error.hpp"
+#include <ctype.h>
+#include <stdlib.h>
+#include <map>
+#include "AFunction.hpp"
+//class pfes;
+#include <iomanip>
+#include "lg.tab.hpp"
+#include "lex.hpp"
+
+
+extern YYSTYPE *plglval;
+
+// New version of macro expantion more classical
+// and more simple
+// FH Jan. 2005
+
+static const bool debugmacro = false;
+
+/*inline char * newcopy(const char * s)
+{
+ char *r(new char [strlen(s)+1]);
+ strcpy(r, s);return r;
+}
+*/
+void mylex::Add(Key k,int i)
+{
+ Check(!i,k,"mot clef");
+ Add(k,i,0);
+}
+
+void mylex::Add(Key k,aType t)
+{
+ Check(!t,k,"type");
+
+ // TYPE defined at [[file:../lglib/lg.ypp::token type TYPE]]
+ Add(k,TYPE,t);
+}
+
+void mylex::AddF(Key k,aType t)
+{
+ Check(!t,k,"FUNCTION");
+ Add(k,FUNCTION,t);
+}
+void mylex::AddSpace(Key k,aType t)
+{
+ Check(!t,k,"FESPACE");
+ Add(k,FESPACE,t);
+}
+
+bool mylex::InMotClef (aType & t, int & r) const {
+ const_iterator i= MotClef.find(buf);
+ if (i== MotClef.end()) {
+ t=0;r=ID;
+ return false;}
+ else {
+ r=i->second.first;
+ t=i->second.second;
+ ffassert(r);
+ return true;}}
+
+void mylex::Add(Key k,int r,aType t){
+ iterator ii= MotClef.find(k);
+ ffassert(ii==MotClef.end());
+ MotClef.insert(pair<const Key,Value>(k,Value(r,t))); }
+
+void mylex::dump(ostream & f )
+{
+ const_iterator i=MotClef.begin(),e=MotClef.end();
+ for (;i != e;i++)
+ {
+ f << " " << i->first << " " << i->second.first << " " << i->second.second->name() << endl;
+ }
+}
+
+inline bool isNLCR(istream & f,int c)
+{
+ // eat CR NL or NL CR paire
+ int cc= f.peek();
+ bool ret=(c == 10 || c == 13) ;
+ if(ret && ( cc != c) && (cc == 10 || cc == 13) )
+ f.get();
+ return ret;
+}
+
+int mylex::EatCommentAndSpace(string *data)
+{
+ // if data is !0 then add reading char in data
+ // return the last read char c
+ // --------------------
+ int c,caux,sep=0;
+ const int space=(int) ' ';
+ int incomment =0;
+ do {
+ incomment = 0;
+ c = source().peek();
+
+ // eat spaces
+ while (isspace(c) || c == 10 || c == 13 )
+ {sep=space;
+ c = source().get();
+ if(isNLCR(source(),c)) c='\n';
+ if (echo) cout << (char) c;
+ if(c=='\n') { linenumber++; if (echo) cout << setw(5) <<linenumber << " : " ;};
+ if(data) *data+=char(c);
+ c=source().peek();
+ }
+
+ // eat comment
+ if(c=='/')
+ { c = source().get();
+ caux=source().peek();
+ if(caux =='/') incomment = 1;
+ else if (caux == '*' ) incomment = 2;
+ if(!incomment) source().putback(c);
+ }
+
+
+ if(incomment==1)
+ { sep=space;
+ if (echo) cout << "//" ;source().get();
+ if(data) *data+="//";
+
+ do {c=source().get();
+ if(isNLCR(source(),c)) c='\n';
+ if (echo) cout << (char) c;
+ if(data) *data+=char(c);
+ if(c=='\n') { linenumber++; if (echo) cout << setw(5) <<linenumber << " : " ;};
+ }
+ while( (c!= '\n') && (c!= 10) && (c!= 13) && ( c != EOF) );
+ }
+ else if(incomment==2)
+ { sep=space;
+ if (echo) cout << "/*" ;
+ if(data) *data+="/*";
+
+ source().get();
+ do {
+ c=source().get();
+ if(isNLCR(source(),c)) c='\n';
+ if (echo) cout << (char) c ;
+ if(data) *data+=char(c);
+ if(c=='\n') { linenumber++; if (echo) cout << setw(5) <<linenumber << " : " ;};
+ caux = source().peek();
+ } while(c != EOF && !(c=='*' && caux=='/') ) ;
+
+ if(c != EOF)
+ { c = source().get();
+ if (echo) cout << (char) c ;
+ if(data) *data+=char(c);
+ }
+ else erreur( " Unterminated comment");
+ }
+ } while (incomment);
+ return (c==EOF) ? c : sep;
+}
+int mylex::basescan()
+{
+ // extern long mpirank;
+
+ int c;
+ buf[0]=0;
+ buf[1]=0;
+ buf[2]=0;
+ buf[3]=0; //
+ debut:
+ TheCurrentLine=linenumber;
+ // modif FH
+ if (firsttime)
+ {
+ firsttime=false;
+ if(echo) cout << setw(5) <<linenumber << " : " ;
+ }
+ EatCommentAndSpace();
+ c =source().get(); // the current char
+ char nc = source().peek(); // next char
+ buf[0]=c;
+ buf[1]=nc;
+ buf[2]=0;
+ int ret = c;
+ if (c == EOF)
+ {
+ //if (echo) cout << "ENDOFFILE "<< endl;
+ if (close() ) goto debut;
+ buf[0]=0;
+ return ENDOFFILE;}
+ else if (isdigit(c) || (c=='.' && isdigit(nc))) {
+ // a number
+ int i=1;
+ buf[0]=c;
+ bool real= (c=='.');
+
+
+ while ( isdigit(nc) && i< 50 ) buf[i++]=source().get(),nc=source().peek();
+ if (!real && (nc == '.')) real=true,buf[i++]=source().get(),nc=source().peek();
+ while ( isdigit(nc) && i< 50 ) buf[i++]=source().get(),nc=source().peek();
+ if (nc =='E' || nc =='e' || nc =='D' || nc =='d') {real=true;
+ buf[i++]=source().get(),nc=source().peek();
+ if (nc =='+' || nc =='-' || isdigit(nc)) buf[i++]=source().get(),nc=source().peek();
+ while ( isdigit(nc) && i< 50 ) buf[i++]=source().get(),nc=source().peek();
+ }
+ if (i>= 50) erreur("Number to long");
+
+ buf[i]=0;
+ if (nc=='i' )
+ { buf[i++]=source().get(),buf[i]=0,plglval->dnum = atof(buf),ret=CNUM;}
+ else
+ if (real)
+ plglval->dnum = atof(buf),ret=DNUM;
+ else
+ plglval->lnum = atoi(buf),ret=LNUM;
+
+ if(lexdebug) cout << " NUM : " << buf << " "<<endl;
+ }
+ else if (isalpha(c) || c=='\\')
+ {
+ ret = ID;
+ int i;
+ for (i = 1; i < 256 && isalnum(source().peek()); i++)
+ buf[i]=source().get();
+ if (i == 256)
+ erreur ("Identifyier too long");
+ buf[i] = 0;
+
+ }
+ else if (c=='"')
+ {
+ int i;
+ char cc,ccc;
+ for ( i = 0,cc=source().peek();
+ i < 256 && ( (isprint(cc)|isspace(cc)) && cc !='\n' && cc !='"');
+ cc=source().peek(),++i
+ )
+ {
+ if ( cc == '\\') // escape
+ {
+ cc= source().get();
+ cc= source().get();
+ ccc= source().peek();
+ switch (cc) {
+ case 'n': buf[i]='\n';break;
+ case 'r': buf[i]='\r';break;
+ case 'f': buf[i]='\f';break;
+ case 't': buf[i]='\t';break;
+ case 'a': buf[i]='\a';break;
+ case 10:
+ case 13:
+ cc='\n';
+ if(ccc!=cc && (ccc==10 || ccc==13)) source().get();// NL CR eat ...
+ linenumber++;
+ //if (echo) cout << setw(5) <<linenumber << " : " ;
+ default : buf[i]=cc ;break;
+ }
+ }
+ else
+ buf[i] = source().get();
+ }
+ if (i == 256) erreur ("String too long");
+ buf[i] = 0;
+ if(source().get() != '"') erreur("End of String could not be found");
+ plglval->str = newcopy(buf);
+ if(lexdebug) cout << "STRING=" << '"' << buf << '"' << endl;
+
+ ret= STRING;
+ }
+ else
+ {
+ ret = c;
+ switch(c) {
+
+ case '{':
+ case '%':
+ case '}':
+ case '(':
+ case ')':
+ case '[':
+ case ']':
+ case ',':
+ case ';':
+ case '#':
+ break;
+ case '*':
+ if (nc == '=') ret=MULEQ;
+ break;
+ case '/':
+ if (nc == '=') ret=DIVEQ;
+ break;
+ case '^':
+ case '~':
+ case '\'':
+ case '_':
+ case '?':
+ break;
+ case '.':
+ if (nc == '*') ret = DOTSTAR;
+ else if (nc == '/') ret = DOTSLASH;
+ break;
+ case ':':
+ if (nc == '=') ret= SET;
+ break;
+ case '&':
+ if (nc == '&') ret= AND;
+ break;
+ case '|':
+ if (nc == '|') ret= OR;
+ break;
+ case '!':
+ if (nc == '=') ret=NE;
+ break;
+ case '<':
+ if (nc == '=') ret=LE;
+ if (nc == '<') ret=LTLT;
+ if (nc == '>') ret= NE;
+ break;
+ case '>':
+ if (nc == '=') ret=GE;
+ if (nc == '>') ret=GTGT;
+ break;
+ case '=':
+ if (nc == '=')
+ ret=EQ;
+ break;
+ case '-':
+ if (nc == '>') ret=ARROW;
+ if (nc == '-') ret=MOINSMOINS;
+ if (nc == '=') ret=MOINSEQ;
+ break;
+ case '+':
+ if (nc == '+') ret=PLUSPLUS;
+ if (nc == '=') ret=PLUSEQ;
+ break;
+ default:
+ cerr << "'" << (char) c << (char) nc << "' <=> " << (int) c << " is " ;
+ erreur (" Unexpected character");
+ }
+ if( (ret == DOTSTAR) || (ret==DOTSLASH))
+ {
+ source().get();
+ nc = source().peek();
+ if(nc == '=' )
+ {
+ buf[2]='=';// ad FH 19 april 2012 (bug in macro )
+ buf[3]=0;
+ source().get();
+ ret = (ret == DOTSTAR) ?DOTMULEQ : DOTDIVEQ;
+ }
+ }
+ else if (ret!=c) source().get();
+ else buf[1] = 0;
+ strcpy(plglval->oper,buf);
+ if(lexdebug) cout << "Special '" << plglval->oper << "' " << ret << " ";
+ }
+ typetoken=ret;
+ return ret;
+}
+
+int mylex::scan1()
+{
+
+ // extern long mpirank;
+ // bool echo = mpirank == 0;
+
+ int ret= basescan();
+ if(debugmacro) cout << " scan1 " << ret << " " << token() << " " << ID << endl;
+ while ( ret == ID &&SetMacro(ret)); // correction mars 2014 FH
+ while ( ret == ID && CallMacro(ret)) ; // correction mars 2014 FH
+
+ return ret;
+}
+
+// <<mylex_scan>>
+int mylex::scan(int lvl)
+{
+
+ int ret= scan1();
+
+ // ID defined at [[file:../lglib/lg.ypp::token str ID]]
+ if ( ret == ID) {
+ if (! InMotClef(plglval->type,ret)) {
+ int ft = FindType(buf);
+
+ // FESPACE, FESPACE1, FESPACE3 defined at [[file:../lglib/lg.ypp::token str FESPACE]]
+ int feid3[4] ={ ID,FESPACE1,FESPACE,FESPACE3};
+
+ assert ( ft >= 0 && ft <= 3) ;
+ ret = feid3[ft];
+ plglval->str = newcopy(buf);
+ }}
+
+ if ( ret =='{') { //cout << " listMacroDef->push_back"<< endl;
+ listMacroDef->push_back( MapMacroDef() );}
+ else if (ret == '}') {//cout << " listMacroDef->pop_back"<< endl;
+ listMacroDef->pop_back( );}
+
+ if (! lexdebug && echo && lvl==0 ) print(cout);
+
+ return ret;
+}
+
+string mylex::token() const
+ {
+ int i=-1;
+ string f;
+ if (typetoken == STRING)
+ {
+ f += '"';
+ while (buf[++i])
+ if (buf[i]=='\n') f += "\\n";
+ else if (buf[i]=='"') f += "\\\"";
+ else f += buf[i] ;
+ f+= '"';
+ }
+ else
+ while (buf[++i])
+ if (buf[i]=='\n') f += "\\n";
+ else f += buf[i] ;
+ return f;
+ }
+
+ void mylex::print(ostream &f) const
+ {
+ int i=-1;
+ int k=0;
+ if (typetoken == STRING)
+ {
+
+ f <<'"';
+ while (buf[++i]) { k++;
+ if (buf[i]=='\n') k++, f << "\\n";
+ else if (buf[i]=='"') k++,f << "\\\"";
+ else f << buf[i] ;
+ if ( k%50==49) f << "\n ... : ";
+ }
+ f << '"';
+ }
+ else
+ while (buf[++i])
+ if (buf[i]=='\n') f << "\\n";
+ else f << buf[i] ;
+
+ }
+
+char * mylex::match(int i)
+{ if ( i != basescan() ) {// basescan -> scan1 change 2/2/2007 (non pas des substitution de parametres FH)
+ cerr << " we waiting for a '" << char(i) <<"'" << endl;
+ ErrorScan(" err macro ");};
+ return buf; }
+
+
+bool mylex::SetMacro(int &ret)
+{
+ char endmacro[]="EndMacro";
+ char newmacro[]="NewMacro";
+
+ bool rt=false;
+ int oldmacro=1;
+ if (strcmp(buf,"macro")==0 || (oldmacro=strcmp(buf,newmacro))==0 )
+ {
+ char *macroname=newcopy(match(ID));
+ int nbparam =0;
+ deque<string> macroparm;
+ int rr=basescan();
+ string def;
+ if (rr!='(')
+ def += buf;
+ else
+ { // a '(' after macro name
+ rr = basescan();
+
+ if (rr != ')' )
+ do {
+ if (nbparam++>= 100)
+ { cerr << "in macro " <<macroname << endl;
+ ErrorScan(" Too much (more than 100) parameters"); }
+
+ //cout << " \t\t " << ID << " " << rr << " " << buf << endl;
+ if (rr != ID) {
+ cerr <<" Erreur waiting of an ID: " << buf << " " << rr << endl;
+ erreur("in macro def: waiting for a ID"); }
+ macroparm.push_back(buf);
+ rr = basescan();
+ if (rr == ')') break;
+ if ( rr != ',') erreur("in macro def: waiting , or ) ");
+ rr = basescan();
+
+ } while(1);
+ }
+ int kmacro=0;
+
+
+ do {
+ int lk=0;
+ string item;
+ int i = source().get();
+ if (i == EOF) { cerr << "in macro " <<macroname << endl;
+ ErrorScan(" ENDOFFILE in macro definition. remark:a macro end with // ");}
+ int ii = source().peek();
+ if(isspace(i) && isalpha(ii) ) {
+ def +=char(i);
+ i = source().get();
+ item = "";
+ while(isalpha(i))
+ {
+ item += char(i);
+ i = source().get();
+ }
+ if( item == newmacro) kmacro++;
+ if( item == endmacro) {
+ if (kmacro==0)
+ { source().putback(i); break;}
+ kmacro--;
+ }
+ def += item;
+ item ="";
+ ii = source().peek();
+ }
+
+ if(oldmacro)
+ {
+ if (i == '/' && ii == '/') { source().putback('/'); break;}
+ }
+
+ def +=char(i);
+ } while(1);
+ macroparm.push_back(def);
+ if(echo) cout << "macro " << macroname ;
+ for (size_t i=0;i<macroparm.size()-1;i++)
+ if(echo) cout << ( (i == 0) ? '(' : ',') << macroparm[i];
+ if (nbparam)
+ if(echo) cout << " ) " ;
+ for (size_t i=0;i<def.size();i++)
+ if (def[i] == 10 || (def[i] == 13 ) )
+ {
+ def[i]='\n';
+ linenumber++; if(echo) cout << '\n' << setw(5) <<linenumber << " : " ;
+ }
+ else
+ if(echo) cout << def[i] ;
+ // cout << macroparm.back() ;
+ MapMacroDef & MacroDef =listMacroDef->back();
+ MapMacroDef::const_iterator i=MacroDef.find(macroname);
+ if ( i == MacroDef.end() )
+ MacroDef[macroname]=macroparm;
+ else {
+ cerr << "ERREUR in macro name:" <<macroname << endl;
+ ErrorScan(" The macro already exists, sorry");}
+ rt=true;
+ ret= basescan();
+ }
+ return rt;
+}
+
+
+bool mylex::CallMacro(int &ret)
+{
+ // New Version with direct macro expansion
+ // FH jan 2005
+ // -----------------------------------------
+// add Stringification,FILE, LINE march 2014 FH..
+ if(strcmp(buf,"Stringification")==0)
+ {
+ if(debugmacro) cout <<"call Stringification : " << buf << endl;
+
+ if(echo) cout << buf << "(" ;
+ string p,cmm;
+ int lvll=0;
+ match('(');
+
+ int kend=')';
+ while (1) {
+ cmm="";
+ int sep = EatCommentAndSpace(&cmm);
+ p += cmm;
+ int rr = scan1();// do macro expantion
+ if(lvll && rr==')') lvll--; // if ( then we eat next )
+ else if (rr=='(') lvll++ ; // eat next
+ else if (lvll<=0)
+ {
+ if (rr==kend ) break;
+ else if (rr==')' || rr==',') {
+ cerr << "Error in Stringification "
+ << ", we wait for "<< char(kend) << " and we get " << char(rr)<< endl;
+ ErrorScan(" Wrong number of parameter in Stringification call");
+ }}
+ if(debugmacro)cout << " ..." << rr << " " << token()<< " " << level << endl;
+ if (rr==ENDOFFILE) ErrorScan(" Stringification in macro ");
+ if(echo) cout << token();
+ p += token();
+ //if(echo) cout <<buf;
+ }
+
+ plglval->str = newcopy(p.c_str());
+ ret = STRING;
+
+ return false;
+ }
+ else if(strcmp(buf,"FILE")==0)
+ {
+ plglval->str = newcopy(filename() );
+ ret = STRING;
+ return false;
+ }
+ else if(strcmp(buf,"LINE")==0)
+ {
+ plglval->lnum = linenumber;
+ ret=LNUM;
+ return false;
+ }
+ else
+ for (list<MapMacroDef>::const_iterator i=listMacroDef->begin(); i != listMacroDef->end(); i++)
+ {
+ MapMacroDef::const_iterator j= i->find(buf);
+
+ if (j != i->end()) {
+ // int inmacroold=withmacropara;
+ if(debugmacro) cout <<"call macro : " << buf << endl;
+ string * macronn= new string(" macro: ");
+ *macronn+= buf;
+
+ const deque<string> & macroparm= j->second;
+ int nbparam= macroparm.size()-1;
+ MapMacroParam lp;
+ if (nbparam > 0 ) {
+ match('(');
+ for (int k=0;k<nbparam;k++)
+ {
+ string p;
+ int kend= ( k+1 == nbparam) ? ')' : ',';
+ int lvl=0;
+ int lvll=0;
+ while (1) {
+ int sep = EatCommentAndSpace();
+ int rr = basescan();// basescan -> scan1 change 2/2/2007 ( not change to pass macro name as a parameter)
+ if ( (rr=='}') && (--lvll==0) )
+ continue; // remove first {
+ else if ( (rr=='{') && (++lvll==1) )
+ continue; // remove last }
+ else if(lvll==0) // count the open close () []
+ {
+ if(lvl && rr==')') lvl--; // if ( then we eat next )
+ else if(lvl && rr==']') lvl--; // if ( then we eat next )
+ else if (rr=='(') lvl++ ; // eat next
+ else if (rr=='[') lvl++ ; // eat next
+ else if (lvl<=0)
+ {
+ if (rr==kend ) break;
+ else if (rr==')' || rr==',') {// Correction FH 2/06/2004
+ cerr << "Error in macro expansion "<< j->first
+ << ", we wait for "<< char(kend) << " and we get " << char(rr)<< endl;
+ cerr << " number of macro parameter in definition is " << nbparam << endl;
+ ErrorScan(" Wrong number of parameter in macro call");
+ }}}
+
+ if (rr==ENDOFFILE) ErrorScan(" ENDOFFILE in macro usage");
+ if(sep==' ') p+=' ';
+ p += token(); // Correction FH 2/06/2004 of string parameter
+
+ }
+ if(debugmacro)
+ cout << "macro arg "<< k << " :" << macroparm[k] << " -> " << p << endl;
+ lp.insert(pair<string,string>(macroparm[k],p));
+ //lp[macroparm[k]] = p;
+ }
+ }
+ if(debugmacro)
+ cout << " input in : -> " << macroparm[nbparam] << " <-> " << nbparam << endl;
+ input(macroparm[nbparam]);
+ // ici il faut faire la substitution de parameter
+ // -----------------------------------------------
+ string expandtxt;
+ bool echosave=echo;
+ while(1) {
+ int c= EatCommentAndSpace(&expandtxt); // eat comment to save it;
+ if (c == EOF) break;
+ ret = basescan();
+ if(debugmacro) cout << " ret = " << ret << token() << endl;
+ if(ret== ENDOFFILE) break;
+ if (nbparam && ret == ID)
+ {
+ MapMacroParam::const_iterator j=lp.find(buf);
+ if ( j != lp.end())
+ expandtxt+=j->second;
+ else
+ expandtxt+=token();
+ }
+ else if (ret!='#') // macro concatenation operator
+ expandtxt+=token();
+ }
+ echo=echosave;
+ if(debugmacro) cout <<" (macro) eadin : " << expandtxt << endl;
+ input(expandtxt,macronn);
+ ret = scan1(); // Correction FH 6/06/2004 of string parameter
+ return true;
+ }
+ }
+ return false;
+}
+
+void mylex::xxxx::open(mylex *lex,const char * ff)
+{
+ //filename=ff;
+ l=0;
+ nf=f=0;
+ if(lex->ffincludedir.empty()) // if no liste
+ nf=f= new ifstream(ff,ios_base::binary); // modif of win32
+ if (!f || !*f)
+ {
+ if ( f) { delete f; f=0; }
+ for (ICffincludedir k=lex->ffincludedir.begin();
+ k!=lex->ffincludedir.end();
+ ++k)
+ {
+ string dif_ff(*k+ff);
+ if (verbosity>=50) lex->cout << " --lex open :" << dif_ff << endl;
+ nf=f= new ifstream(dif_ff.c_str(),ios_base::binary);
+ if ( f) {
+ if ( f->good()) {
+ filename = new string(dif_ff);
+ break;
+ }
+ delete f; f=0;
+ }
+ }
+ }
+ else
+ filename=new string(ff);
+ if (!f || !*f) {
+ lex->cout << " Error openning file " <<ff<< " in: " <<endl;
+ for (ICffincludedir k=lex->ffincludedir.begin();
+ k!=lex->ffincludedir.end();
+ ++k)
+ lex->cout << " -- try :\"" << *k+ff << "\"\n";
+
+ lgerror("lex: Error input openning file ");};
+}
+void mylex::xxxx::readin(mylex *lex,const string & s,const string *name, int macroargs)//,int nbparam,int bstackparam)
+{
+ filename=name;
+ macroarg=macroargs;
+ l=0;
+ nf=f= new istringstream(s.c_str());
+
+ if (!f || !*f) {
+ lex->cout << " Error readin string :" <<s<< endl;
+ lgerror("lex: Error readin macro ");};
+}
+
+void mylex::xxxx::close()
+{
+ if( nf) delete nf;
+ if (filename && (macroarg==0) ) delete filename;
+
+}
+void mylex::input(const char * filename)
+{
+ ffassert(level<99 && level >= -1);
+ if (level>=0)
+ pilesource[level].l =linenumber;
+
+ pilesource[level+1].open(this,filename);
+ pilesource[level+1].l =0;
+ // cout << "\n ++include " << filename << ";" << level+1 << endl;
+ linenumber = 1;
+ level++;
+}
+
+void mylex::input(const string & str,const string * name)
+{
+
+ ffassert(level<99 && level >= -1);
+ if (level>=0)
+ { pilesource[level].l =linenumber;
+ }
+
+ pilesource[level+1].readin(this,str,name);
+ linenumber = 0;
+ level++;
+
+}
+
+bool mylex::close() {
+ if(debugmacro )
+ cout << "\n close " << level ;
+ ffassert(level >=0 && level < 100);
+ // cout << "\n-- close " << level << endl;
+ pilesource[level].close();
+ // cout << "\n ++ " << level << endl;
+ if (--level<0)
+ return false;
+ linenumber = pilesource[level].l;
+ return true;
+}
+
+ mylex::~mylex()
+{
+ delete listMacroDef;
+ while( ! strdata.empty())
+ { // commente july 2005 FH ???. a test plus finement.
++<<<<<<< HEAD
+ delete [] strdata.top(); // bug ????? FH 25032005
++=======
++ // delete [] strdata.top(); // bug ????? FH 25032005
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ strdata.pop();
+ }
+}
+
+ mylex::mylex(ostream & out,bool eecho):
+ linenumber(1),
+ charnumber(0),
+ ffincludedir(ffenvironment["includepath"]),
+ firsttime(true),
+ level(-1),
+ echo(eecho && (mpirank == 0) && verbosity),
+ cout(out),
+ listMacroDef(new list<MapMacroDef>),
+ listMacroParam(0)
+ {
+ listMacroDef->push_front(MapMacroDef());
+ };
+
+mylex * Newlex( ostream & out,bool eecho)
+ {
+ return new mylex(out,eecho);
+ }
+void Destroylex(mylex * m)
+ {
+ delete m;
+ }
+ostream & mylex::ShowStack(ostream & f){
+ for (int i=0;i<level;++i)
+ if( pilesource[i].filename ) f << " \t"<<i<<"\t"<<" in " << *pilesource[i].filename<< " line : " << pilesource[i].l << endl;
+ return f;
+}
diff --cc src/fflib/lgfem.cpp
index 371d53d,5f26788..ab207e2
--- a/src/fflib/lgfem.cpp
+++ b/src/fflib/lgfem.cpp
@@@ -1839,7 -1839,7 +1839,7 @@@ AnyType set_fe (Stack s,Expression ppfe
}
AnyType set_feoX_1 (Stack s,Expression ppfeX_1, Expression e)
{ // inutile
-- // m�me chose que v(X1,X2);
++ // m�me chose que v(X1,X2);
StackOfPtr2Free * sptr = WhereStackOfPtr2Free(s);
typedef const interpolate_f_X_1<R>::CODE * code;
MeshPoint mp= *MeshPointStack(s);
diff --cc src/fflib/lgfem.cpp.orig
index 371d53d,5f26788..32a5cf8
--- a/src/fflib/lgfem.cpp.orig
+++ b/src/fflib/lgfem.cpp.orig
@@@ -2549,26 -2549,16 +2549,39 @@@ public
l[i].composant=false;
l[i].what=16; // iso value 3d
l[i][0]=CastTo<pf3c>(args[i]);}
++<<<<<<< HEAD
+ else if (BCastTo<pferarray>(args[i])) {
+ // cout << "BCastTo<pfer>(args[i])" << endl;
+ l[i].composant=false;
+ l[i].what=101; // iso value array iso value 2d
+ l[i][0]=CastTo<pferarray>(args[i]);}
+ else if (BCastTo<pfecarray>(args[i])) {
+ // cout << "BCastTo<pfer>(args[i])" << endl;
+ l[i].composant=false;
+ l[i].what=111; // iso value array iso value 2d
+ l[i][0]=CastTo<pfecarray>(args[i]);}
+ else if (BCastTo<pf3rarray>(args[i])) {
+ // cout << "BCastTo<pfer>(args[i])" << endl;
+ l[i].composant=false;
+ l[i].what=106; //arry iso value array iso value 3d
+ l[i][0]=CastTo<pf3rarray>(args[i]);}
+ else if (BCastTo<pf3carray>(args[i])) {
+ // cout << "BCastTo<pfer>(args[i])" << endl;
+ l[i].composant=false;
+ l[i].what=116; //arry iso value array iso value 3d
+ l[i][0]=CastTo<pf3carray>(args[i]);}
++=======
+ else if (BCastTo<pferarray>(args[i])) {
+ // cout << "BCastTo<pfer>(args[i])" << endl;
+ l[i].composant=false;
+ l[i].what=101; // iso value array iso value 2d
+ l[i][0]=CastTo<pferarray>(args[i]);}
+ else if (BCastTo<pf3rarray>(args[i])) {
+ // cout << "BCastTo<pfer>(args[i])" << endl;
+ l[i].composant=false;
+ l[i].what=106; //arry iso value array iso value 3d
+ l[i][0]=CastTo<pf3rarray>(args[i]);}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
else if (BCastTo<pmesh>(args[i])){
l[i].composant=true;
l[i].what=0; // mesh ...
diff --cc src/fflib/lgmat.cpp.orig
index 1d73bdc,0000000..423cb2e
mode 100644,000000..100644
--- a/src/fflib/lgmat.cpp.orig
+++ b/src/fflib/lgmat.cpp.orig
@@@ -1,3024 -1,0 +1,3180 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#ifdef __MWERKS__
+#pragma optimization_level 0
+//#pragma inline_depth(0)
+#endif
+/*
+#include "error.hpp"
+#include "RNM.hpp"
+#include <set>
+#include <vector>
+#include <cstdio>
+#include <cstring>
+#include <complex>
+
+#include <cmath>
+#include <iostream>
+using namespace std;
+#include "FESpacen.hpp"
+
+#include "AFunction.hpp"
+#include "rgraph.hpp"
+#include "MatriceCreuse_tpl.hpp"
+
+//#include "fem3.hpp"
+#include "MeshPoint.hpp"
+#include "Operator.hpp"
+
+#include "lex.hpp"
+#include "lgfem.hpp"
+#include "lgmesh3.hpp"
+#include "lgsolver.hpp"
+#include "problem.hpp"
+*/
+#include "ff++.hpp"
+#include "array_resize.hpp"
+
+#include "CGNL.hpp"
+
+namespace bamg { class Triangles; }
+namespace Fem2D { void DrawIsoT(const R2 Pt[3],const R ff[3],const RN_ & Viso); }
+
+extern const basicForEachType *aatypeknlongp; //// for compilation error with g++ 3.2.2
+#include "BamgFreeFem.hpp"
+
+
+
+// Debut FH Houston -------- avril 2004 ---------
+// class for operator on sparse matrix
+// ------------------------------------
+// pour le addition de matrice ----matrice creuse in french)
+// MatriceCreuse real class for matrix sparse
+// Matrice_Creuse class for matrix sparse + poiteur on FE space def
+// to recompute matrice in case of mesh change
+// list<triplet<R,MatriceCreuse<R> *,bool> > * is liste of
+// \sum_i a_i*A_i where a_i is a scalare and A_i is a sparse matrix
+//
+
+
+
+template<class R>
+list<triplet<R,MatriceCreuse<R> *, bool > > * to(Matrice_Creuse<R> * M)
+{
+ list<triplet<R,MatriceCreuse<R> *,bool> > * l=new list<triplet<R,MatriceCreuse<R> *,bool> >;
+ l ->push_back(make_triplet<R,MatriceCreuse<R> *,bool>(1,M->A,false));
+ return l;
+}
+template<class R>
+list<triplet<R,MatriceCreuse<R> *, bool > > * to(Matrice_Creuse_Transpose<R> M)
+{
+ list<triplet<R,MatriceCreuse<R> *,bool> > * l=new list<triplet<R,MatriceCreuse<R> *,bool> >;
+ l ->push_back(make_triplet<R,MatriceCreuse<R> *,bool>(1,M.A->A,true));
+ return l;
+}
+
+template<class R>
+AnyType M2L3 (Stack , const AnyType & pp)
+{
+ return to(GetAny<Matrice_Creuse<R> *>(pp));
+}
+
+
+template<class R>
+AnyType tM2L3 (Stack , const AnyType & pp)
+{
+ return to(GetAny<Matrice_Creuse_Transpose<R> >(pp));
+}
+
+
+template<class R>
+struct Op2_ListCM: public binary_function<R,Matrice_Creuse<R> *,list<triplet<R,MatriceCreuse<R> *,bool> > *>
+ {
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+ typedef R AA;
+ typedef Matrice_Creuse<R> * BB;
+
+ static RR f(const AA & a,const BB & b)
+ {
+ RR r= new list<P> ;
+ r ->push_back(make_triplet<R,MatriceCreuse<R> *>(a,b->A,false));
+ return r;}
+};
+
+template<class R>
+struct Op2_ListMC: public binary_function<Matrice_Creuse<R> *,R,list<triplet<R,MatriceCreuse<R> *,bool> > *>
+ {
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+ typedef R AA;
+ typedef Matrice_Creuse<R> * BB;
+
+ static RR f(const BB & b,const AA & a)
+ {
+ RR r= new list<P> ;
+ r ->push_back(make_triplet<R,MatriceCreuse<R> *>(a,b->A,false));
+ return r;}
+};
+// ADD FH 16/02/2007
+
+template<class R>
+struct Op2_ListCMt: public binary_function<R,Matrice_Creuse_Transpose<R> ,list<triplet<R,MatriceCreuse<R> *,bool> > *>
+{
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+ typedef R AA;
+ typedef Matrice_Creuse_Transpose<R> BB;
+
+ static RR f(const AA & a,const BB & b)
+ {
+ RR r= new list<P> ;
+ r ->push_back(make_triplet<R,MatriceCreuse<R> *>(a,b.A->A,true));
+ return r;}
+};
+
+template<class R>
+struct Op2_ListMtC: public binary_function<Matrice_Creuse_Transpose<R> ,R,list<triplet<R,MatriceCreuse<R> *,bool> > *>
+{
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+ typedef R AA;
+ typedef Matrice_Creuse_Transpose<R> BB;
+
+ static RR f(const BB & b,const AA & a)
+ {
+ RR r= new list<P> ;
+ r ->push_back(make_triplet<R,MatriceCreuse<R> *>(a,b.A->A,true));
+ return r;}
+};
+// FIN ADD 16/02/2007
+
+
+
+template<class R>
+struct Op1_LCMd: public unary_function<list<triplet<R,MatriceCreuse<R> *,bool> > *,
+list<triplet<R,MatriceCreuse<R> *,bool> > * >
+{ // - ...
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+
+ static RR f(const RR & l)
+ {
+ typedef typename list<triplet<R,MatriceCreuse<R> *,bool> >::iterator lci;
+ for (lci i= l->begin();i !=l->end();++i)
+ i->first *= R(-1);
+ return l;
+ }
+
+};
+
+template<class R>
+struct Op2_ListCMCMadd: public binary_function<list<triplet<R,MatriceCreuse<R> *,bool> > *,
+ list<triplet<R,MatriceCreuse<R> *,bool> > *,
+ list<triplet<R,MatriceCreuse<R> *,bool> > * >
+{ // ... + ...
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+
+ static RR f(const RR & a,const RR & b)
+ {
+ a->insert(a->end(),b->begin(),b->end());
+
+ delete b;
+ return a;
+ }
+
+};
+
+template<class R>
+struct Op2_ListMCMadd: public binary_function<Matrice_Creuse<R> *,
+ list<triplet<R,MatriceCreuse<R> *,bool> > *,
+ list<triplet<R,MatriceCreuse<R> *,bool> > * >
+{ // M + ....
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+ typedef Matrice_Creuse<R> * MM;
+
+ static RR f(const MM & a,const RR & b)
+ {
+
+ b->push_front(make_triplet<R,MatriceCreuse<R> *>(R(1.),a->A,false));
+ return b;
+ }
+
+
+};
+
+template<class R>
+struct Op2_ListCMMadd: public binary_function< list<triplet<R,MatriceCreuse<R> *,bool> > *,
+ Matrice_Creuse<R> * ,
+ list<triplet<R,MatriceCreuse<R> *,bool> > *>
+{ // .... + M
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+ typedef Matrice_Creuse<R> * MM;
+
+ static RR f(const RR & a,const MM & b)
+ {
+
+ a->push_back(make_triplet<R,MatriceCreuse<R> *,bool>(R(1.),b->A,false));
+ return a;
+ }
+
+
+};
+
+template<class R>
+struct Op2_ListMMadd: public binary_function< Matrice_Creuse<R> *,
+ Matrice_Creuse<R> * ,
+ list<triplet<R,MatriceCreuse<R> *,bool> > *>
+{ // M + M
+ typedef triplet<R,MatriceCreuse<R> *,bool> P;
+ typedef list<P> L;
+ typedef L * RR;
+ typedef Matrice_Creuse<R> * MM;
+
+ static RR f(const MM & a,const MM & b)
+ {
+ L * l=to(a);
+ l->push_back(make_triplet<R,MatriceCreuse<R> *>(R(1.),b->A,false));
+ return l;
+ }
+
+
+};
+// Fin Add FH Houston --------
+
+// for Jolivet to build restriction jan 2014
+// t[int] I= restrict(VCh,VGh,IPG); // ou
+template<class pfes>
+class RestrictArray : public OneOperator { public:
+ template< typename T > struct Base { typedef T B; };
+ template< typename T > struct Base< T* >{ typedef T B;};
+
+ typedef typename Base<pfes>::B::FESpace FESpace;
+ typedef typename FESpace::FElement FElement;
+ // typedef FESpace FESpace;
+
+ class Op : public E_F0info { public: // passe de l'info ..
+ typedef pfes * A;
+ Expression a,b,c,d;
+ // if c = 0 => a,b FESpace
+ // if c != a FESpace et b,c KN_<double>
+ static const int n_name_param =0;
+ // static basicAC_F0::name_and_type name_param[] ;
+ Expression nargs[n_name_param];
+ bool arg(int i,Stack stack,bool a) const{ return nargs[i] ? GetAny<bool>( (*nargs[i])(stack) ): a;}
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ KN_<long> arg(int i,Stack stack,KN_<long> a ) const{ return nargs[i] ? GetAny<KN_<long> >( (*nargs[i])(stack) ): a;}
+
+ public:
+ Op(const basicAC_F0 & args,Expression aa,Expression bb,Expression cc) : a(aa),b(bb),c(cc),d(0) {
+ args.SetNameParam(n_name_param,0,nargs);
+
+ }
+ /*
+ AnyType operator()(Stack stack) const
+ {
+ if( verbosity>9) cout << " -- RestrictArray "<< endl;
+ pfes * pCUh = GetAny< pfes * >((* a)(stack));
+ pfes * pFVh = GetAny< pfes * >((* b)(stack));
+ // verif same FE.
+ KN_<long> ncf= GetAny< KN_<long> >((* c)(stack));
+ FESpace * pVCh = **pCUh;
+ FESpace * pVFh = **pFVh;
+ FESpace VCh = *pVCh;
+ FESpace VFh = *pVFh;
+ long neC = VCh.NbOfElements ;
+ long neF = VFh.NbOfElements ;
+ long ndfC = VCh.NbOfDF ;
+ long ndfF = VFh.NbOfDF ;
+
+ KN_<long> nc2f= ncf;
+
+ KN<long> *pnum=new KN<long>(ndfC);
+ KN<long> inj=*pnum;
+ inj = -1; // un set ..
+ if( verbosity>9) cout<< " ne =" << neC << " " << neF << endl;
+
+ for(int kc=0; kc <VCh.NbOfElements; kc++)
+ {
+
+ int kf = nc2f(kc);
+ FElement KC(pVCh,kc);
+ FElement KF(pVFh,kf);
+
+ int ndofKC = KC.NbDoF() ;
+ int ndofKF = KF.NbDoF() ;
+ if( verbosity>99) cout << kc << " " << kf << " : " <<ndofKC << " " << ndofKF << endl;
+ ffassert(ndofKC== ndofKF );
+ ffassert( kf >= 0 && kf < neF);
+ ffassert( kc >= 0 && kc< neC);
+
+ for(int df=0; df<ndofKC; df++)
+ {
+ int dfC =KC(df), dfF=KF(df);
+ if( verbosity>99) cout << dfC <<" -> "<< dfF << endl;
+ assert(dfC >= 0 && dfC < ndfC);
+ inj[dfC] = dfF;
+ }
+
+ }
+
+ if( verbosity>9) cout << " restrict: Inject= " << inj << endl;
+ ffassert(inj.min() != -1);
+ //Add2StackOfPtr2FreeRC(stack,pnum);
+
+ return pnum;
+ }
+ */
+ };
+ RestrictArray() : OneOperator( atype<const typename RestrictArray<pfes>::Op *>(),//atype<KN<long>* >(),
+ atype<pfes *>(),
+ atype<pfes *>(),
+ atype<KN_<long> >()) {}
+
+ E_F0 * code(const basicAC_F0 & args) const
+ {
+ if(args.size()!=3)CompileError("Bug in RestrictArray code nb of args != 3 ????? bizarre" );
+ return new Op(args,t[0]->CastTo(args[0]),
+ t[1]->CastTo(args[1]),
+ t[2]->CastTo(args[2]));
+ }
+};
+// end restrict ...
+template< typename T > struct Base { typedef T B; };
+template< typename T > struct Base< T* >{ typedef T B;};
+
+template<class pfes, int INIT>
+AnyType SetRestrict(Stack stack,Expression einj,Expression erest)
+{
+
+ typedef typename Base<pfes>::B::FESpace FESpace;
+ typedef typename FESpace::FElement FElement;
+
+ KN<long> * pinj =GetAny<KN<long>*>((*einj)(stack));
+ const typename RestrictArray<pfes>::Op * ar(dynamic_cast<const typename RestrictArray<pfes>::Op *>(erest));
+ ffassert(ar);
+ if( verbosity>9) cout << " -- RestrictArray "<< endl;
+ pfes * pCUh = GetAny< pfes * >((* ar->a)(stack));
+ pfes * pFVh = GetAny< pfes * >((* ar->b)(stack));
+ // verif same FE.
+ KN_<long> ncf= GetAny< KN_<long> >((* ar->c)(stack));
+ FESpace * pVCh = **pCUh;
+ FESpace * pVFh = **pFVh;
+ FESpace & VCh = *pVCh;
+ FESpace & VFh = *pVFh;
+ long neC = VCh.NbOfElements ;
+ long neF = VFh.NbOfElements ;
+ long ndfC = VCh.NbOfDF ;
+ long ndfF = VFh.NbOfDF ;
+
+ KN_<long> nc2f= ncf;
+ if(INIT==0)
+ pinj->init(ndfC);
+ else pinj->resize(ndfC);
+ // KN<long> *pnum= INIT ==0 ? new KN<long>(ndfC): pnum;
+ KN<long> & inj=*pinj;
+ inj = -1; // un set ..
+ if( verbosity>9) cout<< " ne =" << neC << " " << neF << endl;
+
+ for(int kc=0; kc <VCh.NbOfElements; kc++)
+ {
+
+ int kf = nc2f(kc);
+ FElement KC(pVCh,kc);
+ FElement KF(pVFh,kf);
+
+ int ndofKC = KC.NbDoF() ;
+ int ndofKF = KF.NbDoF() ;
+ if( verbosity>99) cout << kc << " " << kf << " : " <<ndofKC << " " << ndofKF << endl;
+ ffassert(ndofKC== ndofKF );
+ ffassert( kf >= 0 && kf < neF);
+ ffassert( kc >= 0 && kc< neC);
+
+ for(int df=0; df<ndofKC; df++)
+ {
+ int dfC =KC(df), dfF=KF(df);
+ if( verbosity>99) cout << dfC <<" -> "<< dfF << endl;
+ assert(dfC >= 0 && dfC < ndfC);
+ inj[dfC] = dfF;
+ }
+
+ }
+ if( verbosity>9) cout << " restrict: Inject= " << inj << endl;
+ ffassert(inj.min() != -1);
+
+ return pinj;
+}
+
+// Fin Add FH Houston --------
+template<class pfes>
+class MatrixInterpolation : public OneOperator { public:
+
+ class Op : public E_F0info { public:
+ typedef pfes * A;
+ Expression a,b,c,d;
+ // if c = 0 => a,b FESpace
+ // if c != a FESpace et b,c KN_<double>
+ static const int n_name_param =5;
+ static basicAC_F0::name_and_type name_param[] ;
+ Expression nargs[n_name_param];
+ bool arg(int i,Stack stack,bool a) const{ return nargs[i] ? GetAny<bool>( (*nargs[i])(stack) ): a;}
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+ KN_<long> arg(int i,Stack stack,KN_<long> a ) const{ return nargs[i] ? GetAny<KN_<long> >( (*nargs[i])(stack) ): a;}
+
+ public:
+ Op(const basicAC_F0 & args,Expression aa,Expression bb) : a(aa),b(bb),c(0),d(0) {
+ args.SetNameParam(n_name_param,name_param,nargs); }
+ Op(const basicAC_F0 & args,Expression aa,Expression bb,Expression cc) : a(aa),b(bb),c(cc),d(0) {
+ args.SetNameParam(n_name_param,name_param,nargs); }
+ Op(const basicAC_F0 & args,Expression aa,Expression bb,Expression cc,Expression dd) : a(aa),b(bb),c(cc),d(dd) {
+ args.SetNameParam(n_name_param,name_param,nargs); }
+
+
+ };
+ // interpolation(Vh,Vh)
+ MatrixInterpolation() : OneOperator(atype<const typename MatrixInterpolation<pfes>::Op *>(),
+ atype<pfes *>(),
+ atype<pfes *>()) {}
+ // interpolation(Vh,xx,yy) // 2d
+ MatrixInterpolation(int bidon) : OneOperator(atype<const typename MatrixInterpolation<pfes>::Op *>(),
+ atype<pfes *>(),atype<KN_<double> >(),atype<KN_<double> >()) {}
+
+ // interpolation(Vh,xx,yy,zz) // 3d
+ MatrixInterpolation(int bidon,int bidon2) : OneOperator(atype<const typename MatrixInterpolation<pfes>::Op *>(),
+ atype<pfes *>(),atype<KN_<double> >(),atype<KN_<double> >(),atype<KN_<double> >()) {}
+
+
+ E_F0 * code(const basicAC_F0 & args) const
+ {
+ if(args.size()==2)
+ return new Op(args,t[0]->CastTo(args[0]),
+ t[1]->CastTo(args[1]));
+ else if(args.size()==3)
+ return new Op(args,t[0]->CastTo(args[0]),
+ t[1]->CastTo(args[1]),
+ t[2]->CastTo(args[2]));
+ else if(args.size()==4)
+ return new Op(args,t[0]->CastTo(args[0]),
+ t[1]->CastTo(args[1]),
+ t[2]->CastTo(args[2]),
+ t[2]->CastTo(args[3])
+ );
+ else CompileError("Bug in MatrixInterpolation code nb != 2 or 3 ????? bizarre" );
+ return 0;
+ }
+};
+template<>
+basicAC_F0::name_and_type MatrixInterpolation<pfes>::Op::name_param[]= {
+ { "t", &typeid(bool)},
+ { "op", &typeid(long)},
+ { "inside",&typeid(bool)},
+ { "composante",&typeid(long)},
+ { "U2Vc",&typeid(KN_<long>)}
+
+};
+
+template<>
+basicAC_F0::name_and_type MatrixInterpolation<pfes3>::Op::name_param[]= {
+ { "t", &typeid(bool)},
+ { "op", &typeid(long)},
+ { "inside",&typeid(bool)},
+ { "composante",&typeid(long)},
+ { "U2Vc",&typeid(KN_<long>)}
+
+};
+
+
+
+
+template<class R>
+ class SetMatrix_Op : public E_F0mps { public:
+ Expression a;
+
+ static aType btype;
+ static const int n_name_param =NB_NAME_PARM_MAT; // add nbiter FH 30/01/2007 11 -> 12 //add var MUMPS+autre
+ static basicAC_F0::name_and_type name_param[] ;
+ Expression nargs[n_name_param];
+ const OneOperator * precon;
+ bool arg(int i,Stack stack,bool a) const{ return nargs[i] ? GetAny<bool>( (*nargs[i])(stack) ): a;}
+ long arg(int i,Stack stack,long a) const{ return nargs[i] ? GetAny<long>( (*nargs[i])(stack) ): a;}
+
+ public:
+ SetMatrix_Op(const basicAC_F0 & args,Expression aa) : a(aa) {
+ args.SetNameParam(n_name_param,name_param,nargs);
+ precon = 0; // a changer
+ if ( nargs[3])
+ {
+ const Polymorphic * op= dynamic_cast<const Polymorphic *>(nargs[3]);
+ assert(op);
+ precon = op->Find("(",ArrayOfaType(atype<KN<R>* >(),false)); // strange bug in g++ is R become a double
+ }
+
+ }
+ AnyType operator()(Stack stack) const ;
+ };
+
+
+template<class R>
+class SetMatrix : public OneOperator { public:
+
+
+ // SetMatrix() : OneOperator(atype<const typename SetMatrix<R>::Op *>(),atype<Matrice_Creuse<R> *>() ) {}
+ SetMatrix() : OneOperator(SetMatrix_Op<R>::btype,atype<Matrice_Creuse<R> *>() ) {}
+
+ E_F0 * code(const basicAC_F0 & args) const
+ {
+ return new SetMatrix_Op<R>(args,t[0]->CastTo(args[0]));
+ }
+};
+
+template<class R>
+ aType SetMatrix_Op<R>::btype=0;
+
+template <class R>
+basicAC_F0::name_and_type SetMatrix_Op<R>::name_param[]= {
+ LIST_NAME_PARM_MAT
+
+
+
+/*
+ { "paramint",&typeid(KN<int>)}, // Add J. Morice 02/09
+ { "paramdouble",&typeid(KN<double>)},
+
+ { "paramstring",&typeid(string*)},
+ { "permrow",&typeid(KN_<long>)},
+ { "permcol",&typeid(KN_<long>)},
+ { "fileparamint",&typeid(string*)}, // Add J. Morice 02/09
+ { "fileparamdouble",&typeid(string*)},
+ { "fileparamstring",&typeid(string* )},
+ { "filepermrow",&typeid(string*)},
+ { "filepermcol",&typeid(string*)} //22
+ */
+};
+
+template<class R>
+AnyType SetMatrix_Op<R>::operator()(Stack stack) const
+{
+ Matrice_Creuse<R> * A= GetAny<Matrice_Creuse<R> *>((*a)(stack));
+
+ ffassert(A);
+ if( !A->A) A->A.master(new MatriceMorse<R>());// set to empty matrix .. mars 2014 FH ..
+ Data_Sparse_Solver ds;
+ bool VF=false;
+ // bool factorize=false;
+ ds.factorize=false;
+ /*
+ long NbSpace = 50;
+ long itmax=0;
+ double epsilon=1e-6;
+// bool VF=false;
+// VF=isVF(op->largs);
+ // assert(!VF);
+ double tgv = 1e30;
+ double tol_pivot=-1;
+ double tol_pivot_sym=-1;
+
+ KN<int> param_int;
+ KN<double> param_double;
+ string *param_char=NULL;
+ KN<int> perm_r;
+ KN<int> perm_c;
+ string *file_param_int; // Add J. Morice 02/09
+ string *file_param_double;
+ string* file_param_char;
+ string* file_param_perm_r;
+ string* file_param_perm_c;
+*/
+// type de matrice par default
+ TypeSolveMat tmat= TypeSolveMat::defaultvalue;
+ if( tmat != TypeSolveMat::SparseSolver )
+ tmat=TypeSolveMat::GMRES;
+ ds.typemat=&tmat;
+ SetEnd_Data_Sparse_Solver<R>(stack,ds,nargs,n_name_param);
+/*
+ TypeSolveMat *typemat=&tmat;
+ bool initmat=true;
+ int strategy=0;
+
+ if (nargs[0]) ds.initmat= ! GetAny<bool>((*nargs[0])(stack));
+ if (nargs[1]) ds.typemat= GetAny<TypeSolveMat *>((*nargs[1])(stack));
+ if (nargs[2]) ds.epsilon= GetAny<double>((*nargs[2])(stack));
+ // 3 precon
+ if (nargs[4]) ds.NbSpace= GetAny<long>((*nargs[4])(stack));
+ if (nargs[6]) ds.tgv= GetAny<double>((*nargs[6])(stack));
+ if (nargs[7]) ds.factorize= GetAny<bool>((*nargs[7])(stack));
+
+ if (nargs[8]) ds.strategy = GetAny<long>((*nargs[8])(stack));
+ if (nargs[9]) ds.tol_pivot = GetAny<double>((*nargs[9])(stack));
+ if (nargs[10]) ds.tol_pivot_sym = GetAny<double>((*nargs[10])(stack));
+ if (nargs[11]) ds.itmax = GetAny<long>((*nargs[11])(stack)); // frev 2007 OK
+
+
+ if (nargs[12]) ds.param_int= GetAny< KN<int> >((*nargs[12])(stack)); // Add J. Morice 02/09
+ if (nargs[13]) ds.param_double= GetAny< KN<double> >((*nargs[13])(stack));
+ if (nargs[14]) ds.param_char= GetAny< string * >((*nargs[14])(stack)); //
+ if (nargs[15]) ds.perm_r = GetAny< KN<int > >((*nargs[15])(stack));
+ if (nargs[16]) ds.perm_c = GetAny< KN<int> >((*nargs[16])(stack)); //
+ if (nargs[17]) ds.file_param_int= GetAny< string* >((*nargs[17])(stack)); // Add J. Morice 02/09
+ if (nargs[18]) ds.file_param_double= GetAny< string* >((*nargs[18])(stack));
+ if (nargs[19]) ds.file_param_char= GetAny< string* >((*nargs[19])(stack)); //
+ if (nargs[20]) ds.file_param_perm_r = GetAny< string* >((*nargs[20])(stack));
+ if (nargs[21]) ds.file_param_perm_c = GetAny< string* >((*nargs[21])(stack)); //
+*/
+
+
+ if(A->typemat.profile != ds.typemat->profile)
+ {
+ cerr << " type of matrix " << A->typemat<<endl;
+ cerr << " type of matrix for solver " <<*ds.typemat<<endl;
+
+ ExecError(" Set incompatibility between solver and type of matrix");
+ }
+ if( ds.factorize ) {
+ MatriceProfile<R> * pf = dynamic_cast<MatriceProfile<R> *>((MatriceCreuse<R> *) A->A);
+ assert(pf);
+ switch (ds.typemat->t) {
+ case TypeSolveMat::LU: pf->LU(Abs(ds.epsilon));break;
+ case TypeSolveMat::CROUT: pf->crout(Abs(ds.epsilon));break;
+ case TypeSolveMat::CHOLESKY: pf->cholesky(Abs(ds.epsilon));break;
+ default: ExecError("Sorry no factorization for this type for matrix");
+ }
+
+ }
+ SetSolver<R>(stack,VF,*A->A,ds) ;/*stack,*A->A,typemat,VF,epsilon,NbSpace,itmax,precon,strategy,tgv,tol_pivot,tol_pivot_sym,
+ param_int, param_double, param_char, perm_r, perm_c, file_param_int, file_param_double,
+ file_param_char, file_param_perm_r, file_param_perm_c);*/
+
+ return Nothing;
+}
+
+
+
+bool SetDefaultSolver()
+{
+
+#ifdef HAVE_LIBUMFPACKXXXXXX
+ if(verbosity>1)
+ cout << " SetDefault sparse solver to UMFPACK" << endl;
+ DefSparseSolver<double>::solver =BuildSolverUMFPack;
+ DefSparseSolver<Complex>::solver =BuildSolverUMFPack;
+ DefSparseSolverSym<double>::solver =BuildSolverGMRES<double>;
+ DefSparseSolverSym<Complex>::solver =BuildSolverGMRES<Complex>;
+
+#else
+ if(verbosity>1)
+ cout << " SetDefault sparse solver to GMRES (no UMFPACK)" << endl;
+ DefSparseSolver<double>::solver =BuildSolverGMRES<double>;
+ DefSparseSolver<Complex>::solver =BuildSolverGMRES<Complex>;
+ DefSparseSolverSym<double>::solver =BuildSolverGMRES<double>;
+ DefSparseSolverSym<Complex>::solver =BuildSolverGMRES<Complex>;
+
+#endif
+ return true;
+
+}
+
++<<<<<<< HEAD
+template<int init>
+AnyType SetMatrixInterpolation(Stack,Expression ,Expression);
+template<int init>
+AnyType SetMatrixInterpolation3(Stack,Expression ,Expression);
++=======
++
++AnyType SetMatrixInterpolation(Stack,Expression ,Expression);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+//------
+
+template<class R>
+void BuildCombMat(map< pair<int,int>, R> & mij,const KNM_<R> & A, int ii00=0,int jj00=0,R coef=R(1.),bool cnj=false)
+{
+ double eps0=numeric_limits<double>::min();
+ int i,j;
+ int n = A.N(),m=A.M();
+ for ( i=0;i<n;i++)
+ for ( j=0;j<m;j++)
+ {
+ R cij=coef*A(i,j);
+ if (cnj) cij = RNM::conj(cij);
+ if(Fem2D::norm(cij) >eps0)
+ mij[ij_mat(false,ii00,jj00,i,j)] += cij;
+
+ }
+
+}
+
+void buildInterpolationMatrix(MatriceMorse<R> * m,const FESpace & Uh,const FESpace & Vh,void *data)
+{ // Uh = Vh
+
+ int op=op_id; // value of the function
+ bool transpose=false;
+ bool inside=false;
+ int * iU2V=0;
+ if (data)
+ {
+ int * idata=static_cast<int*>(data);
+ transpose=idata[0];
+ op=idata[1];
+ inside=idata[2];
+ iU2V= idata + 5;
+ ffassert(op>=0 && op < 4);
+ }
+ if(verbosity>2)
+ {
+ cout << " -- buildInterpolationMatrix transpose =" << transpose << endl
+ << " value, dx , dy op = " << op << endl
+ << " just inside = " << inside << endl;
+ }
+ using namespace Fem2D;
+ int n=Uh.NbOfDF;
+ int mm=Vh.NbOfDF;
+ if(transpose) Exchange(n,mm);
+ m->symetrique = false;
+ m->dummy=false;
+ m->a=0;
+ m->lg=0;
+ m->cl=0;
+ m->nbcoef=0;
+ m->n=n;
+ m->m=mm;
+ int n1=n+1;
+ const Mesh & ThU =Uh.Th; // line
+ const Mesh & ThV =Vh.Th; // colunm
+ bool samemesh = &Uh.Th == &Vh.Th; // same Mesh
+ int thecolor =0;
+ // int nbn_u = Uh.NbOfNodes;
+ //int nbn_v = Vh.NbOfNodes;
+
+ int nbcoef =0;
+
+ KN<int> color(ThV.nt);
+ KN<int> mark(n);
+ mark=0;
+
+ int *lg = new int [n1];
+ int * cl = 0;
+ double *a=0;
+
+ color=thecolor++;
+ FElement Uh0 = Uh[0];
+ FElement Vh0 = Vh[0];
+
+ FElement::aIPJ ipjU(Uh0.Pi_h_ipj());
+ FElement::aR2 PtHatU(Uh0.Pi_h_R2());
+
+ // FElement::aIPJ ipjV(Vh0.Pi_h_ipj());
+ // FElement::aR2 PtHatV(Vh0.Pi_h_R2());
+
+ int nbdfVK= Vh0.NbDoF();
+ // int nbdfUK= Uh0.NbDoF();
+ int NVh= Vh0.N;
+ //int NUh= Uh0.N;
+
+ //ffassert(NVh==NUh);
+
+
+ int nbp= PtHatU.N(); //
+ // int nbc= ipjU.N(); //
+ KN<R2> PV(nbp); // the PtHat in ThV mesh
+ KN<int> itV(nbp); // the Triangle number
+ KN<bool> intV(nbp); // ouside or not
+ KN<R> AipjU(ipjU.N());
+
+ KNM<R> aaa(nbp,nbdfVK);
+
+
+ const R eps = 1.0e-10;
+ const int sfb1=Vh0.N*last_operatortype*Vh0.NbDoF();
+ KN<R> kv(sfb1*nbp);
+ R * v = kv;
+ KN<int> ik(nbp); // the Triangle number
+// KNMK_<R> fb(v+ik[i],VhV0.NbDoF,VhV0.N,1); // the value for basic fonction
+
+ bool whatd[last_operatortype];
+ for (int i=0;i<last_operatortype;i++)
+ whatd[i]=false;
+ whatd[op]=true; // the value of function
+ KN<bool> fait(Uh.NbOfDF);
+ fait=false;
+ map< pair<int,int> , double > sij;
+
+ for (int step=0;step<2;step++)
+ {
+
+ for (int it=0;it<ThU.nt;it++)
+ {
+ thecolor++; // change the current color
+ const Triangle & TU(ThU[it]);
+ FElement KU(Uh[it]);
+ KU.Pi_h(AipjU);
+ int nbkU = 0;
+ if (samemesh)
+ {
+ nbkU = 1;
+ PV = PtHatU;
+ itV = it;
+ intV= false;// add July 2009 (unset varaible FH)
+ }
+ else
+ {
+ const Triangle *ts=0;
+ for (int i=0;i<nbp;i++)
+ {
+ bool outside;
+ ts=ThV.Find(TU(PtHatU[i]),PV[i],outside,ts);
+ if(outside && verbosity>9 )
+ cout << it << " " << i << " :: " << TU(PtHatU[i]) << " -- "<< outside << PV[i] << " " << ThV(ts) << " -> " << (*ts)(PV[i]) <<endl;
+ itV[i]= ThV(ts);
+ intV[i]=outside && inside; // ouside and inside flag
+ }
+ }
+
+
+ for (int p=0;p<nbp;p++)
+ {
+
+ KNMK_<R> fb(v+p*sfb1,nbdfVK,NVh,last_operatortype); // valeur de fonction de base de Vh
+ // ou: fb(idf,j,0) valeur de la j composante de la fonction idf
+ Vh0.tfe->FB(whatd,ThV,ThV[itV[p]],PV[p],fb);
+ }
+
+ for (int i=0;i<ipjU.N();i++)
+ { // pour tous le terme
+ const FElement::IPJ &ipj_i(ipjU[i]);
+ // assert(ipj_i.j==0); // car Vh.N=0
+ int dfu = KU(ipj_i.i); // le numero de df global
+ if(fait[dfu]) continue;
+ int jU = ipj_i.j; // la composante dans U
+ int p=ipj_i.p; // le points
+ if (intV[p]) continue; // ouside and inside flag => next
+ R aipj = AipjU[i];
+ FElement KV(Vh[itV[p]]);
+ int jV=jU;
+ if(iU2V) jV=iU2V[jU];
+
+ if(jV>=0 && jV<NVh)
+ {
+ KNMK_<R> fb(v+p*sfb1,nbdfVK,NVh,last_operatortype);
+ KN_<R> fbj(fb('.',jV,op));
+
+ for (int idfv=0;idfv<nbdfVK;idfv++)
+ if (Abs(fbj[idfv])>eps)
+ {
+ int dfv=KV(idfv);
+ int ii=dfu, jj=dfv;
+ if(transpose) Exchange(ii,jj);
+ // le term dfu,dfv existe dans la matrice
+ R c= fbj[idfv]*aipj;
+ // cout << " Mat inter " << i << " , "<< j << " = " << c << " " <<step << " " << it << " " << endl;
+ if(Abs(c)>eps)
+ //
+ sij[make_pair(ii,jj)] += c;// correct du to periodic BC. June 2011
+ /*
+ if(step==0)
+ sij.insert(make_pair(i,j));
+ else
+ (*m)(i,j)=c;
+ */
+ }
+ }
+
+ }
+
+ for (int df=0;df<KU.NbDoF();df++)
+ {
+ int dfu = KU(df); // le numero de df global
+ fait[dfu]=true;
+ }
+
+
+ }
+ if (step==0)
+ {
+ nbcoef = sij.size();
+ cl = new int[nbcoef];
+ a = new double[nbcoef];
+ int k=0;
+ for(int i=0;i<n1;i++)
+ lg[i]=0;
+
+ for (map<pair<int,int>, double >::iterator kk=sij.begin();kk!=sij.end();++kk)
+ {
+ int i= kk->first.first;
+ int j= kk->first.second;
+ // cout << " Mat inter " << i << " , "<< j << endl;
+ cl[k]=j;
+ a[k]= kk->second;
+ lg[i+1]=++k;
+ }
+ assert(k==nbcoef);
+ // on bouche les ligne vide lg[i]=0;
+ // lg est un tableau croissant =>
+ for(int i=1;i<n1;i++)
+ lg[i]=max(lg[i-1],lg[i]) ;
+ m->lg=lg;
+ m->cl=cl;
+ m->a=a;
+ m->nbcoef=nbcoef;
+ fait=false;
+ }
+ }
+ sij.clear();
+ //assert(0); // a faire to do
+}
+
+void buildInterpolationMatrix(MatriceMorse<R> * m,const FESpace3 & Uh,const FESpace3 & Vh,void *data)
+{ // Uh = Vh
+ typedef FESpace3::Mesh Mesh;
+ typedef FESpace3::FElement FElement;
+ typedef Mesh::Element Element;
+ typedef FESpace3::Rd Rd;
+ typedef Element::RdHat RdHat;
+
+ int op=op_id; // value of the function
+ bool transpose=false;
+ bool inside=false;
+ int * iU2V=0;
+ if (data)
+ {
+ int * idata=static_cast<int*>(data);
+ transpose=idata[0];
+ op=idata[1];
+ inside=idata[2];
+ iU2V= idata + 5;
+ ffassert(op>=0 && op < 4);
+ }
+ if(verbosity>2)
+ {
+ cout << " -- buildInterpolationMatrix transpose =" << transpose << endl
+ << " value, dx , dy op = " << op << endl
+ << " just inside = " << inside << endl;
+ }
+ using namespace Fem2D;
+ int n=Uh.NbOfDF;
+ int mm=Vh.NbOfDF;
+ if(transpose) Exchange(n,mm);
+ m->symetrique = false;
+ m->dummy=false;
+ m->a=0;
+ m->lg=0;
+ m->cl=0;
+ m->nbcoef=0;
+ m->n=n;
+ m->m=mm;
+ int n1=n+1;
+ const Mesh & ThU =Uh.Th; // line
+ const Mesh & ThV =Vh.Th; // colunm
+ bool samemesh = &Uh.Th == &Vh.Th; // same Mesh
+ int thecolor =0;
+ // int nbn_u = Uh.NbOfNodes;
+ //int nbn_v = Vh.NbOfNodes;
+
+ int nbcoef =0;
+
+ KN<int> color(ThV.nt);
+ KN<int> mark(n);
+ mark=0;
+
+ int *lg = new int [n1];
+ int * cl = 0;
+ double *a=0;
+
+ color=thecolor++;
+ FElement Uh0 = Uh[0];
+ FElement Vh0 = Vh[0];
+
+ // FElement::aIPJ ipjU(Uh0.Pi_h_ipj());
+ // FElement::aR2 PtHatU(Uh0.Pi_h_R2());
+
+ // FElement::aIPJ ipjV(Vh0.Pi_h_ipj());
+ // FElement::aR2 PtHatV(Vh0.Pi_h_R2());
+
+ int nbdfVK= Vh0.NbDoF();
+ // int nbdfUK= Uh0.NbDoF();
+ int NVh= Vh0.N;
+ // int NUh= Uh0.N;
+
+ //ffassert(NVh==NUh);
+
+ InterpolationMatrix<RdHat> ipmat(Uh);
+
+ int nbp=ipmat.np; //
+ // int nbc= ipjU.N(); //
+ KN<RdHat> PV(nbp); // the PtHat in ThV mesh
+ KN<int> itV(nbp); // the Triangle number
+ KN<bool> intV(nbp); // ouside or not
+ // KN<R> AipjU(ipjU.N());
+
+ KNM<R> aaa(nbp,nbdfVK);
+
+
+ const R eps = 1.0e-10;
+ const int sfb1=Vh0.N*last_operatortype*Vh0.NbDoF();
+ KN<R> kv(sfb1*nbp);
+ R * v = kv;
+ KN<int> ik(nbp); // the Triangle number
+ // KNMK_<R> fb(v+ik[i],VhV0.NbDoF,VhV0.N,1); // the value for basic fonction
+ op= op==3 ? op_dz : op; // renumber op ???? dec 2010 FH.
+ What_d whatd= 1<< op;
+ KN<bool> fait(Uh.NbOfDF);
+ fait=false;
+ map< pair<int,int> , double > sij;
+ for (int step=0;step<2;step++)
+ {
+
+ for (int it=0;it<ThU.nt;it++)
+ {
+ thecolor++; // change the current color
+ const Element & TU(ThU[it]);
+ FElement KU(Uh[it]);
+ ipmat.set(KU);
+ //KU.Pi_h(AipjU);
+ int nbkU = 0;
+ if (samemesh)
+ {
+ nbkU = 1;
+ PV = ipmat.P;
+ itV = it;
+ intV= false;// add July 2009 (unset varaible FH)
+ }
+ else
+ {
+ const Element *ts=0;
+ for (int i=0;i<nbp;i++)
+ {
+ bool outside;
+ ts=ThV.Find(TU(ipmat.P[i]),PV[i],outside,ts);
+ if(outside && verbosity>9 )
+ cout << it << " " << i << " :: " << TU(ipmat.P[i]) << " -- "<< outside << PV[i] << " " << ThV(ts) << " -> " << (*ts)(PV[i]) <<endl;
+ itV[i]= ThV(ts);
+ intV[i]=outside && inside; // ouside and inside flag
+ }
+ }
+
+
+ for (int p=0;p<nbp;p++)
+ {
+
+ KNMK_<R> fb(v+p*sfb1,nbdfVK,NVh,last_operatortype); // valeur de fonction de base de Vh
+ // ou: fb(idf,j,0) valeur de la j composante de la fonction idf
+ Vh0.tfe->FB(whatd,ThV,ThV[itV[p]],PV[p],fb);
+ }
+
+ for (int i=0;i<ipmat.ncoef;i++)
+ { // pour tous le terme
+
+ // assert(ipj_i.j==0); // car Vh.N=0
+ int dfu = KU(ipmat.dofe[i]); // le numero de df global
+ if(fait[dfu]) continue;
+ int jU = ipmat.comp[i]; // la composante dans U
+ int p=ipmat.p[i]; // le point
+ if (intV[p]) continue; // ouside and inside flag => next
+ R aipj = ipmat.coef[i];
+ FElement KV(Vh[itV[p]]);
+ int jV=jU;
+ if(iU2V) jV=iU2V[jU];
+
+ if(jV>=0 && jV<NVh)
+ {
+ KNMK_<R> fb(v+p*sfb1,nbdfVK,NVh,last_operatortype);
+ KN_<R> fbj(fb('.',jV,op));
+
+ for (int idfv=0;idfv<nbdfVK;idfv++)
+ if (Abs(fbj[idfv])>eps)
+ {
+ int dfv=KV(idfv);
+ int ii=dfu, jj=dfv;
+ if(transpose) Exchange(ii,jj);
+ // le term dfu,dfv existe dans la matrice
+ R c= fbj[idfv]*aipj;
+ // cout << " Mat inter " << i << " , "<< j << " = " << c << " " <<step << " " << it << " " << endl;
+ if(Abs(c)>eps)
+ //
+ sij[make_pair(ii,jj)] += c;// correct du to periodic BC. June 2011
+ /*
+ if(step==0)
+ sij.insert(make_pair(i,j));
+ else
+ (*m)(i,j)=c;
+ */
+ }
+ }
+
+ }
+
+ for (int df=0;df<KU.NbDoF();df++)
+ {
+ int dfu = KU(df); // le numero de df global
+ fait[dfu]=true;
+ }
+
+
+ }
+ if (step==0)
+ {
+ nbcoef = sij.size();
+ cl = new int[nbcoef];
+ a = new double[nbcoef];
+ int k=0;
+ for(int i=0;i<n1;i++)
+ lg[i]=0;
+
+ for (map<pair<int,int>, double >::iterator kk=sij.begin();kk!=sij.end();++kk)
+ {
+ int i= kk->first.first;
+ int j= kk->first.second;
+ // cout << " Mat inter " << i << " , "<< j << endl;
+ cl[k]=j;
+ a[k]= kk->second;
+ lg[i+1]=++k;
+ }
+ assert(k==nbcoef);
+ // on bouche les ligne vide lg[i]=0;
+ // lg est un tableau croissant =>
+ for(int i=1;i<n1;i++)
+ lg[i]=max(lg[i-1],lg[i]) ;
+ m->lg=lg;
+ m->cl=cl;
+ m->a=a;
+ m->nbcoef=nbcoef;
+ fait=false;
+ }
+ }
+ sij.clear();
+ //assert(0); // a faire to do
+}
+
+
+MatriceMorse<R> * buildInterpolationMatrix1(const FESpace & Uh,const KN_<double> & xx,const KN_<double> & yy ,int *data)
+{ // Uh = Vh
+
+ int op=op_id; // value of the function
+ int icomp=0;
+ bool transpose=false;
+ bool inside=false;
+ if (data)
+ {
+ transpose=data[0];
+ op=data[1];
+ inside=data[2];
+ icomp = data[3];
+ ffassert(op>=0 && op < 4);
+
+ }
+ if(verbosity>2)
+ {
+ cout << " -- buildInterpolationMatrix transpose =" << transpose << endl
+ << " value, dx , dy op = " << op << endl
+ << " composante = " << icomp << endl
+ << " just inside = " << inside << endl;
+ }
+ using namespace Fem2D;
+ int n=Uh.NbOfDF;
+ int mm=xx.N();
+ int nbxx= mm;
+ if(transpose) Exchange(n,mm);
+ const Mesh & ThU =Uh.Th; // line
+
+
+ FElement Uh0 = Uh[0];
+
+
+
+ int nbdfUK= Uh0.NbDoF();
+ int NUh= Uh0.N;
+
+ ffassert(icomp < NUh && icomp >=0);
+
+
+ const int sfb1=Uh0.N*last_operatortype*Uh0.NbDoF();
+ KN<R> kv(sfb1);
+ R * v = kv;
+ const R eps = 1.0e-10;
+
+ bool whatd[last_operatortype];
+ for (int i=0;i<last_operatortype;i++)
+ whatd[i]=false;
+ whatd[op]=true; // the value of function
+ KN<bool> fait(Uh.NbOfDF);
+ fait=false;
+ map< pair<int,int> , double > sij;
+ R2 Phat;
+ bool outside;
+
+ for(int ii=0;ii<nbxx;ii++)
+ {
+ const Triangle *ts=ThU.Find(R2(xx[ii],yy[ii]),Phat,outside);
+ if(outside && !inside) continue;
+ int it = ThU(ts);
+ FElement KU(Uh[it]);
+ KNMK_<R> fb(v,nbdfUK,NUh,last_operatortype);
+ Uh0.tfe->FB(whatd,ThU,ThU[it],Phat,fb);
+ KN_<R> Fwi(fb('.',icomp,op));
+ for (int idfu=0;idfu<nbdfUK;idfu++)
+ {
+ int j = ii;
+ int i = KU(idfu);
+ if(transpose) Exchange(i,j);
+ R c = Fwi(idfu);
+ if(Abs(c)>eps)
+ sij[make_pair(i,j)] += c;// correct du to periodic BC. June 2011
+ }
+ }
+
+ MatriceMorse<R> * m = new MatriceMorse<R>(n,mm,sij,false);
+ sij.clear();
+ return m;
+ //assert(0); // a faire to do
+}
+
+MatriceMorse<R> * buildInterpolationMatrix1(const FESpace3 & Uh,const KN_<double> & xx,const KN_<double> & yy ,const KN_<double> & zz,int *data)
+{ // Uh = Vh
+ typedef FESpace3::Mesh Mesh;
+ typedef FESpace3::FElement FElement;
+ typedef Mesh::Element Element;
+ typedef FESpace3::Rd Rd;
+
+
+ int op=op_id; // value of the function
+ int icomp=0;
+ bool transpose=false;
+ bool inside=false;
+ if (data)
+ {
+ transpose=data[0];
+ op=data[1];
+ inside=data[2];
+ icomp = data[3];
+ ffassert(op>=0 && op < 4);
+
+ }
+ if(verbosity>2)
+ {
+ cout << " -- buildInterpolationMatrix transpose =" << transpose << endl
+ << " value, dx , dy op = " << op << endl
+ << " composante = " << icomp << endl
+ << " just inside = " << inside << endl;
+ }
+ using namespace Fem2D;
+ int n=Uh.NbOfDF;
+ int mm=xx.N();
+ int nbxx= mm;
+ if(transpose) Exchange(n,mm);
+ const Mesh & ThU =Uh.Th; // line
+
+
+ FElement Uh0 = Uh[0];
+
+
+
+ int nbdfUK= Uh0.NbDoF();
+ int NUh= Uh0.N;
+
+ ffassert(icomp < NUh && icomp >=0);
+
+
+ const int sfb1=Uh0.N*last_operatortype*Uh0.NbDoF();
+ KN<R> kv(sfb1);
+ R * v = kv;
+ const R eps = 1.0e-10;
+
+ What_d whatd= 1 <<op;
+ KN<bool> fait(Uh.NbOfDF);
+ fait=false;
+ map< pair<int,int> , double > sij;
+ Rd Phat;
+ bool outside;
+
+ for(int ii=0;ii<nbxx;ii++)
+ {
+ const Element *ts=ThU.Find(Rd(xx[ii],yy[ii],zz[ii]),Phat,outside);
+ if(outside && !inside) continue;
+ int it = ThU(ts);
+ FElement KU(Uh[it]);
+ KNMK_<R> fb(v,nbdfUK,NUh,last_operatortype);
+ Uh0.tfe->FB(whatd,ThU,ThU[it],Phat,fb);
+ KN_<R> Fwi(fb('.',icomp,op));
+ for (int idfu=0;idfu<nbdfUK;idfu++)
+ {
+ int j = ii;
+ int i = KU(idfu);
+ if(transpose) Exchange(i,j);
+ R c = Fwi(idfu);
+ if(Abs(c)>eps)
+ sij[make_pair(i,j)] += c;// correct du to periodic BC. June 2011
+ }
+ }
+
+ MatriceMorse<R> * m = new MatriceMorse<R>(n,mm,sij,false);
+ sij.clear();
+ return m;
+ //assert(0); // a faire to do
+}
+
+
++<<<<<<< HEAD
+AnyType SetMatrixInterpolation1(Stack stack,Expression emat,Expression einter,int init)
++=======
++AnyType SetMatrixInterpolation(Stack stack,Expression emat,Expression einter)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ using namespace Fem2D;
+
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ const MatrixInterpolation<pfes>::Op * mi(dynamic_cast<const MatrixInterpolation<pfes>::Op *>(einter));
+ ffassert(einter);
+ int data[ MatrixInterpolation<pfes>::Op::n_name_param+100];
+ data[0]=mi->arg(0,stack,false); // transpose not
+ data[1]=mi->arg(1,stack,(long) op_id); ; // get just value
+ data[2]=mi->arg(2,stack,false); ; // get just value
+ data[3]=mi->arg(3,stack,0L); ; // get just value
+ KN<long> U2Vc;
+ U2Vc= mi->arg(4,stack,U2Vc); ;
+ if( mi->c==0)
+ { // old cas
+ pfes * pUh = GetAny< pfes * >((* mi->a)(stack));
+ pfes * pVh = GetAny< pfes * >((* mi->b)(stack));
+ FESpace * Uh = **pUh;
+ FESpace * Vh = **pVh;
+ int NVh =Vh->N;
+ int NUh =Uh->N;
+ ffassert(NUh< 100-MatrixInterpolation<pfes>::Op::n_name_param);
+
+ for(int i=0;i<NUh;++i)
+ data[5+i]=i;//
+ for(int i=0;i<min(NUh,(int) U2Vc.size());++i)
+ data[5+i]= U2Vc[i];//
+ if(verbosity>3)
+ for(int i=0;i<NUh;++i)
+ {
+ cout << "The Uh componante " << i << " -> " << data[5+i] << " Componante of Vh " <<endl;
+ }
+ for(int i=0;i<NUh;++i)
+ if(data[5+i]>=NVh)
+ {
+ cout << "The Uh componante " << i << " -> " << data[5+i] << " >= " << NVh << " number of Vh Componante " <<endl;
+ ExecError("Interpolation incompability beetween componante ");
+ }
+
+ ffassert(Vh);
+ ffassert(Uh);
+
+ // sparse_mat->pUh=pUh;
+ //sparse_mat->pVh=pVh;
++<<<<<<< HEAD
+ if(!init) sparse_mat->init();
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ sparse_mat->A.master(new MatriceMorse<R>(*Uh,*Vh,buildInterpolationMatrix,data));
+ // sparse_mat->A.master(new MatriceMorse<R>(*Uh,*Vh,buildInterpolationMatrix,data));
+ }
+ else
+ { // new cas mars 2006
+ pfes * pUh = GetAny< pfes * >((* mi->a)(stack));
+ KN_<double> xx = GetAny< KN_<double> >((* mi->b)(stack));
+ KN_<double> yy = GetAny< KN_<double> >((* mi->c)(stack));
+ ffassert( xx.N() == yy.N());
+ FESpace * Uh = **pUh;
+ ffassert(Uh);
+
+ // sparse_mat->pUh=0;
+ // sparse_mat->pVh=0;
++<<<<<<< HEAD
+ if(!init) sparse_mat->init();
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ sparse_mat->A.master(buildInterpolationMatrix1(*Uh,xx,yy,data));
+ }
+ return sparse_mat; // Warning .. no correct gestion of temp ptr ..
+ // return Add2StackOfPtr2Free(stack,sparse_mat);
+}
+
+AnyType SetMatrixInterpolation31(Stack stack,Expression emat,Expression einter,int init)
++=======
++ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
++ sparse_mat->A.master(buildInterpolationMatrix1(*Uh,xx,yy,data));
++ }
++ return sparse_mat;
++}
++
++AnyType SetMatrixInterpolation3(Stack stack,Expression emat,Expression einter)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ using namespace Fem2D;
+
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ const MatrixInterpolation<pfes3>::Op * mi(dynamic_cast<const MatrixInterpolation<pfes3>::Op *>(einter));
+ ffassert(einter);
+ int data[ MatrixInterpolation<pfes3>::Op::n_name_param+100];
+ data[0]=mi->arg(0,stack,false); // transpose not
+ data[1]=mi->arg(1,stack,(long) op_id); ; // get just value
+ data[2]=mi->arg(2,stack,false); ; // get just value
+ data[3]=mi->arg(3,stack,0L); ; // get just value
+ KN<long> U2Vc;
+ U2Vc= mi->arg(4,stack,U2Vc); ;
+ if( mi->c==0)
+ { // old cas
+ pfes3 * pUh = GetAny< pfes3 * >((* mi->a)(stack));
+ pfes3 * pVh = GetAny< pfes3 * >((* mi->b)(stack));
+ FESpace3 * Uh = **pUh;
+ FESpace3 * Vh = **pVh;
+ int NVh =Vh->N;
+ int NUh =Uh->N;
+ ffassert(NUh< 100-MatrixInterpolation<pfes3>::Op::n_name_param);
+
+ for(int i=0;i<NUh;++i)
+ data[5+i]=i;//
+ for(int i=0;i<min(NUh,(int) U2Vc.size());++i)
+ data[5+i]= U2Vc[i];//
+ if(verbosity>3)
+ for(int i=0;i<NUh;++i)
+ {
+ cout << "The Uh componante " << i << " -> " << data[5+i] << " Componante of Vh " <<endl;
+ }
+ for(int i=0;i<NUh;++i)
+ if(data[5+i]>=NVh)
+ {
+ cout << "The Uh componante " << i << " -> " << data[5+i] << " >= " << NVh << " number of Vh Componante " <<endl;
+ ExecError("Interpolation incompability beetween componante ");
+ }
+
+ ffassert(Vh);
+ ffassert(Uh);
++<<<<<<< HEAD
+ if(!init) sparse_mat->init();
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ // sparse_mat->pUh=pUh;
+ //sparse_mat->pVh=pVh;
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ sparse_mat->A.master(new MatriceMorse<R>(*Uh,*Vh,buildInterpolationMatrix,data));
+ // sparse_mat->A.master(new MatriceMorse<R>(*Uh,*Vh,buildInterpolationMatrix,data));
+ }
+ else
+ { // new cas mars 2006
+ pfes3 * pUh = GetAny< pfes3 * >((* mi->a)(stack));
+ KN_<double> xx = GetAny< KN_<double> >((* mi->b)(stack));
+ KN_<double> yy = GetAny< KN_<double> >((* mi->c)(stack));
+ KN_<double> zz = GetAny< KN_<double> >((* mi->d)(stack));
+ ffassert( xx.N() == yy.N());
+ ffassert( xx.N() == zz.N());
+ FESpace3 * Uh = **pUh;
+ ffassert(Uh);
++<<<<<<< HEAD
+ if(!init) sparse_mat->init();
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ // sparse_mat->pUh=0;
+ // sparse_mat->pVh=0;
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ sparse_mat->A.master(buildInterpolationMatrix1(*Uh,xx,yy,zz,data));
+ }
+ return sparse_mat;
+}
+
++<<<<<<< HEAD
+template<int init>
+AnyType SetMatrixInterpolation(Stack stack,Expression emat,Expression einter)
+{ return SetMatrixInterpolation1(stack,emat,einter,init);}
+template<int init>
+AnyType SetMatrixInterpolation3(Stack stack,Expression emat,Expression einter)
+{ return SetMatrixInterpolation31(stack,emat,einter,init);}
+
+
+template<class RA,class RB,class RAB,int init>
++=======
++
++template<class RA,class RB,class RAB>
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+AnyType ProdMat(Stack stack,Expression emat,Expression prodmat)
+{
+ using namespace Fem2D;
+
+ Matrice_Creuse<RAB> * sparse_mat =GetAny<Matrice_Creuse<RA>* >((*emat)(stack));
+ const Matrix_Prod<RA,RB> AB = GetAny<Matrix_Prod<RA,RB> >((*prodmat)(stack));
+ // sparse_mat->pUh=AB.A->pUh;
+ //sparse_mat->pVh=AB.B->pVh;
+ MatriceMorse<RA> *mA= AB.A->A->toMatriceMorse(AB.ta);
+ MatriceMorse<RB> *mB= AB.B->A->toMatriceMorse(AB.tb);
+ if( !mA && ! mB) ExecError(" Sorry error: in MatProd, pb trans in MorseMat");
+ if( mA->m != mB->n) {
+ cerr << " -- Error dim ProdMat A*B : tA =" << AB.ta << " = tB " << AB.tb << endl;
+ cerr << " --MatProd " << mA->n<< " "<< mA->m << " x " << mB->n<< " "<< mB->m << endl;
+ ExecError(" Wrong mat dim in MatProd");
+ }
+ MatriceMorse<RAB> *mAB=new MatriceMorse<RA>();
+ mA->prod(*mB,*mAB);
++<<<<<<< HEAD
+ if(!init) sparse_mat->init();
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ sparse_mat->typemat=(mA->n == mB->m) ? TypeSolveMat(TypeSolveMat::GMRES) : TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ sparse_mat->A.master(mAB);
+ delete mA;
+ delete mB;
+ return sparse_mat;
+}
+
++<<<<<<< HEAD
+template<class R,int init>
++=======
++template<class R>
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+AnyType CombMat(Stack stack,Expression emat,Expression combMat)
+{
+ using namespace Fem2D;
+
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ list<triplet<R,MatriceCreuse<R> *,bool> > * lcB = GetAny<list<triplet<R,MatriceCreuse<R> *,bool> >*>((*combMat)(stack));
+ // sparse_mat->pUh=0;
++<<<<<<< HEAD
+ // sparse_mat->pVh=0;
+ MatriceCreuse<R> * AA=BuildCombMat<R>(*lcB,false,0,0);
+ if(!init) sparse_mat->init();
++=======
++ // sparse_mat->pVh=0;
++ MatriceCreuse<R> * AA=BuildCombMat<R>(*lcB,false,0,0);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ sparse_mat->A.master(AA);
+ sparse_mat->typemat=(AA->n == AA->m) ? TypeSolveMat(TypeSolveMat::GMRES) : TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+ delete lcB;
+ return sparse_mat;
+}
+
+
+template<class R>
+AnyType MatriceCreuse2map(Stack , const AnyType & mat)
+{
+
+ using namespace Fem2D;
+
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >(mat);
+ ffassert(sparse_mat);
+ int n=sparse_mat->N(),m=sparse_mat->M();
+ map<pair<int,int>,R> *M=new map<pair<int,int>,R>;
+ if (n >0 && m>0 && sparse_mat->A)
+ {
+ sparse_mat->A->addMatTo(R(1.),*M);
+ // hack
+ (*M)[make_pair(n-1,m-1)]+=R();
+ }
+ return M;
+}
+
+
++<<<<<<< HEAD
+template<class R,int init>
++=======
++template<class R>
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+AnyType DiagMat(Stack stack,Expression emat,Expression edia)
+{
+ using namespace Fem2D;
+ KN<R> * diag=GetAny<KN<R>* >((*edia)(stack));
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ // sparse_mat->pUh=0;
+ // sparse_mat->pVh=0;
++<<<<<<< HEAD
+ if(!init) sparse_mat->init();
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::GC); // none square matrice (morse)
+ sparse_mat->A.master(new MatriceMorse<R>((int) diag->N(),(const R*) *diag));
+ return sparse_mat;
+}
+
+
+
+template<class Rin,class Rout>
+ struct ChangeMatriceMorse {
+ static MatriceMorse<Rout> *f(MatriceMorse<Rin> *mr)
+ {
+ MatriceMorse<Rout>* mrr=new MatriceMorse<Rout>(*mr);
+ delete mr;
+ return mrr;
+ }
+ };
+
+template<class R>
+ struct ChangeMatriceMorse<R,R> {
+ static MatriceMorse<R>* f(MatriceMorse<R>* mr)
+ {
+ return mr;
+ }
+ };
+template<class R,class RR,int init>
+AnyType CopyMat_tt(Stack stack,Expression emat,Expression eA,bool transp)
+{
+ using namespace Fem2D;
+ Matrice_Creuse<R> * Mat;
+
+ if(transp)
+ {
+ Matrice_Creuse_Transpose<R> tMat=GetAny<Matrice_Creuse_Transpose<R> >((*eA)(stack));
+ Mat=tMat;
+ }
+ else Mat =GetAny<Matrice_Creuse<R>*>((*eA)(stack));
+ MatriceMorse<R> * mr=Mat->A->toMatriceMorse(transp,false);
+ MatriceMorse<RR> * mrr = ChangeMatriceMorse<R,RR>::f(mr);
+
+ Matrice_Creuse<RR> * sparse_mat =GetAny<Matrice_Creuse<RR>* >((*emat)(stack));
+ // sparse_mat->pUh=Mat->pUh;
+ // sparse_mat->pVh=Mat->pUh;;
++<<<<<<< HEAD
+ // cout << " CopyMat_tt " << init << " "<<transp << " " << sparse_mat << endl;
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if(!init) sparse_mat->init() ;
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::GC); // none square matrice (morse)
+ sparse_mat->A.master(mrr);
+ //delete mr;
+ return sparse_mat;
+}
+
+template<class R,class RR,int init>
+AnyType CopyTrans(Stack stack,Expression emat,Expression eA)
+{
+ return CopyMat_tt<R,RR,init>(stack,emat,eA,true);
+}
+template<class R,class RR,int init>
+AnyType CopyMat(Stack stack,Expression emat,Expression eA)
+{
+ return CopyMat_tt<R,RR,init>(stack,emat,eA,false);
+}
+
+
++<<<<<<< HEAD
+template<class R,int init>
++=======
++template<class R>
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+AnyType MatFull2Sparse(Stack stack,Expression emat,Expression eA)
+{
+ KNM<R> * A=GetAny<KNM<R>* >((*eA)(stack));
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ // sparse_mat->pUh=0;
+ // sparse_mat->pVh=0;
++<<<<<<< HEAD
+ if(!init) sparse_mat->init() ;
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::GMRES); // none square matrice (morse)
+ sparse_mat->A.master(new MatriceMorse<R>((KNM_<R> &)*A,0.0));
+
+ return sparse_mat;
+}
+
++<<<<<<< HEAD
+template<class R,int init>
++=======
++template<class R>
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+AnyType MatMap2Sparse(Stack stack,Expression emat,Expression eA)
+{
+ map< pair<int,int>, R> * A=GetAny< map< pair<int,int>, R> * >((*eA)(stack));
+ int n=0,m=0;
+ // hack: the last element must exist in the map to set matrix size
+
+ typename map< pair<int,int>, R>::const_iterator last= --A->end(); // le last element
+
+ if( last != A->end() )
+
+ {
+ n = last->first.first+1;
+ m=last->first.second+1;
+ }
++<<<<<<< HEAD
+
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ if(!init) sparse_mat->init() ;
++=======
++
++ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ // sparse_mat->pUh=0;
+ // sparse_mat->pVh=0;
+ sparse_mat->typemat=TypeSolveMat(TypeSolveMat::GMRES); // none square matrice (morse)
+ sparse_mat->A.master(new MatriceMorse<R>(n,m,*A,false));
+ delete A;
+ return sparse_mat;
+}
+
+template<class RR,class AA=RR,class BB=AA>
+struct Op2_pair: public binary_function<AA,BB,RR> {
+ static RR f(const AA & a,const BB & b)
+ { return RR( a, b);}
+};
+
+
+template<class R>
+long get_mat_n(Matrice_Creuse<R> * p)
+ { ffassert(p ) ; return p->A ?p->A->n: 0 ;}
+
+template<class R>
+long get_mat_m(Matrice_Creuse<R> * p)
+ { ffassert(p ) ; return p->A ?p->A->m: 0 ;}
+
+template<class R>
+long get_mat_nbcoef(Matrice_Creuse<R> * p)
+ { ffassert(p ) ; return p->A ?p->A->NbCoef(): 0 ;}
+
+template<class R>
+pair<long,long> get_NM(const list<triplet<R,MatriceCreuse<R> *,bool> > & lM)
+{
+ typedef typename list<triplet<R,MatriceCreuse<R> *,bool> >::const_iterator lconst_iterator;
+
+ lconst_iterator begin=lM.begin();
+ lconst_iterator end=lM.end();
+ lconst_iterator i;
+
+ long n=0,m=0;
+ for(i=begin;i!=end;i++++)
+ {
+ ffassert(i->second);
+ MatriceCreuse<R> & M=*i->second;
+ bool t=i->third;
+ int nn= M.n,mm=M.m;
+ if (t) swap(nn,mm);
+ if ( n==0) n = nn;
+ if ( m==0) m = mm;
+ if (n != 0) ffassert(nn == n);
+ if (m != 0) ffassert(mm == m);
+ }
+ return make_pair(n,m);
+}
+
+template<class R>
+long get_diag(Matrice_Creuse<R> * p, KN<R> * x)
+ { ffassert(p && x ) ; return p->A ?p->A->getdiag(*x): 0 ;}
+template<class R>
+long set_diag(Matrice_Creuse<R> * p, KN<R> * x)
+ { ffassert(p && x ) ; return p->A ?p->A->setdiag(*x): 0 ;}
+
+
+template<class R>
+R * get_elementp2mc(Matrice_Creuse<R> * const & ac,const long & b,const long & c){
+ MatriceCreuse<R> * a= ac ? ac->A:0 ;
+ if( !a || a->n <= b || c<0 || a->m <= c )
+ { cerr << " Out of bound 0 <=" << b << " < " << a->n << ", 0 <= " << c << " < " << a->m
+ << " Matrix type = " << typeid(ac).name() << endl;
+ cerr << ac << " " << a << endl;
+ ExecError("Out of bound in operator Matrice_Creuse<R> (,)");}
+ R * p =a->pij(b,c);
+ if( !p) { if(verbosity) cerr << "Error: the coef a(" << b << "," << c << ") do'nt exist in sparse matrix "
+ << " Matrix type = " << typeid(ac).name() << endl;
+ ExecError("Use of unexisting coef in sparse matrix operator a(i,j) ");}
+ return p;}
+
+
+template<class RR,class AA=RR,class BB=AA>
+struct Op2_mulAv: public binary_function<AA,BB,RR> {
+ static RR f(const AA & a,const BB & b)
+ { return (*a->A * *b );}
+};
+
+template<class RR,class AA=RR,class BB=AA>
+struct Op2_mulvirtAv: public binary_function<AA,BB,RR> {
+ static RR f(const AA & a,const BB & b)
+ { return RR( (*a).A, b );}
+};
+
+class Matrice_Creuse_C2R { public:
+ typedef Complex K;
+ Matrice_Creuse<K> * A;
+ int cas; // 0 re , 1 im
+ Matrice_Creuse_C2R(Matrice_Creuse<K> * AA,int cass) : A(AA),cas(cass) {assert(A);}
+ operator MatriceCreuse<K> & () const {return *A->A;}
+ operator Matrice_Creuse<K> * () const {return A;}
+};
+
+template<int cas>
+Matrice_Creuse_C2R Build_Matrice_Creuse_C2R(Matrice_Creuse<Complex> * pAA)
+{
+
+ return Matrice_Creuse_C2R(pAA,cas);
+}
+
+template<class K>
+class OneBinaryOperatorA_inv : public OneOperator { public:
+ OneBinaryOperatorA_inv() : OneOperator(atype<Matrice_Creuse_inv<K> >(),atype<Matrice_Creuse<K> *>(),atype<long>()) {}
+ E_F0 * code(const basicAC_F0 & args) const
+ { Expression p=args[1];
+ if ( ! p->EvaluableWithOutStack() )
+ {
+ bool bb=p->EvaluableWithOutStack();
+ cout << bb << " " << * p << endl;
+ CompileError(" A^p, The p must be a constant == -1, sorry");}
+ long pv = GetAny<long>((*p)(NullStack));
+ if (pv !=-1)
+ { char buf[100];
+ sprintf(buf," A^%ld, The pow must be == -1, sorry",pv);
+ CompileError(buf);}
+ return new E_F_F0<Matrice_Creuse_inv<K>,Matrice_Creuse<K> *>(Build<Matrice_Creuse_inv<K>,Matrice_Creuse<K> *>,t[0]->CastTo(args[0]));
+ }
+};
+
+
+
+
+template<class K>
+class Psor : public E_F0 { public:
+
+ typedef double Result;
+ Expression mat;
+ Expression xx,gmn,gmx,oomega;
+ Psor(const basicAC_F0 & args)
+ {
+ args.SetNameParam();
+ mat=to<Matrice_Creuse<K> *>(args[0]);
+ gmn=to<KN<K>*>(args[1]);
+ gmx=to<KN<K>*>(args[2]);
+ xx=to<KN<K>*>(args[3]);
+ oomega=to<double>(args[4]);
+
+ }
+ static ArrayOfaType typeargs() {
+ return ArrayOfaType( atype<double>(),
+ atype<Matrice_Creuse<K> *>(),
+ atype<KN<K>*>(),
+ atype<KN<K>*>(),
+ atype<KN<K>*>(),
+ atype<double>(),false);}
+
+ static E_F0 * f(const basicAC_F0 & args){ return new Psor(args);}
+
+ AnyType operator()(Stack s) const {
+ Matrice_Creuse<K>* A= GetAny<Matrice_Creuse<K>* >( (*mat)(s) );
+ KN<K>* gmin = GetAny<KN<K>* >( (*gmn)(s) );
+ KN<K>* gmax = GetAny<KN<K>* >( (*gmx)(s) );
+ KN<K>* x = GetAny<KN<K>* >( (*xx)(s) );
+ double omega = GetAny<double>((*oomega)(s));
+ return A->A->psor(*gmin,*gmax,*x,omega);
+ }
+
+};
+template <class R>
+ struct TheDiagMat {
+ Matrice_Creuse<R> * A;
+ TheDiagMat(Matrice_Creuse<R> * AA) :A(AA) {ffassert(A);}
+ void get_mat_daig( KN_<R> & x) { ffassert(A && A->A && x.N() == A->A->n && A->A->n == A->A->m );
+ A->A->getdiag(x);}
+ void set_mat_daig(const KN_<R> & x) { ffassert(A && A->A && x.N() == A->A->n && A->A->n == A->A->m );
+ A->A->setdiag(x);}
+ };
+
+ template <class R>
+ struct TheCoefMat {
+ Matrice_Creuse<R> * A;
+ TheCoefMat(Matrice_Creuse<R> * AA) :A(AA) {ffassert(A);}
+ void get_mat_coef( KN_<R> & x) { ffassert(A && A->A && x.N() == A->A->NbCoef() );
+ A->A->getcoef(x);}
+ void set_mat_coef(const KN_<R> & x) { ffassert(A && A->A && x.N() == A->A->NbCoef() );
+ A->A->setcoef(x);}
+ };
+
+template<class R>
+TheDiagMat<R> thediag(Matrice_Creuse<R> * p)
+ { return TheDiagMat<R>(p);}
+
+template<class R>
+TheCoefMat<R> thecoef(Matrice_Creuse<R> * p)
+ { return TheCoefMat<R>(p);}
+
+template<class R>
+TheDiagMat<R> set_mat_daig(TheDiagMat<R> dm,KN<R> * x)
+{
+ dm.set_mat_daig(*x);
+ return dm;
+}
+template<class R>
+KN<R> * get_mat_daig(KN<R> * x,TheDiagMat<R> dm)
+{
+ dm.get_mat_daig(*x);
+ return x;
+}
+
+template<class R>
+TheCoefMat<R> set_mat_coef(TheCoefMat<R> dm,KN<R> * x)
+{
+ dm.set_mat_coef(*x);
+ return dm;
+}
+template<class R>
+KN<R> * get_mat_coef(KN<R> * x,TheCoefMat<R> dm)
+{
+ dm.get_mat_coef(*x);
+ return x;
+}
+
+template<class R>
+bool IsRawMat(const basicAC_F0 & args)
+{
+
+ const E_Array & ee= *dynamic_cast<const E_Array*>((Expression) args[1]);
+ if (!&ee) return 0;
+
+ int N=ee.size();
+ if (N==1)
+ {
+ C_F0 c0(ee[0]);
+ return
+ atype<KN_<R> >()->CastingFrom(ee[0].left());
+
+ }
+ else if (N==3)
+ {
+ C_F0 c0(ee[0]),c1(ee[1]),c2(ee[2]);
+ return
+ atype<KN_<long> >()->CastingFrom(ee[0].left())
+ && atype<KN_<long> >()->CastingFrom(ee[1].left())
+ && atype<KN_<R> >()->CastingFrom(ee[2].left());
+
+ }
+ return 0;
+}
+
+
+template<typename R>
++<<<<<<< HEAD
+class RawMatrix : public E_F0 { public:
+ int init;
+ typedef Matrice_Creuse<R> * Result;
+ Expression emat;
+ Expression coef,col,lig;
+ RawMatrix(const basicAC_F0 & args,int initt) ;
++=======
++class RawMatrix : public E_F0 { public:
++ typedef Matrice_Creuse<R> * Result;
++ Expression emat;
++ Expression coef,col,lig;
++ RawMatrix(const basicAC_F0 & args) ;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ static ArrayOfaType typeargs() { return ArrayOfaType(atype<Matrice_Creuse<R>*>(),atype<E_Array>());}
+ AnyType operator()(Stack s) const ;
+};
+
+ template<typename R>
+ class BlockMatrix : public E_F0 { public:
+ typedef Matrice_Creuse<R> * Result;
++<<<<<<< HEAD
+ int N,M;
+ int init;
+ Expression emat;
+ Expression ** e_Mij;
+ int ** t_Mij;
+ BlockMatrix(const basicAC_F0 & args,int iinit=0) ;
++=======
++ int N,M;
++ Expression emat;
++ Expression ** e_Mij;
++ int ** t_Mij;
++ BlockMatrix(const basicAC_F0 & args) ;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ ~BlockMatrix() ;
+
+ static ArrayOfaType typeargs() { return ArrayOfaType(atype<Matrice_Creuse<R>*>(),atype<E_Array>());}
+ static E_F0 * f(const basicAC_F0 & args){
++<<<<<<< HEAD
+ if(IsRawMat<R>(args)) return new RawMatrix<R>(args,0);
+ else return new BlockMatrix(args,0);
++=======
++ if(IsRawMat<R>(args)) return new RawMatrix<R>(args);
++ else return new BlockMatrix(args);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ }
+ AnyType operator()(Stack s) const ;
+
+};
++<<<<<<< HEAD
+template<typename R>
+class BlockMatrix1 : public BlockMatrix<R> { public:
+ BlockMatrix1(const basicAC_F0 & args): BlockMatrix<R>(args,1) {}
+ static E_F0 * f(const basicAC_F0 & args){
+ if(IsRawMat<R>(args)) return new RawMatrix<R>(args,1);
+ else return new BlockMatrix<R>(args,1);
+ }
+
+};
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+template<typename R>
+map< pair<int,int>, R> *Matrixfull2mapIJ_inv (KNM<R> * const & pa,const Inv_KN_long & iii,const Inv_KN_long & jjj)
+{
+ const KN_<long> &ii(iii), &jj(jjj);
+ const KNM<R> & a(*pa);
+ int N=a.N(),M=a.M();
+ long n = ii(SubArray(N)).max()+1;
+ long m= jj(SubArray(M)).max()+1;
+
+/*
+ long minn = ii(SubArray(N)).min()+1;
+ long minm= jj(SubArray(M)).min()+1;
+ if ( !(0 <= minn && 0 <= minm) )
+ {
+ cerr << " Out of Bound in A(I^-1,J^1) : "<< minn << " " << minm <<" => negative value!! " << endl;
+ ExecError("Out of Bound Error");
+ }
+*/
+
+ // cout << " ### n m " << n << " " << m << endl;
+ map< pair<int,int>, R> *pA= new map< pair<int,int>, R>;
+ map< pair<int,int>, R> & A(*pA);
+ A[make_pair(n-1,m-1)] = R(); // Hack to be sure that the last term existe
+
+ for (long i=0;i<N;++i)
+ for (long j=0;j<M;++j)
+ { R aij=a(i,j);
+ //cout << i << " " << j << " :: " << ii[i] << " " << jj[j] << " = " << aij << endl;
+ if(ii[i]>=0 && jj[j]>=0 && Fem2D::norm(aij)>1e-40)
+ A[make_pair(ii[i],jj[j])] += aij;
+ }
+
+ return pA;
+}
+
+template<typename R>
+map< pair<int,int>, R> *Matrixfull2mapIJ (KNM<R> * const & pa,const KN_<long> & ii,const KN_<long> & jj)
+{
+ const KNM<R> & a(*pa);
+ int N=a.N(),M=a.M();
+ long n = ii.N();
+ long m= jj.N();
+ // cout << " ### n m " << n << " " << m << endl;
+ map< pair<int,int>, R> *pA= new map< pair<int,int>, R>;
+ map< pair<int,int>, R> & A(*pA);
+ A[make_pair(n-1,m-1)] += R(); // Hack to be sure that the last term existe
+
+ for (long il=0;il<N;++il)
+ for (long jl=0;jl<M;++jl)
+ {
+ long i = ii[il];
+ long j = jj[jl];
+ if( i>=0 && j >=0) {
+ if ( !(0 <= i && i < N && 0 <= j && j < M ) )
+ {
+ cerr << " Out of Bound in A(I,J) : " << i << " " << j << " not in " << "[0,"<<N<<"[x[0," << M << "[ \n";
+ ExecError("Out of Bound Error");
+ }
+
+ R aij=a(i,j);
+ //cout << i << " " << j << " :: " << ii[i] << " " << jj[j] << " = " << aij << endl;
+ if (Fem2D::norm(aij)>1e-40)
+ A[make_pair(il,jl)] += aij;
+ }
+ }
+
+ return pA;
+}
+
+template<class R>
+AnyType Matrixfull2map (Stack , const AnyType & pp)
+{
+ const KNM<R> & a(*GetAny<KNM<R> *>(pp));
+ int N=a.N(),M=a.M();
+ int n = N;
+ int m= M;
+ map< pair<int,int>, R> *pA= new map< pair<int,int>, R>;
+ map< pair<int,int>, R> & A(*pA);
+ A[make_pair(n-1,m-1)] = R(); // Hack to be sure that the last term existe
+
+ for (int i=0;i<N;++i)
+ for (int j=0;j<M;++j)
+ { R aij=a(i,j);
+ if (Fem2D::norm(aij)>1e-40)
+ A[make_pair(i,j)] += aij;
+ }
+
+ return pA;
+}
+
+
+template<class R>
+map< pair<int,int>, R> *Matrixoutp2mapIJ_inv (outProduct_KN_<R> * const & pop,const Inv_KN_long & iii,const Inv_KN_long & jjj)
+{
+ const KN_<long> &ii(iii), &jj(jjj);
+ const outProduct_KN_<R> & op(*pop);
+ long N=op.a.N(),M=op.b.N();
+ long n = ii(SubArray(N)).max()+1;
+ long m= jj(SubArray(M)).max()+1;
+/*
+ long minn = ii(SubArray(N)).min()+1;
+ long minm= jj(SubArray(M)).min()+1;
+ if ( !(0 <= minn && 0 <= minm) )
+ {
+ cerr << " Out of Bound in A(I^-1,J^1) : "<< minn << " " << minm <<" => negative value!! " << endl;
+ ExecError("Out of Bound Error");
+ }
+ */
+ map< pair<int,int>, R> *pA= new map< pair<int,int>, R>;
+ map< pair<int,int>, R> & A(*pA);
+ A[make_pair(n-1,m-1)] = R(); // Hack to be sure that the last term existe
+
+ for (int i=0;i<N;++i)
+ for (int j=0;j<M;++j)
+ {
+ R aij=op.a[i]*RNM::conj(op.b[j]);
+ if(ii[i]>=0 && jj[j]>=0 && Fem2D::norm(aij)>1e-40)
+// if (norm(aij)>1e-40 &)
+ A[make_pair(ii[i],jj[j])] += aij;
+ }
+ delete pop;
+
+ return pA;
+}
+
+
+template<class R>
+map< pair<int,int>, R> *Matrixmapp2mapIJ1 (map< pair<int,int>, R> *const & B,const Inv_KN_long & iii,const Inv_KN_long & jjj)
+{
+ const KN_<long> &ii(iii), &jj(jjj);
+ typedef typename map< pair<int,int>, R>::const_iterator It;
+
+ map< pair<int,int>, R> *pA= new map< pair<int,int>, R>;
+ map< pair<int,int>, R> & A(*pA);
+ int n=0,m=0;
+ // hack: the last element must exist in the map to set matrix size
+/*
+ It lastb= --B->end(); // le last element
+
+ if( lastb != B->end() )
+ {
+ nb = last->first.first+1;
+ mb=last->first.second+1;
+ } */
+ int N=ii.N(),M=jj.N();
+ // A[make_pair(n-1,m-1)] = R(); // Hack to be sure that the last term existe
+
+ for (It k=B->begin();k!=B->end();++k)
+ {
+ int il = k->first.first;
+ int jl = k->first.second;
+ if ( !( 0 <= il && il < N && 0 <= jl && jl < M ) )
+ {
+ cerr << " Out of Bound in (Map)(I,J) : " << il << " " << jl << " not in " << "[0,"<<N<<"[x[0," << M << "[ \n";
+ ExecError("Out of Bound Error");
+ }
+ int i=ii(il);
+ int j=jj(jl);
+ n=max(i,n);
+ m=max(j,m);
+ R aij =k->second;
+ if(i >=0 && j>=0)
+ A[make_pair(i,j)] += aij;
+ }
+ A[make_pair(n,m)] += R(); // Hack to be sure that the last term existe
+ delete B;
+
+ return pA;
+}
+
+template<class R>
+map< pair<int,int>, R> *Matrixmapp2mapIJ (map< pair<int,int>, R> *const & B,const KN_<long> & ii,const KN_<long> & jj)
+{
+
+ typedef typename map< pair<int,int>, R>::const_iterator It;
+ typedef typename multimap< int,int>::iterator MI;
+
+ map< pair<int,int>, R> *pA= new map< pair<int,int>, R>;
+ map< pair<int,int>, R> & A(*pA);
+ multimap< int,int > I,J;
+ int N=ii.N(),M=jj.N();
+ for (int i=0;i<N;++i)
+ if(ii[i]>=0)
+ I.insert(make_pair(ii[i],i));
+ for (int j=0;j<M;++j)
+ if(jj[j]>=0)
+ J.insert(make_pair(jj[j],j));
+ int n=N-1,m=M-1;// change FH sep 2009 to have the correct size..
+
+ for (It k=B->begin();k!=B->end();++k)
+ {
+ int il = k->first.first;
+ int jl = k->first.second;
+ R aij =k->second;
+ pair<MI,MI> PPi=I.equal_range(il);
+ pair<MI,MI> PPj=J.equal_range(jl);
+ for(MI pi=PPi.first ; pi != PPi.second; ++pi)
+ {
+ int i=pi->second;
+ for(MI pj=PPj.first ; pj != PPj.second; ++pj)
+ {
+ int j=pj->second;
+ n=max(i,n);
+ m=max(j,m);
+ if(i >=0 && j>=0)
+ A[make_pair(i,j)] += aij;
+ }
+ }
+ }
+ A[make_pair(n,m)] += R(); // Hack to be sure that the last term existe
+ delete B;
+
+ return pA;
+}
+
+template<class R>
+map< pair<int,int>, R> *Matrixoutp2mapIJ (outProduct_KN_<R> * const & pop,const KN_<long> & ii,const KN_<long> & jj)
+{
+ const outProduct_KN_<R> & op(*pop);
+ long N=op.a.N(),M=op.b.N();
+ long n=ii.N(),m=jj.N();
+
+ map< pair<int,int>, R> *pA= new map< pair<int,int>, R>;
+ map< pair<int,int>, R> & A(*pA);
+ A[make_pair(n-1,m-1)] = R(); // Hack to be sure that the last term existe
+
+ for (long il=0;il<n;++il)
+ for (long jl=0;jl<m;++jl)
+ {
+ long i = ii[il];
+ long j = jj[jl];
+ if(i>=0 && j >=0)
+ {
+ if ( !( 0 <= i && i < N && 0 <= j && j < M ) )
+ {
+ cerr << " Out of Bound in (a*b')(I,J) : " << i << " " << j << " not in " << "[0,"<<N<<"[x[0," << M << "[ \n";
+ ExecError("Out of Bound Error");
+ }
+ R aij=op.a[i]*RNM::conj(op.b[j]);
+ if (Fem2D::norm(aij)>1e-40)
+ A[make_pair(il,jl)] += aij;
+ }
+ }
+ delete pop;
+
+ return pA;
+}
+
+
+template<class R>
+AnyType Matrixoutp2map (Stack , const AnyType & pp)
+{
+ const outProduct_KN_<R> & op(*GetAny<outProduct_KN_<R> *>(pp));
+ long N=op.a.N(),M=op.b.N();
+ long n = N;
+ long m= M;
+ map< pair<int,int>, R> *pA= new map< pair<int,int>, R>;
+ map< pair<int,int>, R> & A(*pA);
+ A[make_pair(n-1,m-1)] = R(); // Hack to be sure that the last term existe
+
+ for (long i=0;i<N;++i)
+ for (long j=0;j<M;++j)
+ {
+ R aij=op.a[i]*RNM::conj(op.b[j]);
+ if (Fem2D::norm(aij)>1e-40)
+ A[make_pair(i,j)] += aij;
+ }
+ delete &op;
+ return pA;
+}
+
+
+template<typename R> BlockMatrix<R>::~BlockMatrix()
+{
+ if (e_Mij)
+ { cout << " del Block matrix "<< this << " " << e_Mij <<" N = " << N << " M = " << M << endl;
+ for (int i=0;i<N;i++)
+ { delete [] e_Mij[i];
+ delete [] t_Mij[i];
+ }
+ delete [] e_Mij;
+ delete [] t_Mij;
+ N=0;
+ M=0;
+ e_Mij=0;
+ t_Mij=0; }
+}
+
++<<<<<<< HEAD
+template<typename R> RawMatrix<R>::RawMatrix(const basicAC_F0 & args,int iinit)
+: init(iinit)
++=======
++template<typename R> RawMatrix<R>::RawMatrix(const basicAC_F0 & args)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ args.SetNameParam();
+ emat = args[0];
+
+ const E_Array & ee= *dynamic_cast<const E_Array*>((Expression) args[1]);
+
+ int N=ee.size();
+ if (N==1)
+ {
+ C_F0 c0(ee[0]);
+ coef=to<KN_<R> >(ee[0]);
+ lig=0;
+ col=0;
+ }
+
+ else if (N==3)
+ {
+ C_F0 c0(ee[0]),c1(ee[1]),c2(ee[2]);
+ coef=to<KN_<R> >(ee[2]);
+ lig=to<KN_<long> >(ee[0]);
+ col=to<KN_<long> >(ee[1]);
+
+ }
+
+
+}
++<<<<<<< HEAD
+template<typename R> BlockMatrix<R>::BlockMatrix(const basicAC_F0 & args,int iinit)
+: init(iinit)
++=======
++template<typename R> BlockMatrix<R>::BlockMatrix(const basicAC_F0 & args)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+{
+ N=0;
+ M=0;
+ args.SetNameParam();
+ emat = args[0];
+ const E_Array & eMij= *dynamic_cast<const E_Array*>((Expression) args[1]);
+ N=eMij.size();
+ int err =0;
+ for (int i=0;i<N;i++)
+ {
+ const E_Array* emi= dynamic_cast<const E_Array*>((Expression) eMij[i]);
+ if (!emi) err++;
+ else
+ {
+ if ( i==0)
+ M = emi->size();
+ else
+ if(M != emi->size()) err++;
+ }
+ }
+ if (err) {
+ CompileError(" Block matrix : [[ a, b, c], [ a,b,c ]] or Raw Matrix [a] or [ l, c, a ] ");
+ }
+ assert(N && M);
+ e_Mij = new Expression * [N];
+ t_Mij = new int * [N];
+ for (int i=0;i<N;i++)
+ {
+ const E_Array li= *dynamic_cast<const E_Array*>((Expression) eMij[i]);
+
+ e_Mij[i] = new Expression [M];
+ t_Mij[i] = new int [M];
+ for (int j=0; j<M;j++)
+ {
+ C_F0 c_Mij(li[j]);
+ Expression eij=c_Mij.LeftValue();
+ aType rij = c_Mij.left();
+ if ( rij == atype<long>() && eij->EvaluableWithOutStack() )
+ {
+ long contm = GetAny<long>((*eij)(NullStack));
+ /* prev version
+ if(contm !=0)
+ CompileError(" Block matrix , Just 0 matrix");
+ e_Mij[i][j]=0;
+ t_Mij[i][j]=0;*/
+ if(contm==0)
+ {
+ e_Mij[i][j]=0;
+ t_Mij[i][j]=0;
+ }
+ else if ( atype<R >()->CastingFrom(rij) )
+ { // frev 2007
+ e_Mij[i][j]=to<R>(c_Mij);
+ t_Mij[i][j]=7; // just un scalaire
+ }
+ else CompileError(" Block matrix , Just 0 matrix");
+ }
+ else if ( rij == atype<Matrice_Creuse<R> *>())
+ {
+ e_Mij[i][j]=eij;
+ t_Mij[i][j]=1;
+ }
+ else if ( rij == atype<Matrice_Creuse_Transpose<R> >())
+ {
+ e_Mij[i][j]=eij;
+ t_Mij[i][j]=2;
+ }
+ else if ( atype<KNM<R> * >()->CastingFrom(rij) )
+ { // before KN_ because KNM can be cast in KN_
+
+ e_Mij[i][j]=to<KNM<R> * >(c_Mij);
+ t_Mij[i][j]=5;
+ }
+ else if ( atype<KN_<R> >()->CastingFrom(rij) )
+ {
+ e_Mij[i][j]=to<KN_<R> >(c_Mij);
+ t_Mij[i][j]=3;
+
+ }
+ else if ( atype<Transpose<KN_<R> > >()->CastingFrom(rij) )
+ {
+
+ e_Mij[i][j]=to<Transpose<KN_<R> > >(c_Mij);
+ t_Mij[i][j]=4;
+ }
+ else if ( atype<Transpose< KNM<R> * > >()->CastingFrom(rij) )
+ {
+
+ e_Mij[i][j]=to<Transpose<KNM<R> *> >(c_Mij);
+ t_Mij[i][j]=6;
+ }
+ else if ( atype<R >()->CastingFrom(rij) )
+ { // frev 2007
+ e_Mij[i][j]=to<R>(c_Mij);
+ t_Mij[i][j]=7; // just un scalaire
+ }
+
+ else {
+
+ CompileError(" Block matrix , bad type in block matrix");
+ }
+ /* else if ( atype<map< pair<int,int>, R> * >()->CastingFrom(rij) )
+ {
+ e_Mij[i][j]= to<map< pair<int,int>, R> *>(C_F0(eij,rij)).LeftValue();
+ t_Mij[i][j]=10;
+ }*/
+ }
+
+ }
+}
+
+template<typename RR>
+class SetRawMatformMat : public OneOperator {
+public:
+ typedef Matrice_Creuse<RR> * A; // Warning B type of 2 parameter
+ typedef Matrice_Creuse<RR> * R;
+ typedef E_Array B; // A type of 1 parameter
+
+ class CODE : public E_F0 { public:
+ Expression Mat;
+ Expression lig;
+ Expression col;
+ Expression coef;
+ bool mi;
+ CODE(Expression a,const E_Array & tt)
+ : Mat(a),
+ mi(tt.MeshIndependent())
+ {
+
+ assert(&tt);
+ if(tt.size()!=3)
+ CompileError("Set raw matrix: [ lg,col, a] = A (size !=3) ");
+ if ( aatypeknlongp->CastingFrom(tt[0].left() ) //// for compilation error with g++ 3.2.2 (4 times)
+ && aatypeknlongp->CastingFrom(tt[1].left() )
+ && atype<KN<RR>* >()->CastingFrom(tt[2].left() ) )
+ {
+ lig = aatypeknlongp->CastTo(tt[0]);
+ col = aatypeknlongp->CastTo(tt[1]);
+ coef = atype<KN<RR>* >()->CastTo(tt[2]);
+ }
+ else
+ CompileError(" we are waiting for [ lg,col,a] = A");
+ }
+
+ AnyType operator()(Stack stack) const
+ {
+ A a=GetAny<A>((*Mat)(stack));
+ KN<long> *lg,*cl;
+ KN<RR> *cc;
+ lg = GetAny<KN<long>*>((*lig)(stack));
+ cl = GetAny<KN<long>*>((*col)(stack));
+ cc = GetAny<KN<RR>*>((*coef)(stack));
+ int n=a->N(),m=a->M();
+ map<pair<int,int>,RR> *M=new map<pair<int,int>,RR>;
+ if (n >0 && m>0 && a->A)
+ {
+ a->A->addMatTo(RR(1.),*M);
+ // hack
+ (*M)[make_pair(n-1,m-1)]+=RR();
+ }
+ int kk = M->size();
+ lg->resize(kk);
+ cc->resize(kk);
+ cl->resize(kk);
+ int k=0;
+ typename map<pair<int,int>,RR>::const_iterator i;
+ //if (!a->sym)
+ for (i=M->begin(); i != M->end();++i,++k)
+ {
+ (*lg)[k]= i->first.first;
+ (*cl)[k]= i->first.second;
+ (*cc)[k]= i->second;
+ }
+
+ delete M;
+ return SetAny<R>(a);
+ }
+ bool MeshIndependent() const {return mi;} //
+ ~CODE() {}
+ operator aType () const { return atype<R>();}
+ }; // end sub class CODE
+
+
+public: // warning hack A and B
+ E_F0 * code(const basicAC_F0 & args) const
+ { return new CODE(t[1]->CastTo(args[1]),*dynamic_cast<const E_Array*>( t[0]->CastTo(args[0]).RightValue()));}
+ SetRawMatformMat(): OneOperator(atype<R>(),atype<B>(),atype<A>()) {} // warning with A and B
+
+};
+
+
+R realC(Complex c) {return c.real();}
+R imagC(Complex c) {return c.imag();}
+template<int init>
+AnyType CopyMatC2R(Stack stack,Expression emat,Expression CR2eA)
+{
+ typedef Complex C;
+ typedef double R;
+ using namespace Fem2D;
+ Matrice_Creuse_C2R CRMat =GetAny<Matrice_Creuse_C2R>((*CR2eA)(stack));
+ Matrice_Creuse<C> *Mat=CRMat;
+ int cas = CRMat.cas;
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ MatriceMorse<C> * mr=Mat->A->toMatriceMorse(false,false);
+ MatriceMorse<R> * mrr = 0;
++<<<<<<< HEAD
+ // cout << " CopyMatC2R: " << init << " " << sparse_mat <<endl;
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if(cas==0)
+ mrr = new MatriceMorse<R>(*mr,realC);
+ else if(cas==1)
+ mrr = new MatriceMorse<R>(*mr,imagC);
+ else {
+ cout << " cas = " << cas <<endl;
+ ffassert(0);
+ }
+ delete mr;
+ if(!init) sparse_mat->init() ; // ????
+ sparse_mat->A.master(mrr);
+ //ffassert(0);// a faire
+ return sparse_mat;
+}
+
+template<typename R> AnyType RawMatrix<R>::operator()(Stack stack) const
+{
+ MatriceMorse<R> * amorse =0;
+ KN_<R> cc(GetAny< KN_<R> >((*coef)(stack)));
+ int k= cc.N();
+ int n= k;
+ int m=n;
+ map< pair<int,int>, R> Aij;
+ bool sym=false;
+ if( lig && col)
+ {
+ KN_<long> lg(GetAny< KN_<long> >((*lig)(stack)));
+ KN_<long> cl=(GetAny< KN_<long> >((*col)(stack)));
+ n = lg.max()+1;
+ m = cl.max()+1;
+ ffassert( lg.N()==k && cl.N()==k && lg.min()>=0 && lg.max()>=0);
+ sym=false;
+ for(int i=0;i<k;++i)
+ Aij[make_pair<int,int>(lg[i],cl[i])]+=cc[i];
+ }
+ else
+ {
+ sym=true;
+ for(int i=0;i<n;++i)
+ Aij[make_pair(i,i)]=cc[i];
+ }
+ //cout << " nxm =" <<n<< "x" << m <<endl;
+ amorse= new MatriceMorse<R>(n,m,Aij,sym);
+ if(verbosity)
+ cout << " -- Raw Matrix nxm =" <<n<< "x" << m << " nb none zero coef. " << amorse->nbcoef << endl;
+
++<<<<<<< HEAD
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
+ if( !init) sparse_mat->init();
++=======
++ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(stack));
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ // sparse_mat->pUh=0;
+ // sparse_mat->pVh=0;
+ sparse_mat->A.master(amorse);
+ sparse_mat->typemat=(amorse->n == amorse->m) ? TypeSolveMat(TypeSolveMat::GMRES) : TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+
+ if(verbosity>3) { cout << " End Raw Matrix : " << endl;}
+
+ return sparse_mat;
+}
+template<typename R> AnyType BlockMatrix<R>::operator()(Stack s) const
+{
+ typedef list<triplet<R,MatriceCreuse<R> *,bool> > * L;
+ KNM<L> Bij(N,M);
+ KNM<KNM_<R> * > Fij(N,M);
+ KNM<bool> cnjij(N,M);
+ KNM<R> Rij(N,M); // to sto
+
+ cnjij = false;
+ KN<long> Oi(N+1), Oj(M+1);
+ if(verbosity>3) { cout << " Build Block Matrix : " << N << " x " << M << endl;}
+ Bij = (L) 0;
+ Oi = (long) 0;
+ Oj = (long)0;
+ for (int i=0;i<N;++i)
+ for (int j=0;j<M;++j)
+ {
+ Fij(i,j)=0;
+ Expression eij = e_Mij[i][j];
+ int tij=t_Mij[i][j];
+ if (eij)
+ {
+ cnjij(i,j) = tij%2 == 0;
+ AnyType e=(*eij)(s);
+ if (tij==1) Bij(i,j) = to( GetAny< Matrice_Creuse<R>* >( e)) ;
+ else if (tij==2) Bij(i,j) = to( GetAny<Matrice_Creuse_Transpose<R> >(e));
+ else if (tij==3) { KN_<R> x=GetAny< KN_<R> >( e); Fij(i,j) = new KNM_<R>(x,x.N(),1);}
+ else if (tij==4) { KN_<R> x=GetAny< Transpose< KN_<R> > >( e).t ; Fij(i,j) = new KNM_<R>(x,1,x.N());}
+ else if (tij==5) { KNM<R> * m= GetAny< KNM<R>* >( e); Fij(i,j) = new KNM_<R>(*m);}
+ else if (tij==6) { KNM<R> * m= GetAny< Transpose< KNM<R>* > >( e).t; Fij(i,j) = new KNM_<R>(m->t()); }
+ else if (tij==7) { Rij(i,j)=GetAny< R >( e); Fij(i,j) = new KNM_<R>(&(Rij(i,j)),1,1);}
+
+ // else if (tij==3) {}
+ else {
+ cout << " Bug " << tij << endl;
+ ExecError(" Type sub matrix block unknown ");
+ }
+ }
+ }
+ // compute size of matrix
+ int err=0;
+ for (int i=0;i<N;++i)
+ for (int j=0;j<M;++j)
+ {
+ pair<long,long> nm(0,0);
+
+ if (Bij(i,j))
+ nm = get_NM( *Bij(i,j));
+ else if(Fij(i,j))
+ nm = make_pair<long,long>(Fij(i,j)->N(), Fij(i,j)->M());
+
+ if (( nm.first || nm.second) && verbosity>3)
+ cout << " Block [ " << i << "," << j << " ] = " << nm.first << " x " << nm.second << " cnj = " << cnjij(i,j) << endl;
+ if (nm.first)
+ {
+ if ( Oi(i+1) ==0 ) Oi(i+1)=nm.first;
+ else if(Oi(i+1) != nm.first)
+ {
+ err++;
+ cerr <<"Error Block Matrix, size sub matrix" << i << ","<< j << " n (old) " << Oi(i+1)
+ << " n (new) " << nm.first << endl;
+
+ }
+ }
+ if(nm.second)
+ {
+ if ( Oj(j+1) ==0) Oj(j+1)=nm.second;
+ else if(Oj(j+1) != nm.second)
+ {
+ cerr <<"Error Block Matrix, size sub matrix" << i << ","<< j << " m (old) " << Oj(j+1)
+ << " m (new) " << nm.second << endl;
+ err++;}
+ }
+ }
+
+ if (err) ExecError("Error Block Matrix, size sub matrix");
+ // gestion of zero block ????
+
+ for (int j=0;j<M;++j)
+ { if(verbosity>9) cout << j << " colum size" << Oj(j+1) << endl;
+ if ( Oj(j+1) ==0) {
+ Oj(j+1)=1;
+ if( Oj(j+1) !=1) err++;}
+ }
+ for (int i=0;i<N;++i)
+ {
+ if(verbosity>9) cout << i << " row size" << Oi(i+1) << endl;
+ if ( Oi(i+1) ==0) {
+ Oi(i+1)=1;
+ if( Oi(i+1) !=1) err++;}
+ }
+ if (err) ExecError("Error Block Matrix with 0 line or 0 colomn..");
+
+
+
+
+
+// cout << "Oi = " << Oi << endl;
+// cout << "Oj = " << Oj << endl;
+
+ for (int i=0;i<N;++i)
+ Oi(i+1) += Oi(i);
+ for (int j=0;j<M;++j) // correct 10/01/2007 FH
+ Oj(j+1) += Oj(j);// correct 07/03/2010 FH
+ long n=Oi(N),m=Oj(M);
+ if(verbosity>3)
+ {
+ cout << " Oi = " << Oi << endl;
+ cout << " Oj = " << Oj << endl;
+ }
+ MatriceMorse<R> * amorse =0;
+{
+ map< pair<int,int>, R> Aij;
+ for (int i=0;i<N;++i)
+ for (int j=0;j<M;++j)
+ if (Bij(i,j))
+ {
+ if(verbosity>3)
+ cout << " Add Block S " << i << "," << j << " = at " << Oi(i) << " x " << Oj(j) << " conj = " << cnjij(i,j) << endl;
+ BuildCombMat(Aij,*Bij(i,j),false,Oi(i),Oj(j),cnjij(i,j));
+ }
+ else if (Fij(i,j))
+ {
+ if(verbosity>3)
+ cout << " Add Block F " << i << "," << j << " = at " << Oi(i) << " x " << Oj(j) << endl;
+ BuildCombMat(Aij,*Fij(i,j),Oi(i),Oj(j),R(1.),cnjij(i,j));// BuildCombMat
+ }
+
+
+ amorse= new MatriceMorse<R>(n,m,Aij,false);
+ }
+ if(verbosity)
+ cout << " -- Block Matrix NxM = " << N << "x" << M << " nxm =" <<n<< "x" << m << " nb none zero coef. " << amorse->nbcoef << endl;
++<<<<<<< HEAD
+
+ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(s));
+ if(!init) sparse_mat->init();
++=======
++
++ Matrice_Creuse<R> * sparse_mat =GetAny<Matrice_Creuse<R>* >((*emat)(s));
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ //sparse_mat->pUh=0;
+ // sparse_mat->pVh=0;
+ sparse_mat->A.master(amorse);
+ sparse_mat->typemat=(amorse->n == amorse->m) ? TypeSolveMat(TypeSolveMat::GMRES) : TypeSolveMat(TypeSolveMat::NONESQUARE); // none square matrice (morse)
+
+
+ // cleanning
+ for (int i=0;i<N;++i)
+ for (int j=0;j<M;++j)
+ if(Bij(i,j)) delete Bij(i,j);
+ else if(Fij(i,j)) delete Fij(i,j);
+ if(verbosity>3) { cout << " End Build Blok Matrix : " << endl;}
+
+ return sparse_mat;
+
+}
+
+template<class R>
+class minusMat { public:
+ list<triplet<R,MatriceCreuse<R> *,bool> > *l;
+ minusMat(list<triplet<R,MatriceCreuse<R> *,bool> > *ll):
+ l(new list<triplet<R,MatriceCreuse<R> *,bool> >(*ll) )
+ {
+ typedef typename list<triplet<R,MatriceCreuse<R> *,bool> >::iterator lci;
+ for (lci i= l->begin();i !=l->end();++i)
+ i->first*= R(-1);
+ }
+};
+
+template<class R>
+AnyType mM2L3 (Stack , const AnyType & pp)
+{
+ minusMat<R> mpp(to(GetAny<Matrice_Creuse<R> *>(pp)));
+ return SetAny<minusMat<R> >(mpp);
+}
+/* template<class R>
+AnyType mmM2L3 (Stack , const AnyType & pp)
+{
+ minusMat<R> & p(GetAny<minusMat<R> >(pp));
+ minusMat<R> mpp(p.l);
+ delete p.l;
+ return mpp.l;
+}
+
+template<class R>
+AnyType mmM2L3c (Stack , const AnyType & pp)
+{
+ list<triplet<R,MatriceCreuse<R> *,bool> > * p(GetAny<minusMat<R> >(pp))
+ minusMat<R> mpp(p.l);
+ delete p.l;
+ return mpp.l;
+}
+*/
+template <class R>
+void AddSparseMat()
+{
+// aType tkrp = atype<KN<R> *>();
+ SetMatrix_Op<R>::btype = Dcl_Type<const SetMatrix_Op<R> * >();
+ Dcl_Type<TheDiagMat<R> >();
+ Dcl_Type<TheCoefMat<R> >(); // Add FH oct 2005
+ Dcl_Type< map< pair<int,int>, R> * >(); // Add FH mars 2005
+ Dcl_Type< minusMat<R> >(); // Add FJH mars 2007
+
+ basicForEachType * t_MC=atype< Matrice_Creuse<R>* >();
+// basicForEachType * t_MCt=atype< Matrice_Creuse_Transpose<R> >();
+// basicForEachType * t_lM=atype< list<triplet<R,MatriceCreuse<R> *,bool> > * >();
+// basicForEachType * t_nM=atype< minusMat<R> >();
+
+ basicForEachType * t_MM=atype<map< pair<int,int>, R> * >();
+
+TheOperators->Add("*",
+ new OneBinaryOperator<Op2_mulvirtAv<typename VirtualMatrice<R>::plusAx,Matrice_Creuse<R>*,KN_<R> > >,
+ new OneBinaryOperator<Op2_mulvirtAv<typename VirtualMatrice<R>::plusAtx,Matrice_Creuse_Transpose<R>,KN_<R> > >,
+ new OneBinaryOperator<Op2_mulvirtAv<typename VirtualMatrice<R>::solveAxeqb,Matrice_Creuse_inv<R>,KN_<R> > >
+ );
+
+/*if(0)
+TheOperators->Add("*",
+ new OneBinaryOperator<Op2_mulvirtAv<typename VirtualMatrice<R>::plusAx,Matrice_Creuse<R>*,KN_<R> > >( 0 ,tkrp),
+ new OneBinaryOperator<Op2_mulvirtAv<typename VirtualMatrice<R>::plusAtx,Matrice_Creuse_Transpose<R>,KN_<R> > >( 0 ,tkrp),
+ new OneBinaryOperator<Op2_mulvirtAv<typename VirtualMatrice<R>::solveAxeqb,Matrice_Creuse_inv<R>,KN_<R> > >( 0 ,tkrp)
+ );
+*/
+TheOperators->Add("^", new OneBinaryOperatorA_inv<R>());
+
+// matrix new code FH (Houston 2004)
+ TheOperators->Add("=",
+// new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation::Op*,E_F_StackF0F0>(SetMatrixInterpolation),
++<<<<<<< HEAD
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const Matrix_Prod<R,R>,E_F_StackF0F0>(ProdMat<R,R,R,1>),
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,KN<R> *,E_F_StackF0F0>(DiagMat<R,1>),
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,Matrice_Creuse_Transpose<R>,E_F_StackF0F0>(CopyTrans<R,R,1>),
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,Matrice_Creuse<R>*,E_F_StackF0F0>(CopyMat<R,R,1>) ,
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,KNM<R>*,E_F_StackF0F0>(MatFull2Sparse<R,1>) ,
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,map< pair<int,int>, R> * ,E_F_StackF0F0>(MatMap2Sparse<R,1>) ,
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,list<triplet<R,MatriceCreuse<R> *,bool> > *,E_F_StackF0F0>(CombMat<R,1>) ,
+ new OneOperatorCode<BlockMatrix1<R> >()
++=======
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const Matrix_Prod<R,R>,E_F_StackF0F0>(ProdMat<R,R,R>),
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,KN<R> *,E_F_StackF0F0>(DiagMat<R>),
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,Matrice_Creuse_Transpose<R>,E_F_StackF0F0>(CopyTrans<R,R,1>),
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,Matrice_Creuse<R>*,E_F_StackF0F0>(CopyMat<R,R,1>) ,
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,KNM<R>*,E_F_StackF0F0>(MatFull2Sparse<R>) ,
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,map< pair<int,int>, R> * ,E_F_StackF0F0>(MatMap2Sparse<R>) ,
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,list<triplet<R,MatriceCreuse<R> *,bool> > *,E_F_StackF0F0>(CombMat<R>) ,
++ new OneOperatorCode<BlockMatrix<R> >()
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ );
+
+ TheOperators->Add("<-",
+ new OneOperatorCode<BlockMatrix<R> >(),
+// new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation::Op*,E_F_StackF0F0>(SetMatrixInterpolation),
++<<<<<<< HEAD
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const Matrix_Prod<R,R>,E_F_StackF0F0>(ProdMat<R,R,R,0>),
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,KN<R> *,E_F_StackF0F0>(DiagMat<R,0>) ,
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,Matrice_Creuse_Transpose<R>,E_F_StackF0F0>(CopyTrans<R,R,0>),
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,Matrice_Creuse<R>*,E_F_StackF0F0>(CopyMat<R,R,0>) ,
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,KNM<R>*,E_F_StackF0F0>(MatFull2Sparse<R,0>) ,
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,map< pair<int,int>, R> * ,E_F_StackF0F0>(MatMap2Sparse<R,0>) ,
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,list<triplet<R,MatriceCreuse<R> *,bool> > *,E_F_StackF0F0>(CombMat<R,0>)
++=======
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const Matrix_Prod<R,R>,E_F_StackF0F0>(ProdMat<R,R,R>),
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,KN<R> *,E_F_StackF0F0>(DiagMat<R>) ,
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,Matrice_Creuse_Transpose<R>,E_F_StackF0F0>(CopyTrans<R,R,0>),
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,Matrice_Creuse<R>*,E_F_StackF0F0>(CopyMat<R,R,0>) ,
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,KNM<R>*,E_F_StackF0F0>(MatFull2Sparse<R>) ,
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,map< pair<int,int>, R> * ,E_F_StackF0F0>(MatMap2Sparse<R>) ,
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,list<triplet<R,MatriceCreuse<R> *,bool> > *,E_F_StackF0F0>(CombMat<R>)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+
+ );
+TheOperators->Add("*",
+ new OneBinaryOperator<Op2_pair<Matrix_Prod<R,R>,Matrice_Creuse<R>*,Matrice_Creuse<R>*> >,
+ new OneBinaryOperator<Op2_pair<Matrix_Prod<R,R>,Matrice_Creuse_Transpose<R>,Matrice_Creuse<R>* > >,
+ new OneBinaryOperator<Op2_pair<Matrix_Prod<R,R>,Matrice_Creuse_Transpose<R>,Matrice_Creuse_Transpose<R> > >,
+ new OneBinaryOperator<Op2_pair<Matrix_Prod<R,R>,Matrice_Creuse<R>*,Matrice_Creuse_Transpose<R> > > ,
+ new OneBinaryOperator<Op2_ListCM<R> > ,
+ new OneBinaryOperator<Op2_ListMC<R> > ,
+ new OneBinaryOperator<Op2_ListCMt<R> > ,
+ new OneBinaryOperator<Op2_ListMtC<R> >
+
+ );
+TheOperators->Add("+",
+ new OneBinaryOperator<Op2_ListCMCMadd<R> >,
+ new OneBinaryOperator<Op2_ListCMMadd<R> >,
+ new OneBinaryOperator<Op2_ListMCMadd<R> >,
+// new OneBinaryOperator<Op2_ListCMCMadd<R> >(t_MCt,t_lM),
+// new OneBinaryOperator<Op2_ListCMCMadd<R> >(t_MC,t_lM),
+ new OneBinaryOperator<Op2_ListMMadd<R> >
+
+ );
+ TheOperators->Add("-",
+ new OneUnaryOperator<Op1_LCMd<R> >
+ );
+ Add<Matrice_Creuse<R> *>("n",".",new OneOperator1<long,Matrice_Creuse<R> *>(get_mat_n<R>) );
+ Add<Matrice_Creuse<R> *>("m",".",new OneOperator1<long,Matrice_Creuse<R> *>(get_mat_m<R>) );
+ Add<Matrice_Creuse<R> *>("nbcoef",".",new OneOperator1<long,Matrice_Creuse<R> *>(get_mat_nbcoef<R>) );
+ Add<Matrice_Creuse<R> *>("nnz",".",new OneOperator1<long,Matrice_Creuse<R> *>(get_mat_nbcoef<R>) );
+ Add<Matrice_Creuse<R> *>("size",".",new OneOperator1<long,Matrice_Creuse<R> *>(get_mat_nbcoef<R>) );
+
+
+ Add<Matrice_Creuse<R> *>("diag",".",new OneOperator1<TheDiagMat<R> ,Matrice_Creuse<R> *>(thediag<R>) );
+ Add<Matrice_Creuse<R> *>("coef",".",new OneOperator1<TheCoefMat<R> ,Matrice_Creuse<R> *>(thecoef<R>) );
+
+// Add<Matrice_Creuse<R> *>("setdiag",".",new OneOperator2<long,Matrice_Creuse<R> *,KN<R> *>(set_diag<R>) );
+ TheOperators->Add("=", new OneOperator2<KN<R>*,KN<R>*,TheDiagMat<R> >(get_mat_daig<R>) );
+ TheOperators->Add("=", new OneOperator2<TheDiagMat<R>,TheDiagMat<R>,KN<R>*>(set_mat_daig<R>) );
+
+// TheOperators->Add("=", new OneOperator2<KN<R>*,KN<R>*,TheDiagMat<R> >(get_mat_daig<R>) );
+// TheOperators->Add("=", new OneOperator2<TheDiagMat<R>,TheDiagMat<R>,KN<R>*>(set_mat_daig<R>) );
+// ADD oct 2005
+ TheOperators->Add("=", new OneOperator2<KN<R>*,KN<R>*,TheCoefMat<R> >(get_mat_coef<R>) );
+ TheOperators->Add("=", new OneOperator2<TheCoefMat<R>,TheCoefMat<R>,KN<R>*>(set_mat_coef<R>) );
+
+// TheOperators->Add("=", new OneOperator2<KN<R>*,KN<R>*,TheCoefMat<R> >(get_mat_coef<R>) );
+// TheOperators->Add("=", new OneOperator2<TheCoefMat<R>,TheCoefMat<R>,KN<R>*>(set_mat_coef<R>) );
+
+ Global.Add("set","(",new SetMatrix<R>);
+ //Global.Add("psor","(",new OneOperatorCode<Psor<R> > );
+
+ atype<Matrice_Creuse<R> * >()->Add("(","",new OneOperator3_<R*,Matrice_Creuse<R> *,long,long >(get_elementp2mc<R>));
+
+ atype<KNM<R>*>()->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,KNM<R>*,Inv_KN_long,Inv_KN_long >(Matrixfull2mapIJ_inv<R>));
+ atype<KNM<R>*>()->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,KNM<R>*,KN_<long>,KN_<long> >(Matrixfull2mapIJ<R>));
+
+ atype<outProduct_KN_<R>*>()->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,outProduct_KN_<R>*,Inv_KN_long,Inv_KN_long >(Matrixoutp2mapIJ_inv<R>));
+ atype<outProduct_KN_<R>*>()->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,outProduct_KN_<R>*,KN_<long>,KN_<long> >(Matrixoutp2mapIJ<R>));
+
+
+ TheOperators->Add("=", new SetRawMatformMat<R>);
+
+
+
+ t_MM->Add("(","", new OneOperator3_<map< pair<int,int>, R> *,map< pair<int,int>, R> *,Inv_KN_long,Inv_KN_long >(Matrixmapp2mapIJ1<R>));
+ t_MM->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,map< pair<int,int>, R> *,KN_<long>,KN_<long> >(Matrixmapp2mapIJ<R>));
+
+ t_MC->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,map< pair<int,int>, R> *,Inv_KN_long,Inv_KN_long >(Matrixmapp2mapIJ1<R>,t_MC));
+ t_MC->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,map< pair<int,int>, R> *,KN_<long>,KN_<long> >(Matrixmapp2mapIJ<R>,t_MC));
+
+ //atype<outProduct_KN_<R>*>()->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,map< pair<int,int>, R> *,Inv_KN_long,Inv_KN_long >(Matrixmapp2mapIJ1<R>),t_lM);
+ //atype<outProduct_KN_<R>*>()->Add("(","",new OneOperator3_<map< pair<int,int>, R> *,map< pair<int,int>, R> *,KN_<long>,KN_<long> >(Matrixmapp2mapIJ<R>),t_lM);
+
+
+//map< pair<int,int>, R> * ttt= (0);
+
+ // ;
+ map_type[typeid(map< pair<int,int>, R> *).name()]->AddCast(
+ new E_F1_funcT<map< pair<int,int>, R> *,KNM<R>* >(Matrixfull2map<R>),
+ new E_F1_funcT<map< pair<int,int>, R> *,outProduct_KN_<R>* >(Matrixoutp2map<R>),
+ new E_F1_funcT<map< pair<int,int>, R> *,Matrice_Creuse<R>* >(MatriceCreuse2map<R>)
+
+ );
+
+ map_type[typeid(list<triplet<R,MatriceCreuse<R> *,bool> > *).name()]->AddCast(
+ new E_F1_funcT<list<triplet<R,MatriceCreuse<R> *,bool> > *,Matrice_Creuse<R>* >(M2L3<R>),
+ new E_F1_funcT<list<triplet<R,MatriceCreuse<R> *,bool> > *,Matrice_Creuse_Transpose<R> >(tM2L3<R>),
+ new E_F1_funcT<list<triplet<R,MatriceCreuse<R> *,bool> > *,minusMat<R> >(mM2L3<R> )
+ );
+ /*
+ map_type[typeid(minusMat<R>).name()]->AddCast(
+ new E_F1_funcT<minusMat<R>,list<triplet<R,MatriceCreuse<R> *,bool> > * >(mmM2L3<R> )
+ //new E_F1_funcT<minusMat<R>,Matrice_Creuse<R>* > * >(mmM2L3c<R> ),
+ //new E_F1_funcT<minusMat<R>,Matrice_Creuse_Transpose<R> > * >(mmM2L3ct<R> )
+
+ );
+*/
+
+
+
+
+// --- end
+}
+
+
+//extern Map_type_of_map map_type_of_map ; // to store te type
+//extern Map_type_of_map map_pair_of_type ; // to store te type
+extern int lineno();
+class PrintErrorCompile : public OneOperator {
+ public:
+ const char * cmm;
+ E_F0 * code(const basicAC_F0 & ) const
+ { ErrorCompile(cmm,lineno());
+ return 0;}
+ PrintErrorCompile(const char * cc): OneOperator(map_type[typeid(R).name()]),cmm(cc){}
+
+};
+
+class PrintErrorCompileIM : public E_F0info { public:
+ typedef double Result;
+ static E_F0 * f(const basicAC_F0 & args)
+ {
+ lgerror("\n\n *** change interplotematrix in interpole.\n *** Bad name in previous version,\n *** sorry FH.\n\n");
+ return 0; }
+ static ArrayOfaType typeargs() {return ArrayOfaType(true);}
+ operator aType () const { return atype<double>();}
+
+};
+
+// the 2 default sparse solver double and complex
+DefSparseSolver<double>::SparseMatSolver SparseMatSolver_R ; ;
+DefSparseSolver<Complex>::SparseMatSolver SparseMatSolver_C;
+DefSparseSolverSym<double>::SparseMatSolver SparseMatSolverSym_R ; ;
+DefSparseSolverSym<Complex>::SparseMatSolver SparseMatSolverSym_C;
+// the default probleme solver
+TypeSolveMat::TSolveMat TypeSolveMatdefaultvalue=TypeSolveMat::defaultvalue;
+
+bool SetDefault()
+{
+ if(verbosity>1)
+ cout << " SetDefault sparse to default" << endl;
+ DefSparseSolver<double>::solver =SparseMatSolver_R;
+ DefSparseSolver<Complex>::solver =SparseMatSolver_C;
+ DefSparseSolverSym<double>::solver =SparseMatSolverSym_R;
+ DefSparseSolverSym<Complex>::solver =SparseMatSolverSym_C;
+ TypeSolveMat::defaultvalue =TypeSolveMat::SparseSolver;
+ return true;
+}
+
+
+bool SparseDefault()
+{
+ return TypeSolveMat::SparseSolver== TypeSolveMat::defaultvalue;
+}
+
+bool Have_UMFPACK_=false;
+bool Have_UMFPACK() { return Have_UMFPACK_;}
+//OneOperator0<bool> *TheSetDefaultSolver=0; // to change the SetDefaultSolver
+void init_lgmat()
+
+{
+ SparseMatSolver_R= DefSparseSolver<double>::solver;
+ SparseMatSolver_C= DefSparseSolver<Complex>::solver;
+ SparseMatSolverSym_R= DefSparseSolverSym<double>::solver;
+ SparseMatSolverSym_C= DefSparseSolverSym<Complex>::solver;
+
+
+ Dcl_Type<const MatrixInterpolation<pfes>::Op *>();
+ Dcl_Type<const MatrixInterpolation<pfes3>::Op *>();
+
+ map_type_of_map[make_pair(atype<Matrice_Creuse<double>* >(),atype<double*>())]=atype<Matrice_Creuse<double> *>();
+ map_type_of_map[make_pair(atype<Matrice_Creuse<double>* >(),atype<Complex*>())]=atype<Matrice_Creuse<Complex> *>();
+ AddSparseMat<double>();
+ AddSparseMat<Complex>();
+
+ Add<const MatrixInterpolation<pfes>::Op *>("<-","(", new MatrixInterpolation<pfes>);
+ Add<const MatrixInterpolation<pfes>::Op *>("<-","(", new MatrixInterpolation<pfes>(1));
+ Add<const MatrixInterpolation<pfes>::Op *>("<-","(", new MatrixInterpolation<pfes3>);
+ Add<const MatrixInterpolation<pfes>::Op *>("<-","(", new MatrixInterpolation<pfes3>(1,1));
+
+ Dcl_Type<const RestrictArray<pfes>::Op *>();
+ Dcl_Type<const RestrictArray<pfes3>::Op *>();
+ // Add<const RestrictArray<pfes>::Op *>("<-","(", new RestrictArray<pfes>);
+ // Add<const RestrictArray<pfes3>::Op *>("<-","(", new RestrictArray<pfes3>);
+
+ Global.Add("restrict","(",new RestrictArray<pfes>);// FH Jan 2014
+ Global.Add("restrict","(",new RestrictArray<pfes3>);// FH Jan 2014
+
+ TheOperators->Add("=",
+ new OneOperator2_<KN<long>*,KN<long>*,const RestrictArray<pfes>::Op*,E_F_StackF0F0>(SetRestrict<pfes,1>),
+ new OneOperator2_<KN<long>*,KN<long>*,const RestrictArray<pfes3>::Op*,E_F_StackF0F0>(SetRestrict<pfes3,1>)
+ );
+ TheOperators->Add("<-",
+ new OneOperator2_<KN<long>*,KN<long>*,const RestrictArray<pfes>::Op*,E_F_StackF0F0>(SetRestrict<pfes,0>),
+ new OneOperator2_<KN<long>*,KN<long>*,const RestrictArray<pfes3>::Op*,E_F_StackF0F0>(SetRestrict<pfes3,0>)
+ );
+
+
+ Global.Add("interpolate","(",new MatrixInterpolation<pfes>);
+ Global.Add("interpolate","(",new MatrixInterpolation<pfes>(1));
+ Global.Add("interpolate","(",new MatrixInterpolation<pfes3>);
+ Global.Add("interpolate","(",new MatrixInterpolation<pfes3>(1,1));
+ Global.Add("interplotematrix","(",new OneOperatorCode<PrintErrorCompileIM>);
+ zzzfff->Add("mapmatrix",atype<map< pair<int,int>, double> *>());
+ zzzfff->Add("Cmapmatrix",atype<map< pair<int,int>, Complex> *>()); // a voir
+
+ Global.Add("defaulttoGMRES","(",new OneOperator0<bool>(SetGMRES));
+ Global.Add("defaulttoCG","(",new OneOperator0<bool>(SetCG));
+ Global.New("havesparsesolver",CVariable<bool>(SparseDefault));
+ Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefault));
+
+ Dcl_Type< Resize<Matrice_Creuse<double> > > ();
+
+ Add<Matrice_Creuse<double> *>("resize",".",new OneOperator1< Resize<Matrice_Creuse<double> >,Matrice_Creuse<double> *>(to_Resize));
+ Add<Resize<Matrice_Creuse<double> > >("(","",new OneOperator3_<Matrice_Creuse<double> *,Resize<Matrice_Creuse<double> > , long, long >(resize2));
+ // add missing in
+ Dcl_Type< Resize<Matrice_Creuse<Complex> > > ();
+ Add<Matrice_Creuse<Complex> *>("resize",".",new OneOperator1< Resize<Matrice_Creuse<Complex> >,Matrice_Creuse<Complex> *>(to_Resize));
+ Add<Resize<Matrice_Creuse<Complex> > >("(","",new OneOperator3_<Matrice_Creuse<Complex> *,Resize<Matrice_Creuse<Complex> > , long, long >(resize2));
+
+
+ //Global.Add("defaultsolver","(",new OneOperator0<bool>(SetDefaultSolver));
+
+ // pour compatibiliter
+
+ TheOperators->Add("=",
++<<<<<<< HEAD
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation<pfes>::Op*,E_F_StackF0F0>(SetMatrixInterpolation<1>),
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation<pfes3>::Op*,E_F_StackF0F0>(SetMatrixInterpolation3<1>)
++=======
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation<pfes>::Op*,E_F_StackF0F0>(SetMatrixInterpolation),
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation<pfes3>::Op*,E_F_StackF0F0>(SetMatrixInterpolation3)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ );
+
+
+ TheOperators->Add("<-",
++<<<<<<< HEAD
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation<pfes>::Op*,E_F_StackF0F0>(SetMatrixInterpolation<0>),
+ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation<pfes3>::Op*,E_F_StackF0F0>(SetMatrixInterpolation3<0>)
++=======
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation<pfes>::Op*,E_F_StackF0F0>(SetMatrixInterpolation),
++ new OneOperator2_<Matrice_Creuse<R>*,Matrice_Creuse<R>*,const MatrixInterpolation<pfes3>::Op*,E_F_StackF0F0>(SetMatrixInterpolation3)
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ );
+ // construction of complex matrix form a double matrix
+ TheOperators->Add("=", new OneOperator2_<Matrice_Creuse<Complex>*,Matrice_Creuse<Complex>*,Matrice_Creuse<double>*,E_F_StackF0F0>(CopyMat<R,Complex,1>)
+ );
+
+ TheOperators->Add("<-", new OneOperator2_<Matrice_Creuse<Complex>*,Matrice_Creuse<Complex>*,Matrice_Creuse<double>*,E_F_StackF0F0>(CopyMat<R,Complex,0>)
+ );
+ // Global.Add("imag","(",new OneOperator1_<double,Complex>(Imag));
+ // Add<double>("<--","(",new OneOperator1_<double,Complex>(Real));
+ Dcl_Type<Matrice_Creuse_C2R>();
+ Add<Matrice_Creuse<Complex>*>("re",".",new OneOperator1<Matrice_Creuse_C2R ,Matrice_Creuse<Complex>* >(Build_Matrice_Creuse_C2R<0> ));
+ Add<Matrice_Creuse<Complex>*>("im",".",new OneOperator1<Matrice_Creuse_C2R ,Matrice_Creuse<Complex>* >(Build_Matrice_Creuse_C2R<1> ));
+ // construction of complex matrix form a double matrix
++<<<<<<< HEAD
+ TheOperators->Add("=", new OneOperator2_<Matrice_Creuse<Complex>*,Matrice_Creuse<double>*,Matrice_Creuse_C2R,E_F_StackF0F0>(CopyMatC2R<1>));
+
+ TheOperators->Add("<-", new OneOperator2_<Matrice_Creuse<Complex>*,Matrice_Creuse<double>*,Matrice_Creuse_C2R,E_F_StackF0F0>(CopyMatC2R<0>));
++=======
++ TheOperators->Add("=", new OneOperator2_<Matrice_Creuse<double>*,Matrice_Creuse<double>*,Matrice_Creuse_C2R,E_F_StackF0F0>(CopyMatC2R<1>));
++
++ TheOperators->Add("<-", new OneOperator2_<Matrice_Creuse<double>*,Matrice_Creuse<double>*,Matrice_Creuse_C2R,E_F_StackF0F0>(CopyMatC2R<0>));
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+ extern void init_UMFPack_solver();
+ init_UMFPack_solver();
+}
+
+int Data_Sparse_Solver_version() { return VDATASPARSESOLVER;}
diff --cc src/fflib/load.cpp.orig
index d6c5edf,0000000..a0e7223
mode 100644,000000..100644
--- a/src/fflib/load.cpp.orig
+++ b/src/fflib/load.cpp.orig
@@@ -1,168 -1,0 +1,269 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include "config-wrapper.h" // needed for HAVE_DLFCN_H
+
+#include <iostream>
+#include <map>
+#include <set>
+#include "AFunction.hpp"
+#include "environment.hpp"
+#include "InitFunct.hpp"
+using namespace std;
+#include "lex.hpp"
+#define LOAD 1
+#if defined(__INTEL__) || defined(__MWERKS__) || !defined(HAVE_DLFCN_H)
+#undef LOAD
+#endif
+
+#ifdef LOAD
+#include <dlfcn.h>
+#elif WIN32
+#include <windows.h>
+#endif
+
+#include "ffapi.hpp"
+
+set<string> SetLoadFile;
+
+bool load(string ss)
+{
++<<<<<<< HEAD
+
+ // FFCS - do not allow potentially dangerous commands from remote anonymous clients
+
++=======
++
++ // FFCS - do not allow potentially dangerous commands from remote anonymous clients
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if(ffapi::protectedservermode() && (ss=="pipe" || ss=="shell")){
+ cerr<<"library "<<ss<<" not allowed in server environment"<<endl;
+ CompileError("Error load");
+ return 0;
+ }
+
+ if(SetLoadFile.find(ss) != SetLoadFile.end())
+ {
+ if( (mpirank==0)&& verbosity)
+ cout << " (already loaded : " << ss << " ) " ;
+ }
++<<<<<<< HEAD
+ else
+ {
+ SetLoadFile.insert(ss);
+ bool ret=false;
+ void * handle = 0;
+ const int /*nbprefix=2,*/nbsuffix=2;
+ list<string> prefix(ffenvironment["loadpath"]);
+ if(prefix.empty())
+ {
+ prefix.push_back("");
+ prefix.push_back("./");
+ }
+
+ string suffix[nbsuffix] ;
+
+ suffix[0]="";
+ suffix[1]=".so";
+#ifdef __APPLE__
+ suffix[1]=".dylib";
+#endif
+#ifdef WIN32
+ suffix[1]=".dll";
+#endif
+ int j;
+ for (list<string>::const_iterator i= prefix.begin();i !=prefix.end();++i)
+ for ( j= 0;j< nbsuffix;++j)
+ {
+ string s= *i+ss+suffix[j];
+
+#ifdef LOAD
+ handle = dlopen (s.c_str(), RTLD_LAZY );
+ if (verbosity>9) cout << " test dlopen(" << s << ")= " << handle << endl;
+
+ // FFCS - 20/9/11 - print explanation for load errors
+ if(verbosity>9 && !handle){
+ cout<<"load error was: "<<dlerror()<<endl;
+ }
+
+ ret= handle !=0;
+ if ( ret )
+ {
+ if(verbosity && (mpirank ==0))
+ cout << " (load: dlopen " << s << " " << handle << ") ";
+ callInitsFunct() ;
+ return handle;
+ }
+
+#elif WIN32
+ {
+ HINSTANCE mod= LoadLibrary(s.c_str());
+ if (verbosity>9) cout << " test LoadLibrary(" << s << ")= " << mod << endl;
+ if(mod==0)
+ {
+ DWORD merr = GetLastError();
+ if(verbosity>19)
+ cerr << "\n try loadLibary : " <<s << "\n \t fail : " << merr << endl;
+ }
+ else
+ {
+ if(verbosity&& (mpirank ==0))
+ cout << "(load: loadLibary " << s << " = " << handle << ")";
+ callInitsFunct() ;
+ return mod;
+ }
+ }
+#else
+ if(mpirank ==0)
++=======
++ else
++ {
++ SetLoadFile.insert(ss);
++ bool ret=false;
++ void * handle = 0;
++ const int /*nbprefix=2,*/nbsuffix=2;
++ list<string> prefix(ffenvironment["loadpath"]);
++ if(prefix.empty())
++ {
++ prefix.push_back("");
++ prefix.push_back("./");
++ }
++
++ string suffix[nbsuffix] ;
++
++ suffix[0]="";
++ suffix[1]=".so";
++#ifdef __APPLE__
++ suffix[1]=".dylib";
++#endif
++#ifdef WIN32
++ suffix[1]=".dll";
++#endif
++ int j;
++ for (list<string>::const_iterator i= prefix.begin();i !=prefix.end();++i)
++ for ( j= 0;j< nbsuffix;++j)
++ {
++ string s= *i+ss+suffix[j];
++
++#ifdef LOAD
++ handle = dlopen (s.c_str(), RTLD_LAZY );
++ if (verbosity>9) cout << " test dlopen(" << s << ")= " << handle << endl;
++
++ // FFCS - 20/9/11 - print explanation for load errors
++ if(verbosity>9 && !handle){
++ cout<<"load error was: "<<dlerror()<<endl;
++ }
++
++ ret= handle !=0;
++ if ( ret )
++ {
++ if(verbosity && (mpirank ==0))
++ cout << " (load: dlopen " << s << " " << handle << ") ";
++ callInitsFunct() ;
++ return handle;
++ }
++
++#elif WIN32
++ {
++ HINSTANCE mod= LoadLibrary(s.c_str());
++ if (verbosity>9) cout << " test LoadLibrary(" << s << ")= " << mod << endl;
++ if(mod==0)
++ {
++ DWORD merr = GetLastError();
++ if(verbosity>19)
++ cerr << "\n try loadLibary : " <<s << "\n \t fail : " << merr << endl;
++ }
++ else
++ {
++ if(verbosity&& (mpirank ==0))
++ cout << "(load: loadLibary " << s << " = " << handle << ")";
++ callInitsFunct() ;
++ return mod;
++ }
++ }
++#else
++ if((mpirank ==0))
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ {
+ cout << "------------------------------------ \n" ;
+ cout << " load: sorry no dlopen on this system " << s << " \n" ;
+ cout << "------------------------------------ \n" ;
+ }
++<<<<<<< HEAD
+ CompileError("Error load");
+ return 0;
+#endif
+ }
+ if(mpirank ==0)
+ {
+ cerr << "\nload error : " << ss << "\n \t fail : " << endl;
+ char *error=0;
+#ifndef WIN32
+#ifdef LOAD
+ error= dlerror();
+ if ( error != NULL) {
+ cerr << " dlerror : " << error << endl;
+ }
+#endif
+#endif
+ cerr << "list prefix: " ;
+ for (list<string>::const_iterator i= prefix.begin();i !=prefix.end();++i)
+ cerr <<"'"<<*i<<"' ";
+ cerr << "list suffix : '"<< suffix[0] << "' , '" << suffix[1] << "' ";
+
+ cerr << endl;
+ }
+ CompileError("Error load");
+ }
++=======
++ CompileError("Error load");
++ return 0;
++#endif
++ }
++ if(mpirank ==0)
++ {
++ cerr << "\nload error : " << ss << "\n \t fail : " << endl;
++ char *error;
++#ifndef WIN32
++ if ((error = dlerror()) != NULL) {
++ fprintf(stderr, "%s\n", error);
++ }
++#endif
++ cerr << "list prefix: " ;
++ for (list<string>::const_iterator i= prefix.begin();i !=prefix.end();++i)
++ cerr <<"'"<<*i<<"' ";
++ cerr << "list suffix : '"<< suffix[0] << "' , '" << suffix[1] << "' ";
++
++ cerr << endl;
++ }
++ CompileError("Error load");
++ }
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ return 0 ;
+}
+
diff --cc src/fflib/problem.cpp.orig
index 04bda8d,0000000..8e1b257
mode 100644,000000..100644
--- a/src/fflib/problem.cpp.orig
+++ b/src/fflib/problem.cpp.orig
@@@ -1,6137 -1,0 +1,6159 @@@
+// -*- Mode : c++ -*-
+//
+// SUMMARY :
+// USAGE :
+// ORG :
+// AUTHOR : Frederic Hecht
+// E-MAIL : hecht at ann.jussieu.fr
+//
+
+/*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+#include <iostream>
+using namespace std;
+
+#include "rgraph.hpp"
+#include "error.hpp"
+#include "AFunction.hpp"
+
+//#include "lex.hpp"
+#include "MatriceCreuse_tpl.hpp"
+#include "Mesh3dn.hpp"
+#include "MeshPoint.hpp"
+#include "lgfem.hpp"
+#include "lgmesh3.hpp"
+#include "lgsolver.hpp"
+#include "problem.hpp"
+#include <set>
+
+
+
+basicAC_F0::name_and_type CDomainOfIntegration::name_param[]= {
+ { "qft", &typeid(const Fem2D::QuadratureFormular *)},
+ { "qfe", &typeid(const Fem2D::QuadratureFormular1d *)},
+ { "qforder",&typeid(long)},
+ { "qfnbpT",&typeid(long)},
+ { "qfnbpE",&typeid(long)},
+ { "optimize",&typeid(bool)},
+ { "binside",&typeid(double)},
+ { "mortar",&typeid(bool)},
+ { "qfV", &typeid(const Fem2D::GQuadratureFormular<R3> *)},
+ { "levelset",&typeid(double)}
+
+};
+
+
+basicAC_F0::name_and_type Problem::name_param[]= {
+{ "save",&typeid(string* )},
+{ "cadna",&typeid(KN<double>*)},
+{ "bmat",&typeid(Matrice_Creuse<R>* )},
+LIST_NAME_PARM_MAT
+/*
+ { "init", &typeid(bool)},
+ { "solver", &typeid(TypeSolveMat*)},
+ { "eps", &typeid(double) },
+ { "precon",&typeid(Polymorphic*)},
+ { "dimKrylov",&typeid(long)},
+ { "bmat",&typeid(Matrice_Creuse<R>* )},
+ { "tgv",&typeid(double )},
+ { "strategy",&typeid(long )},
+ { "save",&typeid(string* )},
+ { "cadna",&typeid(KN<double>*)},
+ { "tolpivot", &typeid(double)},
+ { "tolpivotsym", &typeid(double)},
+ { "nbiter", &typeid(long)}, // 12
+ { "paramint",&typeid(KN_<long>)}, // Add J. Morice 02/09
+ { "paramdouble",&typeid(KN_<double>)},
+ { "paramstring",&typeid(string *)},
+ { "permrow",&typeid(KN_<long>)},
+ { "permcol",&typeid(KN_<long>)},
+ { "fileparamint",&typeid(string*)}, // Add J. Morice 02/09
+ { "fileparamdouble",&typeid(string*)},
+ { "fileparamstring",&typeid(string* )},
+ { "filepermrow",&typeid(string*)},
+ { "filepermcol",&typeid(string*)} //22
+ */
+};
+
+struct pair_stack_double
+{
+ Stack first;
+ double *second;
+ pair_stack_double(Stack ss,double* bb) : first(ss),second(bb) {};
+
+};
+
+namespace Fem2D {
+
+ void Expandsetoflab(Stack stack,const CDomainOfIntegration & di,set<int> & setoflab,bool &all);
+ void Expandsetoflab(Stack stack,const BC_set & bc,set<long> & setoflab);
+
+void Check(const Opera &Op,int N,int M)
+ {
+ int err=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ if (ii.first <0 || ii.first >= M) err++;
+ if (jj.first <0 || jj.first >= N) err++;
+
+ }
+ if (err) {
+ cout << "Check Bilinear Operator" << N << " " << M << endl;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ cout << " + " << jj.first << " " << jj.second << "*" << ii.first << " " << ii.second << endl;
+ }
+ ExecError("Check BilinearOperator N M");
+ }
+ }
+ void Check(const BC_set * bc,int N)
+ {
+ int err=0;
+ int kk=bc->bc.size();
+ for (int k=0;k<kk;k++)
+ {
+ pair<int,Expression> xx=bc->bc[k];
+ if (xx.first >= N) {
+ err++;
+ cerr << " Sorry : just " << N << " componant in FE space \n"
+ << " and Boundary condition refere to " << xx.first << "+1 componant " << endl;
+ }
+ }
+ if (err)
+ ExecError("Incompatibility beetwen boundary condition and FE space");
+ }
+
+ void Check(const Ftest * fl,int N)
+ {
+ assert(fl);
+ int err=0;
+ Ftest::const_iterator kk= fl->v.end(),k;
+ int ii=0;
+ for (k=fl->v.begin();k<kk;k++)
+ {
+ ii++;
+ int j=k->first.first;
+ if ( j >= N) {
+ err++;
+ cerr << " Sorry : just " << N << " componant in FE space \n"
+ << " and linear var form refere to " << j << "+1 componant (part " << ii << ")" << endl;
+ }
+ }
+ if (err)
+ ExecError("Incompatibility beetwen linear varf and FE space");
+ }
+ //---------------------------------------------------------------------------------------
+ template<class R>
+ void Element_OpVF(MatriceElementairePleine<R,FESpace3> & mat,
+ const FElement3 & Ku,const FElement3 & KKu,
+ const FElement3 & Kv,const FElement3 & KKv,
+ double * p,int ie,int iie, int label,void *bstack,R3 *B)
+ {
+ ffassert(0);
+ }
+
+ template<class R>
+ void Element_OpVF(MatriceElementairePleine<R,FESpace> & mat,
+ const FElement & Ku,const FElement & KKu,
+ const FElement & Kv,const FElement & KKv,
+ double * p,int ie,int iie, int label,void *bstack,R2 *B)
+ {
+ ffassert(B==0);
+ pair_stack_double * bs=static_cast<pair_stack_double *>(bstack);
+ Stack stack= bs->first;
+ double binside = *bs->second; // truc FH pour fluide de grad2 (decentrage bizard)
+ assert(mat.onFace); // Finite Volume or discontinous Galerkine
+ assert(ie>=0 && ie < 3); // int on edge
+ MeshPoint mp= *MeshPointStack(stack);
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+
+ bool same = &Ku == & Kv;
+ assert(same);
+ const Triangle & T = Ku.T;
+ int nTonEdge = &Ku == &KKu ? 1 : 2;
+ double cmean = 1./nTonEdge;
+
+ throwassert(&T == &Kv.T);
+ // const QuadratureFormular & FI = mat.FIT;
+ const QuadratureFormular1d & FIb = mat.FIE;
+ long npi;
+ R *a=mat.a;
+ R *pa=a;
+ long i,j;
+ long n= mat.n,m=mat.m,nx=n*m;
+ assert(nx<=mat.lga);
+ long N= Kv.N;
+ long M= Ku.N;
+
+ long mu=Ku.NbDoF();
+ long mmu=KKu.NbDoF();
+ long nv=Kv.NbDoF();
+ long nnv=Kv.NbDoF();
+ assert(mu==mmu && nv == nnv) ;
+
+
+
+ const Opera &Op(*mat.bilinearform);
+ bool classoptm = copt && Op.optiexpK;
+ // if (Ku.number<1 && verbosity/100 && verbosity % 10 == 2)
+ if (Ku.number<1 && ( verbosity > 1 ) )
+ cout << "Element_OpVF P: copt = " << copt << " " << classoptm << " binside (For FH) =" << binside <<endl;
+
+
+ KN<bool> Dop(last_operatortype); // sinon ca plate bizarre
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ //assert(lastop<=3);
+ int lffv = nv*N*last_operatortype;
+ int lffu = mu*M*last_operatortype;
+ int loffset = same ? 0 : (nv+nnv)*N*last_operatortype;
+
+ RNMK_ fv(p,nv,N,lastop); // the value for basic fonction in K
+ RNMK_ ffv(p + lffv ,nnv,N,lastop); // the value for basic fonction in KK
+ RNMK_ fu( (double*) fv + loffset ,mu,M,lastop); // the value for basic fonction
+ RNMK_ ffu( (double*) fu + lffu ,mmu,M,lastop); // the value for basic fonction
+
+ R2 E=T.Edge(ie);
+ double le = sqrt((E,E));
+ R2 PA(TriangleHat[VerticesOfTriangularEdge[ie][0]]),
+ PB(TriangleHat[VerticesOfTriangularEdge[ie][1]]),
+ PC(TriangleHat[OppositeVertex[ie]]);
+ // warning the to edge are in opposite sens
+ R2 PP_A(TriangleHat[VerticesOfTriangularEdge[iie][1]]),
+ PP_B(TriangleHat[VerticesOfTriangularEdge[iie][0]]),
+ PP_C(TriangleHat[OppositeVertex[ie]]);
+ R2 Normal(E.perp()/-le);
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+ pa =a;
+ QuadratureFormular1dPoint pi( FIb[npi]);
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+ R2 Pt(PA*sa+PB*sb ); //
+ R2 PP_t(PP_A*sa+PP_B*sb ); //
+ if (binside) {
+ Pt = (1-binside)*Pt + binside*PC;
+ PP_t = (1-binside)*PP_t + binside*PP_C; }
+ Ku.BF(Dop,Pt,fu);
+ KKu.BF(Dop,PP_t,ffu);
+ if (!same) { Kv.BF(Dop,Pt,fv); KKv.BF(Dop,PP_t,ffv); }
+ // int label=-999999; // a passer en argument
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv,label, Normal,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+
+ for ( i=0; i<n; i++ )
+ {
+ int ik= mat.nik[i];
+ int ikk=mat.nikk[i];
+
+ RNM_ wi(fv(Max(ik,0),'.','.'));
+ RNM_ wwi(ffv(Max(ikk,0),'.','.'));
+
+ for ( j=0; j<m; j++,pa++ )
+ {
+ int jk= mat.njk[j];
+ int jkk=mat.njkk[j];
+
+ RNM_ wj(fu(Max(jk,0),'.','.'));
+ RNM_ wwj(ffu(Max(jkk,0),'.','.'));
+
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ int iis = ii.second, jjs=jj.second;
+
+ int iicase = iis / last_operatortype;
+ int jjcase = jjs / last_operatortype;
+
+ iis %= last_operatortype;
+ jjs %= last_operatortype;
+ double w_i=0,w_j=0,ww_i=0,ww_j=0;
+
+ if(ik>=0) w_i = wi(ii.first,iis );
+ if(jk>=0) w_j = wj(jj.first,jjs );
+
+ if( iicase>0 && ikk>=0) ww_i = wwi(ii.first,iis );
+ if( jjcase>0 && jkk>=0) ww_j = wwj(jj.first,jjs );
+
+
+ if (iicase==Code_Jump) w_i = ww_i-w_i; // jump
+ else if (iicase==Code_Mean) {
+
+ w_i = cmean* (w_i + ww_i );} // average
+ else if (iicase==Code_OtherSide) w_i = ww_i; // valeur de autre cote
+
+ if (jjcase==Code_Jump) w_j = ww_j-w_j; // jump
+ else if (jjcase==Code_Mean) w_j = cmean* (w_j +ww_j ); // average
+ else if (jjcase==Code_OtherSide) w_j = ww_j; // valeur de l'autre cote
+
+ // R ccc = GetAny<R>(ll.second.eval(stack));
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( ccc != cc) {
+ cerr << cc << " != " << ccc << " => ";
+ cerr << "Sorry error in Optimization (b) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ *pa += coef * ccc * w_i*w_j;
+ }
+ }
+ }
+ // else pa += m;
+ }
+
+
+ pa=a;
+ if ( (verbosity > 9999) ||( (verbosity > 55) && (Ku.number <=0 || KKu.number <=0 ))) {
+ cout <<endl << " edge between " << Ku.number << " , " << KKu.number << " = "<< T[0] << ", " << T[1] << ", " << T[2] << " " << nx << endl;
+ cout << " K u, uu = " << Ku.number << " " << KKu.number << " " << " K v, vv = " << Kv.number << " " << KKv.number << " " <<endl;
+ for (int i=0;i<n;i++)
+ {
+ cout << setw(2) << i << setw(4) << mat.ni[i] << setw(4) << mat.nik[i] << setw(4) << mat.nikk[i] << " :";
+ for (int j=0;j<m;j++)
+ cout << setw(5) << (*pa++) << " ";
+ cout << endl;
+ } }
+
+ *MeshPointStack(stack) = mp;
+ }
+
+ //--------------------------------------------------------------------------------------
+
+// --------- FH 120105
+ template<class R>
+ void AssembleBilinearForm(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<R> & A, const FormBilinear * b )
+
+ {
+ /*FH: case ..in 2D
+ in varf ...
+ standard case ..
+ */
+
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(stack);
+ bool sptrclean=true;
+ const CDomainOfIntegration & di= *b->di;
+ const Mesh * pThdi = GetAny<pmesh>( (* di.Th)(stack));
+ if ( pThdi != &Th || &Uh.Th !=&Th || &Vh.Th !=&Th) {
+ cout << " --Use matrix formulation ---" << endl;
+ ExecError("No way to compute bilinear form with integrale of on mesh \n"
+ " test or unkown function defined on an other mesh! sorry to hard. ");
+ }
+ SHOWVERB(cout << " FormBilinear " << endl);
+ MatriceElementaireSymetrique<R,FESpace> *mates =0;
+ MatriceElementairePleine<R,FESpace> *matep =0;
+ const bool useopt=di.UseOpt(stack);
+ double binside=di.binside(stack);
+
+ //const vector<Expression> & what(di.what);
+ CDomainOfIntegration::typeofkind kind = di.kind;
+ set<int> setoflab;
+ bool all=true;
+
+ const Mesh & ThI = Th;//* GetAny<pmesh>( (* di.Th)(stack));
+ bool sameMesh = &ThI == &Vh.Th && &ThI == &Uh.Th;
+
+// const QuadratureFormular1d & FIE = di.FIE(stack);
+// const QuadratureFormular & FIT = di.FIT(stack);
+ const QuadratureFormular1d & FIEo = di.FIE(stack);
+ const QuadratureFormular & FITo = di.FIT(stack);
+ // const GQuadratureFormular<R3> & FIVo = di.FIV(stack);
+ // to change the quadrature on element ... may 2014 FH ..
+ QuadratureFormular1d FIE(FIEo,3);
+ QuadratureFormular FIT(FITo,3);
+ // GQuadratureFormular<R3> FIV(FIVo,3);
+
+ bool VF=b->VF(); // finite Volume or discontinous Galerkin
+ if (verbosity>2) cout << " -- discontinous Galerkin =" << VF << " size of Mat =" << A.size()<< " Bytes\n";
+ if (verbosity>3)
+ {
+ if (CDomainOfIntegration::int1d==kind) cout << " -- boundary int border ( nQP: "<< FIE.n << ") ," ;
+ else if (CDomainOfIntegration::intalledges==kind) cout << " -- boundary int all edges ( nQP: "<< FIE.n << ")," ;
+ else if (CDomainOfIntegration::intallVFedges==kind) cout << " -- boundary int all VF edges nQP: ("<< FIE.n << ")," ;
+ else cout << " -- int (nQP: "<< FIT.n << " ) in " ;
+ }
+ //if(di.islevelset()) InternalError("So no levelset integration type on this case (6)");
+ if(di.islevelset() && ( (CDomainOfIntegration::int1d!=kind) && (CDomainOfIntegration::int2d!=kind) ) )
+ InternalError("So no levelset integration type on no int1d case (6)");
+
+ Expandsetoflab(stack,di, setoflab,all);
+ /*
+ for (size_t i=0;i<what.size();i++)
+ {
+ long lab = GetAny<long>( (*what[i])(stack));
+ setoflab.insert(lab);
+ if ( verbosity>3) cout << lab << " ";
+ all=false;
+ }*/
+ if (verbosity>3) cout <<" Optimized = "<< useopt << ", ";
+ const E_F0 & optiexp0=*b->b->optiexp0;
+
+ int n_where_in_stack_opt=b->b->where_in_stack_opt.size();
+ R** where_in_stack =0;
+ if (n_where_in_stack_opt && useopt)
+ where_in_stack = new R * [n_where_in_stack_opt];
+ if (where_in_stack)
+ {
+ assert(b->b->v.size()==(size_t) n_where_in_stack_opt);
+ for (int i=0;i<n_where_in_stack_opt;i++)
+ {
+ int offset=b->b->where_in_stack_opt[i];
+ assert(offset>10);
+ where_in_stack[i]= static_cast<R *>(static_cast<void *>((char*)stack+offset));
+ *(where_in_stack[i])=0;
+ }
+
+
+ if(&optiexp0)
+ optiexp0(stack);
+ KN<bool> ok(b->b->v.size());
+ { // remove the zero coef in the liste
+ // R zero=R();
+ int il=0;
+ for (BilinearOperator::const_iterator l=b->b->v.begin();l!=b->b->v.end();l++,il++)
+ ok[il] = ! (b->b->mesh_indep_stack_opt[il] && ( Fem2D::norm(*(where_in_stack[il])) < 1e-100 ) );
+ }
+ BilinearOperator b_nozer(*b->b,ok);
+ if (verbosity % 10 > 3 )
+ cout << " -- nb term in bilinear form (!0) : " << b_nozer.v.size()
+ << " total " << n_where_in_stack_opt << endl;
+
+ if ( (verbosity/100) % 10 >= 2)
+ {
+ int il=0;
+
+ for (BilinearOperator::const_iterator l=b->b->v.begin();l!=b->b->v.end();l++,il++)
+ cout << il << " coef (" << l->first << ") = " << *(where_in_stack[il])
+ << " offset=" << b->b->where_in_stack_opt[il]
+ << " dep mesh " << l->second.MeshIndependent() << b->b->mesh_indep_stack_opt[il] << endl;
+ }
+ }
+ Stack_Ptr<R*>(stack,ElemMatPtrOffset) =where_in_stack;
+ void *paramate=stack;
+ pair_stack_double parammatElement_OpVF(stack,& binside);
+ // parammatElement_OpVF.first = stack;
+ // parammatElement_OpVF.second= & binside;
+
+ if (verbosity >3)
+ {
+ if (all) cout << " all " << endl ;
+ else cout << endl;
+ }
+ if(VF) {
+ if(&Uh != &Vh || sym)
++<<<<<<< HEAD
+ cout << ("To Day in bilinear form with discontinous Galerkin (2d): \n"
+ " test or unkown function must be defined on the same FEspace, \n"
+ " and the matrix is not symmetric. \n"
+ " To do other case in a future (F. Hecht) dec. 2003 ");
+ if(&Uh == &Vh)
+ matep= new MatriceElementairePleine<R,FESpace>(Uh,VF,FIT,FIE);
+ else
+ matep= new MatriceElementairePleine<R,FESpace>(Uh,Vh,VF,FIT,FIE);
+
+
+
+ // matep= new MatriceElementairePleine<R,FESpace>(Uh,Vh,VF,FIT,FIE);
++=======
++ ExecError("To Day in bilinear form with discontinous Galerkin: \n"
++ " test or unkown function must be defined on the same FEspace, \n"
++ " and the matrix is not symmetric. \n"
++ " To do other case in a future (F. Hecht) dec. 2003 ");
++
++ matep= new MatriceElementairePleine<R,FESpace>(Uh,VF,FIT,FIE);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ matep->faceelement = Element_OpVF;
+ paramate= ¶mmatElement_OpVF;
+ }
+ else if (sym) {
+ mates= new MatriceElementaireSymetrique<R,FESpace>(Uh,FIT,FIE);
+ mates->element = Element_Op<R>;
+ }
+ else {
+ matep= new MatriceElementairePleine<R,FESpace>(Uh,Vh,FIT,FIE);
+ matep->element = Element_Op<R>;
+ }
+ MatriceElementaireFES<R,FESpace> & mate(*( sym? (MatriceElementaireFES<R,FESpace> *)mates : (MatriceElementaireFES<R,FESpace> *) matep));
+
+
+ mate.bilinearform=b->b;
+
+ Check(*mate.bilinearform,mate.Uh.N,mate.Vh.N);
+
+ if (di.kind == CDomainOfIntegration::int1d )
+ {
+ if(di.islevelset())
+ {
+ double uset = HUGE_VAL;
+ R2 Q[3];
+ KN<double> phi(Th.nv);phi=uset;
+ double f[3];
+ for(int t=0; t< Th.nt;++t)
+ {
+ if ( all || setoflab.find(Th[t].lab) != setoflab.end())
+ {
+ double umx=-HUGE_VAL,umn=HUGE_VAL;
+ for(int i=0;i<3;++i)
+ {
+ int j= ThI(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&ThI,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ umx = std::max(umx,phi[j]);
+ umn = std::min(umn,phi[j]);
+
+ }
+ if( umn <=0 && umx >= 0)
+ {
+
+ int np= IsoLineK(f,Q,1e-10);
+ if(np==2)
+ {
+ /* if ( sameMesh)
+ {
+
+ Element_rhs<R>(Vh[t],*l->l,buf,stack,*B,FIE,Q[0],Q[1]);
+ }
+ else*/
+ // InternalError(" No levelSet on Diff mesh : to day int1d of Matrix");
+ A += mate(t,10,Th[t].lab,stack,Q);
+ }
+ if(sptrclean) sptrclean=sptr->clean();
+ }
+ }
+ }
+ }
+ else for( int e=0;e<Th.neb;e++)
+ {
+ if (all || setoflab.find(Th.bedges[e].lab) != setoflab.end())
+ {
+ int ie,i =Th.BoundaryElement(e,ie);
+ A += mate(i,ie,Th.bedges[e].lab,stack);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+ }
+ }
+ else if (di.kind == CDomainOfIntegration::intalledges)
+ {
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ for (int ie=0;ie<3;ie++)
+ A += mate(i,ie,Th[i].lab,paramate);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+
+ }
+ else if (di.kind == CDomainOfIntegration::intallVFedges)
+ {
+ cerr << " a faire intallVFedges " << endl;
+ ffassert(0);
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ for (int ie=0;ie<3;ie++)
+ A += mate(i,ie,Th[i].lab,paramate);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+
+ }
+ else if (di.kind == CDomainOfIntegration::int2d )
+ {
+
+ if(di.islevelset())
+ {
+ double uset = HUGE_VAL;
+ R2 Q[2][3];
+ double vol6[2];
+ KN<double> phi(Th.nv);phi=uset;
+ double f[3];
+ for(int t=0; t< Th.nt;++t)
+ {
+ if ( all || setoflab.find(Th[t].lab) != setoflab.end())
+ {
+ double umx=-HUGE_VAL,umn=HUGE_VAL;
+ for(int i=0;i<3;++i)
+ {
+ int j= ThI(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&ThI,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ umx = std::max(umx,phi[j]);
+ umn = std::min(umn,phi[j]);
+
+ }
+ int nt= UnderIso(f,Q, vol6,1e-14);
+ setQF<R2>(FIT,FITo,QuadratureFormular_T_1, Q,vol6,nt);
+ if(FIT.n)
+ A += mate(t,-1,Th[t].lab,stack);
+ if(sptrclean) sptrclean=sptr->clean();
+ }
+ }
+ FIT =FITo;
+ }
+ else
+
+
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ A += mate(i,-1,Th[i].lab,stack);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ // AA += mate;
+ }
+ }
+ else
+ InternalError(" kind of CDomainOfIntegration unkown");
+
+ if (where_in_stack) delete [] where_in_stack;
+ delete &mate;
+ }
+// --------- FH 120105
+// 3d
+ template<class R>
+ void AssembleBilinearForm(Stack stack,const FESpace3::Mesh & Th,const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ MatriceCreuse<R> & A, const FormBilinear * b )
+
+ {
+
+ /*FH: case ..in 3D
+ in varf ...
+ standard case ..
+ */
+
+
+ typedef FESpace3 FESpace;
+ typedef FESpace3::Mesh Mesh;
+ typedef Mesh *pmesh ;
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(stack);
+ bool sptrclean=true;
+ const CDomainOfIntegration & di= *b->di;
+ ffassert(di.d==3);
+ const Mesh * pThdi = GetAny<pmesh>( (* di.Th)(stack));
+ if ( pThdi != &Th || &Uh.Th !=&Th || &Vh.Th !=&Th) {
+ cout << " Use matrix formulation .... " << endl;
+ ExecError("No way to compute bilinear form with integrale of on mesh \n"
+ " test or unkown function defined on an other mesh! sorry to hard. ");
+ }
+ SHOWVERB(cout << " FormBilinear " << endl);
+ MatriceElementaireSymetrique<R,FESpace> *mates =0;
+ MatriceElementairePleine<R,FESpace> *matep =0;
+ const bool useopt=di.UseOpt(stack);
+ double binside=di.binside(stack);
+
+ //const vector<Expression> & what(di.what);
+ CDomainOfIntegration::typeofkind kind = di.kind;
+ set<int> setoflab;
+ bool all=true;
+ const QuadratureFormular1d & FIEo = di.FIE(stack);
+ const QuadratureFormular & FITo = di.FIT(stack);
+ const GQuadratureFormular<R3> & FIVo = di.FIV(stack);
+ // to change the quadrature on element ... may 2014 FH ..
+ QuadratureFormular1d FIE(FIEo,3);
+ QuadratureFormular FIT(FITo,3);
+ GQuadratureFormular<R3> FIV(FIVo,3);
+
+ bool VF=b->VF(); // finite Volume or discontinous Galerkin
+ if (verbosity>2) cout << " -- discontinous Galerkin =" << VF << " size of Mat =" << A.size()<< " Bytes\n";
+ if (verbosity>3)
+ {
+ if (CDomainOfIntegration::int2d==kind) cout << " -- boundary int border ( nQP: "<< FIT.n << ") ," ;
+ else if (CDomainOfIntegration::intalledges==kind) cout << " -- boundary int all edges ( nQP: "<< FIT.n << ")," ;
+ else if (CDomainOfIntegration::intallVFedges==kind) cout << " -- boundary int all VF edges nQP: ("<< FIE.n << ")," ;
+ else cout << " -- int3d (nQP: "<< FIV.n << " ) in " ;
+ if(di.islevelset()) cout << " ( int on Levelset) " << endl;
+
+ }
+ if(di.islevelset() && (CDomainOfIntegration::int2d!=kind) && (CDomainOfIntegration::int3d!=kind))
+ InternalError("Sorry no levelset integration type on no int[2|3]d case");
+
+ Expandsetoflab(stack,di, setoflab,all);
+ /*
+ for (size_t i=0;i<what.size();i++)
+ {
+ long lab = GetAny<long>( (*what[i])(stack));
+ setoflab.insert(lab);
+ if ( verbosity>3) cout << lab << " ";
+ all=false;
+ }*/
+ if (verbosity>3) cout <<" Optimized = "<< useopt << ", ";
+ const E_F0 & optiexp0=*b->b->optiexp0;
+
+ int n_where_in_stack_opt=b->b->where_in_stack_opt.size();
+ R** where_in_stack =0;
+ if (n_where_in_stack_opt && useopt)
+ where_in_stack = new R * [n_where_in_stack_opt];
+ if (where_in_stack)
+ {
+ assert(b->b->v.size()==(size_t) n_where_in_stack_opt);
+ for (int i=0;i<n_where_in_stack_opt;i++)
+ {
+ int offset=b->b->where_in_stack_opt[i];
+ assert(offset>10);
+ where_in_stack[i]= static_cast<R *>(static_cast<void *>((char*)stack+offset));
+ *(where_in_stack[i])=0;
+ }
+
+
+ if(&optiexp0)
+ optiexp0(stack);
+ KN<bool> ok(b->b->v.size());
+ { // remove the zero coef in the liste
+ // R zero=R();
+ int il=0;
+ for (BilinearOperator::const_iterator l=b->b->v.begin();l!=b->b->v.end();l++,il++)
+ ok[il] = ! (b->b->mesh_indep_stack_opt[il] && ( Fem2D::norm(*(where_in_stack[il])) < 1e-100 ) );
+ }
+ BilinearOperator b_nozer(*b->b,ok);
+ if (verbosity % 10 > 3 )
+ cout << " -- nb term in bilinear form (!0) : " << b_nozer.v.size()
+ << " total " << n_where_in_stack_opt << endl;
+
+ if ( (verbosity/100) % 10 >= 2)
+ {
+ int il=0;
+
+ for (BilinearOperator::const_iterator l=b->b->v.begin();l!=b->b->v.end();l++,il++)
+ cout << il << " coef (" << l->first << ") = " << *(where_in_stack[il])
+ << " offset=" << b->b->where_in_stack_opt[il]
+ << " dep mesh " << l->second.MeshIndependent() << b->b->mesh_indep_stack_opt[il] << endl;
+ }
+ }
+ Stack_Ptr<R*>(stack,ElemMatPtrOffset) =where_in_stack;
+ void *paramate=stack;
+ pair_stack_double parammatElement_OpVF(stack, & binside);
+ parammatElement_OpVF.first = stack;
+ parammatElement_OpVF.second= & binside;
+
+ if (verbosity >3)
+ {
+ if (all) cout << " all " << endl ;
+ else cout << endl;
+ }
+ if(VF) {
+ if(&Uh != &Vh || sym)
++<<<<<<< HEAD
+ cout << ("To Day in bilinear form with discontinous Galerkin (3d): \n"
+ " test or unkown function must be defined on the same FEspace, \n"
+ " and the matrix is not symmetric. \n"
+ " To do other case in a future (F. Hecht) dec. 2014 ");
+ if(&Uh == &Vh)
+ matep= new MatriceElementairePleine<R,FESpace>(Uh,VF,FIV,FIT);
+ else
+ matep= new MatriceElementairePleine<R,FESpace>(Uh,Vh,VF,FIV,FIT);
++=======
++ ExecError("To Day in bilinear form with discontinous Galerkin: \n"
++ " test or unkown function must be defined on the same FEspace, \n"
++ " and the matrix is not symmetric. \n"
++ " To do other case in a future (F. Hecht) dec. 2003 ");
++
++ matep= new MatriceElementairePleine<R,FESpace>(Uh,VF,FIV,FIT);
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ matep->faceelement = Element_OpVF;
+ paramate= ¶mmatElement_OpVF;
+ }
+ else if (sym) {
+ mates= new MatriceElementaireSymetrique<R,FESpace>(Uh,FIV,FIT);
+ mates->element = Element_Op<R>;
+ }
+ else {
+ matep= new MatriceElementairePleine<R,FESpace>(Uh,Vh,FIV,FIT);
+ matep->element = Element_Op<R>;
+ }
+ MatriceElementaireFES<R,FESpace> & mate(*( sym? (MatriceElementaireFES<R,FESpace> *)mates : (MatriceElementaireFES<R,FESpace> *) matep));
+
+
+ mate.bilinearform=b->b;
+
+ Check(*mate.bilinearform,mate.Uh.N,mate.Vh.N);
+
+ if (di.kind == CDomainOfIntegration::int2d )
+ {
+
+ if(di.islevelset())
+ {
+ if(verbosity>99) cout << " int2d on levelset in 3d " << endl;
+ double uset = HUGE_VAL;
+ R3 Q[4];
+ KN<double> phi(Th.nv);phi=uset;
+ double f[4];
+ for(int t=0; t< Th.nt;++t)
+ {
+ if ( all || setoflab.find(Th[t].lab) != setoflab.end())
+ {
+ double umx=-HUGE_VAL,umn=HUGE_VAL;
+ for(int i=0;i<4;++i)
+ {
+ int j= Th(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&Th,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ umx = std::max(umx,phi[j]);
+ umn = std::min(umn,phi[j]);
+
+ }
+ if( umn <=0 && umx >= 0)
+ {
+ int np= IsoLineK(f,Q,1e-10);// ca code ...
+ // cout <<umn << " " << umx << " " << np << endl;
+
+ if(np>2 )
+ {
+ if( verbosity > 999 ) cout << " -- int " << np << " on: " << Q[0] << " " << Q[1] << " " << Q[2] << " " << Q[3] << endl;
+ A += mate(t,10+np,Th[t].lab,stack,Q);
+ }
+ if(sptrclean) sptrclean=sptr->clean();
+ }
+ }}
+
+ }
+ else
+ for( int e=0;e<Th.nbe;e++)
+ {
+ if (all || setoflab.find(Th.be(e).lab) != setoflab.end())
+ {
+ int ie,i =Th.BoundaryElement(e,ie);
+ A += mate(i,ie,Th.be(e).lab,stack);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+ }
+ }
+ else if (di.kind == CDomainOfIntegration::intallfaces )
+ {
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ for (int ie=0;ie<3;ie++)
+ A += mate(i,ie,Th[i].lab,paramate);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+
+ }
+ else if (di.kind == CDomainOfIntegration::intallVFedges)
+ {
+ cerr << " a faire intallVFedges " << endl;
+ ffassert(0);
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ for (int ie=0;ie<3;ie++)
+ A += mate(i,ie,Th[i].lab,paramate);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+
+ }
+ else if (di.kind == CDomainOfIntegration::int3d )
+ {
+ if(di.islevelset()) // may 2014 FH ...
+ { // int3d levelset < 0
+ double llevelset = 0;
+ const double uset = std::numeric_limits<double>::max();
+ // cout << " uset ="<<uset << endl;
+ R3 Q[3][4];
+ double vol6[3];
+ KN<double> phi(Th.nv);
+ phi=uset;
+ double f[4];
+
+ for (int t=0;t< Th.nt; t++)
+ {
+
+ const Mesh3::Element & K(Th[t]);
+ if ( all || setoflab.find(Th[t].lab) != setoflab.end())
+
+ {
+ double umx=std::numeric_limits<double>::min(),umn=std::numeric_limits<double>::max();
+ for(int i=0;i<4;++i)
+ {
+ int j= Th(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&Th,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ }
+ int ntets= UnderIso(f,Q, vol6,1e-14);
+ setQF<R3>(FIV,FIVo,QuadratureFormular_Tet_1, Q,vol6,ntets);
+ if(FIV.n)
+ {
+ A += mate(t,-1,Th[t].lab,stack);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+ }
+ }
+ FIV=FIVo;
+ }
+ else
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ A += mate(i,-1,Th[i].lab,stack);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ // AA += mate;
+ }
+
+ }
+ else
+ {
+ cerr << " kind of CDomainOfIntegration unkown ?? " << di.kind << endl;
+ InternalError(" kind of CDomainOfIntegration unkown");
+ }
+
+ if (where_in_stack) delete [] where_in_stack;
+ delete &mate;
+ }
+
+// end 3d
+
+// --------- FH 170605
+
+ template<class R>
+ void AddMatElem(map<pair<int,int>, R > & A,const Mesh & Th,const BilinearOperator & Op,bool sym,int it, int ie,int label,
+ const FESpace & Uh,const FESpace & Vh,
+ const QuadratureFormular & FI,
+ const QuadratureFormular1d & FIb,
+ double *p, void *vstack, bool intmortar=false,R2 *Q=0)
+ {
+ //cout << "AddMatElem" << Q << " " << ie << endl;
+ Stack stack=pvoid2Stack(vstack);
+ MeshPoint mp= *MeshPointStack(stack);
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Mesh & Thu(Uh.Th);
+ const Mesh & Thv(Vh.Th);
+
+ bool same = &Uh == & Vh;
+ const Triangle & T = Th[it];
+ long npi;
+ long i,j;
+ bool classoptm = copt && Op.optiexpK;
+ assert(Op.MaxOp() <last_operatortype);
+ //
+
+
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ //assert(lastop<=3);
+
+ if (ie<0)
+ {
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadraturePoint pi(FI[npi]);
+ double coef = T.area*pi.a;
+ R2 Pt(pi),Ptu,Ptv;
+ R2 P(T(Pt));
+ bool outsideu,outsidev;
+ // ici trouve le T
+ int iut=0,ivt=0;
+ const Triangle * tu,*tv;
+ if(&Th == & Thu )
+ {
+ tu =&T;
+ Ptu=Pt;
+ }
+ else
+ {
+ tu= Thu.Find(P,Ptu,outsideu);
+ if( !tu || outsideu) {
+ if(verbosity>100) cout << " On a pas trouver (u) " << P << " " << endl;
+ continue;}}
+ if(same)
+ {
+ tv=tu;
+ outsidev=outsideu;
+ Ptv=Ptu;
+ }
+ else
+ {
+ if(&Th == & Thv )
+ {
+ tv =&T;
+ Ptv=Pt;
+ }
+ else
+ {
+ tv= Thv.Find(P,Ptv,outsidev);
+ if( !tv || outsidev) {
+ if(verbosity>100) cout << " On a pas trouver (v) " << P << " " << endl;
+ continue;
+ }}
+ }
+ iut = Thu(tu);
+ ivt = Thv(tv);
+ if( verbosity>1000) cout << " T " << it << " iut " << iut << " ivt " << ivt << endl ;
+ FElement Ku(Uh[iut]);
+ FElement Kv(Vh[ivt]);
+ long n= Kv.NbDoF() ,m=Ku.NbDoF();
+ long N= Kv.N;
+ long M= Ku.N;
+ RNMK_ fv(p,n,N,lastop); // the value for basic fonction
+ RNMK_ fu(p+ (same ?0:n*N*lastop) ,m,M,lastop); // the value for basic fonction
+
+
+ Ku.BF(Dop,Ptu,fu);
+ MeshPointStack(stack)->set(Th,P,Pt,T,label);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ if (!same) Kv.BF(Dop,Ptv,fv);
+ for ( i=0; i<n; i++ )
+ {
+
+ // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ int ig = Kv(i);
+ RNM_ wi(fv(i,'.','.'));
+ for ( j=0; j<m; j++ )
+ {
+ RNM_ wj(fu(j,'.','.'));
+ int il=0;
+ int jg(Ku(j));
+ if ( !sym || ig <= jg )
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack)) ;
+ if( verbosity>1000) cout << ig << " " << jg << " " << " " << ccc << " " << coef * ccc * w_i*w_j << " on T \n" ;
+ double wij = w_i*w_j;
+ if (abs(wij)>= 1e-10)
+ A[make_pair(ig,jg)] += coef * ccc * wij;
+ }
+ }
+ }
+ }
+ }
+ else // int on edge ie
+ {
+ R2 PA,PB,E;
+ if(Q)
+ {
+ PA=Q[0];
+ PB=Q[1];
+ E=T(PB)-T(PA);
+ // cout << " AddMAtElem " << PA << " " << PB << " "<< sqrt((E,E))<< endl;
+ }
+ else
+ {
+ PA=TriangleHat[VerticesOfTriangularEdge[ie][0]];
+ PB=TriangleHat[VerticesOfTriangularEdge[ie][1]];
+ E=T.Edge(ie);
+ }
+ double le = sqrt((E,E));
+
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+ QuadratureFormular1dPoint pi( FIb[npi]);
+ double sa=pi.x,sb=1-sa;
+ double coef = le*pi.a;
+
+ R2 Pt(PA*sa+PB*sb ); //
+
+ R2 Ptu,Ptv;
+ R2 P(T(Pt));
+ bool outsideu,outsidev;
+ // ici trouve le T
+ int iut=0,ivt=0;
+ const Triangle * tu, *tv;
+ if(&Th == & Thu )
+ {
+ tu =&T;
+ Ptu=Pt;
+ }
+ else
+ {
+ tu= Thu.Find(P,Ptu,outsideu);
+ if( !tu || (outsideu && !intmortar) ) {
+ //R dd=-1;
+ //if(tu) { R2 PP((*tu)(Ptu)),PPP(P,PP) ; cout << PP << " " << sqrt( (PPP,PPP) ) <<" "; }
+ if(verbosity>100) cout << " On a pas trouver (u) " << P << " " <<Ptu << " " << tu << endl;
+ continue;}}
+ iut = Thu(tu);
+ if(same)
+ {
+ tv=tu;
+ outsidev=outsideu;
+ Ptv=Ptu;
+ ivt=iut;
+ }
+ else
+ {
+ if(&Th == & Thv )
+ {
+ tv =&T;
+ Ptv=Pt;
+ }
+ else {
+ tv= Thv.Find(P,Ptv,outsidev);
+ if( !tv || (outsidev&& !intmortar)) {
+ if(verbosity>100) cout << " On a pas trouver (v) " << P << " " << endl;
+ continue;}}
+ ivt = Thv(tv);
+ }
+ FElement Ku(Uh[iut]);
+ FElement Kv(Vh[ivt]);
+ long n= Kv.NbDoF() ,m=Ku.NbDoF();
+ long N= Kv.N;
+ long M= Ku.N;
+ // cout << P << " " << Pt << " " << iut << " " << ivt << " Ptu : " << Ptu << " Ptv: " << Ptv << " n:" << n << " m:" << m << endl;
+ RNMK_ fv(p,n,N,lastop); // the value for basic fonction
+ RNMK_ fu(p+ (same ?0:n*N*lastop) ,m,M,lastop); // the value for basic fonction
+
+ Ku.BF(Dop,Ptu,fu);
+ if( !same)
+ Kv.BF(Dop,Ptv,fv);
+
+
+ // int label=-999999; // a passer en argument
+ MeshPointStack(stack)->set(Th,P,Pt,T,label,R2(E.y,-E.x)/le,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+
+ for ( i=0; i<n; i++ )
+ // if (onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // juste the df on edge bofbof generaly wrong FH dec 2003
+ {
+ RNM_ wi(fv(i,'.','.'));
+ int ig=Kv(i);
+ for ( j=0; j<m; j++ )
+ {
+ RNM_ wj(fu(j,'.','.'));
+ int il=0;
+ int jg=Ku(j);
+ if( ! sym || ig <= jg )
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+ // R ccc = GetAny<R>(ll.second.eval(stack));
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ double wij = w_i*w_j;
+ if (abs(wij)>= 1e-10&& (verbosity>1000))
+ cout << " \t\t\t" << ig << " " << jg << " " << ccc << " " << coef * ccc * w_i*w_j << " on edge \n" ;
+ if (abs(wij)>= 1e-10)
+ A[make_pair(ig,jg)] += wij*coef*ccc ;
+ }
+ }
+ }
+ }
+ }
+
+ *MeshPointStack(stack) = mp;
+ }
+
+
+ template<class R>
+ void AddMatElem(map<pair<int,int>, R > & A,const Mesh3 & Th,const BilinearOperator & Op,bool sym,int it, int ie,int label,
+ const FESpace3 & Uh,const FESpace3 & Vh,
+ const Fem2D::GQuadratureFormular<R3> & FI,
+ const QuadratureFormular & FIb,
+ double *p, void *vstack, bool intmortar=false)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ MeshPoint mp= *MeshPointStack(stack);
+ static int count =0; // non test FH .........................
+ if(count++ < 1) {
+ cout << " Warning : Assemble Matrix with incompatible 3d meshes in test (FH) " << endl;
+ cout << " ------------------------------------------------------------- " << endl;
+ }
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Mesh3 & Thu(Uh.Th);
+ const Mesh3 & Thv(Vh.Th);
+
+ bool same = &Uh == & Vh;
+ const Tet & T = Th[it];
+ long npi;
+ long i,j;
+ bool classoptm = copt && Op.optiexpK;
+ assert(Op.MaxOp() <last_operatortype);
+ //
+ int lastop=0;
+ lastop = 0;
+ What_d Dop = Op.DiffOp(lastop);
+
+
+ //assert(lastop<=3);
+
+ if (ie<0)
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R3> pi(FI[npi]);
+ double coef = T.mesure()*pi.a;
+ R3 Pt(pi),Ptu,Ptv;
+ R3 P(T(Pt));
+ bool outsideu,outsidev;
+ // ici trouve le T
+ int iut=0,ivt=0;
+ const Tet * tu,*tv;
+ if(&Th == & Thu )
+ {
+ tu =&T;
+ Ptu=Pt;
+ }
+ else
+ {
+ tu= Thu.Find(P,Ptu,outsideu);
+ if( !tu || outsideu) {
+ if(verbosity>100) cout << " On a pas trouver (u) " << P << " " << endl;
+ continue;}}
+ if(same)
+ {
+ tv=tu;
+ outsidev=outsideu;
+ Ptv=Ptu;
+ }
+ else
+ {
+ if(&Th == & Thv )
+ {
+ tv =&T;
+ Ptv=Pt;
+ }
+ else
+ {
+ tv= Thv.Find(P,Ptv,outsidev);
+ if( !tv || outsidev) {
+ if(verbosity>100) cout << " On a pas trouver (v) " << P << " " << endl;
+ continue;
+ }}
+ }
+ iut = Thu(tu);
+ ivt = Thv(tv);
+ if( verbosity>1000) cout << " T " << it << " iut " << iut << " ivt " << ivt << endl ;
+ FElement3 Ku(Uh[iut]);
+ FElement3 Kv(Vh[ivt]);
+ long n= Kv.NbDoF() ,m=Ku.NbDoF();
+ long N= Kv.N;
+ long M= Ku.N;
+ RNMK_ fv(p,n,N,(long) lastop); // the value for basic fonction
+ RNMK_ fu(p+ (same ?0:n*N*lastop) ,m,M,(long) lastop); // the value for basic fonction
+
+
+ Ku.BF(Dop,Ptu,fu);
+ MeshPointStack(stack)->set(Th,P,Pt,T,label);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ if (!same) Kv.BF(Dop,Ptv,fv);
+ for ( i=0; i<n; i++ )
+ {
+
+ // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ int ig = Kv(i);
+ RNM_ wi(fv(i,'.','.'));
+ for ( j=0; j<m; j++ )
+ {
+ RNM_ wj(fu(j,'.','.'));
+ int il=0;
+ int jg(Ku(j));
+ if ( !sym || ig <= jg )
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack)) ;
+ if( verbosity>1000) cout << ig << " " << jg << " " << " " << ccc << " " << coef * ccc * w_i*w_j << " on T \n" ;
+ double wij = w_i*w_j;
+ if (abs(wij)>= 1e-10)
+ A[make_pair(ig,jg)] += coef * ccc * wij;
+ }
+ }
+ }
+ }
+ else // int on edge ie
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+
+ GQuadraturePoint<R2> pi( FIb[npi]);
+ R3 NN= T.N(ie);
+ double mes=NN.norme();
+ NN/=mes;
+ double coef = 0.5*mes*pi.a; // correction 0.5 050109 FH
+ R3 Pt(T.PBord(ie,pi));
+ //Ku.BF(Dop,Pt,fu);
+
+
+
+ R3 Ptu,Ptv;
+ R3 P(T(Pt));
+ bool outsideu,outsidev;
+ // ici trouve le T
+ int iut=0,ivt=0;
+ const Tet * tu, *tv;
+ if(&Th == & Thu )
+ {
+ tu =&T;
+ Ptu=Pt;
+ }
+ else
+ {
+ tu= Thu.Find(P,Ptu,outsideu);
+ if( !tu || (outsideu && !intmortar) ) {
+ //R dd=-1;
+ //if(tu) { R2 PP((*tu)(Ptu)),PPP(P,PP) ; cout << PP << " " << sqrt( (PPP,PPP) ) <<" "; }
+ if(verbosity>100) cout << " On a pas trouver (u) " << P << " " <<Ptu << " " << tu << endl;
+ continue;}}
+ iut = Thu(tu);
+ if(same)
+ {
+ tv=tu;
+ outsidev=outsideu;
+ Ptv=Ptu;
+ ivt=iut;
+ }
+ else
+ {
+ if(&Th == & Thv )
+ {
+ tv =&T;
+ Ptv=Pt;
+ }
+ else {
+ tv= Thv.Find(P,Ptv,outsidev);
+ if( !tv || (outsidev&& !intmortar)) {
+ if(verbosity>100) cout << " On a pas trouver (v) " << P << " " << endl;
+ continue;}}
+ ivt = Thv(tv);
+ }
+ FElement3 Ku(Uh[iut]);
+ FElement3 Kv(Vh[ivt]);
+ long n= Kv.NbDoF() ,m=Ku.NbDoF();
+ long N= Kv.N;
+ long M= Ku.N;
+ // cout << P << " " << Pt << " " << iut << " " << ivt << " Ptu : " << Ptu << " Ptv: " << Ptv << " n:" << n << " m:" << m << endl;
+ RNMK_ fv(p,n,N,lastop); // the value for basic fonction
+ RNMK_ fu(p+ (same ?0:n*N*lastop) ,m,M,lastop); // the value for basic fonction
+
+ Ku.BF(Dop,Ptu,fu);
+ if( !same)
+ Kv.BF(Dop,Ptv,fv);
+
+
+ // int label=-999999; // a passer en argument
+ MeshPointStack(stack)->set(Th,P,Pt,T,label,NN,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+
+ for ( i=0; i<n; i++ )
+ // if (onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // juste the df on edge bofbof generaly wrong FH dec 2003
+ {
+ RNM_ wi(fv(i,'.','.'));
+ int ig=Kv(i);
+ for ( j=0; j<m; j++ )
+ {
+ RNM_ wj(fu(j,'.','.'));
+ int il=0;
+ int jg=Ku(j);
+ if( ! sym || ig <= jg )
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+ // R ccc = GetAny<R>(ll.second.eval(stack));
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ double wij = w_i*w_j;
+ if (abs(wij)>= 1e-10&& (verbosity>1000))
+ cout << " \t\t\t" << ig << " " << jg << " " << ccc << " " << coef * ccc * w_i*w_j << " on edge \n" ;
+ if (abs(wij)>= 1e-10)
+ A[make_pair(ig,jg)] += wij*coef*ccc ;
+ }
+ }
+ }
+ }
+
+
+ *MeshPointStack(stack) = mp;
+ }
+
+ template<class R>
+ void AssembleBilinearForm(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ map<pair<int,int>, R > & A, const FormBilinear * b )
+
+ {
+ /*FH: case ..in 2D
+ in varf ...
+ all mesh can can be different ....
+ */
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(stack);
+ bool sptrclean=true;
+ // sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ const CDomainOfIntegration & di= *b->di;
+ const Mesh * pThdi = GetAny<pmesh>( (* di.Th)(stack));
+ SHOWVERB(cout << " FormBilinear () " << endl);
+ //MatriceElementaireSymetrique<R> *mates =0;
+ // MatriceElementairePleine<R> *matep =0;
+ const bool useopt=di.UseOpt(stack);
+ //double binside=di.binside(stack);
+ const bool intmortar=di.intmortar(stack);
+ if ( verbosity >1)
+ {
+ cout << " Integral on Th nv : " << Th.nv << " nt : " << Th.nt << endl;
+ cout << " Th/ u nv : " << Uh.Th.nv << " nt : " << Uh.Th.nt << endl;
+ cout << " Th/ v nv : " << Vh.Th.nv << " nt : " << Vh.Th.nt << endl;
+ cout << " suppose in mortar " << intmortar << " levelset= " << di.islevelset() << endl;
+ }
+ assert(pThdi == & Th);
+ //const vector<Expression> & what(di.what);
+ CDomainOfIntegration::typeofkind kind = di.kind;
+ set<int> setoflab;
+ bool all=true;
+ const QuadratureFormular1d & FIE = di.FIE(stack);
+ const QuadratureFormular & FITo = di.FIT(stack);
+ QuadratureFormular FIT(FITo,3);
+ bool VF=b->VF(); // finite Volume or discontinous Galerkin
+ if (verbosity>2) cout << " -- discontinous Galerkin =" << VF << " size of Mat =" << A.size()<< " Bytes\n";
+ if (verbosity>3)
+ {
+ if (CDomainOfIntegration::int1d==kind) cout << " -- boundary int border ( nQP: "<< FIE.n << ") ," ;
+ else if (CDomainOfIntegration::intalledges==kind) cout << " -- boundary int all edges ( nQP: "<< FIE.n << ")," ;
+ else if (CDomainOfIntegration::intallVFedges==kind) cout << " -- boundary int all VF edges nQP: ("<< FIE.n << ")," ;
+ else cout << " -- int (nQP: "<< FIT.n << " ) in " ;
+ }
+ // if(di.islevelset()) InternalError("Sorry no levelset integration type on this case (1)");
+ if(di.islevelset() && (CDomainOfIntegration::int1d!=kind) && (CDomainOfIntegration::int2d!=kind) )
+ InternalError("Sorry no levelset integration type on no int1d case");
+
+ /*
+ if (verbosity>3)
+ if (CDomainOfIntegration::int1d==kind) cout << " -- boundary int border " ;
+ else if (CDomainOfIntegration::intalledges==kind) cout << " -- boundary int all edges, " ;
+ else if (CDomainOfIntegration::intallVFedges==kind) cout << " -- boundary int all VF edges, " ;
+ else cout << " -- int in " ; */
+ Expandsetoflab(stack,di, setoflab,all);
+ /*
+ for (size_t i=0;i<what.size();i++)
+ {long lab = GetAny<long>( (*what[i])(stack));
+ setoflab.insert(lab);
+ if ( verbosity>3) cout << lab << " ";
+ all=false;
+ }*/
+ if (verbosity>3) cout <<" Optimized = "<< useopt << ", ";
+ const E_F0 & optiexp0=*b->b->optiexp0;
+ // const E_F0 & optiexpK=*b->b->optiexpK;
+ int n_where_in_stack_opt=b->b->where_in_stack_opt.size();
+ R** where_in_stack =0;
+ if (n_where_in_stack_opt && useopt)
+ where_in_stack = new R * [n_where_in_stack_opt];
+ if (where_in_stack)
+ {
+ assert(b->b->v.size()==(size_t) n_where_in_stack_opt);
+ for (int i=0;i<n_where_in_stack_opt;i++)
+ {
+ int offset=b->b->where_in_stack_opt[i];
+ assert(offset>10);
+ where_in_stack[i]= static_cast<R *>(static_cast<void *>((char*)stack+offset));
+ *(where_in_stack[i])=0;
+ }
+
+
+ if(&optiexp0)
+ optiexp0(stack);
+ KN<bool> ok(b->b->v.size());
+ { // remove the zero coef in the liste
+ // R zero=R();
+ int il=0;
+ for (BilinearOperator::const_iterator l=b->b->v.begin();l!=b->b->v.end();l++,il++)
+ ok[il] = ! (b->b->mesh_indep_stack_opt[il] && ( Fem2D::norm(*(where_in_stack[il])) < 1e-100 ) );
+ }
+ BilinearOperator b_nozer(*b->b,ok);
+ if (verbosity % 10 > 3 )
+ cout << " -- nb term in bilinear form (!0) : " << b_nozer.v.size()
+ << " total " << n_where_in_stack_opt << endl;
+
+ if ( (verbosity/100) % 10 >= 2)
+ {
+ int il=0;
+
+ for (BilinearOperator::const_iterator l=b->b->v.begin();l!=b->b->v.end();l++,il++)
+ cout << il << " coef (" << l->first << ") = " << *(where_in_stack[il])
+ << " offset=" << b->b->where_in_stack_opt[il]
+ << " dep mesh " << l->second.MeshIndependent() << b->b->mesh_indep_stack_opt[il] << endl;
+ }
+ }
+ Stack_Ptr<R*>(stack,ElemMatPtrOffset) =where_in_stack;
+
+ KN<double> p(Vh.esize()+ Uh.esize() );
+
+
+ if (verbosity >3)
+ {
+ if (all) cout << " all " << endl ;
+ else cout << endl;
+ }
+
+ if (di.kind == CDomainOfIntegration::int1d )
+ {
+
+ if(di.islevelset())
+ {
+ double uset = HUGE_VAL;
+ R2 Q[2];
+ double vol6[2];
+ KN<double> phi(Th.nv);phi=uset;
+ double f[3], ll=0;
+ for(int t=0; t< Th.nt;++t)
+ {
+ if ( all || setoflab.find(Th[t].lab) != setoflab.end())
+ {
+ double umx=-HUGE_VAL,umn=HUGE_VAL;
+ for(int i=0;i<3;++i)
+ {
+ int j= Th(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&Th,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ umx = std::max(umx,phi[j]);
+ umn = std::min(umn,phi[j]);
+
+ }
+ int ntp= IsoLineK(f,Q,1e-10);
+ if(verbosity>999 && ntp==2)
+ {
+ const Triangle &T = Th[t];
+ R2 E(T(Q[0]),T(Q[1]));
+ double le=sqrt((E,E));
+ ll += le;
+ cout << "\t\t" << ntp <<" : " << Q[0] << " " << Q[1] << " ; "
+ << f[0] << " " << f[1] << " " << f[2] << " " << le << " / " << ll<<endl;
+ }
+ if( ntp==2)
+ {
+ AddMatElem(A,Th,*b->b,sym,t,10,Th[t].lab,Uh,Vh,FIT,FIE,p,stack,intmortar,Q);
+ if(sptrclean) sptrclean=sptr->clean();
+ }
+ }
+ }
+ FIT =FITo;
+ }
+
+
+ else
+ {
+ for( int e=0;e<Th.neb;e++)
+ {
+ if (all || setoflab.find(Th.bedges[e].lab) != setoflab.end())
+ {
+ int ie,i =Th.BoundaryElement(e,ie);
+ AddMatElem(A,Th,*b->b,sym,i,ie,Th.bedges[e].lab,Uh,Vh,FIT,FIE,p,stack,intmortar);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+ }}
+ else if (di.kind == CDomainOfIntegration::intalledges)
+ {
+ cerr << " Sorry no implement to hard "<< endl;
+ ExecError("FH: no intalledges on diff mesh ???");
+ ffassert(0); // a faire
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ for (int ie=0;ie<3;ie++)
+ AddMatElem(A,Th,*b->b,sym,i,ie,Th[i].lab,Uh,Vh,FIT,FIE,p,stack,intmortar);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+
+ }
+
+ }
+ else if (di.kind == CDomainOfIntegration::intallVFedges)
+ {
+
+ cerr << " a faire intallVFedges " << endl;
+ ffassert(0);
+
+ }
+ else if (di.kind == CDomainOfIntegration::int2d )
+ {
+ // cerr << " a faire CDomainOfIntegration::int2d " << endl;
+ if(di.islevelset())
+ {
+ double uset = HUGE_VAL;
+ R2 Q[2][3];
+ double vol6[2];
+ KN<double> phi(Th.nv);phi=uset;
+ double f[3];
+ for(int t=0; t< Th.nt;++t)
+ {
+ if ( all || setoflab.find(Th[t].lab) != setoflab.end())
+ {
+ double umx=-HUGE_VAL,umn=HUGE_VAL;
+ for(int i=0;i<3;++i)
+ {
+ int j= Th(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&Th,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ umx = std::max(umx,phi[j]);
+ umn = std::min(umn,phi[j]);
+
+ }
+ int nt= UnderIso(f,Q, vol6,1e-14);
+ setQF<R2>(FIT,FITo,QuadratureFormular_T_1, Q,vol6,nt);
+ if(FIT.n)
+ AddMatElem(A,Th,*b->b,sym,t,-1,Th[t].lab,Uh,Vh,FIT,FIE,p,stack);
+ if(sptrclean) sptrclean=sptr->clean();
+ }
+ }
+ FIT =FITo;
+ }
+ else
+
+ {
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ AddMatElem(A,Th,*b->b,sym,i,-1,Th[i].lab,Uh,Vh,FIT,FIE,p,stack);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+
+ }}
+ else
+ InternalError(" kind of CDomainOfIntegration unkown");
+
+ if (where_in_stack) delete [] where_in_stack;
+ }
+
+
+ template<class R>
+ void AssembleBilinearForm(Stack stack,const Mesh3 & Th,const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ map<pair<int,int>, R > & A, const FormBilinear * b )
+
+ {
+ /*FH: case ..in 3D
+ in varf ...
+ all mesh can can be different ....
+ */
+
+
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(stack);
+ bool sptrclean=true;
+ // sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ const CDomainOfIntegration & di= *b->di;
+ const Mesh3 * pThdi = GetAny<pmesh3>( (* di.Th)(stack));
+ SHOWVERB(cout << " FormBilinear () " << endl);
+ //MatriceElementaireSymetrique<R> *mates =0;
+ // MatriceElementairePleine<R> *matep =0;
+ const bool useopt=di.UseOpt(stack);
+ //double binside=di.binside(stack);
+ const bool intmortar=di.intmortar(stack);
+ if ( verbosity >1)
+ {
+ cout << " Integral on Th nv : " << Th.nv << " nt : " << Th.nt << endl;
+ cout << " Th/ u nv : " << Uh.Th.nv << " nt : " << Uh.Th.nt << endl;
+ cout << " Th/ v nv : " << Vh.Th.nv << " nt : " << Vh.Th.nt << endl;
+ cout << " suppose in mortar " << intmortar << endl;
+ }
+ assert(pThdi == & Th);
+ //const vector<Expression> & what(di.what);
+ CDomainOfIntegration::typeofkind kind = di.kind;
+ set<int> setoflab;
+ bool all=true;
+ // const QuadratureFormular1d & FIEo = di.FIE(stack);
+ const QuadratureFormular & FITo = di.FIT(stack);
+ const GQuadratureFormular<R3> & FIVo = di.FIV(stack);
+ // to change the quadrature on element ... may 2014 FH ..
+ // QuadratureFormular1d FIE(FIEo,3);
+ QuadratureFormular FIT(FITo,3);
+ GQuadratureFormular<R3> FIV(FIVo,3);
+
+
+
+ // const QuadratureFormular & FIT = di.FIT(stack);
+ // const Fem2D::GQuadratureFormular<R3> & FIV = di.FIV(stack);
+ bool VF=b->VF(); // finite Volume or discontinous Galerkin
+ if (verbosity>2) cout << " -- discontinous Galerkin =" << VF << " size of Mat =" << A.size()<< " Bytes\n";
+ if (verbosity>3)
+ {
+ if (CDomainOfIntegration::int2d==kind) cout << " -- boundary int border ( nQP: "<< FIT.n << ") ," ;
+ else if (CDomainOfIntegration::intallfaces==kind) cout << " -- boundary int all edges ( nQP: "<< FIT.n << ")," ;
+ //else if (CDomainOfIntegration::intallVFedges==kind) cout << " -- boundary int all VF edges nQP: ("<< FIT.n << ")," ;
+ else cout << " -- int (nQP: "<< FIV.n << " ) in " ;
+ }
+ if(di.islevelset()) InternalError("Sorry no levelset integration type on this case (2)");
+ if(di.islevelset() && (CDomainOfIntegration::int2d!=kind) && (CDomainOfIntegration::int3d!=kind) ) InternalError("Sorry no levelset integration type on no int2d case");
+
+ Expandsetoflab(stack,di, setoflab,all);
+ /*
+ for (size_t i=0;i<what.size();i++)
+ {long lab = GetAny<long>( (*what[i])(stack));
+ setoflab.insert(lab);
+ if ( verbosity>3) cout << lab << " ";
+ all=false;
+ }*/
+ if (verbosity>3) cout <<" Optimized = "<< useopt << ", ";
+ const E_F0 & optiexp0=*b->b->optiexp0;
+ // const E_F0 & optiexpK=*b->b->optiexpK;
+ int n_where_in_stack_opt=b->b->where_in_stack_opt.size();
+ R** where_in_stack =0;
+ if (n_where_in_stack_opt && useopt)
+ where_in_stack = new R * [n_where_in_stack_opt];
+ if (where_in_stack)
+ {
+ assert(b->b->v.size()==(size_t) n_where_in_stack_opt);
+ for (int i=0;i<n_where_in_stack_opt;i++)
+ {
+ int offset=b->b->where_in_stack_opt[i];
+ assert(offset>10);
+ where_in_stack[i]= static_cast<R *>(static_cast<void *>((char*)stack+offset));
+ *(where_in_stack[i])=0;
+ }
+
+
+ if(&optiexp0)
+ optiexp0(stack);
+ KN<bool> ok(b->b->v.size());
+ { // remove the zero coef in the liste
+ // R zero=R();
+ int il=0;
+ for (BilinearOperator::const_iterator l=b->b->v.begin();l!=b->b->v.end();l++,il++)
+ ok[il] = ! (b->b->mesh_indep_stack_opt[il] && ( Fem2D::norm(*(where_in_stack[il])) < 1e-100 ) );
+ }
+ BilinearOperator b_nozer(*b->b,ok);
+ if (verbosity % 10 > 3 )
+ cout << " -- nb term in bilinear form (!0) : " << b_nozer.v.size()
+ << " total " << n_where_in_stack_opt << endl;
+
+ if ( (verbosity/100) % 10 >= 2)
+ {
+ int il=0;
+
+ for (BilinearOperator::const_iterator l=b->b->v.begin();l!=b->b->v.end();l++,il++)
+ cout << il << " coef (" << l->first << ") = " << *(where_in_stack[il])
+ << " offset=" << b->b->where_in_stack_opt[il]
+ << " dep mesh " << l->second.MeshIndependent() << b->b->mesh_indep_stack_opt[il] << endl;
+ }
+ }
+ Stack_Ptr<R*>(stack,ElemMatPtrOffset) =where_in_stack;
+
+ KN<double> p(Vh.esize()+ Uh.esize() );
+
+
+ if (verbosity >3)
+ {
+ if (all) cout << " all " << endl ;
+ else cout << endl;
+ }
+
+ if (di.kind == CDomainOfIntegration::int2d )
+ {
+ for( int e=0;e<Th.nbe;e++)
+ {
+ if (all || setoflab.find(Th.be(e).lab) != setoflab.end())
+ {
+ int ie,i =Th.BoundaryElement(e,ie);
+ AddMatElem(A,Th,*b->b,sym,i,ie,Th.be(e).lab,Uh,Vh,FIV,FIT,p,stack,intmortar);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+ }
+ else if (di.kind == CDomainOfIntegration::intallfaces)
+ {
+ ffassert(0); // a faire
+
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ for (int ie=0;ie<3;ie++)
+ AddMatElem(A,Th,*b->b,sym,i,ie,Th[i].lab,Uh,Vh,FIV,FIT,p,stack,intmortar);
+
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+
+ }
+
+ }
+ /* else if (di.kind == CDomainOfIntegration::intallVFedges)
+ {
+
+ cerr << " a faire intallVFedges " << endl;
+ ffassert(0);
+
+ } */
+ else if (di.kind == CDomainOfIntegration::int3d )
+ {
+ if(di.islevelset()) // may 2014 FH ...
+ { // int3d levelset < 0
+ double llevelset = 0;
+ const double uset = std::numeric_limits<double>::max();
+ // cout << " uset ="<<uset << endl;
+ R3 Q[3][4];
+ double vol6[3];
+ KN<double> phi(Th.nv);
+ phi=uset;
+ double f[4];
+
+ for (int t=0;t< Th.nt; t++)
+ {
+
+ const Mesh3::Element & K(Th[t]);
+ if (all || setoflab.find(Th[t].lab) != setoflab.end())
+
+ {
+ double umx=std::numeric_limits<double>::min(),umn=std::numeric_limits<double>::max();
+ for(int i=0;i<4;++i)
+ {
+ int j= Th(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&Th,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ }
+ int ntets= UnderIso(f,Q, vol6,1e-14);
+ setQF<R3>(FIV,FIVo,QuadratureFormular_Tet_1, Q,vol6,ntets);
+ if(FIV.n)
+ {
+ AddMatElem(A,Th,*b->b,sym,t,-1,Th[t].lab,Uh,Vh,FIV,FIT,p,stack);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+
+ }
+ }
+ FIV = FIVo;
+
+ }
+ else
+
+ {
+ // cerr << " a faire CDomainOfIntegration::int3d " << endl;
+ for (int i=0;i< Th.nt; i++)
+ {
+ if ( all || setoflab.find(Th[i].lab) != setoflab.end())
+ AddMatElem(A,Th,*b->b,sym,i,-1,Th[i].lab,Uh,Vh,FIV,FIT,p,stack);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+
+ } }
+ else
+ InternalError(" kind of CDomainOfIntegration unkown");
+
+ if (where_in_stack) delete [] where_in_stack;
+
+ }
+// --------- FH 170605
+
+
+ template<class R>
+ void Element_Op(MatriceElementairePleine<R,FESpace3> & mat,const FElement3 & Ku,const FElement3 & Kv,double * p,int ie,int label,void *vstack,R3 *B)
+ {
+ // ffassert(B==0);
+ Stack stack=pvoid2Stack(vstack);
+ // ffassert(0);
+ typedef FElement3::Element Element;
+ MeshPoint mp= *MeshPointStack(stack);
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+
+ bool same = &Ku == & Kv;
+ const Element & T = Ku.T;
+ throwassert(&T == &Kv.T);
+ const GQuadratureFormular<R3> & FI = mat.FIT;
+ const GQuadratureFormular<R2> & FIb = mat.FIE;
+ long npi;
+ R *a=mat.a;
+ R *pa=a;
+ long i,j;
+ long n= mat.n,m=mat.m,nx=n*m;
+ long N= Kv.N;
+ long M= Ku.N;
+
+
+
+
+
+ const Opera &Op(*mat.bilinearform);
+ bool classoptm = copt && Op.optiexpK;
+ bool oldopt=1; // juin 2007 FH ???? a voir
+ int iloop=0;
+ KN<bool> unvarexp(classoptm ? Op.optiexpK->sizevar() : 1);
+ if (Ku.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_Op 3d P: copt = " << copt << " " << classoptm << endl;
+ assert(Op.MaxOp() <last_operatortype);
+ //
+ int lastop;
+ lastop = 0;
+ What_d Dop = Op.DiffOp(lastop);
+ //KN<bool> Dop(last_operatortype);
+ //p.DiffOp(Dop);
+ //int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ //assert(lastop<=3);
+ RNMK_ fv(p,n,N,lastop); // the value for basic fonction
+ RNMK_ fu(p+ (same ?0:n*N*lastop) ,m,M,lastop); // the value for basic fonction
+
+ for (i=0;i< nx;i++)
+ *pa++ = 0.;
+ if (ie<0)
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R3> pi(FI[npi]);
+ R coef = T.mesure()*pi.a;
+ R3 Pt(pi);
+ pa =a;
+ Ku.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv);
+ if (classoptm) {
+ if( oldopt) (*Op.optiexpK)(stack); // call old optim version
+ else Op.optiexpK->eval(stack,iloop++,unvarexp); // new optim version
+ }
+ if (!same) Kv.BF(Dop,Pt,fv);
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ //cout << *(copt[il]) << " == " << cc << endl;
+ if ( ccc != cc) {
+ cerr << cc << " != " << ccc << " => ";
+ cerr << "Sorry error in Optimization (a) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ int fi=Kv.dfcbegin(icomp);
+ int li=Kv.dfcend(icomp);
+ int fj=Ku.dfcbegin(jcomp);
+ int lj=Ku.dfcend(jcomp);
+ ccc *= coef;
+
+ // attention la fonction test donne la ligne
+ // et la fonction test est en second
+
+ for ( i=fi; i<li; i++ )
+ {
+ for ( j=fj; j<lj; j++ )
+ {
+ R w_i = fv(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+ mat(i,j) += ccc * w_i*w_j;
+ }
+ }
+ }
+ }
+ else if(B)
+ { // int on leveset
+ int np = ie-10; //= (B[0].x == B[3].x ) && (B[0].y == B[3].y ) && (B[0].z == B[3].z ) ? 3 : 4;
+ if(verbosity>999) cout << " Ass mat pleine /"<< np << endl;
+ assert( np==3 || np==4);
+ // XXXXXXX
+ double epsmes3=T.mesure()*T.mesure()*1e-18;
+ R3 PP[4];
+ double l[3];
+ for(int i=0; i< np; ++i)
+ PP[i]= T(B[i]);
+
+ for( int i =0; i+1 < np; i+=2)
+ { // 0,1,, a and 2,3,0.
+ int i0=i,i1=i+1,i2=(i+2)%np;
+ R3 NN= R3(PP[i0],PP[i1])^R3(PP[i0],PP[i2]);
+ double mes2 = (NN,NN);
+ double mes = sqrt(mes2);
+
+ if(mes2*mes <epsmes3) continue; // too small
+ NN /= mes;
+ mes *= 0.5;
+ if(verbosity>999)
+ cout << " --int on leveset3d " << np << " " << mes << " " << i0<<i1<<i2 <<endl;
+ double asum=0;
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R2> pi( FIb[npi]);
+ // cout << " %% " << npi << " " << pi.a << " " << pi.x << " " << pi.y << endl;
+ asum+= pi.a;
+ pi.toBary(l);
+ R3 Pt( l[0]*B[i0]+l[1]*B[i1]+l[2]*B[i2]); //
+ double coef = mes*pi.a; // correction 0.5 050109 FH
+ Ku.BF(Dop,Pt,fu);
+ if (!same) Kv.BF(Dop,Pt,fv);
+ MeshPointStack(stack)->set(T(Pt),Pt,Ku,label,NN,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+ pa=a;
+ for (int i=0; i<n; i++ )
+ {
+ RNM_ wi(fv(i,'.','.'));
+ for (int j=0; j<m; j++,pa++ )
+ {
+ RNM_ wj(fu(j,'.','.'));
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( ccc != cc) {
+ cerr << cc << " != " << ccc << " => ";
+ cerr << "Sorry error in Optimization (b) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ if(verbosity>999)
+ cout << " -- int on leveset3d aij = "<< pi.a* ccc * w_i*w_j <<" " << ccc << " " << w_i*w_j <<endl;
+ *pa += coef * ccc * w_i*w_j;
+ }
+ }
+ }
+ if(verbosity>999) cout << " ++\n";
+ }
+
+ if(verbosity>999) cout << " @@ "<< asum << endl;;
+
+ }
+
+ }// end int level set ...
+ else // int on edge ie
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+ pa =a;
+ GQuadraturePoint<R2> pi( FIb[npi]);
+ R3 NN= T.N(ie);
+ double mes=NN.norme();
+ NN/=mes;
+ double coef = 0.5*mes*pi.a; // correction 0.5 050109 FH
+ R3 Pt(T.PBord(ie,pi));
+ Ku.BF(Dop,Pt,fu);
+ if (!same) Kv.BF(Dop,Pt,fv);
+ MeshPointStack(stack)->set(T(Pt),Pt,Ku,label,NN,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+
+ for ( i=0; i<n; i++ )
+ {
+ RNM_ wi(fv(i,'.','.'));
+ for ( j=0; j<m; j++,pa++ )
+ {
+ RNM_ wj(fu(j,'.','.'));
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( ccc != cc) {
+ cerr << cc << " != " << ccc << " => ";
+ cerr << "Sorry error in Optimization (b) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ *pa += coef * ccc * w_i*w_j;
+ }
+ }
+ }
+ }
+
+
+ if (Ku.Vh.Th(T) <1 && verbosity>100) {
+ pa=mat.a;
+ cout <<endl << " Tet " << Ku.Vh.Th(T) << " = " << T << " " << nx << endl;
+ for (int i=0;i<n;i++)
+ {
+ cout << setw(2) << i << setw(4) << mat.ni[i] << " :";
+ for (int j=0;j<m;j++)
+ cout << setw(5) << (*pa++) << " ";
+ cout << endl;
+ } }
+
+
+ }
+ // xxxxxxxxxxxxxxxxx modif a faire
+ template<class R>
+ void Element_Op(MatriceElementairePleine<R,FESpace> & mat,const FElement & Ku,const FElement & Kv,double * p,int ie,int label,void *vstack,R2 *B)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ typedef FElement::Element Element;
+ MeshPoint mp= *MeshPointStack(stack);
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+
+ bool same = &Ku == & Kv;
+ const Element & T = Ku.T;
+ throwassert(&T == &Kv.T);
+ const QuadratureFormular & FI = mat.FIT;
+ const QuadratureFormular1d & FIb = mat.FIE;
+ long npi;
+ R *a=mat.a;
+ R *pa=a;
+ long i,j;
+ long n= mat.n,m=mat.m,nx=n*m;
+ long N= Kv.N;
+ long M= Ku.N;
+
+
+
+
+
+ const Opera &Op(*mat.bilinearform);
+ bool classoptm = copt && Op.optiexpK;
+ bool oldopt=1; // juin 2007 FH ???? a voir
+ int iloop=0;
+ KN<bool> unvarexp(classoptm ? Op.optiexpK->sizevar() : 1);
+ if (Ku.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_Op P: copt = " << copt << " " << classoptm << endl;
+ assert(Op.MaxOp() <last_operatortype);
+
+
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ //assert(lastop<=3);
+ RNMK_ fv(p,n,N,lastop); // the value for basic fonction
+ RNMK_ fu(p+ (same ?0:n*N*lastop) ,m,M,lastop); // the value for basic fonction
+
+ for (i=0;i< nx;i++)
+ *pa++ = 0.;
+ if (ie<0 )//&& B==0)
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadraturePoint pi(FI[npi]);
+ R mes = B ? B->x : T.area;
+ R coef = mes *pi.a;
+ R2 Pt(pi);
+ pa =a;
+ Ku.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv);
+ if (classoptm) {
+ if( oldopt) (*Op.optiexpK)(stack); // call old optim version
+ else Op.optiexpK->eval(stack,iloop++,unvarexp); // new optim version
+ }
+ if (!same) Kv.BF(Dop,Pt,fv);
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ //cout << *(copt[il]) << " == " << cc << endl;
+ if ( ccc != cc) {
+ cerr << cc << " != " << ccc << " => ";
+ cerr << "Sorry error in Optimization (a) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ int fi=Kv.dfcbegin(icomp);
+ int li=Kv.dfcend(icomp);
+ int fj=Ku.dfcbegin(jcomp);
+ int lj=Ku.dfcend(jcomp);
+ fi=0,fj=0;
+ li=n,lj=m;
+ ccc *= coef;
+
+ // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ for ( i=fi; i<li; i++ )
+ {
+ for ( j=fj; j<lj; j++ )
+ {
+ R w_i = fv(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+ mat(i,j) += ccc * w_i*w_j;
+ }
+ }
+ }
+ }
+ else if(B)
+ { // int on isovalue ...
+ R2 PA(B[0]),PB(B[1]);
+ R2 A=T(PA),B=T(PB);
+ R2 E(A,B);
+ double le = sqrt((E,E));
+ // cout << " xxxx "<< le << " "<< A << " " << B << endl;
+ if(le > 1e-15) // bofbof ????
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+ pa =a;
+ QuadratureFormular1dPoint pi( FIb[npi]);
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+ R2 Pt(PA*sa+PB*sb ); //
+ Ku.BF(Dop,Pt,fu);
+ if (!same) Kv.BF(Dop,Pt,fv);
+ // int label=-999999; // a passer en argument
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv,-1,R2(E.y,-E.x)/le,-1);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ //cout << *(copt[il]) << " == " << cc << endl;
+ if ( ccc != cc) {
+ cerr << cc << " != " << ccc << " => ";
+ cerr << "Sorry error in Optimization (a) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ int fi=Kv.dfcbegin(icomp);
+ int li=Kv.dfcend(icomp);
+ int fj=Ku.dfcbegin(jcomp);
+ int lj=Ku.dfcend(jcomp);
+ ccc *= coef;
+
+ // attention la fonction test donne la ligne
+ // et la fonction test est en second
+
+ for ( i=fi; i<li; i++ )
+ {
+ for ( j=fj; j<lj; j++ )
+ {
+ R w_i = fv(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+ mat(i,j) += ccc * w_i*w_j;
+ }
+ }
+ }
+ }
+ }
+ else // int on edge ie
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+ pa =a;
+ QuadratureFormular1dPoint pi( FIb[npi]);
+ R2 E=T.Edge(ie);
+ double le = sqrt((E,E));
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+ R2 PA(TriangleHat[VerticesOfTriangularEdge[ie][0]]),
+ PB(TriangleHat[VerticesOfTriangularEdge[ie][1]]);
+ R2 Pt(PA*sa+PB*sb ); //
+ Ku.BF(Dop,Pt,fu);
+ if (!same) Kv.BF(Dop,Pt,fv);
+ // int label=-999999; // a passer en argument
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv,label,R2(E.y,-E.x)/le,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ //cout << *(copt[il]) << " == " << cc << endl;
+ if ( ccc != cc) {
+ cerr << cc << " != " << ccc << " => ";
+ cerr << "Sorry error in Optimization (a) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ int fi=Kv.dfcbegin(icomp);
+ int li=Kv.dfcend(icomp);
+ int fj=Ku.dfcbegin(jcomp);
+ int lj=Ku.dfcend(jcomp);
+ ccc *= coef;
+
+ // attention la fonction test donne la ligne
+ // et la fonction test est en second
+
+ for ( i=fi; i<li; i++ )
+ {
+ for ( j=fj; j<lj; j++ )
+ {
+ R w_i = fv(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+ mat(i,j) += ccc * w_i*w_j;
+ }
+ }
+ }
+
+ /*
+ for ( i=0; i<n; i++ )
+ // if (onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // juste the df on edge bofbof generaly wrong FH dec 2003
+ {
+ RNM_ wi(fv(i,'.','.'));
+ for ( j=0; j<m; j++,pa++ )
+ {
+ RNM_ wj(fu(j,'.','.'));
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ // if (onWhatIsEdge[ie][Kv.DFOnWhat(j)]) // juste the df on edge bofbof generaly wrong FH dec 2003
+ {
+ BilinearOperator::K ll(*l);
+ pair<int,int> jj(ll.first.first),ii(ll.first.second);
+
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+ // R ccc = GetAny<R>(ll.second.eval(stack));
+
+ R ccc = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( ccc != cc) {
+ cerr << cc << " != " << ccc << " => ";
+ cerr << "Sorry error in Optimization (b) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ *pa += coef * ccc * w_i*w_j;
+ }
+ }
+ }
+ // else pa += m; FH dec 2003
+ */
+ }
+
+
+ /* pa=a;
+ if (Ku.Vh.Th(T) >=0 ) {
+ cout <<endl << " Triangle " << Ku.Vh.Th(T) << " = "<< T[0] << ", " << T[1] << ", " << T[2] << " " << nx << endl;
+ for (int i=0;i<n;i++)
+ {
+ cout << setw(2) << i << setw(4) << mat.ni[i] << " :";
+ for (int j=0;j<m;j++)
+ cout << setw(5) << (*pa++) << " ";
+ cout << endl;
+ } }
+ */
+ *MeshPointStack(stack) = mp;
+ }
+
+
+
+ template<class R>
+ void Element_Op(MatriceElementaireSymetrique<R,FESpace3> & mat,const FElement3 & Ku,double * p,int ie,int label, void * vstack,R3 *B)
+ {
+ // ffassert(B==0);
+ Stack stack=pvoid2Stack(vstack);
+ typedef FESpace3 FESpace;
+ typedef typename FESpace3::Mesh Mesh;
+ typedef Mesh *pmesh ;
+ typedef typename Mesh::Element Element;
+ MeshPoint mp= *MeshPointStack(stack);
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Element & T = Ku.T;
+
+ const GQuadratureFormular<R3> & FI = mat.FIT;
+ const GQuadratureFormular<R2> & FIb = mat.FIE;
+
+ long npi;
+ R *a=mat.a;
+ R *pa=a;
+ long i,j;
+ long n= mat.n,m=mat.m,nx=n*(m+1)/2;
+ long N= Ku.N;
+
+ assert(mat.bilinearform);
+
+ const Opera &Op(*mat.bilinearform);
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) || (Op.where_in_stack_opt.size() !=0) );
+ int lastop;
+ What_d Dop = Op.DiffOp(lastop);
+
+ if (Ku.number<1 && verbosity/100 && verbosity % 10 == 2 )
+ cout << "Element_Op S 3d: copt = " << copt << " " << classoptm << " lastop = "<< lastop << " Dop " << Dop << endl;
+ assert(Op.MaxOp() <last_operatortype);
+
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+
+
+ pa =a;
+ for (i=0;i< nx;i++)
+ *pa++ = 0.;
+
+ if (ie<0)
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R3> pi(FI[npi]);
+ double coef = T.mesure()*pi.a;
+ //R3 Pt(pi);
+ pa =a;
+ Ku.BF(Dop,pi,fu);
+ MeshPointStack(stack)->set(T(pi),pi,Ku);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+
+ R c = copt ? *(copt[il]): GetAny<R>(ll.second.eval(stack));
+ if ( copt && Ku.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ // cout << *(copt[il]) << " == " << cc << endl;
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization (c) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ c *= coef ;
+ long fi=Ku.dfcbegin(icomp);
+ long li=Ku.dfcend(icomp);
+ long fj=Ku.dfcbegin(jcomp);
+ long lj=Ku.dfcend(jcomp);
+
+ for ( i=fi; i<li; i++ )
+ for ( j=fj; j<min(lj,i+1); j++,pa++ ) //
+ {
+ R w_i = fu(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+
+ mat(i,j) += c * w_i*w_j;
+
+ /*
+ if (Ku.Vh.Th(T) < 1 && npi < 1 && i < 1 && j < 1 )
+ cout <<" + " << c << " (" <<coef << " " << w_i << " " << w_j << " " << jj.first << " " << jj.second << ") " ;
+ */
+ }
+
+ }
+
+ }
+ else if(B)
+ { // int on leveset
+ int np = ie-10; //= (B[0].x == B[3].x ) && (B[0].y == B[3].y ) && (B[0].z == B[3].z ) ? 3 : 4;
+ if(verbosity>999) cout << " Ass mat pleine /"<< np << endl;
+ assert( np==3 || np==4);
+ // XXXXXXX
+ double epsmes3=T.mesure()*T.mesure()*1e-18;
+ R3 PP[4];
+ double l[3];
+ for(int i=0; i< np; ++i)
+ PP[i]= T(B[i]);
+
+ for( int i =0; i+1 < np; i+=2)
+ { // 0,1,, a and 2,3,0.
+ int i0=i,i1=i+1,i2=(i+2)%np;
+ R3 NN= R3(PP[i0],PP[i1])^R3(PP[i0],PP[i2]);
+ double mes2 = (NN,NN);
+ double mes = sqrt(mes2);
+
+ if(mes2*mes <epsmes3) continue; // too small
+ NN /= mes;
+ mes *= 0.5;
+ if(verbosity>999)
+ cout << " --int on leveset3d " << np << " " << mes << " " << i0<<i1<<i2 <<endl;
+ double asum=0;
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R2> pi( FIb[npi]);
+ // cout << " %% " << npi << " " << pi.a << " " << pi.x << " " << pi.y << endl;
+ asum+= pi.a;
+ pi.toBary(l);
+ R3 Pt( l[0]*B[i0]+l[1]*B[i1]+l[2]*B[i2]); //
+ double coef = mes*pi.a; // correction 0.5 050109 FH
+ Ku.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(Pt),Pt,Ku,label,NN,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+ pa=a;
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+ R c = copt ? *(copt[il]): GetAny<R>(ll.second.eval(stack));
+ if ( copt && Ku.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ // cout << *(copt[il]) << " == " << cc << endl;
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization (c) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ c *= coef ;
+ long fi=Ku.dfcbegin(icomp);
+ long li=Ku.dfcend(icomp);
+ long fj=Ku.dfcbegin(jcomp);
+ long lj=Ku.dfcend(jcomp);
+
+ for (long i=fi; i<li; i++ )
+ for (long j=fj; j<min(lj,i+1); j++,pa++ ) //
+ {
+ R w_i = fu(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+
+ mat(i,j) += c * w_i*w_j;
+
+ /*
+ if (Ku.Vh.Th(T) < 1 && npi < 1 && i < 1 && j < 1 )
+ cout <<" + " << c << " (" <<coef << " " << w_i << " " << w_j << " " << jj.first << " " << jj.second << ") " ;
+ */
+ }
+
+ }
+
+
+
+ }
+
+
+ }
+
+ }// end int level set ...
+ else
+ // int on edge ie
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+
+ pa =a;
+ GQuadraturePoint<R2> pi( FIb[npi]);
+ R3 NN= T.N(ie);
+ double mes=NN.norme();
+ NN/=mes;
+ mes *=0.5;
+ double coef = mes*pi.a; // correction 0.5 050109 FH
+ R3 Pt(T.PBord(ie,pi));
+ Ku.BF(Dop,Pt,fu);
+ // int label=-999999; // a passer en argument
+ MeshPointStack(stack)->set(T(Pt),Pt,Ku,label,NN,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+ R c = copt ? *(copt[il]): GetAny<R>(ll.second.eval(stack));
+ if ( copt && Ku.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ // cout << *(copt[il]) << " == " << cc << endl;
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization (c) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ c *= coef ;
+ long fi=Ku.dfcbegin(icomp);
+ long li=Ku.dfcend(icomp);
+ long fj=Ku.dfcbegin(jcomp);
+ long lj=Ku.dfcend(jcomp);
+
+ for (long i=fi; i<li; i++ )
+ for (long j=fj; j<min(lj,i+1); j++,pa++ ) //
+ {
+ R w_i = fu(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+
+ mat(i,j) += c * w_i*w_j;
+
+ /*
+ if (Ku.Vh.Th(T) < 1 && npi < 1 && i < 1 && j < 1 )
+ cout <<" + " << c << " (" <<coef << " " << w_i << " " << w_j << " " << jj.first << " " << jj.second << ") " ;
+ */
+ }
+
+ }
+
+
+ }
+
+
+ pa=a;
+ if (Ku.Vh.Th(T) <0 & verbosity>100) {
+ cout <<endl << " Tet " << Ku.Vh.Th(T) << " = "<< T << " nx= " << nx << endl;
+ for (int i=0;i<n;i++)
+ {
+ cout << setw(2) << i << setw(4) << mat.ni[i] << " :";
+ for (int j=0;j<=i;j++)
+ cout << setw(5) << (*pa++) << " ";
+ cout << endl;
+ } }
+ /*
+ pa=a;
+ for (int i=0;i<n;i++)
+ cout << mat.ni[i] << " " ;
+ for (int i=0;i<n;i++)
+ for (int j=0;j<n;j++,pa++)
+ if ( mat.ni[i]==150 && mat.nj[j] == 150)
+ cout << "a_150,150 = "<< *pa ;
+ cout << endl;
+ */
+
+ *MeshPointStack(stack) = mp;
+
+ }
+
+ // xxxxxxxxxxxxxxxxx modif a faire
+ template<class R>
+ void Element_Op(MatriceElementaireSymetrique<R,FESpace> & mat,const FElement & Ku,double * p,int ie,int label, void * vstack,R2*B)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ MeshPoint mp= *MeshPointStack(stack);
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Triangle & T = Ku.T;
+ // const QuadratureFormular & FI = QuadratureFormular_T_2;
+ // const QuadratureFormular1d & FIb = QF_GaussLegendre2;
+ const QuadratureFormular & FI = mat.FIT;
+ const QuadratureFormular1d & FIb = mat.FIE;
+ long npi;
+ R *a=mat.a;
+ R *pa=a;
+ long i,j;
+ long n= mat.n,m=mat.m,nx=n*(m+1)/2;
+ long N= Ku.N;
+ //long M=N;
+ // bool show = Ku.Vh.Th(T)==0;
+ // char * xxx[] ={" u"," v"," p"," q"," r"};
+ //char * xxxx[] ={" u'"," v'"," p'"," q'"," r'"};
+ //char * yyy[] ={" ","_x ","_y "};
+
+
+ throwassert(mat.bilinearform);
+
+ const Opera &Op(*mat.bilinearform);
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) || (Op.where_in_stack_opt.size() !=0) );
+ if (Ku.number<1 && verbosity/100 && verbosity % 10 == 2 )
+ cout << "Element_Op S: copt = " << copt << " " << classoptm << endl;
+ assert(Op.MaxOp() <last_operatortype);
+
+
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ // assert(lastop<=3);
+
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+
+ pa =a;
+ for (i=0;i< nx;i++)
+ *pa++ = 0.;
+
+ if (ie<0)
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadraturePoint pi(FI[npi]);
+ double mes= B ? B->x :T.area;
+ double coef = mes*pi.a;
+ R2 Pt(pi);
+ pa =a;
+ Ku.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(pi),pi,Ku);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+ R c = copt ? *(copt[il]): GetAny<R>(ll.second.eval(stack));
+ if ( copt && Ku.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ // cout << *(copt[il]) << " == " << cc << endl;
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization (c) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ c *= coef ;
+ long fi=Ku.dfcbegin(icomp);
+ long li=Ku.dfcend(icomp);
+ long fj=Ku.dfcbegin(jcomp);
+ long lj=Ku.dfcend(jcomp);
+ if (verbosity>10 && Ku.Vh.Th(T) < 1 && npi < 1)
+ cout << " ic "<< icomp << fi<< " "<< lj << " "<< " c "<< jcomp << " " <<fj << " "<< lj << endl;
+ for ( i=fi; i<li; i++ )
+ for ( j=fj; j<min(lj,i+1); j++ ) //
+ {
+ R w_i = fu(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+
+ mat(i,j) += c * w_i*w_j;
+
+ }
+
+ }
+
+ /*
+ for ( i=0; i<n; i++ )
+ {
+ RNM_ wi(fu(i,'.','.'));
+ // if (Ku.Vh.Th(T) < 1) cout << i <<" " <<Pt<< "wi =" << wi ;
+ for ( j=0; j<=i; j++,pa++ ) //
+ {
+
+ RNM_ wj(fu(j,'.','.'));
+ // if (Ku.Vh.Th(T) < 1) cout << j <<" " <<Pt<< "wj =" << wj ;
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ const BilinearOperator::K & ll(*l);
+ pair<int,int> ii(ll.first.first),jj(ll.first.second);
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+
+ R c = copt ? *(copt[il]): GetAny<R>(ll.second.eval(stack));
+ if ( copt && Ku.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ // cout << *(copt[il]) << " == " << cc << endl;
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization (c) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+ *pa += coef * c * w_i*w_j;
+ }
+ }
+
+ }*/
+
+ }
+ else if(B)
+ {
+ R2 PA(B[0]),PB(B[0]);
+ R2 A=T(PA),B=T(PB);
+ R2 E(A,B);
+ double le = sqrt((E,E));
+ if(le > 1e-15)
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+
+ pa =a;
+ QuadratureFormular1dPoint pi( FIb[npi]);
+
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+ R2 Pt(PA*sa+PB*sb ); //
+ Ku.BF(Dop,Pt,fu);
+ // int label=-999999; // a passer en argument
+ MeshPointStack(stack)->set(T(Pt),Pt,Ku,0,R2(E.y,-E.x)/le,0);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+ R c = copt ? *(copt[il]): GetAny<R>(ll.second.eval(stack));
+ if ( copt && Ku.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ // cout << *(copt[il]) << " == " << cc << endl;
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization (c) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ c *= coef ;
+ long fi=Ku.dfcbegin(icomp);
+ long li=Ku.dfcend(icomp);
+ long fj=Ku.dfcbegin(jcomp);
+ long lj=Ku.dfcend(jcomp);
+
+ for ( i=fi; i<li; i++ )
+ for ( j=fj; j<min(lj,i+1); j++,pa++ ) //
+ {
+ R w_i = fu(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+
+ mat(i,j) += c * w_i*w_j;
+ /*
+ if (Ku.Vh.Th(T) < 1 && npi < 1 && i < 1 && j < 1 )
+ cout <<" + " << c << " (" <<coef << " " << w_i << " " << w_j << " " << jj.first << " " << jj.second << ") " ;
+ */
+ }
+
+ }
+ }
+ }
+ else // int on edge ie
+ for (npi=0;npi<FIb.n;npi++) // loop on the integration point
+ {
+
+ pa =a;
+ QuadratureFormular1dPoint pi( FIb[npi]);
+ R2 E=T.Edge(ie);
+ double le = sqrt((E,E));
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+ R2 PA(TriangleHat[VerticesOfTriangularEdge[ie][0]]),
+ PB(TriangleHat[VerticesOfTriangularEdge[ie][1]]);
+ R2 Pt(PA*sa+PB*sb ); //
+ Ku.BF(Dop,Pt,fu);
+ // int label=-999999; // a passer en argument
+ MeshPointStack(stack)->set(T(Pt),Pt,Ku,label,R2(E.y,-E.x)/le,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ { // attention la fonction test donne la ligne
+ // et la fonction test est en second
+ BilinearOperator::K ll(*l);
+ // pair<int,int> jj(ll.first.first),ii(ll.first.second);
+ long jcomp= ll.first.first.first,jop=ll.first.first.second;
+ long icomp= ll.first.second.first,iop=ll.first.second.second;
+
+ R c = copt ? *(copt[il]): GetAny<R>(ll.second.eval(stack));
+ if ( copt && Ku.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ // cout << *(copt[il]) << " == " << cc << endl;
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization (c) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ c *= coef ;
+ long fi=Ku.dfcbegin(icomp);
+ long li=Ku.dfcend(icomp);
+ long fj=Ku.dfcbegin(jcomp);
+ long lj=Ku.dfcend(jcomp);
+
+ for ( i=fi; i<li; i++ )
+ for ( j=fj; j<min(lj,i+1); j++,pa++ ) //
+ {
+ R w_i = fu(i,icomp,iop);
+ R w_j = fu(j,jcomp,jop);
+
+ mat(i,j) += c * w_i*w_j;
+ /*
+ if (Ku.Vh.Th(T) < 1 && npi < 1 && i < 1 && j < 1 )
+ cout <<" + " << c << " (" <<coef << " " << w_i << " " << w_j << " " << jj.first << " " << jj.second << ") " ;
+ */
+ }
+
+ }
+
+ /*
+ for ( i=0; i<n; i++ )
+ // if ( onWhatIsEdge[ie][Ku.DFOnWhat(i)]) // generaly wrong FH dec 2003
+ {
+ RNM_ wi(fu(i,'.','.'));
+ for ( j=0; j<=i; j++,pa++ )
+ {
+ RNM_ wj(fu(j,'.','.'));
+ int il=0;
+ for (BilinearOperator::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ // if (onWhatIsEdge[ie][Ku.DFOnWhat(j)]) // generaly wrong FH dec 2003
+ {
+ BilinearOperator::K ll(*l);
+ pair<int,int> ii(ll.first.first),jj(ll.first.second);
+ double w_i = wi(ii.first,ii.second);
+ double w_j = wj(jj.first,jj.second);
+ // R ccc = GetAny<R>(ll.second.eval(stack));
+ R ccc = copt ? *(copt[il]): GetAny<R>(ll.second.eval(stack));
+ if ( copt && Ku.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( ccc != cc) {
+ cerr << ccc << " != " << cc << ", xy = "<< T(Pt) << " => ";
+ cerr << "Sorry error in Optimization (d) add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+ *pa += coef * ccc * w_i*w_j;
+ }
+ }
+ } //else pa+= i+1;
+ */
+ }
+
+ /*
+ pa=a;
+ if (Ku.Vh.Th(T) <=0 ) {
+ cout <<endl << " Triangle " << Ku.Vh.Th(T) << " = "<< T[0] << ", " << T[1] << ", " << T[2] << " " << nx << endl;
+ for (int i=0;i<n;i++)
+ {
+ cout << setw(2) << i << setw(4) << mat.ni[i] << " :";
+ for (int j=0;j<=i;j++)
+ cout << setw(5) << (*pa++) << " ";
+ cout << endl;
+ } }
+ pa=a;
+ for (int i=0;i<n;i++)
+ cout << mat.ni[i] << " " ;
+ for (int i=0;i<n;i++)
+ for (int j=0;j<n;j++,pa++)
+ if ( mat.ni[i]==150 && mat.nj[j] == 150)
+ cout << "a_150,150 = "<< *pa ;
+ cout << endl;
+ */
+
+ *MeshPointStack(stack) = mp;
+
+ }
+
+
+
+ // #pragma optimization_level 0
+ template<class R>
+ void Element_rhs(const FElement & Kv,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const QuadratureFormular & FI = QuadratureFormular_T_2)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Triangle & T = Kv.T;
+ // const QuadratureFormular & FI = QuadratureFormular_T_2;
+ // const QuadratureFormular & FI = QuadratureFormular_T_2;
+ long npi;
+ long i,n=Kv.NbDoF(),N=Kv.N;
+
+ // bool show = Kv.Vh.Th(T)==0;
+ // char * xxx[] ={" u"," v,"," p"," q"," r"};
+ // char * xxxx[] ={" u'"," v',"," p'"," q'"," r'"};
+ // char * yyy[] ={" ","_x ","_y "};
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (Kv.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs S0: copt = " << copt << " " << classoptm << endl;
+
+
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ assert(Op.MaxOp() <last_operatortype);
+
+ // assert(lastop<=3);
+
+
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadraturePoint pi(FI[npi]);
+ double coef = T.area*pi.a;
+ R2 Pt(pi);
+ Kv.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ for ( i=0; i<n; i++ )
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ double w_i = wi(ii.first,ii.second);
+ //copt=0;
+ R c = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack)); //GetAny<double>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ //if (Kv.number<5) cout << il<< " " << i << " c== " << c << endl;
+ R a = coef * c * w_i;
+ B[Kv(i)] += a;
+ }
+ }
+
+
+ }
+ *MeshPointStack(stack) = mp;
+
+
+ }
+
+ // 3D
+ template<class R>
+ void Element_rhs(const FElement3 & Kv,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const GQuadratureFormular<R3> & FI = QuadratureFormular_Tet_2)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ typedef FElement3::Element Element;
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Element & T = Kv.T;
+ // const QuadratureFormular & FI = QuadratureFormular_T_2;
+ // const QuadratureFormular & FI = QuadratureFormular_T_2;
+ long npi;
+ long i,n=Kv.NbDoF(),N=Kv.N;
+
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (Kv.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs S0: copt = " << copt << " " << classoptm << endl;
+
+
+ int lastop;
+ What_d Dop = Op.DiffOp(lastop);
+ assert(Op.MaxOp() <last_operatortype);
+
+ // assert(lastop<=3);
+
+
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R3> pi(FI[npi]);
+ double coef = T.mesure()*pi.a;
+ R3 Pt(pi);
+ Kv.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ for ( i=0; i<n; i++ )
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ double w_i = wi(ii.first,ii.second);
+ //copt=0;
+ R c = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack)); //GetAny<double>(ll.second.eval(stack));
+ if ( copt && Kv.number <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+ //if (Kv.number<5) cout << il<< " " << i << " c== " << c << endl;
+ R a = coef * c * w_i;
+ B[Kv(i)] += a;
+ }
+ }
+
+
+ }
+ *MeshPointStack(stack) = mp;
+
+
+ }
+ // fin 3d
+ // #pragma optimization_level 0
+ // 3d
+ template<class R>
+ void Element_rhs(const Mesh3 & ThI,const Mesh3::Element & KI,
+ const FESpace3 & Vh,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const GQuadratureFormular<R3> & FI)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ // AFAIRE("Element_rhs 3d diff meshes");
+ static int count=0;
+ if(count++<1)
+ {
+ cout << "Warning: Element_rhs 3 3d diff meshes in test (FH) " << endl;
+ cout << "--------------------------------------------------- " << endl;
+ }
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ // int maxd = Op.MaxOp();
+ // assert(maxd<last_operatortype);
+ const Tet * Kp=0;
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (ThI(KI)<1 && verbosity/100 && verbosity % 10 == 2)
+
+ cout << "Element_rhs 3d 3: copt = " << copt << " " << classoptm << endl;
+
+ assert(Op.MaxOp() <last_operatortype);
+ //
+ int lastop=0;
+ lastop = 0;
+ What_d Dop = Op.DiffOp(lastop);
+ assert(Op.MaxOp() <last_operatortype);
+
+ // assert(lastop<=3);
+
+ for (long npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R3> pi(FI[npi]);
+ R3 PI(KI(pi));
+ double coef = KI.mesure()*pi.a;
+ MeshPointStack(stack)->set(ThI,PI,pi,KI,KI.lab);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ bool outside;
+ R3 Pt;
+ const Tet & K = *Vh.Th.Find(PI,Pt,outside,Kp);
+ if ( ! outside)
+ {
+ const FElement3 Kv= Vh[K];
+ long i,n=Kv.NbDoF(),N=Kv.N;
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+ Kv.BF(Dop,Pt,fu);
+
+ for ( i=0; i<n; i++ )
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+
+ double w_i = wi(ii.first,ii.second);
+
+ R c = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));;//GetAny<double>(ll.second.eval(stack));
+ if ( copt && ThI(KI) <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+ R a = coef * c * w_i;
+ B[Kv(i)] += a;
+ }
+ }
+ }
+ Kp = & K;
+ }
+ *MeshPointStack(stack) = mp;
+
+
+}
+ //
+ template<class R>
+ void Element_rhs(const Mesh & ThI,const Triangle & KI,
+ const FESpace & Vh,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const QuadratureFormular & FI = QuadratureFormular_T_2)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+// int maxd = Op.MaxOp();
+// assert(maxd<last_operatortype);
+ const Triangle * Kp=0;
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (ThI(KI)<1 && verbosity/100 && verbosity % 10 == 2)
+
+ cout << "Element_rhs 3: copt = " << copt << " " << classoptm << endl;
+
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ assert(Op.MaxOp() <last_operatortype);
+
+ // assert(lastop<=3);
+
+ for (long npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadraturePoint pi(FI[npi]);
+ R2 PI(KI(pi));
+ double coef = KI.area*pi.a;
+ MeshPointStack(stack)->set(ThI,PI,pi,KI,KI.lab);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ bool outside;
+ R2 Pt;
+ const Triangle & K = *Vh.Th.Find(PI,Pt,outside,Kp);
+ if ( ! outside)
+ {
+ const FElement Kv= Vh[K];
+ long i,n=Kv.NbDoF(),N=Kv.N;
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+ Kv.BF(Dop,Pt,fu);
+
+ for ( i=0; i<n; i++ )
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+
+ double w_i = wi(ii.first,ii.second);
+
+ R c = copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));;//GetAny<double>(ll.second.eval(stack));
+ if ( copt && ThI(KI) <1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " != " << cc << " => ";
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+ R a = coef * c * w_i;
+ B[Kv(i)] += a;
+ }
+ }
+ }
+ Kp = & K;
+ }
+ *MeshPointStack(stack) = mp;
+
+
+ }
+ // 3d
+ template<class R>
+ void Element_rhs(const FElement3 & Kv,int ie,int label,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const QuadratureFormular & FI ,bool alledges=false)
+ {
+ // AFAIRE("Element_rhs on border");
+ Stack stack=pvoid2Stack(vstack);
+ typedef FElement3::Element Element;
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Element & T = Kv.T;
+ long npi;
+ long i,n=Kv.NbDoF(),N=Kv.N;
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (Kv.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs 3d S: copt = " << copt << " " << classoptm << endl;
+ int lastop;
+ What_d Dop = Op.DiffOp(lastop);
+
+ assert(Op.MaxOp() <last_operatortype);
+ // assert(lastop<=3);
+
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R2> pi( FI[npi]);
+ R3 NN=T.N(ie);
+ double le= NN.norme();
+ NN /= le;
+ double coef = le*pi.a*0.5;// correction 050109 FH
+ R3 Pt(T.PBord(ie,pi));
+ //
+ Kv.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv,label,NN,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+ for ( i=0; i<n; i++ )
+ // if (alledges || onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // bofbof faux si il y a des derives ..
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ double w_i = wi(ii.first,ii.second);
+ R c =copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ // FFCS - removing what is probably a small glitch
+ if ( copt && Kv.number<1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " =! " << cc << endl;
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+
+ //= GetAny<double>(ll.second.eval(stack));
+
+ B[Kv(i)] += coef * c * w_i;
+ }
+ }
+
+
+ }
+ *MeshPointStack(stack) = mp;
+
+ }
+ // 3d isoline ... levelset ...
+ template<class R>
+ void Element_rhs(const FElement3 & Kv,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const QuadratureFormular & FI ,int np, R3 *Q)
+ {
+ // AFAIRE("Element_rhs on border");
+ Stack stack=pvoid2Stack(vstack);
+ typedef FElement3::Element Element;
+
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Element & K = Kv.T;
+ const Mesh3 & Th= Kv.Vh.Th;
+ double epsmes3=K.mesure()*K.mesure()*1e-18;
+ long npi;
+ long n=Kv.NbDoF(),N=Kv.N;
+ double l[3];
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (Kv.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs 3d S(levelset): copt = " << copt << " " << classoptm << endl;
+ int lastop;
+ What_d Dop = Op.DiffOp(lastop);
+
+ assert(Op.MaxOp() <last_operatortype);
+ // assert(lastop<=3);
+
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+ R3 PP[4];
+ for(int i=0; i< np; ++i)
+ PP[i]= K(Q[i]);
+
+ for( int iii =0; iii+1 < np; iii+=2)
+ { // 0,1,, a and 2,3,0.
+ int i0=iii,i1=iii+1,i2=(iii+2)%np;
+ R3 NN= R3(PP[i0],PP[i1])^R3(PP[i0],PP[i2]);
+ double mes2 = (NN,NN);
+ double mes = sqrt(mes2);
+ if(mes2*mes <epsmes3) continue; // too small
+ NN /= mes;
+ mes *= 0.5;
+ // cout << " Element_rhs::mes " << mes << " " << iii << endl;
+
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ GQuadraturePoint<R2> pi( FI[npi]);
+ pi.toBary(l);
+ R3 Pt( l[0]*Q[i0]+l[1]*Q[i1]+l[2]*Q[i2]); //
+ MeshPointStack(stack)->set(Th,K(Pt),Pt,K,-1,NN,-1);
+ //
+ Kv.BF(Dop,Pt,fu);
+ // MeshPointStack(stack)->set(K(Pt),Pt,Kv,label,NN,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ double coef = mes*pi.a;
+ for (int i=0; i<n; i++ )
+ // if (alledges || onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // bofbof faux si il y a des derives ..
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ double w_i = wi(ii.first,ii.second);
+ R c =copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ // FFCS - removing what is probably a small glitch
+ if ( copt && Kv.number<1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " =! " << cc << endl;
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+
+ //= GetAny<double>(ll.second.eval(stack));
+
+ B[Kv(i)] += coef * c * w_i;
+ }
+ }
+
+
+ }
+ }
+ *MeshPointStack(stack) = mp;
+
+}
+
+
+
+ // end 3d
+
+
+ template<class R>
+ void Element_rhs(const FElement & Kv,int ie,int label,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const QuadratureFormular1d & FI = QF_GaussLegendre2,bool alledges=false)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Triangle & T = Kv.T;
+ // const QuadratureFormular1d & FI = QF_GaussLegendre2;
+ long npi;
+ long i,n=Kv.NbDoF(),N=Kv.N;
+
+ // bool show = Kv.Vh.Th(T)==0;
+ // char * xxx[] ={" u"," v,"," p"," q"," r"};
+ // char * xxxx[] ={" u'"," v',"," p'"," q'"," r'"};
+ // char * yyy[] ={" ","_x ","_y "};
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (Kv.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs S: copt = " << copt << " " << classoptm << endl;
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ assert(Op.MaxOp() <last_operatortype);
+ // assert(lastop<=3);
+
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadratureFormular1dPoint pi( FI[npi]);
+ R2 E=T.Edge(ie);
+ double le = sqrt((E,E));
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+ R2 PA(TriangleHat[VerticesOfTriangularEdge[ie][0]]),
+ PB(TriangleHat[VerticesOfTriangularEdge[ie][1]]);
+ R2 Pt(PA*sa+PB*sb ); //
+ Kv.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv,label,R2(E.y,-E.x)/le,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+ for ( i=0; i<n; i++ )
+ // if (alledges || onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // bofbof faux si il y a des derives ..
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ double w_i = wi(ii.first,ii.second);
+ R c =copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ // FFCS - removing what is probably a small glitch
+ if ( copt && Kv.number<1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " =! " << cc << endl;
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+
+ //= GetAny<double>(ll.second.eval(stack));
+
+ B[Kv(i)] += coef * c * w_i;
+ }
+ }
+
+
+ }
+ *MeshPointStack(stack) = mp;
+
+ }
+
+ template<class R>
+ void Element_rhs(const FElement & Kv,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const QuadratureFormular1d & FI ,const R2 & PPA,const R2 &PPB)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Triangle & T = Kv.T;
+ R2 PA=T(PPA),PB=T(PPB);
+ // const QuadratureFormular1d & FI = QF_GaussLegendre2;
+ long npi;
+ long i,n=Kv.NbDoF(),N=Kv.N;
+
+ // bool show = Kv.Vh.Th(T)==0;
+ // char * xxx[] ={" u"," v,"," p"," q"," r"};
+ // char * xxxx[] ={" u'"," v',"," p'"," q'"," r'"};
+ // char * yyy[] ={" ","_x ","_y "};
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (Kv.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs(levelset) S: copt = " << copt << " " << classoptm << endl;
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ assert(Op.MaxOp() <last_operatortype);
+ // assert(lastop<=3);
+
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadratureFormular1dPoint pi( FI[npi]);
+ R2 E(PA,PB);
+ double le = sqrt((E,E));
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+
+ R2 Pt(PA*sa+PB*sb ); //
+ Kv.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv,0,R2(E.y,-E.x)/le,0);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+ for ( i=0; i<n; i++ )
+ // if (alledges || onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // bofbof faux si il y a des derives ..
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ double w_i = wi(ii.first,ii.second);
+ R c =copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ // FFCS - removing what is probably a small glitch
+ if ( copt && Kv.number<1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " =! " << cc << endl;
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+
+ //= GetAny<double>(ll.second.eval(stack));
+
+ B[Kv(i)] += coef * c * w_i;
+ }
+ }
+
+
+ }
+ *MeshPointStack(stack) = mp;
+
+ }
+
+
+
+ template<class R>
+ void Element_rhsVF(const FElement & Kv,const FElement & KKv,int ie,int iie,int label,const LOperaD &Op,double * p,int *ip,void * bstack,KN_<R> & B,
+ const QuadratureFormular1d & FI = QF_GaussLegendre2)
+ // sier of ip
+ {
+ pair_stack_double * bs=static_cast<pair_stack_double *>(bstack);
+ Stack stack= bs->first;
+ double binside = *bs->second; // truc FH pour fluide de grad2 (decentrage bizard)
+
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+ const Triangle & T = Kv.T;
+ // const QuadratureFormular1d & FI = QF_GaussLegendre2;
+ long npi;
+ long i,nv=Kv.NbDoF(),N=Kv.N;
+ long nnv=KKv.NbDoF();
+ assert(nv==nnv);
+ // bool show = Kv.Vh.Th(T)==0;
+ // char * xxx[] ={" u"," v,"," p"," q"," r"};
+ // char * xxxx[] ={" u'"," v',"," p'"," q'"," r'"};
+ // char * yyy[] ={" ","_x ","_y "};
+
+ bool classoptm = copt && Op.optiexpK;
+ // assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (Kv.number<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs S: copt = " << copt << " " << classoptm << endl;
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ //assert(Op.MaxOp() <last_operatortype);
+ // assert(lastop<=3);
+ int lffv = nv*N*last_operatortype;
+ int lp =nv*2;
+ KN_<int> pp(ip,lp),pk(ip+lp,lp),pkk(ip+2*lp,lp);
+ int n = BuildMEK_KK(lp,pp,pk,pkk,&Kv,&KKv);
+ RNMK_ fu(p,nv,N,lastop); // the value for basic fonction
+ RNMK_ ffu( (double*) p + lffv ,nv,N,lastop); // the value for basic fonction
+
+ R2 E=T.Edge(ie);
+ double le = sqrt((E,E));
+ R2 PA(TriangleHat[VerticesOfTriangularEdge[ie][0]]),
+ PB(TriangleHat[VerticesOfTriangularEdge[ie][1]]),
+ PC(TriangleHat[OppositeVertex[ie]]);
+ // warning the to edge are in opposite sens
+ R2 PP_A(TriangleHat[VerticesOfTriangularEdge[iie][1]]),
+ PP_B(TriangleHat[VerticesOfTriangularEdge[iie][0]]),
+ PP_C(TriangleHat[OppositeVertex[ie]]);
+ R2 Normal(E.perp()/-le);
+ bool onborder= &Kv.T == &KKv.T;
+ double cmean = onborder ? 1. : 0.5;
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadratureFormular1dPoint pi( FI[npi]);
+ R2 E=T.Edge(ie);
+ double le = sqrt((E,E));
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+ R2 PA(TriangleHat[VerticesOfTriangularEdge[ie][0]]),
+ PB(TriangleHat[VerticesOfTriangularEdge[ie][1]]);
+ R2 Pt(PA*sa+PB*sb ); //
+ R2 PP_t(PP_A*sa+PP_B*sb ); //
+ if (binside) {
+ Pt = (1-binside)*Pt + binside*PC;
+ PP_t = (1-binside)*PP_t + binside*PP_C; }
+ Kv.BF(Dop,Pt,fu);
+ if(onborder)
+ ffu=0;
+ else
+ KKv.BF(Dop,PP_t,ffu);
+
+ MeshPointStack(stack)->set(T(Pt),Pt,Kv,label,R2(E.y,-E.x)/le,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+
+ for ( i=0; i<n; i++ )
+ // if (alledges || onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // bofbof faux si il y a des derives ..
+ {
+ int ik= pk[i];
+ int ikk=pkk[i];
+ RNM_ wi(fu(Max(ik,0),'.','.'));
+ RNM_ wwi(ffu(Max(ikk,0),'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+
+
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ int iis = ii.second;
+ int iicase = iis / last_operatortype;
+ iis %= last_operatortype;
+ double w_i=0,ww_i=0;
+ if(ik>=0) w_i = wi(ii.first,iis );
+ if( iicase>0 )
+ {
+ if( ikk>=0) ww_i = wwi(ii.first,iis );
+ if (iicase==Code_Jump) w_i = ww_i-w_i; // jump
+ else if (iicase==Code_Mean) w_i = cmean* (w_i + ww_i ); // average
+ else if (iicase==Code_OtherSide) w_i = ww_i; // valeur de autre cote
+ }
+ R c =copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ // FFCS - removing what is probably a small glitch
+ if ( copt && Kv.number<1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " =! " << cc << endl;
+ cerr << "Sorry error in Optimization add: int2d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+
+ //= GetAny<double>(ll.second.eval(stack));
+
+ B[Kv(i)] += coef * c * w_i;
+ }
+ }
+
+
+ }
+ *MeshPointStack(stack) = mp;
+
+ }
+
+ // 3d
+ template<class R>
+ void Element_rhs(const Mesh3 & ThI,const Mesh3::Element & KI, const FESpace3 & Vh,
+ int ie,int label,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const QuadratureFormular & FI,bool alledges=false)
+ {
+ Stack stack=pvoid2Stack(vstack);
+ int intmortar=0;
+ // AFAIRE("Element_rhs 3d on surface 2 diff mesh ");
+ static int count =0;
+ if(count++<1)
+ {
+ cout << " Element_rhs 3d on surface 2 diff mesh int test (FH)" << endl;
+ cout << " -----------------------------------------------------" << endl;
+ }
+ // integration 1d on 2 diff mesh
+
+
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+
+
+ bool classoptm = copt && Op.optiexpK;
+ //assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (ThI(KI)<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs S: copt = " << copt << " " << classoptm << endl;
+ assert(Op.MaxOp() <last_operatortype);
+ //
+ int lastop=0;
+ lastop = 0;
+ What_d Dop = Op.DiffOp(lastop);
+ // assert(lastop<=3);
+ const Tet & T = KI;
+ long npi;
+
+ const Tet * Kp=0;
+
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+
+ GQuadraturePoint<R2> pi(FI[npi]);
+ R3 NN= T.N(ie);
+ double mes=NN.norme();
+ NN/=mes;
+ double coef = 0.5*mes*pi.a; //
+ R3 Pt(T.PBord(ie,pi)),PI(T(Pt));
+
+
+
+ MeshPointStack(stack)->set(ThI,PI,Pt,KI,label,NN,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ bool outside;
+ R3 PIt;
+ const Tet & K = *Vh.Th.Find(PI,PIt,outside,Kp);
+ if ( ! outside || intmortar) // FH march 2009 ???
+ {
+ const FElement3 Kv= Vh[K];
+ long i,n=Kv.NbDoF(),N=Kv.N;
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+ Kv.BF(Dop,PIt,fu);
+
+ for ( i=0; i<n; i++ )
+ // if (alledges || onWhatIsFace[ie][Kv.DFOnWhat(i)]) // bofbof faux si il y a des derives ..
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ double w_i = wi(ii.first,ii.second);
+ R c =copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ // FFCS - removing what is probably a small glitch
+ if ( copt && Kv.number<1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " =! " << cc << endl;
+ cerr << "Sorry error in Optimization add: int1d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+
+ //= GetAny<double>(ll.second.eval(stack));
+
+ B[Kv(i)] += coef * c * w_i;
+ }
+ }
+
+ }
+ }
+ *MeshPointStack(stack) = mp;
+
+
+ }
+ // 3d
+ template<class R>
+ void Element_rhs(const Mesh & ThI,const Triangle & KI, const FESpace & Vh,
+ int ie,int label,const LOperaD &Op,double * p,void * vstack,KN_<R> & B,
+ const QuadratureFormular1d & FI = QF_GaussLegendre2,bool alledges=false,bool intmortar=false,
+ R2 *Q=0)
+ {
+ // integration 1d on 2 diff mesh
+
+ Stack stack=pvoid2Stack(vstack);
+ MeshPoint mp=*MeshPointStack(stack) ;
+ R ** copt = Stack_Ptr<R*>(stack,ElemMatPtrOffset);
+
+
+ bool classoptm = copt && Op.optiexpK;
+ //assert( (copt !=0) == (Op.where_in_stack_opt.size() !=0) );
+ if (ThI.number(KI)<1 && verbosity/100 && verbosity % 10 == 2)
+ cout << "Element_rhs S: copt = " << copt << " " << classoptm << endl;
+ KN<bool> Dop(last_operatortype);
+ Op.DiffOp(Dop);
+ int lastop=1+Dop.last(binder1st<equal_to<bool> >(equal_to<bool>(),true));
+ assert(Op.MaxOp() <last_operatortype);
+ // assert(lastop<=3);
+ const Triangle & T = KI;
+ long npi;
+
+ const Triangle * Kp=0;
+ R2 PA,PB,E;
+ if( Q==0)
+ {
+ PA=TriangleHat[VerticesOfTriangularEdge[ie][0]];
+ PB=TriangleHat[VerticesOfTriangularEdge[ie][1]];
+ E=T.Edge(ie);
+ }
+ else
+ {
+ PA=Q[0];
+ PB=Q[1];
+ E=T(PB)-T(PA);
+ }
+ double le = sqrt((E,E));
+
+ for (npi=0;npi<FI.n;npi++) // loop on the integration point
+ {
+ QuadratureFormular1dPoint pi( FI[npi]);
+
+
+ double coef = le*pi.a;
+ double sa=pi.x,sb=1-sa;
+ R2 Pt(PA*sa+PB*sb ); //
+ R2 PI(KI(Pt));
+ // Kv.BF(Dop,Pt,fu);
+ MeshPointStack(stack)->set(ThI,PI,Pt,KI,label,R2(E.y,-E.x)/le,ie);
+ if (classoptm) (*Op.optiexpK)(stack); // call optim version
+ bool outside;
+ R2 PIt;
+ const Triangle & K = *Vh.Th.Find(PI,PIt,outside,Kp);
+ if ( ! outside || intmortar) // FH march 2009 ???
+ {
+ const FElement Kv= Vh[K];
+ long i,n=Kv.NbDoF(),N=Kv.N;
+ RNMK_ fu(p,n,N,lastop); // the value for basic fonction
+ Kv.BF(Dop,PIt,fu);
+
+ for ( i=0; i<n; i++ )
+ // if (alledges || onWhatIsEdge[ie][Kv.DFOnWhat(i)]) // bofbof faux si il y a des derives ..
+ {
+ RNM_ wi(fu(i,'.','.'));
+ int il=0;
+ for (LOperaD::const_iterator l=Op.v.begin();l!=Op.v.end();l++,il++)
+ {
+ LOperaD::K ll(*l);
+ pair<int,int> ii(ll.first);
+ double w_i = wi(ii.first,ii.second);
+ R c =copt ? *(copt[il]) : GetAny<R>(ll.second.eval(stack));
+ // FFCS - removing what is probably a small glitch
+ if ( copt && Kv.number<1)
+ {
+ R cc = GetAny<R>(ll.second.eval(stack));
+ if ( c != cc) {
+ cerr << c << " =! " << cc << endl;
+ cerr << "Sorry error in Optimization add: int1d(Th,optimize=0)(...)" << endl;
+ ExecError("In Optimized version "); }
+ }
+
+
+ //= GetAny<double>(ll.second.eval(stack));
+
+ B[Kv(i)] += coef * c * w_i;
+ }
+ }
+
+ }
+ }
+ *MeshPointStack(stack) = mp;
+
+ }
+
+
+ template<class R,typename MC,class FESpace >
+ bool AssembleVarForm(Stack stack,const typename FESpace::Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ MC * A,KN_<R> * B,const list<C_F0> &largs)
+ { // return true if BC
+ typedef typename FESpace::Mesh Mesh ;
+ typedef Mesh * pmesh;
+ bool ret=false;
+ typedef DotStar_KN_<R> DotStar;
+ typedef DotSlash_KN_<R> DotSlash;
+ list<C_F0>::const_iterator ii,ib=largs.begin(),
+ ie=largs.end();
+ using namespace FreeFempp;
+ TypeVarForm<R> *tvf=TypeVarForm<R>::Global;
+ assert( tvf);
+ for (ii=ib;ii != ie;ii++)
+ {
+ Expression e=ii->LeftValue();
+ aType r = ii->left();
+ // if(A) cout << "AssembleVarForm " << * r << " " << (*A)(0,3) << endl;
+ if (r== tvf->tFB)
+ { if (A)
+ {
+ const FormBilinear * bf =dynamic_cast<const FormBilinear *>(e);
+ pmesh Thbf = GetAny<pmesh>((*bf->di->Th)(stack));
+ if(Thbf)AssembleBilinearForm<R>( stack,*Thbf,Uh,Vh,sym,*A,bf);
+ }
+ }
+ else if (r==tvf->tMat)
+ {
+ if (A)
+ InternalError(" Add sparse matrice; to do, sorry");
+ }
+ else if (r==tvf->tFL)
+ {
+ if (B) {
+ const FormLinear * bf =dynamic_cast<const FormLinear *>(e);
+ pmesh Thbf = GetAny<pmesh>((*bf->di->Th)(stack));
+ if(Thbf) AssembleLinearForm<R>( stack,*Thbf, Vh, B,bf) ;
+ }
+ }
+ else if (r==tvf->tTab)
+ {
+ if ( B)
+ *B += *GetAny<KN<R> *>( (*e)(stack) );
+ }
+ else if (r==tvf->tDotStar)
+ {
+ if ( B)
+ {
+ DotStar ab=GetAny<DotStar>( (*e)(stack) );
+ *B += ab;
+ }
+ }
+ else if (r==tvf->tMatX)
+ {
+ if ( B)
+ {
+ *B += GetAny<typename VirtualMatrice<R>::plusAx >( (*e)(stack) ) ;
+ }
+ }
+ else if (r==tvf->tMatTX)
+ {
+ if ( B)
+ {
+ *B += GetAny<typename VirtualMatrice<R>::plusAtx >( (*e)(stack) ) ;
+ }
+ }
+ else if (r== tvf->tBC)
+ ret=true;
+ else
+ {
+ cerr << "AssembleVarForm invalid type : " << * r << endl;
+ throw(ErrorExec("AssembleVarForm invalid type in varf",1));
+ }
+ }
+ return ret;
+ }
+
+ template<class R,class FESpace>
+ void AssembleBC(Stack stack,const typename FESpace::Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<R> * A,KN_<R> * B,KN_<R> * X, const list<C_F0> &largs , double tgv )
+ {
+ list<C_F0>::const_iterator ii,ib=largs.begin(),
+ ie=largs.end();
+ aType tBC( atype<const BC_set *>()) ;
+ for (ii=ib;ii != ie;ii++)
+ {
+ Expression e=ii->LeftValue();
+ aType r = ii->left();
+ if (r==tBC)
+ AssembleBC(stack,Th,Uh,Vh,sym,A,B,X, dynamic_cast<const BC_set *>(e),tgv);
+ }
+
+ }
+
+
+ template<class R>
+ void AssembleBC(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<R> * A,KN_<R> * B,KN_<R> * X, const BC_set * bc, double tgv )
+
+ {
+ MeshPoint *mps= MeshPointStack(stack),mp=*mps;
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(stack);
+ bool sptrclean=true;
+ // sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ int ktbc=0, nbon =0;
+ bool Aii = A && A->n == A->m;
+ int Nbcomp=Vh.N;
+ Check(bc,Nbcomp);
+ ffassert(Vh.N == Uh.N);
+ TabFuncArg tabexp(stack,Vh.N);
+ KN<double> buf(Vh.MaximalNbOfDF()*last_operatortype*Vh.N);
+ KN<R> gg(buf);
+ if ( B && B->N() != Vh.NbOfDF) ExecError("AssembleBC size rhs and nb of DF of Vh");
+ if(verbosity>99) cout << " Problem : BC_set "<< typeid(R).name() << " " ;
+ nbon =bc->on.size();
+ set<long> on;
+ Expandsetoflab(stack,*bc, on);
+/*
+ for (int i=0;i<nbon;i++)
+ {
+ long lab = GetAny<long>( (*bc->on[i])(stack));
+ if(verbosity>99) cout << lab << " " ;
+ on.insert(lab);
+ }
+ if(verbosity>99)
+ cout << endl;
+ */
+ int kk=bc->bc.size();
+
+ const int dim=Vh.N;
+ FElement::aIPJ ipj(Vh[0].Pi_h_ipj());
+ FElement::aR2 PtHat(Vh[0].Pi_h_R2());
+
+ KN<int> PtonB(PtHat.N());
+
+ KN<double> Aipj(ipj.N());
+ KNM<R> Vp(dim,PtHat.N());
+
+ double tgv1=tgv <0? 1: tgv; // change 21 dec 2010 FH (Hack of ILU)
+ for (int ib=0;ib<Th.neb;ib++)
+ {
+ int ie;
+ int it = Th.BoundaryElement(ib,ie);
+ int r =Th.bedges[ib].lab;
+ if (on.find(r) != on.end() )
+ {
+ const FElement K(Uh[it]);
+ R2 E=K.T.Edge(ie);
+ double le = sqrt((E,E));
+
+ ktbc++;
+ if(verbosity>99) cout << "BC " << it << " " << ie << " lab=" << r << ":\t"
+ << K.T[VerticesOfTriangularEdge[ie][0]] << "; "
+ << K.T[VerticesOfTriangularEdge[ie][1]] << " E=" << K.T.Edge(ie) << endl;
+
+ for (int k=0;k<kk;k++)
+ {
+ gg=R();
+ pair<int,Expression> xx=bc->bc[k];
+ tabexp=0;
+ int comp = xx.first;
+ tabexp[comp]=xx.second;
+ // while (comp+1 <Nbcomp && which_uh[comp+1] == which_uh[comp])
+ while (comp+1 <Nbcomp && Uh.dim_which_sub_fem[comp+1] == Uh.dim_which_sub_fem[comp])
+ { // the right
+ k++; // NEXT COMP
+ comp++;
+ if (k<kk && (comp == bc->bc[k].first) )
+ tabexp[comp]=bc->bc[k].second;
+ else
+ CompileError("In Boundary condition the vector FESpace , we must have:"
+ " all componant, in the right order");
+
+ }
+ // cout << " k "<< k << " " << comp << " " << " Nbcomp=" << Nbcomp << " " << Uh.dim_which_sub_fem[comp] << " " << Uh.dim_which_sub_fem[comp+1] << endl;
+#ifdef OLDPih
+ K.Pi_h(gg,F_Pi_h,buf,&tabexp);
+
+#else
+ K.Pi_h(Aipj);
+ PtonB = 0;
+ for (int i=0;i<Aipj.N();i++)
+ PtonB[ipj[i].p] += onWhatIsEdge[ie][K.DFOnWhat(ipj[i].i)] ;
+ // cout << " bc->complextype: " << bc->complextype << endl;
+ for (int p=0;p<PtHat.N();p++)
+ if (PtonB[p]) // in on boundary
+ {
+ mps->set(K.T(PtHat[p]),PtHat[p],K,r,R2(E.y,-E.x)/le,ie); // la normal bofbof ?
+ KN_<R> Vpp(Vp('.',p));
+ Vpp=R();
+ for (int j=0;j<dim;j++)
+ if (tabexp[j])
+ {
+ if(bc->complextype) // FH may 2007 MatriceCreuse
+ Vpp[j]=GetAny<R>( (*tabexp[j])(stack) );
+ else
+ Vpp[j]=GetAny<double>( (*tabexp[j])(stack) );
+ }
+ else Vpp[j]=0.;
+ }
+ //cout << " ..... Vp " << Vp << " " << bc->complextype << " " << bc << endl;
+ for (int i=0;i<Aipj.N();i++)
+ {
+ const FElement::IPJ &ipj_i(ipj[i]);
+ gg[ipj_i.i] += Aipj[i]*Vp(ipj_i.j,ipj_i.p);
+ }
+#endif
+ int nbdf = K.NbDoF();
+ for (int df=0;df<nbdf;df++)
+ // if (K.FromFE(df)==which_uh[xx.first] && onWhatIsEdge[ie][K.DFOnWhat(df)] )
+ {
+ // cout << df << " from = " << K.FromFE(df) << " dim .. " << Uh.dim_which_sub_fem[xx.first] << " first " << xx.first << " " << onWhatIsEdge[ie][K.DFOnWhat(df)] << endl;
+ if (K.FromASubFE(df)==Uh.dim_which_sub_fem[xx.first] && onWhatIsEdge[ie][K.DFOnWhat(df)] )
+ {
+ // cout << k << " df=" << df << " g= " << gg[df] <<" " << gg(FromTo(0,2)) << endl;
+ int ddf=K(df);
+ // AA(ddf,ddf) =tgv;
+ if (Aii) A->SetBC(ddf, tgv);// change 21 dec 2010 FH (Hack of ILU)
+ if (B) (*B)[ddf]= tgv1*gg[df];
+ if (X) (*X)[ddf]=gg[df];
+ }
+ }
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+ }
+ if (! ktbc && nbon && verbosity )
+ {
+ cout << " Warning: -- Your set of boundary condition is incompatible with the mesh label." << endl;
+ }
+ *mps =mp;
+ }
+
+
+template<class R>
+ void AssembleBC(Stack stack,const Mesh3 & Th,const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ MatriceCreuse<R> * A,KN_<R> * B,KN_<R> * X, const BC_set * bc, double tgv )
+
+ {
+ typedef Mesh3 Mesh;
+ typedef typename FESpace3::FElement FElement;
+ typedef typename Mesh::BorderElement BorderElement;
+ typedef typename Mesh::Rd Rd;
+ typedef typename Mesh::Element Element;
+ typedef typename Mesh::RdHat RdHat;
+
+ MeshPoint *mps= MeshPointStack(stack),mp=*mps;
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(stack);
+ bool sptrclean=true;
+ // sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ int ktbc=0, nbon =0;
+ bool Aii = A && A->n == A->m;
+ int Nbcomp=Vh.N;
+ Check(bc,Nbcomp);
+ assert(Vh.N == Uh.N);
+ TabFuncArg tabexp(stack,Vh.N);
+ KN<double> buf(Vh.MaximalNbOfDF()*last_operatortype*Vh.N);
+ KN<R> gg(buf);
+ if ( B && B->N() != Vh.NbOfDF) ExecError("AssembleBC size rhs and nb of DF of Vh");
+ if(verbosity>99) cout << " Problem : BC_set "<< typeid(R).name() << " " ;
+ nbon =bc->on.size();
+ set<long> on;
+ Expandsetoflab(stack,*bc, on);
+/*
+ for (int i=0;i<nbon;i++)
+ {
+ long lab = GetAny<long>( (*bc->on[i])(stack));
+ if(verbosity>99) cout << lab << " " ;
+ on.insert(lab);
+ }
+ if(verbosity>99)
+ cout << endl;*/
+ int kk=bc->bc.size();
+
+ const int dim=Vh.N;
+
+ InterpolationMatrix<RdHat> ipmat(Vh);
+ int npPh = Vh.maxNbPtforInterpolation;
+ KN<int> PtonB(npPh);
+ KNM<R> Vp(npPh,dim);
+ Vp=R();
+ KN<R> Vdf(Vh.MaxNbDFPerElement);
+ double tgv1=tgv <0? 1: tgv;
+ map<int,int> lll;
+ for (int ib=0;ib<Th.nbe;ib++)
+ {
+ int ie;
+ int it = Th.BoundaryElement(ib,ie);
+
+ //const BorderElement &be=Th.be(ib);
+ int r =Th.be(ib).lab;
+ lll[r]++;
+ if (on.find(r) != on.end() )
+ {
+ const FElement K(Uh[it]);
+ ipmat.set(K);
+
+ //R2 E=K.T.Edge(ie);
+ //double le = be.mesure();
+
+ ktbc++;
+ /*
+ if(verbosity>99) cout << "BC " << it << " " << ie << " lab=" << r << ":\t"
+ << K.T[VerticesOfTriangularEdge[ie][0]] << "; "
+ << K.T[VerticesOfTriangularEdge[ie][1]] << " E=" << K.T.Edge(ie) << endl;
+ */
+ for (int k=0;k<kk;k++)
+ {
+ gg=R();
+ pair<int,Expression> xx=bc->bc[k];
+ tabexp=0;
+ int comp = xx.first;
+ tabexp[comp]=xx.second;
+ // while (comp+1 <Nbcomp && which_uh[comp+1] == which_uh[comp])
+ while (comp+1 <Nbcomp && Uh.dim_which_sub_fem[comp+1] == Uh.dim_which_sub_fem[comp])
+ { // the right
+ k++; // NEXT COMP
+ comp++;
+ if (k<kk && (comp == bc->bc[k].first) )
+ tabexp[comp]=bc->bc[k].second;
+ else
+ CompileError("In Boundary condition the vector FESpace , we must have:"
+ " all componant, in the right order");
+
+ }
+ int nbdf=K.NbDoF() ;
+ //ipmat.set(it);
+ PtonB = 0;
+ Rd NN=K.T.N(ie);
+ NN /= NN.norme();
+ for (int i=0;i<ipmat.ncoef;i++)
+ PtonB[ipmat.p[i]] += Element::onWhatBorder[ie][K.DFOnWhat(ipmat.dofe[i])] ;
+
+
+ for (int p=0;p<ipmat.np;p++)
+ if (PtonB[p]) // in on boundary
+ {
+ const RdHat & PtHat(ipmat.P[p]);
+ mps->set(K.T(PtHat),PtHat,K,r,NN,ie); // la normal bofbof ?
+ KN_<R> Vpp(Vp(p,'.'));
+ for (int j=0;j<dim;j++)
+ if (tabexp[j])
+ if(bc->complextype) // FH may 2007
+ Vpp[j]=GetAny<R>( (*tabexp[j])(stack) );
+ else
+ Vpp[j]=GetAny<double>( (*tabexp[j])(stack) );
+
+ else Vpp[j]=0.;
+ }
+ // cout << " Vp: " << Vp << endl;
+ K.Pi_h(Vp,Vdf,ipmat);
+ for (int df=0;df<nbdf;df++)
+ {
+ if (K.FromASubFE(df)==Uh.dim_which_sub_fem[xx.first] && Element::onWhatBorder[ie][K.DFOnWhat(df)] )
+ {
+ int ddf=K(df);
+ // cout << ddf << " " << df << " " << Vdf[df] << " " << it << " ib = " << ib << " == " << Th(Th[it][df]) << endl;
+ if (Aii) A->SetBC(ddf,tgv);// change 21 dec 2010 FH (Hack of ILU)
+ if (B) (*B)[ddf]=tgv1*Vdf[df];
+ if (X) (*X)[ddf]=Vdf[df];
+ }
+ }
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+ }
+ if (! ktbc && nbon && verbosity )
+ {
+ cout << " Warning: -- Your set of boundary condition is incompatible with the mesh label." << endl;
+ for (map<int,int>::const_iterator i=lll.begin();i!=lll.end();i++)
+ cout << " lab " << i-> first << " nb " << i->second << endl;
+ }
+ *mps =mp;
+ }
+void Expandsetoflab(Stack stack,const BC_set & bc,set<long> & setoflab);
+void Expandsetoflab(Stack stack,const CDomainOfIntegration & di,set<int> & setoflab,bool &all);
+
+
+template<class R>
+ void AssembleLinearForm(Stack stack,const Mesh3 & Th,const FESpace3 & Vh,KN_<R> * B,const FormLinear * l )
+{
+ typedef FESpace3 FESpace;
+ typedef FESpace3::Mesh Mesh;
+ typedef Mesh *pmesh ;
+
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(stack);
+ bool sptrclean=true;
+ // sptr->clean(); // modif FH mars 2006 clean Ptr
+ Check(l->l,Vh.N);
+ if ( B && B->N() != Vh.NbOfDF) ExecError("AssembleLinearForm size rhs and nb of DF of Vh");
+ // if ( & Th != &Vh.Th ) ExecError("AssembleLinearForm on different meshes ( not implemented FH).");
+ KN<double> buf(Vh.MaximalNbOfDF()*last_operatortype*Vh.N*2);
+
+ // const FormLinear * l=dynamic_cast<const FormLinear *>(e);
+ const CDomainOfIntegration & di= *l->di;
+ ffassert(di.d==3);
+ // const Mesh * pThdi = GetAny<pmesh>( (* di.Th)(stack));
+
+ const Mesh & ThI = Th;//* GetAny<pmesh>( (* di.Th)(stack));
+ bool sameMesh = &ThI == &Vh.Th;
+
+ SHOWVERB(cout << " FormLinear " << endl);
+ //const vector<Expression> & what(di.what);
+
+ CDomainOfIntegration::typeofkind kind = di.kind;
+ //const QuadratureFormular1d & FIE = di.FIE(stack);
+ // const QuadratureFormular & FIT = di.FIT(stack);
+ // const GQuadratureFormular<R3> & FIV = di.FIV(stack);
+
+ // const QuadratureFormular1d & FIEo = di.FIE(stack);
+ const QuadratureFormular & FITo = di.FIT(stack);
+ const GQuadratureFormular<R3> & FIVo = di.FIV(stack);
+ // to change the quadrature on element ... may 2014 FH ..
+ // QuadratureFormular1d FIE(FIEo,3);
+ QuadratureFormular FIT(FITo,3);
+ GQuadratureFormular<R3> FIV(FIVo,3);
+
+ const bool useopt=di.UseOpt(stack);
+ double binside=di.binside(stack); // truc FH pour fluide de grad2 (decentrage bizard)
+ // cout << "AssembleLinearForm " << l->l->v.size() << endl;
+ set<int> setoflab;
+ bool all=true;
+ bool VF=l->VF(); // finite Volume or discontinous Galerkin
+ if (verbosity>2) cout << " -- AssembleLinearForm 1, discontinous Galerkin =" << VF << " binside = "<< binside <<"\n";
+
+ if (verbosity>3)
+ {
+ if (CDomainOfIntegration::int2d==kind) cout << " -- boundary int border ( nQP: "<< FIT.n << ") , samemesh: " << sameMesh << " " ;
+ else if (CDomainOfIntegration::intalledges==kind) cout << " -- boundary int all edges ( nQP: "<< FIT.n << ")," ;
+ else if (CDomainOfIntegration::intallVFedges==kind) cout << " -- boundary int all VF edges nQP: ("<< FIT.n << ")," ;
+ else cout << " -- int (nQP: "<< FIV.n << " ) in " ;
+ }
+ // if(di.islevelset()) InternalError("So no levelset integration type on this case (3)");
+ if(di.islevelset() && (CDomainOfIntegration::int2d!=kind) && (CDomainOfIntegration::int3d!=kind) )
+ InternalError("So no levelset intgeration type on no int2d/3d case");
+ /*
+ if ( verbosity>3)
+ if (kind==CDomainOfIntegration::int1d) cout << " -- boundary int border " ;
+ else if (kind==CDomainOfIntegration::intalledges) cout << " -- boundary int all edges " ;
+ else if (kind==CDomainOfIntegration::intallVFedges) cout << " -- boundary int all edges " ;
+ else cout << " -- boundary int " ;
+ */
+
+ Expandsetoflab(stack,di, setoflab,all);
+ /*
+ for (size_t i=0;i<what.size();i++)
+ if(di.whatis[i] ==0)
+ {
+ long lab = GetAny<long>( (*what[i])(stack));
+ setoflab.insert(lab);
+ if ( verbosity>3) cout << lab << " ";
+ all=false;
+ }
+ else
+ {
+ KN<long> labs( GetAny<KN_<long> >( (*what[i])(stack)));
+ for (long j=0; j<labs.N(); ++j) {
+ setoflab.insert(labs[j]);
+ if ( verbosity>3) cout << labs[j] << " ";
+ }
+ all=false;
+ }*/
+
+ if (verbosity>3) cout << " Optimized = "<< useopt << ", ";
+
+ const E_F0 & optiexp0=*l->l->optiexp0;
+ // const E_F0 & optiexpK=*l->l->optiexpK;
+ int n_where_in_stack_opt=l->l->where_in_stack_opt.size();
+ R** where_in_stack = 0;
+ if (n_where_in_stack_opt && useopt)
+ where_in_stack = new R * [n_where_in_stack_opt];
+ if (where_in_stack)
+ {
+ assert(l->l->v.size()==(size_t) n_where_in_stack_opt);
+ for (int i=0;i<n_where_in_stack_opt;i++)
+ {
+ int offset=l->l->where_in_stack_opt[i];
+ assert(offset>10);
+ where_in_stack[i]= static_cast<R *>(static_cast<void *>((char*)stack+offset));
+ *(where_in_stack[i])=0;
+ }
+ if(&optiexp0) optiexp0(stack);
+
+ if( (verbosity/100) && verbosity % 10 == 2)
+ {
+ int il=0;
+
+ for (LinearOperatorD::const_iterator ll=l->l->v.begin();ll!=l->l->v.end();ll++,il++)
+ cout << il << " coef (" << ll->first << ") = " << *(where_in_stack[il]) << " offset=" << l->l->where_in_stack_opt[il] <<endl;
+
+ for (int i=0;i<n_where_in_stack_opt;i++)
+ cout << "const coef " << i << " = " << *(where_in_stack[i]) << endl;
+ }
+ }
+ Stack_Ptr<R*>(stack,ElemMatPtrOffset) =where_in_stack;
+
+ KN<int> ip(Vh.MaxNbDFPerElement*6);
+ if (verbosity >3)
+ {
+ if (all) cout << " all " << endl ;
+ else cout << endl;
+ }
+ if (kind==CDomainOfIntegration::int2d)
+ { //AFAIRE("3D Elment RHS CDomainOfIntegration::int2d");
+ double ss =0;
+ if(VF) InternalError(" no jump or average in int1d of RHS");
+ if(di.islevelset()) // init on level set (of RHS)
+ {
+ double uset = HUGE_VAL;
+ R3 Q[4];
+ KN<double> phi(ThI.nv);phi=uset;
+ double f[4];
+ for(int t=0; t< ThI.nt;++t)
+ {
+
+ double umx=-HUGE_VAL,umn=HUGE_VAL;
+ for(int i=0;i<4;++i)
+ {
+ int j= ThI(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&ThI,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ umx = std::max(umx,phi[j]);
+ umn = std::min(umn,phi[j]);
+
+ }
+ if( umn <=0 && umx >= 0)
+ {
+
+ int np= IsoLineK(f,Q,1e-10);// ca code ...
+ if(np==3 || np==4)
+ { // if(np==3) Q[3]=Q[0]; // same 0 == 3 bofbof ??? FH
+ // cout << " Q[0]" << Q[0] << endl;
+ if( verbosity> 99)
+ {
+ R3 PP[4];
+ const Tet &K(ThI[t]);
+ for(int i=0; i< np; ++i)
+ PP[i]= K(Q[i]);
+ for( int i =0; i+1 < np; i+=2)
+ {
+ int i0=i,i1=i+1,i2=(i+2)%np;
+ R3 NN= R3(PP[i0],PP[i1])^R3(PP[i0],PP[i2]);
+ double mes2 = (NN,NN);
+ double mes = sqrt(mes2)/2;
+ ss+= mes;
+ //cout << "mes " << mes << " " << i << " , ";
+ }
+ }
+
+ if ( sameMesh)
+ Element_rhs<R>(Vh[t],*l->l,buf,stack,*B,FIT,np,Q);
+ else
+ // else
+ InternalError(" No levelSet on Diff mesh3 : to day int2d of RHS");
+ // Element_rhs<R>(ThI,ThI[t],Vh,-1,lab,*l->l,buf,stack,*B,FIT,false);
+ }
+ if(sptrclean) sptrclean=sptr->clean();
+ }
+ }
+ if( verbosity> 99)
+ cout << " surf levelset = " << ss << endl;
+
+ }
+ else
+ for( int e=0;e<ThI.nbe;e++)
+ {
+ if (all || setoflab.find(ThI.be(e).lab) != setoflab.end())
+ {
+ int ie,i =ThI.BoundaryElement(e,ie);
+ if ( sameMesh)
+ Element_rhs<R>(Vh[i],ie,Th.be(e).lab,*l->l,buf,stack,*B,FIT,false);
+ else
+ Element_rhs<R>(ThI,ThI[i],Vh,ie,Th.be(e).lab,*l->l,buf,stack,*B,FIT,false);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+ }
+ else if (kind==CDomainOfIntegration::intalledges)
+ { AFAIRE("3D Elment RHS CDomainOfIntegration::intalledges");
+ /*
+ if(VF)
+ {
+ pair_stack_double bstack;
+
+ bstack.first = stack;
+ bstack.second= & binside;
+
+ //InternalError(" Today no jump or average in intalledges of RHS ");
+ for (int i=0;i< ThI.nt; i++)
+ if (all || setoflab.find(ThI[i].lab) != setoflab.end())
+ {
+
+ for (int ie=0;ie<3;ie++)
+ if ( sameMesh)
+ {
+ int iie=ie,ii=Th.ElementAdj(i,iie);
+ if(ii<0) ii=i;// sur le bord
+ Element_rhsVF<R>(Vh[i],Vh[ii],ie,iie,Th[i].lab,*l->l,buf,ip,&bstack,*B,FIE);
+ }
+ else
+ InternalError("To Do") ;
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+
+ }
+ else
+ for (int i=0;i< ThI.nt; i++)
+ if (all || setoflab.find(ThI[i].lab) != setoflab.end())
+ {
+ for (int ie=0;ie<3;ie++)
+ if ( sameMesh)
+ Element_rhs<R>(Vh[i],ie,Th[i].lab,*l->l,buf,stack,*B,FIE,true);
+ else
+ InternalError("To Do") ;
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }*/
+ }
+ else if (kind==CDomainOfIntegration::intallVFedges)
+ {
+ cerr << " intallVFedges a faire" << endl;
+
+ InternalError(" intallVFedges a faire ");
+
+ ffassert(0);/*
+ for (int i=0;i< ThI.nt; i++)
+ {
+ if (all || setoflab.find(ThI[i].lab) != setoflab.end())
+ for (int ie=0;ie<3;ie++)
+ if ( sameMesh)
+ Element_rhs<R>(Vh[i],ie,Th[i].lab,*l->l,buf,stack,*B,FIE,true);
+ else
+ InternalError("To Do") ;
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }*/
+ }
+
+ else if(kind==CDomainOfIntegration::int3d) {
+ if(di.islevelset()) // may 2014 FH ...
+ { // int3d levelset < 0
+ double llevelset = 0;
+ const double uset = std::numeric_limits<double>::max();
+ // cout << " uset ="<<uset << endl;
+ R3 Q[3][4];
+ double vol6[3];
+ KN<double> phi(Th.nv);
+ phi=uset;
+ double f[4];
+
+ for (int t=0;t< Th.nt; t++)
+ {
+
+ const Mesh3::Element & K(ThI[t]);
+ if (all || setoflab.find(ThI[t].lab) != setoflab.end())
+
+ {
+ double umx=std::numeric_limits<double>::min(),umn=std::numeric_limits<double>::max();
+ for(int i=0;i<4;++i)
+ {
+ int j= ThI(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&ThI,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ }
+ int ntets= UnderIso(f,Q, vol6,1e-14);
+ setQF<R3>(FIV,FIVo,QuadratureFormular_Tet_1, Q,vol6,ntets);
+ if(FIV.n)
+ {
+ if ( sameMesh )
+ Element_rhs<R>(Vh[t],*l->l,buf,stack,*B,FIV);
+ else
+ Element_rhs<R>(ThI,ThI[t],Vh,*l->l,buf,stack,*B,FIV);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+ }
+ }
+ FIV=FIVo;
+ }
+ else
+ {
+
+ for (int i=0;i< ThI.nt; i++)
+ if (all || setoflab.find(ThI[i].lab) != setoflab.end())
+ {
+ if ( sameMesh )
+ Element_rhs<R>(Vh[i],*l->l,buf,stack,*B,FIV);
+ else
+ Element_rhs<R>(ThI,ThI[i],Vh,*l->l,buf,stack,*B,FIV);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }}
+ }
+ else if(kind==CDomainOfIntegration::intallfaces ) {
+
+ if(VF) InternalError(" no jump or average in intallfaces of RHS");
+
+ for(int i=0;i<ThI.nt; i++)
+ for(int ie=0;ie<Mesh3::nea; ie++)
+ {
+ int lab=0;
+ // if face on bord get the lab ???
+ if ( sameMesh)
+ Element_rhs<R>(Vh[i],ie,lab,*l->l,buf,stack,*B,FIT,false);
+ else
+ Element_rhs<R>(ThI,ThI[i],Vh,ie,lab,*l->l,buf,stack,*B,FIT,false);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+
+ }
+ }
+ else
+ {
+ cout << " Strange (unknows) kind = " << kind << endl;
+ ffassert(0);
+ }
+ if (n_where_in_stack_opt) delete [] where_in_stack;
+
+ }
+
+
+template<class R>
+ void AssembleLinearForm(Stack stack,const Mesh & Th,const FESpace & Vh,KN_<R> * B,const FormLinear * l )
+ {
+ StackOfPtr2Free * sptr = WhereStackOfPtr2Free(stack);
+ bool sptrclean=true;
+ // sptr->clean(); // modif FH mars 2006 clean Ptr
+ Check(l->l,Vh.N);
+ if ( B && B->N() != Vh.NbOfDF) ExecError("AssembleLinearForm size rhs and nb of DF of Vh");
+ // if ( & Th != &Vh.Th ) ExecError("AssembleLinearForm on different meshes ( not implemented FH).");
+ KN<double> buf(Vh.MaximalNbOfDF()*last_operatortype*Vh.N*2);
+
+ // const FormLinear * l=dynamic_cast<const FormLinear *>(e);
+ const CDomainOfIntegration & di= *l->di;
+ const Mesh & ThI = Th;//* GetAny<pmesh>( (* di.Th)(stack));
+ bool sameMesh = &ThI == &Vh.Th;
+ const bool intmortar=di.intmortar(stack);
+
+ SHOWVERB(cout << " FormLinear " << endl);
+ // const vector<Expression> & what(di.what);
+
+ CDomainOfIntegration::typeofkind kind = di.kind;
+ const QuadratureFormular1d & FIE = di.FIE(stack);
+ const QuadratureFormular & FIT = di.FIT(stack);
+ const bool useopt=di.UseOpt(stack);
+ double binside=di.binside(stack); // truc FH pour fluide de grad2 (decentrage bizard)
+ // cout << "AssembleLinearForm " << l->l->v.size() << endl;
+ set<int> setoflab;
+ bool all=true;
+ bool VF=l->VF(); // finite Volume or discontinous Galerkin
+ if (verbosity>2) cout << " -- AssembleLinearForm 2, discontinous Galerkin =" << VF << " binside = "<< binside
+ << " levelset integration " <<di.islevelset()<< "\n";
+
+ if (verbosity>3)
+ {
+ if (CDomainOfIntegration::int1d==kind) cout << " -- boundary int border ( nQP: "<< FIE.n << ") , samemesh :"<< sameMesh<< " int mortar: " << intmortar ;
+ else if (CDomainOfIntegration::intalledges==kind) cout << " -- boundary int all edges ( nQP: "<< FIE.n << ")," ;
+ else if (CDomainOfIntegration::intallVFedges==kind) cout << " -- boundary int all VF edges nQP: ("<< FIE.n << ")," ;
+ else cout << " -- int (nQP: "<< FIT.n << " ) in " ;
+ }
+ /*
+ if ( verbosity>3)
+ if (kind==CDomainOfIntegration::int1d) cout << " -- boundary int border " ;
+ else if (kind==CDomainOfIntegration::intalledges) cout << " -- boundary int all edges " ;
+ else if (kind==CDomainOfIntegration::intallVFedges) cout << " -- boundary int all edges " ;
+ else cout << " -- boundary int " ;
+ */
+ if(di.islevelset() && ( (CDomainOfIntegration::int1d!=kind) && (CDomainOfIntegration::int2d!=kind) ) )
+ InternalError("So no levelset integration type on no int1d/int2d case (4)");
+ Expandsetoflab(stack,di, setoflab,all);
+ /*
+ for (size_t i=0;i<what.size();i++)
+ {long lab = GetAny<long>( (*what[i])(stack));
+ setoflab.insert(lab);
+ if ( verbosity>3) cout << lab << " ";
+ all=false;
+ } */
+ if (verbosity>3) cout << " Optimized = "<< useopt << ", ";
+
+ const E_F0 & optiexp0=*l->l->optiexp0;
+ // const E_F0 & optiexpK=*l->l->optiexpK;
+ int n_where_in_stack_opt=l->l->where_in_stack_opt.size();
+ R** where_in_stack =0;
+ if (n_where_in_stack_opt && useopt)
+ where_in_stack = new R * [n_where_in_stack_opt];
+ if (where_in_stack)
+ {
+ assert(l->l->v.size()==(size_t) n_where_in_stack_opt);
+ for (int i=0;i<n_where_in_stack_opt;i++)
+ {
+ int offset=l->l->where_in_stack_opt[i];
+ assert(offset>10);
+ where_in_stack[i]= static_cast<R *>(static_cast<void *>((char*)stack+offset));
+ *(where_in_stack[i])=0;
+ }
+ if(&optiexp0) optiexp0(stack);
+
+ if( (verbosity/100) && verbosity % 10 == 2)
+ {
+ int il=0;
+
+ for (LinearOperatorD::const_iterator ll=l->l->v.begin();ll!=l->l->v.end();ll++,il++)
+ cout << il << " coef (" << ll->first << ") = " << *(where_in_stack[il]) << " offset=" << l->l->where_in_stack_opt[il] <<endl;
+
+ for (int i=0;i<n_where_in_stack_opt;i++)
+ cout << "const coef " << i << " = " << *(where_in_stack[i]) << endl;
+ }
+ }
+ Stack_Ptr<R*>(stack,ElemMatPtrOffset) =where_in_stack;
+
+ KN<int> ip(Vh.MaxNbDFPerElement*6);
+ if (verbosity >3)
+ {
+ if (all) cout << " all " << endl ;
+ else cout << endl;
+ }
+ if(di.islevelset() && (kind !=CDomainOfIntegration::int1d)&& (kind !=CDomainOfIntegration::int2d))
+ InternalError(" Sorry No levelSet integral for is case ..(5)");
+
+
+ if (kind==CDomainOfIntegration::int1d)
+ {
+
+
+ if(VF) InternalError(" no jump or average in int1d of RHS");
+ if(di.islevelset())
+ {
+ double uset = HUGE_VAL;
+ R2 Q[3];
+ KN<double> phi(ThI.nv);phi=uset;
+ double f[3];
+ for(int t=0; t< ThI.nt;++t)
+ {
+ double umx=-HUGE_VAL,umn=HUGE_VAL;
+ for(int i=0;i<3;++i)
+ {
+ int j= ThI(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&ThI,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ umx = std::max(umx,phi[j]);
+ umn = std::min(umn,phi[j]);
+
+ }
+ if( umn <=0 && umx >= 0)
+ {
+
+ int np= IsoLineK(f,Q,1e-10);
+ if(np==2)
+ {
+ if ( sameMesh)
+ {/*
+ void Element_rhs(const FElement & Kv,const LOperaD &Op,double * p,void * stack,KN_<R> & B,
+ const QuadratureFormular1d & FI ,const R2 & PA,const R2 &PB)
+
+ */
+ Element_rhs<R>(Vh[t],*l->l,buf,stack,*B,FIE,Q[0],Q[1]);
+ }
+ else
+ Element_rhs<R>(ThI,ThI[t],Vh,0,ThI[t].lab,*l->l,buf,stack,*B,FIE,false,intmortar,Q);
+
+ //InternalError(" No levelSet on Diff mesh : to day int1d of RHS");
+ }
+ if(sptrclean) sptrclean=sptr->clean();
+ }
+ }
+
+ }
+ else
+ for( int e=0;e<ThI.neb;e++)
+ {
+ if (all || setoflab.find(ThI.bedges[e].lab) != setoflab.end())
+ {
+ int ie,i =ThI.BoundaryElement(e,ie);
+ if ( sameMesh)
+ Element_rhs<R>(Vh[i],ie,Th.bedges[e].lab,*l->l,buf,stack,*B,FIE,false);
+ else
+ Element_rhs<R>(ThI,ThI[i],Vh,ie,Th.bedges[e].lab,*l->l,buf,stack,*B,FIE,false,intmortar);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+ }
+ else if (kind==CDomainOfIntegration::intalledges)
+ {
+ if(VF)
+ {
+ pair_stack_double bstack(stack,& binside);
+
+ //bstack.first = stack;
+ //bstack.second= & binside;
+
+ //InternalError(" Today no jump or average in intalledges of RHS ");
+ for (int i=0;i< ThI.nt; i++)
+ if (all || setoflab.find(ThI[i].lab) != setoflab.end())
+ {
+
+ for (int ie=0;ie<3;ie++)
+ if ( sameMesh)
+ {
+ int iie=ie,ii=Th.ElementAdj(i,iie);
+ if(ii<0) ii=i;// sur le bord
+ Element_rhsVF<R>(Vh[i],Vh[ii],ie,iie,Th[i].lab,*l->l,buf,ip,&bstack,*B,FIE);
+ }
+ else
+ InternalError("To Do") ;
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+
+ }
+ else
+ for (int i=0;i< ThI.nt; i++)
+ if (all || setoflab.find(ThI[i].lab) != setoflab.end())
+ {
+ for (int ie=0;ie<3;ie++)
+ if ( sameMesh)
+ Element_rhs<R>(Vh[i],ie,Th[i].lab,*l->l,buf,stack,*B,FIE,true);
+ else
+ InternalError("To Do") ;
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+ else if (kind==CDomainOfIntegration::intallVFedges)
+ {
+ cerr << " intallVFedges a faire" << endl;
+
+ InternalError(" intallVFedges a faire ");
+
+ ffassert(0);
+ for (int i=0;i< ThI.nt; i++)
+ {
+ if (all || setoflab.find(ThI[i].lab) != setoflab.end())
+ for (int ie=0;ie<3;ie++)
+ {
+ if ( sameMesh)
+ Element_rhs<R>(Vh[i],ie,Th[i].lab,*l->l,buf,stack,*B,FIE,true);
+ else
+ InternalError("To Do") ;
+ }
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+
+ else if (kind==CDomainOfIntegration::int2d){
+ if(di.islevelset())
+ {
+ QuadratureFormular FITM(FIT);
+ double uset = HUGE_VAL;
+ R2 Q[4];
+ KN<double> phi(Th.nv);phi=uset;
+ double f[3];
+ for(int t=0; t< Th.nt;++t)
+ {
+ if ( all || setoflab.find(ThI[t].lab) != setoflab.end())
+ {
+ double umx=-HUGE_VAL,umn=HUGE_VAL;
+ for(int i=0;i<3;++i)
+ {
+ int j= ThI(t,i);
+ if( phi[j]==uset)
+ {
+ MeshPointStack(stack)->setP(&ThI,t,i);
+ phi[j]= di.levelset(stack);//zzzz
+ }
+ f[i]=phi[j];
+ umx = std::max(umx,phi[j]);
+ umn = std::min(umn,phi[j]);
+
+ }
+ if( umx <=0 )
+ Element_rhs<R>(Vh[t],*l->l,buf,stack,*B,FIT);
+ else if( umn <0 )
+ { // coupe ..
+ int i0 = 0, i1 = 1, i2 =2;
+
+ if( f[i0] > f[i1] ) swap(i0,i1) ;
+ if( f[i0] > f[i2] ) swap(i0,i2) ;
+ if( f[i1] > f[i2] ) swap(i1,i2) ;
+
+ double c = (f[i2]-f[i1])/(f[i2]-f[i0]); // coef Up Traing
+ if( f[i1] < 0 ) {double y=f[i2]/(f[i2]-f[i1]); c *=y*y; }
+ else {double y=f[i0]/(f[i0]-f[i1]) ; c = 1.- (1.-c)*y*y; };
+ assert( c > 0 && c < 1);
+ double arean = (1-c)*Th[t].area;
+ FITM=FIT;
+ FITM*=1-c;
+ Element_rhs<R>(Vh[t],*l->l,buf,stack,*B,FITM);
+ }
+ if(sptrclean) sptrclean=sptr->clean();
+ }
+ }
+ }
+ else
+ for (int i=0;i< ThI.nt; i++)
+ if (all || setoflab.find(ThI[i].lab) != setoflab.end())
+ {
+ if ( sameMesh )
+ Element_rhs<R>(Vh[i],*l->l,buf,stack,*B,FIT);
+ else
+ Element_rhs<R>(ThI,ThI[i],Vh,*l->l,buf,stack,*B,FIT);
+ if(sptrclean) sptrclean=sptr->clean(); // modif FH mars 2006 clean Ptr
+ }
+ }
+
+ if (n_where_in_stack_opt) delete [] where_in_stack;
+
+ }
+
+
+}// END of NameSpace Fem2D
+
+
+bool isVF(const list<C_F0> & largs) // true => VF type of Matrix
+{
+ list<C_F0>::const_iterator ii,ib=largs.begin(),
+ ie=largs.end();
+
+ bool VVF =false;
+ for (ii=ib;ii != ie;ii++)
+ {
+ Expression e=ii->LeftValue();
+ aType r = ii->left();
+ if (r==atype<const FormBilinear *>())
+ {
+ const FormBilinear * bb=dynamic_cast<const FormBilinear *>(e);
+ bool vvf = bb->VF();
+ if( vvf && (bb->di->kind != CDomainOfIntegration::intalledges && bb->di->kind != CDomainOfIntegration::intallVFedges )
+ && (bb->di->kind != CDomainOfIntegration::intallfaces ))
+ CompileError("Sorry, no jump or moy in bilinear form no of type intalledges or intallVFedges ");
+ VVF = vvf || VVF;
+ }
+ }
+ return VVF;
+}
+
+
+bool isSameMesh(const list<C_F0> & largs,const void * Thu,const void * Thv,Stack stack) // true => VF type of Matrix
+{
+ if( Thv != Thu ) return false;
+ list<C_F0>::const_iterator ii,ib=largs.begin(),
+ ie=largs.end();
+
+ // bool VVF =false;
+ for (ii=ib;ii != ie;ii++)
+ {
+ Expression e=ii->LeftValue();
+ aType r = ii->left();
+ if (r==atype<const FormBilinear *>())
+ {
+ const FormBilinear * bb=dynamic_cast<const FormBilinear *>(e);
+ const void * Thbf = GetAny<const void *>((*bb->di->Th)(stack));
+ if (Thbf != Thu) return false;
+ }
+ else if (r==atype<const FormLinear *>())
+ {
+ const FormLinear * bb=dynamic_cast<const FormLinear *>(e);
+ const void * Thbf = GetAny<const void *>((*bb->di->Th)(stack));
+ if (Thbf != Thu) return false;
+ }
+ }
+ return true;
+}
+
+template<class R,class FESpace,class v_fes>
+void InitProblem( int Nb, const FESpace & Uh,
+ const FESpace & Vh,
+ KN<R> *&B,KN<R> *&X,vector< pair< FEbase<R,v_fes> * ,int> > &u_hh,
+ TypeSolveMat *typemat ,
+ vector< FEbase<R,v_fes> * > & u_h,const FESpace ** LL, bool initx )
+{
+ typedef typename FESpace::Mesh Mesh;
+ typedef typename FESpace::FElement FElement;
+ typedef typename Mesh::Element Element;
+ typedef typename Mesh::Vertex Vertex;
+ typedef typename Mesh::RdHat RdHat;
+ typedef typename Mesh::Rd Rd;
+
+ *B=R();
+
+// bool initx = typemat->t==TypeSolveMat::GC;
+
+ const Mesh & Th(Uh.Th);
+
+ if (initx)
+ {
+ if (!X || (X =B) )
+ X=new KN<R>(B->N());
+ const FEbase<R,v_fes> & u_h0 = *(u_h[0]);
+ const FESpace * u_Vh = &*u_h0.Vh ;
+
+ if ( u_Vh==0 || &(*(u_h[0])).Vh->Th != &Th )
+ {
+ *X=R();
+ if(verbosity>1)
+ cout << " -- Change of Mesh " << (u_Vh ? & (*(u_h[0])).Vh->Th: 0 )
+ << " " << &Th << endl;
+ }
+ else
+ { // copy the previous soluton to initialize CG, GMRES, etc ...
+ if (Nb==1)
+ { // modif FH 0701/2005 + april 2006
+ if(u_h[0]->x()->N() != X->N() )
+ cout << " bug ???? " << endl;
+ if (u_h[0]->x() && u_h[0]->x()->N() == X->N() )
+ *X= * u_h[0]->x();
+ else
+ *X=R();
+ }
+ else { // dispatch the solution
+ const FElement ** sK= new const FElement * [Nb];
+ KN<R> ** sol= new KN<R> * [Nb];
+ for (int i=0;i<Nb;i++) {
+
+ sol[i] = (*(u_h[i])).x() ;
+ }
+
+ for (int it=0;it<Th.nt;it++)
+ {
+ const FElement K(Uh[it]);
+ const int nbdf=K.NbDoF();
+ for (int i=0;i<Nb;i++)
+ sK[i]= new FElement( (*LL[i])[it]) ;
+ for (int df=0;df< nbdf;df++)
+ { int kfe=K.FromFE(df);
+ int kdf=K.FromDF(df);
+ if (sol[kfe]) {
+ const FElement & SK(*sK[kfe]);
+ (*X)[K(df)]= (*sol[kfe])[SK(kdf)] ;
+ }
+ else (*X)[K(df)]= R();
+ }
+ for (int i=0;i<Nb;i++)
+ delete sK[i];
+ }
+ delete [] sol;
+ delete [] sK;
+ }}
+ }
+
+
+}
+
+template<class R>
+void DefSolver(Stack stack, MatriceCreuse<R> & A, Data_Sparse_Solver & ds )
+{
+ const OneOperator* pprecon= static_cast<const OneOperator*>(ds.precon);
+ if (ds.typemat->profile)
+ {
+ if(verbosity>5) cout << " Matrix skyline type:" << ds.typemat->t <<endl;
+ MatriceProfile<R> & AA(dynamic_cast<MatriceProfile<R> &>(A));
+ throwassert(&AA);
+ double tol_pivot1= (ds.tol_pivot>0.) ? ds.tol_pivot : EPSILON/8.;
+ // cout << " tol_pivot1 " <<tol_pivot1 << endl; auto_ptr
+ switch (ds.typemat->t) {
+ case TypeSolveMat::LU : AA.LU(tol_pivot1); break;
+ case TypeSolveMat::CROUT : AA.crout(tol_pivot1); break;
+ case TypeSolveMat::CHOLESKY : AA.cholesky(tol_pivot1); break;
+ default:
+ cerr << " type resolution " << ds.typemat->t << endl;
+ CompileError("type resolution profile inconnue"); break;
+ }
+ }
+ else
+ {
+ if(verbosity>5) cout << " Matrix morse type:" << ds.typemat->t <<endl;
+ MatriceMorse<R> & AA(dynamic_cast<MatriceMorse<R> &>(A));
+ throwassert(&A);
+ switch (ds.typemat->t) {
+ case TypeSolveMat::GC:
+ if (ds.precon)
+ AA.SetSolverMaster(new SolveGCPrecon<R>(AA,pprecon,stack,ds.itmax,ds.epsilon));
+ else
+ AA.SetSolverMaster(new SolveGCDiag<R>(AA,ds.itmax,ds.epsilon));
+ break;
+ case TypeSolveMat::GMRES :
+ if (ds.precon)
+ AA.SetSolverMaster(new SolveGMRESPrecon<R>(AA,pprecon,stack,ds.NbSpace,ds.itmax,ds.epsilon));
+ else
+ AA.SetSolverMaster(new SolveGMRESDiag<R>(AA,ds.NbSpace,ds.itmax,ds.epsilon));
+ break;
+ //#ifdef HAVE_LIBUMFPACK
+ case TypeSolveMat::SparseSolver :
+ AA.SetSolverMaster(DefSparseSolver<R>::Build(stack,&AA,ds));
+// AA.SetSolverMaster(new SolveUMFPack<R>(AA,umfpackstrategy,tgv,eps,tol_pivot,tol_pivot_sym));
+ break;
+ case TypeSolveMat::SparseSolverSym :
+ AA.SetSolverMaster(DefSparseSolverSym<R>::Build(stack,&AA,ds));
+ // AA.SetSolverMaster(new SolveUMFPack<R>(AA,umfpackstrategy,tgv,eps,tol_pivot,tol_pivot_sym));
+ break;
+
+//#endif
+ default:
+ cerr << " type resolution " << ds.typemat->t << endl;
+ CompileError("type resolution inconnue"); break;
+ }
+
+ }
+ }
+
+bool SetGMRES()
+{
+ if(verbosity>1)
+ cout << " SetDefault sparse (morse) solver to GMRES" << endl;
+ DefSparseSolver<double>::solver =BuildSolverGMRES;
+ DefSparseSolver<Complex>::solver =BuildSolverGMRES;
+ return true;
+}
+
+bool SetCG()
+{
+ if(verbosity>1)
+ cout << " SetDefault sparse (morse) solver to CG" << endl;
+ DefSparseSolver<double>::solver =BuildSolverCG;
+ DefSparseSolver<Complex>::solver =BuildSolverCG;
+ return true;
+}
+
+#ifdef XXXXXXXXXXX
+#ifdef HAVE_LIBUMFPACK
+bool SetUMFPACK()
+{
+ if(verbosity>1)
+ cout << " SetDefault sparse solver to UMFPack" << endl;
+ DefSparseSolver<double>::solver =BuildSolverUMFPack;
+ DefSparseSolver<Complex>::solver =BuildSolverUMFPack;
+ return true;
+}
+
+template <>
+DefSparseSolver<double>::SparseMatSolver DefSparseSolver<double>::solver =BuildSolverUMFPack;
+template <>
+DefSparseSolver<Complex>::SparseMatSolver DefSparseSolver<Complex>::solver =BuildSolverUMFPack;
+
+#else
+template <>
+DefSparseSolver<double>::SparseMatSolver DefSparseSolver<double>::solver =BuildSolverGMRES;
+template <>
+DefSparseSolver<Complex>::SparseMatSolver DefSparseSolver<Complex>::solver =BuildSolverGMRES;
+
+bool SetUMFPACK()
+{
+ if(verbosity>1)
+ cout << " Sorry no UMFPack" << endl;
+ return false;
+}
+
+#endif
+#endif
+template <>
+DefSparseSolverSym<double>::SparseMatSolver DefSparseSolverSym<double>::solver =BuildSolverGMRES;
+template <>
+DefSparseSolverSym<Complex>::SparseMatSolver DefSparseSolverSym<Complex>::solver =BuildSolverGMRES;
+
+
+template<class R>
+ MatriceCreuse<typename CadnaType<R>::Scalaire> * DefSolverCadna(
+ Stack stack,
+ MatriceCreuse<R> & A,
+ Data_Sparse_Solver & ds
+/* long NbSpace ,
+ long itmax,
+ double & eps,
+ bool initmat,
+ int strategy,
+ const OneOperator *precon,
+ double tgv,
+ double tol_pivot, double tol_pivot_sym
+*/
+)
+{
+ typedef typename CadnaType<R>::Scalaire R_st;
+ // MatriceCreuse<R_st> *CadnaMat;
+ if (ds.typemat->profile)
+ {
+ if(verbosity>5) cout << " Matrix skyline type:" << ds.typemat->t <<endl;
+ MatriceProfile<R> & AAA(dynamic_cast<MatriceProfile<R> &>(A));
+ MatriceProfile<R_st> &AA(*new MatriceProfile<R_st>(AAA)); //
+
+ throwassert(&AA);
+ double tol_pivot1= (ds.tol_pivot>0) ? ds.tol_pivot : EPSILON/8.;
+ // cout << " tol_pivot1 " <<tol_pivot1 << endl;
+ switch (ds.typemat->t) {
+ case TypeSolveMat::LU : AA.LU(tol_pivot1); break;
+ case TypeSolveMat::CROUT : AA.crout(tol_pivot1); break;
+ case TypeSolveMat::CHOLESKY : AA.cholesky(tol_pivot1); break;
+ default:
+ cerr << " type resolution " << ds.typemat->t << endl;
+ CompileError("type resolution profile inconnue"); break;
+ }
+ return &AA;
+ }
+ else
+ {
+ ExecError("matrix morse & CADNA are incompatible today, sorry!");
+ return 0;
+ }
+ return 0;
+ }
+
+template<class R,class FESpace,class v_fes>
+void DispatchSolution(const typename FESpace::Mesh & Th,int Nb, vector< FEbase<R,v_fes> * > & u_h,KN<R> * X,KN<R> * B,const FESpace ** LL,const FESpace & Uh)
+ {
+ typedef typename FESpace::Mesh Mesh;
+ typedef typename FESpace::FElement FElement;
+ typedef typename Mesh::Element Element;
+ typedef typename Mesh::Vertex Vertex;
+ typedef typename Mesh::RdHat RdHat;
+ typedef typename Mesh::Rd Rd;
+
+ // dispatch the solution
+ if (Nb==1) {
+ *(u_h[0])=X;
+ if (X != B ) delete B; }
+ else {
+ const FElement ** sK= new const FElement * [Nb];
+
+ KN<R> ** sol= new KN<R> * [Nb];
+ for (int i=0;i<Nb;i++) {
+ sol[i]= new KN<R>( LL[i]->NbOfDF) ;
+ *(u_h[i]) = sol[i];
+ }
+
+ for (int it=0;it<Th.nt;it++)
+ {
+ const FElement K(Uh[it]);
+ const int nbdf=K.NbDoF();
+ for (int i=0;i<Nb;i++)
+ sK[i]= new FElement( (*LL[i])[it]) ;
+ for (int df=0;df< nbdf;df++)
+ { int kfe=K.FromFE(df);
+ int kdf=K.FromDF(df);
+ const FElement & SK(*sK[kfe]);
+ (*sol[kfe])[SK(kdf)] = (*X)[K(df)];
+ }
+ for (int i=0;i<Nb;i++)
+ delete sK[i];
+
+ }
+
+ delete [] sK;
+ delete [] sol;
+ if (X != B && X ) delete X;
+ delete B;
+ }
+ }
+
+#ifdef HAVE_LIBUMFPACK
+TypeSolveMat::TSolveMat TypeSolveMat::defaultvalue=TypeSolveMat::SparseSolver;
+#else
+TypeSolveMat::TSolveMat TypeSolveMat::defaultvalue=TypeSolveMat::LU;
+#endif
+
+
+template<class R,class FESpace,class v_fes>
+AnyType Problem::eval(Stack stack,Data<FESpace> * data,CountPointer<MatriceCreuse<R> > & dataA,
+ MatriceCreuse< typename CadnaType<R>::Scalaire > * & cadnamat ) const
+{
+ typedef typename FESpace::Mesh Mesh;
+ typedef typename FESpace::FElement FElement;
+ typedef typename Mesh::Element Element;
+ typedef typename Mesh::Vertex Vertex;
+ typedef typename Mesh::RdHat RdHat;
+ typedef typename Mesh::Rd Rd;
+
+ using namespace Fem2D;
+ typedef typename CadnaType<R>::Scalaire R_st;
+ MeshPoint *mps= MeshPointStack(stack),mp=*mps;
+ Data_Sparse_Solver ds;
+ /* long NbSpace = 50;
+ long itmax=0;
+ double epsilon=1e-6;*/
+ string save;
+
+// bool VF=false;
+// VF=isVF(op->largs);
+ // assert(!VF);
+// double tgv = 1e30;
+// type de matrice par default
+ TypeSolveMat tmat(TypeSolveMat::defaultvalue);
+
+ ds.typemat=&tmat;
+ // bool initmat=true;
+/*
+ int strategy=0;
+ double tol_pivot=-1.; // defaut UMFPACK value Add FH 31 oct 2005
+ double tol_pivot_sym=-1.; // defaut Add FH 31 oct 2005
+
+ KN<int> param_int;
+ KN<double> param_double;
+ string *param_char = NULL;
+ KN<int> perm_r;
+ KN<int> perm_c;
+ string *file_param_int; // Add J. Morice 02/09
+ string *file_param_double;
+ string* file_param_char;
+ string* file_param_perm_r;
+ string* file_param_perm_c;
+*/
+ KN<double>* cadna=0;
+/*
+ { "save",&typeid(string* )}, 0
+ { "cadna",&typeid(KN<double>*)}, 1
+ { "bmat",&typeid(Matrice_Creuse<R>* )}, 2
+
+ */
+ if (nargs[0]) save = *GetAny<string*>((*nargs[0])(stack));
+ if (nargs[1]) cadna= GetAny<KN<double>* >((*nargs[1])(stack));
+ // bmat not used .... bizarre
+/*
+ if (nargs[0]) ds.initmat= ! GetAny<bool>((*nargs[0])(stack));
+ if (nargs[1]) ds.typemat= GetAny<TypeSolveMat *>((*nargs[1])(stack));
+ if (nargs[2]) ds.epsilon= GetAny<double>((*nargs[2])(stack));
+ // 3 precon
+ if (nargs[4]) ds.NbSpace= GetAny<long>((*nargs[4])(stack));
+ if (nargs[6]) ds.tgv= GetAny<double>((*nargs[6])(stack));
+ if (nargs[7]) ds.strategy = GetAny<long>((*nargs[7])(stack));
+ if (nargs[8]) save = *GetAny<string*>((*nargs[8])(stack));
+ if (nargs[9]) cadna= GetAny<KN<double>* >((*nargs[9])(stack));
+*/
+/*
+ if (nargs[10]) ds.tol_pivot= GetAny<double>((*nargs[10])(stack));
+ if (nargs[11]) ds.tol_pivot_sym= GetAny<double>((*nargs[11])(stack));
+ if (nargs[12]) ds.itmax = GetAny<long>((*nargs[12])(stack)); // fevr 2007
+
+ if (nargs[13]) ds.param_int= GetAny< KN<int> >((*nargs[13])(stack)); // Add J. Morice 02/09
+ if (nargs[14]) ds.param_double= GetAny< KN<double> >((*nargs[14])(stack));
+ if (nargs[15]) ds.param_char= GetAny< string * >((*nargs[15])(stack)); //
+ if (nargs[16]) ds.perm_r = GetAny< KN<int > >((*nargs[16])(stack));
+ if (nargs[17]) ds.perm_c = GetAny< KN<int> >((*nargs[17])(stack)); //
+ if (nargs[18]) ds.file_param_int= GetAny< string* >((*nargs[18])(stack)); // Add J. Morice 02/09
+ if (nargs[19]) ds.file_param_double= GetAny< string* > ((*nargs[19])(stack));
+ if (nargs[20]) ds.file_param_char= GetAny< string* >((*nargs[20])(stack)); //
+ if (nargs[21]) ds.file_param_perm_r = GetAny< string* >((*nargs[21])(stack));
+ if (nargs[22]) ds.file_param_perm_c = GetAny< string* >((*nargs[22])(stack)); //
+ */
+ SetEnd_Data_Sparse_Solver<R>(stack,ds,nargs,n_name_param);
+
+
+ // for the gestion of the PTR.
+ WhereStackOfPtr2Free(stack)=new StackOfPtr2Free(stack);// FH aout 2007
+
+ bool sym = ds.typemat->sym;
+
+ list<C_F0>::const_iterator ii,ib=op->largs.begin(),
+ ie=op->largs.end();
+ int Nbcomp2=var.size(),Nbcomp=Nbcomp2/2; // nb de composante
+ throwassert(Nbcomp2==2*Nbcomp);
+// Data *data= dataptr(stack);
+ // data->init();
+ KN<int> which_comp(Nbcomp2),which_uh(Nbcomp2);
+
+ TabFuncArg tabexp(stack,Nbcomp);
+ typedef pair< FEbase<R,v_fes> *,int> pfer;
+ vector< pair< FEbase<R,v_fes> *,int> > u_hh(Nbcomp2);
+ for (size_t i=0;i<var.size();i++)
+ u_hh[i] = GetAny< pfer >( (*(var[i]))(stack));
+ for (size_t i=0;i<var.size();i++)
+ u_hh[i].first->newVh();
+ // compression pour les cas vectoriel
+ int kkk=0;
+ for (int i=0;i<Nbcomp2;i++)
+ {
+ if ( u_hh[i].second==0)
+ kkk++;
+ else {
+ throwassert(u_hh[i].second==(u_hh[i-1].second+1));}
+ which_uh[i]=kkk-1;
+ which_comp[i]=u_hh[i].second;
+ }
+
+ vector< FEbase<R,v_fes> * > u_h(kkk);
+ kkk= 0;
+ for (int i=0;i<Nbcomp2;i++)
+ if ( u_hh[i].second==0) u_h[kkk++]=u_hh[i].first;
+ const int Nb2 = kkk, Nb=Nb2/2; // nb of FESpace
+ throwassert(Nb2==2*Nb);
+
+ //const FESpace ** LL = new const FESpace *[var.size()];
+ KN<const FESpace *> LL(var.size());
+ for (int i=0;i<Nb2;i++)
+ LL[i]= (*(u_h[i])).newVh();
+ SHOWVERB(cout << "Problem " << Nb << endl);
+
+ // const de
+
+ // const FESpace * Uhh , *Vhh;
+ const Mesh * pTh= &LL[0]->Th;
+ for (int i=0;i<Nb2;i++)
+ if ( &LL[i]->Th != pTh)
+ ExecError("all the finites elements spaces must be defined on the same mesh in solve");
+ if ( pTh != data->pTh )
+ {
+ ds.initmat = true;
+ data->pTh=pTh;
+ if (Nb==1)
+ { // cas scalaire
+ data->Uh=LL[0];
+ data->Vh=LL[1]; }
+ else
+ { // cas vectoriel
+ bool same=true;
+ for (int i=0;i<Nb;i++)
+ if ( LL[i] != LL[Nb+i] )
+ {
+ same = false;
+ break;
+ }
+ if(!same)
+ InternalError("Methode de Galerkine (a faire)");
+ else
+ {
+
+ bool unique=true;
+ for (int i=1;i<Nb;i++)
+ if ( LL[0] != LL[i])
+ {
+ unique = false;
+ break;
+ }
+ if (unique)
+ data->Uh.master( new FESpace(*LL[0],Nb));
+ else
+ data->Uh.master(new FESpace(LL,Nb));
+ data->Vh=data->Uh;
+ }
+
+ }
+ }
+
+ const FESpace & Uh(*data->Uh);
+ const FESpace & Vh(*data->Vh);
+ throwassert(Nbcomp==Uh.N && Nbcomp==Vh.N);
+ KN<R> *B=new KN<R>(Vh.NbOfDF);
+ KN<R> *X=B; //
+ const Mesh & Th(Uh.Th);
+ bool initx = true; //typemat->t==TypeSolveMat::GC ; // make x and b different in all case
+ // more safe for the future ( 4 days lose with is optimization FH )
+
+ InitProblem<R,FESpace,v_fes>( Nb, Uh, Vh, B, X,u_hh,ds.typemat , u_h, LL, initx);
+
+ if(verbosity>2) cout << " Problem(): initmat " << ds.initmat << " VF (discontinuous Galerkin) = " << VF << endl;
+
+
+
+ if (ds.initmat)
+ {
+ if (ds.typemat->profile)
+ {
+ dataA.master(new MatriceProfile<R>(Vh,VF));
+ }
+ else
+ {
+ if ( &Uh == & Vh )
+ dataA.master(new MatriceMorse<R>(Vh,sym,VF));
+ else
+ dataA.master(new MatriceMorse<R>(Vh,Uh,VF));
+ }
+ MatriceCreuse<R> & AA(dataA);
+ if(verbosity>1) cout << " -- size of Matrix " << AA.size()<< " Bytes" << " skyline =" <<ds.typemat->profile << endl;
+ }
+ MatriceCreuse<R> & A(dataA);
+ if (AssembleVarForm( stack,Th,Uh,Vh,sym, ds.initmat ? &A:0 , B, op->largs))
+ {
+ *B = - *B;
+ // hach FH
+ for (int i=0, n= B->N(); i< n; i++)
+ if( abs((*B)[i]) < 1.e-60 ) (*B)[i]=0;
+
+ AssembleBC<R,FESpace> ( stack,Th,Uh,Vh,sym, ds.initmat ? &A:0 , B, initx ? X:0, op->largs, ds.tgv );
+ }
+ else
+ *B = - *B;
+ MatriceCreuse<R_st> * ACadna = 0;
+
+
+ try {
+
+ if (ds.initmat)
+ {
+ if(cadna)
+ ACadna = DefSolverCadna( stack,A, ds);
+ else
+ DefSolver(stack, A, ds);
+ }
+
+
+
+ // if(verbosity>3) cout << " B min " << B->min() << " , max = " << B->max() << endl;
+ if( save.length() )
+ {
+ string savem=save+".matrix";
+ string saveb=save+".b";
+ {
+ ofstream outmtx( savem.c_str());
+ outmtx << A << endl;
+ }
+ {
+ ofstream outb(saveb.c_str());
+ outb<< *B << endl;
+ }
+
+ }
+ if (verbosity>99)
+ {
+ cout << " X= " << *X << endl;
+ cout << " B= " << *B << endl;
+ }
+
+ if(ACadna)
+ {
+ KN<R_st> XX(*X);
+ KN<R_st> BB(*B);
+ ACadna->Solve(XX,BB);
+ *X=XX;
+ *cadna =-1.;
+
+#ifdef HAVE_CADNA
+ R_st xxmin = XX.min();
+ R_st xxmax = XX.max();
+ cout << " cadna: min " << xxmin << "/ nd " << cestac(xxmin)
+ << " , max " << xxmax << " / nd " << cestac(xxmax) << endl ;
+ int nn= XX.N();
+ if ( cadna->N() == nn )
+ for (int i=0;i<nn;++i)
+ (*cadna)[i] = cestac(XX[i]);
+ else
+ cerr << "Warning: Sorry array is incorrect size to store cestac "
+ << nn << " != " << cadna->N() << endl;
+#endif
+ }
+ else
+
+ A.Solve(*X,*B);
+
+ if (verbosity>99)
+ {
+ cout << " X= " << *X << endl;
+ }
+ }
+ catch (...)
+ {
+ if(verbosity) cout << " catch an erreur in solve => set sol = 0 !!!!!!! " << endl;
+ *X=R(); // erreur set the sol of zero ????
+ DispatchSolution<R,FESpace,v_fes>(Th,Nb,u_h,X,B,LL,Uh);
+ throw ;
+ }
+ DispatchSolution<R,FESpace,v_fes>(Th,Nb,u_h,X,B,LL,Uh);
+
+
+ if (verbosity)
+ {cout << " -- Solve : \n" ;
+ for (int i=0;i<Nb;i++)
+ cout << " min " << (u_h[i])->x()->min() << " max " << (u_h[i])->x()->max() << endl ;
+ }
+
+ // delete [] LL;
+ // if (save) delete save; // clean memory
+ *mps=mp;
+ return SetAny<const Problem *>(this);
+}
+
+
+
+int dimProblem(const ListOfId &l)
+{
+ int dim=2;
+ int nb=l.size();//,nbarray=0;//,n=0,
+ //const UnId *p1;
+ if(nb>0)
+ {
+ if (l[0].array)
+ {
+ ListOfId * array=l[0].array;
+ if(array->size()>0)
+ {
+ const UnId & idi( (*array)[0]);
+ if (idi.r == 0 && idi.re == 0 && idi.array==0 )
+ {
+ C_F0 c=::Find( idi.id);
+ if(BCastTo<pf3c>(c) ) dim=3;
+ if(BCastTo<pf3r>(c) ) dim=3;
+ }
+ }
+ }
+ else
+ {
+ C_F0 c=::Find(l[0].id);
+ if(BCastTo<pf3c>(c) ) dim=3;
+ if(BCastTo<pf3r>(c) ) dim=3;
+ }
+
+ }
+ return dim;
+
+}
+template<class pfer,class pfec>
+bool GetBilinearParam(const ListOfId &l,basicAC_F0::name_and_type *name_param,int n_name_param,
+ Expression *nargs,int & N,int & M, vector<Expression> & var )
+{
+ bool unset=true,complextype=false;
+
+ for (int i=0;i<n_name_param;i++)
+ nargs[i]=0;
+ int nb=l.size(),n=0,nbarray=0;
+ ListOfId * array[2];
+ for (int i=0;i<nb;i++)
+ if (l[i].r == 0 && l[i].re == 0 && l[i].array == 0)
+ n++;
+ else if (l[i].array) array[Min(nbarray++,1)] = l[i].array;
+ else
+ {
+ bool ok=false;
+ for (int j=0;j<n_name_param;j++)
+ if (!strcmp(l[i].id,name_param[j].name))
+ {
+ ok = !nargs[j];
+ nargs[j]= map_type[name_param[j].type->name()]->CastTo(C_F0(l[i].e,l[i].re));
+ break;
+ }
+ if (!ok)
+ {
+ cerr << " Error name argument " << l[i].id << " the kown arg : ";
+ for (int k=0;k<n_name_param;k++)
+ cerr << name_param[k].name << " ";
+ cerr << endl;
+ CompileError("Unkown name argument or two times same name argument ");
+ }
+ }
+
+ if (nbarray)
+ { // new version ok
+ if(nbarray!=2)
+ CompileError(" Must have 2 array, one for unknow functions, one for test functions");
+ N = array[0]->size();
+ M = array[1]->size();
+ var.resize(N+M);
+ for (size_t k=0,j=0;k<2;k++)
+ for (size_t i=0;i<array[k]->size();i++)
+ {
+ const UnId & idi((*array[k])[i]);
+ if (idi.r == 0 && idi.re == 0 && idi.array==0 )
+ { C_F0 c=::Find( idi.id);
+ if (unset)
+ complextype = BCastTo<pfec>(c) , unset=false;
+
+ if(complextype)
+ var[j++]=CastTo<pfec>(c);
+ else
+ var[j++]=CastTo<pfer>(c);
+ }
+ else
+ CompileError(" Just Variable in array parameter ");
+ }
+ }
+ else
+ { // old version
+ assert(n%2==0);
+ N=n/2;
+ M=N;
+ var.resize(N+M);
+ for (size_t i=0,j=0;i<l.size();i++)
+ if (l[i].r == 0 && l[i].re == 0 && l[i].array==0 )
+ {
+ C_F0 c=::Find(l[i].id);
+ if (unset)
+ complextype = BCastTo<pfec>(c) , unset=false;
+ if(complextype)
+ var[j++]=CastTo<pfec>(c);
+ else
+ var[j++]=CastTo<pfer>(c);
+ }
+
+ }
+ return complextype;
+}
+
+
+/*
+int DimForm( list<C_F0> & largs)
+{
+ int dim=0;
+ list<C_F0>::iterator ii,ib=largs.begin(),
+ ie=largs.end();
+ for (ii=ib;ii != ie;ii++)
+ {
+ Expression e=ii->LeftValue();
+ aType r = ii->left();
+ if (r==atype<const FormBilinear *>())
+ {
+ const FormBilinear * bb=dynamic_cast<const FormBilinear *>(e);
+ if(dim) ffassert(bb->d==dim);
+ else
+ dim=bb->d;
+ }
+ else if (r==atype<const FormLinear *>())
+ {
+ const FormLinear * ll=dynamic_cast<const FormLinear *>(e);
+ if(dim) ffassert(bb->d==dim);
+ else
+ dim=bb->d;
+
+ }
+ else if (r == atype<const BC_set *>())
+ {
+ const BC_set * bc=dynamic_cast<const BC_set *>(e);
+ if (bc->complextype) complextype=true;
+
+ }
+ }
+
+ }*/
+bool FieldOfForm( list<C_F0> & largs ,bool complextype) // true => complex problem
+{
+ // bool iscomplextype=complextype;
+ list<C_F0>::iterator ii,ib=largs.begin(),
+ ie=largs.end();
+ // bool complextype =false;
+ for (ii=ib;ii != ie;ii++)
+ {
+ Expression e=ii->LeftValue();
+ aType r = ii->left();
+ if (r==atype<const FormBilinear *>())
+ {
+ const FormBilinear * bb=dynamic_cast<const FormBilinear *>(e);
+ if (! bb->b->mappable(BCastToR))
+ complextype=true;
+ }
+ else if (r==atype<const FormLinear *>())
+ {
+ const FormLinear * ll=dynamic_cast<const FormLinear *>(e);
+ if (! ll->l->mappable(BCastToR))
+ complextype=true;
+ }
+ else if (r == atype<const BC_set *>())
+ {
+ const BC_set * bc=dynamic_cast<const BC_set *>(e);
+ if (bc->complextype) complextype=true;
+
+ }
+ }
+
+ for (ii=ib;ii != ie;ii++)
+ {
+ Expression e=ii->LeftValue();
+ aType r = ii->left();
+ if (r==atype<const FormBilinear *>())
+ {
+ FormBilinear * bb=new FormBilinear(*dynamic_cast<const FormBilinear *>(e));
+ Foperator * b=const_cast< Foperator *>(bb->b);
+ // const Foperator * b=bb->b;
+ //cout << b << " bb->b " << bb->b << " " << bb->b << " " << bb->b->isoptimize <<endl;
+ assert(b->isoptimize==false);
+ if (complextype) b->mapping(&CCastToC);
+ else b->mapping(&CCastToR) ;
+ Foperator * bn = b->Optimize(currentblock);
+ *bb->b = *bn;
+ *ii=C_F0(bb,r);
+ }
+ else if (r==atype<const FormLinear *>())
+ {
+ FormLinear * ll=new FormLinear(*dynamic_cast<const FormLinear *>(e));
+ Ftest * l= const_cast<Ftest *>(ll->l);
+ if (complextype) l->mapping(&CCastToC) ;
+ else l->mapping(&CCastToR) ;
+ Ftest * ln = l->Optimize(currentblock);
+ *ll->l=*ln;
+ *ii=C_F0(ll,r);
+ //cout << l << " ll->l " << ll->l << " " << ll->l->isoptimize <<endl;
+ }
+ else if (r==atype<const BC_set *>())
+ {// modif FH mai 2007 A FAIRE il y a un bug ici XXXXXXXXXXXXX
+
+ BC_set * bc= new BC_set(*dynamic_cast<const BC_set *>(e));
+ if (complextype && !bc->complextype) {
+ bc->CastToK<Complex>() ;
++<<<<<<< HEAD
+ if(verbosity > 10) cout << " Bc to complex " << endl;
++=======
++ cout << " Bc to complex " << endl;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ }
+ //else bc->mapping(&CCastToR) ;
+ //cout << l << " ll->l " << ll->l << " " << ll->l->isoptimize <<endl;
+ *ii=C_F0(bc,r);
+ }
+
+ }
+ return complextype;
+}
+
+
+Problem::Problem(const C_args * ca,const ListOfId &l,size_t & top) :
+ op(new C_args(*ca)),
+ var(l.size()),
+ VF(false),
+ offset(align8(top)),
+ dim(dimProblem(l))
+{
+ // cout << "Problem : -----------------------------" << top << " dim = " << dim<< endl;
+ top = offset + max(sizeof(Data<FESpace>),sizeof(Data<FESpace>));
+
+ bool iscomplex;
+ if(dim==2)
+ iscomplex=GetBilinearParam<pfer,pfec>(l,name_param,n_name_param,nargs, Nitem,Mitem,var);
+ else if (dim==3)
+ iscomplex=GetBilinearParam<pf3r,pf3c>(l,name_param,n_name_param,nargs, Nitem,Mitem,var);
+ else ffassert(0); // bug
+
+ precon = 0; // a changer
+ if ( nargs[3+3])
+ {
+ const Polymorphic * op= dynamic_cast<const Polymorphic *>(nargs[3+3]);
+ assert(op);
+ precon = op->Find("(",ArrayOfaType(atype<KN<R>* >(),false));
+ }
+
+ VF=isVF(op->largs);
+ // cout << " Problem ) VF = " << VF << endl;
+ complextype = FieldOfForm(op->largs,iscomplex) ; // Warning do the casting of all expression in double or complex
+ if( complextype && !iscomplex)
+ CompileError("Error: Problem a complex problem with no complex FE function ");
+ if( verbosity > 1)
+ cout << " -- Problem type ( complex : " << complextype << " ) " <<endl;
+}
+
+Expression IsFebaseArray(Expression f)
+{
+ assert(f);
+ size_t N=f->nbitem();
+ E_Array * vvi(dynamic_cast< E_Array *>(f));
+ if ( ! vvi) return 0;
+ E_Array & vi(*vvi);
+ Expression febase=0;
+ for (size_t i=0;i<N;i++)
+ {
+ assert(vi[i].left() == atype<pfer>() );
+ const E_FEcomp<R,v_fes> * comp=dynamic_cast<const E_FEcomp<R,v_fes> *>( vi[i].LeftValue()) ;
+ if (!(comp && comp->comp == (int) i && comp->N == (int) N)) return 0;
+ if (!febase) febase = comp->a0;
+ else if(comp->a0 != febase) return 0;
+ }
+ return febase;
+}
+template<class VFES>
+Call_FormBilinear<VFES>::Call_FormBilinear(int dd,Expression * na,Expression BB,Expression fi, Expression fj)
+ : d(dd),nargs(na),largs(),N(fi->nbitem()),M(fj->nbitem()),
+ euh(fi), evh(fj)
+{
+ assert(nargs );
+ const C_args * LLL=dynamic_cast<const C_args *>(BB);
+ if (!LLL)
+ CompileError("Sorry the variationnal form (varf) is not a the variationnal form (type const C_args *)");
+ largs=LLL->largs;
+}
+template<class VFES>
+Call_FormLinear<VFES>::Call_FormLinear(int dd,Expression *na,Expression LL, Expression ft)
+ : d(dd),largs(),nargs(na),N(ft->nbitem()),
+ ppfes(ft)//IsFebaseArray(ft))
+{
+ const C_args * LLL=dynamic_cast<const C_args *>(LL);
+ if ( !LLL) CompileError("The parameter of a LinearForm must be a array of all componate of FE function");
+ largs=LLL->largs;
+}
+bool C_args::IsLinearOperator() const {
+ // int n=largs.size();
+ aType tRn =atype<KN<R>* >();
+ aType tCn =atype<KN<Complex>* >();
+ for (const_iterator i=largs.begin(); i != largs.end();i++)
+ {
+ C_F0 c= *i;
+ // Expression e=c;
+ aType r=c.left();
+ if ( ( r != atype<const FormLinear *>() )
+ && ( r != atype<const BC_set *>() )
+ && ( r != atype<VirtualMatrice<R>::plusAx >() )
+ && ( r != atype<VirtualMatrice<R>::plusAtx >() )
+ && ( r != atype<VirtualMatrice<Complex>::plusAx >() )
+ && ( r != atype<VirtualMatrice<Complex>::plusAtx >() )
+ && ( r != tRn)
+ && ( r != tCn)
+ ) return false;
+ }
+ return true;}
+
+bool C_args::IsBilinearOperator() const {
+ //int n=largs.size();
+ aType tRn =atype<Matrice_Creuse<R>* >();
+ aType tCn =atype<Matrice_Creuse<Complex>* >();
+ for (const_iterator i=largs.begin(); i != largs.end();i++)
+ {
+ C_F0 c= *i;
+ //Expression e=c;
+ aType r=c.left();
+ if ( ( r!= atype<const FormBilinear *>() )
+ && ( r != atype<const BC_set *>() )
+ && ( r != tRn)
+ && ( r != tCn)
+ ) return false;
+ }
+ return true;}
+
+
+void SetArgsFormLinear(const ListOfId *lid,int ordre)
+{
+ // the local parameter are
+ // ordre ==2 => bilinear form unknown (newU_) and test function (newV_)
+ // ordre ==1 => linear form just test function (newV_)
+ // ---------------------
+ throwassert(ordre >0 && ordre <=2 && (lid || lid->size()>0 ) );
+ const ListOfId & l(*lid);
+ int nb=l.size();
+ int n=0;
+ C_F0 type,init;
+ int nbarray=0;
+ ListOfId * array[2];
+ aType uh=atype<const finconnue*>(),vh=atype<const ftest*>();
+
+ for (int i=0;i<nb;i++)
+ if (l[i].r == 0 && l[i].re == 0 && l[i].id ) n++;
+ else if (l[i].array)
+ array[Min(nbarray++,2)] = l[i].array;
+ if (nbarray && n==0)
+ { //
+
+ if(nbarray!=ordre)
+ { cerr << " form " << ordre << " == " << nbarray << " Nb of Array "<<endl;
+ CompileError(" Must have 1 or 2 array, one for unknow functions, one for test functions");
+ }
+ for (int k=0;k<ordre;k++)
+ for (int i=0,iend=array[k]->size();i<iend;i++)
+ {
+ const UnId & idi((*array[k])[i].id);
+ if (idi.r == 0 && idi.re == 0 && idi.array==0 )
+ {
+ if (k==ordre-2) // unknow function just in case of bilinear form
+ currentblock->NewID(uh,idi.id,C_F0(newU_(i),uh));
+ else // test function
+ currentblock->NewID(vh,idi.id,C_F0(newV_(i),vh));
+ }
+ else
+ CompileError(" Just Variable in array parameter ");
+ }
+ }
+ else if (nbarray==0)
+ { // a supprimer to remove in case of bilinear
+
+ SHOWVERB(cout << "SetArgs:: form set parameter " << endl);
+ if( ! ( ordre==1 || n%2==0) )
+ CompileError(" Error in test or unkwon function (odd number of function) ");
+ ffassert( ordre==1 || n%2==0);
+ int nn=ordre==1 ? 0 : n/2; // ordre == 1 => no unknown function just test function
+
+ for (int i=0,j=0;i<nb;i++)
+ if (l[i].r == 0 && l[i].re == 0 && l[i].array==0)
+ {
+ SHOWVERB(cout <<" " << l[i].id << " " << (j<nn) << endl);
+ if (j<nn)
+ currentblock->NewID(uh,l[i].id,C_F0(newU_(j%nn),uh));
+ else
+ currentblock->NewID(vh,l[i].id,C_F0(newV_(j%nn),vh));
+ j++;
+ }
+ }
+ else
+ {
+ CompileError(" Sorry you mixte formulation with and without array ");
+ }
+}
+
+const Fem2D::GQuadratureFormular<R3> & CDomainOfIntegration::FIV(Stack stack) const
+{
+ using namespace Fem2D;
+ if (nargs[8]) return *GetAny<const Fem2D::GQuadratureFormular<R3> *>((*nargs[8])(stack));
+ int exact = 5;
+ if (nargs[2]) exact= GetAny<long>((*nargs[2])(stack))-1;
+ GQuadratureFormular<R3> *qf=QF_Simplex<R3>(exact);//QF_Tria_exact(exact);
+ if(verbosity>99 && qf ) cout << " QF Tet n:" << qf->n << " exact = " << exact << endl;
+ if(qf) return *qf;
+ /*
+ if( QuadratureFormular_T_1.exact >= exact ) return QuadratureFormular_T_1;
+ if( QuadratureFormular_T_2.exact >= exact ) return QuadratureFormular_T_2;
+ if( QuadratureFormular_T_5.exact >= exact ) return QuadratureFormular_T_5;
+ if( QuadratureFormular_T_7.exact >= exact ) return QuadratureFormular_T_7;
+ if( QuadratureFormular_T_9.exact >= exact ) return QuadratureFormular_T_9;
+ */
+ cerr << "Warning : Order of the Quadrature Formular order " << exact+1 << " exact = " << exact << endl;
+ // ExecError(" We find no Quadrature Formular on Tet for this order: too high");
+ return QuadratureFormular_Tet_5;
+}
+
+const Fem2D::QuadratureFormular & CDomainOfIntegration::FIT(Stack stack) const
+{
+ using namespace Fem2D;
+ if (nargs[0]) return *GetAny<const Fem2D::QuadratureFormular *>((*nargs[0])(stack));
+ int exact = 5;
+ if (nargs[2]) exact= GetAny<long>((*nargs[2])(stack))-1;
+ QuadratureFormular *qf=QF_Simplex<R2>(exact);//QF_Tria_exact(exact);
+ if(verbosity>99 && qf ) cout << " QF Tria n:" << qf->n << " exact = " << exact << endl;
+ if(qf) return *qf;
+ /*
+ if( QuadratureFormular_T_1.exact >= exact ) return QuadratureFormular_T_1;
+ if( QuadratureFormular_T_2.exact >= exact ) return QuadratureFormular_T_2;
+ if( QuadratureFormular_T_5.exact >= exact ) return QuadratureFormular_T_5;
+ if( QuadratureFormular_T_7.exact >= exact ) return QuadratureFormular_T_7;
+ if( QuadratureFormular_T_9.exact >= exact ) return QuadratureFormular_T_9;
+ */
+ cerr << " Order of the Quadature Formular: order = " << exact+1 << " exact = " << exact << endl;
+ ExecError("Sorry, we find no Quadrature Formular on Triangle for this order: too high.");
+ return QuadratureFormular_T_1;
+}
+const Fem2D::QuadratureFormular1d & CDomainOfIntegration::FIE(Stack stack) const
+{
+ using namespace Fem2D;
+ if (nargs[1]) return *GetAny<const Fem2D::QuadratureFormular1d *>((*nargs[1])(stack));
+ int exact = 5;
+ if (nargs[2]) exact= GetAny<long>((*nargs[2])(stack))-1;
+ QuadratureFormular1d *qf=QF_Simplex<R1>(exact);//QF_1d_exact(exact);
+ if(verbosity>99 && qf ) cout << " QF 1d n:" << qf->n << " exact = " << exact << endl;
+ if(qf) return *qf;
+ /*
+ if( 1 >= exact ) return QF_GaussLegendre1;
+ if( 3 >= exact ) return QF_GaussLegendre2;
+ if( 5 >= exact ) return QF_GaussLegendre3;
+ if( 7 >= exact ) return QF_GaussLegendre4;
+ if( 9 >= exact ) return QF_GaussLegendre5;
+ */
+ cerr << " Ordre of the Integration Formular on Edge, order = " << exact+1 << " exact = " << exact << endl;
+ ExecError(" We find no Quadrature Formular on Edge for this order: too high.");
+ return QF_GaussLegendre1;
+}
+
+
+namespace Fem2D {
+
+
+// instantiation des template en double
+ template bool AssembleVarForm<double,MatriceCreuse<double>,FESpace >(Stack stack,const FESpace::Mesh & Th,
+ const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<double> * A,KN_<double> * B,const list<C_F0> &largs );
+
+ template bool AssembleVarForm<double,MatriceCreuse<double>,FESpace3 >(Stack stack,const FESpace3::Mesh & Th,
+ const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ MatriceCreuse<double> * A,KN_<double> * B,const list<C_F0> &largs );
+
+ template bool AssembleVarForm<double,map< pair<int,int>, double>,FESpace >(Stack stack,const FESpace::Mesh & Th,
+ const FESpace & Uh,const FESpace & Vh,bool sym,
+ map< pair<int,int>, double> * A,KN_<double> * B,const list<C_F0> &largs );
+ //3d ->
+ template bool AssembleVarForm<double,map< pair<int,int>, double>,FESpace3 >(Stack stack,const FESpace3::Mesh & Th,
+ const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ map< pair<int,int>, double> * A,KN_<double> * B,const list<C_F0> &largs );
+
+
+ template void AssembleLinearForm<double>(Stack stack,const Mesh & Th,const FESpace & Vh,KN_<double> * B,const FormLinear * const l);
+
+ template void AssembleBilinearForm<double>(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<double> & A, const FormBilinear * b );
+ template void AssembleBilinearForm<double>(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ map<pair<int,int>, double > & A, const FormBilinear * b );
+
+ // instantiation des template en Complex
+
+ template bool AssembleVarForm<Complex,MatriceCreuse<Complex>,FESpace >(Stack stack,const FESpace::Mesh & Th,
+ const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<Complex> * A,KN_<Complex> * B,const list<C_F0> &largs );
+
+ template bool AssembleVarForm<Complex,map<pair<int,int>, Complex >,FESpace >(Stack stack,const FESpace::Mesh & Th,
+ const FESpace & Uh,const FESpace & Vh,bool sym,
+ map<pair<int,int>, Complex > * A,KN_<Complex> * B,const list<C_F0> &largs );
+ // 3d
+ template bool AssembleVarForm<Complex,MatriceCreuse<Complex>,FESpace3 >(Stack stack,const FESpace3::Mesh & Th,
+ const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ MatriceCreuse<Complex> * A,KN_<Complex> * B,const list<C_F0> &largs );
+
+ template bool AssembleVarForm<Complex,map<pair<int,int>, Complex >,FESpace3 >(Stack stack,const FESpace3::Mesh & Th,
+ const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ map<pair<int,int>, Complex > * A,KN_<Complex> * B,const list<C_F0> &largs );
+ // 3d fin
+//template bool AssembleVarForm<double,map< pair<int,int>, Complex> >(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+// map< pair<int,int>, Complex> * A,KN<double> * B,const list<C_F0> &largs );
+
+template void AssembleLinearForm<Complex>(Stack stack,const Mesh & Th,const FESpace & Vh,KN_<Complex> * B,const FormLinear * const l);
+
+template void AssembleBilinearForm<Complex>(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<Complex> & A, const FormBilinear * b );
+
+template void AssembleBilinearForm<Complex>(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ map<pair<int,int>, Complex > & A, const FormBilinear * b );
+
+
+ //template void AssembleBC<Complex>(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ // MatriceCreuse<Complex> * A,KN_<Complex> * B,KN_<Complex> * X, const BC_set * bc , double tgv );
+ // template void AssembleBC<double,FESpace>(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ // MatriceCreuse<double> * A,KN_<double> * B,KN_<double> * X, const BC_set * bc , double tgv );
+
+ template void AssembleBC<Complex,FESpace>(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<Complex> * A,KN_<Complex> * B,KN_<Complex> * X, const list<C_F0> &largs , double tgv );
+
+ template void AssembleBC<double,FESpace>(Stack stack,const Mesh & Th,const FESpace & Uh,const FESpace & Vh,bool sym,
+ MatriceCreuse<double> * A,KN_<double> * B,KN_<double> * X, const list<C_F0> &largs , double tgv );
+
+ template void AssembleBC<Complex,FESpace3>(Stack stack,const Mesh3 & Th,const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ MatriceCreuse<Complex> * A,KN_<Complex> * B,KN_<Complex> * X, const list<C_F0> &largs , double tgv );
+
+ template void AssembleBC<double,FESpace3>(Stack stack,const Mesh3 & Th,const FESpace3 & Uh,const FESpace3 & Vh,bool sym,
+ MatriceCreuse<double> * A,KN_<double> * B,KN_<double> * X, const list<C_F0> &largs , double tgv );
+}
+ template class Call_FormLinear<v_fes>;
+ template class Call_FormLinear<v_fes3>;
+ template class Call_FormBilinear<v_fes>;
+ template class Call_FormBilinear<v_fes3>;
+
diff --cc src/fflib/problem.hpp
index f098936,ba7e137..627ab5d
--- a/src/fflib/problem.hpp
+++ b/src/fflib/problem.hpp
@@@ -191,7 -191,7 +191,7 @@@ class BC_set : public E_F0mps { public
vector<Expression> on;
vector<int> onis;
-- vector<pair<int,Expression> > bc; // n� de l'inconnue+ valeur
++ vector<pair<int,Expression> > bc; // n� de l'inconnue+ valeur
BC_set( const basicAC_F0 & args)
:on(args.size()),onis(args.size())
{
diff --cc src/fflib/problem.hpp.orig
index f098936,ba7e137..81c19e3
--- a/src/fflib/problem.hpp.orig
+++ b/src/fflib/problem.hpp.orig
@@@ -248,7 -248,7 +248,11 @@@ class BC_set : public E_F0mps { public
{
aType rr = complextype ? atype<Complex>() : atype<double>();
if (rr == atype<Complex>()) complextype= true;
++<<<<<<< HEAD
+ if(verbosity > 10) cout << " CastToK => " << complextype <<endl;
++=======
+ cout << " CastToK => " << complextype <<endl;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
for ( vector<pair<int,Expression> >::iterator k=bc.begin();k!=bc.end();k++)
k->second=CastTo<K>(C_F0(k->second,rr)) ;
}
diff --cc src/lglib/lg.ypp.orig
index 807b4eb,0000000..2eb7416
mode 100644,000000..100644
--- a/src/lglib/lg.ypp.orig
+++ b/src/lglib/lg.ypp.orig
@@@ -1,943 -1,0 +1,981 @@@
+// \file
+
+%{
+ // -*- Mode : c++ -*-
+ //
+ // SUMMARY :
+ // USAGE :
+ // ORG :
+ // AUTHOR : Frederic Hecht
+ // E-MAIL : hecht at ann.jussieu.fr
+ //
+
+ /*
+
+ This file is part of Freefem++
+
+ Freefem++ is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ Freefem++ is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with Freefem++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config-wrapper.h"
+#include <iostream>
+#include <complex>
+#include <string>
+ // for reset cout,cin in windows dll
+#ifdef _WIN32
+#include <ext/stdio_filebuf.h>
+#include <iostream>
+#include <cstdio>
+#endif
+
+#include "error.hpp"
+class Iden;
+#include "strversionnumber.hpp"
+#include "InitFunct.hpp"
+#ifdef __MWERKS__
+#ifdef __INTEL__
+#include <malloc.h>
+#else
+#include <alloca.h>
+#endif
+#endif
+#include "RNM.hpp"
+
+#include "AFunction.hpp"
+// to reserve space to graphical pointer function
+#include "rgraph.hpp"
+#include "fem.hpp"
+#include "FESpacen.hpp"
+#include "FESpace.hpp"
+#include "MeshPoint.hpp"
+
+#include "lgfem.hpp"
+#include "lex.hpp"
+#include "environment.hpp"
+extern long storageused();
+ extern FILE *ThePlotStream;
+ extern KN<String> *pkarg;
+
+class Routine;
+bool load(string s);
+
+ template <class R,int d> class FE;
+ template <class R,int d,int i> class FE_;
+
+extern mylex *zzzfff;
+// modif FH for window to have 1 dll for mpi and none mpi ..
+extern void (*initparallele)(int &, char **&);
+extern void (*init_lgparallele)();
++<<<<<<< HEAD
+// extern void (*end_parallele)();
++=======
++extern void (*end_parallele)();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+//
+#ifdef HAVE_LIBARPACK
+ void init_eigenvalue();
+#endif
+
+ aType dcltype;
+const int nbembtype=10;
+aType rettype[nbembtype];
+Block * routineinblock[nbembtype]; // Add FH july 2005 pb clean on return
+int kkembtype=-1;
+int inloopcount=0;
+
+/// <<currentblock>> Block class from [[file:../fflib/AFunction.hpp::Block]]
+
+Block *currentblock;
+
+// Add FH july 2005
+// problem clean variable after break,continue and return.
+const int sizeStackOfLoop=100;
+Block * StackOfLoop[sizeStackOfLoop];
+// end ADD
+double CPUcompileInit =0;
+//class pfes;
+C_F0 fespacetype;
+bool fespacecomplex;
+int fespacedim;
+extern int UnShowAlloc;
+int ShowAlloc(const char *s,size_t &);
+// <<yylex>> Connection from grammar to lexer object zzzfff [[file:../fflib/lex.hpp::zzzfff]] of class mylex
+// [[file:../fflib/lex.hpp::class mylex]]. Method mylex::scan() is implemented at [[file:../fflib/lex.cpp::mylex_scan]]
+
+inline int yylex() {return zzzfff->scan();}
+inline int lineno() {return zzzfff->lineno();}
+
+extern bool withrgraphique;
+
+/// <<fingraphique>>
+
+inline void fingraphique()
+ { if(withrgraphique)
+ { withrgraphique=false;
+ rattente(1);
+ closegraphique();
+ }}
+
+void lgerror (const char* s) ;
+
+
+ // mpi ptr to function ...
+void (*initparallele)(int &argc, char **& argv)=0 ;
+void (*init_lgparallele)()=0;
++<<<<<<< HEAD
+//void (*end_parallele)()=0;
++=======
++void (*end_parallele)()=0;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+%}
+
+
+/* <<YYSTYPE>> definition. <<yylval>> is renamed <<lglval>> by bison at [[file:lg.tab.cpp::lglval]]. It is allocated in
+ lg.tab.o */
+%union{
+ double dnum;
+ long lnum;
+ char * str;
+ char oper[8];
+ CC_F0 cexp;
+ Routine *routine;
+ AC_F0 args;
+ aType type;
+ CListOfInst cinst;
+ Block * block;
+ ListOfId *clist_id;
+/* ListCatch * clist_Catchs;*/
+}
+
+/* BISON Declarations */
+
+%type <cinst> input
+%type <cinst> instructions
+%type <cexp> instruction
+%type <cexp> try
+%type <cexp> catchs
+/* %type <cexp> throw */
+%type <cexp> declaration
+%type <cexp> declaration_for
+%type <cexp> list_of_dcls
+%type <cexp> fespace_def
+%type <cexp> fespace_def_list
+%type <cexp> Expr
+%type <cexp> no_comma_expr
+%type <cexp> sub_script_expr
+%type <cexp> no_ternary_expr
+%type <cexp> no_set_expr
+%type <cexp> unary_expr
+%type <cexp> pow_expr
+%type <cexp> primary
+%type <oper> unop
+%type <args> parameters
+%type <args> array
+%type <args> parameters_list
+%type <cexp> begin
+%type <cexp> end
+%type <clist_id> list_of_id_args
+%type <clist_id> list_of_id1
+%type <cexp> spaceIDs
+%type <cexp> spaceIDa
+%type <cexp> spaceIDb
+%type <cexp> ID_space
+%type <cexp> ID_array_space
+%type <args> bornes;
+%type <args> border_expr;
+%type <type> type_of_dcl;
+%type <str> id;
+%type <str> fespace123;
+
+/* Add precedence rules to solve dangling else s/r conflict */
+
+%nonassoc IF
+%nonassoc ELSE
+
+%left <oper> ','
+%right <oper> '=' SET
+%left <oper> LTLT GTGT
+%left <oper> OR '|'
+%left <oper> AND '&'
+%left <oper> EQ NE
+%left <oper> '<' '>' LE GE
+%left <oper> '+' '-'
+%left <oper> '*' '/' '%' DOTSTAR DOTSLASH
+%right <oper> UNARY PLUSPLUS MOINSMOINS '!'
+%right <oper> '^' '\''
+%right <oper> '_'
+%left <oper> '(' '[' '.'
+
+%token <oper> ')' ']'
+
+%token <lnum> LNUM
+%token <dnum> DNUM
+%token <dnum> CNUM
+%token <str> ID
+%token <str> FESPACEID
+%token <str> IDPARAM
+%token <str> STRING
+
+%token ENDOFFILE
+%token INCLUDE
+%token LOAD
+%token BIDON
+
+%token FOR
+%token WHILE
+%token IF
+%token ELSE
+%token BREAK
+%token CONTINUE
+%token RETURN
+%token TRY
+%token CATCH
+%token THROW
+
+%token <type> TYPE
+%token <type> FUNCTION
+%token <str> FESPACE
+%token <str> FESPACE1
+%token <str> FESPACE3
+
+
+%token DOTSTAR
+%token DOTSLASH
+%token AND
+%token OR
+%token EQ
+%token NE
+%token LE
+%token GE
+%token PLUSPLUS
+%token MOINSMOINS
+%token SET
+%token LTLT
+%token PLUSEQ
+%token MOINSEQ
+%token MULEQ
+%token DIVEQ
+%token DOTMULEQ
+%token DOTDIVEQ
+%token GTGT
+%token ARROW
+%token BORDER
+%token CURVE
+%token SOLVE
+
+%%
+
+start: input ENDOFFILE {
+ // clean FH mach 2014
+ const char * magicffglut="#!ffglutdata3.1\n";// for complex and vector 3d plot
+ //FFCS: divert stream to FFCS
+ if(ThePlotStream) ffapi::fwriteinit(magicffglut,strlen(magicffglut),1,ThePlotStream);
+ size_t sizestack = currentblock->size()+1024 ; // before close
+ $1+=currentblock->close(currentblock);
+ if(verbosity>2 || mpirank==0) cout << " sizestack + 1024 =" << sizestack << " ( " << sizestack-1024 <<" )\n" ;
+ size_t lg0,lg1;
+ int NbPtr = ShowAlloc("init execution ",lg0); // number of un delele ptr
++<<<<<<< HEAD
+ debugstack= new queue<pair<const E_Routine*,int> >;
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ size_t stu0=storageused(); // get Storage usage
+ UnShowAlloc =0;// add FH for parallee
+ if(verbosity>2 || mpirank==0) cout << endl;
+ { Stack stack = newStack(sizestack);
+ double CPUcompile= CPUtime();
+ try {
+ $1.eval(stack);}
+ catch ( E_exception & e) {
+ cerr << e.what() << " , mpirank " << mpirank << endl;
+ return 1; }
+ catch( Error & err) {
+ cerr << err.what() << endl;
+ cerr << " err code " << err.errcode() << " , mpirank " << mpirank << endl;
+ return err.errcode();
+ }
+ catch( ...) { cerr << "Strange catch exception ???\n";
+ cerr << " at exec line " << TheCurrentLine << " , mpirank " << mpirank << endl;
+ return 1;
+ }
+
+ if(verbosity) cout << "times: compile "<< CPUcompile-CPUcompileInit <<"s, execution "
+ << CPUtime()-CPUcompile <<"s, mpirank:" << mpirank << endl;
+ deleteStack(stack);
+ //debugstack.clear()
+ }
+ fingraphique();
+ //FFCS: divert stream to FFCS
+ if(ThePlotStream) {ffapi::ff_pclose(ThePlotStream); ThePlotStream=0;}
+ UnShowAlloc =1;
++<<<<<<< HEAD
+ if(debugstack) delete debugstack;
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ NbPtr = ShowAlloc("end execution -- ",lg1) - NbPtr;
+ long stu1 =storageused()-stu0 ;
+
+
+ if (NbPtr || (stu1>100000) ) { cout << " ######## We forget of deleting " << NbPtr
+ << " Nb pointer, " << lg1-lg0 << "Bytes " << " , mpirank " << mpirank << ", memory leak ="<< stu1 << endl;}
+ return 0;}
+;
+
+/*<<input>>*/
+
+input: instructions /*[[instructions]]*/
+;
+
+/*<<instructions>>*/
+
+instructions: instruction /*[[instruction]]*/ {$$=$1;;;}
+ | instructions instruction { $$= ($1+=$2) }
+ ;
+
+/* Function arguments list */
+
+list_of_id_args: { $$=new ListOfId();}
+ | id { $$ = new ListOfId(); $$->push_back(UnId($1))}
+ | id '=' no_comma_expr { $$ = new ListOfId(); $$->push_back(UnId($1,$3)) }
+ | FESPACE id { $$ = new ListOfId(); $$->push_back(UnId($2,Find($1),atype<FE<double,2> **>()))}
+ | FESPACE '&' id { $$ = new ListOfId(); $$->push_back(UnId($3,Find($1),atype<FE<double,2> **>(),true))}
+ | FESPACE3 id { $$ = new ListOfId(); $$->push_back(UnId($2,Find($1),atype<FE<double,3> **>()))}
+ | FESPACE3 '&' id { $$ = new ListOfId(); $$->push_back(UnId($3,Find($1),atype<FE<double,3> **>(),true))}
+ | type_of_dcl id { $$ = new ListOfId(); $$->push_back(UnId($2,C_F0(),$1->right())) }
+ | type_of_dcl '&' id { $$ = new ListOfId(); $$->push_back(UnId($3,C_F0(),$1,true)) }
+ | '[' list_of_id_args ']' { $$ = new ListOfId(); $$->push_back(UnId($2)) }
+ | list_of_id_args ',' id { $$ = $1; $$->push_back(UnId($3)) }
+ | list_of_id_args ',''[' list_of_id_args ']' { $$ = $1; $$->push_back(UnId($4)) }
+ | list_of_id_args ',' id '=' no_comma_expr { $$ = $1; $$->push_back(UnId($3,$5)) }
+ | list_of_id_args ',' FESPACE id { $$ = $1; $$->push_back(UnId($4,Find($3),atype<FE<double,2> **>())) }
+ | list_of_id_args ',' FESPACE '&' id { $$ = $1; $$->push_back(UnId($5,Find($3),atype<FE<double,2> **>(),true)) }
+ | list_of_id_args ',' FESPACE3 id { $$ = $1; $$->push_back(UnId($4,Find($3),atype<FE<double,3> **>())) }
+ | list_of_id_args ',' FESPACE3 '&' id { $$ = $1; $$->push_back(UnId($5,Find($3),atype<FE<double,3> **>(),true)) }
+ | list_of_id_args ',' type_of_dcl id { $$ = $1; $$->push_back(UnId($4,C_F0(),$3->right())) }
+ | list_of_id_args ',' type_of_dcl '&' id { $$ = $1; $$->push_back(UnId($5,C_F0(),$3,true)) }
+;
+
+list_of_id1: id { $$ = new ListOfId(); $$->push_back(UnId($1)); }
+ | list_of_id1 ',' id { $$=$1 ; $$->push_back(UnId($3)); }
+;
+
+/*<<id>>*/
+
+id: ID | FESPACE|FESPACE3|FESPACE1;
+
+/* <<list_of_dcls>> */
+
+list_of_dcls: ID {$$=currentblock->NewVar<LocalVariable>($1,dcltype)}
+ | ID '=' no_comma_expr {$$=currentblock->NewVar<LocalVariable>($1,dcltype,$3)}
+ | ID '(' parameters_list ')' {$$=currentblock->NewVar<LocalVariable>($1,dcltype,$3);
+ $3.destroy()}
+ | list_of_dcls ',' list_of_dcls {$$=C_F0($1,$3)}
+
+
+;
+
+
+parameters_list:
+ no_set_expr {$$=$1}
+ | FESPACE ID {$$=Find($1)}
+ | FESPACE1 ID {$$=Find($1)}
+ | FESPACE3 ID {$$=Find($1)}
+ | ID '=' no_set_expr { $$=make_pair<const char *,const C_F0>($1,$3)}
+ | parameters_list ',' no_set_expr { $$ = ($1 += $3) }
+ | parameters_list ',' id '=' no_set_expr { $$= ($1+= make_pair<const char *,const C_F0>($3,$5))}
+;
+
+/* <<type_of_dcl>> */
+
+type_of_dcl: TYPE
+ | TYPE '[' TYPE ']' {$$=TypeArray($1,$3)}
+ | TYPE '[' TYPE ']' '[' TYPE ']' {$$=TypeArray(TypeArray($1,$3),$6)} // Add FH mars 2012
+ | TYPE '[' TYPE ',' TYPE ']' {$$=TypeArray($1,$3,$5)}
+ | TYPE '[' TYPE ',' TYPE ']' '[' TYPE ']' {$$=TypeArray(TypeArray($1,$3,$5),$8)}
+ | TYPE '<' TYPE '>' {$$=TypeTemplate($1,$3)}
+ | TYPE '<' TYPE '>' '[' TYPE ']' {$$=TypeArray(TypeTemplate($1,$3),$6)}
+ | TYPE '<' TYPE '>' '[' TYPE ',' TYPE ']' {$$=TypeArray(TypeTemplate($1,$3),$6,$8)}
+
+
+;
+
+/* <<ID_space>> */
+
+ID_space:
+ID { $$ = NewFEvariable($1,currentblock,fespacetype,fespacecomplex,fespacedim); }
+ | ID '[' no_set_expr ']' { $$ = NewFEarray($1,currentblock,fespacetype,$3,fespacecomplex,fespacedim); }
+ | ID '=' no_set_expr { $$ = NewFEvariable($1,currentblock,fespacetype,$3,fespacecomplex,fespacedim) }
+ | '[' list_of_id1 ']' { $$ = NewFEvariable($2,currentblock,fespacetype,fespacecomplex,fespacedim) }
+ | '[' list_of_id1 ']' '[' no_set_expr ']' { $$ = NewFEarray($2,currentblock,fespacetype,$5,fespacecomplex,fespacedim) }
+ | '[' list_of_id1 ']' '=' no_set_expr { $$ = NewFEvariable($2,currentblock,fespacetype,$5,fespacecomplex,fespacedim) }
+;
+ID_array_space:
+ ID '(' no_set_expr ')' { $$ = NewFEarray($1,currentblock,fespacetype,$3,fespacecomplex,fespacedim); }
+ | '[' list_of_id1 ']' '(' no_set_expr ')' { $$ = NewFEarray($2,currentblock,fespacetype,$5,fespacecomplex,fespacedim) }
+
+;
+
+/* <<fespace>> */
+
+fespace123: FESPACE { fespacedim=2} |FESPACE1 { fespacedim=1} | FESPACE3 { fespacedim=3};
+fespace: fespace123 {fespacecomplex=false; fespacetype = Find($1);}
+ | fespace123 '<' TYPE '>' {
+ if ($3 != typevarreal && $3 != typevarcomplex) lgerror (" type of finite element <real> or <complex>");
+ fespacecomplex=($3==typevarcomplex);
+ fespacetype = Find($1);}
+;
+spaceIDa : ID_array_space { $$ = $1 }
+ | spaceIDa ',' ID_array_space { $$=C_F0($1,$3);} ;
+
+spaceIDb : ID_space { $$ = $1 }
+ | spaceIDb ',' ID_space { $$=C_F0($1,$3);} ;
+
+spaceIDs : fespace spaceIDb { $$=0; $$ = $2}
+ | fespace '[' TYPE ']' spaceIDa { $$=0; $$ = $5}
+;
+
+/* <<fespace_def>> */
+
+fespace_def:
+ ID '(' parameters_list ')' {$$=currentblock->NewVar<LocalVariableFES,size_t>($1,typeFESpace($3),$3,dimFESpaceImage($3));
+ $3.destroy(); };
+
+fespace_def_list: fespace_def
+ | fespace_def_list ',' fespace_def {$$=C_F0($1,$3)}
+;
+
+/* <<declaration>> */
+
+declaration: type_of_dcl {dcltype=$1} list_of_dcls ';' {$$=$3} /* see [[type_of_dcl]] [[list_of_dcls]] */
+ | FESPACEID fespace_def_list ';' {$$=$2}
+ | spaceIDs ';'{ $$=$1}
+ | FUNCTION ID '=' Expr ';' {$$=currentblock->NewID($1,$2,$4);}
+ | FUNCTION type_of_dcl ID '(' list_of_id_args ')'
+ { /* use the stack to store the prev return type*/
+ assert(kkembtype+1<nbembtype);
+ rettype[++kkembtype] = $2->right();
+ routineinblock[kkembtype] = currentblock;
+ $<routine>5=new Routine($1,$2->right(),$3,$5,currentblock);
+ // routineinblock[kkembtype]->Add($3,"(",$<routine>5); //pas recursif pour l'instanat test FH 27 dec 2008
+ // cout << " \n after new routine \n " << endl;
+ }
+ '{' instructions'}'
+ { currentblock=$<routine>5->Set($9);
+ currentblock->Add($3,"(",$<routine>5); //pas recursif pour l'instant test FH 27 dec 2008
+ kkembtype--;
+ $$=0;
+
+ }
+ | FUNCTION ID '(' list_of_id_args ')'
+ {Block::open(currentblock); $1->SetArgs($4);}
+ '=' no_comma_expr ';'
+ { $<cinst>$=currentblock->close(currentblock);
+ $$=currentblock->NewID($1,$2,$8,*$4);
+ delete $4; // FH 23032005
+ }
+;
+
+begin: '{' { Block::open(currentblock)};
+end: '}' { $$=currentblock->close(currentblock)};
+
+for_loop: FOR {ffassert(inloopcount<sizeStackOfLoop); // modif FH july 2005
+ StackOfLoop[inloopcount++]=currentblock;};
+while_loop: WHILE {ffassert(inloopcount<sizeStackOfLoop);
+ StackOfLoop[inloopcount++]=currentblock;}; // modif FH july 2005
+
+
+declaration_for:
+ type_of_dcl {dcltype=$1; Block::open(currentblock); }
+ list_of_dcls {$$=$3};
+
+try: TRY { Block::open(currentblock) };
+
+/*<<instruction>>*/
+
+instruction: ';' {$$=0;}
+ | INCLUDE STRING {zzzfff->input($2);$$= 0; }
+ | LOAD STRING {load($2);$$= 0; }
+ | try '{' instructions '}' catchs {$$=Try($3,$5,currentblock->close(currentblock));}
+ | Expr ';' {$$=$1} /*[[Expr]]*/
+ | declaration {$$=$1} /*[[declaration]]*/
+ | for_loop '(' Expr ';' Expr ';' Expr ')' instruction {inloopcount--; $$=For($3,$5,$7,$9)}
+ | for_loop '(' declaration_for ';' Expr ';' Expr ')' instruction
+ {inloopcount--;
+ $$=C_F0(For($3,$5,$7,$9),currentblock->close(currentblock))}
+
+ | while_loop '(' Expr ')' instruction {inloopcount--;$$=While($3,$5)}
+ | IF '(' Expr ')' instruction {$$=FIf($3,$5)}
+ | IF '(' Expr ')' instruction ELSE instruction {$$=FIf($3,$5,$7)}
+ | begin instructions end {
+ $$=C_F0(new E_block($2,$3),atype<void>()) }
+ | BORDER ID border_expr { /* <<BORDER_ID>> */
+ $$=0;currentblock->NewID(atype<const E_Border *>(),$2,C_F0(TheOperators,"[border]",$3))}
+ | BORDER ID '[' array ']' ';' {
+ $$=0;currentblock->NewID(atype<const E_Border *>(),$2,C_F0(TheOperators,"[border]",$4))}
+
+ | BREAK ';' {
+ if(inloopcount)
+ $$= C_F0(new E_throw(E_exception::e_break),atype<void>());
+ else lgerror("break not in loop") }
+ | CONTINUE ';' {
+ if(inloopcount)
+ $$= C_F0(new E_throw(E_exception::e_continue),atype<void>()) ;
+ else lgerror("continue not in loop")}
+ | RETURN Expr ';' {
+ if (kkembtype>=0)
+ $$= C_F0(new E_throw(E_exception::e_return,(rettype[kkembtype]->CastTo($2)).OnReturn()) ,atype<void>());
+ else lgerror(" return not in routine ") }
+
+;
+catchs:
+ CATCH '(' '.' '.' '.' ')' instruction {$$ = $7; }
+;
+
+bornes: '(' ID '=' Expr ',' Expr ')' {
+ Block::open(currentblock);
+ $$ = currentblock->NewVar<LocalVariable>($2,atype<double*>());
+ $$+= $4;
+ $$+= $6;
+ $$+= currentblock->NewVar<LocalVariable>("IndexBorder",atype<long*>());}
+;
+bornes: '(' ID '=' Expr ',' Expr ';' ID ')' {
+ Block::open(currentblock);
+ $$ = currentblock->NewVar<LocalVariable>($2,atype<double*>());
+ $$+= $4;
+ $$+= $6;
+ $$+= currentblock->NewVar<LocalVariable>($8,atype<long*>());}
+;
+
+/* <<border_expr>> */
+
+border_expr: bornes instruction {
+ $$ = ($1 += $2);
+ currentblock->close(currentblock)}
+ ;
+
+/*<<Expr>>*/
+
+Expr:
+ no_comma_expr /*[[no_comma_expr]]*/
+ | Expr ',' Expr {$$=C_F0(TheOperators,$2,$1,$3);}
+;
+
+/*<<unop>>*/
+
+unop:
+ '-'
+ | '+'
+ | '!'
+ | PLUSPLUS
+ | MOINSMOINS
+;
+
+/*<<no_comma_expr>>*/
+
+no_comma_expr:
+ no_set_expr /*[[no_set_expr]]*/
+ | no_set_expr '=' no_comma_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_set_expr PLUSEQ no_comma_expr {$$=C_F0(TheOperators,"+=",$1,$3)}
+ | no_set_expr MOINSEQ no_comma_expr {$$=C_F0(TheOperators,"-=",$1,$3)}
+ | no_set_expr MULEQ no_comma_expr {$$=C_F0(TheOperators,"*=",$1,$3)}
+ | no_set_expr DIVEQ no_comma_expr {$$=C_F0(TheOperators,"/=",$1,$3)}
+ | no_set_expr DOTMULEQ no_comma_expr {$$=C_F0(TheOperators,".*=",$1,$3)}
+ | no_set_expr DOTDIVEQ no_comma_expr {$$=C_F0(TheOperators,"./=",$1,$3)}
+;
+
+/*<<no_set_expr>>*/
+
+no_set_expr:
+ no_ternary_expr /*[[no_ternary_expr]]*/
+ | no_ternary_expr '?' no_ternary_expr ':' no_ternary_expr {$$=C_F0(TheOperators,"?:",$1,$3,$5)}
+ | no_ternary_expr ':' no_ternary_expr {$$=C_F0(TheOperators,"::",$1,$3)}
+ | no_ternary_expr ':' no_ternary_expr ':' no_ternary_expr {$$=C_F0(TheOperators,"::",$1,$3,$5)}
+;
+
+/*<<no_ternary_expr>>*/
+
+no_ternary_expr:
+ unary_expr /*[[unary_expr]]*/
+ | no_ternary_expr '*' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr DOTSTAR no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr DOTSLASH no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr '/' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr '%' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr '+' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr '-' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr LTLT no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr GTGT no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr '&' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr AND no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr '|' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr OR no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr '<' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr LE no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr '>' no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr GE no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr EQ no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | no_ternary_expr NE no_ternary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+
+;
+
+/*<<sub_script_expr>>*/
+
+sub_script_expr:
+ no_ternary_expr {$$=$1}
+ | ':' {$$=C_F0(TheOperators,":")}
+ | no_ternary_expr ':' no_ternary_expr {$$=C_F0(TheOperators,":",$1,$3)}
+ | no_ternary_expr ':' no_ternary_expr ':' no_ternary_expr {$$=C_F0(TheOperators,":",$1,$3,$5)}
+
+;
+
+/*<<parameters>>*/
+
+parameters: {$$=0}
+ | FESPACE {$$=Find($1)} /*[[file:../fflib/AFunction2.cpp::Find]]*/
+ | FESPACE1 {$$=Find($1)}
+ | FESPACE3 {$$=Find($1)}
+
+ /* cf [[id]] [[no_set_expr]] */
+ | id '=' no_set_expr { $$=make_pair<const char *,const C_F0>($1,$3)}
+
+ | sub_script_expr {$$=$1} /*[[sub_script_expr]]*/
+ | parameters ',' FESPACE { $$ = ($1 += Find($3)) }
+ | parameters ',' FESPACE1 { $$ = ($1 += Find($3)) }
+ | parameters ',' FESPACE3 { $$ = ($1 += Find($3)) }
+ | parameters ',' sub_script_expr { $$ = ($1 += $3) } /*[[sub_script_expr]]*/
+
+ /* cf [[id]] [[no_set_expr]] */
+ | parameters ',' id '=' no_set_expr { $$= ($1+= make_pair<const char *,const C_F0>($3,$5)) }
+;
+
+array: no_comma_expr {$$=$1}
+ | array ',' no_comma_expr {$$ = ($1 += $3) };
+
+/*<<unary_expr>>*/
+
+unary_expr:
+ pow_expr /*[[pow_expr]]*/
+ | unop pow_expr %prec UNARY {$$=C_F0(TheOperators,$1,$2)} /*[[unop]] [[pow_expr]]*/
+;
+
+/*<<pow_expr>>*/
+
+pow_expr: primary /*[[primary]]*/
+ | primary '^' unary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | primary '_' unary_expr {$$=C_F0(TheOperators,$2,$1,$3)}
+ | primary '\'' {$$=C_F0(TheOperators,$2,$1)}
+;
+
+/*<<primary>>*/
+
+primary:
+
+ /* <<primary_ID>> calls [[file:~/ff/draft/src/fflib/AFunction2.cpp::Find]]
+ returns [[file:~/ff/draft/src/fflib/AFunction.hpp::C_F0]] */
+
+ ID {$$=Find($1);}
+
+ | LNUM {$$= CConstant($1)}
+ | DNUM {$$= CConstant($1)}
+ | CNUM {$$= CConstant(complex<double>(0,$1))}
+ | STRING {$$= CConstant<const char *>($1)}
+
+ /* <<primary_brackets_parameters>> refers to [[parameters]] and creates an object of class
+ [[file:../fflib/AFunction.hpp::C_F0]] */
+
+ | primary '(' parameters ')' {$$=C_F0($1,$2,$3);}
+
+ | primary '[' sub_script_expr ']' {$$=C_F0($1,$2,$3)}
+ | primary '[' sub_script_expr ',' sub_script_expr ']' {$$=C_F0($1,$2,$3,$5)}
+ | primary '[' ']' {$$=C_F0($1,"[]")}
+ | primary '.' ID { $$=C_F0($1,$3) ;}
+ | FESPACE '.' ID { $$=C_F0(Find($1),$3) ;}
+ | FESPACE '(' parameters ')' { $$=C_F0(Find($1),$2,$3) ;}
+ | FESPACE1 '.' ID { $$=C_F0(Find($1),$3) ;}
+ | FESPACE1 '(' parameters ')' { $$=C_F0(Find($1),$2,$3) ;}
+ | FESPACE3 '.' ID { $$=C_F0(Find($1),$3) ;}
+ | FESPACE3 '(' parameters ')' { $$=C_F0(Find($1),$2,$3) ;}
+ | primary PLUSPLUS {$$=C_F0(TheRightOperators,$2,$1)}
+ | primary MOINSMOINS {$$=C_F0(TheRightOperators,$2,$1)}
+ | TYPE '(' Expr ')' {
+ if ($1->right()->CastingFrom($3.left()) )
+ $$=$1->right()->CastTo($3) ;
+ else { $$=$1->right()->Find("<--",basicAC_F0_wa($3));
+ if (!$$.left()) { cerr << " no wait to change " << $3.left()->right()->name() << " in " <<
+ $1->right()->name() << endl;
+ CompileError(" Error in type(exp) "); }
+ }
+ }
+ | '(' Expr ')' {$$=$2}
+ | '[' array ']' { $$=C_F0(TheOperators,"[]",$2)}
+
+;
+
+
+%%
+
+
+#include <fstream>
+using namespace std;
+// bool lgdebug;
+// bool lexdebug;
+void ForDebug();
+void ForDebug()
+{
+ int i=0;
+ i++;
+}
+//extern void ShowAlloc(const char *s, size_t lg);
+//extern void ShowNbAlloc(const char *s);
+void init_lgfem() ;
+void init_lgmesh() ;
+void init_lgmesh3() ;
+void init_algo();
+bool withrgraphique = false;
+
+/// <<Compile>> Called by mainff(). Activates the bison parser by calling yyparse()
+int Compile()
+{
+
+ // see [[YYSTYPE]] [[yylval]] [[lglval]]
+ extern YYSTYPE *plglval; // modif FH
+
+ /// plglval is allocated at [[file:../fflib/global.cpp::plglval]]
+ plglval = &lglval;
+
+ int retvalue=0;
+
+ currentblock=0;
+ Block::open(currentblock);
+ try {
+ UnShowAlloc =0;
+
+ retvalue=yyparse(); // grammar analysis starting from [[start_symbol]]
+
+ if(retvalue==0){
+ if(currentblock)
+ {retvalue=1; if(!mpirank) cerr << "Error:a block is not close" << endl; }
+ else {
+ if( verbosity ) {
+ UnShowAlloc =1;
+ cerr << " CodeAlloc : nb ptr "<< CodeAlloc::nb << ", size :" << CodeAlloc::lg
+ << " mpirank: " <<mpirank << endl ;
+ if(!mpirank) cerr << "Ok: Normal End" << endl;
+ }
+ }
+ }
+ }
+
+ catch (Error & e)
+ {
+ retvalue=e.errcode();
+ if(mpirank ==0)
+ cerr << "error " << e.what()
+ << "\n code = "<< retvalue << " mpirank: " <<mpirank << endl;
+ }
+ catch(std::ios_base::failure & e)
+ {
+ cerr << "std catch io failure \n what : " << e.what() << endl;;
+ cerr << " at exec line " << TheCurrentLine << " mpirank: " <<mpirank << endl;
+ }
+ catch(std::exception & e)
+ {
+ cerr << "std catch exception \n what : " << e.what() << endl;;
+ cerr << " at exec line " << TheCurrentLine << " mpirank: " <<mpirank << endl;
+
+ }
+ catch(...)
+ {
+ cerr << "Strange catch exception ???\n";
+ cerr << " at exec line " << TheCurrentLine << " mpirank: " <<mpirank << endl;
+ }
+ return retvalue;
+}
+static void SetcppIo()
+{
+
+#ifdef _WIN32XXXX
+ freopen("conin$", "r", stdin);
+ freopen("conout$", "w", stdout);
+ using namespace __gnu_cxx;
+ // stdio_filebuf<char> * ccout = new stdio_filebuf<char>(stdout, std::ios_base::out);
+ static stdio_filebuf<char> ccout(stdout, std::ios_base::out);
+ static stdio_filebuf<char> ccin(stdin, std::ios_base::in);
+ //stdio_filebuf<char> *ccin= new stdio_filebuf<char>(stdin, std::ios_base::in);
+
+ cout.rdbuf(&ccout);
+ cin.rdbuf(&ccin);
+ cerr.rdbuf(&ccout);
+ cout << " -- SetcppIo --" << endl;
+#endif
+ ios::sync_with_stdio();
+}
+
+// pour l'environement.
+extern const char * prognamearg;
+extern bool echo_edp;
+
+/// Called by mymain() and calls Compile() to run the FF language parser
+int mainff (int argc, char **argv)
+{
+
+ ffapi::init();
+ if(argc)
+ prognamearg=argv[0];
+
+ int vvold=verbosity;
+ if(mpirank !=0) verbosity=0;
+
+ // ALH - 14/10/8 - This breaks FFCS output redirection
+#ifndef ENABLE_FFCS
+ SetcppIo();
+#endif
+
+ GetEnvironment();
+ vvold=verbosity;
+ if(mpirank !=0) verbosity=0;
+ // size_t lg000;
+ // ShowAlloc("begin main ",lg000);
+ int retvalue=0;
++<<<<<<< HEAD
+ ff_atend(fingraphique);
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ if (initparallele)initparallele(argc,argv);
+
+ CPUcompileInit= CPUtime();
+ withrgraphique = false;
+ atexit(ForDebug);
+// AllFunctions::maptype xlocal;
+// local=&xlocal;
+ lexdebug = false;
+ lgdebug = false;
+
+ char * cc= new char [1024];
+ // istream * ccin=0;
+ if ( ! (getprog(cc,argc,argv) >0) )
+ {
+ cout << "-- FreeFem++ v" << StrVersionNumber() << " (error parameter!)\n" ;
++<<<<<<< HEAD
+ if(ThePlotStream) {ffapi::ff_pclose(ThePlotStream); ThePlotStream=0;}
++=======
++ if(ThePlotStream) {pclose(ThePlotStream); ThePlotStream=0;}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ return 1;
+ }
+
+ if(verbosity && (mpirank==0)) {
+ cout << "-- FreeFem++ v" << StrVersionNumber() << endl;
+ if(verbosity>1) cout << " file :" << cc << " " << " verbosity= " << verbosity << endl;
+ }
+
+ KN<String> karg(argc);
+ for(int i=0;i< argc;++i)
+ karg[i]=argv[i];
+ pkarg= &karg;
+
+ /// <<zzzfff>>
+ zzzfff = Newlex(cout,echo_edp);
++<<<<<<< HEAD
+
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+/*
+ ccin= new ifstream(cc);
+ if (argc >1 && (ccin!=0) )
+ ccin= new ifstream(argv[1]),throwassert(ccin);
+ if (ccin!=0)
+ zzzfff = new mylex(*ccin,cout) ;
+ else
+ zzzfff = new mylex(cin,cout) ;
+*/
+// les motsclefs
+ zzzfff->Add("include",INCLUDE);
+ zzzfff->Add("load",LOAD);
+ zzzfff->Add("while",WHILE);
+ zzzfff->Add("for",FOR);
+ zzzfff->Add("if",IF);
+ zzzfff->Add("else",ELSE);
+ zzzfff->Add("end",ENDOFFILE);
+ zzzfff->Add("break",BREAK);
+ zzzfff->Add("continue",CONTINUE);
+ zzzfff->Add("return",RETURN);
+ zzzfff->Add("border",BORDER);
+ zzzfff->Add("fespace",FESPACEID);
+ zzzfff->Add("try",TRY);
+ zzzfff->Add("catch",CATCH);
+ zzzfff->Add("throw",THROW);
+// Init_map_type();
+ if(verbosity>2 || (mpirank==0 ) ) cout << " Load: ";
+ callInitsFunct() ; // init for dynamique libs ...
+ // init_lgfem() ;
+ init_lgmesh() ;
+ init_lgmesh3() ;
+ init_algo();
+
+#ifdef HAVE_LIBARPACK
+ init_eigenvalue();
+#endif
+
+ if(init_lgparallele) init_lgparallele();
+ // callInitsFunct() ; // init for dynamique libs ...
+
+ if(verbosity>2 || mpirank==0) cout << endl;
+ zzzfff->input(cc); // [[file:../fflib/lex.cpp::void mylex input]]
+ EnvironmentLoad(); // just before compile
+ verbosity=vvold;
+
+ retvalue= Compile(); // [[Compile]]
+ // cout << " xxxxx " << retvalue << " " << ThePlotStream << endl;
++<<<<<<< HEAD
+
+ //if(end_parallele) end_parallele();
+ ff_finalize();
+ // currentblock->close(currentblock).eval(thestack);
+ // fingraphique();
++=======
++
++ if(end_parallele) end_parallele();
++
++ // currentblock->close(currentblock).eval(thestack);
++ fingraphique();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ // FFCS: divert stream to FFCS
+ if(ThePlotStream){
+ ffapi::ff_pclose(ThePlotStream);
+ ThePlotStream=0;
+ }
+ Destroylex( zzzfff);
++<<<<<<< HEAD
+ delete [] cc;
++=======
++
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+ // ClearMem();
+ return retvalue;
+}
+
+/* FFCS: emacs configuration for this file */
+
+/*!
+ * Local Variables:
+ * mode:antlr
+ * ispell-local-dictionary:"british"
+ * coding:utf-8
+ * End:
+ */
diff --cc src/mpi/parallelempi.cpp.orig
index ad31baa,0000000..1bde599
mode 100644,000000..100644
--- a/src/mpi/parallelempi.cpp.orig
+++ b/src/mpi/parallelempi.cpp.orig
@@@ -1,2636 -1,0 +1,2661 @@@
+#include <config.h>
+#include <fstream>
+#include <iostream>
+#include <cfloat>
+#include <cmath>
+#include <cstring>
+#include <complex>
+#include<stdlib.h>
+using namespace std;
+#include "error.hpp"
+#include "AFunction.hpp"
+// FH: I have move AFunction_ext.hpp to fflib dir.
+#include "AFunction_ext.hpp"
+// Add J. Morice for AFunction_ext.hpp
+#include "ufunction.hpp"
+using namespace std;
+#include "rgraph.hpp"
+#include "RNM.hpp"
+// after RNM otherwise
+// trouble with index in RNM (I do no understander FH)
+#include <set>
+#include <vector>
+#include <map>
+
+#include "fem.hpp"
+
+
+#include "FESpacen.hpp"
+#include "FESpace.hpp"
+
+#include "MatriceCreuse_tpl.hpp"
+#include "MeshPoint.hpp"
+#include "Mesh2dn.hpp"
+#include "Mesh3dn.hpp"
+#include "Operator.hpp"
+#include "lex.hpp"
+#include "libmesh5.h"
+#include "lgfem.hpp"
+#include "lgmesh3.hpp"
+#include "lgsolver.hpp"
+#include "problem.hpp"
+
+//FFCS redirection
+#include "../fflib/ffapi.hpp"
+
+#undef MPICH_SKIP_MPICXX
+#define MPICH_SKIP_MPICXX
+#undef MPICH_IGNORE_CXX_SEEK
+#define MPICH_IGNORE_CXX_SEEK
+#include <mpi.h>
+
+// Remark on mipich MPI_Comm, MPI_Resquest, MPI_Group, MPI_Op are int
+// => encapsulation
+
+//static long verbosity=1000;
+template<class MPI_type,int DIFF>
+struct fMPI {
+ MPI_type v;
+ operator MPI_type &() {return v;}
+ operator MPI_type *() {return &v;}
+ operator MPI_type () const {return v;}
+
+ // MPI_type * operator &() {return &v;}
+ void operator=(const MPI_type vv) { v=vv;}
+ fMPI(const MPI_type vv=0) : v(vv){}
+ bool operator!=(MPI_type vv) const {return vv !=v;}
+ bool operator==(MPI_type vv) const {return vv ==v;}
+
+};
+
+// the encapsulation for the for MPI type (int on mpich )
+
+typedef fMPI<MPI_Comm,1> fMPI_Comm;
+typedef fMPI<MPI_Group,2> fMPI_Group;
+typedef fMPI<MPI_Request,3> fMPI_Request;
+typedef fMPI<MPI_Op,4> fMPI_Op;
+
+
+
+// end of encapsulation ..
+
+// to send a sparse matrix we send header, line array ,colmun array, value array.
+// end afer the fist resquest we need to do allocation.
+// so in this cas the communacatio is done in
+// 2 step
+// 1 the header,
+// alloc time
+// 2 the message
+// a couple request, pointer.
+// Not use of IPROBE because probelem of wait.
+class MPIrank;
+class DoOnWaitMPI_Request ;
+
+map<MPI_Request*,DoOnWaitMPI_Request *> ToDoOnWaitMPI_Request;
+
+void GetPendingWait() ;
+
+
+template<class T> struct MPI_TYPE {static const MPI_Datatype TYPE(){return MPI_BYTE;}};;
+template<> struct MPI_TYPE<long> {static const MPI_Datatype TYPE(){return MPI_LONG;}};
+template<> struct MPI_TYPE<int> {static const MPI_Datatype TYPE(){return MPI_INT;}};
+template<> struct MPI_TYPE<double> {static const MPI_Datatype TYPE(){return MPI_DOUBLE;}};
+template<> struct MPI_TYPE<char> {static const MPI_Datatype TYPE(){return MPI_BYTE;}};
+
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+template<> struct MPI_TYPE<Complex> {static const MPI_Datatype TYPE(){return MPI_DOUBLE_COMPLEX;}};
+#endif
+template<class T> struct MPI_WHAT {};
+template<> struct MPI_WHAT<long> {static const int WHAT=101;};
+template<> struct MPI_WHAT<double> {static const int WHAT=102;};
+template<> struct MPI_WHAT<Complex> {static const int WHAT=103;};
+template<> struct MPI_WHAT<KN<long> *> {static const int WHAT=104;};
+template<> struct MPI_WHAT<KN<double>* > {static const int WHAT=105;};
+template<> struct MPI_WHAT<KN<Complex>* > {static const int WHAT=106;};
+
+template<class T> struct MPI_TAG {};
+template<> struct MPI_TAG<long> {static const int TAG=5;};
+template<> struct MPI_TAG<double> {static const int TAG=4;};
+template<> struct MPI_TAG<Complex > {static const int TAG=6;};
+template<> struct MPI_TAG<KN<long>* > {static const int TAG=11;};
+template<> struct MPI_TAG<KN<double>* > {static const int TAG=12;};
+template<> struct MPI_TAG<KN<Complex>* > {static const int TAG=13;};
+template<> struct MPI_TAG<Mesh *> {static const int TAG=1000;};
+template<> struct MPI_TAG<Mesh3 *> {static const int TAG=1010;};
+template<> struct MPI_TAG<Matrice_Creuse<double> *> {static const int TAG=1020;};
+template<> struct MPI_TAG<Matrice_Creuse<Complex> *> {static const int TAG=1030;};
+
+void f_initparallele(int &, char **&);
+void f_init_lgparallele();
+
+extern long mpirank ;
+extern long mpisize ;
+
+// for syncro communication
+MPI_Request * Syncro_block = reinterpret_cast<MPI_Request * > (1);
+
+const size_t sizempibuf = 1024*320;
+
+template<class R>
+long WSend( R * v,int l,int who,int tag,MPI_Comm comm,MPI_Request *rq)
+{
+ long ret=0;
+ MPI_Request rq0,*request=&rq0;
+ if(verbosity>100)
+ cout << mpirank<< " send to " << who << " tag " << tag << " " << rq << " " << comm << " syncro "<< (rq == Syncro_block) <<endl;
+ if(rq == Syncro_block)
+ ret=MPI_Send((void *) v,l, MPI_TYPE<R>::TYPE() , who, tag,comm);
+ else
+ {
+ ret=MPI_Isend((void *) v,l, MPI_TYPE<R>::TYPE() , who, tag,comm,request);
+ if(rq) *rq=*request;
+ else MPI_Request_free(request);
+ }
+ return ret;
+}
+
+template<class T>
+void CheckContigueKN(const KN_<T> &t)
+{
+ if( t.step != 1 && t.N()>1) {
+ cout<< " step= "<< t.step << " size " << t.N() << " " << & t[0] << " " << & t[1] << endl;
+ ExecError("Sorry the array is not contigue (step != 1) ");
+ }
+}
+template<>
+long WSend<Complex> ( Complex * v,int n,int who,int tag,MPI_Comm comm,MPI_Request *rq)
+{
+ long ret=0;
+ MPI_Request rq0,*request=&rq0;
+ if(verbosity>100)
+ cout << mpirank<< " send to " << who << " tag " << tag << " " << rq << " " << comm << " syncro "<< (rq == Syncro_block) << endl;
+ if(rq == Syncro_block)
+ {
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ ret=MPI_Send(reinterpret_cast<void*> (v) , n, MPI_DOUBLE_COMPLEX, who, tag,comm);
+#else
+ n *=2;
+ ret= MPI_Send(reinterpret_cast<void*> (v), n, MPI_DOUBLE, who, tag,comm);
+#endif
+ }
+ else
+ {
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ ret=MPI_Isend(reinterpret_cast<void*> (v) , n, MPI_DOUBLE_COMPLEX, who, tag,comm,request);
+#else
+ n *=2;
+ ret=MPI_Isend(reinterpret_cast<void*> (v), n, MPI_DOUBLE, who, tag,comm,request);
+ n /= 2;
+#endif
+ if(rq) *rq=*request;
+ else MPI_Request_free(request);
+ }
+ return ret;
+}
+
+template<class R>
+long WRecv(R * v,int n,int who,int tag,MPI_Comm comm,MPI_Request *rq)
+{
+ MPI_Status status;
+ if(rq && (rq != Syncro_block))
+ return MPI_Irecv(reinterpret_cast<void*> (v),n, MPI_TYPE<R>::TYPE() , who, tag,comm,rq);
+ else
+ return MPI_Recv(reinterpret_cast<void*> (v),n, MPI_TYPE<R>::TYPE() , who, tag,comm,&status);
+}
+
+template<>
+long WRecv<Complex> (Complex * v,int n,int who,int tag,MPI_Comm comm,MPI_Request *rq)
+{
+ MPI_Status status;
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ if(rq && (rq != Syncro_block))
+ return MPI_Irecv(reinterpret_cast<void*> (v), n, MPI_DOUBLE_COMPLEX, who, tag,comm,rq);
+ else
+ return MPI_Recv(reinterpret_cast<void*> (v), n, MPI_DOUBLE_COMPLEX, who, tag,comm,&status);
+#else
+ n *=2;
+ if(rq && (rq != Syncro_block))
+ return MPI_Irecv(reinterpret_cast<void*> (v), n, MPI_DOUBLE, who, tag,comm,rq);
+ else
+ return MPI_Recv(reinterpret_cast<void*> (v), n, MPI_DOUBLE, who, tag,comm,&status);
+#endif
+}
+
+template<class R>
+void WBcast(R * v,int n,int who,MPI_Comm comm)
+{
+ assert(v && n>0);
+ MPI_Bcast(reinterpret_cast<void*> (v), n, MPI_TYPE<R>::TYPE(), who,comm);
+}
+
+template<>
+void WBcast<Complex>(Complex * v,int n,int who,MPI_Comm comm)
+{
+ assert(v && n>0);
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ MPI_Bcast(reinterpret_cast<void*> (v), n, MPI_DOUBLE_COMPLEX /*MPI_TYPE<R>::TYPE()*/, who,comm);
+#else
+ n *=2;
+ MPI_Bcast(reinterpret_cast<void*> (v), n, MPI_DOUBLE, who,comm);
+#endif
+}
+
+
+
+
+
+struct MPIrank {
+
+ int who;
+ MPI_Comm comm;
+ MPI_Request *rq;
+ // mutable bool block;
+
+ MPIrank(int i=0,MPI_Comm com=MPI_COMM_WORLD, MPI_Request *rqq=0)
+ : who(i) , comm(com),rq(rqq)
+ {
+ int n;
+ MPI_Comm_size(comm, &n);
+ // cout <<" who = " << who << " ******** " << n << " "<< ((-2 < who) && (who < n)) << endl;
+ // ffassert( (-2 < who) && (who < n) ); // plant sans raison ...
+ }
+
+
+
+ long Send(double a)const {return WSend(&a, 1, who, MPI_TAG< double >::TAG,comm,rq); }
+ long Send(long a)const {return WSend(&a, 1, who, MPI_TAG< long >::TAG,comm,rq); }
+ long Send(Complex a)const {return WSend(&a, 1, who, MPI_TAG< Complex >::TAG,comm,rq); }
+
+ long Recv(double & a) const { return WRecv(&a, 1, who, MPI_TAG< double >::TAG ,comm,rq);}
+ long Recv(long & a) const { return WRecv(&a, 1, who, MPI_TAG< long >::TAG ,comm,rq);}
+ long Recv(Complex & a) const { return WRecv(&a, 1, who, MPI_TAG< Complex >::TAG ,comm,rq);}
+
+ const MPIrank & Bcast(double & a) const {WBcast(&a, 1, who,comm); return *this; }
+ const MPIrank & Bcast(long & a) const {WBcast(&a, 1, who,comm); return *this; }
+ const MPIrank & Bcast(Complex & a) const {WBcast(&a, 1, who,comm); return *this; }
+
+
+
+ template<class R>
+ long Recv(KN<R> & a) const {
+ assert(&a);
+ CheckContigueKN(a);
+
+ if(verbosity>99)
+ cout << " ---- " << who << " >> " << & a << " " << a.N() << " " << a.step << " " << MPI_TAG<KN<R>* >::TAG
+ <<" from " << mpirank << " "<< (R *) a << endl;
+ int n= a.N();
+ long ll=WRecv((R *) a, n, who, MPI_TAG<KN<R>* >::TAG ,comm,rq);
+ if(verbosity>99)
+ cout << " ++++ " << who << " >> " << & a << " " << a.N() << " " << MPI_TAG<KN<R>* >::TAG
+ <<" from " << mpirank << " "<< (R *) a << endl;
+ ffassert(a.N()==n);
+ return ll;
+ }
+
+ template<class R>
+ long Send(const KN<R> *aa)const {
+ const KN<R> & a=*aa;
+ ffassert(&a);
+ int n= a.N();
+ CheckContigueKN(*aa);
+ if(verbosity>99)
+ cout << " .... " << who << " >> " << & a << " " << a.N() << " " << a.step<< " " << MPI_TAG<KN<R>* >::TAG
+ <<" from " << mpirank << " "<< (R *) a << endl;
+ return WSend((R *) a,n,who,MPI_TAG<KN<R>* >::TAG,comm,rq);
+ }
+
+ template<class R>
+ const MPIrank & Bcast(const KN<R> &a) const {
+ //const KN<R> & a=*aa;
+ assert(&a);
+ int n= a.N();
+ CheckContigueKN(a);
+
+ WBcast((R *) a, n, who,comm);
+ ffassert(a.N()==n);
+ return *this;
+ }
+
+
+ const MPIrank & Bcast(Fem2D::Mesh *& a) const {
+ if(verbosity>1)
+ cout << " MPI Bcast (mesh *) " << a << endl;
+ Serialize *buf=0;
+ long nbsize=0;
+ if( who == mpirank)
+ {
+ buf =new Serialize((*a).serialize());
+ nbsize = buf->size();
+ }
+ WBcast( &nbsize, 1, who,comm);
+ if (who != mpirank)
+ buf= new Serialize(nbsize,Fem2D::Mesh::magicmesh);
+ assert(nbsize);
+ if(verbosity>2)
+ cout << " size to bcast : " << nbsize << " mpirank : " << mpirank << endl;
+
+ WBcast( (char *)(*buf),nbsize, who,comm);
+
+ if(who != mpirank)
+ {
+ if (a) (*a).decrement();
+ a= new Fem2D::Mesh(*buf);
+ Fem2D::R2 Pn,Px;
+ a->BoundingBox(Pn,Px);
+ a->quadtree=new Fem2D::FQuadTree(a,Pn,Px,a->nv);
+ }
+ delete buf;
+ return *this;
+ }
+
+ const MPIrank & Bcast(Fem2D::Mesh3 *& a) const {
+ if(verbosity>1)
+ cout << " MPI Bcast (mesh3 *) " << a << endl;
+ Serialize *buf=0;
+ long nbsize=0;
+ if( who == mpirank)
+ {
+ buf =new Serialize((*a).serialize());
+ nbsize = buf->size();
+ }
+ WBcast( &nbsize, 1, who,comm);
+ if (who != mpirank)
+ buf= new Serialize(nbsize,Fem2D::GenericMesh_magicmesh);
+ assert(nbsize);
+ if(verbosity>2)
+ cout << " size to bcast : " << nbsize << " mpirank : " << mpirank << endl;
+
+ WBcast( (char *)(*buf),nbsize, who,comm);
+
+ if(who != mpirank)
+ {
+ if (a) (*a).decrement();
+ a= new Fem2D::Mesh3(*buf);
+ a->BuildGTree();
+ }
+ delete buf;
+ return *this;
+ }
+
+ template<class R>
+ const MPIrank & Bcast(Matrice_Creuse<R> & a) const
+ {
+ if(verbosity>1)
+ cout << mpirank << ": MPI Bcast " << who << " (Matrice_Creuse &) " << &a << " " << a.A << endl;
+ MatriceMorse<R> *mA=0;
+ int ldata[4]={0,0,0,0};
+ if( who == mpirank)
+ {
+ if(a.A)
+ {
+ mA= a.A->toMatriceMorse();
+ ldata[0]=mA->n;
+ ldata[1]=mA->m;
+ ldata[2]=mA->nbcoef;
+ ldata[3]=mA->symetrique;
+ // cout << mpirank << " ldata " << ldata[0] << " " << ldata[1] <<" " << ldata[2] << " " <<ldata[3] << endl;
+ }
+ }
+ int n4=4;
+ WBcast( ldata,n4, who,comm);
+ //cout << mpirank << " after 4 " " ldata " << ldata[0] << " " << ldata[1] <<" " << ldata[2] << " " <<ldata[3] << endl;
+ int n1= ldata[0]+1;
+ if( who != mpirank && ldata[0] )
+ mA= new MatriceMorse<R>(ldata[0],ldata[1],ldata[2],ldata[3]);
+ if(ldata[0])
+ {
+ // cout << mpirank << " " << who << " lg " << mA->lg << " " << n1 << endl;
+ WBcast( mA->lg,n1, who,comm);
+ //cout << mpirank << " " << who << " cl " << mA->cl << " " << mA->nbcoef << endl;
+ WBcast( mA->cl,mA->nbcoef, who,comm);
+ //cout << mpirank << " " << who << " a " << mA->a << " " << mA->nbcoef << endl;
+ WBcast( mA->a,mA->nbcoef , who,comm);
+ }
+ if( who != mpirank)
+ a.A.master(mA);
+ else
+ delete mA;
+ return *this;
+ }
+
+ // version asyncrone or syncrone Now 2010 ...
+ template<class R> long Send(Matrice_Creuse<R> * const & a) const ;
+ template<class R> long Recv(Matrice_Creuse<R> & a) const ;
+ long Send(Fem2D::Mesh * a) const ;
+ long Send (Fem2D::Mesh3 * a) const ;
+ long Recv(Fem2D::Mesh *& a) const;
+ long Recv(Fem2D::Mesh3 *& a) const;
+
+ operator int () const { return who;}
+};
+
+
+
+
+// for MPI_WAIT_resquets (complex MPI asyncrone MPI recv request ) ..
+class DoOnWaitMPI_Request :public MPIrank
+{
+
+public:
+ bool sync;
+ DoOnWaitMPI_Request( MPIrank mpr) : MPIrank(mpr),sync((rq==0 || rq == Syncro_block)) {}
+ virtual bool Do(MPI_Request *rrq) =0; // false -> end
+ bool DoSR() { // do the Send/Recv Op.
+ bool ret=false;
+ if(verbosity>100)
+ cout << mpirank << " --- Do Send/Recv : " << " " << rq << " " << sync << endl;
+ if(sync) // wait ...
+ { bool c=1;
+ if(verbosity>100)
+ cout << mpirank << " --- Do way : " << c << " " << rq << endl;
+ while (c)
+ {
+ c=Do(rq);
+ if(verbosity>100)
+ cout << mpirank << " --- Do return : " << c << " " << rq << endl;
+ }
+
+ ret=true;// clean
+ }
+ else
+ ToDoOnWaitMPI_Request[rq]=this; // add request for WAIT ..
+ return ret;
+ }
+ virtual ~DoOnWaitMPI_Request(){}
+private:
+ DoOnWaitMPI_Request(const DoOnWaitMPI_Request & );
+ DoOnWaitMPI_Request & operator=( DoOnWaitMPI_Request & );
+};
+
+
+
+void DoOnWaitMPIRequest(MPI_Request *rq)
+{
+ if( rq )
+ {
+ map<MPI_Request*,DoOnWaitMPI_Request *>:: iterator drd = ToDoOnWaitMPI_Request.find(rq) ;
+ if(drd != ToDoOnWaitMPI_Request.end())
+ {
+ if(verbosity>100)
+ cout << " Do on DoOnWaitMPIRequest " << rq << " " << endl;
+ if( !drd->second->Do(rq) )
+ {
+ delete drd->second;
+ ToDoOnWaitMPI_Request.erase(drd); // finish ...
+ }
+
+ }
+
+ }
+
+}
+
+void DeSerialize(Serialize * sTh,Fem2D::Mesh ** ppTh)
+{
+ if ( *ppTh ) (**ppTh).decrement();
+ // cout << " ####"<< sTh << endl;
+ Fem2D::Mesh * pTh= new Fem2D::Mesh(*sTh);
+ // cout << " ####\n";
+ *ppTh=pTh;
+
+ Fem2D::R2 Pn,Px;
+ pTh->BoundingBox(Pn,Px);
+ pTh->quadtree=new Fem2D::FQuadTree(pTh,Pn,Px,pTh->nv);
+}
+
+void DeSerialize(Serialize * sTh,Fem2D::Mesh3 ** ppTh)
+{
+ if ( *ppTh ) (**ppTh).decrement();
+ Fem2D::Mesh3 * pTh= new Fem2D::Mesh3(*sTh);
+ pTh->BuildGTree();
+ *ppTh=pTh;
+}
+
+
+template<class R>
+class RevcWMatd : public DoOnWaitMPI_Request
+{
+public:
+ typedef Matrice_Creuse<R> Mat;
+ Matrice_Creuse<R> * pmat;
+ MatriceMorse<R> *mA;
+ int state;
+ int ldata[4];
+ RevcWMatd(const MPIrank *mpirank,Mat * pm)
+ : DoOnWaitMPI_Request(*mpirank),
+ pmat(pm),mA(0),state(0)
+ {
+ int tag = MPI_TAG<Matrice_Creuse<R>* >::TAG;
+ int ll=WRecv( ldata,4, who, tag,comm,rq);
+ ffassert(ll == MPI_SUCCESS);
+
+ }
+
+ bool Do(MPI_Request *rrq)
+ {
+ state++;
+ int tag=MPI_TAG<Mat *>::TAG;
+ if(verbosity>100)
+ cout << mpirank << " ---R: ldata " << ldata[0] << " " << ldata[1] <<" " << ldata[2] << " " <<ldata[3] << " " << state << endl;
+
+ int ll=0;
+ switch (state)
+ {
+ case 1:
+ mA = new MatriceMorse<R>(ldata[0],ldata[1],ldata[2],ldata[3]);
+ ll=WRecv( mA->lg,mA->n+1, who, tag+1,comm,rq);
+ break;
+ case 2:
+ ll=WRecv( mA->cl,mA->nbcoef, who, tag+2,comm,rq);
+ break;
+ case 3:
+ ll=WRecv( mA->a,mA->nbcoef, who, tag+3,comm,rq);
+ break;
+ default:
+ pmat->A.master(mA);
+ mA=0;
+ return false;
+ break;
+ }
+ ffassert(ll == MPI_SUCCESS);
+ return true; // OK
+ }
+ ~RevcWMatd() {
+ if(mA) delete mA;
+ }
+
+};
+
+template<class R>
+class SendWMatd : public DoOnWaitMPI_Request
+{
+public:
+ typedef Matrice_Creuse<R> Mat;
+ Matrice_Creuse<R> * pmat;
+ MatriceMorse<R> *mA;
+ int state;
+ int ldata[4];
+ SendWMatd(const MPIrank *mpirank,Mat * pm)
+ : DoOnWaitMPI_Request(*mpirank),
+ pmat(pm),mA(0),state(0)
+ {
+ mA=pmat->A->toMatriceMorse();
+ ldata[0]=mA->n;
+ ldata[1]=mA->m;
+ ldata[2]=mA->nbcoef;
+ ldata[3]=mA->symetrique;
+ int tag = MPI_TAG<Matrice_Creuse<R>* >::TAG;
+ int ll=WSend( ldata,4, who, tag,comm,rq);
+ ffassert(ll == MPI_SUCCESS) ;
+ }
+ bool Do(MPI_Request *rrq)
+ {
+ state++;
+ int tag=MPI_TAG<Mat *>::TAG;
+ if(verbosity>100)
+ cout << mpirank << " ---S ldata " << ldata[0] << " " << ldata[1] <<" " << ldata[2] << " " <<ldata[3] << endl;
+
+ int ll=0;
+ switch (state)
+ {
+ case 1:
+ ll=WSend( mA->lg,mA->n+1, who, tag+1,comm,rq);
+ break;
+ case 2:
+ ll=WSend( mA->cl,mA->nbcoef, who, tag+2,comm,rq);
+ break;
+ case 3:
+ ll=WSend( mA->a,mA->nbcoef, who, tag+3,comm,rq);
+ break;
+ default:
+ delete mA;
+ mA=0;
+ return false;
+ break;
+ }
+ ffassert(ll == MPI_SUCCESS);
+ return true; // OK
+ }
+ ~SendWMatd() {
+ if(mA) delete mA;
+ }
+
+};
+
+
+template<class Mesh>
+class RevcWMeshd : public DoOnWaitMPI_Request,Serialize
+{
+public:
+ Mesh ** ppTh;
+ int state;
+ RevcWMeshd(const MPIrank *mpirank,Mesh ** ppThh)
+ : DoOnWaitMPI_Request(*mpirank),Serialize(sizempibuf,Fem2D::Mesh::magicmesh),
+ ppTh(ppThh),state(0)
+ {
+ int tag=MPI_TAG<Mesh *>::TAG;
+ if(verbosity>100)
+ cout << " -- RevcWMeshd " << rq << " " << comm << " " << p << endl;
+ char * pp = p-sizeof(long);
+ int ll=WRecv(pp, sizempibuf, who, tag,comm,rq); // wait first part ..
+ // cout << mpirank << " ++ ll= " << ll << " pp= " << pp << endl;
+ }
+
+ bool Do(MPI_Request *rrq)
+ {
+ int tag=MPI_TAG<Mesh *>::TAG;
+ ffassert(rq == rrq);
+ long l = * (long *) (void *) p ;
+ long l1 = l -( sizempibuf-sizeof(long));
+ if(verbosity>100)
+ cout << mpirank << " Do RevcWMeshd " << l <<" " << state << " cont : " << (l1 >0) << " " << rq << " " << comm << endl;
+
+ if(0==state++ && l1>0 ) // recv first part ..
+ {
+ if(verbosity>100)
+ cout << mpirank << " + Do RevcWMeshd " << l <<" " << state << " cont : " << ( l > sizempibuf) << " " << rq << " " << l-sizempibuf << " p = " << (void *) p << endl;
+ resize(l);
+ int ll=WRecv(p-sizeof(long)+sizempibuf,l1, who, tag+state,comm,rq);
+ return true;// continue ..
+ }
+ else resize(l);
+ // we have the all buffer => DeSerialize
+ DeSerialize(this,ppTh);
+ count()=0;
+ if(verbosity>100)
+ cout << " " << mpirank << " recived from " << who << " serialized " << what << ", l="
+ << l << ", tag=" << tag << " rq = " << rq << " " << *ppTh << endl;
+
+ return false; // OK
+ }
+ ~RevcWMeshd() {count()=0;}
+
+};
+
+template<class Mesh>
+class SendWMeshd : public DoOnWaitMPI_Request,Serialize
+{
+public:
+ Mesh ** ppTh;
+ int state;
+ SendWMeshd(const MPIrank *mpirank,Mesh ** ppThh)
+ : DoOnWaitMPI_Request(*mpirank),Serialize((**ppThh).serialize()),
+ ppTh(ppThh),state(0)
+ {
+ int tag=MPI_TAG<Mesh *>::TAG;
+ if(verbosity>100)
+ cout << " -- SendWMeshd " << rq << " " << comm << " " << p << endl;
+ char * pp = p-sizeof(long);
+ count()=lg; // store length in count
+ size_t ls=lg+sizeof(long);
+ if (ls<=sizempibuf)
+ WSend(pp,ls, who, tag,comm,rq);
+ else
+ WSend(pp,sizempibuf,who, tag,comm,rq);
+ }
+
+ bool Do(MPI_Request *rrq)
+ {
+ int tag=MPI_TAG<Mesh *>::TAG;
+ char * pp = p-sizeof(long);
+ long l1 = lg -(sizempibuf- sizeof(long));
+ if(verbosity>100)
+ cout << mpirank << " Do SendWMeshd " << lg <<" " << state << " cont : " << (l1 >0) << " " << rq << " " << comm << endl;
+
+ if(0==state++ && l1>0 ) // send the second part
+ {
+ int ll=WSend(pp+sizempibuf,l1, who, tag+state,comm,rq);
+ return true;// Fini
+ }
+ return false; // OK
+ }
+
+ ~SendWMeshd() {count()=0;}
+
+};
+
+
+template<class R>
+ long MPIrank::Send(Matrice_Creuse<R> * const & a) const
+ {
+ if(0)
+ {
+ if(verbosity>100)
+ cout << " MPI << (Matrice_Creuse *) " << a << endl;
+ ffassert(rq==0 || rq == Syncro_block) ; //
+ int tag = MPI_TAG<Matrice_Creuse<R>* >::TAG;
+ MatriceMorse<R> *mA=a->A->toMatriceMorse();
+ int ldata[4];
+ ldata[0]=mA->n;
+ ldata[1]=mA->m;
+ ldata[2]=mA->nbcoef;
+ ldata[3]=mA->symetrique;
+
+ if(verbosity>100)
+ cout << " ldata " << ldata[0] << " " << ldata[1] <<" " << ldata[2] << " " <<ldata[3] << endl;
+ int ll=0;
+ ll=WSend( ldata,4, who, tag,comm,rq);
+ if(ll == MPI_SUCCESS)
+ ll=WSend( mA->lg,mA->n+1, who, tag+1,comm,rq);
+ if(ll == MPI_SUCCESS)
+ ll=WSend( mA->cl,mA->nbcoef, who, tag+2,comm,rq);
+ if(ll == MPI_SUCCESS)
+ ll=WSend( mA->a,mA->nbcoef, who, tag+3,comm,rq);
+ delete mA;
+ return ll;
+ }
+ else
+ {
+ SendWMatd<R> *rwm= new SendWMatd<R>(this,a);
+ if( rwm->DoSR() ) delete rwm;
+ return MPI_SUCCESS;
+ }
+ }
+
+ template<class R>
+ long MPIrank::Recv(Matrice_Creuse<R> & a) const
+ {
+ if(0)
+ {
+ if(verbosity>100)
+ cout << " MPI << (Matrice_Creuse ) " << a << endl;
+ ffassert(rq==0 || rq == Syncro_block) ; //
+ int tag = MPI_TAG<Matrice_Creuse<R>* >::TAG;
+ int ldata[4];
+ int ll=0;
+ ll=WRecv( ldata,4, who, tag,comm,rq);
+ MatriceMorse<R> *mA= new MatriceMorse<R>(ldata[0],ldata[1],ldata[2],ldata[3]);
+ if(ll == MPI_SUCCESS)
+ ll=WRecv( mA->lg,mA->n+1, who, tag+1,comm,rq);
+ if(ll == MPI_SUCCESS)
+ ll=WRecv( mA->cl,mA->nbcoef, who, tag+2,comm,rq);
+ if(ll == MPI_SUCCESS)
+ ll=WRecv( mA->a,mA->nbcoef, who, tag+3,comm,rq);
+ a.A.master(mA);
+ return ll;
+ }
+ else
+ {
+ RevcWMatd<R> *rwm= new RevcWMatd<R>(this,&a);
+ if( rwm->DoSR() ) delete rwm;
+ return MPI_SUCCESS;
+ }
+ }
+
+
+long MPIrank::Send(Fem2D::Mesh * a) const {
+ if(verbosity>100)
+ cout << " MPI << (mesh *) " << a << endl;
+ ffassert(a);
+ SendWMeshd<Mesh> *rwm= new SendWMeshd<Mesh>(this,&a);
+ //cout << " ... "<< endl;
+ if( rwm->DoSR() ) delete rwm;
+ return MPI_SUCCESS;
+ }
+long MPIrank::Send (Fem2D::Mesh3 * a) const {
+ if(verbosity>100)
+ cout << " MPI << (mesh3 *) " << a << endl;
+ ffassert(a);
+ SendWMeshd<Mesh3> *rwm= new SendWMeshd<Mesh3>(this,&a);
+ if( rwm->DoSR() ) delete rwm;
+ return MPI_SUCCESS;
+ }
+
+/*
+long MPIrank::Send(Fem2D::Mesh * a) const {
+ if(verbosity>100)
+ cout << " MPI << (mesh *) " << a << endl;
+ ffassert(a);
+ Serialize buf=(*a).serialize();
+ buf.mpisend(*this,MPI_TAG<Mesh *>::TAG,static_cast<const void *>(this));
+ return MPI_SUCCESS;
+ }
+long MPIrank::Send (Fem2D::Mesh3 * a) const {
+ if(verbosity>100)
+ cout << " MPI << (mesh3 *) " << a << endl;
+ ffassert(a);
+ Serialize buf=(*a).serialize();
+ buf.mpisend(*this,MPI_TAG<Mesh3 *>::TAG,static_cast<const void *>(this));
+ return MPI_SUCCESS;
+ }
+*/
+
+// new version asyncrone ... Now 2010 ...
+long MPIrank::Recv(Fem2D::Mesh *& a) const {
+ if(verbosity>100)
+ cout << " MPI >> (mesh *) &" << a << " " << &a << endl;
+ RevcWMeshd<Mesh> *rwm= new RevcWMeshd<Mesh>(this,&a);
+ if( rwm->DoSR() ) delete rwm;
+ if((rq==0 || rq == Syncro_block))
+ ffassert( a );
+ return MPI_SUCCESS;
+}
+
+long MPIrank::Recv(Fem2D::Mesh3 *& a) const {
+ if(verbosity>100)
+ cout << " MPI >> (mesh3 *) &" << a << " " << &a << endl;
+ RevcWMeshd<Mesh3> *rwm= new RevcWMeshd<Mesh3>(this,&a);
+ if( rwm->DoSR() ) delete rwm;
+ if((rq==0 || rq == Syncro_block))
+ ffassert( a );
+ return MPI_SUCCESS;
+}
+
+
+void Serialize::mpisend(const MPIrank & rank,long tag,const void * vmpirank)
+{
+ const MPIrank * mpirank=static_cast<const MPIrank *> (vmpirank);
+ MPI_Comm comm=mpirank->comm;
+ MPI_Request *rq=mpirank->rq;
+ ffassert(rq==0 || rq == Syncro_block);
+ char * pp = p-sizeof(long);
+ long countsave=count(); // save count
+ count()=lg; // store length in count
+ int l=lg+sizeof(long);
+ if(verbosity>100)
+ cout << " -- send from " << mpirank << " to " << rank << " serialized " << what
+ << ", l=" << l << ", tag=" << tag << " " << (l < sizempibuf) << endl;
+ if (l <=sizempibuf)
+ WSend(pp,l, rank, tag,comm,rq);
+ else {
+ WSend(pp,sizempibuf, rank, tag,comm,rq);
+ WSend(pp+sizempibuf,l-sizempibuf, rank, tag+1,comm,rq);
+ }
+ if(verbosity>100)
+ cout << " ok send is arrived " << endl;
+ count()=countsave; // restore count
+}
+
+
+Serialize::Serialize(const MPIrank & rank,const char * wht,long tag,const void * vmpirank)
+ :what(wht)
+{
+ const MPIrank * mpirank=static_cast<const MPIrank *> (vmpirank);
+ MPI_Comm comm=mpirank->comm;
+ MPI_Request *rq=mpirank->rq;
+
+ if(verbosity>100)
+ cout << " -- waiting " << mpirank << " from " << rank << " serialized " << what
+ << " tag = " << tag << endl;
+ if(!(rq==0 || rq == Syncro_block))
+ {
+ ExecError("Not async recv of complex objet! Sorry to hard to code (FH!).");
+ ffassert(rq==0 || rq == Syncro_block);
+ }
+
+
+ char * buf= new char [sizempibuf];
+ WRecv(buf, sizempibuf, rank, tag,comm,rq);
+ lg = * (long *) (void *) buf;
+ int l=lg+sizeof(long);
+ char * pp= new char[l] ;
+ if ( l <= sizempibuf)
+ memcpy(pp,buf,l);
+ else
+ {
+ memcpy(pp,buf,sizempibuf);
+ WRecv(pp+sizempibuf,l-sizempibuf, rank, tag+1,comm,rq) ;
+ }
+
+ if(verbosity>100)
+ cout << " " << mpirank << " recived from " << rank << " serialized " << what << ", l="
+ << l << ", tag=" << tag << endl;
+ delete [] buf;
+ p=pp+sizeof(long);
+ count()=0;
+
+}
+
+template<class A>
+struct Op_Readmpi : public binary_function<MPIrank,A*,MPIrank> {
+ static MPIrank f(MPIrank const & f,A * const & a)
+ {
+ f.Recv(*a);
+ return f;
+ }
+};
+
+template<class A>
+struct Op_Recvmpi : public binary_function<MPIrank,A*,long> {
+ static MPIrank f(MPIrank const & f,A * const & a)
+ {
+ ffassert(f.rq ==0 || f.rq == Syncro_block); // Block
+ return f.Recv(*a);
+
+ }
+};
+template<class A>
+struct Op_IRecvmpi : public binary_function<MPIrank,A*,long> {
+ static MPIrank f(MPIrank const & f,A * const & a)
+ {
+ ffassert(f.rq !=0 || f.rq != Syncro_block); // no Block
+ return f.Recv(*a);
+
+ }
+};
+
+
+template<class A>
+struct Op_Writempi : public binary_function<MPIrank,A,MPIrank> {
+ static MPIrank f(MPIrank const & f,A const & a)
+ {
+ f.Send(a);
+ return f;
+ }
+};
+
+
+template<class A>
+struct Op_Bcastmpi : public binary_function<MPIrank,A*,MPIrank> {
+ static MPIrank f(MPIrank const & f,A * const & a)
+ {
+ f.Bcast(*a);
+ return f;
+ }
+};
+
+template<class A>
+struct Op_ISendmpi : public binary_function<MPIrank,A,long> {
+ static MPIrank f(MPIrank const & f,A const & a)
+ {
+ ffassert(f.rq != Syncro_block);
+ return f.Send(a);
+ }
+};
+template<class A>
+struct Op_Sendmpi : public binary_function<MPIrank,A,long> {
+ static MPIrank f(MPIrank const & f,A const & a)
+ {
+ MPIrank ff(f.who,f.comm,Syncro_block);
+ return ff.Send(a);
+ }
+};
+
+
+template<class R>
+struct Op_All2All : public binary_function<KN_<R>,KN_<R>,long> {
+ static long f( KN_<R> const & s, KN_<R> const &r)
+ {
+ CheckContigueKN(s);
+ CheckContigueKN(r);
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = s.N()/mpisizew;
+ ffassert(s.N()==mpisizew*chunk && r.N()==s.N());
+
+ return MPI_Alltoall( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(), comm);
+ }
+};
+
+
+template<class R>
+struct Op_Allgather1 : public binary_function<R*,KN_<R>,long> {
+ static long f( R* const & s, KN_<R> const &r)
+ {
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpisizew;
+ CheckContigueKN(r);
+
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = 1;
+ ffassert(r.N()==mpisizew);
+
+ return MPI_Allgather( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(), comm);
+ }
+};
+
+template<class R>
+struct Op_Allgather : public binary_function<KN_<R>,KN_<R>,long> {
+ static long f( KN_<R> const & s, KN_<R> const &r)
+ {
+ CheckContigueKN(s);
+ CheckContigueKN(r);
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = r.N()/mpisizew;
+ ffassert(r.N()==mpisizew*chunk && chunk == s.N());
+ return MPI_Allgather( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(), comm);
+ }
+};
+
+template<class R>
+struct Op_All2All3 : public ternary_function<KN_<R>,KN_<R>,fMPI_Comm,long> {
+ static long f(Stack, KN_<R> const & s, KN_<R> const &r,fMPI_Comm const & cmm )
+ {
+ CheckContigueKN(s);
+ CheckContigueKN(r);
+
+ MPI_Comm comm=cmm;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = s.N()/mpisizew;
+ ffassert(s.N()==mpisizew*chunk && r.N()==s.N());
+
+ return MPI_Alltoall( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(), comm);
+ }
+};
+
+template<class R>
+struct Op_Allgather3 : public ternary_function<KN_<R>,KN_<R>,fMPI_Comm,long> {
+ static long f(Stack, KN_<R> const & s, KN_<R> const &r,fMPI_Comm const & cmm)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=cmm;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = r.N()/mpisizew; // bug corrected by J. Morice
+ //ffassert(s.N()==mpisizew*chunk && r.N()==s.N());
+ ffassert(s.N()==chunk && r.N()==s.N()*mpisizew);
+
+ return MPI_Allgather( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(), comm);
+ }
+};
+
+
+template<class R>
+struct Op_Allgather13 : public ternary_function<R*,KN_<R>,fMPI_Comm,long> {
+ static long f(Stack, R* const & s, KN_<R> const &r,fMPI_Comm const & cmm)
+ {
+
+ CheckContigueKN(r);
+
+ MPI_Comm comm=cmm;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = 1; // bug corrected by J. Morice
+ //ffassert(s.N()==mpisizew*chunk && r.N()==s.N());
+ ffassert( r.N()==mpisizew);
+
+ return MPI_Allgather( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(), comm);
+ }
+};
+// Add J. Morice
+
+template<class R>
+long Op_All2Allv( KN_<R> const & s, KN_<R> const &r, KN_<long> const &sendcnts, KN_<long> const &sdispls, KN_<long> const &recvcnts, KN_<long> const &rdispls)
+{
+ CheckContigueKN(s);
+ CheckContigueKN(r);
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpirankv=MPI_UNDEFINED;
+ MPI_Comm_rank(comm, &mpirankv);
+
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ ffassert( sendcnts.N() == sdispls.N() && sendcnts.N() == recvcnts.N() && sendcnts.N() == rdispls.N() && sendcnts.N() == mpisizew );
+
+ KN<int> INTsendcnts(sendcnts.N());
+ KN<int> INTsdispls(sdispls.N());
+ KN<int> INTrecvcnts(recvcnts.N());
+ KN<int> INTrdispls(rdispls.N());
+
+ for(int ii=0; ii< sendcnts.N(); ii++){
+ INTsendcnts[ii] = sendcnts[ii];
+ INTsdispls[ii] = sdispls[ii];
+ INTrecvcnts[ii] = recvcnts[ii];
+ INTrdispls[ii] = rdispls[ii];
+ }
+
+ return MPI_Alltoallv( (void *) (R*) s, INTsendcnts, INTsdispls, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, INTrecvcnts, INTrdispls, MPI_TYPE<R>::TYPE(), comm);
+}
+
+
+
+template<class R>
+struct Op_Allgatherv : public quad_function<KN_<R>,KN_<R>,KN_<long>,KN_<long>,long> {
+ static long f( Stack ,KN_<R> const & s, KN_<R> const &r, KN_<long> const & recvcount, KN_<long> const & displs)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew);
+ ffassert( recvcount.N() == displs.N() && recvcount.N() == mpisizew);
+ long sum=0;
+ for(int ii=0; ii< recvcount.N(); ii++)
+ sum+=recvcount[ii];
+ ffassert( sum == r.N() );
+
+ KN<int> INTrecvcount(recvcount.N());
+ KN<int> INTdispls(displs.N());
+ for(int ii=0; ii< recvcount.N(); ii++){
+ INTrecvcount[ii]= recvcount[ii];
+ INTdispls[ii]= displs[ii];
+ }
+ return MPI_Allgatherv( (void *) (R*) s, s.N(), MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, INTrecvcount, INTdispls,MPI_TYPE<R>::TYPE(), comm);
+ }
+};
+
+template<class R>
+long Op_All2All3v(KN_<R> const & s, KN_<R> const &r,fMPI_Comm const & cmm, KN_<long> const &sendcnts, KN_<long> const &sdispls, KN_<long> const &recvcnts, KN_<long> const &rdispls )
+{
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=cmm;
+ int mpirankv=MPI_UNDEFINED;
+ MPI_Comm_rank(comm, &mpirankv);
+
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ ffassert( sendcnts.N() == sdispls.N() && sendcnts.N() == recvcnts.N() && sendcnts.N() == rdispls.N() && sendcnts.N() == mpisizew );
+
+ //ffassert(s.N()==sendcnts[mpirankv] && r.N()==recvbuf[mpirankv]);
+
+ KN<int> INTsendcnts(sendcnts.N());
+ KN<int> INTsdispls(sdispls.N());
+ KN<int> INTrecvcnts(recvcnts.N());
+ KN<int> INTrdispls(rdispls.N());
+
+ for(int ii=0; ii< sendcnts.N(); ii++){
+ INTsendcnts[ii] = sendcnts[ii];
+ INTsdispls[ii] = sdispls[ii];
+ INTrecvcnts[ii] = recvcnts[ii];
+ INTrdispls[ii] = rdispls[ii];
+ }
+
+ return MPI_Alltoallv( (void *) (R*) s, INTsendcnts, INTsdispls, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, INTrecvcnts, INTrdispls, MPI_TYPE<R>::TYPE(), comm);
+}
+
+
+template<class R>
+long Op_Allgatherv3(KN_<R> const & s, KN_<R> const &r,fMPI_Comm const & cmm, KN_<long> const & recvcount, KN_<long> const & displs)
+{
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=cmm;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew);
+ ffassert( recvcount.N() == displs.N() && recvcount.N() == mpisizew);
+ long sum=0;
+ for(int ii=0; ii< recvcount.N(); ii++)
+ sum+=recvcount[ii];
+ ffassert( sum == r.N() );
+ KN<int> INTrecvcount(recvcount.N());
+ KN<int> INTdispls(displs.N());
+ for(int ii=0; ii< recvcount.N(); ii++){
+ INTrecvcount[ii]= recvcount[ii];
+ INTdispls[ii]= displs[ii];
+ }
+
+ return MPI_Allgatherv( (void *) (R*) s, s.N(), MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, INTrecvcount, INTdispls,MPI_TYPE<R>::TYPE(), comm);
+}
+
+
+template<class R>
+struct Op_Scatter1 : public ternary_function<KN_<R>, R* ,MPIrank,long> {
+ static long f(Stack, KN_<R> const & s, R* const &r, MPIrank const & root)
+ {
+ CheckContigueKN(s);
+
+
+ int mpisizew;
+ MPI_Comm_size(root.comm, &mpisizew);
+ int chunk = 1;
+ // ffassert(s.N()==mpisizew*chunk);
+
+ return MPI_Scatter( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(),root.who,root.comm);
+ }
+};
+
+
+// Fin add J. Morice
+
+
+template<class R>
+struct Op_Scatter3 : public ternary_function<KN_<R>,KN_<R>,MPIrank,long> {
+ static long f(Stack, KN_<R> const & s, KN_<R> const &r, MPIrank const & root)
+ {
+
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int mpisizew;
+ MPI_Comm_size(root.comm, &mpisizew);
+ int chunk = r.N(); // FH correct jan 2012 ...
+ // ffassert(s.N()==mpisizew*chunk && r.N()==chunk);
+
+ return MPI_Scatter( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(),root.who,root.comm);
+ }
+};
+
+// Add J. Morice
+template<class R>
+//struct Op_Scatterv3 : public penta_function< KN_<R>, KN_<R>, MPIrank, KN_<long>, KN_<long>, long> {
+long Op_Scatterv3( KN_<R> const & s, KN_<R> const &r, MPIrank const & root, KN_<long> const &sendcnts, KN_<long> const &displs)
+{
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int mpirankv=MPI_UNDEFINED;
+ if(root.comm != MPI_COMM_NULL)
+ MPI_Comm_rank(root.comm, &mpirankv);
+
+ int mpisizew;
+ MPI_Comm_size(root.comm, &mpisizew); /* local */
+ KN<int> INTsendcnts(mpirankv == root.who ? sendcnts.N() : 0);
+ KN<int> INTdispls(mpirankv == root.who ? sendcnts.N() : 0);
+ for(int ii=0; ii< INTsendcnts.N(); ii++){
+ INTsendcnts[ii]= sendcnts[ii];
+ INTdispls[ii]= displs[ii];
+ }
+
+ return MPI_Scatterv( (void *) (R*) s, INTsendcnts, INTdispls, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, r.N(), MPI_TYPE<R>::TYPE(),root.who,root.comm);
+}
+
+// fin J. Morice
+
+template<class R>
+struct Op_ReduceMat : public quad_function<Matrice_Creuse<R>*,Matrice_Creuse<R> *,MPIrank,fMPI_Op,long> {
+ static long f(Stack, Matrice_Creuse<R>* const & s,Matrice_Creuse<R>* const &r, MPIrank const & root, fMPI_Op const &op)
+ {
+ ffassert( r && s);
+ MatriceCreuse<R> * sA=s->A;
+ MatriceCreuse<R> * rA=r->A;
+ ffassert( sA && rA);
+ MatriceMorse<R> & sM = *dynamic_cast<MatriceMorse<R>* > (sA);
+ MatriceMorse<R> & rM = *dynamic_cast<MatriceMorse<R>* > (rA);
+ ffassert( &sM && &rM);
+ int chunk = sM.nbcoef;
+ ffassert(chunk==rM.nbcoef);
+
+ return MPI_Reduce( (void *) sM.a,(void *) rM.a, chunk , MPI_TYPE<R>::TYPE(),op,root.who,root.comm);
+ }
+};
+template<class R>
+struct Op_AllReduceMat : public quad_function<Matrice_Creuse<R>*,Matrice_Creuse<R> *,fMPI_Comm,fMPI_Op,long> {
+ static long f(Stack, Matrice_Creuse<R>* const & s,Matrice_Creuse<R>* const &r, fMPI_Comm const & comm, fMPI_Op const &op)
+ {
+ ffassert( r && s);
+ MatriceCreuse<R> * sA=s->A;
+ MatriceCreuse<R> * rA=r->A;
+ ffassert( &sA );
+
+ MatriceMorse<R> & sM = *dynamic_cast<MatriceMorse<R>* > (sA);
+ ffassert( &sM );
+ if( ! rA ) { // build a zero matric copy of sM
+ MatriceMorse<R> *rm=new MatriceMorse<R>(sM.n,sM.m,sM.nbcoef,sM.symetrique,0,sM.lg,sM.cl);
+ *rm=R(); // set the matrix to Zero ..
+ r->A.master(rm);
+ rA=r->A;
+
+ }
+ ffassert( sA && rA);
+
+ MatriceMorse<R> & rM = *dynamic_cast<MatriceMorse<R>* > (rA);
+
+ ffassert( &sM && &rM);
+ int chunk = sM.nbcoef;
+ ffassert(chunk==rM.nbcoef);
+
+ return MPI_Allreduce( (void *) sM.a,(void *) rM.a, chunk , MPI_TYPE<R>::TYPE(),op,comm);
+ }
+};
+
+
+
+template<class R>
+struct Op_Reduce : public quad_function<KN_<R>,KN_<R>,MPIrank,fMPI_Op,long> {
+ static long f(Stack, KN_<R> const & s, KN_<R> const &r, MPIrank const & root, fMPI_Op const &op)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int chunk = s.N();
+ ffassert(chunk==r.N());
+
+ return MPI_Reduce( (void *) (R*) s,(void *) (R*) r, chunk , MPI_TYPE<R>::TYPE(),op,root.who,root.comm);
+ }
+};
+
+template<class R>
+struct Op_AllReduce : public quad_function<KN_<R>,KN_<R>,fMPI_Comm,fMPI_Op,long> {
+ static long f(Stack, KN_<R> const & s, KN_<R> const &r, fMPI_Comm const & comm,fMPI_Op const &op)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int chunk = s.N();
+ ffassert(chunk==r.N());
+ return MPI_Allreduce( (void *) (R*) s,(void *) (R*) r, chunk , MPI_TYPE<R>::TYPE(),op,comm);
+ }
+};
+
+template<class R>
+struct Op_AllReduce1 : public quad_function<R *,R *,fMPI_Comm,fMPI_Op,long> {
+ static long f(Stack, R * const & s, R * const &r, fMPI_Comm const & comm,fMPI_Op const &op)
+ {
+ int chunk = 1;
+ return MPI_Allreduce( (void *) (R*) s,(void *) (R*) r, 1 , MPI_TYPE<R>::TYPE(),op,comm);
+ }
+};
+/*
+template<class R>
+struct Op_Reducescatter : public quad_function<KN_<R>,KN_<R>,fMPI_Comm,fMPI_Op,long> {
+ static long f(Stack, KN_<R> const & s, KN_<R> const &r, fMPI_Comm const & comm,fMPI_Op const &op)
+ {
+ int chunk = s.N();
+ ffassert(chunk==r.N());
+ // chunk est un tableau ????
+ MPI_Op oop = reinterpret_cast<MPI_Op> (op);
+ return MPI_Reduce_scatter( (void *) (R*) s,(void *) (R*) r, chunk , MPI_TYPE<R>::TYPE(),op,comm);
+ }
+};*/
+
+template<class R>
+struct Op_Reduce1 : public quad_function<R*,R*,MPIrank,fMPI_Op,long> {
+ static long f(Stack, R* const & s, R* const &r, MPIrank const & root, fMPI_Op const &op)
+ {
+ int chunk = 1;
+ return MPI_Reduce( (void *) (R*) s,(void *) (R*) r, chunk , MPI_TYPE<R>::TYPE(),op,root.who,root.comm);
+ }
+};
+
+// Add J. Morice
+template<class R>
+struct Op_Gather1 : public ternary_function<R*,KN_<R>,MPIrank,long> {
+ static long f(Stack, R* const & s, KN_<R> const &r, MPIrank const & root)
+ {
+
+ int mpisizew,myrank;
+ MPI_Comm_size(root.comm, &mpisizew);
+ MPI_Comm_rank( root.comm, &myrank) ;
+ int chunk = 1;
+ // ffassert( (myrank != root.who) || (r.N()>=mpisizew*chunk) );
+
+ return MPI_Gather( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(),root.who,root.comm);
+ }
+};
+
+// Fin Add J. Morice
+
+
+template<class R>
+struct Op_Gather3 : public ternary_function<KN_<R>,KN_<R>,MPIrank,long> {
+ static long f(Stack, KN_<R> const & s, KN_<R> const &r, MPIrank const & root)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+ int mpisizew,myrank;
+ MPI_Comm_size(root.comm, &mpisizew);
+ MPI_Comm_rank(root.comm, &myrank) ;
+
+ int chunk = s.N();
+ // cout << myrank << " " << root.who << " " << r.N() << " "<< s.N() << " " << chunk << " " << mpisizew << endl;
+ //ffassert( (myrank != root.who) || (r.N()==mpisizew*chunk) );
+
+ return MPI_Gather( (void *) (R*) s, chunk, MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, chunk, MPI_TYPE<R>::TYPE(),root.who,root.comm);
+ }
+};
+
+// Add by J. Morice
+
+template<class R>
+//struct Op_Gatherv3 : public penta_function<KN_<R>,KN_<R>, MPIrank, KN_<long>, KN_<long>, long> {
+long Op_Gatherv3(KN_<R> const & s, KN_<R> const &r, MPIrank const & root, KN_<long> const & recvcount, KN_<long> const & displs)
+{
+
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int mpirankw;
+ MPI_Comm_rank(root.comm, &mpirankw);
+ int mpisizew;
+ MPI_Comm_size(root.comm, &mpisizew);
+ KN<int> INTrecvcount(mpirankw == root.who ? recvcount.N() : 0);
+ KN<int> INTdispls(mpirankw == root.who ? recvcount.N() : 0);
+ for(int ii=0; ii< INTrecvcount.N(); ii++){
+ INTrecvcount[ii]= recvcount[ii];
+ INTdispls[ii]= displs[ii];
+ }
+
+ return MPI_Gatherv( (void *) (R*) s, s.N(), MPI_TYPE<R>::TYPE(),
+ (void *) (R*) r, INTrecvcount, INTdispls,MPI_TYPE<R>::TYPE(),root.who,root.comm);
+}
+
+// Fin Add J. Morice
+
+
+// Add J. Morice communications entre processeurs complex
+
+template<>
+struct Op_All2All<Complex> : public binary_function<KN_<Complex>,KN_<Complex>,long> {
+ static long f( KN_<Complex> const & s, KN_<Complex> const &r)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = s.N()/mpisizew;
+ ffassert(s.N()==mpisizew*chunk && r.N()==s.N());
+
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Alltoall( (void *) (Complex*) s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*) r, chunk, MPI_DOUBLE_COMPLEX, comm);
+#else
+ chunk*=2;
+ return MPI_Alltoall( reinterpret_cast<void*> ( (Complex*) s), chunk, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), chunk, MPI_DOUBLE, comm);
+#endif
+ }
+};
+
+template<>
+struct Op_Allgather1<Complex> : public binary_function<Complex *,KN_<Complex>,long> {
+ static long f( Complex * const & s, KN_<Complex> const &r)
+ {
+ CheckContigueKN(r);
+
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = 1;
+ ffassert( r.N()== mpisizew);
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Allgather( (void *) (Complex*) s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*) r, chunk, MPI_DOUBLE_COMPLEX, comm);
+#else
+ chunk*=2;
+ return MPI_Allgather( reinterpret_cast<void*> ( (Complex*) s), chunk, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), chunk, MPI_DOUBLE, comm);
+#endif
+ }
+};
+
+
+template<>
+struct Op_Allgather<Complex> : public binary_function<KN_<Complex>,KN_<Complex>,long> {
+ static long f( KN_<Complex> const & s, KN_<Complex> const &r)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = r.N()/mpisizew;
+ ffassert( r.N()==chunk*mpisizew && chunk==s.N() );
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Allgather( (void *) (Complex*) s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*) r, chunk, MPI_DOUBLE_COMPLEX, comm);
+#else
+ chunk*=2;
+ return MPI_Allgather( reinterpret_cast<void*> ( (Complex*) s), chunk, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), chunk, MPI_DOUBLE, comm);
+#endif
+ }
+};
+
+template<>
+struct Op_All2All3<Complex> : public ternary_function<KN_<Complex>,KN_<Complex>,fMPI_Comm,long> {
+ static long f(Stack, KN_<Complex> const & s, KN_<Complex> const &r,fMPI_Comm const & cmm )
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=cmm;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = s.N()/mpisizew;
+ ffassert(s.N()==mpisizew*chunk && r.N()==s.N());
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Alltoall( (void *) (Complex*) s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*) r, chunk, MPI_DOUBLE_COMPLEX, comm);
+#else
+ chunk*=2;
+ return MPI_Alltoall( (void *) (Complex*) s, chunk, MPI_DOUBLE,
+ (void *) (Complex*) (r), chunk, MPI_DOUBLE, comm);
+#endif
+ }
+};
+
+template<>
+struct Op_Allgather3<Complex> : public ternary_function<KN_<Complex>,KN_<Complex>,fMPI_Comm,long> {
+ static long f(Stack, KN_<Complex> const & s, KN_<Complex> const &r,fMPI_Comm const & cmm)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=cmm;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = r.N()/mpisizew; // bug corrected by J. Morice
+ //ffassert(s.N()==mpisizew*chunk && r.N()==s.N());
+ ffassert(s.N()==chunk && r.N()==s.N()*mpisizew);
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Allgather( (void *) (Complex*) s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*) r, chunk, MPI_DOUBLE_COMPLEX, comm);
+#else
+ chunk*=2;
+ return MPI_Allgather( (void *) (Complex*) (s), chunk, MPI_DOUBLE,
+ (void *) (Complex*) (r), chunk, MPI_DOUBLE, comm);
+#endif
+ }
+};
+
+template<>
+struct Op_Allgather13<Complex> : public ternary_function<Complex *,KN_<Complex>,fMPI_Comm,long> {
+ static long f(Stack, Complex * const & s, KN_<Complex> const &r,fMPI_Comm const & cmm)
+ {
+ CheckContigueKN(r);
+
+
+ MPI_Comm comm=cmm;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ int chunk = 1;
+ ffassert( r.N()==mpisizew);
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Allgather( (void *) (Complex*) s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*) r, chunk, MPI_DOUBLE_COMPLEX, comm);
+#else
+ chunk*=2;
+ return MPI_Allgather((void *) (Complex*)(s), chunk, MPI_DOUBLE,
+ (void *) (Complex*) (r), chunk, MPI_DOUBLE, comm);
+#endif
+ }
+};
+
+
+template<>
+long Op_All2Allv<Complex>( KN_<Complex> const & s, KN_<Complex> const &r, KN_<long> const &sendcnts, KN_<long> const &sdispls, KN_<long> const &recvcnts, KN_<long> const &rdispls)
+{
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpirankv=MPI_UNDEFINED;
+ MPI_Comm_rank(comm, &mpirankv);
+
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ ffassert( sendcnts.N() == sdispls.N() && sendcnts.N() == recvcnts.N() && sendcnts.N() == rdispls.N() && sendcnts.N() == mpisizew );
+
+ KN<int> INTsendcnts(sendcnts.N());
+ KN<int> INTsdispls(sdispls.N());
+ KN<int> INTrecvcnts(recvcnts.N());
+ KN<int> INTrdispls(rdispls.N());
+
+
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ for(int ii=0; ii< sendcnts.N(); ii++){
+ INTsendcnts[ii] = sendcnts[ii];
+ INTsdispls[ii] = sdispls[ii];
+ INTrecvcnts[ii] = recvcnts[ii];
+ INTrdispls[ii] = rdispls[ii];
+ }
+ return MPI_Alltoallv( (void *) (Complex*) s, INTsendcnts, INTsdispls, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*) r, INTrecvcnts, INTrdispls, MPI_DOUBLE_COMPLEX, comm);
+#else
+ for(int ii=0; ii< sendcnts.N(); ii++){
+ INTsendcnts[ii] = 2*sendcnts[ii];
+ INTsdispls[ii] = 2*sdispls[ii];
+ INTrecvcnts[ii] = 2*recvcnts[ii];
+ INTrdispls[ii] = 2*rdispls[ii];
+ }
+ return MPI_Alltoallv( reinterpret_cast<void*> ( (Complex*) s), INTsendcnts, INTsdispls, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), INTrecvcnts, INTrdispls, MPI_DOUBLE, comm);
+#endif
+}
+
+
+
+template<>
+struct Op_Allgatherv<Complex> : public quad_function<KN_<Complex>,KN_<Complex>,KN_<long>,KN_<long>,long> {
+ static long f( Stack ,KN_<Complex> const & s, KN_<Complex> const &r, KN_<long> const & recvcount, KN_<long> const & displs)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=MPI_COMM_WORLD;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew);
+ ffassert( recvcount.N() == displs.N() && recvcount.N() == mpisizew);
+ long sum=0;
+ for(int ii=0; ii< recvcount.N(); ii++)
+ sum+=recvcount[ii];
+ ffassert( sum == r.N() );
+
+
+ KN<int> INTrecvcount(recvcount.N());
+ KN<int> INTdispls(displs.N());
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ for(int ii=0; ii< recvcount.N(); ii++){
+ INTrecvcount[ii]= recvcount[ii];
+ INTdispls[ii]= displs[ii];
+ }
+ return MPI_Allgatherv( (void *) (Complex*)s, s.N(), MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*)r, INTrecvcount, INTdispls,MPI_DOUBLE_COMPLEX, comm);
+#else
+ for(int ii=0; ii< recvcount.N(); ii++){
+ INTrecvcount[ii]= 2*recvcount[ii];
+ INTdispls[ii]= 2*displs[ii];
+ }
+ return MPI_Allgatherv( reinterpret_cast<void*> ( (Complex*) s), 2*s.N(), MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), INTrecvcount, INTdispls,MPI_DOUBLE, comm);
+#endif
+ }
+};
+
+template<>
+long Op_All2All3v<Complex>(KN_<Complex> const & s, KN_<Complex> const &r,fMPI_Comm const & cmm, KN_<long> const &sendcnts, KN_<long> const &sdispls, KN_<long> const &recvcnts, KN_<long> const &rdispls )
+{
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=cmm;
+ int mpirankv=MPI_UNDEFINED;
+ MPI_Comm_rank(comm, &mpirankv);
+
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew); /* local */
+ ffassert( sendcnts.N() == sdispls.N() && sendcnts.N() == recvcnts.N() && sendcnts.N() == rdispls.N() && sendcnts.N() == mpisizew );
+
+ //ffassert(s.N()==sendcnts[mpirankv] && r.N()==recvbuf[mpirankv]);
+
+ KN<int> INTsendcnts(sendcnts.N());
+ KN<int> INTsdispls(sdispls.N());
+ KN<int> INTrecvcnts(recvcnts.N());
+ KN<int> INTrdispls(rdispls.N());
+
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ for(int ii=0; ii< sendcnts.N(); ii++){
+ INTsendcnts[ii] = sendcnts[ii];
+ INTsdispls[ii] = sdispls[ii];
+ INTrecvcnts[ii] = recvcnts[ii];
+ INTrdispls[ii] = rdispls[ii];
+ }
+
+ return MPI_Alltoallv( (void *) (Complex*)s, INTsendcnts, INTsdispls, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*)r, INTrecvcnts, INTrdispls, MPI_DOUBLE_COMPLEX, comm);
+#else
+ for(int ii=0; ii< sendcnts.N(); ii++){
+ INTsendcnts[ii] = 2*sendcnts[ii];
+ INTsdispls[ii] = 2*sdispls[ii];
+ INTrecvcnts[ii] = 2*recvcnts[ii];
+ INTrdispls[ii] = 2*rdispls[ii];
+ }
+
+ return MPI_Alltoallv( reinterpret_cast<void*> ( (Complex*) s), INTsendcnts, INTsdispls, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), INTrecvcnts, INTrdispls, MPI_DOUBLE, comm);
+#endif
+}
+
+
+template<>
+long Op_Allgatherv3<Complex>(KN_<Complex> const & s, KN_<Complex> const &r,fMPI_Comm const & cmm, KN_<long> const & recvcount, KN_<long> const & displs)
+{
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ MPI_Comm comm=cmm;
+ int mpisizew;
+ MPI_Comm_size(comm, &mpisizew);
+ ffassert( recvcount.N() == displs.N() && recvcount.N() == mpisizew);
+ long sum=0;
+ for(int ii=0; ii< recvcount.N(); ii++)
+ sum+=recvcount[ii];
+ ffassert( sum == r.N() );
+ KN<int> INTrecvcount(recvcount.N());
+ KN<int> INTdispls(displs.N());
+
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ for(int ii=0; ii< recvcount.N(); ii++){
+ INTrecvcount[ii]= recvcount[ii];
+ INTdispls[ii]= displs[ii];
+ }
+
+ return MPI_Allgatherv( (void *) (Complex*)s, s.N(), MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*)r, INTrecvcount, INTdispls,MPI_DOUBLE_COMPLEX, comm);
+
+#else
+ for(int ii=0; ii< recvcount.N(); ii++){
+ INTrecvcount[ii]= 2*recvcount[ii];
+ INTdispls[ii]= 2*displs[ii];
+ }
+
+ return MPI_Allgatherv( reinterpret_cast<void*> ( (Complex*) s), 2*s.N(), MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), INTrecvcount, INTdispls,MPI_DOUBLE, comm);
+#endif
+
+}
+
+template<>
+struct Op_Scatter1<Complex> : public ternary_function<KN_<Complex>,Complex *,MPIrank,long> {
+ static long f(Stack, KN_<Complex> const & s, Complex * const &r, MPIrank const & root)
+ {
+
+ CheckContigueKN(s);
+
+ int mpisizew;
+ MPI_Comm_size(root.comm, &mpisizew);
+ int chunk = 1;
+ // ffassert(s.N()==mpisizew*chunk ); fait dans mpi
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Scatter( (void *) (Complex*)s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*)r, chunk, MPI_DOUBLE_COMPLEX,root.who,root.comm);
+#else
+ chunk*=2;
+ return MPI_Scatter( reinterpret_cast<void*> ( (Complex*) s), chunk, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), chunk, MPI_DOUBLE,root.who,root.comm);
+#endif
+ }
+};
+
+
+template<>
+struct Op_Scatter3<Complex> : public ternary_function<KN_<Complex>,KN_<Complex>,MPIrank,long> {
+ static long f(Stack, KN_<Complex> const & s, KN_<Complex> const &r, MPIrank const & root)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int mpisizew;
+ MPI_Comm_size(root.comm, &mpisizew);
+ int chunk = r.N();// correct 2012 FH
+ // ffassert(s.N()==mpisizew*chunk && r.N()==chunk);
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Scatter( (void *) (Complex*)s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*)r, chunk, MPI_DOUBLE_COMPLEX,root.who,root.comm);
+#else
+ chunk*=2;
+ return MPI_Scatter( reinterpret_cast<void*> ( (Complex*) s), chunk, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), chunk, MPI_DOUBLE,root.who,root.comm);
+#endif
+ }
+};
+
+template<>
+long Op_Scatterv3<Complex>( KN_<Complex> const & s, KN_<Complex> const &r, MPIrank const & root, KN_<long> const &sendcnts, KN_<long> const &displs)
+{
+
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int mpirankv=MPI_UNDEFINED;
+ if(root.comm != MPI_COMM_NULL)
+ MPI_Comm_rank(root.comm, &mpirankv);
+
+ int mpisizew;
+ MPI_Comm_size(root.comm, &mpisizew); /* local */
+ // ffassert( sendcnts.N() == displs.N() && sendcnts.N() == mpisizew );
+ // size control
+ // ffassert( r.N() == sendcnts[mpirankv] );
+ long sumsize=0;
+ for(int ii=0; ii<sendcnts.N(); ii++){
+ sumsize += sendcnts[ii];
+ }
+ //ffassert( s.N() == sumsize );
+
+ KN<int> INTsendcnts(sendcnts.N());
+ KN<int> INTdispls(displs.N());
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ for(int ii=0; ii< sendcnts.N(); ii++){
+ INTsendcnts[ii]= sendcnts[ii];
+ INTdispls[ii]= displs[ii];
+ }
+
+ return MPI_Scatterv( (void *) (Complex*)s, INTsendcnts, INTdispls, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*)r, r.N(), MPI_DOUBLE_COMPLEX,root.who,root.comm);
+#else
+ for(int ii=0; ii< sendcnts.N(); ii++){
+ INTsendcnts[ii]= 2*sendcnts[ii];
+ INTdispls[ii]= 2*displs[ii];
+ }
+
+ return MPI_Scatterv( reinterpret_cast<void*> ( (Complex*) s), INTsendcnts, INTdispls, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), 2*r.N(), MPI_DOUBLE,root.who,root.comm);
+#endif
+
+}
+
+
+template<>
+struct Op_Reduce<Complex> : public quad_function<KN_<Complex>,KN_<Complex>,MPIrank,fMPI_Op,long> {
+ static long f(Stack, KN_<Complex> const & s, KN_<Complex> const &r, MPIrank const & root, fMPI_Op const &op)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int chunk = s.N();
+ ffassert(chunk==r.N());
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Reduce( (void *) (Complex*)s,(void *) (Complex*)r, chunk , MPI_DOUBLE_COMPLEX,op,root.who,root.comm);
+#else
+ chunk*=2;
+ return MPI_Reduce( reinterpret_cast<void*> ( (Complex*) s), reinterpret_cast<void*> ( (Complex*) r), chunk , MPI_DOUBLE,op,root.who,root.comm);
+#endif
+ }
+};
+
+template<>
+struct Op_AllReduce<Complex> : public quad_function<KN_<Complex>,KN_<Complex>,fMPI_Comm,fMPI_Op,long> {
+ static long f(Stack, KN_<Complex> const & s, KN_<Complex> const &r, fMPI_Comm const & comm,fMPI_Op const &op)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int chunk = s.N();
+ ffassert(chunk==r.N());
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ return MPI_Allreduce( (void *) (Complex*)s,(void *) (Complex*)r, chunk , MPI_DOUBLE_COMPLEX,op,comm);
+#else
+ chunk *=2;
+ return MPI_Allreduce( reinterpret_cast<void*> ( (Complex*) s), reinterpret_cast<void*> ( (Complex*) r), chunk , MPI_DOUBLE,op,comm);
+#endif
+ }
+};
+// /*
+// template<>
+// struct Op_Reducescatter : public quad_function<KN_<Complex>,KN_<Complex>,fMPI_Comm,fMPI_Op,long> {
+// static long f(Stack, KN_<Complex> const & s, KN_<Complex> const &r, fMPI_Comm const & comm,fMPI_Op const &op)
+// {
+// int chunk = s.N();
+// ffassert(chunk==r.N());
+// // chunk est un tableau ????
+// MPI_Op oop = reinterpret_cast<MPI_Op> (op);
+// return MPI_Reduce_scatter( (void *) (Complex*)s,(void *) (Complex*)r, chunk , MPI_DOUBLE_COMPLEX,op,comm);
+// }
+// };*/
+
+template<>
+struct Op_Reduce1<Complex> : public quad_function<Complex*,Complex*,MPIrank,fMPI_Op,long> {
+ static long f(Stack, Complex* const & s, Complex* const &r, MPIrank const & root, fMPI_Op const &op)
+ {
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ int chunk = 1;
+ return MPI_Reduce( (void *) s, (void *) r, chunk , MPI_DOUBLE_COMPLEX,op,root.who,root.comm);
+#else
+ int chunk = 2;
+ return MPI_Reduce( reinterpret_cast<void*> ( (Complex*) s), reinterpret_cast<void*> ( (Complex*) r), chunk , MPI_DOUBLE,op,root.who,root.comm);
+#endif
+ }
+};
+
+// Add J. Morice
+template<>
+struct Op_Gather1<Complex> : public ternary_function<Complex* ,KN_<Complex>,MPIrank,long> {
+ static long f(Stack, Complex * const & s, KN_<Complex> const &r, MPIrank const & root)
+ {
+
+ CheckContigueKN(r);
+
+
+ int mpisizew,myrank;
+ MPI_Comm_size(root.comm, &mpisizew);
+ MPI_Comm_rank( root.comm, &myrank) ;
+
+ int chunk = 1;
+ // ffassert( (myrank != root.who) || (r.N()>=mpisizew*chunk) );
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+
+ return MPI_Gather( (void *) (Complex*) s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*) r, chunk, MPI_DOUBLE_COMPLEX, root.who, root.comm);
+#else
+ chunk = 2;
+ return MPI_Gather( reinterpret_cast<void*> ( (Complex*) s), chunk, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), chunk, MPI_DOUBLE, root.who, root.comm);
+#endif
+ }
+};
+
+// Fin Add J. Morice
+
+
+template<>
+struct Op_Gather3<Complex> : public ternary_function<KN_<Complex>,KN_<Complex>,MPIrank,long> {
+ static long f(Stack, KN_<Complex> const & s, KN_<Complex> const &r, MPIrank const & root)
+ {
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int mpisizew,myrank;
+ MPI_Comm_size(root.comm, &mpisizew);
+ MPI_Comm_rank( root.comm, &myrank) ;
+
+ int chunk = s.N();
+ // ffassert( (myrank != root.who) || (r.N()>=mpisizew*chunk) );
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+
+ return MPI_Gather( (void *) (Complex*)s, chunk, MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*)r, chunk, MPI_DOUBLE_COMPLEX,root.who,root.comm);
+#else
+ chunk *= 2;
+ return MPI_Gather( reinterpret_cast<void*> ( (Complex*) s), chunk, MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), chunk, MPI_DOUBLE,root.who,root.comm);
+#endif
+ }
+};
+
+
+template<>
+//struct Op_Gatherv3 : public penta_function<KN_<Complex>,KN_<Complex>, MPIrank, KN_<long>, KN_<long>, long> {
+long Op_Gatherv3<Complex>(KN_<Complex> const & s, KN_<Complex> const &r, MPIrank const & root, KN_<long> const & recvcount, KN_<long> const & displs)
+{
+ CheckContigueKN(r);
+ CheckContigueKN(s);
+
+ int mpirankw;
+ MPI_Comm_rank(root.comm, &mpirankw);
+ int mpisizew;
+ MPI_Comm_size(root.comm, &mpisizew);
+ //ffassert((mpirankw != root.who) || ( recvcount.N() == displs.N() && recvcount.N() == mpisizew));
+
+ if( mpirankw == root.who){
+ long sum=0;
+ for(int ii=0; ii< recvcount.N(); ii++)
+ sum+=recvcount[ii];
+ ffassert( sum == r.N() );
+ }
+ KN<int> INTrecvcount(recvcount.N());
+ KN<int> INTdispls(displs.N());
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ for(int ii=0; ii< recvcount.N(); ii++){
+ INTrecvcount[ii]= recvcount[ii];
+ INTdispls[ii]= displs[ii];
+ }
+ return MPI_Gatherv( (void *) (Complex*)s, s.N(), MPI_DOUBLE_COMPLEX,
+ (void *) (Complex*)r, INTrecvcount, INTdispls,MPI_DOUBLE_COMPLEX,root.who,root.comm);
+#else
+ for(int ii=0; ii< recvcount.N(); ii++){
+ INTrecvcount[ii]= 2*recvcount[ii];
+ INTdispls[ii]= 2*displs[ii];
+ }
+ return MPI_Gatherv( reinterpret_cast<void*> ( (Complex*) s), 2*s.N(), MPI_DOUBLE,
+ reinterpret_cast<void*> ( (Complex*) r), INTrecvcount, INTdispls,MPI_DOUBLE,root.who,root.comm);
+#endif
+}
+
+// Fin Add J. Morice communication entre complexe
+
+MPIrank mpiwho(long i) { return MPIrank(i);}
+MPIrank mpiwho(long i,fMPI_Comm comm) { return MPIrank(i,comm,Syncro_block);}
+MPIrank mpiwho(fMPI_Comm comm,long i) { return MPIrank(i,comm,Syncro_block);}
+MPIrank mpiwhob(long i) { return MPIrank(i);}
+MPIrank mpiwhob(long i,fMPI_Comm comm) { return MPIrank(i,comm,Syncro_block);}
+
+MPIrank mpiwho_(const long &i,const fMPI_Comm &comm,fMPI_Request * const &rq) { return MPIrank(i,comm,*rq);}
+MPIrank mpiwho_(const long &i,fMPI_Request * const &rq) { return MPIrank(i, MPI_COMM_WORLD ,*rq);}
+
+long mpiWait(fMPI_Request * frq) {
+ MPI_Request * rq= *frq;
+ MPI_Status status;
+ long res=MPI_SUCCESS;
+ while(rq && *rq!=MPI_REQUEST_NULL)
+ {
+ res = MPI_Wait(rq,&status);
+ DoOnWaitMPIRequest(rq);
+ }
+ return res;
+
+}
+
+long mpiBarrier(fMPI_Comm * comm)
+{
+ return MPI_Barrier(*comm);
+}
+
+
+
+long mpiWaitAny(KN<MPI_Request>* rq)
+{
+ MPI_Status status;
+ int index;
+ //cout << "mpiWaitAny " <<rq->N() << " in " << endl ;
+ do {
+ MPI_Waitany(rq->N(),*rq,&index,&status);
+ DoOnWaitMPIRequest(&(*rq)[index]);
+ } while( (MPI_UNDEFINED!= index) && ((*rq)[index]!=MPI_REQUEST_NULL));
+
+ //cout << "mpiWaitAny " <<rq->N() << " out " << index << endl ;
+ return index;
+}
+
+MPIrank * set_copympi( MPIrank* const & a,const MPIrank & b){ *a=b;return a;}
+
+
+long mpiSize(fMPI_Comm cmm) {
+ int s=0;
+ // fMPI_Comm_rank(MPI_COMM_WORLD, &s); /* local */
+ if(cmm != (MPI_Comm) MPI_COMM_NULL)
+ MPI_Comm_size(cmm, &s); /* local */
+ return s;
+}
+long mpiRank(fMPI_Comm cmm) {
+ int s=MPI_UNDEFINED;
+ if(cmm != (MPI_Comm)MPI_COMM_NULL)
+ MPI_Comm_rank(cmm, &s); /* local */
+ // MPI_Comm_size(MPI_COMM_WORLD, &s); /* local */
+ return s;
+}
+
+AnyType InitializeGroup(Stack stack,const AnyType &x){
+ MPI_Group *g=*PGetAny<fMPI_Group>(x);
+ *g=MPI_GROUP_NULL;
+ MPI_Comm_group(MPI_COMM_WORLD, g);
+ return g;
+}
+AnyType DeleteGroup(Stack stack,const AnyType &x){
+ MPI_Group *g=*PGetAny<fMPI_Group>(x);
+ if(g && (*g != MPI_GROUP_NULL))MPI_Group_free(g);
+ return Nothing;
+}
+AnyType InitializeComm(Stack stack,const AnyType &x){
+ MPI_Comm *comm= *PGetAny<fMPI_Comm>(x);
+ *comm=MPI_COMM_NULL;
+ MPI_Comm_dup(MPI_COMM_WORLD, comm);
+ return comm;
+}
+AnyType DeleteComm(Stack stack,const AnyType &x){
+ MPI_Comm *comm= *PGetAny<fMPI_Comm>(x);
+ if(comm && (*comm != MPI_COMM_NULL && *comm != MPI_COMM_WORLD))// add MPI_COMM_WORLD FH 11/2010 FH
+ MPI_Comm_free(comm);
+ return Nothing;
+}
+AnyType InitializeRequest(Stack stack,const AnyType &x){
+ MPI_Request *comm=*PGetAny<fMPI_Request>(x);
+ *comm=MPI_REQUEST_NULL;
+
+ return comm;
+}
+AnyType DeleteRequest(Stack stack,const AnyType &x){
+ MPI_Request *comm=*PGetAny<fMPI_Request>(x);
+ if(comm && ( *comm!=MPI_REQUEST_NULL )) MPI_Request_free(comm);
+ return Nothing;
+}
+// Hack to Bypass a bug in freefem FH ...
+template<>
+class ForEachType<MPI_Group>: public basicForEachType{public:// correction july 2009..... FH Hoooo.... (Il y a un bug DUR DUR FH ...)
+ ForEachType(Function1 iv=0,Function1 id=0,Function1 OOnReturn=0):basicForEachType(typeid(MPI_Group),sizeof(MPI_Group),0,0,iv,id,OOnReturn) { }
+};
+
+template<>
+class ForEachType<fMPI_Comm>: public basicForEachType{public:// coorection july 2009..... FH Hoooo.... (Il y a un bug DUR DUR FH ...)
+ ForEachType(Function1 iv=0,Function1 id=0,Function1 OOnReturn=0):basicForEachType(typeid(fMPI_Comm),sizeof(fMPI_Comm),0,0,iv,id,OOnReturn) {}
+};
+
+template<>
+class ForEachType<fMPI_Request>: public basicForEachType{public:// correction july 2009..... FH Hoooo.... (Il y a un bug DUR DUR FH ...)
+ ForEachType(Function1 iv=0,Function1 id=0,Function1 OOnReturn=0):basicForEachType(typeid(fMPI_Request),sizeof(fMPI_Request),0,0,iv,id,OOnReturn) {}
+};
+// end Hack ...
+
+
+fMPI_Group* def_group( fMPI_Group* const & a,fMPI_Comm * const &comm, KN_<long> const & b)
+{
+ MPI_Group group;
+ MPI_Comm_group(*comm,& group);
+ KN<int> ranks(b);
+ MPI_Group_incl(group, ranks.N(),(int *) ranks, *a);
+ MPI_Group_free(&group) ;
+ // ici def a ..
+ // ffassert(0); // A AFAIRE // pour arete le programm
+ return a;}
+
+fMPI_Group* def_group( fMPI_Group* const & a, KN_<long> const & b)
+{
+ MPI_Group group;
+ MPI_Comm comm=MPI_COMM_WORLD;
+ MPI_Comm_group(comm,& group);
+ KN<int> ranks(b);
+ MPI_Group_incl(group, ranks.N(),(int *) ranks, *a);
+ MPI_Group_free(&group) ;
+ // ici def a ..
+ // ffassert(0); // A AFAIRE // pour arete le programm
+return a;}
+
+fMPI_Group* def_group( fMPI_Group* const & a,fMPI_Comm * const &comm)
+{
+ MPI_Comm_group(*comm,*a);
+ return a;}
+
+fMPI_Comm* def_comm( fMPI_Comm* const & a,fMPI_Group* const & g)
+{
+ int ok=MPI_Comm_create(MPI_COMM_WORLD,*g,*a);
+ return a;
+}
+
+fMPI_Comm* def_comm( fMPI_Comm* const & a,fMPI_Comm* const & b,fMPI_Group* const & g)
+{
+ MPI_Comm_create(*b,*g,*a);
+ return a;
+}
+
+fMPI_Group* def_group( fMPI_Group* const & a,fMPI_Group * const & group,KN_<long> const & b)
+{
+
+ KN<int> ranks(b);
+ MPI_Group_incl(*group, ranks.N(), (int *) ranks, *a);
+ // ici def a ..
+ // ffassert(0); // A AFAIRE // pour arete le programm
+ return a;
+}
+
+struct Def_def_Commsplit : public quad_function<fMPI_Comm*,fMPI_Comm*,long,long, fMPI_Comm*>
+{
+ static fMPI_Comm * f(Stack,fMPI_Comm* const & a,fMPI_Comm* const & comm,const long &color ,const long &key )
+ {
+ MPI_Comm_split(*comm,color, key, *a);
+ return a;
+ }
+};
+
+fMPI_Comm * mpiCommsplit(fMPI_Comm* const & a,const MPIrank &p1,const long &key )
+{
+ MPI_Comm_split(p1.comm, p1.who, key, *a);
+ return a;
+}
+
+
+
+
+struct Def_def_Intercommcreate : public quad_function<fMPI_Comm*,MPIrank,MPIrank,long, fMPI_Comm*>
+{
+static fMPI_Comm * f(Stack,fMPI_Comm* const & a, MPIrank const & p1, MPIrank const & p2, long const & tag )
+{
+ int err;
+ err=MPI_Intercomm_create(p1.comm, p1.who, p2.comm,p2.who,tag, *a);
+ return a;
+}
+};
+
+fMPI_Comm * def_intercommmerge(fMPI_Comm* const & a,fMPI_Comm* const & b, const long & high)
+{
+ MPI_Intercomm_merge(*b, high, *a);
+ return a;
+}
+
+
+template<typename K,typename KK>
+AnyType ClearReturnpKK(Stack stack, const AnyType & a)
+{
+ // a ne faire que pour les variables local au return...
+ // pour l'instant on copie pour fqire mqrche
+ // a repense FH mqi 2009....
+ KK * m = GetAny<KK * >(a);
+ // KN<K> *cm=new KN<K>(true, *m); bug quant KN est une variable global
+ // KN<K> *cm=new KN<K>( *m); // on duplique le tableau comme en C++ (dur dur ?????? FH)
+ m->increment();
+ Add2StackOfPtr2FreeRC(stack,m);
+ if(verbosity>400)
+ cout << "ClearReturnpKK:: increment + Add2StackOfPtr2FreeRC nb ref " << -m->next << endl;
+ return m;
+}
+
+template<typename K,typename KK,typename KK_>
+AnyType ClearReturnpKK_(Stack stack, const AnyType & a)
+{
+ // il faut faire un copie du tableau
+ KK_ * m = GetAny<KK_ * >(a);
+ KK *cm=new KK(*m);
+
+ Add2StackOfPtr2Free(stack,cm);// detruire la copie
+ if(verbosity>400)
+ cout << "ClearReturnpKK_:: copie Add2StackOfPtr2Free " << endl;
+ return (KK_ *) cm;
+}
+template<typename K,typename KK,typename KK_>
+AnyType ClearReturnKK_(Stack stack, const AnyType & a)
+{
+ // il faut faire un copie du tableau
+ KK_ m = GetAny<KK_>(a);
+ KK *cm=new KK(m);
+
+ Add2StackOfPtr2Free(stack,cm);// detruire la copie
+ if(verbosity>400)
+ cout << "ClearReturnKK_:: copie Add2StackOfPtr2Free " << endl;
+ return SetAny<KK_>(*cm);
+}
+//template<class RR,class A,class B> fMPI_Request*,KN<MPI_Request>*,long
+fMPI_Request * get_elementp_( KN<MPI_Request> * const & a,const long & b){
+ if( a==0 || b<0 || a->N() <= b)
+ { cerr << " Out of bound 0 <=" << b << " < " << a->N() << " KN<MPI_Request> * " << endl;
+ ExecError("Out of bound in operator []");}
+ return reinterpret_cast<fMPI_Request *> (&((*a)[b]));}// bofBof ...
+
+KN<MPI_Request> * set_init0( KN<MPI_Request> * const & a,const long & b)
+ {
+ a->init(b);
+ for(int i=0;i<b;++i)
+ (*a)[i]=MPI_REQUEST_NULL;
+ return a;
+ }
+bool toBool(fMPI_Comm *comm)
+{
+ return (comm && (*comm != (MPI_Comm)MPI_COMM_NULL));
+}
+void * topVoid(fMPI_Comm *comm) { return comm; }
+
+template<typename T>
+class Quad_Op : public E_F0 {
+ typedef typename T::result_type R;
+ typedef typename T::first_argument_type A;
+ typedef typename T::second_argument_type B;
+ typedef typename T::third_argument_type C;
+ typedef typename T::fourth_argument_type D;
+
+ typedef typename T::result_type Result;
+ Expression a,b,c,d;
+public:
+ AnyType operator()(Stack s) const
+ {return SetAny<R>(static_cast<R>(T::f(s, GetAny<A>((*a)(s)) ,
+ GetAny<B>((*b)(s)) ,
+ GetAny<C>((*c)(s)),
+ GetAny<D>((*d)(s))
+ )));}
+ Quad_Op(Expression aa,Expression bb,Expression cc,Expression dd) : a(aa),b(bb),c(cc),d(dd) {}
+ bool MeshIndependent() const {
+ return a->MeshIndependent() && b->MeshIndependent() && c->MeshIndependent() && d->MeshIndependent();}
+};
+
+
+// Fin add J. Morice
++<<<<<<< HEAD
+
+void f_end_parallele()
+{
+ /// FFCS: MPI_Finalize() needs to be called later than this (in
+ /// ffcs/src/server.cpp)
+ ffapi::mpi_finalize();
+ if(mpirank==0 || verbosity>2) cout << "FreeFem++-mpi finalize correctly .\n" << flush ;
+ else if(verbosity>5) cout << '.' << endl ;
+}
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+void f_initparallele(int &argc, char **& argv)
+{
+ /// FFCS: MPI_Init() needs to be called earlier (in ffcs/src/server.cpp)
+ ffapi::mpi_init(argc,argv);
+
+ int mpirank1,mpisize1;
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpirank1); /* local */
+ MPI_Comm_size(MPI_COMM_WORLD, &mpisize1); /* local */
+
+ mpirank = mpirank1;//MPI::COMM_WORLD.Get_rank();
+ mpisize =mpisize1;// MPI::COMM_WORLD.Get_size();
+ if(verbosity> 2 || (mpirank ==0))
+ cout << "initparallele rank " << mpirank << " on " << mpisize << endl;
++<<<<<<< HEAD
+ ff_atend(f_end_parallele); // set end MPI //
++=======
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+}
+
+double ffMPI_Wtime() {return MPI_Wtime();}
+double ffMPI_Wtick() {return MPI_Wtick();}
+
+void f_init_lgparallele()
+ {
+ if(verbosity && mpirank == 0) cout << "parallelempi ";
+ using namespace Fem2D;
+ Dcl_TypeandPtr<MPIrank>(0);
+
+ Dcl_TypeandPtr<fMPI_Group>(0,0,InitializeGroup,DeleteGroup);
+ Dcl_TypeandPtr<fMPI_Comm>(0,0,InitializeComm,DeleteComm);
+ Dcl_Type<fMPI_Op>();
+ Dcl_TypeandPtr<fMPI_Request>(0,0,InitializeRequest,DeleteRequest); // bof bof ...
+ Dcl_TypeandPtr_<KN_<MPI_Request> ,KN<MPI_Request>* >
+ (0,0,0,::Destroy<KN<MPI_Request> >,
+ ::ClearReturnKK_<MPI_Request,KN<MPI_Request>,KN_<MPI_Request> >,
+ ::ClearReturnpKK<MPI_Request,KN<MPI_Request> >);
+
+ zzzfff->Add("mpiGroup",atype<fMPI_Group*>());
+ zzzfff->Add("mpiComm",atype<fMPI_Comm*>());
+ zzzfff->Add("mpiRequest",atype<fMPI_Request*>());
+
+ map_type_of_map[make_pair(atype<long>(),atype<fMPI_Request>())]=atype<KN<MPI_Request>*>(); // vector
+
+
+ map_type[typeid(MPIrank).name()]->AddCast(new E_F1_funcT<MPIrank,MPIrank*>(UnRef<MPIrank>));
+ map_type[typeid(fMPI_Group).name()]->AddCast(new E_F1_funcT<fMPI_Group,fMPI_Group*>(UnRef<fMPI_Group>));
+ map_type[typeid(fMPI_Comm).name()]->AddCast(new E_F1_funcT<fMPI_Comm,fMPI_Comm*>(UnRef<fMPI_Comm>));
+ map_type[typeid(bool).name()]->AddCast(new OneOperator1<bool,fMPI_Comm*>(toBool));
+ map_type[typeid(void*).name()]->AddCast(new OneOperator1<void *,fMPI_Comm*>(topVoid));
+
+
+ TheOperators->Add("<-",
+ new OneOperator2_<MPIrank*,MPIrank*,MPIrank>(&set_copympi));
+
+ // constructor example ...
+ TheOperators->Add("<-",
+ new OneOperator2_<fMPI_Group*,fMPI_Group*,KN_<long> >(&def_group),
+ new OneOperator3_<fMPI_Group*,fMPI_Group*,fMPI_Group*,KN_<long> >(&def_group),
+ new OneOperator3_<fMPI_Group*,fMPI_Group*,fMPI_Comm*,KN_<long> >(&def_group),
+ new OneOperator2_<fMPI_Group*,fMPI_Group*,fMPI_Comm*>(&def_group));
+
+
+ /*
+ fMPI_Comm * mpiCommsplit(fMPI_Comm* const & a,const MPIrank &p1,const long &rk )
+ fMPI_Comm * def_intercommmerge(fMPI_Comm* const & a,fMPI_Comm* const & b, const long & high)
+ fMPI_Comm * def_Intercommcreate(fMPI_Comm* const & a, MPIrank const & p1, MPIrank const & p2, long const & tag )
+ quad_function<fMPI_Comm*,MPIrank,MPIrank,long, fMPI_Comm* >
+
+ */
+ TheOperators->Add("<-",
+ new OneOperator2_<fMPI_Comm*,fMPI_Comm*,fMPI_Group* >(&def_comm),
+ new OneOperator3_<fMPI_Comm*,fMPI_Comm*,fMPI_Comm*,fMPI_Group* >(&def_comm),
+ new OneOperator3_<fMPI_Comm*,fMPI_Comm*,MPIrank,long >(&mpiCommsplit),
+ new OneOperator3_<fMPI_Comm*,fMPI_Comm*,fMPI_Comm*,long >(&def_intercommmerge),
+ new OneQuadOperator< Def_def_Intercommcreate, Quad_Op<Def_def_Intercommcreate> >,
+ new OneQuadOperator< Def_def_Commsplit, Quad_Op<Def_def_Commsplit> >
+
+ );
+
+ /* code edp
+ int[int] procs=[1,2,3];
+ mpiGroup toto(procs);
+ mpiComm comm(toto);
+
+ */
+
+
+ Global.Add("processor","(",new OneOperator1<MPIrank,long>(mpiwho));
+ Global.Add("processor","(",new OneOperator2<MPIrank,long,fMPI_Comm>(mpiwho));
+ Global.Add("processor","(",new OneOperator2<MPIrank,fMPI_Comm,long>(mpiwho));
+
+ Global.Add("processorblock","(",new OneOperator1<MPIrank,long>(mpiwhob));
+ Global.Add("processorblock","(",new OneOperator2<MPIrank,long,fMPI_Comm>(mpiwhob));
+
+ TheOperators->Add(">>",
+ new OneBinaryOperator<Op_Readmpi<double> >,
+ new OneBinaryOperator<Op_Readmpi<Complex> >,
+ new OneBinaryOperator<Op_Readmpi<long> > ,
+ new OneBinaryOperator<Op_Readmpi<KN<double> > > ,
+ new OneBinaryOperator<Op_Readmpi<KN<long> > > ,
+ new OneBinaryOperator<Op_Readmpi<KN<Complex> > > ,
+ new OneBinaryOperator<Op_Readmpi<Mesh *> > ,
+ new OneBinaryOperator<Op_Readmpi<Mesh3 *> > ,
+ new OneBinaryOperator<Op_Readmpi<Matrice_Creuse<R> > > ,
+ new OneBinaryOperator<Op_Readmpi<Matrice_Creuse<Complex> > >
+ );
+
+ TheOperators->Add("<<",
+ new OneBinaryOperator<Op_Writempi<double> >,
+ new OneBinaryOperator<Op_Writempi<Complex> >,
+ new OneBinaryOperator<Op_Writempi<long> > ,
+ new OneBinaryOperator<Op_Writempi<KN<double> * > > ,
+ new OneBinaryOperator<Op_Writempi<KN<long> * > > ,
+ new OneBinaryOperator<Op_Writempi<KN<Complex> * > > ,
+ new OneBinaryOperator<Op_Writempi<Mesh *> > ,
+ new OneBinaryOperator<Op_Writempi<Mesh3 *> > ,
+ new OneBinaryOperator<Op_Writempi<Matrice_Creuse<R> * > > ,
+ new OneBinaryOperator<Op_Writempi<Matrice_Creuse<Complex>* > >
+
+ );
+
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<double> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<long> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<Complex> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<KN<double> *> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<KN<long> *> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<KN<Complex> *> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<Mesh *> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<Mesh3 *> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<Matrice_Creuse<R> *> >);
+ Global.Add("Send","(", new OneBinaryOperator<Op_Sendmpi<Matrice_Creuse<Complex> *> >);
+
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<double> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<long> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<Complex> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<KN<double> *> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<KN<long> *> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<KN<Complex> *> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<Mesh *> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<Mesh3 *> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<Matrice_Creuse<R> *> >);
+ Global.Add("Isend","(", new OneBinaryOperator<Op_ISendmpi<Matrice_Creuse<Complex> *> >);
+
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<double> >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<long> >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<Complex> >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<KN<double> > >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<KN<long> > >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<KN<Complex> > >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<Mesh *> >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<Mesh3 *> >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<Matrice_Creuse<R> > >);
+ Global.Add("Recv","(", new OneBinaryOperator<Op_Recvmpi<Matrice_Creuse<Complex> > >);
+
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<double> >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<long> >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<Complex> >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<KN<double> > >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<KN<long> > >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<KN<Complex> > >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<Mesh *> >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<Mesh3 *> >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<Matrice_Creuse<R> > >);
+ Global.Add("Irecv","(", new OneBinaryOperator<Op_IRecvmpi<Matrice_Creuse<Complex> > >);
+
+
+
+
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<double> >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<Complex> >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<long> >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<KN<double> > >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<KN<long> > >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<KN<Complex> > >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<Mesh *> >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<Mesh3 *> >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<Matrice_Creuse<R> > >);
+ Global.Add("broadcast","(",new OneBinaryOperator<Op_Bcastmpi<Matrice_Creuse<Complex> > >);
+
+ Global.Add("mpiAlltoall","(",new OneBinaryOperator<Op_All2All< long > >);
+ Global.Add("mpiAlltoall","(",new OneBinaryOperator<Op_All2All< double > >);
+ Global.Add("mpiAllgather","(",new OneBinaryOperator<Op_Allgather< long > >);
+ Global.Add("mpiAllgather","(",new OneBinaryOperator<Op_Allgather< double > >);
+ Global.Add("mpiAlltoall","(",new OneTernaryOperator3<Op_All2All3< long > >);
+ Global.Add("mpiAlltoall","(",new OneTernaryOperator3<Op_All2All3< double > >);
+ Global.Add("mpiAllgather","(",new OneTernaryOperator3<Op_Allgather3< long > >);
+ Global.Add("mpiAllgather","(",new OneTernaryOperator3<Op_Allgather3< double > >);
+
+ Global.Add("mpiAllgather","(",new OneBinaryOperator<Op_Allgather1< long > >); // Add J. Morice
+ Global.Add("mpiAllgather","(",new OneBinaryOperator<Op_Allgather1< double > >); // Add J. Morice
+
+ Global.Add("mpiAllgather","(",new OneTernaryOperator3<Op_Allgather13< long > >); // Add J. Morice
+ Global.Add("mpiAllgather","(",new OneTernaryOperator3<Op_Allgather13< double > >);// Add J. Morice
+
+ Global.Add("mpiScatter","(",new OneTernaryOperator3<Op_Scatter1< long > >); // Add J. Morice
+ Global.Add("mpiScatter","(",new OneTernaryOperator3<Op_Scatter1< double > >); // Add J. Morice
+ Global.Add("mpiScatter","(",new OneTernaryOperator3<Op_Scatter3< long > >);
+ Global.Add("mpiScatter","(",new OneTernaryOperator3<Op_Scatter3< double > >);
+
+ Global.Add("mpiGather","(",new OneTernaryOperator3<Op_Gather1< long > >); // Add J. Morice
+ Global.Add("mpiGather","(",new OneTernaryOperator3<Op_Gather1< double > >); // Add J. Morice
+ Global.Add("mpiGather","(",new OneTernaryOperator3<Op_Gather3< long > >); // correction J. Morice Scatter --> Gather
+ Global.Add("mpiGather","(",new OneTernaryOperator3<Op_Gather3< double > >);
+
+ // Add J. Morice communication with vector of different size
+ Global.Add("mpiAlltoallv","(",new OneOperator6_<long, KN_<double>, KN_<double>, KN_<long>, KN_<long>, KN_<long>, KN_<long> >( Op_All2Allv<double> ) );
+ Global.Add("mpiAlltoallv","(",new OneOperator6_<long, KN_<long>, KN_<long>, KN_<long>, KN_<long>, KN_<long>, KN_<long> >( Op_All2Allv<long> ) );
+
+ Global.Add("mpiAlltoallv","(",new OneOperator7_<long, KN_<long>, KN_<long>, fMPI_Comm, KN_<long>, KN_<long>, KN_<long>, KN_<long> >( Op_All2All3v<long> ) );
+ Global.Add("mpiAlltoallv","(",new OneOperator7_<long, KN_<double>, KN_<double>, fMPI_Comm, KN_<long>, KN_<long>, KN_<long>, KN_<long> >( Op_All2All3v<double> ) );
+
+ Global.Add("mpiAllgatherv","(",new OneQuadOperator<Op_Allgatherv< long >, Quad_Op<Op_Allgatherv< long > > > );
+ Global.Add("mpiAllgatherv","(",new OneQuadOperator<Op_Allgatherv< double >, Quad_Op<Op_Allgatherv< double > > >);
+ Global.Add("mpiAllgatherv","(",new OneOperator5_<long, KN_<long>, KN_<long>, fMPI_Comm, KN_<long>, KN_<long> >(Op_Allgatherv3< long >) );
+ Global.Add("mpiAllgatherv","(",new OneOperator5_<long, KN_<double>, KN_<double>, fMPI_Comm, KN_<long>, KN_<long> >(Op_Allgatherv3< double >) );
+
+ Global.Add("mpiScatterv","(",new OneOperator5_<long, KN_<long>, KN_<long>, MPIrank, KN_<long>, KN_<long> >(Op_Scatterv3< long >) );
+ Global.Add("mpiScatterv","(",new OneOperator5_<long, KN_<double>, KN_<double>, MPIrank, KN_<long>, KN_<long> >(Op_Scatterv3< double >) );
+
+ Global.Add("mpiGatherv","(",new OneOperator5_<long, KN_<long>, KN_<long>, MPIrank, KN_<long>, KN_<long> >( Op_Gatherv3< long > ) );
+ Global.Add("mpiGatherv","(",new OneOperator5_<long, KN_<double>, KN_<double>, MPIrank, KN_<long>, KN_<long> >( Op_Gatherv3< double > ) );
+ // Fin Add J. Morice
+
+ Global.Add("mpiReduce","(",new OneQuadOperator<Op_Reduce< double >, Quad_Op<Op_Reduce< double > > >);
+ Global.Add("mpiReduce","(",new OneQuadOperator<Op_Reduce1< double >, Quad_Op<Op_Reduce1< double > > >);
+ Global.Add("mpiAllReduce","(",new OneQuadOperator<Op_AllReduce< double >, Quad_Op<Op_AllReduce< double > > >);
+ Global.Add("mpiAllReduce","(",new OneQuadOperator<Op_AllReduce1< double >, Quad_Op<Op_AllReduce1< double > > >); // add FH jan 2011
+ // Global.Add("mpiReduceScatter","(",new OneQuadOperator<Op_Reducescatter< double >, Quad_Op<Op_Reducescatter< double > > >);
+
+ // Add J. Morice
+ Global.Add("mpiReduce","(",new OneQuadOperator<Op_Reduce< long >, Quad_Op<Op_Reduce< long > > >);
+ Global.Add("mpiReduce","(",new OneQuadOperator<Op_Reduce1< long >, Quad_Op<Op_Reduce1< long > > >);
+ Global.Add("mpiAllReduce","(",new OneQuadOperator<Op_AllReduce< long >, Quad_Op<Op_AllReduce< long > > >);
+ Global.Add("mpiAllReduce","(",new OneQuadOperator<Op_AllReduce1< long >, Quad_Op<Op_AllReduce1< long > > >); // add FH jan 2011
+ // Global.Add("mpiReduceScatter","(",new OneQuadOperator<Op_Reducescatter< long >, Quad_Op<Op_Reducescatter< long > > >);
+ // fin Add J. Morice
+
+ // Add J. Morice :: complex communication between processor
+ Global.Add("mpiAlltoall","(",new OneBinaryOperator<Op_All2All< Complex > >);
+ Global.Add("mpiAllgather","(",new OneBinaryOperator<Op_Allgather< Complex > >);
+ Global.Add("mpiAlltoall","(",new OneTernaryOperator3<Op_All2All3< Complex > >);
+ Global.Add("mpiAllgather","(",new OneTernaryOperator3<Op_Allgather3< Complex > >);
+
+ Global.Add("mpiAllgather","(",new OneBinaryOperator<Op_Allgather1< Complex > >);
+ Global.Add("mpiAllgather","(",new OneTernaryOperator3<Op_Allgather13< Complex > >);
+
+ Global.Add("mpiScatter","(",new OneTernaryOperator3<Op_Scatter3< Complex > >);
+ Global.Add("mpiGather","(",new OneTernaryOperator3<Op_Gather3< Complex > >);
+
+ Global.Add("mpiScatter","(",new OneTernaryOperator3<Op_Scatter1< Complex > >);
+ Global.Add("mpiGather","(",new OneTernaryOperator3<Op_Gather1< Complex > >);
+
+ // Add J. Morice communication with vector of different size
+ Global.Add("mpiAlltoallv","(",new OneOperator6_<long, KN_<Complex>, KN_<Complex>, KN_<long>, KN_<long>, KN_<long>, KN_<long> >( Op_All2Allv<Complex> ) );
+ Global.Add("mpiAlltoallv","(",new OneOperator7_<long, KN_<Complex>, KN_<Complex>, fMPI_Comm, KN_<long>, KN_<long>, KN_<long>, KN_<long> >( Op_All2All3v<Complex> ) );
+ Global.Add("mpiAllgatherv","(",new OneQuadOperator<Op_Allgatherv< Complex>, Quad_Op<Op_Allgatherv< Complex > > >);
+
+ Global.Add("mpiAllgatherv","(",new OneOperator5_<long, KN_<Complex>, KN_<Complex>, fMPI_Comm, KN_<long>, KN_<long> >(Op_Allgatherv3< Complex >) );
+ Global.Add("mpiScatterv","(",new OneOperator5_<long, KN_<Complex>, KN_<Complex>, MPIrank, KN_<long>, KN_<long> >(Op_Scatterv3< Complex >) );
+ Global.Add("mpiGatherv","(",new OneOperator5_<long, KN_<Complex>, KN_<Complex>, MPIrank, KN_<long>, KN_<long> >( Op_Gatherv3< Complex > ) );
+
+
+
+ Global.Add("mpiReduce","(",new OneQuadOperator<Op_ReduceMat< Complex >, Quad_Op<Op_ReduceMat< Complex > > >);// add FH april 2011
+ Global.Add("mpiReduce","(",new OneQuadOperator<Op_ReduceMat< double >, Quad_Op<Op_ReduceMat< double > > >);// add FH april 2011
+ Global.Add("mpiAllReduce","(",new OneQuadOperator<Op_AllReduceMat< Complex >, Quad_Op<Op_AllReduceMat< Complex > > >);// add FH april 2011
+ Global.Add("mpiAllReduce","(",new OneQuadOperator<Op_AllReduceMat< double >, Quad_Op<Op_AllReduceMat< double > > >);// add FH april 2011
+
+ Global.Add("mpiReduce","(",new OneQuadOperator<Op_Reduce< Complex >, Quad_Op<Op_Reduce< Complex > > >);
+ Global.Add("mpiReduce","(",new OneQuadOperator<Op_Reduce1< Complex >, Quad_Op<Op_Reduce1< Complex > > >);
+ Global.Add("mpiAllReduce","(",new OneQuadOperator<Op_AllReduce< Complex >, Quad_Op<Op_AllReduce< Complex > > >);
+#ifdef HAVE_MPI_DOUBLE_COMPLEX
+ Global.Add("mpiAllReduce","(",new OneQuadOperator<Op_AllReduce1< Complex >, Quad_Op<Op_AllReduce1< Complex > > >);// add FH jan 2011
+#endif
+ // Fin Add J. Morice :: complex communication between processor
+
+ Global.New("mpirank",CConstant<long>(mpirank));
+ Global.New("mpisize",CConstant<long>(mpisize));
+ static long mpiUndefined=MPI_UNDEFINED, mpiAnySource = MPI_ANY_SOURCE,mpiAnyTag=MPI_ANY_TAG ;
+ static fMPI_Comm fmpiWorld=MPI_COMM_WORLD;
+
+ Global.New("mpiUndefined",CConstant<long>(mpiUndefined));
+ Global.New("mpiAnySource",CConstant<long>(mpiAnySource));
+ Global.New("mpiAnyTag",CConstant<long>(mpiAnyTag));
+
+
+
+ Global.New("mpiCommWorld",CConstant<fMPI_Comm*>(&fmpiWorld));
+ // add FH
+
+
+ Global.Add("mpiWtime","(",new OneOperator0<double>(ffMPI_Wtime));
+ Global.Add("mpiWtick","(",new OneOperator0<double>(ffMPI_Wtick));
+ Global.Add("processor","(",new OneOperator3_<MPIrank,long,fMPI_Comm,fMPI_Request*>(mpiwho_));
+ Global.Add("processor","(",new OneOperator2_<MPIrank,long,fMPI_Request*>(mpiwho_));
+ Global.Add("mpiWait","(",new OneOperator1<long,fMPI_Request*>(mpiWait));
+ Global.Add("mpiWaitAny","(",new OneOperator1<long,KN<MPI_Request>*>(mpiWaitAny));
+ Global.Add("mpiSize","(",new OneOperator1<long,fMPI_Comm>(mpiSize));
+ Global.Add("mpiRank","(",new OneOperator1<long,fMPI_Comm>(mpiRank));
+ Global.Add("mpiBarrier","(",new OneOperator1<long,fMPI_Comm*>(mpiBarrier));
+
+ static fMPI_Op op_max(MPI_MAX);
+ static fMPI_Op op_min(MPI_MIN);
+ static fMPI_Op op_sum(MPI_SUM);
+ static fMPI_Op op_prod(MPI_PROD);
+ static fMPI_Op op_land(MPI_LAND);
+
+ static fMPI_Op op_lor(MPI_LOR);
+ static fMPI_Op op_lxor(MPI_LXOR);
+ static fMPI_Op op_band(MPI_BAND);
+ static fMPI_Op op_bor(MPI_BOR);
+ static fMPI_Op op_bxor(MPI_BXOR);
+ static fMPI_Op op_maxloc(MPI_MAXLOC);
+ static fMPI_Op op_minloc(MPI_MINLOC);
+
+ Global.New("mpiMAX",CConstant<fMPI_Op>(op_max));
+ Global.New("mpiMIN",CConstant<fMPI_Op>(op_min));
+ Global.New("mpiSUM",CConstant<fMPI_Op>(op_sum));
+ Global.New("mpiPROD",CConstant<fMPI_Op>(op_prod));
+ Global.New("mpiLAND",CConstant<fMPI_Op>(op_land));
+
+ Global.New("mpiLOR",CConstant<fMPI_Op>(op_lor));
+ Global.New("mpiLXOR",CConstant<fMPI_Op>(op_lxor));
+ Global.New("mpiBAND",CConstant<fMPI_Op>(op_band));
+ Global.New("mpiBXOR",CConstant<fMPI_Op>(op_bxor));
+ // sur des pair bof bof ...
+ Global.New("mpiMAXLOC",CConstant<fMPI_Op>(op_maxloc));
+ Global.New("mpiMINLOC",CConstant<fMPI_Op>(op_minloc));
+
+
+ TheOperators->Add("<-",
+ new OneOperator2_<KN<MPI_Request> *,KN<MPI_Request> *,long>(&set_init0)
+ );
+ atype<KN<MPI_Request>* >()->Add("[","",new OneOperator2_<fMPI_Request*,KN<MPI_Request>*,long >(get_elementp_));
+
+ }
++<<<<<<< HEAD
+
++=======
++void f_end_parallele()
++{
++ /// FFCS: MPI_Finalize() needs to be called later than this (in
++ /// ffcs/src/server.cpp)
++ ffapi::mpi_finalize();
++ if(mpirank==0 || verbosity>2) cout << "FreeFem++-mpi finalize correctly .\n" << flush ;
++ else if(verbosity>5) cout << '.' << endl ;
++}
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+// set the 3 ptr
+extern void (*initparallele)(int &argc, char **& argv) ;
+extern void (*init_lgparallele)();
++<<<<<<< HEAD
+//extern void (*end_parallele)();
++=======
++extern void (*end_parallele)();
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+
+
+void init_ptr_parallelepmi();
+void init_ptr_parallelepmi(){
+initparallele=&f_initparallele ;
+init_lgparallele=&f_init_lgparallele;
++<<<<<<< HEAD
+//end_parallele=&f_end_parallele;
++=======
++end_parallele=&f_end_parallele;
++>>>>>>> d7a136b09f1c01d1cc9bd901543adf3b853cf5cd
+};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/freefempp.git
More information about the debian-science-commits
mailing list