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)
78 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #4");
83 if (e1 == 5 && e2 == 1) {
break; }
84 if (e1 == 2 && e2 == 5) {
break; }
86 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #5");
89 mfem_error(
"Error in Tetrahedron::CreateRefinementFlag(...) #6");
110 for (
int i = 0; i < 4; i++)
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; }
141 if (middle[m] != -1) {
return 1; }
143 if (middle[m] != -1) {
return 1; }
149 for (
int i = 0; i < 4; i++)
157 int ind[4], i, j, l, L, type;
161 if ((l = length[v_to_v(
indices[1],
indices[2])]) > L) { L = l; j = 1; }
162 if ((l = length[v_to_v(
indices[2],
indices[0])]) > L) { L = l; j = 2; }
163 if ((l = length[v_to_v(
indices[0],
indices[3])]) > L) { L = l; j = 3; }
164 if ((l = length[v_to_v(
indices[1],
indices[3])]) > L) { L = l; j = 4; }
165 if ((l = length[v_to_v(
indices[2],
indices[3])]) > L) { L = l; j = 5; }
167 for (i = 0; i < 4; i++)
198 ind[0] = 2; ind[1] = 1;
200 if ((l = length[v_to_v(
indices[0],
indices[3])]) > L) { L = l; ind[0] = 3; }
201 if ((l = length[v_to_v(
indices[2],
indices[3])]) > L) { L = l; ind[0] = 5; }
204 if ((l = length[v_to_v(
indices[1],
indices[3])]) > L) { L = l; ind[1] = 4; }
205 if ((l = length[v_to_v(
indices[2],
indices[3])]) > L) { L = l; ind[1] = 5; }
224 j = 1; ind[0] = 2; ind[1] = 1;
break;
227 j = 1; ind[0] = 5; ind[1] = 1;
236 j = 1; ind[0] = 2; ind[1] = 5;
break;
254 for (
int i = 0; i < 4; i++)
262 #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.