Pointwise Plugin SDK
CaeUnsGridModel.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * CaeUnsGridModel class
4  *
5  * (C) 2021 Cadence Design Systems, Inc. All rights reserved worldwide.
6  *
7  ***************************************************************************/
8 
9 #if !defined(PWGM_HIDE_UNSTRUCTURED_API)
10 
11 #ifndef _CAEUNSGRIDMODEL_H_
12 #define _CAEUNSGRIDMODEL_H_
13 
14 
15 #include "apiGridModel.h"
16 #include "apiPWP.h"
17 
18 #include "CaeGridModel.h"
19 #include "CaeUnsElementGroup.h"
20 
21 
73 public:
74 
77  {
78  }
79 
81 
94  {
95  (void)data.userData;
96  return 1;
97  }
98 
100 
111  virtual PWP_UINT32 streamFace(const PWGM_FACESTREAM_DATA &data) = 0;
112 
114 
127  {
128  (void)data.userData;
129  return 1;
130  }
131 };
132 
133 
148 public:
151  {
152  }
153 
155 
164  virtual PWP_UINT64 mapIndex(const PWP_UINT64 pwgmNdx) = 0;
165 };
166 
167 
177 public:
178 
180 
185 
187 
191  CaeUnsGridModel(const CaeUnsGridModel &src);
192 
194  virtual ~CaeUnsGridModel();
195 
197 
201  PWP_UINT32 patchCount() const;
202 
204 
207  PWP_UINT32 vertexCount() const;
208 
210 
217  bool streamFaces(PWGM_ENUM_FACEORDER order,
218  CaeFaceStreamHandler &handler) const;
219 
221 
228 
230 
236 
238 
242 
245 
247  static const char * faceOrderStr(PWGM_ENUM_FACEORDER order) {
248  return PwFaceOrderToText(order);
249  }
250 
252  static const char * elemTypeStr(PWGM_ENUM_ELEMTYPE type) {
253  return PwElemTypeToText(type);
254  }
255 
256 protected:
257 
259  virtual PWP_UINT32 elementCountImpl(PWGM_ELEMCOUNTS *pDetails = 0) const {
260  return PwModEnumElementCount(model_, pDetails);
261  }
262 
263  virtual PWGM_HELEMENT enumElementsImpl(PWP_UINT32 ndx) const {
264  return PwModEnumElements(model_, ndx);
265  }
267 };
268 
270 bool operator==(const PWGM_HELEMENT &h1, const PWGM_HELEMENT &h2);
271 bool operator!=(const PWGM_HELEMENT &h1, const PWGM_HELEMENT &h2);
272 bool operator<(const PWGM_HELEMENT &h1, const PWGM_HELEMENT &h2);
273 bool operator>(const PWGM_HELEMENT &h1, const PWGM_HELEMENT &h2);
274 
275 
276 bool operator==(const PWGM_HVERTEX &h1, const PWGM_HVERTEX &h2);
277 bool operator!=(const PWGM_HVERTEX &h1, const PWGM_HVERTEX &h2);
278 bool operator<(const PWGM_HVERTEX &h1, const PWGM_HVERTEX &h2);
279 bool operator>(const PWGM_HVERTEX &h1, const PWGM_HVERTEX &h2);
281 
282 // Must include here because these depend on CaeUnsGridModel
283 #include "CaeUnsBlock.h"
284 #include "CaeUnsElement.h"
285 #include "CaeUnsPatch.h"
286 #include "CaeUnsVertex.h"
287 
288 #endif // _CAEUNSGRIDMODEL_H_
289 
290 #endif // PWGM_HIDE_UNSTRUCTURED_API
CaeGridModel.h
PWGM_ENDSTREAM_DATA::userData
void * userData
The PwModStreamFaces user data ptr.
Definition: apiGridModel.h:1144
operator>
bool operator>(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
Definition: CaeGridModel.cxx:158
PWGM_HELEMENT
Grid element handle declaration.
Definition: apiGridModel.h:427
CaeUnsCustomIndexHandler::~CaeUnsCustomIndexHandler
virtual ~CaeUnsCustomIndexHandler()
Destructor.
Definition: CaeUnsGridModel.h:150
CaeFaceStreamHandler::streamBegin
virtual PWP_UINT32 streamBegin(const PWGM_BEGINSTREAM_DATA &data)
Virtual begin stream implementation.
Definition: CaeUnsGridModel.h:93
PWGM_BEGINSTREAM_DATA::userData
void * userData
The PwModStreamFaces user data ptr.
Definition: apiGridModel.h:1062
PwFaceOrderToText
const char * PwFaceOrderToText(PWGM_ENUM_FACEORDER faceOrder)
Maps a PWGM_ENUM_FACEORDER value to a human readable string.
Definition: apiGridModel.cxx:394
PWP_UINT32
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
CaeUnsElementGroup.h
CaeUnsGridModel
The unstructured grid model class.
Definition: CaeUnsGridModel.h:176
PwModEnumElementCount
PWP_UINT32 PwModEnumElementCount(PWGM_HGRIDMODEL model, PWGM_ELEMCOUNTS *pCounts)
Get the number of enumerated model block elements.
Definition: apiGridModel.cxx:277
operator<
bool operator<(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
Definition: CaeGridModel.cxx:140
PWGM_HGRIDMODEL
An opaque handle to a grid model.
Definition: apiGridModel.h:326
PWP_VOID
void PWP_VOID
no value
Definition: apiPWP.h:317
CaeGridModel
The grid model base class.
Definition: CaeGridModel.h:46
CaeFaceStreamHandler::streamEnd
virtual PWP_UINT32 streamEnd(const PWGM_ENDSTREAM_DATA &data)
Virtual end stream implementation.
Definition: CaeUnsGridModel.h:126
apiGridModel.h
Pointwise Grid Model API Specification (PWGM-API)
PWGM_ENUM_ELEMORDER
PWGM_ENUM_ELEMORDER
Types of element orderings.
Definition: apiGridModel.h:697
CaeFaceStreamHandler::~CaeFaceStreamHandler
virtual ~CaeFaceStreamHandler()
Destructor.
Definition: CaeUnsGridModel.h:76
CaeUnsElementGroup
The unstructured element group class.
Definition: CaeUnsElementGroup.h:44
CaeUnsGridModel::faceOrderStr
static const char * faceOrderStr(PWGM_ENUM_FACEORDER order)
Maps a face order id to a string value.
Definition: CaeUnsGridModel.h:247
operator==
bool operator==(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
Definition: CaeGridModel.cxx:124
CaeUnsVertex.h
CaeUnsGridModel::elemTypeStr
static const char * elemTypeStr(PWGM_ENUM_ELEMTYPE type)
Maps an element type id to a string value.
Definition: CaeUnsGridModel.h:252
PWGM_ENUM_ELEMTYPE
PWGM_ENUM_ELEMTYPE
Element type ids.
Definition: apiGridModel.h:672
CaeUnsGridModel::~CaeUnsGridModel
virtual ~CaeUnsGridModel()
Destructor.
Definition: CaeUnsGridModel.cxx:32
CaeUnsElementGroup::enumElementsImpl
virtual PWGM_HELEMENT enumElementsImpl(PWP_UINT32 ndx) const =0
Get an element in the group.
CaeUnsBlock.h
PWGM_ELEMCOUNTS
Element count information.
Definition: apiGridModel.h:757
PWGM_BEGINSTREAM_DATA
Data passed to a PWGM_BEGINSTREAMCB callback function.
Definition: apiGridModel.h:1055
PwModEnumElements
PWGM_HELEMENT PwModEnumElements(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model's block elements.
Definition: apiGridModel.cxx:285
CaeUnsGridModel::customIndexSchemeReady
bool customIndexSchemeReady(CaeUnsCustomIndexHandler &handler) const
Notify export framework that custom index mapper is ready for use.
Definition: CaeUnsGridModel.cxx:89
CaeUnsGridModel::streamFaces
bool streamFaces(PWGM_ENUM_FACEORDER order, CaeFaceStreamHandler &handler) const
Initiate ordered face streaming to the given handler.
Definition: CaeUnsGridModel.cxx:72
CaeUnsCustomIndexHandler
The unstructured grid model index mapper handler class.
Definition: CaeUnsGridModel.h:147
CaeUnsGridModel::operator=
CaeUnsGridModel & operator=(const CaeUnsGridModel &rhs)
Assignment operator.
Definition: CaeUnsGridModel.cxx:109
PWGM_ENDSTREAM_DATA
Data passed to a PWGM_ENDSTREAMCB callback function.
Definition: apiGridModel.h:1141
PWGM_FACESTREAM_DATA
Data passed to a PWGM_FACESTREAMCB callback function.
Definition: apiGridModel.h:1104
CaeUnsCustomIndexHandler::mapIndex
virtual PWP_UINT64 mapIndex(const PWP_UINT64 pwgmNdx)=0
Pure virtual index mapping method.
CaeFaceStreamHandler
The unstructured grid model face stream handler class.
Definition: CaeUnsGridModel.h:72
PWGM_HVERTEX
An opaque handle to a grid vertex element.
Definition: apiGridModel.h:398
CaeUnsGridModel::patchCount
PWP_UINT32 patchCount() const
Get the number of boundary patches in the model.
Definition: CaeUnsGridModel.cxx:37
apiPWP.h
Pointwise Plugin API (PWP-API)
CaeUnsElement.h
CaeUnsElementGroup::elementCountImpl
virtual PWP_UINT32 elementCountImpl(PWGM_ELEMCOUNTS *pDetails) const =0
Get the number of elements in the group.
CaeUnsGridModel::vertexCount
PWP_UINT32 vertexCount() const
Get the number of unstructured vertices in the model.
Definition: CaeUnsGridModel.cxx:43
PWP_UINT64
unsigned long long PWP_UINT64
64-bit unsigned integer
Definition: apiPWP.h:243
CaeUnsPatch.h
PWGM_ENUM_FACEORDER
PWGM_ENUM_FACEORDER
The orderings supported by face streaming.
Definition: apiGridModel.h:1030
CaeFaceStreamHandler::streamFace
virtual PWP_UINT32 streamFace(const PWGM_FACESTREAM_DATA &data)=0
Pure virtual face stream handler method.
operator!=
bool operator!=(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
Definition: CaeGridModel.cxx:134
CaeUnsGridModel::defaultEnumElementOrder
PWP_VOID defaultEnumElementOrder() const
Reset to the default element type order.
Definition: CaeUnsGridModel.cxx:103
CaeGridModel::model_
PWGM_HGRIDMODEL model_
The bound PWGM_HGRIDMODEL.
Definition: CaeGridModel.h:145
PwElemTypeToText
const char * PwElemTypeToText(PWGM_ENUM_ELEMTYPE type)
Maps a PWGM_ENUM_ELEMTYPE value to a human readable string.
Definition: apiGridModel.cxx:415
CaeUnsGridModel::appendEnumElementOrder
bool appendEnumElementOrder(PWGM_ENUM_ELEMORDER order) const
Append an element type to the current face streaming order.
Definition: CaeUnsGridModel.cxx:97
CaeUnsGridModel::CaeUnsGridModel
CaeUnsGridModel(PWGM_HGRIDMODEL model)
Constructor.
Definition: CaeUnsGridModel.cxx:22