Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
mesh.h
1/******************************************************************************
2 * Copyright (C) 2006-2024 by the GIMLi development team *
3 * Carsten Rücker carsten@gimli.org *
4 * *
5 * Licensed under the Apache License, Version 2.0 (the "License"); *
6 * you may not use this file except in compliance with the License. *
7 * You may obtain a copy of the License at *
8 * *
9 * http://www.apache.org/licenses/LICENSE-2.0 *
10 * *
11 * Unless required by applicable law or agreed to in writing, software *
12 * distributed under the License is distributed on an "AS IS" BASIS, *
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14 * See the License for the specific language governing permissions and *
15 * limitations under the License. *
16 * *
17 ******************************************************************************/
18
19#ifndef _GIMLI_MESH__H
20#define _GIMLI_MESH__H
21
22#include "gimli.h"
23#include "meshentities.h"
24#include "node.h"
25#include "pos.h"
26
27#include <vector>
28#include <list>
29#include <set>
30#include <map>
31#include <fstream>
32
33namespace GIMLI{
34
35class KDTreeWrapper;
36
38
39class DLLEXPORT BoundingBox{
40public:
42 BoundingBox(const Pos & min=Pos(0, 0, 0),
43 const Pos & max=Pos(1.0, 1.0, 1.0))
44 : min_(min), max_(max){
45 }
46
48 BoundingBox(const PosVector & vPos){
49 min_ = Pos((double)MAX_DOUBLE, (double)MAX_DOUBLE, (double)MAX_DOUBLE);
50 max_ = min_ * -1.0;
51 for (uint i = 0; i < vPos.size(); i ++){
52 min_[0] = std::min(vPos[i][0], min_[0]);
53 min_[1] = std::min(vPos[i][1], min_[1]);
54 min_[2] = std::min(vPos[i][2], min_[2]);
55 max_[0] = std::max(vPos[i][0], max_[0]);
56 max_[1] = std::max(vPos[i][1], max_[1]);
57 max_[2] = std::max(vPos[i][2], max_[2]);
58 }
59 }
60
62 BoundingBox(const BoundingBox & bbox){ this->copy_(bbox); }
63
65 BoundingBox & operator = (const BoundingBox & bbox){
66 if (this != & bbox){
67 this->copy_(bbox);
68 } return * this;
69 }
70
72 bool isInside(const Pos & p){
73 return ((p[0] <= max_[0] && p[0] >= min_[0]) &&
74 (p[1] <= max_[1] && p[1] >= min_[1]) &&
75 (p[2] <= max_[2] && p[2] >= min_[2]));
76 }
77
79 void setMin(const Pos & min) { min_ = min; }
81 const Pos & min() const { return min_; }
82
84 void setMax(const Pos & max) { max_ = max; }
86 const Pos & max() const { return max_; }
87
89 inline double xMin() const { return min_[0];}
91 inline double yMin() const { return min_[1];}
93 inline double zMin() const { return min_[2];}
94
96 inline double xMax() const { return max_[0];}
98 inline double yMax() const { return max_[1];}
100 inline double zMax() const { return max_[2];}
101
103 inline double xSize() const { return abs(this->xMax()-this->xMin());}
105 inline double ySize() const { return abs(this->yMax()-this->yMin());}
107 inline double zSize() const { return abs(this->zMax()-this->zMin());}
108
109
110protected:
111
112 void copy_(const BoundingBox & bbox){
113 min_ = bbox.min();
114 max_ = bbox.max();
115 }
116
117 Pos min_;
118 Pos max_;
119};
120
121inline std::ostream & operator << (std::ostream & str, const BoundingBox & bb){
122 str << "BoundingBox [" << bb.min() << ", " << bb.max() << "]" ;
123 return str;
124}
125
126DLLEXPORT std::ostream & operator << (std::ostream & str, const Mesh & mesh);
127
128class DLLEXPORT Mesh {
129
130public:
131 typedef std::vector< RegionMarker > RegionMarkerList;
132 typedef RVector3 HoleMarker;
133 typedef PosVector HoleMarkerList;
134
138 Mesh(Index dim=2, bool isGeometry=false);
139
141 Mesh(const std::string & filename, bool createNeighborInfos=true);
142
144 Mesh(const Mesh & mesh);
145
147 Mesh & operator = (const Mesh & mesh);
148
150 ~Mesh();
151
153 void clear();
154
158 void setStaticGeometry(bool stat);
159
161 inline bool staticGeometry() const { return staticGeometry_; }
162
165 void setGeometry(bool b);
166
168 bool isGeometry() const { return isGeometry_; }
169
171 void geometryChanged();
172
174 void setDimension(uint dim){ dimension_ = dim;}
175
177 uint dimension() const { return dimension_; }
178
180 uint dim() const { return dimension_; }
181
182 //** start creation stuff
183 Node * createNode(double x, double y, double z, int marker=0);
184 Node * createNode(const Node & node);
185 Node * createNode(const RVector3 & pos, int marker=0);
186
190 Node * createSecondaryNode(const RVector3 & pos, double tol=-1);
191
194 Node * createNodeWithCheck(const RVector3 & pos, double tol=1e-6,
195 bool warn=false, bool edgeCheck=false);
196
197 Boundary * createBoundary(std::vector < Node * > & nodes, int marker=0, bool check=true);
199 Boundary * createBoundary(const IndexArray & nodes, int marker=0, bool check=true);
200 Boundary * createBoundary(const Boundary & bound, bool check=true);
201 Boundary * createBoundary(const Cell & cell, bool check=true);
202 Boundary * createNodeBoundary(Node & n1, int marker=0, bool check=true);
203 Boundary * createEdge(Node & n1, Node & n2, int marker=0, bool check=true);
204 Boundary * createEdge3(Node & n1, Node & n2, Node & n3, int marker=0, bool check=true);
205 Boundary * createTriangleFace(Node & n1, Node & n2, Node & n3, int marker=0, bool check=true);
206 Boundary * createQuadrangleFace(Node & n1, Node & n2, Node & n3, Node & n4, int marker=0, bool check=true);
207 Boundary * createPolygonFace(std::vector < Node * > & nodes, int marker, bool check=true);
208
210 Cell * createCell(int marker=0);
211 Cell * createCell(std::vector < Node * > & nodes, int marker=0);
213 Cell * createCell(const IndexArray & nodes, int marker=0);
214 Cell * createCell(const Cell & cell);
215 Cell * createTriangle(Node & n1, Node & n2, Node & n3, int marker=0);
216 Cell * createQuadrangle(Node & n1, Node & n2, Node & n3, Node & n4, int marker=0);
217 Cell * createTetrahedron(Node & n1, Node & n2, Node & n3, Node & n4, int marker=0);
218
223 Cell * copyCell(const Cell & cell, double tol=1e-6);
228 Boundary * copyBoundary(const Boundary & bound, double tol=1e-6, bool check=true);
229
230 void create1DGrid(const RVector & x);
231
234 void create2DGrid(const RVector & x, const RVector & y, int markerType=0,
235 bool worldBoundaryMarker=false);
236
240 void create3DGrid(const RVector & x, const RVector & y, const RVector & z,
241 int markerType=0, bool worldBoundaryMarker=false);
242
246 void createGrid(const RVector & x) { create1DGrid(x); }
247
250 void createGrid(const RVector & x, const RVector & y,
251 int markerType=0, bool worldBoundaryMarker=false) {
252 create2DGrid(x, y, markerType, worldBoundaryMarker);
253 }
254
257 void createGrid(const RVector & x, const RVector & y, const RVector & z,
258 int markerType=0, bool worldBoundaryMarker=false){
259 create3DGrid(x, y, z, markerType, worldBoundaryMarker);
260 }
261
262 void createHull_(const Mesh & mesh);
263
266 Mesh createHull() const;
267
269 Mesh createH2() const;
270
272 Mesh createP2() const;
273
275 void createMeshByCells(const Mesh & mesh, const std::vector < Cell * > & cells);
276
278 void createMeshByBoundaries(const Mesh & mesh, const std::vector < Boundary * > & bounds);
279
281 Mesh createMeshByCellIdx(const IndexArray & idxList);
282
284 void createMeshByCellIdx(const Mesh & mesh, const IndexArray & idxList);
285
288 void createMeshByMarker(const Mesh & mesh, int from, int to=-1);
289
291 Mesh createSubMesh(const std::vector< Cell * > & cells) const;
292
294 Mesh createSubMesh(const std::vector< Boundary * > & bounds) const;
295
298 Mesh createSubMesh(const std::vector< Node * > & nodes) const;
299
300 //** end creation stuff
301
303 void showInfos(){ std::cout << *this << std::endl; }
304
305 const std::vector< Node * > & nodes() const { return nodeVector_; }
306
307 const std::vector< Cell * > & cells() const { return cellVector_; }
308
310 const std::vector< Boundary * > & boundaries() const { return boundaryVector_; }
311
313 std::vector< Node * > nodes(const IndexArray & ids) const;
314
316 std::vector< Node * > nodes(const BVector & b) const;
317
319 std::vector< Cell * > cells(const IndexArray & ids) const;
320
322 std::vector< Cell * > cells(const BVector & b) const;
323
325 std::vector< Boundary * > boundaries(const IndexArray & ids) const;
326
328 std::vector< Boundary * > boundaries(const BVector & b) const;
329
330 Index nodeCount(bool withSecNodes=false) const;
331 Node & node(Index i) const;
332 Node & node(Index i);
333
334 inline Index secondaryNodeCount() const { return secNodeVector_.size(); }
335 Node & secondaryNode(Index id) const;
336 Node & secondaryNode(Index id);
337
339 IndexArray nodeIDs(bool withSecNodes=false) const;
343 void setNodeIDs(IndexArray & ids);
344
345 Index cellCount() const { return cellVector_.size(); }
346 Cell & cell(Index i) const;
347 Cell & cell(Index i);
348
349 Index boundaryCount() const { return boundaryVector_.size(); }
350 Boundary & boundary(Index i) const;
351 Boundary & boundary(Index i);
352
354 PosVector positions(bool withSecNodes=false) const;
355
357 PosVector positions(const IndexArray & idx) const;
358
360 PosVector cellCenters() const;
361 PosVector cellCenter() const { return cellCenters(); }
362
364 PosVector boundaryCenters() const;
365
367 RVector & cellSizes() const;
368
370 RVector & boundarySizes() const;
371
378 PosVector & boundarySizedNormals() const;
379
381 void setBoundaryMarkers(const IndexArray & ids, int marker);
382
384 void setBoundaryMarkers(const IVector & marker);
385
387 IVector boundaryMarkers() const;
388
390 IVector nodeMarkers() const;
391
393 IndexArray findNodesIdxByMarker(int marker) const;
394
395// /*! Return an index list of all nodes that match the marker */
396// std::list < Index > findListNodesIdxByMarker(int marker) const;
397
399 std::vector < Boundary * > findBoundaryByMarker(int marker) const;
400
403 std::vector < Boundary * > findBoundaryByMarker(int from, int to) const;
404
408 Cell * findCell(const RVector3 & pos, size_t & counter, bool extensive) const ;
409
411 Cell * findCell(const RVector3 & pos, bool extensive=true) const {
412 size_t counter; return findCell(pos, counter, extensive); }
413
415 Index findNearestNode(const RVector3 & pos);
416
419 std::vector < Cell * > findCellByMarker(int from, int to=0) const;
420
423 std::vector < Cell * > findCellByAttribute(double from, double to=0.0) const;
424
430 std::vector < Cell * > findCellsAlongRay(const RVector3 & start,
431 const RVector3 & dir,
432 PosVector & pos) const;
433 //** end get infos stuff
434
435 //** start mesh modification stuff
436
444 void prolongateEmptyCellsValues(RVector & vals, double background=-9e99) const;
445
446 void recountNodes();
447
448 void sortNodes(const IndexArray & perm);
449
451 inline bool neighborsKnown() const { return neighborsKnown_; }
452
454 void cleanNeighborInfos();
455
457 void createNeighborInfos(bool force=false);
458
460 void createNeighborInfosCell_(Cell *c);
461
462 void relax();
463
465 void smooth(bool nodeMoving=true, bool edgeSwapping=true, uint smoothFunction=1, uint smoothIteration=10);
466
469 Mesh & scale(const RVector3 & s);
470
473 Mesh & scale(const double & s){ return scale(RVector3(s, s, s));}
474
477 Mesh & translate(const RVector3 & t);
478
482 Mesh & rotate(const RVector3 & r);
483
486 Mesh & transform(const RMatrix & mat);
487
490 Mesh & deform(const R3Vector & eps, double magnify=1.0);
491
495 Mesh & deform(const RVector & eps, double magnify=1.0);
496
499 void swapCoordinates(Index i, Index j);
500
501 //** end mesh modification stuff
502 //** start I/O stuff
503 int save(const std::string & fileName, IOFormat format = Binary) const;
504 int saveAscii(const std::string & fileName) const;
505
509 int saveBinary(const std::string & fileName) const;
510
514 void load(const std::string & fileName,
515 bool createNeighbors=true, IOFormat format=Binary);
516
517 void loadAscii(const std::string & fileName);
518
519 void importMod(const std::string & fileName);
520
521 void importVTK(const std::string & fbody);
522
523 void importVTU(const std::string & fbody);
524
527 void importSTL(const std::string & fileName, bool isBinary=false,
528 double snap=1e-3);
529
532 void loadBinary(const std::string & fileName);
533
538 void saveBinaryV2(const std::string & fbody) const;
539
542 void loadBinaryV2(const std::string & fbody);
543
544 int exportSimple(const std::string & fbody, const RVector & data) const ;
545
551 int exportMidCellValue(const std::string & fileName, const RVector & data1, const RVector & data2) const ;
552 // no default arg here .. pygimli@win64 linker bug
553 int exportMidCellValue(const std::string & fileName, const RVector & data1) const{
554 RVector data2(0);
555 return exportMidCellValue(fileName, data1, data2);
556 }
557
558 void exportVTK(const std::string & fbody,
559 const std::map< std::string, RVector > & data,
560 const PosVector & vec,
561 bool writeCells=true) const;
562
563 void exportVTK(const std::string & fbody,
564 const std::map< std::string, RVector > & data,
565 bool writeCells=true) const;
566
568 void exportVTK(const std::string & fbody, bool writeCells=true) const;
569
571 void exportVTK(const std::string & fbody,
572 const PosVector & vec,
573 bool writeCells=true) const;
574
576 void exportVTK(const std::string & fbody, const RVector & arr) const;
577
578 void readVTKPoints_(std::fstream & file, const std::vector < std::string > & row);
579 void readVTKCells_(std::fstream & file, const std::vector < std::string > & row);
580 void readVTKScalars_(std::fstream & file, const std::vector < std::string > & row);
581 void readVTKPolygons_(std::fstream & file, const std::vector < std::string > & row);
582
588 void exportVTU(const std::string & filename, bool binary = false) const ;
589
591 void exportBoundaryVTU(const std::string & fbody, bool binary = false) const ;
592
594 void addVTUPiece_(std::fstream & file, const Mesh & mesh,
595 const std::map < std::string, RVector > & data) const;
596
597 void exportAsTetgenPolyFile(const std::string & filename);
598 //** end I/O stuff
599
601 void fixBoundaryDirections();
602
603 void addData(const std::string & name, const CVector & data){
604 this->addData(name+"_Re", real(data));
605 this->addData(name+"_Im", imag(data));
606 }
607
612 void addData(const std::string & name, const RVector & data);
613
618 void addData(const std::string & name, const PosVector & data){
619 this->addData(name+"_x", x(data));
620 this->addData(name+"_y", y(data));
621 this->addData(name+"_z", z(data));
622 }
623
626 RVector data(const std::string & name) const;
627
629 bool haveData(const std::string & name) const {
630 return dataMap_.count(name) > 0;
631 }
632
634 const std::map< std::string, RVector > & dataMap() const {
635 return this->dataMap_;
636 }
637
638 void setDataMap(const std::map< std::string, RVector > m) {
639 this->dataMap_ = m;
640 }
641
642 void dataInfo() const;
643
645 void clearData();
646
648 void setCommentString(const std::string & commentString) {commentString_ = commentString;}
649
651 const std::string & commentString() const {return commentString_;}
652
653 void mapCellAttributes(const std::map < float, float > & aMap);
654
655 //void mapParameterToAttribute(const std::vector< int > & cellMapIndex);
657 void mapBoundaryMarker(const std::map < int, int > & aMap);
658
660 void setCellAttributes(const RVector & attribute);
661
663 void setCellAttributes(double attribute);
664
666 RVector cellAttributes() const;
667
669 void setCellMarkers(const IndexArray & ids, int marker);
670
672 void setCellMarkers(const IVector & marker);
673
675 void setCellMarkers(const RVector & attribute);
676
678 IVector cellMarkers() const;
679
680 //** probably deprecated 20191120
681 // double xmin() const { findRange_(); return minRange_[0]; }
682 // double ymin() const { findRange_(); return minRange_[1]; }
683 // double zmin() const { findRange_(); return minRange_[2]; }
684 // double xmax() const { findRange_(); return maxRange_[0]; }
685 // double ymax() const { findRange_(); return maxRange_[1]; }
686 // double zmax() const { findRange_(); return maxRange_[2]; }
687
688 // better use your bounding box
689 double xMin() const { findRange_(); return minRange_[0]; }
690 double yMin() const { findRange_(); return minRange_[1]; }
691 double zMin() const { findRange_(); return minRange_[2]; }
692 double xMax() const { findRange_(); return maxRange_[0]; }
693 double yMax() const { findRange_(); return maxRange_[1]; }
694 double zMax() const { findRange_(); return maxRange_[2]; }
695
696
697 const BoundingBox boundingBox() const { findRange_(); return BoundingBox(minRange_, maxRange_);}
698
703 RSparseMapMatrix interpolationMatrix(const PosVector & q);
704
706 void interpolationMatrix(const PosVector & q, RSparseMapMatrix & I);
707
709 RSparseMapMatrix & cellToBoundaryInterpolation() const;
710
718 RVector divergence(const PosVector & V) const;
719
721 PosVector boundaryDataToCellGradient(const RVector & boundaryData) const;
722
724 PosVector cellDataToBoundaryGradient(const RVector & cellData) const;
725
727 PosVector cellDataToBoundaryGradient(const RVector & cellData,
728 const PosVector & cellGradient) const;
729
732 void addRegionMarker(const RVector3 & pos, int marker, double area=0);
733 void addRegionMarker(const RegionMarker & reg);
734
735 const RegionMarkerList & regionMarkers() const { return regionMarker_; }
736
739 RegionMarker * regionMarker(SIndex i);
740
743 void addHoleMarker(const RVector3 & pos);
744
746 const HoleMarkerList & holeMarker() const { return holeMarker_; }
747
748 Index hash() const;
749
750protected:
751 void copy_(const Mesh & mesh);
752
753 void findRange_() const ;
754
756 Node * createNodeGC_(const RVector3 & pos, int marker);
757
758 Node * createNode_(const RVector3 & pos, int marker);
759
760 Node * createSecondaryNode_(const RVector3 & pos);
761
762 template < class B > Boundary * createBoundary_(
763 std::vector < Node * > & nodes, int marker, int id){
764
765 if (id == -1) id = boundaryCount();
766 boundaryVector_.push_back(new B(nodes));
767 boundaryVector_.back()->setMarker(marker);
768 boundaryVector_.back()->setId(id);
769 return boundaryVector_.back();
770 }
771
772 template < class B > Boundary * createBoundaryChecked_(
773 std::vector < Node * > & nodes, int marker, bool check=true){
774
775 if (!check) return createBoundary_< B >(nodes, marker, boundaryCount());
776
777 Boundary * b = findBoundary(nodes);
778 if (!b) {
779 b = createBoundary_< B >(nodes, marker, boundaryCount());
780 } else {
781 if (marker != 0) b->setMarker(marker);
782 }
783 return b;
784 }
785
786 template < class C > Cell * createCell_(
787 std::vector < Node * > & nodes, int marker, int id){
788
789 if (id == -1) id = cellCount();
790 cellVector_.push_back(new C(nodes));
791 cellVector_.back()->setMarker(marker);
792 cellVector_.back()->setId(id);
793 return cellVector_.back();
794 }
795
796// Node * createRefinementNode_(Node * n0, Node * n1, SparseMapMatrix < Node *, Index > & nodeMatrix);
797 Node * createRefinementNode_(Node * n0, Node * n1, std::map< std::pair < Index, Index >, Node * > & nodeMatrix);
798
799 void createRefined_(const Mesh & mesh, bool p2, bool r2);
800
801 Cell * findCellBySlopeSearch_(const RVector3 & pos, Cell * start, size_t & count, bool tagging) const;
802
803 void fillKDTree_() const;
804
805 std::vector< Node * > nodeVector_;
806 std::vector< Node * > secNodeVector_;
807 std::vector< Boundary * > boundaryVector_;
808 std::vector< Cell * > cellVector_;
809
810 uint dimension_;
811
812 mutable RVector3 minRange_;
813 mutable RVector3 maxRange_;
814 mutable bool rangesKnown_;
815
816 bool neighborsKnown_;
817
818 mutable KDTreeWrapper * tree_;
819
822 bool isGeometry_; // mesh is marked as PLC
823 mutable RVector cellSizesCache_;
824 mutable RVector boundarySizesCache_;
825 mutable PosVector boundarySizedNormCache_;
826
827 mutable RSparseMapMatrix * cellToBoundaryInterpolationCache_;
828
829 bool oldTet10NumberingStyle_;
830
831 std::map< std::string, RVector > dataMap_;
832 std::string commentString_;
833
834 // for PLC creation
835 RegionMarkerList regionMarker_;
836 HoleMarkerList holeMarker_;
837
838}; // class Mesh
839
840} // namespace GIMLI;
841
842#endif // _GIMLI_MESH__H
Definition meshentities.h:350
A BoundingBox.
Definition mesh.h:39
double yMin() const
Definition mesh.h:91
double zMax() const
Definition mesh.h:100
const Pos & min() const
Definition mesh.h:81
BoundingBox(const PosVector &vPos)
Definition mesh.h:48
double yMax() const
Definition mesh.h:98
BoundingBox(const Pos &min=Pos(0, 0, 0), const Pos &max=Pos(1.0, 1.0, 1.0))
Definition mesh.h:42
double xMax() const
Definition mesh.h:96
bool isInside(const Pos &p)
Definition mesh.h:72
double xMin() const
Definition mesh.h:89
double zMin() const
Definition mesh.h:93
void setMax(const Pos &max)
Definition mesh.h:84
BoundingBox(const BoundingBox &bbox)
Definition mesh.h:62
double ySize() const
Definition mesh.h:105
const Pos & max() const
Definition mesh.h:86
double xSize() const
Definition mesh.h:103
void setMin(const Pos &min)
Definition mesh.h:79
double zSize() const
Definition mesh.h:107
A abstract cell.
Definition meshentities.h:261
Interface class for a kd-search tree. We use it for fast nearest neighbor point search in three dimen...
Definition kdtreeWrapper.h:46
Definition mesh.h:128
uint dimension() const
Definition mesh.h:177
RVector data(const std::string &name) const
Definition mesh.cpp:2161
void createGrid(const RVector &x)
Definition mesh.h:246
void setDataMap(const std::map< std::string, RVector > m)
Definition mesh.h:638
const std::map< std::string, RVector > & dataMap() const
Definition mesh.h:634
Cell * findCell(const RVector3 &pos, size_t &counter, bool extensive) const
Definition mesh.cpp:898
void create2DGrid(const RVector &x, const RVector &y, int markerType=0, bool worldBoundaryMarker=false)
Definition mesh.cpp:1796
void createGrid(const RVector &x, const RVector &y, int markerType=0, bool worldBoundaryMarker=false)
Definition mesh.h:250
const std::string & commentString() const
Definition mesh.h:651
void addData(const std::string &name, const PosVector &data)
Definition mesh.h:618
uint dim() const
Definition mesh.h:180
Cell * findCell(const RVector3 &pos, bool extensive=true) const
Definition mesh.h:411
bool neighborsKnown() const
Definition mesh.h:451
const HoleMarkerList & holeMarker() const
Definition mesh.h:746
bool haveData(const std::string &name) const
Definition mesh.h:629
void clear()
Definition mesh.cpp:138
bool staticGeometry() const
Definition mesh.h:161
Mesh & scale(const double &s)
Definition mesh.h:473
const std::vector< Boundary * > & boundaries() const
Definition mesh.h:310
void setStaticGeometry(bool stat)
Definition mesh.cpp:130
void createGrid(const RVector &x, const RVector &y, const RVector &z, int markerType=0, bool worldBoundaryMarker=false)
Definition mesh.h:257
bool staticGeometry_
Definition mesh.h:821
bool isGeometry() const
Definition mesh.h:168
void createNeighborInfos(bool force=false)
Definition mesh.cpp:1647
void setCommentString(const std::string &commentString)
Definition mesh.h:648
Mesh(Index dim=2, bool isGeometry=false)
Definition mesh.cpp:40
void create3DGrid(const RVector &x, const RVector &y, const RVector &z, int markerType=0, bool worldBoundaryMarker=false)
Definition mesh.cpp:1866
void setDimension(uint dim)
Definition mesh.h:174
void showInfos()
Show some infos.
Definition mesh.h:303
3D Node
Definition node.h:39
3 dimensional vector
Definition pos.h:73
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24
RVector y(const R3Vector &rv)
Definition pos.cpp:114
RVector x(const R3Vector &rv)
Definition pos.cpp:107
RVector z(const R3Vector &rv)
Definition pos.cpp:120
IOFormat
Definition gimli.h:289
bool load(Matrix< ValueType > &A, const std::string &filename)
Definition matrix.h:828