Pointwise Plugin SDK
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CaeStrGridModel.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * CaeStrGridModel class
4  *
5  * (C) 2021 Cadence Design Systems, Inc. All rights reserved worldwide.
6  *
7  ***************************************************************************/
8 
9 #if !defined(PWGM_HIDE_STRUCTURED_API)
10 
11 #ifndef _CAESTRGRIDMODEL_H_
12 #define _CAESTRGRIDMODEL_H_
13 
14 
15 #include "apiGridModel.h"
16 #include "apiPWP.h"
17 
18 #include "CaeGridModel.h"
19 #include "CaeStrBoundaryGroup.h"
20 #include "CaeStrConnectionGroup.h"
21 
22 
37 public:
40  {
41  }
42 
44 
53  virtual PWGM_INDEX3 mapIndex(const PWGM_INDEX3 pwgmNdx) = 0;
54 };
55 
56 
66  public CaeStrBoundaryGroup {
67 public:
68 
70 
75 
77 
81  CaeStrGridModel(const CaeStrGridModel &src);
82 
84  virtual ~CaeStrGridModel();
85 
87 
94 
96 
103  static bool xform2to3(const PWGM_INDEX_XFORM2 &x2, PWGM_INDEX_XFORM &x3);
104 
106 
113  static bool xform3to2(const PWGM_INDEX_XFORM &x3, PWGM_INDEX_XFORM2 &x2);
114 
116 
126  static PWGM_INDEX3 xformApply(const PWGM_INDEX_XFORM &x3, const PWGM_INDEX3
127  &ijk);
128 
130 
141  localAxis, bool *pFlipped = 0);
142 
144 
154  static PWGM_INDEX3 xform2Apply(const PWGM_INDEX_XFORM2 &x2, const
155  PWGM_INDEX3 &ijk);
156 
158 
169  PWGM_ENUM_IJK localAxis, bool *pFlipped = 0);
170 
172 
181  static bool inRange(const PWGM_INDEX3 &ijk, const PWGM_STR_RANGE &range);
182 
183 protected:
184 
186  virtual PWP_UINT32 connectionCountImpl() const {
188  }
189  virtual PWGM_HCNXN enumConnectionsImpl(PWP_UINT32 ndx) const {
190  return PwModEnumConnections(model_, ndx);
191  }
192 
193  virtual PWP_UINT32 boundaryCountImpl() const {
194  return PwModBoundaryCount(model_);
195  }
196  virtual PWGM_HBNDRY enumBoundariesImpl(PWP_UINT32 ndx) const {
197  return PwModEnumBoundaries(model_, ndx);
198  }
200 };
201 
203 bool operator==(const PWGM_HBNDRY &h1, const PWGM_HBNDRY &h2);
204 bool operator!=(const PWGM_HBNDRY &h1, const PWGM_HBNDRY &h2);
205 bool operator<(const PWGM_HBNDRY &h1, const PWGM_HBNDRY &h2);
206 bool operator>(const PWGM_HBNDRY &h1, const PWGM_HBNDRY &h2);
207 
208 bool operator==(const PWGM_HCNXN &h1, const PWGM_HCNXN &h2);
209 bool operator!=(const PWGM_HCNXN &h1, const PWGM_HCNXN &h2);
210 bool operator<(const PWGM_HCNXN &h1, const PWGM_HCNXN &h2);
211 bool operator>(const PWGM_HCNXN &h1, const PWGM_HCNXN &h2);
213 
214 
215 // Must include here because these depend on CaeStrGridModel
216 #include "CaeStrBlock.h"
217 #include "CaeStrBoundary.h"
218 #include "CaeStrConnection.h"
219 
220 
221 #endif // _CAESTRGRIDMODEL_H_
222 
223 #endif // PWGM_HIDE_STRUCTURED_API
The 2D transform matrix data type.
Definition: apiGridModel.h:903
bool customIndexSchemeReady(CaeStrCustomIndexHandler &handler) const
Notify export framework that custom index mapper is ready for use.
The 3D transform matrix data type.
Definition: apiGridModel.h:892
unsigned int PWP_UINT32
32-bit unsigned integer
Definition: apiPWP.h:210
PWGM_HBNDRY PwModEnumBoundaries(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model&#39;s boundaries.
virtual ~CaeStrCustomIndexHandler()
Destructor.
PWP_UINT32 PwModBoundaryCount(PWGM_HGRIDMODEL model)
Get the number of structured grid boundaries in the model.
static bool xform2to3(const PWGM_INDEX_XFORM2 &x2, PWGM_INDEX_XFORM &x3)
Up converts an ij transform to an equivalent ijk transform.
Pointwise Plugin API (PWP-API)
bool operator==(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
PWGM_HGRIDMODEL model_
The bound PWGM_HGRIDMODEL.
Definition: CaeGridModel.h:145
Pointwise Grid Model API Specification (PWGM-API)
virtual PWGM_HCNXN enumConnectionsImpl(PWP_UINT32 ndx) const =0
Get a connection in the group.
PWGM_ENUM_IJK
IJK component type ids.
Definition: apiGridModel.h:986
An opaque handle to a structured block boundary.
Definition: apiGridModel.h:457
An opaque handle to a structured, inter-block connection.
Definition: apiGridModel.h:482
PWGM_HCNXN PwModEnumConnections(PWGM_HGRIDMODEL model, PWP_UINT32 ndx)
Sequentially enumerate the model&#39;s connections.
static bool xform3to2(const PWGM_INDEX_XFORM &x3, PWGM_INDEX_XFORM2 &x2)
Down converts a ijk transform to an equivalent ij transform.
virtual ~CaeStrGridModel()
Destructor.
bool operator!=(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
virtual PWP_UINT32 connectionCountImpl() const =0
Get the number of connections in the group.
static PWGM_ENUM_IJK xform2Follows(const PWGM_INDEX_XFORM2 &x2, PWGM_ENUM_IJK localAxis, bool *pFlipped=0)
Determines which axes are parallel in a transformed ij system.
The structured boundary group class.
static PWGM_INDEX3 xformApply(const PWGM_INDEX_XFORM &x3, const PWGM_INDEX3 &ijk)
Apply an ijk transform to an ijk connection index.
Structured grid ijk range data type.
Definition: apiGridModel.h:880
virtual PWGM_INDEX3 mapIndex(const PWGM_INDEX3 pwgmNdx)=0
Pure virtual index mapping method.
Structured grid ijk index data type.
Definition: apiGridModel.h:859
The grid model base class.
Definition: CaeGridModel.h:46
virtual PWGM_HBNDRY enumBoundariesImpl(PWP_UINT32 ndx) const =0
Get a boundary in the group.
virtual PWP_UINT32 boundaryCountImpl() const =0
Get the number of boundaries in the group.
static PWGM_INDEX3 xform2Apply(const PWGM_INDEX_XFORM2 &x2, const PWGM_INDEX3 &ijk)
Apply a transform to an ij connection index.
The structured block to block connection group class.
CaeStrGridModel(PWGM_HGRIDMODEL model)
Constructor.
The structured grid model class.
static bool inRange(const PWGM_INDEX3 &ijk, const PWGM_STR_RANGE &range)
Determines if an ijk index is within a given min/max range.
An opaque handle to a grid model.
Definition: apiGridModel.h:326
bool operator>(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
bool operator<(const PWGM_HBLOCK &h1, const PWGM_HBLOCK &h2)
PWP_UINT32 PwModConnectionCount(PWGM_HGRIDMODEL model)
Get the number of structured grid connections in the model.
static PWGM_ENUM_IJK xformFollows(const PWGM_INDEX_XFORM &x3, PWGM_ENUM_IJK localAxis, bool *pFlipped=0)
Determines which axes are parallel in a transformed ijk system.
The structured grid model index mapper handler class.