gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
CGNSZoneStruct.cpp
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 #include "Context.h"
10 #include "GmshMessage.h"
11 #include "MVertex.h"
12 #include "MElement.h"
13 #include "pointsGenerators.h"
14 #include "CGNSCommon.h"
15 #include "CGNSConventions.h"
16 #include "CGNSZoneStruct.h"
17 
18 #if defined(HAVE_LIBCGNS)
19 
20 namespace {
21 
22  template <int DIM>
23  MElement *createElement(const cgsize_t *ijk, const cgsize_t *nijk, int order,
24  std::size_t vertShift,
25  std::vector<MVertex *> &allVert,
26  std::map<int, std::vector<MElement *> > *allElt);
27 
28  void initLinShift(int order, int *shift)
29  {
30  fullMatrix<double> mono = gmshGenerateMonomialsLine(order, false);
31  for(int i = 0; i < mono.size1(); i++) {
32  shift[i] = mono(i, 0) + 0.5; // round double
33  }
34  }
35 
36  void initQuadShift(int order, int *shift)
37  {
39  for(int i = 0; i < mono.size1(); i++) {
40  for(int j = 0; j < 2; j++)
41  shift[i * 2 + j] = mono(i, j) + 0.5; // round double
42  }
43  }
44 
45  void initHexShift(int order, int *shift)
46  {
48  for(int i = 0; i < mono.size1(); i++) {
49  for(int j = 0; j < 3; j++)
50  shift[i * 3 + j] = mono(i, j) + 0.5; // round double
51  }
52  }
53 
54  template <>
55  MElement *createElement<2>(const cgsize_t *ijk, const cgsize_t *nijk,
56  int order, std::size_t vertShift,
57  std::vector<MVertex *> &allVert,
58  std::map<int, std::vector<MElement *> > *allElt)
59  {
60  // node shift from (i, j, k) depending on order
61  static int shiftP1[4][2] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
62  static int shiftP2[9][2] = {{0, 0}, {2, 0}, {2, 2}, {0, 2}, {1, 0},
63  {2, 1}, {1, 2}, {0, 1}, {1, 1}};
64 
65  // get element vertices
66  int mshEltType;
67  int *s;
68  if(order == 2) {
69  mshEltType = MSH_QUA_9;
70  s = (int *)shiftP2;
71  }
72  else {
73  mshEltType = MSH_QUA_4;
74  s = (int *)shiftP1;
75  }
76  int nbEltNode = ElementType::getNumVertices(mshEltType);
77  std::vector<MVertex *> eltVert(nbEltNode);
78  for(int iN = 0; iN < nbEltNode; iN++) {
79  const cgsize_t ijN[3] = {ijk[0] + s[2 * iN], ijk[1] + s[2 * iN + 1]};
80  const int ind = vertShift + ijk2Ind<2>(ijN, nijk);
81  eltVert[iN] = allVert[ind];
82  }
83 
84  // create element
85  MElementFactory factory;
86  MElement *e = factory.create(mshEltType, eltVert);
87 
88  // add element to data structure
89  int entity = 1;
90  allElt[3][entity].push_back(e);
91 
92  return e;
93  }
94 
95  template <>
96  MElement *createElement<3>(const cgsize_t *ijk, const cgsize_t *nijk,
97  int order, std::size_t vertShift,
98  std::vector<MVertex *> &allVert,
99  std::map<int, std::vector<MElement *> > *allElt)
100  {
101  // node shift from (i, j, k) depending on order
102  static bool isShiftInit[4] = {false, false, false, false};
103  static int shiftP1[8 * 3], shiftP2[27 * 3], shiftP3[64 * 3],
104  shiftP4[125 * 3];
105 
106  // get element vertices
107  int mshEltType;
108  int *s;
109  switch(order) {
110  case 1:
111  mshEltType = MSH_HEX_8;
112  if(!isShiftInit[0]) {
113  initHexShift(1, shiftP1);
114  isShiftInit[0] = true;
115  }
116  s = (int *)shiftP1;
117  break;
118  case 2:
119  mshEltType = MSH_HEX_27;
120  if(!isShiftInit[1]) {
121  initHexShift(2, shiftP2);
122  isShiftInit[1] = true;
123  }
124  s = (int *)shiftP2;
125  break;
126  case 3:
127  mshEltType = MSH_HEX_64;
128  if(!isShiftInit[2]) {
129  initHexShift(3, shiftP3);
130  isShiftInit[2] = true;
131  }
132  s = (int *)shiftP3;
133  break;
134  case 4:
135  mshEltType = MSH_HEX_125;
136  if(!isShiftInit[3]) {
137  initHexShift(4, shiftP4);
138  isShiftInit[3] = true;
139  }
140  s = (int *)shiftP4;
141  break;
142  default:
143  Msg::Error("Cannot coarsen structured zone to order %i, falling back to "
144  "linear",
145  order);
146  mshEltType = MSH_HEX_8;
147  if(!isShiftInit[0]) {
148  initHexShift(1, shiftP1);
149  isShiftInit[0] = true;
150  }
151  s = (int *)shiftP1;
152  break;
153  }
154  int nbEltNode = ElementType::getNumVertices(mshEltType);
155  std::vector<MVertex *> eltVert(nbEltNode);
156  for(int iN = 0; iN < nbEltNode; iN++) {
157  const cgsize_t ijkN[3] = {ijk[0] + s[3 * iN], ijk[1] + s[3 * iN + 1],
158  ijk[2] + s[3 * iN + 2]};
159  const cgsize_t ind = vertShift + ijk2Ind<3>(ijkN, nijk);
160  eltVert[iN] = allVert[ind];
161  }
162 
163  // create element
164  MElementFactory factory;
165  MElement *e = factory.create(mshEltType, eltVert);
166 
167  // add element to data structure
168  int entity = 1;
169  allElt[5][entity].push_back(e);
170 
171  return e;
172  }
173 
174  template <int DIM>
175  MElement *createBndElement(const cgsize_t *ijk, const cgsize_t *nijk,
176  const int *dir, int order, int entity,
177  std::size_t vertShift,
178  std::vector<MVertex *> &allVert,
179  std::map<int, std::vector<MElement *> > *allElt,
180  const std::vector<bool> &interfaceNode);
181 
182  template <>
183  MElement *createBndElement<2>(const cgsize_t *ijk, const cgsize_t *nijk,
184  const int *dir, int order, int entity,
185  std::size_t vertShift,
186  std::vector<MVertex *> &allVert,
187  std::map<int, std::vector<MElement *> > *allElt,
188  const std::vector<bool> &interfaceNode)
189  {
190  // node shift from (i, j, k) depending on order
191  static bool isShiftInit[4] = {false, false, false, false};
192  static int shiftP1[2], shiftP2[3], shiftP3[4], shiftP4[5];
193 
194  // get element vertices
195  int mshEltType;
196  int *s;
197  switch(order) {
198  case 1:
199  mshEltType = MSH_LIN_2;
200  if(!isShiftInit[0]) {
201  initLinShift(1, shiftP1);
202  isShiftInit[0] = true;
203  }
204  s = (int *)shiftP1;
205  break;
206  case 2:
207  mshEltType = MSH_LIN_3;
208  if(!isShiftInit[1]) {
209  initLinShift(2, shiftP2);
210  isShiftInit[1] = true;
211  }
212  s = (int *)shiftP2;
213  break;
214  case 3:
215  mshEltType = MSH_LIN_4;
216  if(!isShiftInit[2]) {
217  initLinShift(3, shiftP3);
218  isShiftInit[2] = true;
219  }
220  s = (int *)shiftP3;
221  break;
222  case 4:
223  mshEltType = MSH_LIN_5;
224  if(!isShiftInit[3]) {
225  initLinShift(4, shiftP4);
226  isShiftInit[3] = true;
227  }
228  s = (int *)shiftP4;
229  break;
230  default:
231  Msg::Error("Cannot coarsen structured zone to order %i, falling back to "
232  "linear",
233  order);
234  mshEltType = MSH_LIN_2;
235  if(!isShiftInit[0]) {
236  initLinShift(1, shiftP1);
237  isShiftInit[0] = true;
238  }
239  s = (int *)shiftP1;
240  break;
241  }
242  int nbEltNode = ElementType::getNumVertices(mshEltType);
243  std::vector<MVertex *> eltVert(nbEltNode);
244  bool isInternalInterface = true;
245  for(int iN = 0; iN < nbEltNode; iN++) {
246  cgsize_t ijN[2] = {ijk[0], ijk[1]};
247  ijN[dir[0]] += s[iN];
248  const cgsize_t ind = ijk2Ind<2>(ijN, nijk);
249  isInternalInterface &= interfaceNode[ind];
250  eltVert[iN] = allVert[vertShift + ind];
251  }
252 
253  // do no add element if it is part of an internal interface between blocks
254  if(isInternalInterface) return nullptr;
255 
256  // create element
257  MElementFactory factory;
258  MElement *e = factory.create(mshEltType, eltVert);
259 
260  // add element to data structure
261  allElt[1][entity].push_back(e);
262 
263  return e;
264  }
265 
266  template <>
267  MElement *createBndElement<3>(const cgsize_t *ijk, const cgsize_t *nijk,
268  const int *dir, int order, int entity,
269  std::size_t vertShift,
270  std::vector<MVertex *> &allVert,
271  std::map<int, std::vector<MElement *> > *allElt,
272  const std::vector<bool> &interfaceNode)
273  {
274  // node shift from (i, j, k) depending on order
275  static bool isShiftInit[4] = {false, false, false, false};
276  static int shiftP1[4 * 2], shiftP2[9 * 2], shiftP3[16 * 2], shiftP4[25 * 2];
277 
278  // get element vertices
279  int mshEltType;
280  int *s;
281  switch(order) {
282  case 1:
283  mshEltType = MSH_QUA_4;
284  if(!isShiftInit[0]) {
285  initQuadShift(1, shiftP1);
286  isShiftInit[0] = true;
287  }
288  s = (int *)shiftP1;
289  break;
290  case 2:
291  mshEltType = MSH_QUA_9;
292  if(!isShiftInit[1]) {
293  initQuadShift(2, shiftP2);
294  isShiftInit[1] = true;
295  }
296  s = (int *)shiftP2;
297  break;
298  case 3:
299  mshEltType = MSH_QUA_16;
300  if(!isShiftInit[2]) {
301  initQuadShift(3, shiftP3);
302  isShiftInit[2] = true;
303  }
304  s = (int *)shiftP3;
305  break;
306  case 4:
307  mshEltType = MSH_QUA_25;
308  if(!isShiftInit[3]) {
309  initQuadShift(4, shiftP4);
310  isShiftInit[3] = true;
311  }
312  s = (int *)shiftP4;
313  break;
314  default:
315  Msg::Error("Cannot coarsen structured zone to order %i, falling back to "
316  "linear",
317  order);
318  mshEltType = MSH_QUA_4;
319  if(!isShiftInit[0]) {
320  initQuadShift(1, shiftP1);
321  isShiftInit[0] = true;
322  }
323  s = (int *)shiftP1;
324  break;
325  }
326  int nbEltNode = ElementType::getNumVertices(mshEltType);
327  std::vector<MVertex *> eltVert(nbEltNode);
328  bool isInternalInterface = true;
329  for(int iN = 0; iN < nbEltNode; iN++) {
330  cgsize_t ijkN[3] = {ijk[0], ijk[1], ijk[2]};
331  ijkN[dir[0]] += s[2 * iN];
332  ijkN[dir[1]] += s[2 * iN + 1];
333  const cgsize_t ind = ijk2Ind<3>(ijkN, nijk);
334  isInternalInterface &= interfaceNode[ind];
335  eltVert[iN] = allVert[vertShift + ind];
336  }
337 
338  // do no add element if it is part of an internal interface between blocks
339  if(isInternalInterface) return nullptr;
340 
341  // create element
342  MElementFactory factory;
343  MElement *e = factory.create(mshEltType, eltVert);
344 
345  // add element to data structure
346  allElt[3][entity].push_back(e);
347 
348  return e;
349  }
350 
351 } // namespace
352 
353 template <int DIM>
354 CGNSZoneStruct<DIM>::CGNSZoneStruct(
355  int fileIndex, int baseIndex, int zoneIndex, int meshDim, cgsize_t startNode,
356  const Family2EltNodeTransfo &allEltNodeTransfo, int &err)
357  : CGNSZone(fileIndex, baseIndex, zoneIndex, CGNS_ENUMV(Structured), meshDim,
358  startNode, allEltNodeTransfo, err)
359 {
360  // Check consistency
361  bool ok = true;
362  for(int d = 0; d < DIM; d++) ok &= (nbNodeIJK(d) == nbEltIJK(d) + 1);
363  if(ok)
364  err = 1;
365  else {
366  Msg::Error("CGNS zone %i: number of vertices (%i, %i, %i) is inconsistent "
367  "with number of elements (%i, %i, %i)",
368  zoneIndex, nbNodeIJK(0), nbNodeIJK(1),
369  (DIM == 3) ? nbNodeIJK(2) : 0, nbEltIJK(0), nbEltIJK(1),
370  (DIM == 3) ? nbEltIJK(2) : 0);
371  err = 0;
372  }
373 
374  // number of nodes and elements
375  nbNode_ = nbTotFromIJK<DIM>(nbNodeIJK());
376  nbElt_ = nbTotFromIJK<DIM>(nbEltIJK());
377 
378  interfaceNode_.resize(nbNode());
379 }
380 
381 template <int DIM>
382 int CGNSZoneStruct<DIM>::readElements(
383  std::vector<MVertex *> &allVert,
384  std::map<int, std::vector<MElement *> > *allElt,
385  std::vector<MElement *> &zoneElt, std::vector<std::string> &allGeomName)
386 {
387  // default BC (in case none specified)
388  const int firstDefaultEnt = allGeomName.size();
389  allGeomName.insert(allGeomName.end(), 2 * meshDim(), "");
390 
391  // order of coarsened mesh and number of potentially coarsened (HO) elements
392  int order = CTX::instance()->mesh.cgnsImportOrder;
393  if(order > 4) {
394  Msg::Warning("Cannot coarsen structured grid to order %i, creating linear "
395  "mesh in zone %i",
396  order, index());
397  order = 1;
398  }
399  else {
400  bool orderOK = true;
401  for(int d = 0; d < DIM; d++) orderOK &= (nbEltIJK(d) % order == 0);
402  if(!orderOK) {
403  Msg::Warning("Zone %i has (%i, %i, %i) vertices which cannot be coarsened"
404  " to order %i, creating linear mesh",
405  index(), nbNodeIJK(0), nbNodeIJK(1),
406  (DIM == 3) ? nbNodeIJK(2) : 0, order);
407  order = 1;
408  }
409  }
410  const int nbEltI = nbEltIJK(0) / order;
411  const int nbEltJ = nbEltIJK(1) / order;
412  const int nbEltK = (DIM == 3) ? nbEltIJK(2) / order : 1;
413 
414  // create domain elements
415  for(int k = 0; k < nbEltK; k++) {
416  for(int j = 0; j < nbEltJ; j++) {
417  for(int i = 0; i < nbEltI; i++) {
418  const cgsize_t ijk[3] = {i * order, j * order, k * order};
419  MElement *me = createElement<DIM>(ijk, nbNodeIJK(), order, startNode(),
420  allVert, allElt);
421  zoneElt.push_back(me);
422  }
423  }
424  }
425 
426  // create boundary elements for block faces i- and i+
427  for(int k = 0; k < nbEltK; k++) {
428  for(int j = 0; j < nbEltJ; j++) {
429  static const int dir[2] = {1, 2};
430  cgsize_t ijk[3] = {0, j * order, k * order};
431  MElement *me;
432  me = makeBndElement(ijk, dir, order, firstDefaultEnt, allVert, allElt);
433  if(me != nullptr) zoneElt.push_back(me);
434  ijk[0] = nbNodeIJK(0) - 1;
435  me =
436  makeBndElement(ijk, dir, order, firstDefaultEnt + 1, allVert, allElt);
437  if(me != nullptr) zoneElt.push_back(me);
438  }
439  }
440 
441  // create boundary elements for block faces j- and j+
442  for(int k = 0; k < nbEltK; k++) {
443  for(int i = 0; i < nbEltI; i++) {
444  static const int dir[2] = {0, 2};
445  cgsize_t ijk[3] = {i * order, 0, k * order};
446  MElement *me;
447  me =
448  makeBndElement(ijk, dir, order, firstDefaultEnt + 2, allVert, allElt);
449  if(me != nullptr) zoneElt.push_back(me);
450  ijk[1] = nbNodeIJK(1) - 1;
451  me =
452  makeBndElement(ijk, dir, order, firstDefaultEnt + 3, allVert, allElt);
453  if(me != nullptr) zoneElt.push_back(me);
454  }
455  }
456 
457  // create boundary elements for block faces k- and k+ if 3D
458  if(DIM == 3) {
459  for(int j = 0; j < nbEltJ; j++) {
460  for(int i = 0; i < nbEltI; i++) {
461  static const int dir[2] = {0, 1};
462  cgsize_t ijk[3] = {i * order, j * order, 0};
463  MElement *me;
464  me =
465  makeBndElement(ijk, dir, order, firstDefaultEnt + 4, allVert, allElt);
466  if(me != nullptr) zoneElt.push_back(me);
467  ijk[2] = nbNodeIJK(2) - 1;
468  me =
469  makeBndElement(ijk, dir, order, firstDefaultEnt + 5, allVert, allElt);
470  if(me != nullptr) zoneElt.push_back(me);
471  }
472  }
473  }
474 
475  return 1;
476 }
477 
478 template <int DIM>
479 MElement *CGNSZoneStruct<DIM>::makeBndElement(
480  const cgsize_t *ijk, const int *dir, int order, int defaultEntity,
481  std::vector<MVertex *> &allVert,
482  std::map<int, std::vector<MElement *> > *allElt)
483 {
484  cgsize_t iElt = ijk2Ind<DIM>(ijk, nbNodeIJK());
485  const auto it = elt2Geom().find(iElt);
486  const int entity = (it == elt2Geom().end()) ? defaultEntity : it->second;
487 
488  return createBndElement<DIM>(ijk, nbNodeIJK(), dir, order, entity,
489  startNode(), allVert, allElt, interfaceNode());
490 }
491 
492 template <int DIM>
493 int CGNSZoneStruct<DIM>::readConnectivities(
494  const std::map<std::string, int> &name2Zone,
495  std::vector<CGNSZone *> &allZones)
496 {
497  int cgnsErr;
498 
499  // read generic connectivities
500  CGNSZone::readConnectivities(name2Zone, allZones);
501 
502  // read number of 1to1 interfaces
503  int nbConnect;
504  cgnsErr = cg_n1to1(fileIndex(), baseIndex(), index(), &nbConnect);
505  if(cgnsErr != CG_OK) return cgnsError(__FILE__, __LINE__, fileIndex());
506 
507  // sweep over interfaces
508  for(int iConnect = 1; iConnect <= nbConnect; iConnect++) {
509  int err;
510  err = readOneInterface(iConnect, name2Zone, allZones);
511  if(err == 0) return 0;
512  }
513 
514  return 1;
515 }
516 
517 template <int DIM>
518 int CGNSZoneStruct<DIM>::readOneInterface(
519  int iConnect, const std::map<std::string, int> &name2Zone,
520  std::vector<CGNSZone *> &allZones)
521 {
522  int cgnsErr;
523 
524  // read connection
525  char connectName[CGNS_MAX_STR_LEN], donorName[CGNS_MAX_STR_LEN];
526  cgsize_t range[2 * DIM], rangeDonnor[2 * DIM];
527  int indexTransfo[DIM];
528  cgnsErr =
529  cg_1to1_read(fileIndex(), baseIndex(), index(), iConnect, connectName,
530  donorName, range, rangeDonnor, indexTransfo);
531  if(cgnsErr != CG_OK) return cgnsError(__FILE__, __LINE__, fileIndex());
532 
533  // read periodic connection information
534  bool periodic = false;
535  float rotCenter[3], rotAngle[3], translat[3];
536  cgnsErr = cg_1to1_periodic_read(fileIndex(), baseIndex(), index(), iConnect,
537  rotCenter, rotAngle, translat);
538  if(cgnsErr != CG_NODE_NOT_FOUND) {
539  if(cgnsErr == CG_OK)
540  periodic = true;
541  else
542  return cgnsError(__FILE__, __LINE__, fileIndex());
543  }
544 
545  // if not periodic, mark as internal interface and return
546  if(!periodic) {
547  std::vector<cgsize_t> indNode;
548  nodeFromRange(range, indNode);
549  for(std::size_t i = 0; i < indNode.size(); i++) {
550  interfaceNode_[indNode[i]] = true;
551  }
552  return 1;
553  }
554 
555  // TODO: fix periodicity in structured zones
556  // // range of IJK indices
557  // const cgsize_t ijkMin[3] = {range[0]-1, range[1]-1,
558  // (DIM == 3) ? range[2]-1 : 0};
559  // const cgsize_t ijkMax[3] = {range[DIM]-1, range[DIM+1]-1,
560  // (DIM == 3) ? range[5]-1 : 0};
561 
562  // // identify donnor (master) zone
563  // auto itDN = name2Zone.find(donorName);
564  // if(itDN == name2Zone.end()) {
565  // Msg::Error("Donnor zone '%s' not found in structured connectivity '%s' "
566  // "of zone %i ('%s')", donorName, connectName, zone.index,
567  // zone.name);
568  // return 0;
569  // }
570  // const int iZoneD = itDN->second;
571  // zone.masterZone.push_back(iZoneD);
572 
573  // // periodic transformation
574  // zone.perTransfo.push_back(std::vector<double>());
575  // computeAffineTransformation(rotCenter, rotAngle, translat,
576  // zone.perTransfo.back());
577 
578  // // number of nodes and origin of donnor (master) interface
579  // cgsize_t nijk[3] = {0, 0, 0};
580  // for(int d = 0; d < DIM; d++) nijk[d] = ijkMax[d]-ijkMin[d]+1;
581  // const cgsize_t nbNode = nijk[0]*nijk[1]*nijk[2];
582 
583  // // indexation in donnor zone
584  // ZoneInfo &zoneD = allZoneInfo[iZoneD];
585  // int errD = 1;
586  // StructuredInd<DIM> siD(iZoneD, zoneD.size, errD);
587  // if(errD == 0) return 0;
588  // const cgsize_t ijkMinD[3] = {rangeDonnor[0]-1, rangeDonnor[1]-1,
589  // (DIM == 3) ? rangeDonnor[2]-1 : 1};
590 
591  // // IJK directions and sign for master-slave index transformation
592  // int dir[3] = {-1, -1, 2};
593  // for(int d = 0; d < DIM; d++) dir[d] = std::abs(indexTransfo[d])-1;
594  // bool signDir[3] = {true, true, true};
595  // for(int d = 0; d < DIM; d++) signDir[d] = (indexTransfo[d] > 0);
596 
597  // // allocate storage for node correspondence
598  // zone.slaveNode.push_back(std::vector<cgsize_t>());
599  // std::vector<cgsize_t> &slaveNode = zone.slaveNode.back();
600  // slaveNode.reserve(nbNode);
601  // zone.slaveVert.push_back(std::vector<MVertex *>());
602  // zone.slaveVert.back().reserve(nbNode);
603  // zone.masterNode.push_back(std::vector<cgsize_t>());
604  // std::vector<cgsize_t> &masterNode = zone.masterNode.back();
605  // masterNode.reserve(nbNode);
606  // zone.masterVert.push_back(std::vector<MVertex *>());
607  // zone.masterVert.back().reserve(nbNode);
608 
609  // // store periodic node correspondence
610  // int ijk[3], ijkD[3];
611  // for(int k = 0; k < nijk[2]; k++) {
612  // ijk[2] = ijkMin[2] + k;
613  // for(int j = 0; j < nijk[1]; j++) {
614  // ijk[1] = ijkMin[1] + j;
615  // for(int i = 0; i < nijk[0]; i++) {
616  // ijk[0] = ijkMin[0] + i;
617  // for(int d = 0; d < DIM; d++) ijkD[d] = ijkMinD[d];
618  // ijkD[dir[0]] += signDir[dir[0]] ? i : -i;
619  // ijkD[dir[1]] += signDir[dir[1]] ? j : -j;
620  // ijkD[dir[2]] += signDir[dir[2]] ? k : -k;
621  // slaveNode.push_back(si.Node(ijk));
622  // masterNode.push_back(siD.Node(ijkD));
623  // }
624  // }
625  // }
626 
627  return 1;
628 }
629 
630 // explicit instantiation
631 
632 template class CGNSZoneStruct<2>;
633 template class CGNSZoneStruct<3>;
634 
635 #endif // HAVE_LIBCGNS
MSH_LIN_2
#define MSH_LIN_2
Definition: GmshDefines.h:80
contextMeshOptions::cgnsImportOrder
int cgnsImportOrder
Definition: Context.h:68
MSH_HEX_8
#define MSH_HEX_8
Definition: GmshDefines.h:84
CGNSZoneStruct.h
MElementFactory
Definition: MElement.h:517
MSH_HEX_64
#define MSH_HEX_64
Definition: GmshDefines.h:172
MSH_QUA_4
#define MSH_QUA_4
Definition: GmshDefines.h:82
Msg::Warning
static void Warning(const char *fmt,...)
Definition: GmshMessage.cpp:543
MSH_QUA_16
#define MSH_QUA_16
Definition: GmshDefines.h:115
Msg::Error
static void Error(const char *fmt,...)
Definition: GmshMessage.cpp:482
MSH_LIN_4
#define MSH_LIN_4
Definition: GmshDefines.h:105
GmshMessage.h
MSH_HEX_125
#define MSH_HEX_125
Definition: GmshDefines.h:173
CTX::instance
static CTX * instance()
Definition: Context.cpp:122
fullMatrix< double >
MSH_LIN_3
#define MSH_LIN_3
Definition: GmshDefines.h:87
MVertex.h
CTX::mesh
contextMeshOptions mesh
Definition: Context.h:313
MElement
Definition: MElement.h:30
MSH_LIN_5
#define MSH_LIN_5
Definition: GmshDefines.h:106
MSH_QUA_25
#define MSH_QUA_25
Definition: GmshDefines.h:116
CGNSConventions.h
CGNSCommon.h
MElementFactory::create
MElement * create(int type, std::vector< MVertex * > &v, std::size_t num=0, int part=0, bool owner=false, int parent=0, MElement *parent_ptr=nullptr, MElement *d1=nullptr, MElement *d2=nullptr)
Definition: MElement.cpp:2556
MSH_QUA_9
#define MSH_QUA_9
Definition: GmshDefines.h:89
Context.h
fullMatrix::size1
int size1() const
Definition: fullMatrix.h:274
MSH_HEX_27
#define MSH_HEX_27
Definition: GmshDefines.h:91
gmshGenerateMonomialsLine
fullMatrix< double > gmshGenerateMonomialsLine(int order, bool serendip)
Definition: pointsGenerators.cpp:171
MElement.h
ElementType::getNumVertices
int getNumVertices(int type)
Definition: ElementType.cpp:456
pointsGenerators.h
gmshGenerateMonomialsQuadrangle
fullMatrix< double > gmshGenerateMonomialsQuadrangle(int order, bool forSerendipPoints)
Definition: pointsGenerators.cpp:222
gmshGenerateMonomialsHexahedron
fullMatrix< double > gmshGenerateMonomialsHexahedron(int order, bool forSerendipPoints)
Definition: pointsGenerators.cpp:583