OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::STLmesh< T > Class Template Reference

#include <stlReader.h>

+ Collaboration diagram for olb::STLmesh< T >:

Public Member Functions

 STLmesh (std::string, T stlSize=1.)
 Constructs a new STLmesh from a file.
 
 STLmesh (const std::vector< std::vector< T > > meshPoints, T stlSize=1.)
 Constructs a new STLmesh from a file.
 
STLtriangle< T > & getTri (unsigned int i)
 Returns reference to a triangle.
 
std::vector< STLtriangle< T > > & getTriangles ()
 Returns reference to all triangles.
 
unsigned int triangleSize () const
 Returns number of triangles.
 
Vector< T, 3 > & getMin ()
 Returns _min.
 
Vector< T, 3 > & getMax ()
 Returns _max.
 
float maxDist2 () const
 Returns maxDist squared.
 
void print (bool full=false)
 Prints console output.
 
void write (std::string fName)
 Writes STL mesh in Si units.
 
bool testRayIntersect (const std::set< unsigned int > &tris, const Vector< T, 3 > &pt, const Vector< T, 3 > &dir, Vector< T, 3 > &q, T &alpha)
 Compute intersection between Ray and set of triangles; returns true if intersection is found.
 
 STLmesh (std::string, T stlSize=1.)
 Constructs a new STLmesh from a file.
 
 STLmesh (const std::vector< std::vector< T > > meshPoints, T stlSize=1.)
 Constructs a new STLmesh from a file.
 
STLtriangle< T > & getTri (unsigned int i)
 Returns reference to a triangle.
 
std::vector< STLtriangle< T > > & getTriangles ()
 Returns reference to all triangles.
 
unsigned int triangleSize () const
 Returns number of triangles.
 
Vector< T, 3 > & getMin ()
 Returns _min.
 
Vector< T, 3 > & getMax ()
 Returns _max.
 
float maxDist2 () const
 Returns maxDist squared.
 
void print (bool full=false)
 Prints console output.
 
void write (std::string fName)
 Writes STL mesh in Si units.
 
bool testRayIntersect (const std::set< unsigned int > &tris, const Vector< T, 3 > &pt, const Vector< T, 3 > &dir, Vector< T, 3 > &q, T &alpha)
 Compute intersection between Ray and set of triangles; returns true if intersection is found.
 

Detailed Description

template<typename T>
class olb::STLmesh< T >

Definition at line 152 of file STLreaderForSubgridParticleWallContact.h.

Constructor & Destructor Documentation

◆ STLmesh() [1/4]

template<typename T >
olb::STLmesh< T >::STLmesh ( std::string fName,
T stlSize = 1. )

Constructs a new STLmesh from a file.

Parameters
Filename- Filename
stlSize- Conversion factor for STL (e.g. STL in mm stlSize=10^-3)

Definition at line 452 of file stlReader.hh.

