 |
Ice Sheet System Model
4.18
Code documentation
|
Go to the documentation of this file.
7 #include "../shared/shared.h"
54 for (jj=0,ii=1;ii<
Size;jj=ii++) {
82 if ( d0) x = (*tt)[0].r * d0;
83 if ( d1) x = x + (*tt)[1].r * d1;
84 if ( d2) x = x + (*tt)[2].r * d2;
95 if ((v=(*tt)(0))) m0 = v->
m;
96 if ((v=(*tt)(1))) m1 = v->
m;
97 if ((v=(*tt)(2))) m2 = v->
m;
126 const long nbvold=nbv;
131 int nbi=
Max(2,(
int) (s+0.5));
139 for (
int k=1;k<nbi;k++){
159 C = SegI ? SegI->
F(si): x * cx + y *cy;
170 else return nbv-nbvold;
183 long int verbosity=0;
184 if(verbosity>3)
_printf_(
" ListofIntersectionTriangles ReShape Maxsize " <<
MaxSize <<
" -> " <<
MaxNbSeg <<
"\n");
195 long long deta[3], deti,detj;
215 ilast=
NewItem(t,
double(deta[0])/t->
det,
double(deta[1])/t->
det,
double(deta[2])/t->
det);
227 if (
det(v0.
i,v1.i,b)>=0) {
237 k=(*t)(0) ? (( (*t)(1) ? ( (*t)(2) ? -1 : 2) : 1 )) : 0;
268 if (
det(vi,vj,b)>=0) {
280 double dij = detj-deti;
281 if (i+j+k != 0 + 1 +2){
287 ilast=
NewItem(t,ba[0],ba[1],ba[2]); }
342 if (dt[0]) ocut=0,k++;
343 if (dt[1]) ocut=1,k++;
344 if (dt[2]) ocut=2,k++;
358 long long detbij =
bamg::det((*t)[i],(*t)[j],b);
365 NewItem(t,dt[0]/dd,dt[1]/dd,dt[2]/dd);
370 double dij = detj-deti;
374 ilast=
NewItem(t, ba[0],ba[1],ba[2]);
static const short PreviousEdge[3]
#define _printf_(StreamArgs)
double abscisseInterpole(const Metric &Ma, const Metric &Mb, R2 AB, double s, int optim)
T Max(const T &a, const T &b)
static const short OppositeEdge[3]
AdjacentTriangle Adj(int i) const
IntersectionTriangles * lIntTria
int NewItem(Triangle *tt, double d0, double d1, double d2)
long long det(const I2 &a, const I2 &b, const I2 &c)
long NewPoints(BamgVertex *, long &nbv, long maxnbv)
double LengthInterpole(const Metric &Ma, const Metric &Mb, R2 AB)
~ListofIntersectionTriangles()
ListofIntersectionTriangles(int n=256, int m=16)
SegInterpolation * lSegsI
#define _error_(StreamArgs)
AdjacentTriangle CloseBoundaryEdge(I2 A, Triangle *t, double &a, double &b)
static const short VerticesOfTriangularEdge[3][2]
I2 R2ToI2(const R2 &P) const
RR Norme2_2(const P2< R, RR > x)
BamgVertex * EdgeVertex(const int &i) const
void SplitEdge(Mesh &, const R2 &, const R2 &, int nbegin=0)
Triangle * TriangleFindFromCoord(const I2 &, long long[3], Triangle *tstart=0)
static const short OppositeVertex[3]
static const short NextEdge[3]