NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
exoMesh.H
Go to the documentation of this file.
1 /*******************************************************************************
2 * Promesh *
3 * Copyright (C) 2022, IllinoisRocstar LLC. All rights reserved. *
4 * *
5 * Promesh is the property of IllinoisRocstar LLC. *
6 * *
7 * IllinoisRocstar LLC *
8 * Champaign, IL *
9 * www.illinoisrocstar.com *
10 * promesh@illinoisrocstar.com *
11 *******************************************************************************/
12 /*******************************************************************************
13 * This file is part of Promesh *
14 * *
15 * This version of Promesh is free software: you can redistribute it and/or *
16 * modify it under the terms of the GNU Lesser General Public License as *
17 * published by the Free Software Foundation, either version 3 of the License, *
18 * or (at your option) any later version. *
19 * *
20 * Promesh is distributed in the hope that it will be useful, but WITHOUT ANY *
21 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more *
23 * details. *
24 * *
25 * You should have received a copy of the GNU Lesser General Public License *
26 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
27 * *
28 *******************************************************************************/
29 #ifndef NEMOSYS_EXOMESH_H_
30 #define NEMOSYS_EXOMESH_H_
31 
32 #include <map>
33 #include <string>
34 #include <vector>
35 
36 #include <vtkCellTypes.h>
37 
38 #include "nemosys_export.h"
39 
40 namespace NEM {
41 namespace MSH {
42 namespace EXOMesh {
43 
44 /**
45  * Logging method.
46  * @param errCode If <0, then error and throw. If =0, continue. If >0, warning.
47  * @param errMsg Message to output explaining error.
48  */
49 void NEMOSYS_EXPORT wrnErrMsg(int errCode, const std::string &errMsg = "None");
50 
51 /**
52  * EXODUS Element Types.
53  */
54 enum class NEMOSYS_EXPORT elementType {
56  QUAD,
57  TETRA,
58  HEX,
59  WEDGE,
60  OTHER
61 };
62 
63 /**
64  * Boundary condition types
65  */
66 enum class NEMOSYS_EXPORT surfaceBCTag { FIXED, SYMMX, SYMMY, SYMMZ };
67 
68 /**
69  * Stores node set information.
70  */
71 struct NEMOSYS_EXPORT ndeSetType {
72  int id; // written
73  int nNde; // written
74  std::string name; // written
75  std::vector<int> ndeIds; // written
77 };
78 
79 /**
80  * Stores element block information.
81  */
82 struct NEMOSYS_EXPORT elmBlkType {
83  int id; // written
84  std::string name; // written
85  elementType eTpe; // written
86  int ndePerElm; // written
87  int nElm; // written
88  std::vector<int> conn; // written
90  std::vector<int> elmIds;
91  std::map<int, std::vector<double>> ndeCoords;
92 };
93 
94 /**
95  * Stores side set information.
96  */
97 struct NEMOSYS_EXPORT sdeSetType {
98  int id; // written
99  std::string name; // written
100  int nSde; // written
101  std::vector<int> elmIds; // written
102  std::vector<int> sdeIds; // written
104 };
105 
106 using ndeSets = std::vector<ndeSetType>;
107 using elmBlks = std::vector<elmBlkType>;
108 using sdeSets = std::vector<sdeSetType>;
109 
110 /**
111  * Convert EXODUS element type to VTK cell type
112  * @param et EXODUS element type
113  * @return VTK cell type
114  */
115 VTKCellType NEMOSYS_EXPORT e2vEMap(elementType et);
116 /**
117  * Convert VTK cell type to EXODUS element type
118  * @param vt VTK cell type
119  * @return EXODUS element type
120  */
121 elementType NEMOSYS_EXPORT v2eEMap(VTKCellType vt);
122 /**
123  *
124  * @param tag
125  * @return
126  */
127 // TODO: documentation
128 surfaceBCTag NEMOSYS_EXPORT bcTagNum(std::string &tag);
129 /**
130  *
131  * @param tag
132  * @return
133  */
134 
135 // TODO: documentation
136 std::string NEMOSYS_EXPORT bcTagStr(surfaceBCTag tag);
137 
138 /**
139  * Convert string to EXODUS element type
140  * @param tag string tag of an element type
141  * @return EXODUS element type
142  */
143 elementType NEMOSYS_EXPORT elmTypeNum(std::string tag);
144 /**
145  * Convert EXODUS element type to string tab
146  * @param et EXODUS element type
147  * @return string tag of an element type
148  */
149 std::string NEMOSYS_EXPORT elmTypeStr(elementType et);
150 /**
151  * Get number of nodes given EXODUS element type and order
152  * @param et EXODUS element type
153  * @param order element order
154  * @return number of nodes
155  */
156 int NEMOSYS_EXPORT elmNumNde(elementType et, int order);
157 /**
158  * Get number of surfaces given EXODUS element type
159  * @param et EXODUS element type
160  * @return number of surfaces
161  */
162 int NEMOSYS_EXPORT elmNumSrf(elementType et);
163 
164 /**
165  * @brief A complete I/O class for EXODUS II file format.
166  *
167  * Methods for definition, addition, removal, and modification of the elements,
168  * nodes, element blocks, node sets, and side sets are implemented. The
169  * implementation relies on standard EXODUS II library provided in system
170  * repository.
171  */
172 class NEMOSYS_DEPRECATED_EXPORT exoMesh {
173  public:
174  exoMesh();
175  /**
176  * Construct exoMesh with initial file name
177  * @param ifname file name
178  */
179  explicit exoMesh(std::string ifname);
180 
181  exoMesh(const exoMesh &) = default;
182  exoMesh(exoMesh &&) = default;
183 
184  exoMesh &operator=(const exoMesh &) = default;
185  exoMesh &operator=(exoMesh &&) = default;
186 
187  ~exoMesh();
188 
189  // fast access
190  public:
191  // TODO: this flag is no longer supported and will be deprecated soon
192  bool isCompatible() const { return _isSupported; }
193 
194  /**
195  * Returns total number of nodes
196  */
197  int getNumberOfNodes() const { return _numNdes; }
198 
199  /**
200  * Returns total number of elements
201  */
202  int getNumberOfElements() const { return _numElms; }
203 
204  /**
205  * Returns total number of element blocks
206  */
207  int getNumberOfElementBlocks() const { return _elmBlks.size(); }
208 
209  /**
210  * Returns total number of node sets
211  */
212  int getNumberOfNodeSets() const { return _ndeSets.size(); }
213 
214  /**
215  * Returns total number of side sets
216  */
217  int getNumberOfSideSets() const { return _sdeSets.size(); }
218 
219  /**
220  * Returns the name the element block for given index
221  * @param idx index of block
222  */
223  const std::string &getElmBlkName(int idx) const { return _elmBlks[idx].name; }
224 
225  /**
226  * Returns the name the element block for given element block ID
227  * @param id ID of block
228  */
229  const std::string getElmBlkNameById(int id) const;
230 
231  /**
232  * Returns the name the nodeset for given index
233  * @param idx index of block
234  * @return string The name of nodeset
235  */
236  const std::string &getNdeSetName(int idx) const { return _ndeSets[idx].name; }
237 
238  /**
239  * Returns the name the nodeset for given nodeset id
240  * @param id ID of nodeset
241  * @return string The name of nodeset
242  */
243  std::string getNdeSetNameById(int id) const;
244 
245  /**
246  * Returns the name the sideset for given index
247  * @param idx index of block
248  */
249  const std::string &getSdeSetName(int idx) const { return _sdeSets[idx].name; }
250 
251  /**
252  * Returns the index for the element block for given id
253  * @param id Id of block
254  */
255  int getElmBlkIndex(int id) const;
256 
257  /**
258  * Returns the index for the element block for given name
259  * @param id Id of block
260  */
261  int getElmBlkIndex(const std::string name) const;
262 
263  /**
264  * Returns the id for the element block for given index
265  * @param idx index of block
266  */
267  int getElmBlkId(int idx) const { return _elmBlks[idx].id; }
268 
269  /**
270  * Returns the id for the element block from element block name
271  * @param ebName name of block
272  */
273  int getElmBlkId(std::string ebName) const;
274 
275  /**
276  * Returns the id for the nodeset for given index
277  * @param idx index of block
278  */
279  int getNdeSetId(int idx) const { return _ndeSets[idx].id; }
280 
281  /**
282  * Returns the id for the nodeset for nodeset name
283  * @param nsName name of nodeset
284  */
285  int getNdeSetId(const std::string &nsName) const;
286 
287  /**
288  * Returns the index for the nodeset for nodeset name
289  * @param nsName name of nodeset
290  */
291  int getNdeSetIndex(const std::string &nsName) const;
292 
293  /**
294  * Returns the id for the sideset for given index
295  * @param idx index of block
296  */
297  int getSdeSetId(int idx) const { return _sdeSets[idx].id; }
298 
299  /**
300  * Returns the id for the sideset for sideset name
301  * @param ssName name of sideset
302  */
303  int getSdeSetId(const std::string &ssName) const;
304 
305  /**
306  * Returns the index of the sideset for sideset name
307  * @param ssName name of sideset
308  */
309  int getSdeSetIndex(const std::string &ssName) const;
310 
311  /**
312  * Returns the element type for the block
313  * @param idx index of block
314  */
315  elementType getElmBlkType(int idx) const { return _elmBlks[idx].eTpe; };
316 
317  /**
318  * Returns the element type for the block
319  * @param id ID of block
320  */
321  elementType getElmBlkTypeById(int id) const;
322 
323  /**
324  * Returns the element type for the block
325  * @param ebName name of the element block
326  */
327  elementType getElmBlkType(const std::string &ebName) const;
328 
329  /**
330  * Returns the number of elements for the block
331  * @param idx index of block
332  */
333  int getNumElmsInBlk(int idx) const { return _elmBlks[idx].nElm; };
334 
335  /**
336  * Returns the number of elements for the block
337  * @param ebName name of the element block
338  */
339  int getNumElmsInBlk(const std::string &ebName) const;
340 
341  /**
342  * Returns the number of elements for the block
343  * @param id ID of the element block
344  */
345  int getNumElmsInBlkById(int id) const;
346 
347  /**
348  * Returns the number of nodes for the nodeset
349  * @param idx index of nodeset
350  */
351  int getNumNdesInNdeSet(int idx) const { return _ndeSets[idx].nNde; };
352 
353  /**
354  * Returns the number of nodes for the nodeset
355  * @param nsName name of nodeset
356  */
357  int getNumNdesInNdeSet(const std::string &nsName) const;
358 
359  /**
360  * Returns the number of nodes for the nodeset
361  * @param id ID of nodeset
362  */
363  int getNumNdesInNdeSetById(int id) const;
364 
365  /**
366  * Returns the number of sides for the sideset
367  * @param idx index of sideset
368  */
369  int getNumSdesInSdeSet(int idx) const { return _sdeSets[idx].nSde; };
370 
371  /**
372  * Returns the number of sides for the sideset
373  * @param ssName name of sideset
374  */
375  int getNumSdesInSdeSet(const std::string &ssName) const;
376 
377  /**
378  * Returns the number of sides for the sideset
379  * @param id ID of sideset
380  */
381  int getNumSdesInSdeSetById(int id) const;
382 
383  /**
384  * Returns the IDs of registered element blocks
385  */
386  const std::vector<int> &getElmBlkIds() const { return _elmBlkIds; };
387 
388  /**
389  * Returns the names of registered element blocks
390  */
391  const std::vector<std::string> &getElmBlkNames() const {
392  return _elmBlkNames;
393  };
394 
395  /**
396  * Returns the names of registered node sets
397  */
398  const std::vector<std::string> &getNdeSetNames() const {
399  return _ndeSetNames;
400  };
401 
402  /**
403  * Returns the names of registered side sets
404  */
405  const std::vector<std::string> &getSdeSetNames() const {
406  return _sdeSetNames;
407  };
408 
409  /**
410  * Returns problem dimension
411  */
412  int getDimension() const { return _numDim; }
413 
414  // fast modification
415  public:
416  /**
417  * Sets/changes block name
418  * @param idx index of block
419  * @param name name of the block
420  */
421  void setBlockName(int idx, const std::string &name) {
422  _elmBlks[idx].name = name;
423  }
424 
425  /**
426  * Sets/changes block name
427  * @param name of block
428  * @param newName new name of the block
429  */
430  void setBlockName(const std::string &name, const std::string &newName) {
431  int idx = getElmBlkIndex(name);
432  _elmBlks[idx].name = newName;
433  }
434 
435  /**
436  * Sets/changes sideset name
437  * @param idx index of sideset
438  * @param name name of the sideset
439  */
440  void setSdeSetName(int idx, const std::string &name) {
441  _sdeSets[idx].name = name;
442  }
443 
444  /**
445  * Sets/changes sideset name
446  * @param name name of sideset
447  * @param newName new name of the sideset
448  */
449  void setSdeSetName(const std::string &name, const std::string &newName) {
450  int idx = getSdeSetIndex(name);
451  _sdeSets[idx].name = newName;
452  }
453 
454  /**
455  * Sets/changes nodeset name
456  * @param idx index of nodeset
457  * @param name name of the nodeset
458  */
459  void setNdeSetName(int idx, const std::string &name) {
460  _ndeSets[idx].name = name;
461  }
462 
463  /**
464  * Sets/changes nodeset name
465  * @param name name of nodeset
466  * @param newName new name of the nodeset
467  */
468  void setNdeSetName(const std::string &name, const std::string &newName) {
469  int idx = getNdeSetIndex(name);
470  _ndeSets[idx].name = newName;
471  }
472 
473  /**
474  * Sets/changes the problem dimensionality
475  * @param dim dimension of problem 2D/3D
476  */
477  void setDimension(int dim) { _numDim = dim; }
478 
479  // adding nodes, element blocks, node sets, and side sets
480  public:
481  /**
482  * Add nodes to the database
483  * @param x
484  * @param y
485  * @param z
486  */
487  void addNde(double x, double y, double z) {
488  _xCrds.emplace_back(x);
489  _yCrds.emplace_back(y);
490  _zCrds.emplace_back(z);
491  ++_numNdes;
492  }
493  /**
494  * Add nodes to the database
495  * @param xyz 3-vector of form (x, y, z)
496  */
497  void addNde(const std::vector<double> &xyz) {
498  addNde(xyz[0], xyz[1], xyz[2]);
499  }
500  /**
501  * Add element block to the database
502  * @param eb EXODUS element block
503  */
504  void addElmBlk(const elmBlkType &eb) {
505  _elmBlks.emplace_back(eb);
506  _isPopulated = false;
507  }
508  /**
509  * Add node set to the database
510  * @param ns EXODUS node set
511  */
512  void addNdeSet(const ndeSetType &ns) {
513  _ndeSets.emplace_back(ns);
514  _isPopulated = false;
515  }
516  /**
517  * Add side set to the database
518  * @param ss EXODUS side set
519  */
520  void addSdeSet(const sdeSetType &ss) {
521  _sdeSets.emplace_back(ss);
522  _isPopulated = false;
523  }
524 
525  // removing nodes, element blocks, node sets, and side sets
526  public:
527  /**
528  * Remove an element block by name
529  * @note Calls exoPopulate.
530  * @param blkName element block name
531  */
532  void removeElmBlkByName(const std::string &blkName);
533 
534  /**
535  * Remove an element block by ID
536  * @note Calls exoPopulate but does not reindex blocks
537  * @param id element block ID
538  */
539  void removeElmBlkById(int id);
540 
541  // finding element blocks
542  public:
543  /**
544  * Finds index of the first block containing element
545  * @param elmId element id
546  * @return element block index
547  */
548  int findElmBlkIdxByElmId(int elmId) const; // returns -1 if not found
549  /**
550  * Finds index of the block containing most or all of the list (slower)
551  * @note returns -1 if not found
552  * @param elmIds vector of element ids
553  * @return element block index
554  */
555  int findElmBlkIdxByElmIdLst(const std::vector<int> &elmIds) const;
556 
557  // finding elements
558  public:
559  /**
560  * Finds all elements that are within the block and generates a list of them
561  * @param blkIdx element block index
562  * @param elmIds vector of element ids
563  * @param allIn true if all elements are in given element block
564  * @return subset of given element ids in given element block
565  */
566  std::vector<int> lstElmInBlk(int blkIdx, const std::vector<int> &elmIds,
567  bool &allIn) const;
568 
569  // augmentation and maintenance
570  public:
571  /**
572  * Combines element blocks into one block
573  * @note automatically augments sidesets between combined blocks
574  * @param blkIdLst vector of element block IDs
575  */
576  void combineElmBlks(const std::vector<int> &blkIdLst,
577  const std::string &newName);
578 
579  /**
580  * Updates sidesets from combining blocks
581  * @param old2NewElmIds map containing old and new
582  * element ids
583  */
584  void updateSidesets(const std::map<int, int> &old2NewElmIds);
585 
586  /**
587  * Removes a list of elements from an element block
588  * @param blkIdx element block index
589  * @param idLst vector of element ids
590  */
591  // TODO: Does NOT update side sets properly!
592  void removeByElmIdLst(int blkIdx, const std::vector<int> &idLst);
593 
594  /**
595  * Creates a new element block and augments previous owners
596  * @param name new element block name
597  * @param idLst vector of element ids
598  */
599  void addElmBlkByElmIdLst(const std::string &name, std::vector<int> &idLst);
600 
601  /**
602  * Creates a new node set and augments previous ones if needed
603  * @param name new node set name
604  * @param idLst vector of node ids
605  */
606  void addNdeSetByNdeIdLst(const std::string &name,
607  const std::vector<int> &idLst);
608  /**
609  * Filter nodal coordinates and snap to zero
610  * @param tol tolerance used to determine if zero
611  */
612  void snapNdeCrdsZero(double tol = 1e-5);
613 
614  /**
615  * Merges duplicated and nodes within given proximity
616  * @param tol tolerance used in determining if a line intersects a surface
617  */
618  void mergeNodes(double tol = 1e-15);
619 
620  /**
621  * scales the nodal coordinates
622  * @param sc scale factor
623  */
624  void scaleNodes(double sc = 1.0);
625 
626  public:
627  /**
628  * Stitch another mesh into the current.
629  *
630  * The stitching appends nodes, element blocks, node sets, and side sets to
631  * the end of the current exoMesh. The appended items will be re-indexed off
632  * the end of the current.
633  * @param otherMesh Other mesh to stitch into current mesh.
634  */
635  void stitch(const exoMesh &otherMesh);
636 
637  // I/O
638  public:
639  /**
640  * Change the file name. Affects calls to the write method.
641  * @param fName file name
642  */
643  void setFileName(const std::string &fName) { _ifname = fName; }
644  /**
645  * Write to file name specified at construction or using setFileName method
646  */
647  void write();
648  /**
649  * Resets the class and reads from file name provided
650  */
651  void read(const std::string &ifname = std::string());
652  /**
653  * Resets the EXODUS database. Clears nodes, element blocks, node sets, side
654  * sets.
655  */
656  void reset();
657 
658  // Miscellaneous
659  public:
660  /**
661  * Print out a report of the current EXODUS database.
662  */
663  void report() const;
664 
665  /**
666  * Toggle verbosity.
667  */
668  void togVrb() { _isVerbose = !_isVerbose; };
669 
670  private:
671  // populate quantities needed to write EXODUS file
672  void exoPopulate(bool updElmLst = false);
673 
674  /*
675  * Generic function to find duplicates elements in vector.
676  * It adds the duplicate elements and their duplication
677  * count in given map countMap
678  */
679  template <typename T>
680  std::map<T, int> findDuplicates(const std::vector<T> &vecOfElements) {
681  std::map<T, int> countMap;
682  // Iterate over the vector and store the frequency of each element in map
683  for (auto &elem : vecOfElements) {
684  auto result = countMap.insert(std::pair<T, int>(elem, 1));
685  if (result.second == false) result.first->second++;
686  }
687 
688  // Remove the elements from Map which has 1 frequency count
689  for (auto it = countMap.begin(); it != countMap.end();) {
690  if (it->second == 1)
691  it = countMap.erase(it);
692  else
693  it++;
694  }
695  return countMap;
696  }
697 
698  // EXODUS data
699  private:
700  // Dimension
701  int _numDim;
702 
703  // Nodes
704  int _numNdes;
705  std::vector<double> _xCrds;
706  std::vector<double> _yCrds;
707  std::vector<double> _zCrds;
708 
709  // Element Blocks
710  int _numElms;
712  std::vector<std::string> _elmBlkNames;
713  std::vector<int> _elmBlkIds;
714 
715  // Node Sets
717  std::vector<std::string> _ndeSetNames;
718 
719  // Side Sets
721  std::vector<std::string> _sdeSetNames;
722 
723  // Metadata
724  int _fid;
725  float _api_v;
726  float _dbs_v;
727  int _exErr;
728 
729  // exoMesh internal data
730  private:
731  std::string _ifname;
732  bool _isSupported; // false is non Tri/Tet elements were found
734  bool _isOpen;
736  bool _reindexBlks{true};
737  std::vector<std::vector<int>> glbConn; // populated with read()
738 };
739 
740 } // namespace EXOMesh
741 } // namespace MSH
742 } // namespace NEM
743 
744 #endif // NEMOSYS_EXOMESH_H_
int getElmBlkId(int idx) const
Returns the id for the element block for given index.
Definition: exoMesh.H:267
int getNumSdesInSdeSet(int idx) const
Returns the number of sides for the sideset.
Definition: exoMesh.H:369
std::vector< int > _elmBlkIds
Definition: exoMesh.H:713
elementType v2eEMap(VTKCellType vt)
Convert VTK cell type to EXODUS element type.
Definition: exoMesh.C:61
surfaceBCTag
Definition: pntMesh.H:62
const std::vector< std::string > & getElmBlkNames() const
Returns the names of registered element blocks.
Definition: exoMesh.H:391
int getDimension() const
Returns problem dimension.
Definition: exoMesh.H:412
elementType getElmBlkType(int idx) const
Returns the element type for the block.
Definition: exoMesh.H:315
std::vector< std::string > _ndeSetNames
Definition: exoMesh.H:717
std::vector< double > _xCrds
Definition: exoMesh.H:705
A complete I/O class for EXODUS II file format.
Definition: exoMesh.H:172
void setBlockName(int idx, const std::string &name)
Sets/changes block name.
Definition: exoMesh.H:421
std::vector< int > sdeIds
Definition: exoMesh.H:102
bool isCompatible() const
Definition: exoMesh.H:192
int getNumberOfNodeSets() const
Returns total number of node sets.
Definition: exoMesh.H:212
int getNdeSetId(int idx) const
Returns the id for the nodeset for given index.
Definition: exoMesh.H:279
std::string elmTypeStr(elementType et)
Convert EXODUS element type to string tab.
Definition: exoMesh.C:128
void addNde(double x, double y, double z)
Add nodes to the database.
Definition: exoMesh.H:487
void setSdeSetName(const std::string &name, const std::string &newName)
Sets/changes sideset name.
Definition: exoMesh.H:449
int elmNumSrf(elementType tag)
Get number of surfaces given EXODUS element type.
Definition: exoMesh.C:154
std::vector< int > elmIds
Definition: exoMesh.H:101
elementType elmTypeNum(std::string tag)
Convert string to EXODUS element type.
Definition: exoMesh.C:97
std::map< T, int > findDuplicates(const std::vector< T > &vecOfElements)
Definition: exoMesh.H:680
WEDGE
Definition: exoMesh.H:55
QUAD
Definition: exoMesh.H:55
HEX
Definition: exoMesh.H:55
int getNumberOfSideSets() const
Returns total number of side sets.
Definition: exoMesh.H:217
int getNumElmsInBlk(int idx) const
Returns the number of elements for the block.
Definition: exoMesh.H:333
void setNdeSetName(const std::string &name, const std::string &newName)
Sets/changes nodeset name.
Definition: exoMesh.H:468
int getNumberOfNodes() const
Returns total number of nodes.
Definition: exoMesh.H:197
const std::string & getElmBlkName(int idx) const
Returns the name the element block for given index.
Definition: exoMesh.H:223
const std::vector< int > & getElmBlkIds() const
Returns the IDs of registered element blocks.
Definition: exoMesh.H:386
std::vector< sdeSetType > sdeSets
Definition: exoMesh.H:108
Stores side set information.
Definition: exoMesh.H:97
void addNde(const std::vector< double > &xyz)
Add nodes to the database.
Definition: exoMesh.H:497
TETRA
Definition: exoMesh.H:55
std::vector< std::string > _elmBlkNames
Definition: exoMesh.H:712
const std::vector< std::string > & getNdeSetNames() const
Returns the names of registered node sets.
Definition: exoMesh.H:398
surfaceBCTag bcTagNum(std::string &tag)
Definition: exoMesh.C:76
SYMMY
Definition: exoMesh.H:66
std::string bcTagStr(surfaceBCTag tag)
Definition: exoMesh.C:86
const std::string & getSdeSetName(int idx) const
Returns the name the sideset for given index.
Definition: exoMesh.H:249
const std::string & getNdeSetName(int idx) const
Returns the name the nodeset for given index.
Definition: exoMesh.H:236
std::vector< elmBlkType > elmBlks
Definition: exoMesh.H:107
int getNumNdesInNdeSet(int idx) const
Returns the number of nodes for the nodeset.
Definition: exoMesh.H:351
void setBlockName(const std::string &name, const std::string &newName)
Sets/changes block name.
Definition: exoMesh.H:430
void setSdeSetName(int idx, const std::string &name)
Sets/changes sideset name.
Definition: exoMesh.H:440
Stores element block information.
Definition: exoMesh.H:82
SYMMX
Definition: exoMesh.H:66
FIXED
Definition: exoMesh.H:66
void togVrb()
Toggle verbosity.
Definition: exoMesh.H:668
const std::vector< std::string > & getSdeSetNames() const
Returns the names of registered side sets.
Definition: exoMesh.H:405
void addSdeSet(const sdeSetType &ss)
Add side set to the database.
Definition: exoMesh.H:520
std::vector< std::vector< int > > glbConn
Definition: exoMesh.H:737
std::vector< double > _zCrds
Definition: exoMesh.H:707
std::vector< std::string > _sdeSetNames
Definition: exoMesh.H:721
void addElmBlk(const elmBlkType &eb)
Add element block to the database.
Definition: exoMesh.H:504
void addNdeSet(const ndeSetType &ns)
Add node set to the database.
Definition: exoMesh.H:512
elementType
Definition: pntMesh.H:47
void setDimension(int dim)
Sets/changes the problem dimensionality.
Definition: exoMesh.H:477
TRIANGLE
Definition: exoMesh.H:55
Stores node set information.
Definition: exoMesh.H:71
void setNdeSetName(int idx, const std::string &name)
Sets/changes nodeset name.
Definition: exoMesh.H:459
std::vector< int > ndeIds
Definition: exoMesh.H:75
std::vector< ndeSetType > ndeSets
Definition: exoMesh.H:106
int getNumberOfElements() const
Returns total number of elements.
Definition: exoMesh.H:202
VTKCellType e2vEMap(elementType et)
Convert EXODUS element type to VTK cell type.
Definition: exoMesh.C:50
int elmNumNde(elementType tag, int order)
Get number of nodes given EXODUS element type and order.
Definition: exoMesh.C:138
int getNumberOfElementBlocks() const
Returns total number of element blocks.
Definition: exoMesh.H:207
void wrnErrMsg(int errCode, const std::string &msg)
Logging method.
Definition: exoMesh.C:202
std::vector< double > _yCrds
Definition: exoMesh.H:706
std::map< int, std::vector< double > > ndeCoords
Definition: exoMesh.H:91
void setFileName(const std::string &fName)
Change the file name.
Definition: exoMesh.H:643
int getSdeSetId(int idx) const
Returns the id for the sideset for given index.
Definition: exoMesh.H:297
std::vector< int > conn
Definition: exoMesh.H:88
std::vector< int > elmIds
Definition: exoMesh.H:90