[gmsh] 02/06: Merge branch 'upstream'

Anton Gladky gladk at moszumanska.debian.org
Thu Aug 11 19:04:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository gmsh.

commit 4ecd62aa3502f3098ad55921b5f7e852d838c747
Merge: 28f4474 e5df2d8
Author: Anton Gladky <gladk at debian.org>
Date:   Thu Aug 11 20:44:57 2016 +0200

    Merge branch 'upstream'

 CMakeLists.txt                                     |    54 +-
 Common/CommandLine.cpp                             |     2 +
 Common/Context.cpp                                 |     1 +
 Common/Context.h                                   |     4 +-
 Common/DefaultOptions.h                            |    42 +-
 Common/Gmsh.cpp                                    |     9 +-
 Common/GmshDefines.h                               |     1 +
 Common/GmshMessage.cpp                             |    62 +-
 Common/GmshMessage.h                               |     6 +-
 Common/GmshSocket.h                                |    10 +-
 Common/OS.cpp                                      |     1 -
 Common/OpenFile.cpp                                |    17 +-
 Common/Options.cpp                                 |   100 +-
 Common/Options.h                                   |     5 +
 Common/gmshLocalNetworkClient.cpp                  |    17 +-
 Common/onelab.h                                    |   315 +-
 Common/onelabUtils.cpp                             |    51 +-
 Fltk/FlGui.cpp                                     |    29 +-
 Fltk/drawContextFltkStringTexture.cpp              |     2 +-
 Fltk/fileDialogs.cpp                               |   131 +-
 Fltk/gamepadWindow.cpp                             |    17 +-
 Fltk/graphicWindow.cpp                             |    20 +-
 Fltk/onelabGroup.cpp                               |     4 +-
 Fltk/optionWindow.cpp                              |    30 +-
 Fltk/solverButton.cpp                              |    10 +-
 Fltk/viewButton.cpp                                |    44 +-
 Fltk/visibilityWindow.cpp                          |     4 +-
 Geo/ExtrudeParams.cpp                              |    22 +-
 Geo/GEdge.cpp                                      |    31 +-
 Geo/GEdge.h                                        |     2 +-
 Geo/GEdgeLoop.h                                    |     5 +-
 Geo/GEntity.cpp                                    |    64 +
 Geo/GEntity.h                                      |    17 +-
 Geo/GFace.cpp                                      |   164 +-
 Geo/GFace.h                                        |    17 +-
 Geo/GModel.cpp                                     |   338 +-
 Geo/GModel.h                                       |     7 +
 Geo/GModelFactory.cpp                              |   219 +-
 Geo/GModelFactory.h                                |     8 +
 Geo/GModelIO_CGNS.cpp                              |     6 +-
 Geo/GModelIO_GEO.cpp                               |   102 +-
 Geo/GModelIO_MED.cpp                               |     3 +-
 Geo/GModelIO_MSH.cpp                               |     9 +-
 Geo/GModelIO_MSH2.cpp                              |    31 +-
 Geo/GModelVertexArrays.cpp                         |    10 +-
 Geo/GRegion.h                                      |     4 +
 Geo/Geo.cpp                                        |    93 +-
 Geo/Geo.h                                          |    14 +
 Geo/GeoInterpolation.cpp                           |     6 +
 Geo/GeoStringInterface.cpp                         |    19 +-
 Geo/GeomMeshMatcher.cpp                            |    86 +-
 Geo/MEdge.h                                        |     7 +
 Geo/MElement.cpp                                   |   107 +-
 Geo/MElement.h                                     |    21 +-
 Geo/MFace.cpp                                      |     4 +-
 Geo/MHexahedron.cpp                                |     8 -
 Geo/MHexahedron.h                                  |     8 +-
 Geo/MLine.cpp                                      |     9 +-
 Geo/MLine.h                                        |     1 -
 Geo/MPrism.cpp                                     |     8 -
 Geo/MPrism.h                                       |    15 +-
 Geo/MPyramid.cpp                                   |    39 +-
 Geo/MPyramid.h                                     |    29 +-
 Geo/MQuadrangle.cpp                                |    84 +-
 Geo/MQuadrangle.h                                  |    24 +-
 Geo/MSubElement.cpp                                |    22 +
 Geo/MSubElement.h                                  |    59 +-
 Geo/MTetrahedron.cpp                               |     8 -
 Geo/MTetrahedron.h                                 |     1 -
 Geo/MTriangle.cpp                                  |    75 +-
 Geo/MTriangle.h                                    |    15 +-
 Geo/OCCEdge.cpp                                    |     1 +
 Geo/OCCFace.cpp                                    |    19 +-
 Geo/OCCIncludes.h                                  |     3 +-
 Geo/OCC_Connect.h                                  |     3 +-
 Geo/SVector3.h                                     |     6 +-
 Geo/discreteDiskFace.cpp                           |   941 +-
 Geo/discreteDiskFace.h                             |   206 +-
 Geo/discreteEdge.cpp                               |    97 +-
 Geo/discreteEdge.h                                 |     8 +-
 Geo/discreteFace.cpp                               |   653 +-
 Geo/discreteFace.h                                 |    22 +-
 Geo/discreteRegion.cpp                             |    35 +
 Geo/discreteRegion.h                               |     1 +
 Geo/gmshEdge.cpp                                   |     2 +-
 Geo/gmshRegion.cpp                                 |     2 +-
 Graphics/drawGlyph.cpp                             |     4 +-
 Graphics/drawScales.cpp                            |     6 +-
 Graphics/gl2ps.cpp                                 |     2 +-
 Mesh/BDS.cpp                                       |    32 +
 Mesh/BackgroundMesh.cpp                            |    21 +-
 Mesh/BoundaryLayers.cpp                            |   178 +-
 Mesh/CMakeLists.txt                                |     2 +-
 Mesh/Field.cpp                                     |   412 +-
 Mesh/Field.h                                       |     1 +
 Mesh/Generator.cpp                                 |    73 +-
 Mesh/Generator.h                                   |     1 +
 Mesh/HighOrder.cpp                                 |   154 +-
 Mesh/delaunay3d.cpp                                |   356 +-
 Mesh/delaunay3d.h                                  |    10 +-
 Mesh/delaunay3d_private.h                          |   207 +-
 Mesh/delaunay_refinement.cpp                       |   137 +-
 Mesh/delaunay_refinement.h                         |    19 +-
 Mesh/directions3D.cpp                              |   959 +-
 Mesh/meshGEdge.cpp                                 |    55 +-
 Mesh/meshGFace.cpp                                 |   521 +-
 Mesh/meshGFaceDelaunayInsertion.cpp                |     3 +
 Mesh/meshGFaceElliptic.cpp                         |     8 +-
 Mesh/meshGFaceOptimize.cpp                         |   321 +-
 Mesh/meshGFaceRecombine.cpp                        |   321 +-
 Mesh/meshGFaceRecombine.h                          |    40 +-
 Mesh/meshGRegion.cpp                               |   405 +-
 Mesh/meshGRegion.h                                 |     4 +-
 Mesh/meshGRegion19036.cpp                          |  1856 -
 Mesh/meshGRegionBoundaryRecovery.cpp               | 15307 +----
 Mesh/meshGRegionBoundaryRecovery.h                 |   873 +-
 Mesh/meshGRegionDelaunayInsertion.cpp              |    98 +-
 Mesh/meshGRegionRelocateVertex.cpp                 |    63 +-
 Mesh/meshGRegionRelocateVertex.h                   |     1 +
 Mesh/meshPartition.cpp                             |     8 +-
 Mesh/meshRefine.cpp                                |    18 +-
 Mesh/qualityMeasures.cpp                           |     1 +
 Mesh/qualityMeasuresJacobian.cpp                   |  1928 +
 Mesh/qualityMeasuresJacobian.h                     |   217 +
 Mesh/simple3D.cpp                                  |   180 +-
 Mesh/surfaceFiller.cpp                             |   267 +-
 ...eshGRegionBoundaryRecovery.cpp => tetgenBR.cxx} | 20734 ++++---
 Mesh/tetgenBR.h                                    |  2588 +
 Mesh/yamakawa.cpp                                  |   771 +-
 Mesh/yamakawa.h                                    |    20 +
 Numeric/BasisFactory.cpp                           |    42 +
 Numeric/BasisFactory.h                             |    56 +-
 Numeric/CondNumBasis.cpp                           |     4 +-
 Numeric/CondNumBasis.h                             |     3 +-
 Numeric/ElementType.cpp                            |     4 +
 Numeric/ElementType.h                              |     3 +
 Numeric/FuncSpaceData.cpp                          |    16 +
 Numeric/FuncSpaceData.h                            |    17 +-
 Numeric/GaussQuadratureQuad.cpp                    |     2 +
 Numeric/JacobianBasis.cpp                          |    80 +-
 Numeric/JacobianBasis.h                            |    23 +-
 Numeric/MetricBasis.cpp                            |  1384 +-
 Numeric/MetricBasis.h                              |   100 +-
 Numeric/Numeric.cpp                                |    26 +-
 Numeric/Numeric.h                                  |    21 +-
 Numeric/bezierBasis.cpp                            |   423 +-
 Numeric/bezierBasis.h                              |    70 +-
 Numeric/fullMatrix.h                               |     5 +-
 Numeric/nodalBasis.cpp                             |   125 +-
 Numeric/pointsGenerators.cpp                       |   124 +
 Numeric/pointsGenerators.h                         |     1 +
 Numeric/polynomialBasis.h                          |     1 -
 Numeric/pyramidalBasis.cpp                         |    26 +-
 Numeric/pyramidalBasis.h                           |     7 +-
 Parser/Gmsh.l                                      |     2 +
 Parser/Gmsh.tab.cpp                                | 14759 ++---
 Parser/Gmsh.tab.hpp                                |  1039 +-
 Parser/Gmsh.y                                      |   208 +-
 Parser/Gmsh.yy.cpp                                 |  1677 +-
 Plugin/AnalyseCurvedMesh.cpp                       |   953 +-
 Plugin/AnalyseCurvedMesh.h                         |   109 +-
 Plugin/CMakeLists.txt                              |     1 +
 Plugin/CurvedBndDist.cpp                           |     3 +-
 Plugin/FaultZone.cpp                               |     6 +-
 Plugin/HarmonicToTime.cpp                          |     2 +-
 Plugin/Lambda2.cpp                                 |     9 +-
 Plugin/PluginManager.cpp                           |     9 +-
 Plugin/ShowNeighborElements.cpp                    |   138 +
 Plugin/ShowNeighborElements.h                      |    44 +
 Plugin/ThinLayerFixMesh.cpp                        |     2 +-
 Post/ColorTable.cpp                                |     1 +
 Post/PView.cpp                                     |     7 +-
 Post/PView.h                                       |    25 +-
 Post/PViewData.h                                   |     6 +-
 Post/PViewDataGModel.cpp                           |    41 +-
 Post/PViewVertexArrays.cpp                         |     2 -
 Post/PViewX3D.cpp                                  |   185 +-
 Post/PViewX3D.h                                    |    60 +-
 Post/adaptiveData.cpp                              |    21 +-
 Post/adaptiveData.h                                |   105 +-
 Post/shapeFunctions.h                              |    21 +-
 Solver/STensor43.h                                 |     4 +
 Solver/STensor53.h                                 |    10 +-
 Solver/STensor63.h                                 |    12 +-
 Solver/elasticitySolver.cpp                        |   333 +-
 Solver/elasticitySolver.h                          |    24 +-
 Solver/functionSpace.h                             |    15 +-
 Solver/linearSystemCSR.h                           |    10 +-
 Solver/linearSystemPETSc.h                         |     2 +-
 Solver/linearSystemPETSc.hpp                       |     7 +-
 Solver/solverAlgorithms.h                          |     2 +-
 Solver/terms.cpp                                   |     2 +-
 Solver/thermicSolver.cpp                           |    75 +-
 Solver/thermicSolver.h                             |     8 +-
 contrib/ANN/CMakeLists.txt                         |    24 -
 contrib/ANN/Copyright.txt                          |    47 -
 contrib/ANN/License.txt                            |   450 -
 contrib/ANN/README.txt                             |     2 -
 contrib/ANN/include/ANN/ANN.h                      |   829 -
 contrib/ANN/include/ANN/ANNperf.h                  |   226 -
 contrib/ANN/include/ANN/ANNx.h                     |   170 -
 contrib/ANN/src/ANN.cpp                            |   199 -
 contrib/ANN/src/bd_fix_rad_search.cpp              |    61 -
 contrib/ANN/src/bd_pr_search.cpp                   |    62 -
 contrib/ANN/src/bd_search.cpp                      |    61 -
 contrib/ANN/src/bd_tree.cpp                        |   417 -
 contrib/ANN/src/bd_tree.h                          |   100 -
 contrib/ANN/src/brute.cpp                          |   109 -
 contrib/ANN/src/kd_dump.cpp                        |   446 -
 contrib/ANN/src/kd_fix_rad_search.cpp              |   183 -
 contrib/ANN/src/kd_fix_rad_search.h                |    44 -
 contrib/ANN/src/kd_pr_search.cpp                   |   219 -
 contrib/ANN/src/kd_pr_search.h                     |    49 -
 contrib/ANN/src/kd_search.cpp                      |   210 -
 contrib/ANN/src/kd_search.h                        |    48 -
 contrib/ANN/src/kd_split.cpp                       |   428 -
 contrib/ANN/src/kd_split.h                         |    85 -
 contrib/ANN/src/kd_tree.cpp                        |   405 -
 contrib/ANN/src/kd_tree.h                          |   197 -
 contrib/ANN/src/kd_util.cpp                        |   439 -
 contrib/ANN/src/kd_util.h                          |   124 -
 contrib/ANN/src/perf.cpp                           |   134 -
 contrib/ANN/src/pr_queue.h                         |   125 -
 contrib/ANN/src/pr_queue_k.h                       |   118 -
 contrib/HighOrderMeshOptimizer/CADDistances.cpp    |     1 +
 contrib/HighOrderMeshOptimizer/CMakeLists.txt      |     1 +
 contrib/HighOrderMeshOptimizer/OptHomMesh.cpp      |     1 +
 .../HighOrderMeshOptimizer/OptHomPeriodicity.cpp   |   278 +
 contrib/HighOrderMeshOptimizer/OptHomPeriodicity.h |    59 +
 contrib/HighOrderMeshOptimizer/OptHomRun.cpp       |    91 +-
 contrib/HighOrderMeshOptimizer/OptHomRun.h         |     3 +-
 contrib/MathEx/lesser.txt                          |  1012 +-
 contrib/MathEx/license.txt                         |    70 +-
 contrib/Netgen/libsrc/general/parthreads.cpp       |    80 +-
 contrib/Netgen/libsrc/general/profiler.cpp         |     4 +-
 contrib/Netgen/libsrc/general/profiler.hpp         |     2 +
 contrib/Netgen/nglib/ng_occ.cpp                    |   284 +-
 .../testcases/3D solid-X-Y plane.xmt_txt           |   156 +-
 .../testcases/3D solid-Z-Y plane.xmt_txt           |   146 +-
 .../testcases/Cutting-punch.xmt_txt                |   248 +-
 .../testcases/Cutting-punch2.xmt_txt               |   238 +-
 .../testcases/Hole CAD model.xmt_txt               |   288 +-
 .../testcases/Work-piece.xmt_txt                   |   178 +-
 .../interface_parasolid/testcases/blend1.xmt_txt   |   240 +-
 .../interface_parasolid/testcases/blend2.xmt_txt   |   218 +-
 .../interface_parasolid/testcases/blend3.xmt_txt   |   292 +-
 .../interface_parasolid/testcases/brut.xmt_txt     |   950 +-
 .../interface_parasolid/testcases/bsurf.xmt_txt    |    98 +-
 .../interface_parasolid/testcases/fan.xmt_txt      |  2352 +-
 .../testcases/instance_block.xmt_txt               |   142 +-
 .../testcases/instance_block_inscribed.xmt_txt     |   180 +-
 .../testcases/instance_block_tool.xmt_txt          |   160 +-
 .../testcases/instance_cuboid_tool.xmt_txt         |   144 +-
 .../testcases/instance_cuboid_tool2.xmt_txt        |   168 +-
 .../testcases/instance_h_shape.xmt_txt             |   334 +-
 .../testcases/instance_multi_level.xmt_txt         |   444 +-
 .../testcases/instance_prism_tool.xmt_txt          |   172 +-
 .../testcases/instance_sheet_body.xmt_txt          |   128 +-
 .../testcases/instance_solid_cyl.xmt_txt           |    86 +-
 .../testcases/instance_solid_cyl2.xmt_txt          |    86 +-
 .../testcases/sheet_body.xmt_txt                   |    46 +-
 contrib/Salome/Partition_Inter2d.hxx               |    11 +-
 contrib/Salome/Partition_Inter2d.ixx               |     3 +-
 contrib/Salome/Partition_Inter3d.cxx               |     4 +-
 contrib/Salome/Partition_Inter3d.hxx               |    14 +-
 contrib/Salome/Partition_Loop.cxx                  |     3 +-
 contrib/Salome/Partition_Loop.hxx                  |     1 -
 contrib/Salome/Partition_Loop2d.cxx                |     4 +-
 contrib/Salome/Partition_Loop2d.hxx                |     1 -
 contrib/Salome/Partition_Loop3d.cxx                |     3 +-
 contrib/Salome/Partition_Loop3d.hxx                |     5 +-
 contrib/Salome/Partition_Spliter.cxx               |     4 +-
 contrib/Salome/Partition_Spliter.hxx               |     6 +-
 contrib/gmm/gmm_except.h                           |    52 +-
 contrib/gmm/gmm_std.h                              |     4 +-
 contrib/lbfgs/alglibinternal.cpp                   | 22700 +++----
 contrib/lbfgs/alglibinternal.h                     |  1576 +-
 contrib/lbfgs/alglibmisc.cpp                       |  6716 +--
 contrib/lbfgs/alglibmisc.h                         |  1432 +-
 contrib/lbfgs/ap.cpp                               | 19262 +++---
 contrib/lbfgs/ap.h                                 |  2508 +-
 contrib/lbfgs/linalg.cpp                           | 60398 +++++++++----------
 contrib/lbfgs/linalg.h                             |  8202 +--
 contrib/lbfgs/optimization.cpp                     | 32472 +++++-----
 contrib/lbfgs/optimization.h                       |  7062 +--
 contrib/lbfgs/solvers.cpp                          | 11330 ++--
 contrib/lbfgs/solvers.h                            |  2706 +-
 contrib/lbfgs/stdafx.h                             |     4 +-
 contrib/mobile/Android/AndroidManifest.xml         |     4 +-
 .../Android/src/org/geuz/onelab/Parameter.java     |     2 +-
 .../src/org/geuz/onelab/ParameterNumber.java       |    39 +-
 .../src/org/geuz/onelab/ParameterString.java       |    10 +-
 contrib/mobile/README.txt                          |    31 +-
 contrib/mobile/androidUtils.cpp                    |     4 +-
 contrib/mobile/drawContext.cpp                     |     8 +-
 contrib/mobile/iOS/Onelab/AboutViewController.mm   |     6 +-
 contrib/mobile/iOS/Onelab/Onelab-Info.plist        |     4 +-
 contrib/mobile/iOS/Onelab/Parameter.mm             |     2 +-
 .../mobile/iOS/Onelab/ParametersViewController.mm  |     2 +-
 contrib/mobile/utils/Android.cmake                 |  2250 +-
 contrib/onelab/python/onelab.py                    |    52 +-
 contrib/zipper/example.cpp                         |   138 +-
 contrib/zipper/unzipper.cpp                        |   364 +-
 contrib/zipper/unzipper.h                          |    88 +-
 contrib/zipper/zipper.cpp                          |   292 +-
 contrib/zipper/zipper.h                            |    78 +-
 demos/component8.step                              |  2482 +-
 demos/square_regular.geo                           |    17 +
 doc/CREDITS.txt                                    |    42 +-
 doc/VERSIONS.txt                                   |    10 +-
 doc/gmsh.html                                      |    34 +-
 doc/texinfo/cmake_options.texi                     |    12 +-
 doc/texinfo/gmsh.texi                              |    38 +-
 doc/texinfo/opt_fields.texi                        |    77 +-
 doc/texinfo/opt_mesh.texi                          |     7 +-
 doc/texinfo/opt_solver.texi                        |     2 +-
 utils/api_demos/CMakeLists.txt                     |     3 +
 utils/api_demos/mainRemesh.cpp                     |    45 +
 utils/converters/gid/gmsh2_2gid.c                  |   242 +-
 utils/converters/maya/edgeVertexOrder.mel          |   132 +-
 utils/converters/maya/gmsh.mel                     |   434 +-
 utils/misc/gmsh_app.plist                          |     2 +-
 utils/misc/package_gmsh_getdp.sh                   |     2 +-
 utils/solvers/c++/GmshSocket.h                     |    20 +-
 utils/solvers/c++/onelab.h                         |   323 +-
 wrappers/gmshpy/CMakeLists.txt                     |   154 +-
 wrappers/java/WrapGmsh.i                           |     6 +-
 327 files changed, 133079 insertions(+), 142745 deletions(-)

