gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
CGNSZoneUnstruct.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 //
6 // Contributor(s):
7 // Thomas Toulorge
8 
9 #ifndef CGNS_ZONE_UNSTRUCT_H
10 #define CGNS_ZONE_UNSTRUCT_H
11 
12 #include "CGNSZone.h"
13 
14 #if defined(HAVE_LIBCGNS)
15 
16 class CGNSZoneUnstruct : public CGNSZone {
17 public:
18  CGNSZoneUnstruct(int fileIndex, int baseIndex, int zoneIndex, int meshDim,
19  cgsize_t startNode,
20  const Family2EltNodeTransfo &allEltNodeTransfo, int &err);
21 
22  virtual cgsize_t indexDataSize(cgsize_t nbVal) { return nbVal; }
23 
24  virtual void eltFromRange(const cgsize_t *range,
25  std::vector<cgsize_t> &elt) const;
26  virtual void eltFromList(const std::vector<cgsize_t> &list,
27  std::vector<cgsize_t> &elt) const;
28  virtual void nodeFromRange(const cgsize_t *range,
29  std::vector<cgsize_t> &node) const;
30  virtual void nodeFromList(const std::vector<cgsize_t> &range,
31  std::vector<cgsize_t> &node) const;
32 
33  virtual int readElements(std::vector<MVertex *> &allVert,
34  std::map<int, std::vector<MElement *> > *allElt,
35  std::vector<MElement *> &zoneElt,
36  std::vector<std::string> &allGeomName);
37 
38 protected:
39  int readSection(int iSect, const std::vector<MVertex *> &allVert,
40  const std::vector<SPoint3> &rawNode,
41  std::map<int, std::vector<MElement *> > *allElt,
42  std::vector<MElement *> &zoneElt);
43 };
44 
45 inline void CGNSZoneUnstruct::eltFromRange(const cgsize_t *range,
46  std::vector<cgsize_t> &elt) const
47 {
48  UnstructuredIndexing::entFromRange(range, elt);
49 }
50 
51 inline void CGNSZoneUnstruct::eltFromList(const std::vector<cgsize_t> &list,
52  std::vector<cgsize_t> &elt) const
53 {
54  UnstructuredIndexing::entFromList(list, elt);
55 }
56 
57 inline void CGNSZoneUnstruct::nodeFromRange(const cgsize_t *range,
58  std::vector<cgsize_t> &node) const
59 {
60  UnstructuredIndexing::entFromRange(range, node);
61 }
62 
63 inline void CGNSZoneUnstruct::nodeFromList(const std::vector<cgsize_t> &list,
64  std::vector<cgsize_t> &node) const
65 {
66  UnstructuredIndexing::entFromList(list, node);
67 }
68 
69 #endif // HAVE_LIBCGNS
70 
71 #endif // CGNS_ZONE_UNSTRUCT_H
CGNSZone.h