453 : _fName(fName),
454 _min(T()),
455 _max(T()),
456 _maxDist2(0),
457 clout(std::cout, "STLmesh")
458{
459 std::ifstream f(fName.c_str(), std::ios::in);
460 _triangles.reserve(10000);
461 if (!f.good()) {
462 throw std::runtime_error("STL File not valid.");
463 }
464 char buf[6];
465 buf[5] = 0;
466 f.read(buf, 5);
467 const std::string asciiHeader = "solid";
468 if (std::string(buf) == asciiHeader) {
469 f.seekg(0, std::ios::beg);
470 if (f.good()) {
471 std::string s0, s1;
472 int i = 0;
473 while (!f.eof()) {
474 f >> s0;
475 if (s0 == "facet") {
476 STLtriangle<T> tri;
477 f >> s1 >> tri.normal[0] >> tri.normal[1] >> tri.normal[2];
478 f >> s0 >> s1;
479 f >> s0 >> tri.point[0][0] >> tri.point[0][1]
480 >> tri.point[0][2];
481 f >> s0 >> tri.point[1][0] >> tri.point[1][1]
482 >> tri.point[1][2];
483 f >> s0 >> tri.point[2][0] >> tri.point[2][1]
484 >> tri.point[2][2];
485 f >> s0;
486 f >> s0;
487 for (int k = 0; k < 3; k++) {
488 tri.point[0][k] *= stlSize;
489 tri.point[1][k] *= stlSize;
490 tri.point[2][k] *= stlSize;
491 }
492 if (i == 0) {
493 _min = T();
494 _max = T();
495
496 _min[0] = tri.point[0][0];
497 _min[1] = tri.point[0][1];
498 _min[2] = tri.point[0][2];
499
500 _max[0] = tri.point[0][0];
501 _max[1] = tri.point[0][1];
502 _max[2] = tri.point[0][2];
503
504 _min[0] = util::min(_min[0], tri.point[1][0]);
505 _min[1] = util::min(_min[1], tri.point[1][1]);
506 _min[2] = util::min(_min[2], tri.point[1][2]);
507
508 _max[0] = util::max(_max[0], tri.point[1][0]);
509 _max[1] = util::max(_max[1], tri.point[1][1]);
510 _max[2] = util::max(_max[2], tri.point[1][2]);
511
512 _min[0] = util::min(_min[0], tri.point[2][0]);
513 _min[1] = util::min(_min[1], tri.point[2][1]);
514 _min[2] = util::min(_min[2], tri.point[2][2]);
515
516 _max[0] = util::max(_max[0], tri.point[2][0]);
517 _max[1] = util::max(_max[1], tri.point[2][1]);
518 _max[2] = util::max(_max[2], tri.point[2][2]);
519
520 }
521 else {
522 _min[0] = util::min(_min[0], tri.point[0][0]);
523 _min[1] = util::min(_min[1], tri.point[0][1]);
524 _min[2] = util::min(_min[2], tri.point[0][2]);
525
526 _max[0] = util::max(_max[0], tri.point[0][0]);
527 _max[1] = util::max(_max[1], tri.point[0][1]);
528 _max[2] = util::max(_max[2], tri.point[0][2]);
529
530 _min[0] = util::min(_min[0], tri.point[1][0]);
531 _min[1] = util::min(_min[1], tri.point[1][1]);
532 _min[2] = util::min(_min[2], tri.point[1][2]);
533
534 _max[0] = util::max(_max[0], tri.point[1][0]);
535 _max[1] = util::max(_max[1], tri.point[1][1]);
536 _max[2] = util::max(_max[2], tri.point[1][2]);
537
538 _min[0] = util::min(_min[0], tri.point[2][0]);
539 _min[1] = util::min(_min[1], tri.point[2][1]);
540 _min[2] = util::min(_min[2], tri.point[2][2]);
541
542 _max[0] = util::max(_max[0], tri.point[2][0]);
543 _max[1] = util::max(_max[1], tri.point[2][1]);
544 _max[2] = util::max(_max[2], tri.point[2][2]);
545 }
546
547 i++;
548 tri.init();
549 _triangles.push_back(tri);
550
551 _maxDist2 = util::max(distPoints(tri.point[0], tri.point[1]),
552 _maxDist2);
553 _maxDist2 = util::max(distPoints(tri.point[2], tri.point[1]),
554 _maxDist2);
555 _maxDist2 = util::max(distPoints(tri.point[0], tri.point[2]),
556 _maxDist2);
557 }
558 else if (s0 == "endsolid") {
559 break;
560 }
561 }
562 }
563 }
564 else {
565 f.close();
566 f.open(fName.c_str(), std::ios::in | std::ios::binary);
567 char comment[80];
568 f.read(comment, 80);
569
570 if (!f.good()) {
571 throw std::runtime_error("STL File not valid.");
572 }
573
574 comment[79] = 0;
575 int32_t nFacets;
576 f.read(reinterpret_cast<char *>(&nFacets), sizeof(int32_t));
577
578 if (!f.good()) {
579 throw std::runtime_error("STL File not valid.");
580 }
581
582 float v[12];
583 std::uint16_t uint16;
584 for (int32_t i = 0; i < nFacets; ++i) {
585 for (unsigned int j = 0; j < 12; ++j) {
586 f.read(reinterpret_cast<char *>(&v[j]), sizeof(float));
587 }
588 f.read(reinterpret_cast<char *>(&uint16), sizeof(std::uint16_t));
589 STLtriangle<T> tri;
590 tri.normal[0] = v[0];
591 tri.normal[1] = v[1];
592 tri.normal[2] = v[2];
593 tri.point[0][0] = v[3];
594 tri.point[0][1] = v[4];
595 tri.point[0][2] = v[5];
596 tri.point[1][0] = v[6];
597 tri.point[1][1] = v[7];
598 tri.point[1][2] = v[8];
599 tri.point[2][0] = v[9];
600 tri.point[2][1] = v[10];
601 tri.point[2][2] = v[11];
602
603 for (int k = 0; k < 3; k++) {
604 tri.point[0][k] *= stlSize;
605 tri.point[1][k] *= stlSize;
606 tri.point[2][k] *= stlSize;
607 }
608 if (i == 0) {
609 _min[0] = tri.point[0][0];
610 _min[1] = tri.point[0][1];
611 _min[2] = tri.point[0][2];
612
613 _max[0] = tri.point[0][0];
614 _max[1] = tri.point[0][1];
615 _max[2] = tri.point[0][2];
616
617 _min[0] = util::min(_min[0], (T) tri.point[1][0]);
618 _min[1] = util::min(_min[1], (T) tri.point[1][1]);
619 _min[2] = util::min(_min[2], (T) tri.point[1][2]);
620
621 _max[0] = util::max(_max[0], (T) tri.point[1][0]);
622 _max[1] = util::max(_max[1], (T) tri.point[1][1]);
623 _max[2] = util::max(_max[2], (T) tri.point[1][2]);
624
625 _min[0] = util::min(_min[0], (T) tri.point[2][0]);
626 _min[1] = util::min(_min[1], (T) tri.point[2][1]);
627 _min[2] = util::min(_min[2], (T) tri.point[2][2]);
628
629 _max[0] = util::max(_max[0], (T) tri.point[2][0]);
630 _max[1] = util::max(_max[1], (T) tri.point[2][1]);
631 _max[2] = util::max(_max[2], (T) tri.point[2][2]);
632
633 }
634 else {
635 _min[0] = util::min(_min[0], (T) tri.point[0][0]);
636 _min[1] = util::min(_min[1], (T) tri.point[0][1]);
637 _min[2] = util::min(_min[2], (T) tri.point[0][2]);
638
639 _max[0] = util::max(_max[0], (T) tri.point[0][0]);
640 _max[1] = util::max(_max[1], (T) tri.point[0][1]);
641 _max[2] = util::max(_max[2], (T) tri.point[0][2]);
642
643 _min[0] = util::min(_min[0], (T) tri.point[1][0]);
644 _min[1] = util::min(_min[1], (T) tri.point[1][1]);
645 _min[2] = util::min(_min[2], (T) tri.point[1][2]);
646
647 _max[0] = util::max(_max[0], (T) tri.point[1][0]);
648 _max[1] = util::max(_max[1], (T) tri.point[1][1]);
649 _max[2] = util::max(_max[2], (T) tri.point[1][2]);
650
651 _min[0] = util::min(_min[0], (T) tri.point[2][0]);
652 _min[1] = util::min(_min[1], (T) tri.point[2][1]);
653 _min[2] = util::min(_min[2], (T) tri.point[2][2]);
654
655 _max[0] = util::max(_max[0], (T) tri.point[2][0]);
656 _max[1] = util::max(_max[1], (T) tri.point[2][1]);
657 _max[2] = util::max(_max[2], (T) tri.point[2][2]);
658 }
659 tri.init();
660 _triangles.push_back(tri);
661
662 _maxDist2 = util::max(distPoints(tri.point[0], tri.point[1]), _maxDist2);
663 _maxDist2 = util::max(distPoints(tri.point[2], tri.point[1]), _maxDist2);
664 _maxDist2 = util::max(distPoints(tri.point[0], tri.point[2]), _maxDist2);
665 }
666 }
667 f.close();
668}
Expr min(Expr a, Expr b)
Definition expr.cpp:249
Expr max(Expr a, Expr b)
Definition expr.cpp:245

