Changeset 2989
- Timestamp:
- 02/08/10 17:24:05 (15 years ago)
- Location:
- issm/trunk/src/c/Bamgx
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Bamgx/Mesh2.h
r2985 r2989 6 6 #include "../include/macros.h" 7 7 #include "../toolkits/toolkits.h" 8 9 //From MeshIo10 #include <cstdio>11 #include <cstring>12 #include <cstdlib>13 #include <cctype>14 #include <stdlib.h>15 #include <math.h>16 8 17 9 #include "meshtype.h" … … 817 809 /*}}}1*/ 818 810 811 inline void Vertex::Set(const Vertex & rec,const Triangles & ,Triangles & ){ 812 *this = rec; 813 } 814 inline void GeometricalVertex::Set(const GeometricalVertex & rec,const Geometry & ,const Geometry & ){ 815 *this = rec; 816 } 817 inline void VertexOnVertex::Set(const Triangles & Th ,Int4 i,Triangles & ThNew) { 818 *this = Th.VertexOnBThVertex[i]; 819 v = ThNew.vertices + Th.Number(v); 820 821 } 822 Int4 inline Vertex::Optim(int i,int koption){ 823 Int4 ret=0; 824 if ( t && (vint >= 0 ) && (vint <3) ) 825 { 826 ret = t->Optim(vint,koption); 827 if(!i) 828 { 829 t =0; // for no future optime 830 vint= 0; } 831 } 832 return ret; 833 } 834 819 835 // to sort in descending order 820 836 template<class T> inline void HeapSort(T *c,long n){ … … 902 918 } 903 919 904 inline void Vertex::Set(const Vertex & rec,const Triangles & ,Triangles & ) 905 { 906 *this = rec; 907 } 908 inline void GeometricalVertex::Set(const GeometricalVertex & rec,const Geometry & ,const Geometry & ) 909 { 910 *this = rec; 911 } 920 912 921 inline void Edge::Set(const Triangles & Th ,Int4 i,Triangles & ThNew) 913 922 { … … 950 959 link = ThNew.triangles + Th.Number(link); 951 960 } 952 inline void VertexOnVertex::Set(const Triangles & Th ,Int4 i,Triangles & ThNew) 953 { 954 *this = Th.VertexOnBThVertex[i]; 955 v = ThNew.vertices + Th.Number(v); 956 957 } 961 958 962 inline void SubDomain::Set(const Triangles & Th ,Int4 i,Triangles & ThNew) 959 963 { … … 1133 1137 } 1134 1138 1135 Int4 inline Vertex::Optim(int i,int koption) 1136 { 1137 Int4 ret=0; 1138 if ( t && (vint >= 0 ) && (vint <3) ) 1139 { 1140 ret = t->Optim(vint,koption); 1141 if(!i) 1142 { 1143 t =0; // for no future optime 1144 vint= 0; } 1145 } 1146 return ret; 1147 } 1148 1149 Icoor2 inline det(const Vertex & a,const Vertex & b,const Vertex & c) 1150 { 1139 1140 Icoor2 inline det(const Vertex & a,const Vertex & b,const Vertex & c){ 1151 1141 register Icoor2 bax = b.i.x - a.i.x ,bay = b.i.y - a.i.y; 1152 1142 register Icoor2 cax = c.i.x - a.i.x ,cay = c.i.y - a.i.y; 1153 return bax*cay - bay*cax;} 1143 return bax*cay - bay*cax; 1144 } 1154 1145 1155 1146 … … 1158 1149 Vertex *s1,Vertex *s2,Icoor2 det1,Icoor2 det2); 1159 1150 1160 1161 1162 1151 int inline TriangleAdjacent::swap() 1163 1152 { return t->swap(a);} 1164 1165 1166 1153 1167 1154 int SwapForForcingEdge(Vertex * & pva ,Vertex * & pvb , … … 1171 1158 int ForceEdge(Vertex &a, Vertex & b,TriangleAdjacent & taret) ; 1172 1159 1173 // inline bofbof FH 1174 inline TriangleAdjacent FindTriangleAdjacent(Edge &E) 1175 { 1160 inline TriangleAdjacent FindTriangleAdjacent(Edge &E){ 1176 1161 Vertex * a = E.v[0]; 1177 1162 Vertex * b = E.v[1]; … … 1202 1187 } 1203 1188 1204 inline Vertex * TheVertex(Vertex * a) // give a unique vertex with smallest number 1205 { // in case on crack in mesh 1189 inline Vertex* TheVertex(Vertex * a){ 1190 // give a unique vertex with smallest number 1191 // in case on crack in mesh 1206 1192 Vertex * r(a), *rr; 1207 1193 Triangle * t = a->t; -
issm/trunk/src/c/Bamgx/Metric.h
r2984 r2989 1 #ifndef TYPEMETRIX 2 #define TYPEMETRIX Metric 3 #endif 1 #ifndef _METRIC_H 2 #define _METRIC_H 4 3 5 //#include "R2.h" 4 #include "R2.h" 5 6 6 namespace bamg { 7 7 … … 121 121 return ( Abs(la - lb) <1.0e-6*Max3(la,lb,1.0e-20)) ? s : (exp(s*lab*(la-lb)/(la*lb))-1)*lb/(la-lb); 122 122 } 123 124 123 } 124 #endif -
issm/trunk/src/c/Bamgx/QuadTree.h
r2984 r2989 1 #ifndef _QUADTREE_H 2 #define _QUADTREE_H 3 1 4 #include "../shared/shared.h" 2 5 #include "../include/macros.h" … … 63 66 }; 64 67 } 68 #endif -
issm/trunk/src/c/Bamgx/R2.h
r2984 r2989 1 #ifndef _R2_H 2 #define _R2_H 3 1 4 namespace bamg { 2 5 … … 96 99 } 97 100 } 101 #endif -
issm/trunk/src/c/Bamgx/SetOfE4.h
r2984 r2989 36 36 }; 37 37 } 38 39 38 #endif
Note:
See TracChangeset
for help on using the changeset viewer.