20 {{0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 3}, {2, 3}};
28 mfem_error(
"Tetrahedron::ParseRefinementFlag :"
29 " tetrahedron is not marked");
31 for (i = 0; i < 2; i++)
33 refinement_edges[i] = f & 7;
46 e1 = refinement_edges[0];
47 e2 = refinement_edges[1];
52 if (e1 == 2 && e2 == 1)
break;
54 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #1");
57 if (e1 == 3 && e2 == 1)
break;
58 if (e1 == 2 && e2 == 4)
break;
63 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #2");
68 if (e1 == 2 && e2 == 1)
break;
71 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #3");
74 if (flag == 0 && e1 == 5 && e2 == 5)
76 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #4");
81 if (e1 == 5 && e2 == 1)
break;
82 if (e1 == 2 && e2 == 5)
break;
84 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #5");
87 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #6");
108 for (
int i = 0; i < 4; i++)
129 if (middle[m] != -1)
return 1;
131 if (middle[m] != -1)
return 1;
133 if (middle[m] != -1)
return 1;
135 if (middle[m] != -1)
return 1;
137 if (middle[m] != -1)
return 1;
139 if (middle[m] != -1)
return 1;
145 for (
int i = 0; i < 4; i++)
151 int ind[4], i, j, l, L, type;
155 if ((l = length[v_to_v(
indices[1],
indices[2])]) > L) { L = l; j = 1; }
156 if ((l = length[v_to_v(
indices[2],
indices[0])]) > L) { L = l; j = 2; }
157 if ((l = length[v_to_v(
indices[0],
indices[3])]) > L) { L = l; j = 3; }
158 if ((l = length[v_to_v(
indices[1],
indices[3])]) > L) { L = l; j = 4; }
159 if ((l = length[v_to_v(
indices[2],
indices[3])]) > L) { L = l; j = 5; }
161 for (i = 0; i < 4; i++)
190 ind[0] = 2; ind[1] = 1;
192 if ((l = length[v_to_v(
indices[0],
indices[3])]) > L) { L = l; ind[0] = 3; }
193 if ((l = length[v_to_v(
indices[2],
indices[3])]) > L) { L = l; ind[0] = 5; }
196 if ((l = length[v_to_v(
indices[1],
indices[3])]) > L) { L = l; ind[1] = 4; }
197 if ((l = length[v_to_v(
indices[2],
indices[3])]) > L) { L = l; ind[1] = 5; }
216 j = 1; ind[0] = 2; ind[1] = 1;
break;
219 j = 1; ind[0] = 5; ind[1] = 1;
228 j = 1; ind[0] = 2; ind[1] = 5;
break;
246 for (
int i = 0; i < 4; i++)
254 #ifdef MFEM_USE_MEMALLOC
virtual void SetVertices(const int *ind)
Set the vertices according to the given input.
static const int edges[6][2]
virtual Element * Duplicate(Mesh *m) const
void CreateRefinementFlag(int refinement_edges[2], int type, int flag=0)
Class for linear FE on tetrahedron.
Data type tetrahedron element.
int attribute
Element's attribute (specifying material property, etc).
void mfem_error(const char *msg)
void SetSize(int nsize)
Change logical size of the array, keep existing entries.
virtual void MarkEdge(DenseMatrix &pmat)
Mark the longest edge by assuming/changing the order of the vertices.
Linear3DFiniteElement TetrahedronFE
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.
void SetAttribute(const int attr)
Set element's attribute.
MemAlloc< Tetrahedron, 1024 > TetMemory
void SetRefinementFlag(int rf)
void ParseRefinementFlag(int refinement_edges[2], int &type, int &flag)
Abstract data type element.