References olb::STLtriangle< T >::init(), olb::util::max(), olb::util::min(), olb::STLtriangle< T >::normal, and olb::STLtriangle< T >::point.

+ Here is the call graph for this function:

◆ STLmesh() [2/4]

template<typename T >
olb::STLmesh< T >::STLmesh ( const std::vector< std::vector< T > > meshPoints,
T stlSize = 1. )

Constructs a new STLmesh from a file.

Parameters
Filename- Filename
stlSize- Conversion factor for STL (e.g. STL in mm stlSize=10^-3)

Definition at line 671 of file stlReader.hh.

672 : _fName("meshPoints.stl"),
673 _min(T()),
674 _max(T()),
675 _maxDist2(0),
676 clout(std::cout, "STLmesh")
677{
678 _triangles.reserve(10000);
679 for (size_t i = 0; i < meshPoints.size() / 3; i++) {
680 STLtriangle<T> tri;
681 tri.point[0][0] = meshPoints[i*3 + 0][0];
682 tri.point[0][1] = meshPoints[i*3 + 0][1];
683 tri.point[0][2] = meshPoints[i*3 + 0][2];
684
685 tri.point[1][0] = meshPoints[i*3 + 1][0];
686 tri.point[1][1] = meshPoints[i*3 + 1][1];
687 tri.point[1][2] = meshPoints[i*3 + 1][2];
688
689 tri.point[2][0] = meshPoints[i*3 + 2][0];
690 tri.point[2][1] = meshPoints[i*3 + 2][1];
691 tri.point[2][2] = meshPoints[i*3 + 2][2];
692 for (int k = 0; k < 3; k++) {
693 tri.point[0][k] *= stlSize;
694 tri.point[1][k] *= stlSize;
695 tri.point[2][k] *= stlSize;
696 }
697 if (i == 0) {
698 _min*=T();
699 _max*=T();
700
701 _min[0] = tri.point[0][0];
702 _min[1] = tri.point[0][1];
703 _min[2] = tri.point[0][2];
704
705 _max[0] = tri.point[0][0];
706 _max[1] = tri.point[0][1];
707 _max[2] = tri.point[0][2];
708
709 _min[0] = util::min(_min[0], (T) tri.point[1][0]);
710 _min[1] = util::min(_min[1], (T) tri.point[1][1]);
711 _min[2] = util::min(_min[2], (T) tri.point[1][2]);
712
713 _max[0] = util::max(_max[0], (T) tri.point[1][0]);
714 _max[1] = util::max(_max[1], (T) tri.point[1][1]);
715 _max[2] = util::max(_max[2], (T) tri.point[1][2]);
716
717 _min[0] = util::min(_min[0], (T) tri.point[2][0]);
718 _min[1] = util::min(_min[1], (T) tri.point[2][1]);
719 _min[2] = util::min(_min[2], (T) tri.point[2][2]);
720
721 _max[0] = util::max(_max[0], (T) tri.point[2][0]);
722 _max[1] = util::max(_max[1], (T) tri.point[2][1]);
723 _max[2] = util::max(_max[2], (T) tri.point[2][2]);
724
725 }
726 else {
727 _min[0] = util::min(_min[0], (T) tri.point[0][0]);
728 _min[1] = util::min(_min[1], (T) tri.point[0][1]);
729 _min[2] = util::min(_min[2], (T) tri.point[0][2]);
730
731 _max[0] = util::max(_max[0], (T) tri.point[0][0]);
732 _max[1] = util::max(_max[1], (T) tri.point[0][1]);
733 _max[2] = util::max(_max[2], (T) tri.point[0][2]);
734
735 _min[0] = util::min(_min[0], (T) tri.point[1][0]);
736 _min[1] = util::min(_min[1], (T) tri.point[1][1]);
737 _min[2] = util::min(_min[2], (T) tri.point[1][2]);
738
739 _max[0] = util::max(_max[0], (T) tri.point[1][0]);
740 _max[1] = util::max(_max[1], (T) tri.point[1][1]);
741 _max[2] = util::max(_max[2], (T) tri.point[1][2]);
742
743 _min[0] = util::min(_min[0], (T) tri.point[2][0]);
744 _min[1] = util::min(_min[1], (T) tri.point[2][1]);
745 _min[2] = util::min(_min[2], (T) tri.point[2][2]);
746
747 _max[0] = util::max(_max[0], (T) tri.point[2][0]);
748 _max[1] = util::max(_max[1], (T) tri.point[2][1]);
749 _max[2] = util::max(_max[2], (T) tri.point[2][2]);
750 }
751
752 tri.init();
753 _triangles.push_back(tri);
754
755 _maxDist2 = util::max(distPoints(tri.point[0], tri.point[1]),
756 _maxDist2);
757 _maxDist2 = util::max(distPoints(tri.point[2], tri.point[1]),
758 _maxDist2);
759 _maxDist2 = util::max(distPoints(tri.point[0], tri.point[2]),
760 _maxDist2);
761 }
762}

