G+Smo  25.01.0
Geometry + Simulation Modules
 
Loading...
Searching...
No Matches
gsC1SurfEdge.hpp
1
14#pragma once
15
17
18namespace gismo
19{
20
21 template<short_t d,class T>
22 void gsC1SurfEdge<d,T>::computeAuxTopology(){
23 //gsMultiPatch<T> auxTop;
24 for(size_t i = 0; i < auxGeom.size(); i++){
25 if(auxGeom[i].getPatch().orientation() == -1)
26 {
27 auxGeom[i].swapAxis();
28// gsInfo << "Changed axis on patch: " << auxGeom[i].getGlobalPatchIndex() << "\n";
29 }
30 //auxTop.addPatch(auxGeom[i].getPatch());
31 }
32 //auxTop.computeTopology();
33 //return auxTop;
34 }
35
36
37 template<short_t d,class T>
38 void gsC1SurfEdge<d,T>::reparametrizeInterface(const boundaryInterface & item){
39 computeAuxTopology();
40
41// if(item.second().side().index() == 1 && item.first().side().index() == 3)
42// return repTop;
43
44 // Right patch along the interface. Patch 0 -> v coordinate. Edge west along interface
45 switch (item.first().side().index())
46 {
47 case 1:
48 break;
49 case 4: auxGeom[0].rotateParamClock();
50 break;
51 case 3: auxGeom[0].rotateParamAntiClock();
52 break;
53 case 2: auxGeom[0].rotateParamAntiClockTwice();
54 break;
55 default:
56 break;
57 }
58
59 // Left patch along the interface. Patch 1 -> u coordinate. Edge south along interface
60 switch (item.second().side().index())
61 {
62 case 3:
63 break;
64 case 4: auxGeom[1].rotateParamAntiClockTwice();
65 break;
66 case 2: auxGeom[1].rotateParamAntiClock();
67 break;
68 case 1: auxGeom[1].rotateParamClock();
69 break;
70 default:
71 break;
72 }
73
74 computeAuxTopology();
75 }
76
77
78 template<short_t d,class T>
79 void gsC1SurfEdge<d,T>::reparametrizeBoundary(const index_t bInd){
80 computeAuxTopology();
81
82 if(auxGeom[0].getOrient())
83 {
84 switch (bInd)
85 {
86 case 3:
87 break;
88 case 2:
89 auxGeom[0].rotateParamClock();
90 break;
91 case 4:
92 auxGeom[0].rotateParamAntiClockTwice();
93 break;
94 case 1:
95 auxGeom[0].rotateParamAntiClock();
96 break;
97 }
98 }
99 else {
100 switch (bInd) {
101 case 1:
102 break;
103 case 4:
104 auxGeom[0].rotateParamClock();
105 break;
106 case 2:
107 auxGeom[0].rotateParamAntiClockTwice();
108 break;
109 case 3:
110 auxGeom[0].rotateParamAntiClock();
111 break;
112 }
113 }
114
115 computeAuxTopology();
116 }
117
118} // namespace gismo
short_t index() const
Returns the index (as specified in boundary::side) of the box side.
Definition gsBoundary.h:140
Reparametrize one Patch.
The G+Smo namespace, containing all definitions for the library.
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 & second()
second, returns the second patchSide of this interface
Definition gsBoundary.h:782