]> SALOME platform Git repositories - modules/smesh.git/blob - src/MEDWrapper/MEDCoupling_Wrapper.hxx
Salome HOME
Tentative d externalisation en medcoupling memoire
[modules/smesh.git] / src / MEDWrapper / MEDCoupling_Wrapper.hxx
1 // Copyright (C) 2021  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #pragma once
21
22 #include "MED_Wrapper.hxx"
23
24 #include "med.h"
25
26 #include <memory>
27
28 namespace MED
29 {
30   class MEDWRAPPER_EXPORT MCTWrapper
31   {
32     public:
33       //! Create a MEDWrapper MED Mesh representation
34     PMeshInfo
35     CrMeshInfo(TInt theDim = 0,
36                TInt theSpaceDim = 0,
37                const std::string& theValue = "",
38                EMaillage theType = eNON_STRUCTURE,
39                const std::string& theDesc = "");
40     //! Write the MEDWrapper MED Mesh representation into the MED file
41     void
42     SetMeshInfo(const TMeshInfo& theInfo,
43                 TErr* theErr = NULL);
44     //! Write a MEDWrapper MED Family representation into the MED file
45     void
46     SetFamilyInfo(const TFamilyInfo& theInfo,
47                   TErr* theErr = NULL);
48     //! Create a MEDWrapper MED Nodes representation
49     PNodeInfo
50     CrNodeInfo(const PMeshInfo& theMeshInfo,
51                TInt theNbElem,
52                EModeSwitch theMode = eFULL_INTERLACE,
53                ERepere theSystem = eCART,
54                EBooleen theIsElemNum = eVRAI,
55                EBooleen theIsElemNames = eFAUX);
56     //! Write the MEDWrapper MED Nodes representation into the MED file
57     void
58     SetNodeInfo(const TNodeInfo& theInfo,
59                 TErr* theErr = NULL);
60                 
61     //! Read a MEDWrapper MED Family representation by its numbers
62     void
63     GetFamilyInfo(TInt theFamId,
64                   TFamilyInfo& theInfo,
65                   TErr* theErr = NULL);
66                   
67     //! Create a MEDWrapper MED Family representation
68     PFamilyInfo
69     CrFamilyInfo(const PMeshInfo& theMeshInfo,
70                  const std::string& theValue,
71                  TInt theId,
72                  const TStringSet& theGroupNames,
73                  const TStringVector& theAttrDescs = TStringVector(),
74                  const TIntVector& theAttrIds = TIntVector(),
75                  const TIntVector& theAttrVals = TIntVector());
76     
77     //! Create a MEDWrapper MED Polygones representation
78     virtual
79     PPolygoneInfo
80     CrPolygoneInfo(const PMeshInfo& theMeshInfo,
81                    EEntiteMaillage theEntity,
82                    EGeometrieElement theGeom,
83                    TInt theNbElem,
84                    TInt theConnSize,
85                    EConnectivite theConnMode = eNOD,
86                    EBooleen theIsElemNum = eVRAI,
87                    EBooleen theIsElemNames = eVRAI);
88     
89     //! Create a MEDWrapper MED Polygones representation
90     virtual
91     PPolygoneInfo
92     CrPolygoneInfo(const PMeshInfo& theMeshInfo,
93                    EEntiteMaillage theEntity,
94                    EGeometrieElement theGeom,
95                    const TIntVector& theIndexes,
96                    const TIntVector& theConnectivities,
97                    EConnectivite theConnMode = eNOD,
98                    const TIntVector& theFamilyNums = TIntVector(),
99                    const TIntVector& theElemNums = TIntVector(),
100                    const TStringVector& theElemNames = TStringVector());
101                    
102                    
103     //! Write a MEDWrapper MED Polygones representation into the MED file
104     virtual
105     void
106     SetPolygoneInfo(const TPolygoneInfo& theInfo,
107                     TErr* theErr = NULL);
108     
109
110         //! Create a MEDWrapper MED Polyedres representation
111     virtual
112     PPolyedreInfo
113     CrPolyedreInfo(const PMeshInfo& theMeshInfo,
114                    EEntiteMaillage theEntity,
115                    EGeometrieElement theGeom,
116                    TInt theNbElem,
117                    TInt theNbFaces,
118                    TInt theConnSize,
119                    EConnectivite theConnMode = eNOD,
120                    EBooleen theIsElemNum = eVRAI,
121                    EBooleen theIsElemNames = eVRAI);
122                    
123                    
124     //! Write a MEDWrapper MED Polyedres representation into the MED file
125     virtual
126     void
127     SetPolyedreInfo(const TPolyedreInfo& theInfo,
128                     TErr* theErr = NULL);
129                     
130                     
131     //! Create a MEDWrapper MED Balls representation
132     /*! This feature is supported since version 3.0 */
133     virtual
134     PBallInfo
135     CrBallInfo(const PMeshInfo& theMeshInfo,
136                TInt theNbBalls,
137                EBooleen theIsElemNum = eVRAI);
138
139     //! Write a MEDWrapper representation of MED_BALL into the MED file
140     /*! This feature is supported since version 3.0 */
141     virtual
142     void
143     SetBallInfo(const TBallInfo& theInfo,
144                 TErr* theErr = NULL);
145
146     
147     //! Create a MEDWrapper MED Cells representation
148     virtual
149     PCellInfo
150     CrCellInfo(const PMeshInfo& theMeshInfo,
151                EEntiteMaillage theEntity,
152                EGeometrieElement theGeom,
153                TInt theNbElem,
154                EConnectivite theConnMode = eNOD,
155                EBooleen theIsElemNum = eVRAI,
156                EBooleen theIsElemNames = eFAUX,
157                EModeSwitch theMode = eFULL_INTERLACE);
158
159     //! Write the MEDWrapper MED Cells representation into the MED file
160     virtual
161     void
162     SetCellInfo(const TCellInfo& theInfo,
163                 TErr* theErr = NULL);
164     
165   };
166
167   using MCPWrapper = std::shared_ptr<MCTWrapper>;
168 }