References olb::STLtriangle< T >::init(), olb::util::max(), olb::util::min(), and olb::STLtriangle< T >::point.

+ Here is the call graph for this function:

◆ STLmesh() [3/4]

template<typename T >
olb::STLmesh< T >::STLmesh ( std::string ,
T stlSize = 1. )

Constructs a new STLmesh from a file.

Parameters
Filename- Filename
stlSize- Conversion factor for STL (e.g. STL in mm stlSize=10^-3)

◆ STLmesh() [4/4]

template<typename T >
olb::STLmesh< T >::STLmesh ( const std::vector< std::vector< T > > meshPoints,
T stlSize = 1. )

Constructs a new STLmesh from a file.

Parameters
Filename- Filename
stlSize- Conversion factor for STL (e.g. STL in mm stlSize=10^-3)

Member Function Documentation

◆ getMax() [1/2]

template<typename T >
Vector< T, 3 > & olb::STLmesh< T >::getMax ( )
inline

Returns _max.

Definition at line 181 of file stlReader.h.

182 {
183 return _max;
184 };

◆ getMax() [2/2]

template<typename T >
Vector< T, 3 > & olb::STLmesh< T >::getMax ( )
inline

Returns _max.

Definition at line 202 of file STLreaderForSubgridParticleWallContact.h.

