G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsBoundary.h
Go to the documentation of this file.
1
14#pragma once
15
17
18#include <gsCore/gsExport.h>
19
20namespace gismo
21{
56{
58 enum side { west = 1, east = 2, south = 3, north= 4, front=5, back=6,
59 stime = 7, etime = 8,
60 left = 1, right = 2, down = 3, up = 4 , none = 0 };
61
62
64 // warning: naming southwest etc ambiguous for 3D (corresponds to an edge)
65 enum corner { southwestfront = 1, southeastfront = 2, northwestfront = 3, northeastfront = 4,
66 southwestback = 5, southeastback = 6, northwestback = 7, northeastback = 8,
67 southwest = 1, southeast = 2, northwest = 3, northeast = 4
68 };
69};
70
71struct interaction
72{
73 enum type { conforming = 0, contact = 2};
74};
75
76// forward declarations; defined later
77struct boxCorner;
78struct patchCorner;
79
84class GISMO_EXPORT boxSide
85{
86public:
87
93public:
94 boxSide (): m_index(0) {}
95 boxSide (short_t dir, bool par) : m_index(index(dir,par))
96 { GISMO_ASSERT(dir>=0,"invalid side");}
97 boxSide (short_t a) : m_index(a) { GISMO_ASSERT(a>=0,"invalid side");}
98 boxSide (boundary::side a) : m_index(a) { GISMO_ASSERT(a>=0,"invalid side");}
99
100 // conversions
101 operator boundary::side() const {return static_cast<boundary::side>(m_index);}
102
113 short_t direction () const {return static_cast<short_t>((m_index-1) / 2);}
114
128 bool parameter () const {return (m_index-1)%2 != 0;}
129
134 boxSide opposite() const {return boxSide(static_cast<short_t>(((m_index-1)^1)+1));}
135
136
140 short_t index () const {return m_index;}
141
146 static inline short_t index (short_t dir, bool par) {return static_cast<short_t>(par?2*dir+2:2*dir+1);}
147
148
154 void getContainedCorners (short_t dim, std::vector<boxCorner> &corners) const;
155
161 { return boxSide(1); }
162
169 static boxSide getLast (short_t dim) {return boxSide(static_cast<short_t>(2*dim));}
176 static boxSide getEnd (short_t dim) {return boxSide(static_cast<short_t>(2*dim+1));}
177
181 boxSide& operator++ () { ++m_index; return *this;} //prefix
182 //boxSide operator++ (int) { boxSide temp(*this); ++m_index; return temp;} //postfix
183
187 boxSide& operator-- () { --m_index; return *this;} //prefix
188 //boxSide operator-- (int) { boxSide temp(*this); --m_index; return temp;} //postfix
189
190};
191
193inline std::ostream &operator<<(std::ostream &os, const boxSide& o)
194{
195 switch (o)
196 {
197 case 0:
198 os<<"none ";
199 break;
200 case 1:
201 os<< "west ";
202 break;
203 case 2:
204 os<< "east ";
205 break;
206 case 3:
207 os<< "south";
208 break;
209 case 4:
210 os<< "north";
211 break;
212 case 5:
213 os<< "front";
214 break;
215 case 6:
216 os<< "back ";
217 break;
218 default:
219 os<< "side ";
220 break;
221 };
222 os<<"("<<static_cast<int>(o)<<")";
223 return os;
224}
225
231struct GISMO_EXPORT patchSide : public boxSide
232{
233public:
235protected:
236 std::string m_label;
237public:
238
239 patchSide() : boxSide(), patch(0), m_label("") { }
240
241 patchSide(index_t p, boxSide s, const std::string & l="")
242 : boxSide(s), patch(p), m_label(l) { }
243
244 patchSide(index_t p, boundary::side s, const std::string & l="")
245 : boxSide(s), patch(p), m_label(l) { }
246
247 // Accessors
248 boxSide& side() {return *this;}
249 const boxSide& side() const {return *this;}
250
251 index_t patchIndex() const {return patch;}
252 const std::string & label() const {return m_label;}
253 std::string & label() {return m_label;}
254
255 void setLabel(std::string label) { m_label = label; };
256
262 void getContainedCorners (short_t dim, std::vector<patchCorner> &corners) const;
263
264 using boxSide::getContainedCorners; // unhiding
265};
266
268inline std::ostream &operator<<(std::ostream &os, patchSide const & i)
269{
270 //os<<"Side: patch="<< i.patch<<", side="<< int(i.side)<<", ie. "<< i.side << ".\n";
271 os<<i.patch<<":"<< i.side()<<" "<<i.label();
272 return os;
273}
274
275// We do not need comparization operators for boxSide since it decays to a number anyway
276
277inline bool operator== (const patchSide& a, const patchSide& b)
278{ return a.patch == b.patch && a.m_index == b.m_index; }
279inline bool operator< (const patchSide& a, const patchSide& b)
280{ return a.patch < b.patch || (a.patch == b.patch && a.m_index < b.m_index); }
281GISMO_DELEGATING_COMPARISON_OPERATORS(patchSide)
282
283// This might cause terrible bugs
284GISMO_DELETE_COMPARISON_OPERATORS(boxSide,patchSide)
285
286
287
288
292{
293public:
299public:
300 boxCorner (index_t a=0) : m_index(a) { GISMO_ASSERT(a>=0,"invalid side");}
301 boxCorner (boundary::corner a) : m_index(a) { GISMO_ASSERT(a>=0,"invalid side");}
302 boxCorner (gsVector<bool> v) : m_index(1)
303 {
304 for (index_t p=0;p<v.rows();++p)
305 {
306 if(v(p))
307 m_index+= 1<<p;
308 }
309 }
310
311 // conversions
312 operator boundary::corner() const {return static_cast<boundary::corner>(m_index);}
313 boxCorner& operator= (boundary::corner a) {m_index= a; return *this;}
314
322 void parameters_into (index_t dim, gsVector<bool> &param) const
323 {
324 param.resize(dim);
325 for (short_t i=0; i<dim; ++i)
326 param(i)=((m_index-1)>>i)&1;
327 }
328
329 gsVector<bool> parameters(index_t dim) const
330 {
332 parameters_into(dim,r);
333 return r;
334 }
335
336
342 void getContainingSides (index_t dim, std::vector<boxSide> &sides) const
343 {
344 GISMO_ASSERT(dim>=0, "Dimension must be non negative");
345 sides.resize(dim);
346 gsVector<bool> param;
347 parameters_into(dim,param);
348 for (short_t i=0;i<dim;++i)
349 sides[i]=boxSide(i,param(i));
350 }
351
357 { return boxCorner(1); }
358
365 static boxCorner getLast (short_t dim) {return boxCorner((1<<dim));}
372 static boxCorner getEnd (short_t dim) {return boxCorner((1<<dim)+1);}
376 boxCorner& operator++ () { ++m_index; return *this;} //prefix
377 //boxCorner operator++ (int ) { boxCorner temp(*this); ++m_index; return temp;} //postfix
378
382 boxCorner& operator-- () { --m_index; return *this;} //prefix
383 //boxCorner operator-- (int ) { boxCorner temp(*this); --m_index; return temp;} //postfix
384
385};
386
387
392struct patchCorner : public boxCorner
393{
394public:
395 index_t patch;
396public:
397 patchCorner() : boxCorner(0) { }
399 : boxCorner(c), patch (p) { }
400
401 patchCorner(index_t p, int c)
402 : boxCorner(c), patch (p) { }
403
405 : boxCorner(c), patch (p) { }
406
407 // Accessors
408 boxCorner& corner() {return *this;}
409 const boxCorner& corner() const {return *this;}
410
416 void getContainingSides (short_t dim, std::vector<patchSide> &sides) const
417 {
418 GISMO_ASSERT(dim>=0, "Dimension must be non negative");
419 sides.resize(dim);
420 gsVector<bool> param;
421 parameters_into(dim,param);
422 for (short_t i=0;i<dim;++i)
423 sides[i]=patchSide(patch, boxSide(i, param(i)));
424 }
425};
426
427// We do not need comparization operators for boxCorner since it decays to a number anyway
428
429inline bool operator== (const patchCorner& a, const patchCorner& b)
430{ return a.patch == b.patch && a.m_index == b.m_index; }
431inline bool operator< (const patchCorner& a, const patchCorner& b)
432{ return a.patch < b.patch || (a.patch == b.patch && a.m_index < b.m_index); }
433GISMO_DELEGATING_COMPARISON_OPERATORS(patchCorner)
434
435// This might cause terrible bugs
436GISMO_DELETE_COMPARISON_OPERATORS(boxCorner,patchCorner)
437
438
445struct GISMO_EXPORT boxComponent {
446private:
478
480public:
481
486 boxComponent( index_t b, short_t total_dim ) : m_index(b), m_total_dim(total_dim) {}
487
491 boxComponent( short_t total_dim ) : m_index(0), m_total_dim(total_dim) {}
492
497 boxComponent( boxSide b, short_t total_dim );
498
503 boxComponent( boxCorner b, short_t total_dim );
504
506 short_t totalDim() const { return m_total_dim; }
507
509 short_t dim() const;
510
512 index_t index() const { return m_index; }
513
515 std::vector<boxCorner> containedCorners() const;
516
518 std::vector<boxSide> containingSides() const;
519
521 boxSide asSide() const;
522
524 boxCorner asCorner() const;
525
527 boxComponent opposite() const;
528
530 enum location {
531 interior = 0,
532 begin = 1,
533 end = 2
534 };
535
546 location locationForDirection(index_t direction) const;
547
554 void setLocationForDirection(index_t direction, location par);
555
556};
557
565struct GISMO_EXPORT patchComponent : boxComponent {
566private:
568public:
569
575 patchComponent( index_t p, index_t b, short_t total_dim ) : boxComponent(b,total_dim), m_patch(p) {}
576
581 patchComponent( index_t p, short_t total_dim ) : boxComponent(total_dim), m_patch(p) {}
582
588
593 patchComponent( patchSide p, short_t total_dim ) : boxComponent(p,total_dim), m_patch(p.patch) {}
594
599 patchComponent( patchCorner p, short_t total_dim ) : boxComponent(p,total_dim), m_patch(p.patch) {}
600
602 std::vector<patchCorner> containedCorners() const;
603
605 std::vector<patchSide> containingSides() const;
606
609 {
610 return patchSide( m_patch, boxComponent::asSide() );
611 }
612
615 {
616 return patchCorner( m_patch, boxComponent::asCorner() );
617 }
618
621 {
622 return patchComponent( m_patch, boxComponent::opposite() );
623 }
624
626 index_t patch() const { return m_patch; }
627};
628
629inline bool operator== (const boxComponent& a, const boxComponent& b)
630{ return a.index() == b.index(); }
631inline bool operator< (const boxComponent& a, const boxComponent& b)
632{ return a.index() < b.index(); }
633GISMO_DELEGATING_COMPARISON_OPERATORS(boxComponent)
634
635inline bool operator== (const patchComponent& a, const patchComponent& b)
636{ return a.patch() == b.patch() && a.index() == b.index(); }
637inline bool operator< (const patchComponent& a, const patchComponent& b)
638{ return a.patch() < b.patch() || (a.patch() == b.patch() && a.index() < b.index()); }
639GISMO_DELEGATING_COMPARISON_OPERATORS(patchComponent)
640
641// This might cause terrible bugs
642GISMO_DELETE_COMPARISON_OPERATORS(boxComponent,patchComponent)
643
644
649struct GISMO_EXPORT boundaryInterface
650{
651public:
653
654 // special constructor for the 2d case
655 boundaryInterface(patchSide const & _ps1,
656 patchSide const & _ps2,
657 bool o1,
658 const std::string & l = "")
659 : m_label(l), ps1(_ps1), ps2(_ps2), m_type(interaction::conforming)
660 {
661 directionMap.resize(2);
662 directionOrientation.resize(2);
663 directionMap(ps1.direction())=ps2.direction();
664 directionMap(1-ps1.direction())=1-ps2.direction();
665 directionOrientation(ps1.direction())= (ps1.parameter()==ps2.parameter());
666 directionOrientation(1-ps1.direction())=o1;
667 }
668
669
670 //
672 patchSide const & _ps2,
673 short_t dim,
674 const std::string & l = "")
675 : m_label(l), ps1(_ps1), ps2(_ps2), m_type(interaction::conforming)
676 {
677 directionMap.resize(dim);
678 directionOrientation.resize(dim);
679
680 for (int i = 1 ; i < dim; ++i)
681 {
682 const index_t o = (ps1.direction()+i)%dim;
683 const index_t d = (ps2.direction()+i)%dim;
684
685 directionMap(o)=d;
686 directionOrientation(o)=true;
688 }
689 directionMap(ps1.direction())=ps2.direction();
690 directionOrientation(ps1.direction())= (ps1.parameter()==ps2.parameter());
691
692 }
693
695 gsVector<index_t> const & map_info,
696 gsVector<bool> const & orient_flags,
697 const std::string & l = "")
698 : m_label(l), ps1(p(0),p(1)), ps2(p(2),p(3)),
699 directionMap(map_info),
700 directionOrientation(orient_flags), m_type(interaction::conforming)
701 {
702 GISMO_ASSERT(p.size() == 4, "Expecting four integers");
703 directionMap(ps1.direction())=ps2.direction();
704 directionOrientation(ps1.direction())= (ps1.parameter()==ps2.parameter());
705 }
706
707 boundaryInterface(patchSide const & _ps1,
708 patchSide const & _ps2,
709 gsVector<index_t> const & map_info,
710 gsVector<bool> const & orient_flags,
711 const std::string & l = "")
712 : m_label(l), ps1(_ps1), ps2(_ps2), directionMap(map_info), directionOrientation(orient_flags)
713 , m_type(interaction::conforming)
714 {
715 directionMap(ps1.direction())=ps2.direction();
716 directionOrientation(ps1.direction())= (ps1.parameter()==ps2.parameter());
717 }
718
719 GISMO_DEPRECATED boundaryInterface(patchSide const & _ps1,
720 patchSide const & _ps2,
721 gsVector<bool> const & orient_flags,
722 const std::string & l = "")
723 {
724 init(_ps1,_ps2,orient_flags,l);
725 }
726
727 GISMO_DEPRECATED boundaryInterface(gsVector<short_t> const & p,
728 gsVector<bool> const & orient_flags,
729 const std::string & l = "")
730 {
731 init(patchSide(p(0),boxSide(p(1))),patchSide(p(2),boxSide(p(3))) ,orient_flags,l);
732 }
733
734 //DEPRECATED
735 void init (patchSide const & _ps1,
736 patchSide const & _ps2,
737 gsVector<bool> const & orient_flags,
738 const std::string & l = "")
739 {
740 ps1=_ps1;
741 ps2=_ps2;
742 m_label = l;
743
744 const index_t dim = orient_flags.cols()+1;
745 directionMap.resize(dim);
746 directionOrientation.resize(dim);
747
748 directionMap(ps1.direction())=ps2.direction();
749 directionOrientation(ps1.direction())= (ps1.parameter()==ps2.parameter());
750
751 directionMap(1-ps1.direction())=1-ps2.direction();
752 directionOrientation(1-ps1.direction())= orient_flags(0);
753 m_type = interaction::conforming;
754 }
755
757 const std::string & label() const {return m_label;}
758 std::string & label() {return m_label;}
759
760
761 bool operator== (const boundaryInterface & other) const
762 {
763 return ps1==other.ps1 && ps2==other.ps2
764 && directionMap==other.directionMap
765 && directionOrientation==other.directionOrientation;
766 }
767
768 inline bool operator< (const boundaryInterface& other) const
769 {
770 return ps1<other.ps1 || (ps1==other.ps1 && ps2<other.ps2);
771 }
772
776 patchSide& first () {return ps1;}
777 const patchSide& first () const {return ps1;}
778
782 patchSide& second () {return ps2;}
783 const patchSide& second () const {return ps2;}
784
789 patchSide& other (const patchSide & ps) {return ps==ps1 ? ps2 : ps1;}
790 const patchSide& other (const patchSide & ps) const {return ps==ps1 ? ps2 : ps1;}
791
792 // use boundaryInterface.first() and boundaryInterface.second()
793 GISMO_DEPRECATED patchSide operator [] (size_t i) const
794 {
795 if (i==0)
796 return ps1;
797 else if (i==1)
798 return ps2;
799 else
800 GISMO_ERROR("Invalid index "<<i<<": Interface has 2 elements(sides).");
801 }
802 // use boundaryInterface.first() and boundaryInterface.second()
803 GISMO_DEPRECATED patchSide & operator [] (size_t i)
804 {
805 if (i==0)
806 return ps1;
807 else if (i==1)
808 return ps2;
809 else
810 GISMO_ERROR("Invalid index "<<i<<": Interface has 2 elements(sides).");
811 }
812
813
814 // this is a work in progress, the old code was 2D specific, look at mapInfo and mapOrientation
815 GISMO_DEPRECATED gsVector<bool> orient () const
816 {
817 GISMO_ASSERT(directionOrientation.size()==2, "This is deprecated and does not work if dim>2");
818 gsVector<bool> result(1);
819 result(0)=directionOrientation(1-ps1.direction());
820 return result;
821 }
822
823
824 boundaryInterface getInverse() const
825 {
826 boundaryInterface result;
827 result.directionMap.resize(directionMap.rows());
828 result.directionOrientation.resize(directionOrientation.rows());
829 result.ps1=ps2;
830 result.ps2=ps1;
831 result.m_type = m_type;
832 for (index_t i=0;i<directionMap.rows();++i)
833 {
834 result.directionMap(directionMap(i))=i;
835 result.directionOrientation(directionMap(i))=directionOrientation(i);
836 }
837 return result;
838 }
839
840 patchCorner mapCorner ( const patchCorner c) const
841 {
842 gsVector<bool> par=c.parameters(directionMap.rows());
843 const index_t dim=par.rows();
844 gsVector<bool> new_par(dim);
845 if (c.patch == ps1.patch && par(ps1.direction()) == ps1.parameter() )
846 {
847 index_t i=0;
848 for (; i<ps1.direction();++i)
849 {
850 new_par(directionMap(i)) = directionOrientation(i) ?
851 par(i) : !par(i);
852 }
853 new_par(directionMap(i)) = ps2.parameter();
854 for (++i; i<dim;++i)
855 {
856 new_par(directionMap(i)) = directionOrientation(i) ?
857 par(i) : !par(i);
858 }
859 return patchCorner(ps2.patch, boxCorner(new_par));
860 }
861 else if (c.patch == ps2.patch && par(ps2.direction()) == ps2.parameter() )
862 {
863 return getInverse().mapCorner(c);
864 }
865 else
866 {
867 gsWarn<<"cannot map corners that are not in the interface";
868 return c;
869 }
870 }
871
872 bool dirOrientation(const patchSide & ps,index_t dir) const
873 {
874 if(ps==ps1)
875 return directionOrientation(dir);
876 else
877 return getInverse().dirOrientation(ps,dir);
878 }
879
880 index_t dirMap(const patchSide & ps,index_t dir) const
881 {
882 if(ps==ps1)
883 return directionMap(dir);
884 else
885 return getInverse().dirMap(ps,dir);
886 }
887
890 {
891 if(ps==ps1)
892 return directionOrientation;
893 else
894 return getInverse().dirOrientation(ps);
895 }
896
899 {
900 if(ps==ps1)
901 return directionMap;
902 else
903 return getInverse().dirMap(ps);
904 }
905
906 const gsVector<index_t> & dirMap() const
907 { return directionMap; }
908
909 const gsVector<bool> & dirOrientation() const
910 { return directionOrientation; }
911
912 void faceData(gsVector<bool> & flip, gsVector<index_t> & perm) const;
913
918 void cornerMap(gsVector<index_t> & cmap) const;
919
920 void reorderCorners(gsMatrix<index_t> & boundary) const;
921
922 void setAsContact() { m_type = interaction::contact; }
923
924 interaction::type type() const { return m_type; }
925
926private:
927 std::string m_label;
928
931
997
998
999 interaction::type m_type;
1000
1003protected:
1004 friend std::ostream &operator<<(std::ostream &os, const boundaryInterface & i);
1005};
1006
1007
1009inline std::ostream &operator<<(std::ostream &os, const boundaryInterface & i)
1010{
1011 os << "interface between "<<i.ps1.patch<<":"<< i.ps1.side()<<" and "
1012 << i.ps2.patch<<":"<<i.ps2.side()<<" [ ";
1013 for (index_t j = 0; j<i.directionMap.size(); ++j)
1014 {
1015 if ( i.ps1.direction() == j )
1016 continue;
1017 os << j << "~" << (i.directionOrientation(j) ? "(+" : "(-") << i.directionMap(j)<<") ";
1018 }
1019 os <<"]";
1020 return os;
1021}
1022
1023
1030{
1031 // The orientation sign is determined by the formula:
1032 // (direction + parameter) + 1 mod 2
1033 // where 0 means "-" (CW) and 1 means "+" (CCW)
1034 return ( ( s + (s+1) / 2 ) % 2 ? 1 : -1 );
1035}
1036
1048GISMO_DEPRECATED inline index_t direction (index_t s)
1049{
1050 GISMO_ASSERT( s>0, "Requested direction of none boundary.\n");
1051 return (s-1) / 2 ;
1052}
1053
1054
1069GISMO_DEPRECATED inline bool parameter (int s)
1070{
1071 GISMO_ASSERT( s>0, "Requested parameter of none boundary.\n");
1072 return ( (s+1) % 2 == 0 ? false : true ) ;
1073}
1074
1079template <typename T>
1080gsMatrix<T> getFace (const boxSide side, const gsMatrix<T> &box)
1081{
1082 GISMO_ASSERT(side.direction()< box.rows(), "the specified side is not appropriate for the domain dimension");
1083 gsMatrix<T> temp=box;
1084 const index_t dir=side.direction();
1085 if (side.parameter()) // bottom face
1086 temp(dir,0)=box(dir,1);
1087 else // top face
1088 temp(dir,1)=box(dir,0);
1089 return temp;
1090}
1091
1092#ifdef GISMO_WITH_PYBIND11
1093
1097 void pybind11_enum_gsBoundary(pybind11::module &m);
1098
1099#endif // GISMO_WITH_PYBIND11
1100
1101} // namespace gismo
Struct which represents a certain side of a box.
Definition gsBoundary.h:85
static short_t index(short_t dir, bool par)
Returns the index of the box side implied by input direction dir and parameter par.
Definition gsBoundary.h:146
bool parameter() const
Returns the parameter value (false=0=start, true=1=end) that corresponds to this side.
Definition gsBoundary.h:128
short_t m_index
Index of the side.
Definition gsBoundary.h:92
static boxSide getLast(short_t dim)
helper for iterating on sides of an n-dimensional box
Definition gsBoundary.h:169
static boxSide getEnd(short_t dim)
helper for iterating on sides of an n-dimensional box
Definition gsBoundary.h:176
static boxSide getFirst(short_t)
helper for iterating on sides of an n-dimensional box
Definition gsBoundary.h:160
short_t direction() const
Returns the parametric direction orthogonal to this side.
Definition gsBoundary.h:113
boxSide opposite() const
returns the parallel opposite side
Definition gsBoundary.h:134
short_t index() const
Returns the index (as specified in boundary::side) of the box side.
Definition gsBoundary.h:140
A matrix with arbitrary coefficient type and fixed or dynamic size.
Definition gsMatrix.h:41
A vector with arbitrary coefficient type and fixed or dynamic size.
Definition gsVector.h:37
#define short_t
Definition gsConfig.h:35
#define index_t
Definition gsConfig.h:32
#define GISMO_ERROR(message)
Definition gsDebug.h:118
#define gsWarn
Definition gsDebug.h:50
#define GISMO_ASSERT(cond, message)
Definition gsDebug.h:89
Handles shared library creation and other class attributes.
This is the main header file that collects wrappers of Eigen for linear algebra.
The G+Smo namespace, containing all definitions for the library.
gsMatrix< T > getFace(const boxSide side, const gsMatrix< T > &box)
get the matrix containing the lower and upper corner of the specified side of the given box
Definition gsBoundary.h:1080
GISMO_DEPRECATED index_t direction(index_t s)
Returns the parametric direction that corresponds to side s.
Definition gsBoundary.h:1048
GISMO_DEPRECATED bool parameter(int s)
Returns the parameter value (false=0=start, true=1=end) that corresponds to side s.
Definition gsBoundary.h:1069
int sideOrientation(short_t s)
Definition gsBoundary.h:1029
Struct which represents an interface between two patches.
Definition gsBoundary.h:650
patchSide & first()
first, returns the first patchSide of this interface
Definition gsBoundary.h:776
patchSide & other(const patchSide &ps)
Returns the second side if ps is the first side, otherwise returns the second side.
Definition gsBoundary.h:789
const std::string & label() const
Return the label.
Definition gsBoundary.h:757
gsVector< bool > directionOrientation
Definition gsBoundary.h:996
patchSide ps1
The first patch side.
Definition gsBoundary.h:929
gsVector< index_t > dirMap(const patchSide &ps) const
Accessor for boundaryInterface::directionMap.
Definition gsBoundary.h:898
gsVector< bool > dirOrientation(const patchSide &ps) const
Accessor for boundaryInterface::directionOrientation.
Definition gsBoundary.h:889
gsVector< index_t > directionMap
store the combinatorial data about the interface
Definition gsBoundary.h:988
std::string m_label
The label of the interface.
Definition gsBoundary.h:927
boundaryInterface(patchSide const &_ps1, patchSide const &_ps2, short_t dim, const std::string &l="")
Definition gsBoundary.h:671
patchSide ps2
The second patch side.
Definition gsBoundary.h:930
patchSide & second()
second, returns the second patchSide of this interface
Definition gsBoundary.h:782
Struct that defines the boundary sides and corners and types of a geometric object.
Definition gsBoundary.h:56
corner
Identifiers for topological corners.
Definition gsBoundary.h:65
side
Identifiers for topological sides.
Definition gsBoundary.h:58
Struct which represents a certain component (interior, face, egde, corner).
Definition gsBoundary.h:445
index_t index() const
Returns the index.
Definition gsBoundary.h:512
location
Represents a location.
Definition gsBoundary.h:530
short_t m_total_dim
The dimension of the box itself.
Definition gsBoundary.h:479
index_t m_index
The index defines the component.
Definition gsBoundary.h:477
boxComponent(short_t total_dim)
Constructor creating boxComponent representing the interior.
Definition gsBoundary.h:491
short_t totalDim() const
Dimension of the computational domain (the box itself)
Definition gsBoundary.h:506
boxComponent(index_t b, short_t total_dim)
Constructor.
Definition gsBoundary.h:486
Struct which represents a certain corner of a hyper-cube.
Definition gsBoundary.h:292
static boxCorner getEnd(short_t dim)
helper for iterating on corners of an n-dimensional box
Definition gsBoundary.h:372
static boxCorner getLast(short_t dim)
helper for iterating on corners of an n-dimensional box
Definition gsBoundary.h:365
void getContainingSides(index_t dim, std::vector< boxSide > &sides) const
returns a vector of sides containing the corner
Definition gsBoundary.h:342
index_t m_index
Index of the corner.
Definition gsBoundary.h:298
void parameters_into(index_t dim, gsVector< bool > &param) const
returns a vector of parameters describing the position of the corner
Definition gsBoundary.h:322
static boxCorner getFirst(short_t)
helper for iterating on corners of an n-dimensional box
Definition gsBoundary.h:356
Struct which represents a certain component (interior, face, egde, corner) of a particular patch.
Definition gsBoundary.h:565
patchComponent(index_t p, boxComponent b)
Constructor converting boxComponent to a patchComponent.
Definition gsBoundary.h:587
patchComponent(patchSide p, short_t total_dim)
Constructor converting patchSide to a patchComponent.
Definition gsBoundary.h:593
index_t m_patch
The particular patch.
Definition gsBoundary.h:567
patchComponent(patchCorner p, short_t total_dim)
Constructor converting patchCorner to a patchComponent.
Definition gsBoundary.h:599
patchCorner asCorner() const
Converts to patchCorner and fails if the component is not a corner.
Definition gsBoundary.h:614
patchComponent(index_t p, index_t b, short_t total_dim)
Constructor.
Definition gsBoundary.h:575
index_t patch() const
Returns the patch number.
Definition gsBoundary.h:626
patchComponent opposite() const
Returns the opposite boxCorner.
Definition gsBoundary.h:620
patchSide asSide() const
Converts to patchSide and fails if the component is not a corner.
Definition gsBoundary.h:608
patchComponent(index_t p, short_t total_dim)
Constructor creating patchComponent representing the interior.
Definition gsBoundary.h:581
Struct which represents a certain corner of a patch.
Definition gsBoundary.h:393
void getContainingSides(short_t dim, std::vector< patchSide > &sides) const
returns a vector of patchSides that contain this corner
Definition gsBoundary.h:416
Struct which represents a certain side of a patch.
Definition gsBoundary.h:232
index_t patch
The index of the patch.
Definition gsBoundary.h:234
std::string m_label
The label of the patchSide.
Definition gsBoundary.h:236