diff --cc Geo/GeomMeshMatcher.cpp
index 1e1264a,492f5b6..7a390f5
--- a/Geo/GeomMeshMatcher.cpp
+++ b/Geo/GeomMeshMatcher.cpp
@@@ -750,12 -802,16 +814,17 @@@ int GeomMeshMatcher::match(GModel *geom
    std::vector<Pair<GEdge*  , GEdge*  > > *coresp_e = matchEdges   (geom, mesh, coresp_v, ok);
    std::vector<Pair<GFace*  , GFace*  > > *coresp_f = matchFaces   (geom, mesh, coresp_e, ok);
    std::vector<Pair<GRegion*, GRegion*> > *coresp_r = matchRegions (geom, mesh, coresp_f, ok);
 +>>>>>>> upstream/2.9.3+dfsg1
  
    std::map<MVertex*,MVertex*> _mesh_to_geom;
-   copy_vertices(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f,coresp_r);
-   copy_elements(geom, mesh, _mesh_to_geom,coresp_v,coresp_e,coresp_f,coresp_r);
- 
+   
+   copy_vertices(geom,mesh,_mesh_to_geom,coresp_v,coresp_e,coresp_f,coresp_r);
+   copy_elements(geom,mesh,_mesh_to_geom,coresp_v,coresp_e,coresp_f,coresp_r);
+   
+   copy_periodicity(*coresp_v,_mesh_to_geom);
+   copy_periodicity(*coresp_e,_mesh_to_geom);
+   copy_periodicity(*coresp_f,_mesh_to_geom);
+   
    delete coresp_v;
    delete coresp_e;
    delete coresp_f;
diff --cc Geo/SVector3.h
index 2b0a792,a8cc7dd..ed6626a
--- a/Geo/SVector3.h
+++ b/Geo/SVector3.h
@@@ -89,12 -89,13 +89,16 @@@ class SVector3 
        return 2;
      }
    }
 +<<<<<<< HEAD
 +
 +=======
    const double* data() const {return P.data();}
    double* data() {return P.data();}
