20 for (
int i = 0; i < 3; i++)
41 if ((m = v_to_v(
indices[0],
indices[1])) != -1 && middle[m] != -1) {
return 1; }
42 if ((m = v_to_v(
indices[1],
indices[2])) != -1 && middle[m] != -1) {
return 1; }
43 if ((m = v_to_v(
indices[2],
indices[0])) != -1 && middle[m] != -1) {
return 1; }
49 for (
int i = 0; i < 3; i++)
60 d[0] = ( (pmat(0,1)-pmat(0,0))*(pmat(0,1)-pmat(0,0)) +
61 (pmat(1,1)-pmat(1,0))*(pmat(1,1)-pmat(1,0)) );
62 d[1] = ( (pmat(0,2)-pmat(0,1))*(pmat(0,2)-pmat(0,1)) +
63 (pmat(1,2)-pmat(1,1))*(pmat(1,2)-pmat(1,1)) );
64 d[2] = ( (pmat(0,2)-pmat(0,0))*(pmat(0,2)-pmat(0,0)) +
65 (pmat(1,2)-pmat(1,0))*(pmat(1,2)-pmat(1,0)) );
70 d[0] += (pmat(2,1)-pmat(2,0))*(pmat(2,1)-pmat(2,0));
71 d[1] += (pmat(2,2)-pmat(2,1))*(pmat(2,2)-pmat(2,1));
72 d[2] += (pmat(2,2)-pmat(2,0))*(pmat(2,2)-pmat(2,0));
77 if (d[0] >= d[2]) { shift = 0; }
80 else if (d[1] >= d[2]) { shift = 1; }
104 int l, L, j, ind[3], i;
107 if ( (l = length[ v_to_v(
indices[1],
indices[2]) ]) > L ) { L = l; j = 1; }
108 if ( (l = length[ v_to_v(
indices[2],
indices[0]) ]) > L ) { L = l; j = 2; }
110 for (i = 0; i < 3; i++)
129 double *a = &pm(0,0), *b = &pm(0,1), *c = &pm(0,2);
132 a[0] = 0.0; a[1] = 0.0;
133 b[0] = 1.0; b[1] = 0.0;
134 c[0] = 0.0; c[1] = 1.0;
136 int chain[12], n = 0;
139 chain[n++] = (transform & 7) - 1;
159 double d[2], e[2], f[2];
160 #define ASGN(a, b) (a[0] = b[0], a[1] = b[1])
161 #define AVG(a, b, c) (a[0] = (b[0] + c[0])*0.5, a[1] = (b[1] + c[1])*0.5)
167 case 0: AVG(b, a, b); AVG(c, a, c);
break;
168 case 1: AVG(a, a, b); AVG(c, b, c);
break;
169 case 2: AVG(a, a, c); AVG(b, b, c);
break;
172 AVG(d, a, b); AVG(e, b, c); AVG(f, c, a);
173 ASGN(a, e); ASGN(b, f); ASGN(c, d);
break;
177 ASGN(b, a); ASGN(a, c); ASGN(c, d);
break;
181 ASGN(a, b); ASGN(b, c); ASGN(c, d);
break;
184 MFEM_ABORT(
"Invalid transform.");
192 for (
int i = 0; i < 3; i++)
virtual int * GetVertices()
virtual int NeedRefinement(DSTable &v_to_v, int *middle) const
Return 1 if the element needs refinement in order to get conforming mesh.
Data type dense matrix using column-major storage.
virtual void MarkEdge(DenseMatrix &pmat)
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
virtual void SetVertices(const int *ind)
Set the vertices according to the given input.
Class for linear FE on triangle.
int attribute
Element's attribute (specifying material property, etc).
void SetSize(int nsize)
Change logical size of the array, keep existing entries.
Linear2DFiniteElement TriangleFE
Abstract data type element.
static void GetPointMatrix(unsigned transform, DenseMatrix &pm)
Calculate point matrix corresponding to a chain of transformations.