Salome HOME
MEDCoupling API renaming - stage #3: documentation
[tools/medcoupling.git] / doc / user / doxygen / doxfiles / appendix / porting.dox
1 /*!
2
3 \page porting Porting code/scripts from version 7 to 8
4
5 \section port-migrate How to migrate
6
7 Significant API changes have been made between version 7.x and 8.x of MEDCoupling.
8 This page guides you through the changes you have to apply to migrate.
9
10 First of all, the script
11 \code
12     medcoup7to8.py
13 \endcode
14
15 installed in the binary directory can do most of the job. It takes as first argument the path of the directory
16 containing the sources you want to port. Only some extensions are handled. A backup of the modified files is
17 done. Run
18 \code
19     medcoup7to8.py --help
20 \endcode
21 for a full usage description, including the handled file extensions.
22
23 Beware however that the two substitutions below can not be done via this script, because they might conflict with
24 standard STL C++ functions:
25 - DataArray*::search -> DataArray*::findIdSequence
26 - DataArray*::substr -> DataArray*::subArray
27 Those will have to be treated manually. 
28
29 The script doesn't handle either the namespace change described below. 
30
31 \section port-medloader Namespace change and MEDLoader high level API
32
33 The namespace ParaMEDMEM has been turned into MEDCoupling, and now contains MEDLoader high level API.
34 The MEDLoader high level API is hence accessible:
35  - at the MEDCoupling namespace level in C++ (direct static functions, no more MEDLoader class)
36  - at the MEDLoader module level in Python. Scripts using the high level API of the MEDLoader
37 typically need to get read of all the occurences of "MEDLoader." in their code.  
38
39 Note that on the Python side the module MEDLoader is still here, but doesn't containt the MEDLoader class anymore.
40 As before it re-includes all of MEDCoupling classes, plus the low level MEDLoader classes (MEDFile* classes).
41
42 \section port-full-ref Name changes - Reference list
43
44 The following changes have been applied:
45 - methods ending with a number (mergeNodes2, ...) have been made more explicit
46 - search functions have been unified (they all begin with 'findId(s)')
47 - plus some other various renames 
48
49 Full list of method name changes:
50
51 - Interpolation
52     + RevIntegral / IntensiveConservation 
53     + ConservativeVolumic / IntensiveMaximum
54     + IntegralGlobConstraint / ExtensiveConservation
55     + Integral / ExtensiveMaximum
56 - All classes
57     + deepCpy / deepCopy
58     + performCpy / performCopyOrIncrRef
59 - Auto-pointer
60     + MEDCouplingAutoRefCountObjectPtr / MCAuto
61 - MEDCouplingExtrudedMesh
62     + MEDCouplingExtrudedMesh / MEDCouplingMappedExtrudedMesh
63 - MEDCouplingMesh
64     + getBarycenterAndOwner / computeCellCenterOfMass
65     + checkCoherency / checkConsistencyLight
66     + checkCoherency1 / checkConsistency
67 - MEDCouplingPointSet
68     + mergeNodes2 / mergeNodesCenter
69     + renumberNodes2 / renumberNodesCenter
70     + buildPartOfMySelf2 / buildPartOfMySelfSlice
71     + buildPartOfMySelfKeepCoords2 / buildPartOfMySelfKeepCoordsSlice
72     + deepCpyConnectivityOnly / deepCopyConnectivityOnly
73 - MEDCoupling1DGTUMesh
74     + checkCoherencyOfConnectivity / checkConsistencyOfConnectivity
75 - MEDCouplingUMesh
76     + getMeshLength / getNodalConnectivityArrayLen
77     + AreCellsEqual0 / AreCellsEqualPolicy0
78     + AreCellsEqual1 / AreCellsEqualPolicy1
79     + AreCellsEqual2 / AreCellsEqualPolicy2
80     + AreCellsEqual7 / AreCellsEqualPolicy7
81     + AreCellsEqual3 / AreCellsEqualPolicy2NoType
82     + areCellsIncludedIn2 / areCellsIncludedInPolicy7
83     + setPartOfMySelf2 / setPartOfMySelfSlice
84     + ExtractFromIndexedArrays2 / ExtractFromIndexedArraysSlice
85     + SetPartOfIndexedArrays2 / SetPartOfIndexedArraysSlice
86     + SetPartOfIndexedArraysSameIdx2 / SetPartOfIndexedArraysSameIdxSlice
87     + deepCpyConnectivityOnly / deepCopyConnectivityOnly
88 - DataArray
89     + setContigPartOfSelectedValues2 / setContigPartOfSelectedValuesSlice
90     + selectByTupleId2 / selectByTupleIdSafe
91     + GetAxTypeRepr / GetAxisTypeRepr
92     + cpyFrom / deepCopyFrom
93 - DataArrayInt
94     + isIdentity2 / isIota
95     + selectByTupleId2 / selectByTupleIdSlice
96     + BuildOld2NewArrayFromSurjectiveFormat2 / ConvertIndexArrayToO2N   
97     + getIdsEqual / findIdsEqual
98     + getIdsNotEqual / findIdsNotEqual
99     + getIdsEqualList / findIdsEqualList
100     + getIdsNotEqualList / findIdsNotEqualList
101     + getIdsEqualTuple / findIdsEqualTuple
102     + locateValue / findIdFirstEqual
103     + locateTuple / findIdFirstEqualTuple   
104     + search / findIdSequence  (<b>WARNING not handled by the porting script!</b>)
105     + getIdsInRange / findIdsInRange
106     + getIdsNotInRange / findIdsNotInRange
107     + getIdsStrictlyNegative / findIdsStricltyNegative
108     + searchRangesInListOfIds / findIdsRangesInListOfIds
109     + computeOffsets2 / computeOffsetsFull
110 - DataArrayDouble
111     + substr / subArray (<b>WARNING not handled by the porting script!</b>) 
112     + applyFunc2 / applyFuncCompo
113     + applyFunc3 / applyFuncNamedCompo
114 - MEDCouplingFieldDouble
115     + getIdsInRange / findIdsInRange
116     + fillFromAnalytic2 / fillFromAnalyticCompo
117     + fillFromAnalytic3 / fillFromAnalyticNamedCompo
118     + applyFunc2 / applyFuncCompo
119     + applyFunc3 / applyFuncNamedCompo
120     + mergeNodes2 / mergeNodesCenter
121
122 */
123