Salome HOME
remove src/MEDCalc/doc
[tools/medcoupling.git] / src / ParaMEDMEM / NonCoincidentDEC.cxx
index 4015ee7e00a60b8ed324f6fa0dd493aefbcad53e..4f44a7f54a8ed3d943c73cc76212295cdfa737a3 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
 //
 // This library 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,18 +38,18 @@ namespace ParaMEDMEM
 {
 
   /*!
-    \defgroup noncoincidentdec NonCoincidentDEC
-
-    \section overview Overview
+    \anchor NonCoincidentDEC-det
+    \class NonCoincidentDEC
 
     \c NonCoincidentDEC enables nonconservative remapping of fields 
     between two parallel codes. 
     The computation is possible for 3D meshes and 2D meshes.
     It is not available for 3D surfaces. The computation enables fast parallel localization, and is based on a point in element search, followed 
     by a field evaluation at the point location. Thus, it is typically
-    faster than the \ref interpkerneldec which gives a \ref conservativeremapping.
+    faster than the \ref InterpKernelDEC-det "InterpKernelDEC" which gives a
+    \ref InterpKerRemapGlobal "conservative remapping".
     It is particularly true for the initialisation phase (synchronize)
-    which is very computationnaly intensive in \ref interpkerneldec.
+    which is very computationnaly intensive in \ref InterpKernelDEC-det.
 
     In the present version, only fields lying on elements are considered. 
     The value is estimated by locating the barycenter of the target
@@ -98,7 +98,8 @@ namespace ParaMEDMEM
   fvm_nodal_t*  medmemMeshToFVMMesh(const MEDMEM::MESH* mesh)
   {
     // create an FVM structure from the paramesh structure
-    fvm_nodal_t * fvm_nodal = fvm_nodal_create(mesh->getName().c_str(),mesh->getMeshDimension());
+    std::string meshName(mesh->getName());//this line avoid that mesh->getName() object killed before fvm_nodal_create read the const char *.
+    fvm_nodal_t * fvm_nodal = fvm_nodal_create(meshName.c_str(),mesh->getMeshDimension());
       
     //loop on cell types
     int nbtypes = mesh->getNumberOfTypes(MED_EN::MED_CELL);
@@ -168,7 +169,8 @@ namespace ParaMEDMEM
   {
 
     // create an FVM structure from the paramesh structure
-    fvm_nodal_t * fvm_nodal = fvm_nodal_create(support->getName().c_str(),1);
+    std::string supportName(support->getName());//this line avoid that support->getName() object killed before fvm_nodal_create read the const char *.
+    fvm_nodal_t * fvm_nodal = fvm_nodal_create(supportName.c_str(),1);
       
     const MEDMEM::MESH* mesh= support->getMesh();
       
@@ -240,12 +242,7 @@ namespace ParaMEDMEM
   {  
   }
 
-  /*!
-    \addtogroup noncoincidentdec
-    @{
-  */
-
-  /*! Constructor of a non coincident \ref dec with 
+  /*! Constructor of a non coincident \ref para-dec "DEC" with
    * a source group on which lies a field lying on a mesh and a 
    * target group on which lies a mesh.
    * 
@@ -390,7 +387,4 @@ namespace ParaMEDMEM
       renormalizeTargetField();
 
   }
-  /*!
-    @}
-  */  
 }