- >>>>>>> upstream/2.9.3+dfsg1
+   void axpy(const double a, const SVector3& y){
+     for (int i=0; i<3; i++){
+       P[i] += (a*y[i]);
+     }
+   }
  };
  
  inline double dot(const SVector3 &a, const SVector3 &b)
diff --cc Numeric/BasisFactory.cpp
index 90508ea,604ab7f..2b707db
--- a/Numeric/BasisFactory.cpp
+++ b/Numeric/BasisFactory.cpp
@@@ -5,13 -5,9 +5,14 @@@
  
  #include "BasisFactory.h"
  #include "GmshDefines.h"
 +<<<<<<< HEAD
 +#include "GmshMessage.h"
 +#include "miniBasis.h"
 +=======
 +>>>>>>> upstream/2.9.3+dfsg1
  #include "polynomialBasis.h"
  #include "pyramidalBasis.h"
+ #include "bezierBasis.h"
  #include "miniBasis.h"
  #include "MetricBasis.h"
  #include "CondNumBasis.h"
@@@ -100,40 -84,26 +102,59 @@@ const JacobianBasis* BasisFactory::getJ
    return J;
  }
  
+ const JacobianBasis* BasisFactory::getJacobianBasis(int tag, int order)
+ {
+   const int type = ElementType::ParentTypeFromTag(tag);
+   if (type != TYPE_PYR)
+     return getJacobianBasis(FuncSpaceData(true, tag, order));
+   else
+     return getJacobianBasis(FuncSpaceData(true, tag, false, order+1, order));
+ }
+ 
+ const JacobianBasis* BasisFactory::getJacobianBasis(int tag)
+ {
+   const int order = JacobianBasis::jacobianOrder(tag);
+   const int type = ElementType::ParentTypeFromTag(tag);
+   if (type != TYPE_PYR)
+     return getJacobianBasis(FuncSpaceData(true, tag, order));
+   else
+     return getJacobianBasis(FuncSpaceData(true, tag, false, order+2, order));
+ }
+ 
  const MetricBasis* BasisFactory::getMetricBasis(int tag)
 +<<<<<<< HEAD
 +{
 +  std::map<int, MetricBasis*>::const_iterator it = ms.find(tag);
 +  if (it != ms.end())
 +    return it->second;
 +
 +  MetricBasis* M = new MetricBasis(tag);
 +  ms.insert(std::make_pair(tag, M));
 +  return M;
 +}
 +
 +const GradientBasis* BasisFactory::getGradientBasis(int tag, int order)
 +{
 +  std::pair<int, int> key(tag, order);
 +  Cont_gradBasis::const_iterator it = gs.find(key);
 +  if (it != gs.end())
 +    return it->second;
 +
 +  GradientBasis* G = new GradientBasis(tag, order);
 +  gs.insert(std::make_pair(key, G));
 +  return G;
 +}
 +
 +const bezierBasis* BasisFactory::getBezierBasis(int parentType, int order)
 +{
 +  std::pair<int, int> key(parentType, order);
 +  Cont_bezierBasis::iterator it = bs.find(key);
 +  if (it != bs.end())
 +    return it->second;
 +
 +  bezierBasis* B = new bezierBasis(parentType, order);
 +  bs.insert(std::make_pair(key, B));
 +=======
  {
    std::map<int, MetricBasis*>::const_iterator it = ms.find(tag);
    if (it != ms.end()) return it->second;
diff --cc Numeric/JacobianBasis.cpp
index 4c20ecb,dc04a7b..aa87b3d
--- a/Numeric/JacobianBasis.cpp
+++ b/Numeric/JacobianBasis.cpp
@@@ -569,16 -481,12 +606,15 @@@ void JacobianBasis::getJacobianGeneral(
  
      case 2 : {
        fullMatrix<double> normal(1,3);
 +<<<<<<< HEAD
 +      const double invScale = getPrimNormal2D(nodesXYZ,normal);
 +=======
        const double invScale = getPrimNormal2D(nodesXYZ, normal, idealNorm);
-       if (invScale == 0) {
-         for (int i = 0; i < nJacNodes; i++) jacobian(i) = 0;
-         return;
-       }
- >>>>>>> upstream/2.9.3+dfsg1
        if (scaling) {
+         if (invScale == 0) {
+           for (int i = 0; i < nJacNodes; i++) jacobian(i) = 0;
+           return;
+         }
          const double scale = 1./invScale;
          normal(0,0) *= scale; normal(0,1) *= scale; normal(0,2) *= scale;               // Faster to scale normal than afterwards
        }
@@@ -964,10 -789,19 +1000,20 @@@ void JacobianBasis::getMetricMinAndGrad
    }
  }
  
- <<<<<<< HEAD
- =======
+ void JacobianBasis::lag2Bez(const fullVector<double> &lag,
+                                    fullVector<double> &bez) const
+ {
+   getBezier()->matrixLag2Bez.mult(lag, bez);
+ }
+ 
+ void JacobianBasis::lag2Bez(const fullMatrix<double> &lag,
+                                    fullMatrix<double> &bez) const
+ {
+   getBezier()->matrixLag2Bez.mult(lag, bez);
+ }
+ 
  // Research purpose (to be removed ?)
 +>>>>>>> upstream/2.9.3+dfsg1
  void JacobianBasis::interpolate(const fullVector<double> &jacobian,
                                  const fullMatrix<double> &uvw,
                                  fullMatrix<double> &result,
diff --cc Numeric/JacobianBasis.h
index cab1914,07e797e..91da055
--- a/Numeric/JacobianBasis.h
+++ b/Numeric/JacobianBasis.h
@@@ -51,35 -57,13 +57,35 @@@ public
                                    fullVector<double> &gSVecY,
                                    fullVector<double> &gSVecZ);
    static void mapFromIdealElement(int type, double jac[3][3]);
+ 
+   void lag2Bez(const fullMatrix<double> &lag, fullMatrix<double> &bez) const;
  };
  
 +class GradientBasis {
 + public:
 +  fullMatrix<double> gradShapeMatX, gradShapeMatY, gradShapeMatZ;
 +
 + public :
 +
 +  GradientBasis(int tag, int order);
 +
 +  int getNumSamplingPoints() const {return gradShapeMatX.size1();}
 +  int getNumMapNodes() const {return gradShapeMatX.size2();}
 +
 +  void getGradientsFromNodes(const fullMatrix<double> &nodes,
 +                             fullMatrix<double> *dxyzdX,
 +                             fullMatrix<double> *dxyzdY,
 +                             fullMatrix<double> *dxyzdZ) const;
 +};
 +
 +
  class JacobianBasis {
 +<<<<<<< HEAD
 + private:
 +  const GradientBasis *_gradBasis;
 +=======
  private:
    const GradientBasis *_gradBasis;
-   const bezierBasis *_bezier;
- 
    const FuncSpaceData _data;
    const int _dim;
  
@@@ -246,52 -188,8 +248,53 @@@ public
    inline void primJac2Jac(const fullVector<double> &primJac, fullVector<double> &jac) const {
      matrixPrimJac2Jac.mult(primJac,jac);
    }
 +<<<<<<< HEAD
 +  inline void subdivideBezierCoeff(const fullVector<double> &bez, fullVector<double> &result) const {
 +    bezier->subDivisor.mult(bez,result);
 +  }
 +  //
 +  void interpolate(const fullVector<double> &jacobian,
 +                   const fullMatrix<double> &uvw,
 +                   fullMatrix<double> &result, bool areBezier = false) const;
 +
 +  //
 +  static int jacobianOrder(int parentType, int order);
 +  static fullMatrix<double> generateJacMonomialsPyramid(int order);
 +  static fullMatrix<double> generateJacPointsPyramid(int order);
 +
 +
 + private :
 +  template<bool scaling>
 +  inline void getJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
 +                                 const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
 +                                 const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const;
 +  template<bool scaling>
 +  inline void getJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
 +                                 const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
 +                                 const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
 +                                 const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const;
 +  void getSignedJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
 +                                const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
 +                                const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const;
 +  void getSignedJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
 +                                const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
 +                                const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
 +                                const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const;
 +  void getScaledJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
 +                                const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
 +                                const fullMatrix<double> &nodesXYZ, fullVector<double> &jacobian) const;
 +  void getScaledJacobianGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
 +                                const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
 +                                const fullMatrix<double> &nodesX, const fullMatrix<double> &nodesY,
 +                                const fullMatrix<double> &nodesZ, fullMatrix<double> &jacobian) const;
 +
 +  void getSignedJacAndGradientsGeneral(int nJacNodes, const fullMatrix<double> &gSMatX,
 +                                       const fullMatrix<double> &gSMatY, const fullMatrix<double> &gSMatZ,
 +                                       const fullMatrix<double> &nodesXYZ, const fullMatrix<double> &normals,
 +                                       fullMatrix<double> &JDJ) const;
 +=======
  
