Pointwise Plugin SDK
apiGridModel.cxx
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * CAEP Plugin example
4  *
5  * Proprietary software product of Pointwise, Inc.
6  * Copyright (c) 1995-2020 Pointwise, Inc.
7  * All rights reserved.
8  *
9  ***************************************************************************/
10 
11 // See comments in core code for information on adding new PWGM API functions.
12 
13 #include <cctype>
14 #include <climits>
15 #include <cerrno>
16 #include <sstream>
17 #include <string>
18 
19 // Define these on the build command line for verbose build messages
20 // #define SHOW_PWP_MESSAGES
21 // #define SHOW_PWGM_MESSAGES
22 #include "apiGridModel.h"
23 
24 #include "apiPWPUtils.h"
25 
26 // If this asserts, PWGM_ASSEMBLER_DATA has increased in size! This will
27 // increase memory usage during face grid importing. Are you sure?
28 ASSERT_COMPILE(sizeof(PWGM_ASSEMBLER_DATA) <= sizeof(PWP_UINT32) * 8);
29 
31 #define MODEL_OUT PWGM_HGRIDMODEL_OUT_GMIMPL(model)
32 #define BLKMODEL_OUT PWGM_HBLOCK_OUT_GMIMPL(block)
33 #define DOMMODEL_OUT PWGM_HDOMAIN_OUT_GMIMPL(domain)
34 #define VERTMODEL_OUT PWGM_HVERTEX_OUT_GMIMPL(vertex)
35 #define ELEMMODEL_OUT PWGM_HELEMENT_OUT_GMIMPL(element)
36 #define BNDRYMODEL_OUT PWGM_HBNDRY_OUT_GMIMPL(boundary)
37 #define CNXNMODEL_OUT PWGM_HCNXN_OUT_GMIMPL(connection)
38 
39 #define MODEL_IN PWGM_HGRIDMODEL_IN_GMIMPL(model)
40 #define BLKMODEL_IN PWGM_HBLOCK_IN_GMIMPL(block)
41 #define DOMMODEL_IN PWGM_HDOMAIN_IN_GMIMPL(domain)
42 #define CONMODEL_IN PWGM_HCONNECTOR_IN_GMIMPL(connector)
43 #define VLISTMODEL_IN PWGM_HVERTEXLIST_IN_GMIMPL(vertlist)
44 #define BLKASMMODEL_IN PWGM_HBLOCKASSEMBLER_IN_GMIMPL(blkAsm)
45 
46 static const PWGM_HBLOCK badBlock = PWGM_HBLOCK_INIT;
47 static const PWGM_HDOMAIN badDomain = PWGM_HDOMAIN_INIT;
48 
49 #if !defined(PWGM_HIDE_IMPORT_API)
50 static const PWGM_HCONNECTOR badConnector = PWGM_HCONNECTOR_INIT;
51 static const PWGM_HVERTEXLIST badVertexList = PWGM_HVERTEXLIST_INIT;
52 static const PWGM_HBLOCKASSEMBLER badAssembler = PWGM_HBLOCKASSEMBLER_INIT;
53 
54 static const char * PropSubType{ "SubType" };
55 static const char * PropUserName{ "UserName" };
56 static const char * PropUserId{ "UserId" };
57 static const char * PropTypeName{ "TypeName" };
58 static const char * PropTypeId{ "TypeId" };
59 
60 static const char * SubTypeBoundary{ "Boundary" };
61 
62 #endif /* PWGM_HIDE_IMPORT_API */
63 
64 #if !defined(PWGM_HIDE_UNSTRUCTURED_API)
65 static const PWGM_HVERTEX badVertex = PWGM_HVERTEX_INIT;
66 static const PWGM_HELEMENT badElement = PWGM_HELEMENT_INIT;
67 #endif /* PWGM_HIDE_UNSTRUCTURED_API */
68 
69 #if !defined(PWGM_HIDE_STRUCTURED_API)
70 static const PWGM_HBNDRY badBoundary = PWGM_HBNDRY_INIT;
71 static const PWGM_HCNXN badConnection = PWGM_HCNXN_INIT;
72 #endif /* PWGM_HIDE_STRUCTURED_API */
73 
74 
75 #ifdef WINDOWS
76 # define strcasecmp stricmp
77 # define strncasecmp strnicmp
78 #endif /* WINDOWS */
79 
81 
82 
83 
86 {
87  return (MODEL_OUT && MODEL_OUT->PwModBlockCountCB) ?
88  MODEL_OUT->PwModBlockCountCB(model) : 0;
89 }
90 
91 
94 {
95  return (MODEL_OUT && MODEL_OUT->PwModEnumBlocksCB) ?
96  MODEL_OUT->PwModEnumBlocksCB(model, ndx) : badBlock;
97 }
98 
99 
100 PWP_BOOL
102 {
103  return (pCondData && PWGM_HBLOCK_ISVALID(block) && BLKMODEL_OUT &&
104  BLKMODEL_OUT->PwBlkConditionCB) ?
105  BLKMODEL_OUT->PwBlkConditionCB(block, pCondData) : PWP_FALSE;
106 }
107 
108 
109 PWP_BOOL
110 PwBlock(PWGM_HBLOCK block, PWGM_BLOCKDATA *pBlockData)
111 {
112  return (pBlockData && PWGM_HBLOCK_ISVALID(block) && BLKMODEL_OUT &&
113  BLKMODEL_OUT->PwBlockCB) ? BLKMODEL_OUT->PwBlockCB(block, pBlockData) :
114  PWP_FALSE;
115 }
116 
117 
118 PWP_BOOL
119 PwBlkSetExportName(PWGM_HBLOCK block, const char *name)
120 {
121  return (PWGM_HBLOCK_ISVALID(block) && BLKMODEL_OUT &&
122  BLKMODEL_OUT->PwBlkSetExportNameCB) ?
123  BLKMODEL_OUT->PwBlkSetExportNameCB(block, name) : PWP_FALSE;
124 }
125 
126 
127 PWP_BOOL
128 PwModGetAttributeValue(PWGM_HGRIDMODEL model, const char *name,
129  PWP_ENUM_VALTYPE bufType, void *buf, PWP_UINT count)
130 {
131  return (MODEL_OUT && MODEL_OUT->PwModGetAttributeValueCB) ?
132  MODEL_OUT->PwModGetAttributeValueCB(model, name, bufType, buf, count) :
133  PWP_FALSE;
134 }
135 
136 
137 PWP_BOOL
138 PwModGetAttributeString(PWGM_HGRIDMODEL model, const char *name,
139  const char ** val)
140 {
141  return PwModGetAttributeValue(model, name, PWP_VALTYPE_STRING, val, 1);
142 }
143 
144 
145 PWP_BOOL
146 PwModGetAttributeUINT(PWGM_HGRIDMODEL model, const char *name,
147  PWP_UINT *val)
148 {
149  return PwModGetAttributeValue(model, name, PWP_VALTYPE_UINT, val, 1);
150 }
151 
152 
153 PWP_BOOL
154 PwModGetAttributeUINT32(PWGM_HGRIDMODEL model, const char *name,
155  PWP_UINT32 *val)
156 {
157  PWP_UINT locVal = 0;
158  PWP_BOOL ret = PwModGetAttributeUINT(model, name, &locVal);
159  if (ret && val) {
160  *val = (PWP_UINT32)locVal;
161  }
162  return ret;
163 }
164 
165 
166 PWP_BOOL
167 PwModGetAttributeINT(PWGM_HGRIDMODEL model, const char *name,
168  PWP_INT *val)
169 {
170  return PwModGetAttributeValue(model, name, PWP_VALTYPE_INT, val, 1);
171 }
172 
173 
174 PWP_BOOL
175 PwModGetAttributeINT32(PWGM_HGRIDMODEL model, const char *name,
176  PWP_INT32 *val)
177 {
178  PWP_INT locVal = 0;
179  PWP_BOOL ret = val && PwModGetAttributeINT(model, name, &locVal);
180  if (ret && val) {
181  *val = (PWP_INT32)locVal;
182  }
183  return ret;
184 }
185 
186 
187 PWP_BOOL
188 PwModGetAttributeREAL(PWGM_HGRIDMODEL model, const char *name,
189  PWP_REAL *val)
190 {
191  return PwModGetAttributeValue(model, name, PWP_VALTYPE_REAL, val, 1);
192 }
193 
194 
195 PWP_BOOL
196 PwModGetAttributeFLOAT(PWGM_HGRIDMODEL model, const char *name,
197  PWP_FLOAT *val)
198 {
199  PWP_REAL locVal = 0;
200  PWP_BOOL ret = val && PwModGetAttributeREAL(model, name, &locVal);
201  if (ret && val) {
202  *val = (PWP_FLOAT)locVal;
203  }
204  return ret;
205 }
206 
207 
208 PWP_BOOL
209 PwModGetAttributeBOOL(PWGM_HGRIDMODEL model, const char *name,
210  PWP_BOOL *val)
211 {
212  return PwModGetAttributeValue(model, name, PWP_VALTYPE_BOOL, val, 1);
213 }
214 
215 
216 PWP_BOOL
217 PwModGetAttributeEnum(PWGM_HGRIDMODEL model, const char *name,
218  const char ** val)
219 {
220  return PwModGetAttributeValue(model, name, PWP_VALTYPE_ENUM, val, 1);
221 }
222 
223 
224 #if !defined(PWGM_HIDE_UNSTRUCTURED_API)
225 
226 
229 {
230  return (MODEL_OUT && MODEL_OUT->PwModDomainCountCB) ?
231  MODEL_OUT->PwModDomainCountCB(model) : 0;
232 }
233 
234 
237 {
238  return (MODEL_OUT && MODEL_OUT->PwModEnumDomainsCB) ?
239  MODEL_OUT->PwModEnumDomainsCB(model, ndx) : badDomain;
240 }
241 
242 
245 {
246  return (MODEL_OUT && MODEL_OUT->PwModEnumVerticesCB) ?
247  MODEL_OUT->PwModEnumVerticesCB(model, ndx) : badVertex;
248 }
249 
250 
253 {
254  return (MODEL_OUT && MODEL_OUT->PwModVertexCountCB) ?
255  MODEL_OUT->PwModVertexCountCB(model) : 0;
256 }
257 
258 
259 PWP_BOOL
261  void *data)
262 {
263  return (MODEL_OUT && MODEL_OUT->PwModCustomIndexSchemeReadyCB) ?
264  MODEL_OUT->PwModCustomIndexSchemeReadyCB(model, cb, data) : PWP_FALSE;
265 }
266 
267 PWP_BOOL
270  PWGM_ENDSTREAMCB endCB, void *userData)
271 {
272  return (MODEL_OUT && MODEL_OUT->PwModStreamFacesCB) ?
273  MODEL_OUT->PwModStreamFacesCB(model, order, beginCB, faceCB, endCB,
274  userData) : PWP_FALSE;
275 }
276 
277 
280 {
281  return (MODEL_OUT && MODEL_OUT->PwModEnumElementCountCB) ?
282  MODEL_OUT->PwModEnumElementCountCB(model, pCounts) : 0;
283 }
284 
285 
288 {
289  return (MODEL_OUT && MODEL_OUT->PwModEnumElementsCB) ?
290  MODEL_OUT->PwModEnumElementsCB(model, ndx) : badElement;
291 }
292 
293 
294 PWP_BOOL
296 {
297  return (MODEL_OUT && MODEL_OUT->PwModAppendEnumElementOrderCB) ?
298  MODEL_OUT->PwModAppendEnumElementOrderCB(model, order) : 0;
299 }
300 
301 
302 PWP_VOID
304 {
305  // PWGM_ELEMTYPE_SIZE triggers core to reset the ordering
306  PwModAppendEnumElementOrder(model, PWGM_ELEMORDER_SIZE);
307 }
308 
309 
312 {
313  return (PWGM_HBLOCK_ISVALID(block) && BLKMODEL_OUT->PwBlkElementCountCB) ?
314  BLKMODEL_OUT->PwBlkElementCountCB(block, pCounts) : 0;
315 }
316 
317 
320 {
321  return (PWGM_HBLOCK_ISVALID(block) && BLKMODEL_OUT->PwBlkEnumElementsCB) ?
322  BLKMODEL_OUT->PwBlkEnumElementsCB(block, ndx) : badElement;
323 }
324 
325 
328 {
329  return (PWGM_HDOMAIN_ISVALID(domain) && DOMMODEL_OUT->PwDomElementCountCB) ?
330  DOMMODEL_OUT->PwDomElementCountCB(domain, pCounts) : 0;
331 }
332 
333 
336 {
337  return (PWGM_HDOMAIN_ISVALID(domain) && DOMMODEL_OUT->PwDomEnumElementsCB) ?
338  DOMMODEL_OUT->PwDomEnumElementsCB(domain, ndx) : badElement;
339 }
340 
341 
342 PWP_BOOL
344 {
345  return (pCondData && PWGM_HDOMAIN_ISVALID(domain) &&
346  DOMMODEL_OUT->PwDomConditionCB) ?
347  DOMMODEL_OUT->PwDomConditionCB(domain, pCondData) : PWP_FALSE;
348 }
349 
350 
351 PWP_BOOL
353 {
354  return (pVertData && PWGM_HVERTEX_ISVALID(vertex) &&
355  VERTMODEL_OUT->PwVertDataModCB) ?
356  VERTMODEL_OUT->PwVertDataModCB(vertex, pVertData) : PWP_FALSE;
357 }
358 
359 
360 PWP_BOOL
362 {
363  return (pIndex && PWGM_HVERTEX_ISVALID(vertex) &&
364  VERTMODEL_OUT->PwVertIndexModCB) ?
365  VERTMODEL_OUT->PwVertIndexModCB(vertex, pIndex) : PWP_FALSE;
366 }
367 
368 
369 PWP_BOOL
371 {
372  return (pVal && PWGM_HVERTEX_ISVALID(vertex) &&
373  VERTMODEL_OUT->PwVertXyzValCB) ?
374  VERTMODEL_OUT->PwVertXyzValCB(vertex, which, pVal) : PWP_FALSE;
375 }
376 
377 
378 PWP_BOOL
380 {
381  return (pElemData && PWGM_HELEMENT_ISVALID(element) &&
382  ELEMMODEL_OUT->PwElemDataModCB) ?
383  ELEMMODEL_OUT->PwElemDataModCB(element, pElemData) : PWP_FALSE;
384 }
385 
386 
387 PWP_BOOL
389 {
390  return (pEnumElemData && PWGM_HELEMENT_ISVALID(element) &&
391  ELEMMODEL_OUT->PwElemDataModEnumCB) ?
392  ELEMMODEL_OUT->PwElemDataModEnumCB(element, pEnumElemData) : PWP_FALSE;
393 }
394 
395 const char *
397 {
398  const char * ret = "!Invalid";
399  switch (faceOrder) {
400  case PWGM_FACEORDER_DONTCARE: ret = "DontCare"; break;
401  case PWGM_FACEORDER_BOUNDARYFIRST: ret = "BoundaryFirst"; break;
402  case PWGM_FACEORDER_INTERIORFIRST: ret = "InteriorFirst"; break;
403  case PWGM_FACEORDER_BOUNDARYONLY: ret = "BoundaryOnly"; break;
404  case PWGM_FACEORDER_INTERIORONLY: ret = "InteriorOnly"; break;
405  case PWGM_FACEORDER_BCGROUPSFIRST: ret = "BcGroupsFirst"; break;
406  case PWGM_FACEORDER_BCGROUPSLAST: ret = "BcGroupsLast"; break;
407  case PWGM_FACEORDER_BCGROUPSONLY: ret = "BcGroupsOnly"; break;
408  case PWGM_FACEORDER_VCGROUPSBCLAST: ret = "VcGroupsBcLast"; break;
409  case PWGM_FACEORDER_BCGROUPSONLY_BYVC: ret = "BcGroupsOnlyByVc"; break;
410  case PWGM_FACEORDER_SIZE: break; // silence compiler warning
411  }
412  return ret;
413 }
414 
415 
416 const char *
418 {
419  const char * ret = "!Invalid";
420  switch (type) {
421  case PWGM_ELEMTYPE_BAR: ret = "Bar"; break;
422  case PWGM_ELEMTYPE_HEX: ret = "Hex"; break;
423  case PWGM_ELEMTYPE_QUAD: ret = "Quad"; break;
424  case PWGM_ELEMTYPE_TRI: ret = "Tri"; break;
425  case PWGM_ELEMTYPE_TET: ret = "Tet"; break;
426  case PWGM_ELEMTYPE_WEDGE: ret = "Wedge"; break;
427  case PWGM_ELEMTYPE_PYRAMID: ret = "Pyramid"; break;
428  case PWGM_ELEMTYPE_POINT: ret = "Point"; break;
429  case PWGM_ELEMTYPE_SIZE: // silence compiler warning
430  default: break;
431  }
432  return ret;
433 }
434 
435 #endif // !defined(PWGM_HIDE_UNSTRUCTURED_API)
436 
437 
438 
439 //***************************************************************************
440 //***************************************************************************
441 //***************************************************************************
442 //***************************************************************************
443 
444 #if !defined(PWGM_HIDE_STRUCTURED_API)
445 
446 
449 {
450  return (MODEL_OUT && MODEL_OUT->PwModBoundaryCountCB) ?
451  MODEL_OUT->PwModBoundaryCountCB(model) : 0;
452 }
453 
454 
457 {
458  return (MODEL_OUT && MODEL_OUT->PwModEnumBoundariesCB) ?
459  MODEL_OUT->PwModEnumBoundariesCB(model, ndx) : badBoundary;
460 }
461 
462 
465 {
466  return (MODEL_OUT && MODEL_OUT->PwModConnectionCountCB) ?
467  MODEL_OUT->PwModConnectionCountCB(model) : 0;
468 }
469 
470 
473 {
474  return (MODEL_OUT && MODEL_OUT->PwModEnumConnectionsCB) ?
475  MODEL_OUT->PwModEnumConnectionsCB(model, ndx) : badConnection;
476 }
477 
478 
479 PWP_BOOL
481  PWGM_BNDRYDATA *pBndryData)
482 {
483  return (MODEL_OUT && MODEL_OUT->PwModNdxBoundaryCB) ?
484  MODEL_OUT->PwModNdxBoundaryCB(model, ndx, pBndryData) :
485  PWP_FALSE;
486 }
487 
488 
489 PWP_BOOL
491  PWGM_BNDRYDATA *pBndryData, PWGM_CONDDATA *pCondData)
492 {
493  return (MODEL_OUT && MODEL_OUT->PwModNdxBoundaryAndConditionCB &&
494  (pBndryData || pCondData)) ?
495  MODEL_OUT->PwModNdxBoundaryAndConditionCB(model, ndx, pBndryData,
496  pCondData) : PWP_FALSE;
497 }
498 
499 
500 PWP_BOOL
502  PWGM_CNXNDATA *pCnxnData)
503 {
504  return (MODEL_OUT && MODEL_OUT->PwModNdxConnectionCB && pCnxnData) ?
505  MODEL_OUT->PwModNdxConnectionCB(model, ndx, pCnxnData) : PWP_FALSE;
506 }
507 
508 
509 PWP_BOOL
511 {
512  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkSizeCB) ?
513  BLKMODEL_OUT->PwBlkSizeCB(block, pSize) : PWP_FALSE;
514 }
515 
516 
517 PWP_BOOL
519 {
520  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkNdxVertDataCB) ?
521  BLKMODEL_OUT->PwBlkNdxVertDataCB(block, ndx3, pVertData) : PWP_FALSE;
522 }
523 
524 
525 PWP_BOOL
527  void *data)
528 {
529  return (MODEL_OUT && MODEL_OUT->PwModCustomIndex3SchemeReadyCB) ?
530  MODEL_OUT->PwModCustomIndex3SchemeReadyCB(model, cb, data) : PWP_FALSE;
531 }
532 
533 
536 {
537  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkBoundaryCountCB) ?
538  BLKMODEL_OUT->PwBlkBoundaryCountCB(block) : 0;
539 }
540 
541 
544 {
545  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkEnumBoundariesCB) ?
546  BLKMODEL_OUT->PwBlkEnumBoundariesCB(block, ndx) : badBoundary;
547 }
548 
549 
552 {
553  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkConnectionCountCB) ?
554  BLKMODEL_OUT->PwBlkConnectionCountCB(block) : 0;
555 }
556 
557 
560 {
561  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkEnumConnectionsCB) ?
562  BLKMODEL_OUT->PwBlkEnumConnectionsCB(block, ndx) : badConnection;
563 }
564 
565 
566 PWP_BOOL
568 {
569  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkNdxBoundaryCB && pBndryData) ?
570  BLKMODEL_OUT->PwBlkNdxBoundaryCB(block, ndx, pBndryData) : PWP_FALSE;
571 }
572 
573 
574 PWP_BOOL
576  PWGM_BNDRYDATA *pBndryData, PWGM_CONDDATA *pCondData)
577 {
578  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkNdxBoundaryAndConditionCB &&
579  (pBndryData || pCondData)) ?
580  BLKMODEL_OUT->PwBlkNdxBoundaryAndConditionCB(block, ndx, pBndryData,
581  pCondData) : PWP_FALSE;
582 }
583 
584 
585 PWP_BOOL
587 {
588  return (BLKMODEL_OUT && BLKMODEL_OUT->PwBlkNdxConnectionCB && pCnxnData) ?
589  BLKMODEL_OUT->PwBlkNdxConnectionCB(block, ndx, pCnxnData) : PWP_FALSE;
590 }
591 
592 
593 PWP_BOOL
594 PwBoundary(PWGM_HBNDRY boundary, PWGM_BNDRYDATA *pBndryData)
595 {
596  return (BNDRYMODEL_OUT && BNDRYMODEL_OUT->PwBoundaryCB && pBndryData) ?
597  BNDRYMODEL_OUT->PwBoundaryCB(boundary, pBndryData) : PWP_FALSE;
598 }
599 
600 
601 PWP_BOOL
603 {
604  return (BNDRYMODEL_OUT && BNDRYMODEL_OUT->PwBndryConditionCB) ?
605  BNDRYMODEL_OUT->PwBndryConditionCB(boundary, pCondData) : PWP_FALSE;
606 }
607 
608 
609 PWP_BOOL
610 PwConnection(PWGM_HCNXN connection, PWGM_CNXNDATA *pCnxnData)
611 {
612  return (CNXNMODEL_OUT && CNXNMODEL_OUT->PwConnectionCB && pCnxnData) ?
613  CNXNMODEL_OUT->PwConnectionCB(connection, pCnxnData) : PWP_FALSE;
614 }
615 
616 
617 PWP_BOOL
619 {
620  // XFORM2 XFORM
621  // ------ -------
622  // A B C A B 0 C
623  // D E F ==> D E 0 F
624  // 0 0 1 0
625  PWP_BOOL ret = (pX2 && pX3) ? PWP_TRUE : PWP_FALSE;
626  if (ret) {
627  // row 0
628  pX3->m[0][0] = pX2->m[0][0];
629  pX3->m[0][1] = pX2->m[0][1];
630  pX3->m[0][2] = 0;
631  pX3->m[0][0] = pX2->m[0][2];
632  // row 1
633  pX3->m[1][0] = pX2->m[1][0];
634  pX3->m[1][1] = pX2->m[1][1];
635  pX3->m[1][2] = 0;
636  pX3->m[1][0] = pX2->m[1][2];
637  // row 2
638  pX3->m[2][0] = 0;
639  pX3->m[2][1] = 0;
640  pX3->m[2][2] = 1;
641  pX3->m[2][0] = 0;
642  }
643  return ret;
644 }
645 
646 
647 PWP_BOOL
649 {
650  // XFORM XFORM2
651  // ------- ------
652  // A B C D A B D
653  // E F G H ==> E F H
654  // I J K L
655  PWP_BOOL ret = (pX2 && pX3) ? PWP_TRUE : PWP_FALSE;
656  if (ret) {
657  // row 0
658  pX2->m[0][0] = pX3->m[0][0];
659  pX2->m[0][1] = pX3->m[0][1];
660  pX2->m[0][2] = pX3->m[0][3];
661  // row 1
662  pX2->m[1][0] = pX3->m[1][0];
663  pX2->m[1][1] = pX3->m[1][1];
664  pX2->m[1][2] = pX3->m[1][3];
665  }
666  return ret;
667 }
668 
669 
672 {
673  PWGM_INDEX3 ret;
674  ret.i = pX3->m[0][0] * ijk.i + pX3->m[0][1] * ijk.j + pX3->m[0][2] * ijk.k
675  + pX3->m[0][3];
676  ret.j = pX3->m[1][0] * ijk.i + pX3->m[1][1] * ijk.j + pX3->m[1][2] * ijk.k
677  + pX3->m[1][3];
678  ret.k = pX3->m[2][0] * ijk.i + pX3->m[2][1] * ijk.j + pX3->m[2][2] * ijk.k
679  + pX3->m[2][3];
680  return ret;
681 }
682 
683 
686  PWP_BOOL *pFlipped)
687 {
688  PWGM_ENUM_IJK transformedAxis = PWGM_IJK_SIZE; /* invalid */
689  PWGM_INDEX3 ijk = { 0, 0, 0 };
690  PWGM_INDEX3 ijk2 = { 0, 0, 0 };
691  if (pFlipped) {
692  *pFlipped = PWP_FALSE;
693  }
694  /* construct axis vec for localAxis that will be rotated below */
695  switch (localAxis) {
696  case PWGM_IJK_I: ijk.i = 1; break;
697  case PWGM_IJK_J: ijk.j = 1; break;
698  case PWGM_IJK_K: ijk.k = 1; break;
699  case PWGM_IJK_SIZE: break; // silence compiler warning
700  }
701  /* apply rotation only */
702  ijk2.i = pX3->m[0][0] * ijk.i + pX3->m[0][1] * ijk.j + pX3->m[0][2] * ijk.k;
703  ijk2.j = pX3->m[1][0] * ijk.i + pX3->m[1][1] * ijk.j + pX3->m[1][2] * ijk.k;
704  ijk2.k = pX3->m[2][0] * ijk.i + pX3->m[2][1] * ijk.j + pX3->m[2][2] * ijk.k;
705  /* determine which axis it is in the transformed coord system */
706  if ((0 != ijk2.i) && (0 == ijk2.j) && (0 == ijk2.k)) {
707  transformedAxis = PWGM_IJK_I;
708  if (pFlipped) {
709  *pFlipped = ((1 == ijk2.i) ? PWP_FALSE : PWP_TRUE);
710  }
711  }
712  else if ((0 != ijk2.j) && (0 == ijk2.i) && (0 == ijk2.k)) {
713  transformedAxis = PWGM_IJK_J;
714  if (pFlipped) {
715  *pFlipped = ((1 == ijk2.j) ? PWP_FALSE : PWP_TRUE);
716  }
717  }
718  else if ((0 != ijk2.k) && (0 == ijk2.i) && (0 == ijk2.j)) {
719  transformedAxis = PWGM_IJK_K;
720  if (pFlipped) {
721  *pFlipped = ((1 == ijk2.k) ? PWP_FALSE : PWP_TRUE);
722  }
723  }
724  return transformedAxis;
725 }
726 
727 
730 {
731  PWGM_INDEX3 ret;
732  ret.i = pX2->m[0][0] * ijk.i + pX2->m[0][1] * ijk.j + pX2->m[0][2];
733  ret.j = pX2->m[1][0] * ijk.i + pX2->m[1][1] * ijk.j + pX2->m[1][2];
734  ret.k = ijk.k;
735  return ret;
736 }
737 
738 
741  PWP_BOOL *pFlipped)
742 {
743  PWGM_ENUM_IJK ret = PWGM_IJK_SIZE;
744  PWGM_INDEX_XFORM x3;
745  if (PwXform2to3(pX2, &x3)) {
746  ret = PwXformFollows(&x3, localAxis, pFlipped);
747  }
748  return ret;
749 }
750 
751 
752 PWP_BOOL
754 {
755  return (ijk.i >= pRange->beg.i) && (ijk.i <= pRange->end.i) &&
756  (ijk.j >= pRange->beg.j) && (ijk.j <= pRange->end.j) &&
757  (ijk.k >= pRange->beg.k) && (ijk.k <= pRange->end.k);
758 }
759 
760 #endif // !defined(PWGM_HIDE_STRUCTURED_API)
761 
762 
763 
764 //***************************************************************************
765 //***************************************************************************
766 //***************************************************************************
767 //***************************************************************************
768 
769 #if !defined(PWGM_HIDE_IMPORT_API)
770 
773 {
774  return (MODEL_IN && MODEL_IN->PwModCreateConCB) ?
775  MODEL_IN->PwModCreateConCB(model, size) : badConnector;
776 }
777 
778 
781 {
782  return (BLKMODEL_IN && BLKMODEL_IN->PwBlkGetVertexListCB) ?
783  BLKMODEL_IN->PwBlkGetVertexListCB(block) : badVertexList;
784 }
785 
786 
789 {
790  return (DOMMODEL_IN && DOMMODEL_IN->PwDomGetVertexListCB) ?
791  DOMMODEL_IN->PwDomGetVertexListCB(domain) : badVertexList;
792 }
793 
794 
797 {
798  return (CONMODEL_IN && CONMODEL_IN->PwConGetVertexListCB) ?
799  CONMODEL_IN->PwConGetVertexListCB(connector) : badVertexList;
800 }
801 
802 
803 PWP_BOOL
804 PwConSetName(PWGM_HCONNECTOR connector, const char *name)
805 {
806  return (CONMODEL_IN && CONMODEL_IN->PwConSetNameCB) ?
807  CONMODEL_IN->PwConSetNameCB(connector, name) : PWP_FALSE;
808 }
809 
810 
811 PWP_BOOL
812 PwBlkSetName(PWGM_HBLOCK block, const char *name)
813 {
814  return (BLKMODEL_IN && BLKMODEL_IN->PwBlkSetNameCB) ?
815  BLKMODEL_IN->PwBlkSetNameCB(block, name) : PWP_FALSE;
816 }
817 
818 
819 PWP_BOOL
820 PwDomSetName(PWGM_HDOMAIN domain, const char *name)
821 {
822  return (DOMMODEL_IN && DOMMODEL_IN->PwDomSetNameCB) ?
823  DOMMODEL_IN->PwDomSetNameCB(domain, name) : PWP_FALSE;
824 }
825 
826 
827 PWP_BOOL
829 {
830  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstIsUnstructuredCB) ?
831  VLISTMODEL_IN->PwVlstIsUnstructuredCB(vertlist) : PWP_FALSE;
832 }
833 
834 
835 PWP_BOOL
837 {
838  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstIsUnstructuredCB) ?
839  !VLISTMODEL_IN->PwVlstIsUnstructuredCB(vertlist) : PWP_FALSE;
840 }
841 
842 
843 PWP_UINT
845 {
846  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstGetIndexDimensionalityCB) ?
847  VLISTMODEL_IN->PwVlstGetIndexDimensionalityCB(vertlist) : 0;
848 }
849 
850 
853 {
854  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstGetBlkElemDimensionalityCB) ?
855  VLISTMODEL_IN->PwVlstGetBlkElemDimensionalityCB(vertlist) :
856  PWP_DIMENSION_SIZE;
857 }
858 
859 
860 PWP_BOOL
862  const PWGM_ENUM_XYZ which, const PWGM_XYZVAL val)
863 {
864  const PWGM_INDEX3 ndx3 = { PWP_INT32(ndx), 0, 0 };
865  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZVal3CB) ?
866  VLISTMODEL_IN->PwVlstSetXYZVal3CB(vertlist, ndx3, which, val) :
867  PWP_FALSE;
868 }
869 
870 
871 PWP_BOOL
872 PwVlstSetXYZ(PWGM_HVERTEXLIST vertlist, const PWP_UINT ndx, const PWGM_XYZVAL x,
873  const PWGM_XYZVAL y, const PWGM_XYZVAL z)
874 {
875  const PWGM_INDEX3 ndx3 = { PWP_INT32(ndx), 0, 0 };
876  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZ3CB) ?
877  VLISTMODEL_IN->PwVlstSetXYZ3CB(vertlist, ndx3, x, y, z) : PWP_FALSE;
878 }
879 
880 
881 PWP_BOOL
883  const PWGM_VERTDATA &v)
884 {
885  const PWGM_INDEX3 ndx3 = { PWP_INT32(ndx), 0, 0 };
886  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZ3CB) ?
887  VLISTMODEL_IN->PwVlstSetXYZ3CB(vertlist, ndx3, v.x, v.y, v.z) :
888  PWP_FALSE;
889 }
890 
891 
892 PWP_BOOL
894  const PWGM_ENUM_XYZ which, const PWGM_XYZVAL val)
895 {
896  const PWGM_INDEX3 ndx3 = { ndx2.i, ndx2.j, 0 };
897  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZVal3CB) ?
898  VLISTMODEL_IN->PwVlstSetXYZVal3CB(vertlist, ndx3, which, val) :
899  PWP_FALSE;
900 }
901 
902 
903 PWP_BOOL
905  const PWGM_XYZVAL x, const PWGM_XYZVAL y, const PWGM_XYZVAL z)
906 {
907  const PWGM_INDEX3 ndx3 = { ndx2.i, ndx2.j, 0 };
908  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZ3CB) ?
909  VLISTMODEL_IN->PwVlstSetXYZ3CB(vertlist, ndx3, x, y, z) : PWP_FALSE;
910 }
911 
912 
913 PWP_BOOL
915  const PWGM_VERTDATA &v)
916 {
917  const PWGM_INDEX3 ndx3 = { ndx2.i, ndx2.j, 0 };
918  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZ3CB) ?
919  VLISTMODEL_IN->PwVlstSetXYZ3CB(vertlist, ndx3, v.x, v.y, v.z) :
920  PWP_FALSE;
921 }
922 
923 
924 PWP_BOOL
926  const PWGM_ENUM_XYZ which, const PWGM_XYZVAL val)
927 {
928  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZVal3CB) ?
929  VLISTMODEL_IN->PwVlstSetXYZVal3CB(vertlist, ndx3, which, val) :
930  PWP_FALSE;
931 }
932 
933 
934 PWP_BOOL
936  const PWGM_XYZVAL x, const PWGM_XYZVAL y, const PWGM_XYZVAL z)
937 {
938  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZ3CB) ?
939  VLISTMODEL_IN->PwVlstSetXYZ3CB(vertlist, ndx3, x, y, z) : PWP_FALSE;
940 }
941 
942 
943 PWP_BOOL
945  const PWGM_VERTDATA &v)
946 {
947  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstSetXYZ3CB) ?
948  VLISTMODEL_IN->PwVlstSetXYZ3CB(vertlist, ndx3, v.x, v.y, v.z) :
949  PWP_FALSE;
950 }
951 
952 
953 PWP_BOOL
954 PwBlkSetProperty(PWGM_HBLOCK block, const char *key, const char *val)
955 {
956  return (BLKMODEL_IN && BLKMODEL_IN->PwBlkSetPropertyCB) ?
957  BLKMODEL_IN->PwBlkSetPropertyCB(block, key, val) : PWP_FALSE;
958 }
959 
960 
961 PWP_BOOL
962 PwDomSetProperty(PWGM_HDOMAIN domain, const char *key, const char *val)
963 {
964  return (DOMMODEL_IN && DOMMODEL_IN->PwDomSetPropertyCB) ?
965  DOMMODEL_IN->PwDomSetPropertyCB(domain, key, val) : PWP_FALSE;
966 }
967 
968 
969 PWP_BOOL
970 PwConSetProperty(PWGM_HCONNECTOR connector, const char *key, const char *val)
971 {
972  return (CONMODEL_IN && CONMODEL_IN->PwConSetPropertyCB) ?
973  CONMODEL_IN->PwConSetPropertyCB(connector, key, val) : PWP_FALSE;
974 }
975 
976 
977 PWP_BOOL
979  const char *key, const char *val)
980 {
981  return (BLKASMMODEL_IN && BLKASMMODEL_IN->PwAsmSetPropertyCB) ?
982  BLKASMMODEL_IN->PwAsmSetPropertyCB(blkAsm, propertySetId, key, val) :
983  PWP_FALSE;
984 }
985 
986 
987 PWP_BOOL
988 PwBlkSetConditionUserName(PWGM_HBLOCK block, const char *userName)
989 {
990  return PwBlkSetProperty(block, PropUserName, userName);
991 }
992 
993 
994 PWP_BOOL
996 {
997  std::ostringstream oss;
998  oss << userId;
999  return PwBlkSetProperty(block, PropUserId, oss.str().c_str());
1000 }
1001 
1002 
1003 PWP_BOOL
1004 PwBlkSetConditionTypeName(PWGM_HBLOCK block, const char *typeName)
1005 {
1006  return PwBlkSetProperty(block, PropTypeName, typeName);
1007 }
1008 
1009 
1010 PWP_BOOL
1012 {
1013  std::ostringstream oss;
1014  oss << typeId;
1015  return PwBlkSetProperty(block, PropTypeId, oss.str().c_str());
1016 }
1017 
1018 
1019 PWP_BOOL
1021 {
1022  const bool ret = PwBlkSetConditionUserName(block, condData.name) &&
1023  PwBlkSetConditionUserId(block, condData.id) &&
1024  PwBlkSetConditionTypeName(block, condData.type) &&
1025  PwBlkSetConditionTypeId(block, condData.tid);
1026  return PWP_CAST_BOOL(ret);
1027 }
1028 
1029 
1030 PWP_BOOL
1031 PwDomSetConditionUserName(PWGM_HDOMAIN domain, const char *userName)
1032 {
1033  return PwDomSetProperty(domain, PropUserName, userName);
1034 }
1035 
1036 
1037 PWP_BOOL
1039 {
1040  std::ostringstream oss;
1041  oss << userId;
1042  return PwDomSetProperty(domain, PropUserId, oss.str().c_str());
1043 }
1044 
1045 
1046 PWP_BOOL
1047 PwDomSetConditionTypeName(PWGM_HDOMAIN domain, const char *typeName)
1048 {
1049  return PwDomSetProperty(domain, PropTypeName, typeName);
1050 }
1051 
1052 
1053 PWP_BOOL
1055 {
1056  std::ostringstream oss;
1057  oss << typeId;
1058  return PwDomSetProperty(domain, PropTypeId, oss.str().c_str());
1059 }
1060 
1061 
1062 PWP_BOOL
1064 {
1065  const bool ret = PwDomSetConditionUserName(domain, condData.name) &&
1066  PwDomSetConditionUserId(domain, condData.id) &&
1067  PwDomSetConditionTypeName(domain, condData.type) &&
1068  PwDomSetConditionTypeId(domain, condData.tid);
1069  return PWP_CAST_BOOL(ret);
1070 }
1071 
1072 
1073 PWP_BOOL
1074 PwConSetConditionUserName(PWGM_HCONNECTOR connector, const char *userName)
1075 {
1076  return PwConSetProperty(connector, PropUserName, userName);
1077 }
1078 
1079 
1080 PWP_BOOL
1082 {
1083  std::ostringstream oss;
1084  oss << userId;
1085  return PwConSetProperty(connector, PropUserId, oss.str().c_str());
1086 }
1087 
1088 
1089 PWP_BOOL
1090 PwConSetConditionTypeName(PWGM_HCONNECTOR connector, const char *typeName)
1091 {
1092  return PwConSetProperty(connector, PropTypeName, typeName);
1093 }
1094 
1095 
1096 PWP_BOOL
1098 {
1099  std::ostringstream oss;
1100  oss << typeId;
1101  return PwConSetProperty(connector, PropTypeId, oss.str().c_str());
1102 }
1103 
1104 
1105 PWP_BOOL
1107 {
1108  const bool ret = PwConSetConditionUserName(connector, condData.name) &&
1109  PwConSetConditionUserId(connector, condData.id) &&
1110  PwConSetConditionTypeName(connector, condData.type) &&
1111  PwConSetConditionTypeId(connector, condData.tid);
1112  return PWP_CAST_BOOL(ret);
1113 }
1114 
1115 
1116 PWP_BOOL
1118  const char *userName)
1119 {
1120  return PwAsmSetProperty(h, (PWP_UINT32)key, PropUserName, userName);
1121 }
1122 
1123 
1124 PWP_BOOL
1126  const PWP_UINT32 userId)
1127 {
1128  std::ostringstream oss;
1129  oss << userId;
1130  return PwAsmSetProperty(h, (PWP_UINT32)key, PropUserId, oss.str().c_str());
1131 }
1132 
1133 
1134 PWP_BOOL
1136  const char *typeName)
1137 {
1138  return PwAsmSetProperty(h, (PWP_UINT32)key, PropTypeName, typeName);
1139 }
1140 
1141 
1142 PWP_BOOL
1144  const PWP_UINT32 typeId)
1145 {
1146  std::ostringstream oss;
1147  oss << typeId;
1148  return PwAsmSetProperty(h, (PWP_UINT32)key, PropTypeId, oss.str().c_str());
1149 }
1150 
1151 
1152 PWP_BOOL
1154  const PWGM_CONDDATA &condData)
1155 {
1156  const bool ret = PwAsmSetConditionUserName(h, key, condData.name) &&
1157  PwAsmSetConditionUserId(h, key, condData.id) &&
1158  PwAsmSetConditionTypeName(h, key, condData.type) &&
1159  PwAsmSetConditionTypeId(h, key, condData.tid);
1160  return PWP_CAST_BOOL(ret);
1161 }
1162 
1163 
1164 PWP_BOOL
1166  const PWGM_CONDKEY key, const PWP_UINT32 startCell,
1167  const PWP_UINT32 endCell)
1168 {
1169  return (BLKASMMODEL_IN && BLKASMMODEL_IN->PwAsmSetCellSpanConditionKeyCB) ?
1170  BLKASMMODEL_IN->PwAsmSetCellSpanConditionKeyCB(blkAsm, key, startCell, endCell) :
1171  PWP_FALSE;
1172 }
1173 
1174 
1175 PWP_BOOL
1177  const PWP_UINT32 cell)
1178 {
1179  return PwAsmSetCellSpanConditionKey(assembler, key, cell, cell);
1180 }
1181 
1182 
1183 PWP_BOOL
1184 PwVlstReadFile(PWGM_HVERTEXLIST vertlist, FILE *file,
1185  const PWGM_XYZ_CLUSTERING fileClustering,
1186  const PWP_ENDIANNESS fileByteOrder, const PWP_ENUM_PRECISION filePrecision)
1187 {
1188  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstReadFileCB) ?
1189  VLISTMODEL_IN->PwVlstReadFileCB(vertlist, file, fileClustering,
1190  fileByteOrder, filePrecision) : PWP_FALSE;
1191 }
1192 
1193 
1196  const PWP_ENUM_DIMENSION blkElemDimty)
1197 {
1198  return (MODEL_IN && MODEL_IN->PwModCreateUnsVertexListCB) ?
1199  MODEL_IN->PwModCreateUnsVertexListCB(model, blkElemDimty) :
1200  badVertexList;
1201 }
1202 
1203 
1206 {
1208 }
1209 
1210 
1213 {
1215 }
1216 
1217 
1218 PWP_BOOL
1220 {
1221  return VLISTMODEL_IN && VLISTMODEL_IN->PwVlstAllocateCB &&
1222  VLISTMODEL_IN->PwVlstAllocateCB(vertlist, n);
1223 }
1224 
1225 
1228 {
1229  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstCreateUnsBlockCB) ?
1230  VLISTMODEL_IN->PwVlstCreateUnsBlockCB(vertlist) : badBlock;
1231 }
1232 
1233 
1234 PWP_BOOL
1236  const PWP_UINT count)
1237 {
1238  return (BLKMODEL_IN && BLKMODEL_IN->PwUnsBlkAllocateElementsCB) ?
1239  BLKMODEL_IN->PwUnsBlkAllocateElementsCB(block, cellType, count) :
1240  PWP_FALSE;
1241 }
1242 
1243 
1244 PWP_BOOL
1246 {
1248  PwBlkGetVertexList(block))) {
1249  // only assign 3-D block element counts
1251  PWGM_ECNT_Hex(counts)) &&
1253  PWGM_ECNT_Pyramid(counts)) &&
1255  PWGM_ECNT_Tet(counts)) &&
1257  PWGM_ECNT_Wedge(counts));
1258  }
1259  // only assign 2-D block element counts
1261  PWGM_ECNT_Quad(counts)) &&
1263  PWGM_ECNT_Tri(counts));
1264 }
1265 
1266 
1267 PWP_BOOL
1269  const PWGM_ELEMDATA *eData)
1270 {
1271  return (BLKMODEL_IN && BLKMODEL_IN->PwUnsBlkSetElementCB) ?
1272  BLKMODEL_IN->PwUnsBlkSetElementCB(block, ndx, eData) : PWP_FALSE;
1273 }
1274 
1275 
1278 {
1279  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstCreateUnsDomainCB) ?
1280  VLISTMODEL_IN->PwVlstCreateUnsDomainCB(vertlist) : badDomain;
1281 }
1282 
1283 
1286 {
1287  PWGM_HDOMAIN hDom = PwVlstCreateUnsDomain(vertlist);
1288  if (!PwDomSetProperty(hDom, PropSubType, SubTypeBoundary)) {
1289  // not good
1290  hDom = PWGM_HDOMAIN_INIT;
1291  }
1292  return hDom;
1293 }
1294 
1295 
1296 PWP_BOOL
1298  const PWP_UINT n)
1299 {
1300  return (DOMMODEL_IN && DOMMODEL_IN->PwUnsDomAllocateElementsCB) ?
1301  DOMMODEL_IN->PwUnsDomAllocateElementsCB(domain, cellType, n): PWP_FALSE;
1302 }
1303 
1304 
1305 PWP_BOOL
1307 {
1309  PWGM_ECNT_Tri(counts)) &&
1311  PWGM_ECNT_Quad(counts));
1312 }
1313 
1314 
1315 PWP_BOOL
1317  const PWGM_ELEMDATA *eData)
1318 {
1319  return (DOMMODEL_IN && DOMMODEL_IN->PwUnsDomSetElementCB) ?
1320  DOMMODEL_IN->PwUnsDomSetElementCB(domain, ndx, eData) : PWP_FALSE;
1321 }
1322 
1323 
1326 {
1327  return (VLISTMODEL_IN && VLISTMODEL_IN->PwVlstCreateBlockAssemblerCB) ?
1328  VLISTMODEL_IN->PwVlstCreateBlockAssemblerCB(vertlist) : badAssembler;
1329 }
1330 
1331 
1332 PWP_BOOL
1334  const PWGM_ASSEMBLER_DATA *face)
1335 {
1336  return (BLKASMMODEL_IN && BLKASMMODEL_IN->PwAsmPushElementFaceCB) ?
1337  BLKASMMODEL_IN->PwAsmPushElementFaceCB(blkAsm, face) : PWP_FALSE;
1338 }
1339 
1340 
1341 PWP_BOOL
1343 {
1344  return (BLKASMMODEL_IN && BLKASMMODEL_IN->PwAsmFinalizeCB) ?
1345  BLKASMMODEL_IN->PwAsmFinalizeCB(blkAsm) : PWP_FALSE;
1346 }
1347 
1348 
1351 {
1352  return (BLKASMMODEL_IN && BLKASMMODEL_IN->PwAsmGetVertexListCB) ?
1353  BLKASMMODEL_IN->PwAsmGetVertexListCB(blkAsm) : badVertexList;
1354 }
1355 
1356 
1359 {
1360  return (MODEL_IN && MODEL_IN->PwModCreateStrBlockCB) ?
1361  MODEL_IN->PwModCreateStrBlockCB(model, blkSize) : badBlock;
1362 }
1363 
1364 
1367 {
1368  return (MODEL_IN && MODEL_IN->PwModCreateStrDomainCB) ?
1369  MODEL_IN->PwModCreateStrDomainCB(model, domSize) : badDomain;
1370 }
1371 
1372 #endif // !defined(PWGM_HIDE_IMPORT_API)
PWGM_HVERTEXLIST PwModCreateUnsVertexList2(PWGM_HGRIDMODEL model)
Creates an empty, unstructured vertex list in a model for 2-D blocks and 1-D domains.
PWP_BOOL PwBlkSetConditionTypeId(PWGM_HBLOCK block, const PWP_UINT32 typeId)
PWP_BOOL PwVlstReadFile(PWGM_HVERTEXLIST vertlist, FILE *file, const PWGM_XYZ_CLUSTERING fileClustering, const PWP_ENDIANNESS fileByteOrder, const PWP_ENUM_PRECISION filePrecision)
PWP_BOOL PwConSetConditionTypeName(PWGM_HCONNECTOR connector, const char *typeName)
PWP_UINT32 PWGM_CONDKEY
The condition key integral type.
The 2D transform matrix data type.
Definition: apiGridModel.h:905
3D, 6-sided (block) grid element
Definition: apiGridModel.h:676
#define PWGM_ECNT_Wedge(ecs)
Extract the Wedge count from a PWGM_ELEMCOUNTS struct.
Definition: apiGridModel.h:809
PWP_BOOL PwBlkNdxConnection(PWGM_HBLOCK block, PWP_UINT32 ndx, PWGM_CNXNDATA *pCnxnData)
Get the data for the block&#39;s nth connection.
PWP_UINT32 id
grid-defined condition id
Definition: apiGridModel.h:648
PWP_BOOL PwModNdxBoundaryAndCondition(PWGM_HGRIDMODEL model, PWP_UINT32 ndx, PWGM_BNDRYDATA *pBndryData, PWGM_CONDDATA *pCondData)
Get the PWGM_BNDRYDATA and PWGM_CONDDATA for the model&#39;s nth structured boundary. ...
PWP_ENUM_VALTYPE
Supported PWP-API getValue() transfer types.
Definition: apiPWP.h:698
Grid element handle declaration.
Definition: apiGridModel.h:429
PWGM_XYZVAL z
z-component
Definition: apiGridModel.h:612
PWP_BOOL PwBlkSetProperty(PWGM_HBLOCK block, const char *key, const char *val)
Sets the property named key to val.
PWP_BOOL PwAsmSetConditionTypeName(PWGM_HBLOCKASSEMBLER h, const PWGM_CONDKEY key, const char *typeName)
PWP_UINT PwVlstGetIndexDimensionality(PWGM_HVERTEXLIST vertlist)
Get the index dimensionality of a vertex list.
transfer value is a PWP_REAL
Definition: apiPWP.h:702
#define PWGM_HDOMAIN_ISVALID(h)
returns non-zero value if handle is valid
Definition: apiGridModel.h:376
PWP_BOOL PwBlkSetName(PWGM_HBLOCK block, const char *name)
Set a block&#39;s name.
PWP_BOOL PwVlstSetXYZ2Data(PWGM_HVERTEXLIST vertlist, const PWGM_INDEX2 ndx2, const PWGM_VERTDATA &v)
Set the XYZ of a point in a 2D structured vertex list using a PWGM_VERTDATA value.
The 3D transform matrix data type.
Definition: apiGridModel.h:894
InteriorFirst grouped by VCs then BCs.
BoundariesOnly grouped by VCs.
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:212
PWP_BOOL PwBndryCondition(PWGM_HBNDRY boundary, PWGM_CONDDATA *pCondData)
Get the boundary&#39;s condition data.
PWGM_HBNDRY PwModEnumBoundaries(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model&#39;s boundaries.
PWP_BOOL PwAsmSetConditionUserName(PWGM_HBLOCKASSEMBLER h, const PWGM_CONDKEY key, const char *userName)
2D, 4-sided grid element
Definition: apiGridModel.h:677
PWP_BOOL PwAsmFinalize(PWGM_HBLOCKASSEMBLER blkAsm)
Stitches together all the faces added to the assembler into cells and blocks.
PWGM_HBLOCKASSEMBLER PwVlstCreateBlockAssembler(PWGM_HVERTEXLIST vertlist)
Creates an unstructured block face assembler that uses vertices from an unstructured vertex list...
PWGM_HVERTEXLIST PwBlkGetVertexList(PWGM_HBLOCK block)
Get the vertex list associated with an unstructured or structured block.
PWP_UINT32 PwModBoundaryCount(PWGM_HGRIDMODEL model)
Get the number of structured grid boundaries in the model.
transfer value is a PWP_INT
Definition: apiPWP.h:700
PWP_BOOL PwXform3to2(const PWGM_INDEX_XFORM *pX3, PWGM_INDEX_XFORM2 *pX2)
Convert a 3D transform matrix to it&#39;s 2D equivalent.
const char * PwFaceOrderToText(PWGM_ENUM_FACEORDER faceOrder)
Maps a PWGM_ENUM_FACEORDER value to a human readable string.
PWP_BOOL PwConSetName(PWGM_HCONNECTOR connector, const char *name)
Set a connector&#39;s name.
3D, 4-sided (tetrahedral) grid element
Definition: apiGridModel.h:679
PWP_BOOL PwVlstAllocate(PWGM_HVERTEXLIST vertlist, const PWP_UINT n)
Allocates storage in an unstructured vertex list.
PWP_BOOL PwBlkNdxBoundary(PWGM_HBLOCK block, PWP_UINT32 ndx, PWGM_BNDRYDATA *pBndryData)
Get the data for the block&#39;s nth structured boundary.
void PWP_VOID
no value
Definition: apiPWP.h:319
PWP_BOOL PwConnection(PWGM_HCNXN connection, PWGM_CNXNDATA *pCnxnData)
Get the connection data.
PWGM_INDEX3(* PWGM_INDEX3MAPPERCB)(const PWGM_INDEX3 pwgmNdx, void *data)
The Custom Index3Scheme mapper callback function signature.
PWP_VOID PwModDefaultEnumElementOrder(PWGM_HGRIDMODEL model)
Reset the enumElements() ordering sequence to the default (none).
PWP_BOOL PwVertDataMod(PWGM_HVERTEX vertex, PWGM_VERTDATA *pVertData)
Get the vertex data relative to the model&#39;s index space.
PWP_UINT32(* PWGM_ENDSTREAMCB)(PWGM_ENDSTREAM_DATA *data)
The face stream callback function signature.
PWGM_HVERTEXLIST PwModCreateUnsVertexList(PWGM_HGRIDMODEL model, const PWP_ENUM_DIMENSION blkElemDimty)
Creates an empty, unstructured vertex list in a model.
PWP_BOOL PwUnsBlkSetElement(PWGM_HBLOCK block, const PWP_UINT ndx, const PWGM_ELEMDATA *eData)
Sets the connectivity for an unstructured block element.
2D, 3-sided grid element
Definition: apiGridModel.h:678
PWGM_HDOMAIN PwModEnumDomains(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model domain elements.
PWGM_HBNDRY PwBlkEnumBoundaries(PWGM_HBLOCK block, PWP_UINT32 ndx)
Sequentially enumerate the block&#39;s boundaries.
Pointwise Grid Model API Specification (PWGM-API)
PWP_INT32 m[2][3]
m[row][col]
Definition: apiGridModel.h:906
PWP_UINT32 PwBlkBoundaryCount(PWGM_HBLOCK block)
Get the number of boundaries in the block.
Face descriptor data type. Used for face assembler functions.
PWP_INT32 i
i-coordinate used for 2D grids
Definition: apiGridModel.h:871
PWP_BOOL PwVlstSetXYZVal(PWGM_HVERTEXLIST vertlist, const PWP_UINT ndx, const PWGM_ENUM_XYZ which, const PWGM_XYZVAL val)
Set an XYZ component of a point in a 1D vertex list.
PWP_ENUM_PRECISION
File precision values.
Definition: apiPWP.h:804
PWP_BOOL PwBlkSetCondition(PWGM_HBLOCK block, const PWGM_CONDDATA &condData)
PWP_BOOL PwBlkSetConditionUserName(PWGM_HBLOCK block, const char *userName)
Sets the condition data for a grid entity.
PWP_BOOL PwModGetAttributeUINT(PWGM_HGRIDMODEL model, const char *name, PWP_UINT *val)
transfer value is a const char*
Definition: apiPWP.h:699
An opaque handle to a grid vertex element.
Definition: apiGridModel.h:400
PWP_BOOL PwDomSetProperty(PWGM_HDOMAIN domain, const char *key, const char *val)
PWP_BOOL PwVlstSetXYZ(PWGM_HVERTEXLIST vertlist, const PWP_UINT ndx, const PWGM_XYZVAL x, const PWGM_XYZVAL y, const PWGM_XYZVAL z)
Set the XYZ of a point in a 1D vertex list.
PWP_UINT32 PwBlkElementCount(PWGM_HBLOCK block, PWGM_ELEMCOUNTS *pCounts)
Get the number of block elements.
PWP_BOOL PwBlkCondition(PWGM_HBLOCK block, PWGM_CONDDATA *pCondData)
Get the block condition data.
PWGM_HBLOCK PwModCreateStrBlock(PWGM_HGRIDMODEL model, const PWGM_STR_SIZE blkSize)
Creates a structured block in a model.
PWP_BOOL PwElemDataMod(PWGM_HELEMENT element, PWGM_ELEMDATA *pElemData)
Get the element data relative to the model&#39;s index space.
PWP_UINT32 PwModVertexCount(PWGM_HGRIDMODEL model)
Get the number of model vertex elements.
#define PWP_CAST_BOOL(v)
Cast a value to a PWP_BOOL value (PWP_TRUE or PWP_FALSE)
Definition: apiPWP.h:314
#define PWP_TRUE
PWP_BOOL logical "true" value.
Definition: apiPWP.h:311
PWGM_HELEMENT PwDomEnumElements(PWGM_HDOMAIN domain, PWP_UINT32 ndx)
Sequentially enumerate the domain elements.
#define PWGM_ECNT_Quad(ecs)
Extract the Quad count from a PWGM_ELEMCOUNTS struct.
Definition: apiGridModel.h:791
PWP_BOOL PwBoundary(PWGM_HBNDRY boundary, PWGM_BNDRYDATA *pBndryData)
Get the boundary data.
PWGM_HDOMAIN PwModCreateStrDomain(PWGM_HGRIDMODEL model, const PWGM_STR_SIZE domSize)
Creates a structured domain in a model.
PWGM_HELEMENT PwBlkEnumElements(PWGM_HBLOCK block, PWP_UINT32 ndx)
Sequentially enumerate the block elements.
PWP_BOOL PwModCustomIndex3SchemeReady(PWGM_HGRIDMODEL model, PWGM_INDEX3MAPPERCB cb, void *data)
Notifys the Pointwise export framework that the custom index3 map is ready.
PWP_BOOL PwUnsDomAllocateElementCounts(PWGM_HDOMAIN domain, const PWGM_ELEMCOUNTS &counts)
Allocates element storage in an unstructured domain.
all cell faces in any order
InteriorFirst grouped by BCs.
PWGM_ENUM_XYZ
XYZ component type ids.
Definition: apiGridModel.h:823
PWP_BOOL PwAsmPushElementFace(PWGM_HBLOCKASSEMBLER blkAsm, const PWGM_ASSEMBLER_DATA *face)
Adds a face to an unstructured block face assembler.
PWP_BOOL PwModNdxBoundary(PWGM_HGRIDMODEL model, PWP_UINT32 ndx, PWGM_BNDRYDATA *pBndryData)
Get the data for the model&#39;s nth structured boundary.
PWGM_ENUM_IJK
IJK component type ids.
Definition: apiGridModel.h:988
Block data type.
Definition: apiGridModel.h:978
1D, linear grid element
Definition: apiGridModel.h:675
#define PWGM_ECNT_Hex(ecs)
Extract the Hex count from a PWGM_ELEMCOUNTS struct.
Definition: apiGridModel.h:785
An opaque handle to a structured block boundary.
Definition: apiGridModel.h:459
PWP_BOOL PwInRange(PWGM_INDEX3 ijk, const PWGM_STR_RANGE *pRange)
Determines if an PWGM_INDEX3 is within a PWGM_STR_RANGE.
PWP_UINT32(* PWGM_FACESTREAMCB)(PWGM_FACESTREAM_DATA *data)
The face stream callback function signature.
PWGM_ENUM_FACEORDER
The orderings supported by face streaming.
PWP_BOOL PwDomCondition(PWGM_HDOMAIN domain, PWGM_CONDDATA *pCondData)
Get the domain condition data.
Element descriptor data type.
Definition: apiGridModel.h:737
PWGM_INDEX3 PwXform2Apply(const PWGM_INDEX_XFORM2 *pX2, PWGM_INDEX3 ijk)
Apply a PWGM_INDEX_XFORM2 transform to a PWGM_INDEX3 value.
An opaque handle to a structured, inter-block connection.
Definition: apiGridModel.h:484
float PWP_FLOAT
32-bit real
Definition: apiPWP.h:263
Element count information.
Definition: apiGridModel.h:759
PWGM_HVERTEXLIST PwDomGetVertexList(PWGM_HDOMAIN domain)
Get the vertex list associated with an unstructured or structured domain.
PWP_BOOL PwModCustomIndexSchemeReady(PWGM_HGRIDMODEL model, PWGM_INDEXMAPPERCB cb, void *data)
Notifys the Pointwise export framework that the custom index map is ready.
PWGM_HCNXN PwModEnumConnections(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model&#39;s connections.
PWGM_HCONNECTOR PwModCreateCon(PWGM_HGRIDMODEL model, PWP_UINT size)
Creates a connector in a model.
PWP_BOOL PwConSetConditionUserId(PWGM_HCONNECTOR connector, const PWP_UINT32 userId)
An opaque handle to a grid connector element.
Definition: apiGridModel.h:509
const char * PwElemTypeToText(PWGM_ENUM_ELEMTYPE type)
Maps a PWGM_ENUM_ELEMTYPE value to a human readable string.
only boundary cell faces
static PWP_UINT32 beginCB(PWGM_BEGINSTREAM_DATA *data)
PWP_BOOL PwConSetCondition(PWGM_HCONNECTOR connector, const PWGM_CONDDATA &condData)
all cell faces in interior, boundary order
PWGM_INDEX3 end
ending index
Definition: apiGridModel.h:884
PWP_BOOL PwUnsDomSetElement(PWGM_HDOMAIN domain, const PWP_UINT ndx, const PWGM_ELEMDATA *eData)
Sets the connectivity for an unstructured domain element.
Structured grid ijk index data type.
Definition: apiGridModel.h:870
PWP_UINT32 tid
cae-defined condition id
Definition: apiGridModel.h:650
PWP_BOOL PwConSetConditionUserName(PWGM_HCONNECTOR connector, const char *userName)
PWP_UINT32 PwModEnumElementCount(PWGM_HGRIDMODEL model, PWGM_ELEMCOUNTS *pCounts)
Get the number of enumerated model block elements.
PWP_UINT32 PwModBlockCount(PWGM_HGRIDMODEL model)
Get the number of block elements in the model.
PWP_UINT64(* PWGM_INDEXMAPPERCB)(const PWP_UINT64 pwgmNdx, void *data)
The Custom IndexScheme mapper callback function signature.
transfer value is a PWP_BOOL
Definition: apiPWP.h:704
static PWP_UINT32 faceCB(PWGM_FACESTREAM_DATA *data)
PWP_BOOL PwAsmSetCellConditionKey(PWGM_HBLOCKASSEMBLER assembler, const PWGM_CONDKEY key, const PWP_UINT32 cell)
K-component id.
Definition: apiGridModel.h:991
PWP_BOOL PwAsmSetCellSpanConditionKey(PWGM_HBLOCKASSEMBLER blkAsm, const PWGM_CONDKEY key, const PWP_UINT32 startCell, const PWP_UINT32 endCell)
const char * name
grid-defined condition name
Definition: apiGridModel.h:647
PWP_UINT32 PwBlkConnectionCount(PWGM_HBLOCK block)
Get the number of connections in the block.
PWP_BOOL PwVertIndexMod(PWGM_HVERTEX vertex, PWP_UINT32 *pIndex)
Get the vertex index relative to the model&#39;s index space.
BoundaryFirst grouped by BCs.
PWGM_ENUM_ELEMTYPE
Element type ids.
Definition: apiGridModel.h:674
Structured grid ijk range data type.
Definition: apiGridModel.h:882
3D, 5-sided, quad-based grid element
Definition: apiGridModel.h:681
Structured grid ijk index data type.
Definition: apiGridModel.h:861
Vertex descriptor data type.
Definition: apiGridModel.h:609
PWP_ENUM_DIMENSION
Supported dimensionality values.
Definition: apiPWP.h:765
PWP_BOOL PwBlkNdxVertData(PWGM_HBLOCK block, PWGM_INDEX3 ndx3, PWGM_VERTDATA *pVertData)
Get the block&#39;s vertex data at the given index location.
0D, point grid element
Definition: apiGridModel.h:682
PWP_BOOL PwModGetAttributeString(PWGM_HGRIDMODEL model, const char *name, const char **val)
Get an attribute value as a specific type.
int PWP_BOOL
logical value
Definition: apiPWP.h:305
PWP_BOOL PwModGetAttributeFLOAT(PWGM_HGRIDMODEL model, const char *name, PWP_FLOAT *val)
PWP_BOOL PwAsmSetProperty(PWGM_HBLOCKASSEMBLER blkAsm, const PWP_UINT32 propertySetId, const char *key, const char *val)
PWP_BOOL PwVlstIsStructured(PWGM_HVERTEXLIST vertlist)
Check the type of a vertex list.
PWP_BOOL PwBlkSetConditionUserId(PWGM_HBLOCK block, const PWP_UINT32 userId)
PWP_BOOL PwConSetProperty(PWGM_HCONNECTOR connector, const char *key, const char *val)
PWP_BOOL PwVlstSetXYZVal3(PWGM_HVERTEXLIST vertlist, const PWGM_INDEX3 ndx3, const PWGM_ENUM_XYZ which, const PWGM_XYZVAL val)
Set an XYZ component of a point in a 3D structured vertex list.
transfer value is a PWP_UINT
Definition: apiPWP.h:701
3D, extruded, tri/quad grid element
Definition: apiGridModel.h:680
static PWP_UINT32 endCB(PWGM_ENDSTREAM_DATA *data)
Grid vertex list handle declaration.
Definition: apiGridModel.h:538
#define PWGM_HELEMENT_ISVALID(h)
returns non-zero value if handle is valid
Definition: apiGridModel.h:431
I-component id.
Definition: apiGridModel.h:989
#define PWGM_HVERTEX_ISVALID(h)
returns non-zero value if handle is valid
Definition: apiGridModel.h:402
only interior cell faces
PWP_BOOL PwModGetAttributeREAL(PWGM_HGRIDMODEL model, const char *name, PWP_REAL *val)
const char * type
cae-defined condition physical type name
Definition: apiGridModel.h:649
transfer value is a const char*
Definition: apiPWP.h:703
PWGM_HCNXN PwBlkEnumConnections(PWGM_HBLOCK block, PWP_UINT32 ndx)
Sequentially enumerate the block&#39;s connections.
PWGM_HVERTEXLIST PwModCreateUnsVertexList3(PWGM_HGRIDMODEL model)
Creates an empty, unstructured vertex list in a model for 3-D blocks and 2-D domains.
PWP_BOOL PwBlock(PWGM_HBLOCK block, PWGM_BLOCKDATA *pBlockData)
Get the block data.
PWP_UINT32 PwModDomainCount(PWGM_HGRIDMODEL model)
Get the number of domain elements in the model.
PWP_BOOL PwDomSetCondition(PWGM_HDOMAIN domain, const PWGM_CONDDATA &condData)
PWGM_INDEX3 beg
begining index
Definition: apiGridModel.h:883
PWP_INT32 j
j-coordinate used for 3D and 2D grids
Definition: apiGridModel.h:863
PWP_BOOL PwDomSetConditionUserId(PWGM_HDOMAIN domain, const PWP_UINT32 userId)
PWGM_HVERTEX PwModEnumVertices(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model vertex elements.
PWP_BOOL PwDomSetName(PWGM_HDOMAIN domain, const char *name)
Set a domain&#39;s name.
PWP_UINT32 PwDomElementCount(PWGM_HDOMAIN domain, PWGM_ELEMCOUNTS *pCounts)
Get the number of domain elements.
An opaque handle to a grid domain element.
Definition: apiGridModel.h:374
Enumerated model element descriptor data type.
Definition: apiGridModel.h:749
An opaque handle to an unstructured block assembler.
Definition: apiGridModel.h:568
PWP_BOOL PwVlstSetXYZData(PWGM_HVERTEXLIST vertlist, const PWP_UINT ndx, const PWGM_VERTDATA &v)
Set the XYZ of a point in a 1D vertex list using a PWGM_VERTDATA value.
PWP_INT32 k
k-coordinate used for 3D grids only
Definition: apiGridModel.h:864
PWP_BOOL PwXform2to3(const PWGM_INDEX_XFORM2 *pX2, PWGM_INDEX_XFORM *pX3)
Convert a 2D transform matrix to it&#39;s 3D equivalent.
PWP_BOOL PwVlstIsUnstructured(PWGM_HVERTEXLIST vertlist)
Check the type of a vertex list.
PWGM_HVERTEXLIST PwAsmGetVertexList(PWGM_HBLOCKASSEMBLER blkAsm)
Get the vertex list associated with an unstructured block assembler.
PWP_BOOL PwAsmSetConditionTypeId(PWGM_HBLOCKASSEMBLER h, const PWGM_CONDKEY key, const PWP_UINT32 typeId)
PWGM_HDOMAIN PwVlstCreateUnsDomain(PWGM_HVERTEXLIST vertlist)
Creates an unstructured domain that uses vertices from an unstructured vertex list.
PWP_UINT32 PWP_UINT
unsigned integer same size as void*
Definition: apiPWP.h:287
PWP_BOOL PwModGetAttributeValue(PWGM_HGRIDMODEL model, const char *name, PWP_ENUM_VALTYPE bufType, void *buf, PWP_UINT count)
Get an attribute&#39;s value.
#define PWGM_ECNT_Pyramid(ecs)
Extract the Pyramid count from a PWGM_ELEMCOUNTS struct.
Definition: apiGridModel.h:815
PWP_BOOL PwDomSetConditionTypeName(PWGM_HDOMAIN domain, const char *typeName)
PWGM_HDOMAIN PwVlstCreateUnsBoundary(PWGM_HVERTEXLIST vertlist)
PWP_BOOL PwConSetConditionTypeId(PWGM_HCONNECTOR connector, const PWP_UINT32 typeId)
PWGM_XYZVAL y
y-component
Definition: apiGridModel.h:611
Condition descriptor data type.
Definition: apiGridModel.h:646
PWP_BOOL PwBlkNdxBoundaryAndCondition(PWGM_HBLOCK block, PWP_UINT32 ndx, PWGM_BNDRYDATA *pBndryData, PWGM_CONDDATA *pCondData)
Get the PWGM_BNDRYDATA and PWGM_CONDDATA for the block&#39;s nth structured boundary. ...
PWP_ENDIANNESS
Flags used to indicate endianness or control endian behaviors in functions.
Definition: apiPWP.h:824
PWGM_XYZVAL x
x-component
Definition: apiGridModel.h:610
PWP_BOOL PwBlkSetExportName(PWGM_HBLOCK block, const char *name)
Set the name used to identify the block or group of blocks in the exported grid.
PWP_BOOL PwUnsBlkAllocateElements(PWGM_HBLOCK block, const PWGM_ENUM_ELEMTYPE cellType, const PWP_UINT count)
Allocates element storage in an unstructured block.
Structured grid boundary data type.
Definition: apiGridModel.h:953
PWP_BOOL PwModNdxConnection(PWGM_HGRIDMODEL model, PWP_UINT32 ndx, PWGM_CNXNDATA *pCnxnData)
Get the data for the model&#39;s nth connection.
PWP_BOOL PwAsmSetCondition(PWGM_HBLOCKASSEMBLER h, const PWGM_CONDKEY key, const PWGM_CONDDATA &condData)
ASSERT_COMPILE(sizeof(PWGM_ASSEMBLER_DATA)<=sizeof(PWP_UINT32) *8)
PWGM_HVERTEXLIST PwConGetVertexList(PWGM_HCONNECTOR connector)
Get the vertex list associated with a connector.
PWGM_ENUM_IJK PwXformFollows(const PWGM_INDEX_XFORM *pX3, PWGM_ENUM_IJK localAxis, PWP_BOOL *pFlipped)
For a given localAxis, determine the corresponding axis in the transformed system.
PWP_ENUM_DIMENSION PwVlstGetBlkElemDimensionality(PWGM_HVERTEXLIST vertlist)
Get the block element dimensionality of a vertex list.
PWP_BOOL PwModGetAttributeINT(PWGM_HGRIDMODEL model, const char *name, PWP_INT *val)
PWP_BOOL PwUnsDomAllocateElements(PWGM_HDOMAIN domain, const PWGM_ENUM_ELEMTYPE cellType, const PWP_UINT n)
Allocates element storage in an unstructured domain.
PWGM_HELEMENT PwModEnumElements(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model&#39;s block elements.
PWP_INT32 PWP_INT
integer same size as void*
Definition: apiPWP.h:284
PWP_BOOL PwDomSetConditionTypeId(PWGM_HDOMAIN domain, const PWP_UINT32 typeId)
PWP_INT32 j
j-coordinate used for 2D grids
Definition: apiGridModel.h:872
PWGM_ENUM_IJK PwXform2Follows(const PWGM_INDEX_XFORM2 *pX2, PWGM_ENUM_IJK localAxis, PWP_BOOL *pFlipped)
For a given localAxis, determine the corresponding axis in the transformed system.
PWP_BOOL PwModGetAttributeUINT32(PWGM_HGRIDMODEL model, const char *name, PWP_UINT32 *val)
PWGM_INDEX3 PwXformApply(const PWGM_INDEX_XFORM *pX3, PWGM_INDEX3 ijk)
Apply a PWGM_INDEX_XFORM transform to a PWGM_INDEX3 value.
PWP_BOOL PwAsmSetConditionUserId(PWGM_HBLOCKASSEMBLER h, const PWGM_CONDKEY key, const PWP_UINT32 userId)
PWGM_HBLOCK PwVlstCreateUnsBlock(PWGM_HVERTEXLIST vertlist)
Creates an unstructured block that uses vertices from an unstructured vertex list.
An opaque handle to a grid model.
Definition: apiGridModel.h:328
PWGM_ENUM_ELEMORDER
Types of element orderings.
Definition: apiGridModel.h:699
PWP_BOOL PwModStreamFaces(PWGM_HGRIDMODEL model, PWGM_ENUM_FACEORDER order, PWGM_BEGINSTREAMCB beginCB, PWGM_FACESTREAMCB faceCB, PWGM_ENDSTREAMCB endCB, void *userData)
Stream the grid model&#39;s faces to a callback function in the specified order.
PWP_BOOL PwVlstSetXYZ3(PWGM_HVERTEXLIST vertlist, const PWGM_INDEX3 ndx3, const PWGM_XYZVAL x, const PWGM_XYZVAL y, const PWGM_XYZVAL z)
Set the XYZ of a point in a 3D structured vertex list.
An opaque handle to a grid block element.
Definition: apiGridModel.h:347
PWGM_HBLOCK PwModEnumBlocks(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model block elements.
BoundaryOnly grouped by BCs.
Structured grid, inter-block, connection data type.
Definition: apiGridModel.h:963
PWP_BOOL PwModGetAttributeBOOL(PWGM_HGRIDMODEL model, const char *name, PWP_BOOL *val)
PWP_BOOL PwVlstSetXYZVal2(PWGM_HVERTEXLIST vertlist, const PWGM_INDEX2 ndx2, const PWGM_ENUM_XYZ which, const PWGM_XYZVAL val)
Set an XYZ component of a point in a 2D structured vertex list.
PWGM_INDEX3 PW_DLL_IMPEXP PWGM_STR_SIZE
Structured grid ijk size data type.
Definition: apiGridModel.h:877
PWP_BOOL PwModAppendEnumElementOrder(PWGM_HGRIDMODEL model, PWGM_ENUM_ELEMORDER order)
Append an element order to the enumElements() ordering sequence.
#define PWGM_ECNT_Tri(ecs)
Extract the Tri count from a PWGM_ELEMCOUNTS struct.
Definition: apiGridModel.h:797
PWP_REAL PWGM_XYZVAL
XYZ component data type.
Definition: apiGridModel.h:602
double PWP_REAL
64-bit real
Definition: apiPWP.h:266
PWP_BOOL PwBlkSetConditionTypeName(PWGM_HBLOCK block, const char *typeName)
PWP_UINT32(* PWGM_BEGINSTREAMCB)(PWGM_BEGINSTREAM_DATA *data)
The begin stream callback function signature.
PWP_BOOL PwBlkSize(PWGM_HBLOCK block, PWGM_STR_SIZE *pSize)
Get the block&#39;s vertex-size.
PWP_BOOL PwVlstSetXYZ3Data(PWGM_HVERTEXLIST vertlist, const PWGM_INDEX3 ndx3, const PWGM_VERTDATA &v)
Set the XYZ of a point in a 3D structured vertex list using a PWGM_VERTDATA value.
#define PWP_FALSE
PWP_BOOL logical "false" value.
Definition: apiPWP.h:308
PWP_BOOL PwVlstSetXYZ2(PWGM_HVERTEXLIST vertlist, const PWGM_INDEX2 ndx2, const PWGM_XYZVAL x, const PWGM_XYZVAL y, const PWGM_XYZVAL z)
Set the XYZ of a point in a 2D structured vertex list.
PWP_BOOL PwModGetAttributeEnum(PWGM_HGRIDMODEL model, const char *name, const char **val)
PWP_UINT32 PwModConnectionCount(PWGM_HGRIDMODEL model)
Get the number of structured grid connections in the model.
int PWP_INT32
32-bit integer
Definition: apiPWP.h:209
PWP_BOOL PwUnsBlkAllocateElementCounts(PWGM_HBLOCK block, const PWGM_ELEMCOUNTS &counts)
Allocates element storage in an unstructured block.
#define PWGM_HBLOCK_ISVALID(h)
Returns non-zero value if handle is valid.
Definition: apiGridModel.h:350
PWP_INT32 i
i-coordinate used for 3D and 2D grids
Definition: apiGridModel.h:862
PWP_BOOL PwModGetAttributeINT32(PWGM_HGRIDMODEL model, const char *name, PWP_INT32 *val)
PWP_BOOL PwDomSetConditionUserName(PWGM_HDOMAIN domain, const char *userName)
PWP_BOOL PwElemDataModEnum(PWGM_HELEMENT element, PWGM_ENUMELEMDATA *pEnumElemData)
Get the enumerated element data relative to the model&#39;s index space.
PWP_INT32 m[3][4]
m[row][col]
Definition: apiGridModel.h:895
PWP_BOOL PwVertXyzVal(PWGM_HVERTEX vertex, PWGM_ENUM_XYZ which, PWGM_XYZVAL *pVal)
Get a vertex&#39;s x, y, or z component value.
Data and functions useful to PWP-API compliant plugins.
#define PWGM_ECNT_Tet(ecs)
Extract the Tet count from a PWGM_ELEMCOUNTS struct.
Definition: apiGridModel.h:803
J-component id.
Definition: apiGridModel.h:990
all cell faces in boundary, interior order