19#include "libmesh/edge_edge2.h"
20#include "libmesh/face_tri3.h"
21#include "libmesh/enum_io_package.h"
22#include "libmesh/enum_order.h"
41#ifdef LIBMESH_ENABLE_AMR
102 const unsigned int s)
const
104 libmesh_assert_less (s,
n_sides());
113 libmesh_assert_less(s,
n_sides());
130 return this->
volume() > tol;
135 return this->simple_build_side_ptr<Edge2, Tri3>(i);
141 const unsigned int i)
143 this->simple_build_side_ptr<Tri3>(side, i,
EDGE2);
150 std::vector<dof_id_type> & conn)
const
177 libmesh_error_msg(
"Unsupported IO package " << iop);
215 theta0=std::acos(( v10*v20)/len_10/len_20),
216 theta1=std::acos((-v10*v21)/len_10/len_21),
220 libmesh_assert_greater (theta0, 0.);
221 libmesh_assert_greater (theta1, 0.);
222 libmesh_assert_greater (theta2, 0.);
224 return std::make_pair(std::min(theta0, std::min(theta1,theta2)),
225 std::max(theta0, std::max(theta1,theta2)));
239 Real dot00 = v0 * v0;
240 Real dot01 = v0 * v1;
241 Real dot02 = v0 * v2;
242 Real dot11 = v1 * v1;
243 Real dot12 = v1 * v2;
246 if (std::abs(
triple_product(v2, v0, v1)) / std::max(dot00, dot11) > tol)
250 Real invDenom = 1 / (dot00 * dot11 - dot01 * dot01);
251 Real u = (dot11 * dot02 - dot01 * dot12) * invDenom;
252 Real v = (dot00 * dot12 - dot01 * dot02) * invDenom;
255 return (u > -tol) && (v > -tol) && (u + v < 1 + tol);
267 libmesh_assert_less (perm_num, 3);
269 for (
unsigned int i = 0; i != perm_num; ++i)
291 libmesh_assert_less (s, 3);
299 libmesh_assert_less (s, 3);
302 const unsigned int another_side = s > 1 ? 0 : s + 1;
305 const Point pointing_up = side_t.
cross(other_side_t);
The BoundaryInfo class contains information relevant to boundary conditions including storing faces,...
Defines a Cartesian bounding box by the two corner extremum.
virtual BoundingBox loose_bounding_box() const
const Point & point(const unsigned int i) const
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
void swap3neighbors(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three neighbor_ptrs, "rotating" them.
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.
void swap3nodes(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three node_ptrs, "rotating" them.
void swap2boundaryedges(unsigned short e1, unsigned short e2, BoundaryInfo *boundary_info) const
Swaps two edges in boundary_info, if it is non-null.
dof_id_type node_id(const unsigned int i) const
Point vertex_average() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
virtual Point true_centroid() const override
The centroid of a 3-node triangle is simply given by the average of its vertex positions.
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override
static const int nodes_per_side
std::pair< Real, Real > min_and_max_angle() const
virtual Order default_order() const override
virtual void flip(BoundaryInfo *) override final
Flips the element (by swapping node and neighbor pointers) to have a mapping Jacobian of opposite sig...
virtual bool is_edge(const unsigned int i) const override
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const override
virtual Real volume() const override
An optimized method for computing the area of a 3-node triangle.
virtual bool is_vertex(const unsigned int i) const override
virtual BoundingBox loose_bounding_box() const override
Builds a bounding box out of the nodal positions.
virtual bool contains_point(const Point &p, Real tol) const override
Specialization for tri3 elements.
static const Real _embedding_matrix[num_children][num_nodes][num_nodes]
Matrix that computes new nodal locations/solution values from current nodes/solution.
virtual unsigned int n_sub_elem() const override
virtual bool has_invertible_map(Real tol) const override
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
virtual Point side_vertex_average_normal(const unsigned int s) const override final
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) const override
static const int num_nodes
Geometric constants for Tri3.
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
virtual bool is_face(const unsigned int i) const override
ElemType side_type(const unsigned int s) const override final
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index.
static const int num_children
virtual unsigned int n_sides() const override final
static const int num_sides
Geometric constants for all Tris.
TypeVector< typename CompareTypes< T, T2 >::supertype > cross(const TypeVector< T2 > &v) const
TypeVector< T > unit() 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,...
ElemType
Defines an enum for geometric element types.
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
T cross_norm(const TypeVector< T > &b, const TypeVector< T > &c)
Calls cross_norm_sq() and takes the square root of the result.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real