+   // Research purpose (to be removed ?)
    void interpolate(const fullVector<double> &jacobian,
                     const fullMatrix<double> &uvw,
                     fullMatrix<double> &result, bool areBezier = false) const;
diff --cc Numeric/bezierBasis.cpp
index 7dc8056,88c5339..9facaeb
--- a/Numeric/bezierBasis.cpp
+++ b/Numeric/bezierBasis.cpp
@@@ -984,5 -692,400 +1009,401 @@@ void bezierBasis::_constructPyr(
                                             pyr, nij, nk);
    }
    return;
 +>>>>>>> upstream/2.9.3+dfsg1
  }
+ 
+ bezierBasisRaiser* bezierBasis::getRaiser() const
+ {
+   if (!_raiser) {
+     const_cast<bezierBasis*>(this)->_raiser = new bezierBasisRaiser(this);
+   }
+   return _raiser;
+ }
+ 
+ //const bezierBasis* bezierBasisRaiser::getRaisedBezierBasis(int raised) const
+ //{
+ //  if (raised != 2 && raised != 3) {
+ //    Msg::Error("Why would you want other than 2 or 3?");
+ //    return NULL;
+ //  }
+ //  if (_bfs->_data.elementType() != TYPE_PYR)
+ //    return BasisFactory::getBezierBasis(
+ //        FuncSpaceData(_bfs->_data, _bfs->_data.spaceOrder()*raised));
+ //  else
+ //    return BasisFactory::getBezierBasis(
+ //        FuncSpaceData(_bfs->_data,
+ //                      _bfs->_data.nij()*raised,
+ //                      _bfs->_data.nk()*raised));
+ //}
+ 
+ void bezierBasisRaiser::_fillRaiserData()
+ {
+   if (_bfs->getType() == TYPE_PYR) {
+     _fillRaiserDataPyr();
+     return;
+   }
+ 
+   fullMatrix<int> exp;
+   {
+     const fullMatrix<double> &expD = _bfs->_exponents;
+     double2int(expD, exp);
+   }
+   int order = _bfs->getOrder();
+   int ncoeff = exp.size1();
+   int dim = _bfs->getDim();
+   int dimSimplex = _bfs->getDimSimplex();
+ 
+   // Speedup: Since the coefficients (num/den) are invariant from a permutation
+   // of the indices (i, j) or (i, j, k), we fill only the raiser data for
+   // i <= j <= k (and adapt the value to take into account the multiplicity).
+ 
+   // Construction of raiser 2
+   fullMatrix<int> exp2;
+   {
+     fullMatrix<double> expD2;
+     FuncSpaceData dataRaiser2(_bfs->_data, 2*order);
+     gmshGenerateMonomials(dataRaiser2, expD2);
+     double2int(expD2, exp2);
+     _raiser2.resize(exp2.size1());
+   }
+ 
+   std::map<int, int> hashToInd2;
+   for (int i = 0; i < exp2.size1(); ++i) {
+     int hash = 0;
+     for (int l = 0; l < dim; l++) {
+       hash += exp2(i, l) * pow_int(2*order+1, l);
+     }
+     hashToInd2[hash] = i;
+   }
+ 
+   for (int i = 0; i < ncoeff; i++) {
+     for (int j = i; j < ncoeff; j++) {
+       double num = 1, den = 1;
+       {
+         int compl1 = order;
+         int compl2 = order;
+         int compltot = 2*order;
+         for (int l = 0; l < dimSimplex; l++) {
+           num *= nChoosek(compl1, exp(i, l)) *
+                  nChoosek(compl2, exp(j, l));
+           den *= nChoosek(compltot, exp(i, l) + exp(j, l));
+           compl1 -= exp(i, l);
+           compl2 -= exp(j, l);
+           compltot -= exp(i, l) + exp(j, l);
+         }
+         for (int l = dimSimplex; l < dim; l++) {
+           num *= nChoosek(order, exp(i, l)) *
+                  nChoosek(order, exp(j, l));
+           den *= nChoosek(2*order, exp(i, l) + exp(j, l));
+         }
+       }
+ 
+       // taking into account the multiplicity (reminder: i <= j)
+       if (i < j) num *= 2;
+ 
+       int hash = 0;
+       for (int l = 0; l < dim; l++) {
+         hash += (exp(i, l)+exp(j, l)) * pow_int(2*order+1, l);
+       }
+       _raiser2[hashToInd2[hash]].push_back(_Data(num/den, i, j));
+     }
+   }
+ 
+   // Construction of raiser 3
+   fullMatrix<int> exp3;
+   {
+     fullMatrix<double> expD3;
+     FuncSpaceData dataRaiser3(_bfs->_data, 3*order);
+     gmshGenerateMonomials(dataRaiser3, expD3);
+     double2int(expD3, exp3);
+     _raiser3.resize(exp3.size1());
+   }
+ 
+   std::map<int, int> hashToInd3;
+   for (int i = 0; i < exp3.size1(); ++i) {
+     int hash = 0;
+     for (int l = 0; l < dim; l++) {
+       hash += exp3(i, l) * pow_int(3*order+1, l);
+     }
+     hashToInd3[hash] = i;
+   }
+ 
+   for (int i = 0; i < ncoeff; i++) {
+     for (int j = i; j < ncoeff; j++) {
+       for (int k = j; k < ncoeff; ++k) {
+         double num = 1, den = 1;
+         {
+           int compl1 = order;
+           int compl2 = order;
+           int compl3 = order;
+           int compltot = 3*order;
+           for (int l = 0; l < dimSimplex; l++) {
+             num *= nChoosek(compl1, exp(i, l)) *
+                    nChoosek(compl2, exp(j, l)) *
+                    nChoosek(compl3, exp(k, l));
+             den *= nChoosek(compltot, exp(i, l) + exp(j, l) + exp(k, l));
+             compl1 -= exp(i, l);
+             compl2 -= exp(j, l);
+             compl3 -= exp(k, l);
+             compltot -= exp(i, l) + exp(j, l) + exp(k, l);
+           }
+           for (int l = dimSimplex; l < dim; l++) {
+             num *= nChoosek(order, exp(i, l)) *
+                    nChoosek(order, exp(j, l)) *
+                    nChoosek(order, exp(k, l));
+             den *= nChoosek(3*order, exp(i, l) + exp(j, l) + exp(k, l));
+           }
+         }
+ 
+         // taking into account the multiplicity (Reminder: i <= j <= k)
+         if (i < j && j < k) num *= 6;
+         else if (i < j || j < k) num *= 3;
+ 
+         int hash = 0;
+         for (int l = 0; l < dim; l++) {
+           hash += (exp(i, l)+exp(j, l)+exp(k, l)) * pow_int(3*order+1, l);
+         }
+         _raiser3[hashToInd3[hash]].push_back(_Data(num/den, i, j, k));
+       }
+     }
+   }
+ }
+ 
+ void bezierBasisRaiser::_fillRaiserDataPyr()
+ {
+   FuncSpaceData fsdata = _bfs->getFuncSpaceData();
+   if (fsdata.elementType() != TYPE_PYR) {
+     _fillRaiserData();
+     return;
+   }
+   if (fsdata.isPyramidalSpace()) {
+     Msg::Error("Bezier raiser not implemented for pyramidal space");
+     return;
+   }
+ 
+   fullMatrix<int> exp;
+   {
+     const fullMatrix<double> &expD = _bfs->_exponents;
+     double2int(expD, exp);
+   }
+   int ncoeff = exp.size1();
+   int order[3] = {fsdata.nij(), fsdata.nij(), fsdata.nk()};
+   int orderHash = std::max(order[0], order[1]);
+ 
+   // Speedup: Since the coefficients (num/den) are invariant from a permutation
+   // of the indices (i, j) or (i, j, k), we fill only the raiser data for
+   // i <= j <= k (and adapt the value to take into account the multiplicity).
+ 
+   // Construction of raiser 2
+   fullMatrix<int> exp2;
+   {
+     fullMatrix<double> expD2;
+     FuncSpaceData dataRaiser2(_bfs->_data, 2*order[0], 2*order[2]);
+     gmshGenerateMonomials(dataRaiser2, expD2);
+     double2int(expD2, exp2);
+     _raiser2.resize(exp2.size1());
+   }
+ 
+   std::map<int, int> hashToInd2;
+   for (int i = 0; i < exp2.size1(); ++i) {
+     int hash = 0;
+     for (int l = 0; l < 3; l++) {
+       hash += exp2(i, l) * pow_int(2*orderHash+1, l);
+     }
+     hashToInd2[hash] = i;
+   }
+ 
+   for (int i = 0; i < ncoeff; i++) {
+     for (int j = i; j < ncoeff; j++) {
+       double num = 1, den = 1;
+       for (int l = 0; l < 3; l++) {
+         num *= nChoosek(order[l], exp(i, l))
+              * nChoosek(order[l], exp(j, l));
+         den *= nChoosek(2*order[l], exp(i, l) + exp(j, l));
+       }
+ 
+       // taking into account the multiplicity (reminder: i <= j)
+       if (i < j) num *= 2;
+ 
+       int hash = 0;
+       for (int l = 0; l < 3; l++) {
+         hash += (exp(i, l)+exp(j, l)) * pow_int(2*orderHash+1, l);
+       }
+       _raiser2[hashToInd2[hash]].push_back(_Data(num/den, i, j));
+     }
+   }
+ 
+   // Construction of raiser 3
+   fullMatrix<int> exp3;
+   {
+     fullMatrix<double> expD3;
+     FuncSpaceData dataRaiser3(_bfs->_data, 3*order[0], 3*order[2]);
+     gmshGenerateMonomials(dataRaiser3, expD3);
+     double2int(expD3, exp3);
+     _raiser3.resize(exp3.size1());
+   }
+ 
+   std::map<int, int> hashToInd3;
+   for (int i = 0; i < exp3.size1(); ++i) {
+     int hash = 0;
+     for (int l = 0; l < 3; l++) {
+       hash += exp3(i, l) * pow_int(3*orderHash+1, l);
+     }
+     hashToInd3[hash] = i;
+   }
+ 
+   for (int i = 0; i < ncoeff; i++) {
+     for (int j = i; j < ncoeff; j++) {
+       for (int k = j; k < ncoeff; ++k) {
+         double num = 1, den = 1;
+         for (int l = 0; l < 3; l++) {
+           num *= nChoosek(order[l], exp(i, l))
+                * nChoosek(order[l], exp(j, l))
+                * nChoosek(order[l], exp(k, l));
+           den *= nChoosek(3*order[l], exp(i, l) + exp(j, l) + exp(k, l));
+         }
+ 
+         // taking into account the multiplicity (Reminder: i <= j <= k)
+         if (i < j && j < k) num *= 6;
+         else if (i < j || j < k) num *= 3;
+ 
+         int hash = 0;
+         for (int l = 0; l < 3; l++) {
+           hash += (exp(i, l)+exp(j, l)+exp(k, l)) * pow_int(3*orderHash+1, l);
+         }
+         _raiser3[hashToInd3[hash]].push_back(_Data(num/den, i, j, k));
+       }
+     }
+   }
+ }
+ 
+ void bezierBasisRaiser::computeCoeff(const fullVector<double> &coeffA,
+                                      const fullVector<double> &coeffB,
+                                      fullVector<double> &coeffSquare)
+ {
+   coeffSquare.resize(_raiser2.size(), true);
+ 
+   if (&coeffA == &coeffB) {
+     for (unsigned int ind = 0; ind < _raiser2.size(); ++ind) {
+       for (unsigned int l = 0; l < _raiser2[ind].size(); ++l) {
+         _Data &d = _raiser2[ind][l];
+         coeffSquare(ind) += d.val * coeffA(d.i) * coeffB(d.j);
+       }
+     }
+   }
+   else {
+     for (unsigned int ind = 0; ind < _raiser2.size(); ++ind) {
+       for (unsigned int l = 0; l < _raiser2[ind].size(); ++l) {
+         _Data &d = _raiser2[ind][l];
+         coeffSquare(ind) += d.val/2 * (coeffA(d.i) * coeffB(d.j) +
+                                        coeffA(d.j) * coeffB(d.i));
+       }
+     }
+   }
+ }
+ 
+ void bezierBasisRaiser::computeCoeff(const fullVector<double> &coeffA,
+                                      const fullVector<double> &coeffB,
+                                      const fullVector<double> &coeffC,
+                                      fullVector<double> &coeffCubic)
+ {
+   coeffCubic.resize(_raiser3.size(), true);
+ 
+   if (&coeffA == &coeffB && &coeffB == &coeffC) {
+     for (unsigned int ind = 0; ind < _raiser3.size(); ++ind) {
+       for (unsigned int l = 0; l < _raiser3[ind].size(); ++l) {
+         _Data &d = _raiser3[ind][l];
+         coeffCubic(ind) += d.val * coeffA(d.i) * coeffB(d.j) * coeffC(d.k);
+       }
+     }
+   }
+   else if (&coeffA != &coeffB && &coeffB != &coeffC) {
+     for (unsigned int ind = 0; ind < _raiser3.size(); ++ind) {
+       for (unsigned int l = 0; l < _raiser3[ind].size(); ++l) {
+         _Data &d = _raiser3[ind][l];
+         coeffCubic(ind) += d.val/6 * (coeffA(d.i) * coeffB(d.j) * coeffC(d.k) +
+                                       coeffA(d.i) * coeffB(d.k) * coeffC(d.j) +
+                                       coeffA(d.j) * coeffB(d.i) * coeffC(d.k) +
+                                       coeffA(d.j) * coeffB(d.k) * coeffC(d.i) +
+                                       coeffA(d.k) * coeffB(d.i) * coeffC(d.j) +
+                                       coeffA(d.k) * coeffB(d.j) * coeffC(d.i));
+       }
+     }
+   }
+   else
+     Msg::Error("bezierBasisRaiser::computeCoeff not implemented for A == B != C "
+                "or A != B == C");
+ }
+ 
+ void bezierBasisRaiser::computeCoeff(const fullMatrix<double> &coeffA,
+                                      const fullMatrix<double> &coeffB,
+                                      fullMatrix<double> &coeffSquare)
+ {
+   coeffSquare.resize(_raiser2.size(), coeffA.size2(), true);
+ 
+   if (&coeffA == &coeffB) {
+     for (unsigned int ind = 0; ind < _raiser2.size(); ++ind) {
+       for (unsigned int l = 0; l < _raiser2[ind].size(); ++l) {
+         _Data &d = _raiser2[ind][l];
+         for (int ind2 = 0; ind2 < coeffA.size2(); ++ind2) {
+           coeffSquare(ind, ind2) += d.val * coeffA(d.i, ind2)
+                                           * coeffB(d.j, ind2);
+         }
+       }
+     }
+   }
+   else {
+     for (unsigned int ind = 0; ind < _raiser2.size(); ++ind) {
+       for (unsigned int l = 0; l < _raiser2[ind].size(); ++l) {
+         _Data &d = _raiser2[ind][l];
+         double val = d.val/2;
+         for (int ind2 = 0; ind2 < coeffA.size2(); ++ind2) {
+           coeffSquare(ind, ind2) += val *
+                                     (coeffA(d.i, ind2) * coeffB(d.j, ind2) +
+                                      coeffA(d.j, ind2) * coeffB(d.i, ind2));
+         }
+       }
+     }
+   }
+ }
+ 
+ void bezierBasisRaiser::computeCoeff(const fullVector<double> &coeffA,
+                                      const fullMatrix<double> &coeffB,
+                                      const fullMatrix<double> &coeffC,
+                                      fullMatrix<double> &coeffCubic)
+ {
+   coeffCubic.resize(_raiser3.size(), coeffB.size2(), true);
+ 
+   if (&coeffB == &coeffC) {
+     for (unsigned int ind = 0; ind < _raiser3.size(); ++ind) {
+       for (unsigned int l = 0; l < _raiser3[ind].size(); ++l) {
+         _Data &d = _raiser3[ind][l];
+         double val = d.val/3;
+         for (int ind2 = 0; ind2 < coeffB.size2(); ++ind2) {
+           coeffCubic(ind, ind2) += val *
+                 (coeffA(d.i) * coeffB(d.j, ind2) * coeffC(d.k, ind2) +
+                  coeffA(d.j) * coeffB(d.i, ind2) * coeffC(d.k, ind2) +
+                  coeffA(d.k) * coeffB(d.i, ind2) * coeffC(d.j, ind2));
+         }
+       }
+     }
+   }
+   else {
+     for (unsigned int ind = 0; ind < _raiser3.size(); ++ind) {
+       for (unsigned int l = 0; l < _raiser3[ind].size(); ++l) {
+         _Data &d = _raiser3[ind][l];
+         double val = d.val/6;
+         for (int ind2 = 0; ind2 < coeffB.size2(); ++ind2) {
+           coeffCubic(ind, ind2) += val *
+                 (coeffA(d.i) * coeffB(d.j, ind2) * coeffC(d.k, ind2) +
+                  coeffA(d.i) * coeffB(d.k, ind2) * coeffC(d.j, ind2) +
+                  coeffA(d.j) * coeffB(d.i, ind2) * coeffC(d.k, ind2) +
+                  coeffA(d.j) * coeffB(d.k, ind2) * coeffC(d.i, ind2) +
+                  coeffA(d.k) * coeffB(d.i, ind2) * coeffC(d.j, ind2) +
+                  coeffA(d.k) * coeffB(d.j, ind2) * coeffC(d.i, ind2));
+         }
+       }
+     }
+   }
+ }
+ 
diff --cc Parser/Gmsh.yy.cpp
index 6d997a6,4ae0cbb..83e6296
--- a/Parser/Gmsh.yy.cpp
+++ b/Parser/Gmsh.yy.cpp
@@@ -1857,16 -1865,8 +1865,16 @@@ return tEndFor
  	YY_BREAK
  case 87:
  YY_RULE_SETUP
 +<<<<<<< HEAD
 +#line 166 "Gmsh.l"
 +<<<<<<< HEAD
 +return tFileExists;
 +=======
 +return tFind;
 +>>>>>>> upstream/2.9.3+dfsg1
 +=======
  #line 165 "Gmsh.l"
- return tError;
+ return tEndIf;
  	YY_BREAK
  case 88:
  YY_RULE_SETUP
@@@ -1945,40 -1945,8 +1953,40 @@@ return tGetString
  	YY_BREAK
  case 103:
  YY_RULE_SETUP
 +<<<<<<< HEAD
 +#line 184 "Gmsh.l"
 +return tHypot;
 +>>>>>>> upstream/2.9.3+dfsg1
 +	YY_BREAK
 +case 104:
 +YY_RULE_SETUP
 +#line 186 "Gmsh.l"
 +<<<<<<< HEAD
 +return tIntersect;
 +=======
 +return tIn;
 +>>>>>>> upstream/2.9.3+dfsg1
 +	YY_BREAK
 +case 105:
 +YY_RULE_SETUP
 +#line 187 "Gmsh.l"
 +<<<<<<< HEAD
 +return tInterpolationScheme;
 +	YY_BREAK
 +case 106:
 +YY_RULE_SETUP
 +#line 189 "Gmsh.l"
 +return tNurbsKnots;
 +	YY_BREAK
 +case 107:
 +YY_RULE_SETUP
 +#line 191 "Gmsh.l"
 +return tLength;
 +=======
 +return tIf;
 +=======
  #line 183 "Gmsh.l"