203 {
204 return _max;
205 };

◆ getMin() [1/2]

template<typename T >
Vector< T, 3 > & olb::STLmesh< T >::getMin ( )
inline

Returns _min.

Definition at line 176 of file stlReader.h.

177 {
178 return _min;
179 };

◆ getMin() [2/2]

template<typename T >
Vector< T, 3 > & olb::STLmesh< T >::getMin ( )
inline

Returns _min.

Definition at line 197 of file STLreaderForSubgridParticleWallContact.h.

198 {
199 return _min;
200 };

◆ getTri() [1/2]

template<typename T >
STLtriangle< T > & olb::STLmesh< T >::getTri ( unsigned int i)
inline

Returns reference to a triangle.

Definition at line 161 of file stlReader.h.

162 {
163 return _triangles[i];
164 }

◆ getTri() [2/2]

template<typename T >
STLtriangle< T > & olb::STLmesh< T >::getTri ( unsigned int i)
inline

Returns reference to a triangle.

Definition at line 182 of file STLreaderForSubgridParticleWallContact.h.

183 {
184 return _triangles[i];
185 }

◆ getTriangles() [1/2]

template<typename T >
std::vector< STLtriangle< T > > & olb::STLmesh< T >::getTriangles ( )
inline

Returns reference to all triangles.

Definition at line 166 of file stlReader.h.

167 {
168 return _triangles;
169 }
+ Here is the caller graph for this function:

◆ getTriangles() [2/2]

template<typename T >
std::vector< STLtriangle< T > > & olb::STLmesh< T >::getTriangles ( )
inline

Returns reference to all triangles.

Definition at line 187 of file STLreaderForSubgridParticleWallContact.h.

188 {
189 return _triangles;
190 }

◆ maxDist2() [1/2]

template<typename T >
float olb::STLmesh< T >::maxDist2 ( ) const
inline

Returns maxDist squared.

Definition at line 186 of file stlReader.h.

187 {
188 return _maxDist2;
189 }

◆ maxDist2() [2/2]

template<typename T >
float olb::STLmesh< T >::maxDist2 ( ) const
inline

Returns maxDist squared.

Definition at line 207 of file STLreaderForSubgridParticleWallContact.h.

208 {
209 return _maxDist2;
210 }

◆ print() [1/2]

template<typename T >
void olb::STLmesh< T >::print ( bool full = false)

Prints console output.

Definition at line 773 of file stlReader.hh.

774{
775 if (full) {
776 int i = 0;
777 clout << "Triangles: " << std::endl;
778 typename std::vector<STLtriangle<T> >::iterator it = _triangles.begin();
779
780 for (; it != _triangles.end(); ++it) {
781 clout << i++ << ": " << it->point[0][0] << " " << it->point[0][1]
782 << " " << it->point[0][2] << " | " << it->point[1][0] << " "
783 << it->point[1][1] << " " << it->point[1][2] << " | "
784 << it->point[2][0] << " " << it->point[2][1] << " "
785 << it->point[2][2] << std::endl;
786 }
787 }
788 clout << "nTriangles=" << _triangles.size() << "; maxDist2=" << _maxDist2
789 << std::endl;
790 clout << "minPhysR(StlMesh)=(" << getMin()[0] << "," << getMin()[1] << ","
791 << getMin()[2] << ")";
792 clout << "; maxPhysR(StlMesh)=(" << getMax()[0] << "," << getMax()[1] << ","
793 << getMax()[2] << ")" << std::endl;
794}
Vector< T, 3 > & getMin()
Returns _min.
Definition stlReader.h:176
Vector< T, 3 > & getMax()
Returns _max.
Definition stlReader.h:181

