21#include "libmesh/edge_edge3.h"
22#include "libmesh/enum_io_package.h"
23#include "libmesh/enum_order.h"
32#ifdef LIBMESH_ENABLE_AMR
75 const unsigned int s)
const
77 libmesh_assert_less (s, 2);
83 const unsigned int libmesh_dbg_var(e))
const
85 libmesh_assert_equal_to (e, 0);
95 ((this->point(2) - this->point(0))*2,
affine_tol));
124 if (b_norm2 <= tol*tol)
131 if (std::abs(ab) <= tol*tol)
134 Real xi_m = -b_norm2 / ab;
135 return (xi_m < -1.) || (xi_m > 1.);
149 std::vector<dof_id_type> & conn)
const
151 libmesh_assert_less_equal (sc, 1);
175 libmesh_error_msg(
"Invalid sc = " << sc);
210 libmesh_error_msg(
"Unsupported IO package " << iop);
216std::pair<unsigned short int, unsigned short int>
219 return std::pair<unsigned short int, unsigned short int>(0,0);
236 const Real c =
B.norm_sq();
240 return 2. * std::sqrt(c);
242 const Real b = -2.*std::abs(A*
B);
244 const Real sqrt_term1 = a -
b + c;
245 const Real sqrt_term2 = a +
b + c;
249 if (sqrt_term1 < 0. || sqrt_term2 < 0.)
250 return 2. * std::sqrt(c);
252 const Real r1 = std::sqrt(sqrt_term1);
253 const Real r2 = std::sqrt(sqrt_term2);
254 const Real rsum = r1 + r2;
255 const Real root_a = std::sqrt(a);
256 const Real b_over_root_a =
b / root_a;
260 const Real log_term_denom = -root_a - 0.5*b_over_root_a + r2;
261 if (log_term_denom == 0. || rsum == 0.)
262 return 2. * std::sqrt(c);
264 Real log1p_arg = 2*(root_a -
b/rsum) / log_term_denom;
267 0.5*(rsum + b_over_root_a*b_over_root_a/rsum +
268 (c-0.25*b_over_root_a*b_over_root_a)*std::log1p(log1p_arg)/root_a);
280 for (
unsigned d=0; d<LIBMESH_DIM; ++d)
283 Real hd = std::max(std::abs(center - this->
point(0)(d)),
284 std::abs(center - this->
point(1)(d)));
286 pmin(d) = center - hd;
287 pmax(d) = center + hd;
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
Defines a Cartesian bounding box by the two corner extremum.
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual void connectivity(const unsigned int sc, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual bool is_vertex(const unsigned int i) const override
virtual bool is_face(const unsigned int i) const override
virtual Order default_order() const override
static const int num_nodes
Geometric constants for Edge3.
virtual bool is_edge(const unsigned int i) const override
virtual std::pair< unsigned short int, unsigned short int > second_order_child_vertex(const unsigned int n) const override
virtual unsigned int n_sub_elem() const override
virtual bool is_node_on_edge(const unsigned int n, const unsigned int e) const override
virtual dof_id_type key() const override
Compute a unique key for this element which is suitable for hashing (not necessarily unique,...
virtual bool has_invertible_map(Real tol) const override
virtual BoundingBox loose_bounding_box() const override
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
virtual bool has_affine_map() const override
virtual Real volume() const override
An optimized method for computing the length of a 3-node edge.
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
static constexpr Real affine_tol
Default tolerance to use in has_affine_map().
const Point & point(const unsigned int i) const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
void swap2boundarysides(unsigned short s1, unsigned short s2, BoundaryInfo *boundary_info) const
Swaps two sides in boundary_info, if it is non-null.
ElemMappingType mapping_type() const
static dof_id_type compute_key(dof_id_type n0)
virtual Real volume() const
dof_id_type node_id(const unsigned int i) const
A Point defines a location in LIBMESH_DIM dimensional Real space.
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
The libMesh namespace provides an interface to certain functionality in the library.
IOPackage
libMesh interfaces with several different software packages for the purposes of creating,...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real