- return tGetStringValue;
+ return tGetNumber;
  	YY_BREAK
  case 104:
  YY_RULE_SETUP
diff --cc Plugin/AnalyseCurvedMesh.cpp
index cf23774,6e8eb1b..725db98
--- a/Plugin/AnalyseCurvedMesh.cpp
+++ b/Plugin/AnalyseCurvedMesh.cpp
@@@ -3,26 -3,13 +3,30 @@@
  // See the LICENSE.txt file for license information. Please report all
  // bugs and problems to the public mailing list <gmsh at onelab.info>.
  
+ #include "GmshConfig.h"
+ 
+ #if defined(HAVE_MESH)
+ 
  #include "AnalyseCurvedMesh.h"
 +<<<<<<< HEAD
 +#include "GModel.h"
 +#include "OS.h"
 +#include "Context.h"
 +
 +#include <cmath>
 +#include <queue>
 +#include <sstream>
 +
 +//#include "Gmsh.h"
 +//#include "GmshMessage.h"
 +//#include "polynomialBasis.h"
 +//#include <fstream>
 +//#include "PView.h"
 +
 +=======
  #include "OS.h"
  #include "Context.h"
 +>>>>>>> upstream/2.9.3+dfsg1
  #if defined(HAVE_OPENGL)
  #include "drawContext.h"
  #endif
