21 #include "libmesh/edge_edge4.h" 22 #include "libmesh/enum_io_package.h" 23 #include "libmesh/enum_order.h" 36 #ifdef LIBMESH_ENABLE_AMR 45 {-0.0625, -0.0625, 0.5625, 0.5625},
46 {0.3125, 0.0625, 0.9375, -0.3125},
53 {-0.0625, -0.0625, 0.5625, 0.5625},
56 {0.0625, 0.3125, -0.3125, 0.9375}
64 return (i==0) || (i==1);
69 return (i==2) || (i==3);
78 const unsigned int s)
const 80 libmesh_assert_less (s, 2);
86 const unsigned int libmesh_dbg_var(e))
const 88 libmesh_assert_equal_to (e, 0);
121 Point a =
Real(27)/16 * (x1 - x0 + 3*(x2 - x3));
122 Point b =
Real(18)/16 * (x0 + x1 - x2 - x3);
123 Point c =
Real(1)/16 * (x0 - x1 + 27*(x3 - x2));
137 Real alpha = (a * c) / c_norm;
138 Real beta = (b * c) / c_norm;
156 Real xi_0 = -gamma / beta;
157 return ((xi_0 < -1.) || (xi_0 > 1.));
162 Real sqrt_term = beta*beta - 4*alpha*gamma;
174 xi_1 = 0.5 * (-beta + sqrt_term) / alpha,
175 xi_2 = 0.5 * (-beta - sqrt_term) / alpha;
182 xi_1_ok = ((xi_1 < -1.) || (xi_1 > 1.)),
183 xi_2_ok = ((xi_2 < -1.) || (xi_2 > 1.));
186 return xi_1_ok && xi_2_ok;
200 std::vector<dof_id_type> & conn)
const 202 libmesh_assert_less_equal (sc, 2);
231 libmesh_error_msg(
"Invalid sc = " << sc);
257 libmesh_error_msg(
"Invalid sc = " << sc);
262 libmesh_error_msg(
"Unsupported IO package " << iop);
278 for (
unsigned d=0; d<LIBMESH_DIM; ++d)
284 pmin(d) = center - hd;
285 pmax(d) = center + hd;
317 a1 = -27*x0/16 + 27*x1/16 + 81*x2/16 - 81*x3/16,
318 b1 = 9*x0/8 + 9*x1/8 - 9*x2/8 - 9*x3/8,
319 c1 = x0/16 - x1/16 - 27*x2/16 + 27*x3/16;
322 const unsigned int N = 4;
333 for (
unsigned int i=0; i<N; ++i)
334 vol += w[i] * (q[i]*q[i]*a1 + q[i]*b1 + c1).norm();
static const int num_children
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
Order
defines an enum for polynomial orders.
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
auto norm() const -> decltype(std::norm(T()))
virtual BoundingBox loose_bounding_box() const override
virtual bool is_edge(const unsigned int i) const override
static const int num_nodes
Geometric constants for Edge4.
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual dof_id_type key() const override
virtual bool is_face(const unsigned int i) const override
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
static const int num_edges
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
ADRealEigenVector< T, D, asd > sqrt(const ADRealEigenVector< T, D, asd > &)
The libMesh namespace provides an interface to certain functionality in the library.
static const int num_sides
virtual bool has_invertible_map(Real tol) const override
ADRealEigenVector< T, D, asd > abs(const ADRealEigenVector< T, D, asd > &)
ElemMappingType mapping_type() const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
static const int nodes_per_edge
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
static const int nodes_per_side
static constexpr Real affine_tol
Default tolerance to use in has_affine_map().
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
Defines a Cartesian bounding box by the two corner extremum.
virtual unsigned int n_sub_elem() const override
virtual Real volume() const override
An optimized method for approximating the length of an EDGE4 using quadrature.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool is_vertex(const unsigned int i) const override
virtual bool has_affine_map() const override
virtual Order default_order() const override
static dof_id_type compute_key(dof_id_type n0)
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
A Point defines a location in LIBMESH_DIM dimensional Real space.
dof_id_type node_id(const unsigned int i) const
const Point & point(const unsigned int i) const
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const