Pointwise Plugin SDK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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
virtual PWP_UINT32 streamFace(const PWGM_FACESTREAM_DATA &data)=0
Pure virtual face stream handler method.
Data passed to a PWGM_ENDSTREAMCB callback function.
The unstructured element group class.
Grid element handle declaration.
Definition: apiGridModel.h:427
void * userData
The PwModStreamFaces user data ptr.
Data passed to a PWGM_FACESTREAMCB callback function.
unsigned long long PWP_UINT64
64-bit unsigned integer
Definition: apiPWP.h:243
PWP_UINT32 vertexCount() const
Get the number of unstructured vertices in the model.
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
CaeUnsGridModel(PWGM_HGRIDMODEL model)
Constructor.
static const char * faceOrderStr(PWGM_ENUM_FACEORDER order)
Maps a face order id to a string value.
Pointwise Plugin API (PWP-API)
const char * PwFaceOrderToText(PWGM_ENUM_FACEORDER faceOrder)
Maps a PWGM_ENUM_FACEORDER value to a human readable string.
bool operator==(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
static const char * elemTypeStr(PWGM_ENUM_ELEMTYPE type)
Maps an element type id to a string value.
void PWP_VOID
no value
Definition: apiPWP.h:317
PWGM_HGRIDMODEL model_
The bound PWGM_HGRIDMODEL.
Definition: CaeGridModel.h:145
Pointwise Grid Model API Specification (PWGM-API)
Data passed to a PWGM_BEGINSTREAMCB callback function.
virtual PWP_UINT32 streamEnd(const PWGM_ENDSTREAM_DATA &data)
Virtual end stream implementation.
virtual ~CaeFaceStreamHandler()
Destructor.
An opaque handle to a grid vertex element.
Definition: apiGridModel.h:398
virtual PWP_UINT32 elementCountImpl(PWGM_ELEMCOUNTS *pDetails) const =0
Get the number of elements in the group.
The unstructured grid model class.
virtual ~CaeUnsGridModel()
Destructor.
The unstructured grid model face stream handler class.
PWGM_ENUM_FACEORDER
The orderings supported by face streaming.
Element count information.
Definition: apiGridModel.h:757
const char * PwElemTypeToText(PWGM_ENUM_ELEMTYPE type)
Maps a PWGM_ENUM_ELEMTYPE value to a human readable string.
The unstructured grid model index mapper handler class.
virtual ~CaeUnsCustomIndexHandler()
Destructor.
bool operator!=(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
CaeUnsGridModel & operator=(const CaeUnsGridModel &rhs)
Assignment operator.
PWP_UINT32 PwModEnumElementCount(PWGM_HGRIDMODEL model, PWGM_ELEMCOUNTS *pCounts)
Get the number of enumerated model block elements.
PWGM_ENUM_ELEMTYPE
Element type ids.
Definition: apiGridModel.h:672
bool appendEnumElementOrder(PWGM_ENUM_ELEMORDER order) const
Append an element type to the current face streaming order.
PWP_VOID defaultEnumElementOrder() const
Reset to the default element type order.
bool streamFaces(PWGM_ENUM_FACEORDER order, CaeFaceStreamHandler &handler) const
Initiate ordered face streaming to the given handler.
virtual PWP_UINT64 mapIndex(const PWP_UINT64 pwgmNdx)=0
Pure virtual index mapping method.
The grid model base class.
Definition: CaeGridModel.h:46
virtual PWP_UINT32 streamBegin(const PWGM_BEGINSTREAM_DATA &data)
Virtual begin stream implementation.
void * userData
The PwModStreamFaces user data ptr.
bool customIndexSchemeReady(CaeUnsCustomIndexHandler &handler) const
Notify export framework that custom index mapper is ready for use.
PWGM_HELEMENT PwModEnumElements(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model&#39;s block elements.
An opaque handle to a grid model.
Definition: apiGridModel.h:326
PWGM_ENUM_ELEMORDER
Types of element orderings.
Definition: apiGridModel.h:697
bool operator>(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
PWP_UINT32 patchCount() const
Get the number of boundary patches in the model.
bool operator<(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
virtual PWGM_HELEMENT enumElementsImpl(PWP_UINT32 ndx) const =0
Get an element in the group.