@@@ -672,31 -369,21 +386,28 @@@ void GMSH_AnalyseCurvedMeshPlugin::_com
  
    for (unsigned int i = 0; i < _data.size(); ++i) {
      MElement *const el = _data[i].element();
- <<<<<<< HEAD
-     if (el->getDim() == _dim) {
-       if (_data[i].minJ() <= 0)
-         _data[i].setMinR(0);
-       else if (_data[i].maxJ() - _data[i].minJ() < _tol * 1e-2)
-         _data[i].setMinR(MetricBasis::sampleR(el, 0));
- =======
-     if (el->getDim() == dim) {
-       if (_data[i].minJ() <= 0)
-         _data[i].setMinR(0);
-       else if (_data[i].maxJ() - _data[i].minJ() < _tol * 1e-2)
-         _data[i].setMinR(MetricBasis::minSampledR(el, 0));
- >>>>>>> upstream/2.9.3+dfsg1
-       else
-         _data[i].setMinR(MetricBasis::boundMinR(el));
+     if (el->getDim() != dim) continue;
+     if (_data[i].minJ() <= 0) {
+       _data[i].setMinI(0);
      }
+     else {
+       _data[i].setMinI(jacobianBasedQuality::minIsotropyMeasure(el, true));
+     }
+ //    Msg::Info("Isotropy");
+ //    Msg::Info("========");
+ //    for (int k = 1; k < 30; ++k) {
+ //      Msg::Info("%.10g", jacobianBasedQuality::minSampledIsotropyMeasure(el, k));
+ //    }
+ //    Msg::Info(" ");
      if (i >= nextCheck) {
        nextCheck += _data.size() / 100;
 +<<<<<<< HEAD
 +      if (Cpu() - time > 10. && i*100/_data.size() > percentage + 4) {
 +        percentage = i*100/_data.size();
 +        time = Cpu();
 +        Msg::StatusBar(true, "%d%% (remaining time ~%g secondes)",
 +            percentage, (Cpu()-initial) / (i+1) * (_data.size() - i-1));
 +=======
        double curTime = Cpu();
        unsigned int curPercentage = i*100/_data.size();
        if ((curTime - time > 10. && curPercentage > percentage + 4) ||
@@@ -710,34 -404,35 +428,38 @@@
      }
    }
  
- <<<<<<< HEAD
-   if (_dim == 2) _computedR2D = true;
-   if (_dim == 3) _computedR3D = true;
- }
- 
- bool GMSH_AnalyseCurvedMeshPlugin::_hideWithThreshold()
- =======
-   _computedR[dim-1] = true;
+   _computedI[dim-1] = true;
  }
  
- bool GMSH_AnalyseCurvedMeshPlugin::_hideWithThreshold(int askedDim)
- >>>>>>> upstream/2.9.3+dfsg1
+ int GMSH_AnalyseCurvedMeshPlugin::_hideWithThreshold(int askedDim, int whichMeasure)
  {
-   if (_threshold >= 1.) return false;
+   // only hide for quality measures
+   if (_threshold > 1 || whichMeasure == 0) return 0;
+ 
+   int nHidden = 0;
  
-   bool ans = false;
    for (unsigned int i = 0; i < _data.size(); ++i) {
      MElement *const el = _data[i].element();
 +<<<<<<< HEAD
 +    if (el->getDim() == _dim) {
 +=======
      const int dim = el->getDim();
      if ((askedDim == 4 && dim > 1) || dim == askedDim) {
- >>>>>>> upstream/2.9.3+dfsg1
-       if (( _computeMetric && _data[i].minR() > _threshold) ||
-           (!_computeMetric && _data[i].minJ() > _threshold)   ) {
+       bool toHide = false;
+       switch (whichMeasure) {
+       case 2:
+         toHide = _data[i].minI() > _threshold;
+         break;
+       case 1:
+         toHide = _data[i].minS() > _threshold;
+         break;
+       case 0:
+         toHide = _data[i].minJ() > _threshold;
+         break;
+       }
+       if (toHide) {
          el->setVisibility(0);
-         ans = true;
+         ++nHidden;
        }
        else {
          el->setVisibility(1);
diff --cc Plugin/AnalyseCurvedMesh.h
index accaac7,bfaef52..fae5a48
--- a/Plugin/AnalyseCurvedMesh.h
+++ b/Plugin/AnalyseCurvedMesh.h
@@@ -45,55 -39,32 +46,42 @@@ public
  class GMSH_AnalyseCurvedMeshPlugin : public GMSH_PostPlugin
  {
  private :
 +<<<<<<< HEAD
 +  int _dim;
 +  GModel *_m;
 +  double _threshold, _tol;
 +  int _numPView, _computeMetric;
 +  bool _recompute;
 +  bool _computedR3D, _computedR2D;
 +  bool _computedJ3D, _computedJ2D, _computedJ1D;
 +  bool _1PViewJ, _2PViewJ, _1PViewR, _2PViewR;
 +=======
    GModel *_m;
-   double _threshold, _tol;
-   int _computeMetric;
+   double _threshold;
  
    // for 1d, 2d, 3d
-   bool _computedR[3], _computedJ[3], _PViewJ[3], _PViewR[3];
- >>>>>>> upstream/2.9.3+dfsg1
-   bool _msgHide;
+   bool _computedJ[3], _computedS[3], _computedI[3];
+   bool _PViewJ[3], _PViewS[3], _PViewI[3];
  
-   std::vector<CurvedMeshPluginData> _data;
+   std::vector<data_elementMinMax> _data;
  
  public :
-   GMSH_AnalyseCurvedMeshPlugin() {
- <<<<<<< HEAD
-     _computedR3D = false;
-     _computedR2D = false;
-     _computedJ3D = false;
-     _computedJ2D = false;
-     _computedJ1D = false;
-     _msgHide = true;
-     _1PViewJ = false;
-     _2PViewJ = false;
-     _1PViewR = false;
-     _2PViewR = false;
- =======
+   GMSH_AnalyseCurvedMeshPlugin()
+   {
      _m = NULL;
-     _threshold = _tol = -1;
-     _computeMetric = -1;
+     _threshold = -1;
      for (int i = 0; i < 3; ++i) {
-       _computedR[i] = false;
        _computedJ[i] = false;
+       _computedS[i] = false;
+       _computedI[i] = false;
        _PViewJ[i] = false;
-       _PViewR[i] = false;
+       _PViewS[i] = false;
+       _PViewI[i] = false;
      }
-     _msgHide = true;
- >>>>>>> upstream/2.9.3+dfsg1
    }
    std::string getName() const { return "AnalyseCurvedMesh"; }
-   std::string getShortHelp() const {
+   std::string getShortHelp() const
+   {
      return "Compute bounds on Jacobian and metric quality.";
    }
    std::string getHelp() const;
diff --cc Solver/elasticitySolver.cpp
index 663c350,ace825b..1e31a4d
--- a/Solver/elasticitySolver.cpp
+++ b/Solver/elasticitySolver.cpp
@@@ -489,17 -521,14 +540,20 @@@ void elasticitySolver::assemble(linearS
    // Assemble cross term, laplace term and rhs term for LM
    GaussQuadrature Integ_LagrangeMult(GaussQuadrature::ValVal);
    GaussQuadrature Integ_Laplace(GaussQuadrature::GradGrad);
 +<<<<<<< HEAD
 +  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); i++)
 +  {
 +    LagrangeMultiplierTerm LagTerm(*LagSpace, *LagrangeMultiplierSpace,
 +                                   LagrangeMultiplierFields[i]._d);
 +=======
    for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); i++){
-     LagrangeMultiplierTerm<SVector3> LagTerm(*LagSpace, *LagrangeMultiplierSpace,
+     unsigned int j = 0;
+     for ( ; j < LagrangeMultiplierSpaces.size(); j++)
+       if (LagrangeMultiplierSpaces[j]->getId() == LagrangeMultiplierFields[i]._tag) break;
+     printf("Lagrange Mult Lag\n");
+     LagrangeMultiplierTerm<SVector3> LagTerm(*LagSpace, *(LagrangeMultiplierSpaces[j]),
                                               LagrangeMultiplierFields[i]._d);
- >>>>>>> upstream/2.9.3+dfsg1
-     Assemble(LagTerm, *LagSpace, *LagrangeMultiplierSpace,
+     Assemble(LagTerm, *LagSpace, *(LagrangeMultiplierSpaces[j]),
               LagrangeMultiplierFields[i].g->begin(),
               LagrangeMultiplierFields[i].g->end(), Integ_LagrangeMult, *pAssembler);
  
@@@ -515,25 -546,12 +571,17 @@@
    // Assemble elastic term for
    GaussQuadrature Integ_Bulk(GaussQuadrature::GradGrad);
    for (unsigned int i = 0; i < elasticFields.size(); i++){
+     printf("Elastic\n");
      IsotropicElasticTerm Eterm(*LagSpace,elasticFields[i]._E,elasticFields[i]._nu);
 +<<<<<<< HEAD
 +    Assemble(Eterm,*LagSpace,elasticFields[i].g->begin(),elasticFields[i].g->end(),
 +             Integ_Bulk,*pAssembler);
 +=======
      Assemble(Eterm, *LagSpace, elasticFields[i].g->begin(), elasticFields[i].g->end(),
               Integ_Bulk, *pAssembler);
 +>>>>>>> upstream/2.9.3+dfsg1
    }
  
-   /*for (int i=0;i<pAssembler->sizeOfR();i++){
-     for (int j=0;j<pAssembler->sizeOfR();j++){
-       double d;lsys->getFromMatrix(i,j,d);
-       printf("%12.5E ",d);
-     }
-     double d;lsys->getFromRightHandSide(i,d);
-     printf(" |  %12.5E\n",d);
-   }*/
- 
    printf("nDofs=%d\n",pAssembler->sizeOfR());
    printf("nFixed=%d\n",pAssembler->sizeOfF());
  
@@@ -841,19 -965,15 +1015,23 @@@ PView* elasticitySolver::buildStrainVie
    return pv;
  }
  
- PView* elasticitySolver::buildLagrangeMultiplierView (const std::string postFileName)
+ PView* elasticitySolver::buildLagrangeMultiplierView (const std::string postFileName, int tag)
  {
    std::cout <<  "build Lagrange Multiplier View"<< std::endl;
-   if(!LagrangeMultiplierSpace) return new PView();
+   unsigned int t = 0;
+   if(tag != -1)
+     for ( ; t < LagrangeMultiplierSpaces.size(); t++)
+       if (LagrangeMultiplierSpaces[t]->getId() == tag) break;
+   if(t == LagrangeMultiplierSpaces.size()) return new PView();
    std::set<MVertex*> v;
 +<<<<<<< HEAD
 +  for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i)
 +  {
 +    for(groupOfElements::elementContainer::const_iterator it =
 +          LagrangeMultiplierFields[i].g->begin();
 +        it != LagrangeMultiplierFields[i].g->end(); ++it)
 +    {
 +=======
    for (unsigned int i = 0; i < LagrangeMultiplierFields.size(); ++i){
      for(groupOfElements::elementContainer::const_iterator it =
            LagrangeMultiplierFields[i].g->begin();
diff --cc contrib/HighOrderMeshOptimizer/OptHomRun.cpp
index 3dcea2e,cd62cfd..ca2c4d7
--- a/contrib/HighOrderMeshOptimizer/OptHomRun.cpp
+++ b/contrib/HighOrderMeshOptimizer/OptHomRun.cpp
@@@ -876,18 -665,17 +865,18 @@@ void HighOrderMeshOptimizer(GModel *gm
          el->scaledJacRange(jmin, jmax, p.optPrimSurfMesh ? entity : 0);
          if (p.BARRIER_MIN_METRIC > 0) jmax = jmin;
          if (jmin < p.BARRIER_MIN || jmax > p.BARRIER_MAX) badasses.insert(el);
 +>>>>>>> upstream/2.9.3+dfsg1
        }
      }
-   }
-   printf("maxdist = %g badasses size = %lu\n", maxdist, badasses.size());
- 
-   if (p.strategy == 0)
-     optimizeConnectedBlobs(vertex2elements, element2entity, badasses, p, samples, false);
-   else if (p.strategy == 2)
-     optimizeConnectedBlobs(vertex2elements, element2entity, badasses, p, samples, true);
-   else
-     optimizeOneByOne(vertex2elements, element2entity, badasses, p, samples);
+     printf("maxdist = %g badasses size = %lu\n", maxdist, badasses.size());
+     if (p.strategy == 0)
+       optimizeConnectedBlobs(vertex2elements, element2entity, badasses, p, samples, false);
+     else if (p.strategy == 2)
+       optimizeConnectedBlobs(vertex2elements, element2entity, badasses, p, samples, true);
+     else
+       optimizeOneByOne(vertex2elements, element2entity, badasses, p, samples);
+     if (p.numBlobs) periodicity.fixPeriodicity();
+   } while (p.SUCCESS == 1 && p.numBlobs);
  
    if (p.SUCCESS == 1)
      Msg::Info("Optimization succeeded");
diff --cc contrib/mobile/iOS/Onelab/AboutViewController.mm
index 74ab34d,038a1bc..48b72e3
--- a/contrib/mobile/iOS/Onelab/AboutViewController.mm
+++ b/contrib/mobile/iOS/Onelab/AboutViewController.mm
@@@ -35,13 -35,8 +35,9 @@@
    // Do any additional setup after loading the view.
    self.aboutView.delegate = self;
    self.aboutView.dataDetectorTypes = UIDataDetectorTypeNone;
- <<<<<<< HEAD
-   [self.aboutView loadHTMLString:[NSString stringWithFormat:@"<html><head><style type=\"text/css\"><!--body { background-color: #FFFFFF; color: #252525; margin: 35px 10px 35px 10px; padding: 0; font-family: helvetica-neue,sans-serif; font-size: 1em; }--></style></head><body><center><p><!--img width=32 src=\"icon_onelab.png\"--></p><h3>Onelab/Mobile</h3>Version %@<p>Copyright (C) 2014 Christophe Geuzaine and Maxime Graulich, University of Liège</p><p>Visit <a href=\"http://onelab. [...]
-                                            [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"],
- =======
-   [self.aboutView loadHTMLString:[NSString stringWithFormat:@"<html><head><style type=\"text/css\"><!--body { background-color: #FFFFFF; color: #252525; margin: 35px 10px 35px 10px; padding: 0; font-family: helvetica-neue,sans-serif; font-size: 1em; }--></style></head><body><center><p><!--img width=32 src=\"icon_onelab.png\"--></p><h3>Onelab/Mobile</h3>Version %@<p>Copyright (C) 2014-2015 Christophe Geuzaine and Maxime Graulich, University of Liège</p><p>Visit <a href=\"http://on [...]
+   [self.aboutView loadHTMLString:[NSString stringWithFormat:@"<html><head><style type=\"text/css\"><!--body { background-color: #FFFFFF; color: #252525; margin: 35px 10px 35px 10px; padding: 0; font-family: helvetica-neue,sans-serif; font-size: 1em; }--></style></head><body><center><p><!--img width=32 src=\"icon_onelab.png\"--></p><h3>Onelab/Mobile</h3>Version %@<p>Copyright (C) 2014-2016 Christophe Geuzaine and Maxime Graulich, University of Liège</p><p>Visit <a href=\"http://on [...]
                                             [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"],
 +>>>>>>> upstream/2.9.3+dfsg1
                                             GMSH_VERSION,
                                             GMSH_DATE,
                                             GMSH_CONFIG_OPTIONS,
diff --cc contrib/onelab/python/onelab.py
index 4640609,bee2404..4d33a40
--- a/contrib/onelab/python/onelab.py
+++ b/contrib/onelab/python/onelab.py
@@@ -27,12 -27,8 +27,11 @@@ Please report all bugs and problems to 
  <gmsh at onelab.info>.
  """
  
 +<<<<<<< HEAD
 +import socket, struct, os, sys, subprocess
 +=======
  import socket, struct, os, sys, subprocess, time
- >>>>>>> upstream/2.9.3+dfsg1
- _VERSION = '1.1'
+ _VERSION = '1.2'
  
  def path(dirname, inp):
    # dirname is a directory, can be empty
diff --cc doc/CREDITS.txt
index ee3d66a,356229a..6aa52e8
--- a/doc/CREDITS.txt
+++ b/doc/CREDITS.txt
@@@ -131,9 -134,5 +134,8 @@@ Van den Abeele, Simon Vun, Simon Corbin
  Dechaume, Jose Paulo Moitinho de Almeida, Thomas Pinchard, Corrado Chisari, Axel
  Hackbarth, Peter Wainwright, Jiri Hnidek, Thierry Thomas, Konstantinos Poulios,
  Laurent Van Miegroet, Shahrokh Ghavamian, Geordie McBain, Jose Paulo Moitinho de
 +<<<<<<< HEAD
 +Almeida, Guillaume Demesy, Wendy Merks-Swolfs, Cosmin Stefan Deaconu.
 +=======
  Almeida, Guillaume Demesy, Wendy Merks-Swolfs, Cosmin Stefan Deaconu, Nigel
- Nunn, Serban Georgescu.
- >>>>>>> upstream/2.9.3+dfsg1
+ Nunn, Serban Georgescu, Julien Troufflard, Michele Mocciola.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gmsh.git



More information about the debian-science-commits mailing list