◆ print() [2/2]

template<typename T >
void olb::STLmesh< T >::print ( bool full = false)

Prints console output.

◆ testRayIntersect() [1/2]

template<typename T >
bool olb::STLmesh< T >::testRayIntersect ( const std::set< unsigned int > & tris,
const Vector< T, 3 > & pt,
const Vector< T, 3 > & dir,
Vector< T, 3 > & q,
T & alpha )

Compute intersection between Ray and set of triangles; returns true if intersection is found.

Definition at line 832 of file stlReader.hh.

833{
834 std::set<unsigned int>::iterator it = tris.begin();
835 for (; it != tris.end(); ++it) {
836 if (_triangles[*it].testRayIntersect(pt, dir, q, alpha) && alpha < 1) {
837 return true;
838 }
839 }
840 return false;
841}
bool testRayIntersect(const std::set< unsigned int > &tris, const Vector< T, 3 > &pt, const Vector< T, 3 > &dir, Vector< T, 3 > &q, T &alpha)
Compute intersection between Ray and set of triangles; returns true if intersection is found.
Definition stlReader.hh:832

◆ testRayIntersect() [2/2]

template<typename T >
bool olb::STLmesh< T >::testRayIntersect ( const std::set< unsigned int > & tris,
const Vector< T, 3 > & pt,
const Vector< T, 3 > & dir,
Vector< T, 3 > & q,
T & alpha )

Compute intersection between Ray and set of triangles; returns true if intersection is found.

◆ triangleSize() [1/2]

template<typename T >
unsigned int olb::STLmesh< T >::triangleSize ( ) const
inline

Returns number of triangles.

Definition at line 171 of file stlReader.h.

172 {
173 return _triangles.size();
174 }

◆ triangleSize() [2/2]

template<typename T >
unsigned int olb::STLmesh< T >::triangleSize ( ) const
inline

Returns number of triangles.

Definition at line 192 of file STLreaderForSubgridParticleWallContact.h.

193 {
194 return _triangles.size();
195 }

◆ write() [1/2]

template<typename T >
void olb::STLmesh< T >::write ( std::string fName)

Writes STL mesh in Si units.

Definition at line 797 of file stlReader.hh.

798{
799 int rank = 0;
800#ifdef PARALLEL_MODE_MPI
801 rank = singleton::mpi().getRank();
802#endif
803 if (rank == 0) {
804 std::string fullName = singleton::directories().getVtkOutDir() + fName
805 + ".stl";
806 std::ofstream f(fullName.c_str());
807 f << "solid ascii " << fullName << "\n";
808
809 for (unsigned int i = 0; i < _triangles.size(); i++) {
810 f << "facet normal " << _triangles[i].normal[0] << " "
811 << _triangles[i].normal[1] << " " << _triangles[i].normal[2] << "\n";
812 f << " outer loop\n";
813 f << " vertex " << _triangles[i].point[0][0] << " "
814 << _triangles[i].point[0][1] << " " << _triangles[i].point[0][2]
815 << "\n";
816 f << " vertex " << _triangles[i].point[1][0] << " "
817 << _triangles[i].point[1][1] << " " << _triangles[i].point[1][2]
818 << "\n";
819 f << " vertex " << _triangles[i].point[2][0] << " "
820 << _triangles[i].point[2][1] << " " << _triangles[i].point[2][2]
821 << "\n";
822 f << " endloop\n";
823 f << "endfacet\n";
824 }
825 f << "endsolid\n";
826 f.close();
827 }
828 /*if (_verbose)*/clout << "Write ... OK" << std::endl;
829}
std::string getVtkOutDir() const
Definition singleton.h:103
int getRank() const
Returns the process ID.
MpiManager & mpi()
Directories & directories()
Definition singleton.h:162

References olb::singleton::directories(), olb::singleton::MpiManager::getRank(), olb::singleton::Directories::getVtkOutDir(), and olb::singleton::mpi().

+ Here is the call graph for this function:

◆ write() [2/2]

template<typename T >
void olb::STLmesh< T >::write ( std::string fName)

Writes STL mesh in Si units.


The documentation for this class was generated from the following files: