20 for (
int i = 0; i < 3; i++)
47 for (
int i = 0; i < 3; i++)
58 d[0] = ( (pmat(0,1)-pmat(0,0))*(pmat(0,1)-pmat(0,0)) +
59 (pmat(1,1)-pmat(1,0))*(pmat(1,1)-pmat(1,0)) );
60 d[1] = ( (pmat(0,2)-pmat(0,1))*(pmat(0,2)-pmat(0,1)) +
61 (pmat(1,2)-pmat(1,1))*(pmat(1,2)-pmat(1,1)) );
62 d[2] = ( (pmat(0,2)-pmat(0,0))*(pmat(0,2)-pmat(0,0)) +
63 (pmat(1,2)-pmat(1,0))*(pmat(1,2)-pmat(1,0)) );
68 d[0] += (pmat(2,1)-pmat(2,0))*(pmat(2,1)-pmat(2,0));
69 d[1] += (pmat(2,2)-pmat(2,1))*(pmat(2,2)-pmat(2,1));
70 d[2] += (pmat(2,2)-pmat(2,0))*(pmat(2,2)-pmat(2,0));
75 if (d[0] >= d[2]) { shift = 0; }
78 else if (d[1] >= d[2]) { shift = 1; }
103 int l, L, j, ind[3], i;
106 if ( (l = length[ v_to_v(
indices[1],
indices[2]) ]) > L ) { L = l; j = 1; }
107 if ( (l = length[ v_to_v(
indices[2],
indices[0]) ]) > L ) { j = 2; }
109 for (i = 0; i < 3; i++)
128 double *
a = &pm(0,0), *
b = &pm(0,1), *c = &pm(0,2);
131 a[0] = 0.0;
a[1] = 0.0;
132 b[0] = 1.0;
b[1] = 0.0;
133 c[0] = 0.0; c[1] = 1.0;
135 int chain[12], n = 0;
158 double d[2], e[2],
f[2];
159 #define ASGN(a, b) (a[0] = b[0], a[1] = b[1]) 160 #define AVG(a, b, c) (a[0] = (b[0] + c[0])*0.5, a[1] = (b[1] + c[1])*0.5) 166 case 0: AVG(
b,
a,
b); AVG(c,
a, c);
break;
167 case 1: AVG(
a,
a,
b); AVG(c,
b, c);
break;
168 case 2: AVG(
a,
a, c); AVG(
b,
b, c);
break;
171 AVG(d,
a,
b); AVG(e,
b, c); AVG(
f, c,
a);
172 ASGN(
a, e); ASGN(
b,
f); ASGN(c, d);
break;
176 ASGN(
b,
a); ASGN(
a, c); ASGN(c, d);
break;
180 ASGN(
a,
b); ASGN(
b, c); ASGN(c, d);
break;
183 MFEM_ABORT(
"Invalid transform.");
191 for (
int i = 0; i < 3; i++)
virtual int * GetVertices()
Data type dense matrix using column-major storage.
std::function< double(const Vector &)> f(double mass_coeff)
void MarkEdge(DenseMatrix &pmat)
virtual void SetVertices(const int *ind)
Set the vertices according to the given input.
int attribute
Element's attribute (specifying material property, etc).
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows().
int FindId(int p1, int p2) const
Find id of item whose parents are p1, p2... Return -1 if it doesn't exist.
virtual int NeedRefinement(HashTable< Hashed2 > &v_to_v) const
Return 1 if the element needs refinement in order to get conforming mesh.
Abstract data type element.
static void GetPointMatrix(unsigned transform, DenseMatrix &pm)
Calculate point matrix corresponding to a chain of transformations.