57 libmesh_assert_less (s, this->
n_sides());
66 unsigned int side_node)
const 69 libmesh_assert_less (side_node, 2);
88 libmesh_assert_less (i, this->
n_sides());
90 std::unique_ptr<Elem> edge = libmesh_make_unique<Edge2>();
92 for (
unsigned n=0; n<edge->n_nodes(); ++n)
101 const unsigned int i)
103 this->simple_build_side_ptr<Quad4>(
side, i,
EDGE2);
109 const unsigned int s)
const 112 libmesh_assert_less (s, this->
n_sides());
116 unsigned int n = (c < 2) ? c : 5-c;
117 return (n == s || n == (s+1)%4);
124 libmesh_assert_less (side_in, 4);
126 return (side_in + 2) % 4;
132 const unsigned int side_in)
const 134 libmesh_assert_less (node_in, 8);
135 libmesh_assert_less (node_in, this->
n_nodes());
136 libmesh_assert_less (side_in, this->
n_sides());
139 static const unsigned char side02_nodes_map[] =
140 {3, 2, 1, 0, 6, 255, 4, 255};
141 static const unsigned char side13_nodes_map[] =
142 {1, 0, 3, 2, 255, 7, 255, 5};
148 return side02_nodes_map[node_in];
151 return side13_nodes_map[node_in];
153 libmesh_error_msg(
"Unsupported side_in = " << side_in);
168 max = *std::max_element(lengths, lengths+4),
169 min = *std::min_element(lengths, lengths+4);
190 if ((d02 > 0.) && (d13 >0.))
191 if (d02 < d13)
return d02 / d13;
192 else return d13 / d02;
203 Real min_edge = *std::min_element(lengths, lengths+4);
210 return std::sqrt(2) * min_edge / d_max;
219 typedef std::array<Real, 4> Array4;
220 typedef std::array<Real, 6> Array6;
230 std::array<Array6, 4>
A;
231 for (
unsigned int k=0; k<4; ++k)
234 kp1 = k+1 > 3 ? k+1-4 : k+1,
235 kp3 = k+3 > 3 ? k+3-4 : k+3;
239 A[k] = {{x[kp1] - x[k], x[kp3] - x[k],
240 y[kp1] - y[k], y[kp3] - y[k],
241 z[kp1] - z[k], z[kp3] - z[k]}};
246 std::array<Array4, 4> T;
247 for (
unsigned int k=0; k<4; ++k)
250 top_left =
A[k][0]*
A[k][0] +
A[k][2]*
A[k][2] +
A[k][4]*
A[k][4],
251 off_diag =
A[k][0]*
A[k][1] +
A[k][2]*
A[k][3] +
A[k][4]*
A[k][5],
252 bot_rigt =
A[k][1]*
A[k][1] +
A[k][3]*
A[k][3] +
A[k][5]*
A[k][5];
254 T[k] = {{top_left, off_diag,
255 off_diag, bot_rigt}};
262 for (
unsigned int k=0; k<4; ++k)
263 alpha[k] = std::sqrt(T[k][0]*T[k][3] - T[k][1]*T[k][2]);
269 if (*std::min_element(alpha.begin(), alpha.end()) == 0.)
277 for (
unsigned int k=0; k<4; ++k)
278 den += (T[k][0] + T[k][3]) / alpha[k];
279 return (den == 0.) ? 0 : (8. / den);
283 for (
unsigned int k=0; k<4; ++k)
284 den += std::sqrt(T[k][0] * T[k][3]) / alpha[k];
285 return (den == 0.) ? 0 : (4. / den);
301 std::pair<Real, Real> bounds;
338 bounds.second = 135.;
364 libMesh::out <<
"Warning: Invalid quality measure chosen." << std::endl;
403 #ifdef LIBMESH_ENABLE_AMR 410 { 0, 2, 12, 10, 1, 7, 11, 5, 6},
413 { 2, 4, 14, 12, 3, 9, 13, 7, 8},
416 { 10, 12, 22, 20, 11, 17, 21, 15, 16},
419 { 12, 14, 24, 22, 13, 19, 23, 17, 18}
virtual std::pair< Real, Real > qual_bounds(const ElemQuality q) const override
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
static const int _child_node_lookup[4][9]
virtual std::unique_ptr< Elem > side_ptr(const unsigned int i) override final
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const =0
virtual dof_id_type key() const override
static const Real _master_points[9][3]
long double max(long double a, double b)
virtual unsigned int n_children() const override final
Real length(const unsigned int n1, const unsigned int n2) const
static const unsigned short int _second_order_vertex_child_index[9]
static const unsigned short int _second_order_vertex_child_number[9]
static const unsigned short int _second_order_adjacent_vertices[4][2]
virtual Real quality(const ElemQuality q) const override
virtual unsigned int n_sides() const override final
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual unsigned int which_node_am_i(unsigned int side, unsigned int side_node) const override
const Node * node_ptr(const unsigned int i) const
static PetscErrorCode Mat * A
virtual Real quality(const ElemQuality q) const
virtual unsigned int opposite_side(const unsigned int s) const override final
virtual unsigned int opposite_node(const unsigned int n, const unsigned int s) const override final
virtual unsigned int n_nodes() const override
static dof_id_type compute_key(dof_id_type n0)
OStreamProxy out(std::cout)
long double min(long double a, double b)
dof_id_type node_id(const unsigned int i) const
const Point & point(const unsigned int i) const
std::unique_ptr< Elem > side(const unsigned int i) const
virtual bool is_child_on_side(const unsigned int c, const unsigned int s) const override final