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());
110 std::vector<unsigned>
113 libmesh_assert_less(s,
n_sides());
117 std::vector<unsigned>
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);
212 theta0=std::acos(( v10*v20)/len_10/len_20),
213 theta1=std::acos((-v10*v21)/len_10/len_21),
217 libmesh_assert_greater (theta0, 0.);
218 libmesh_assert_greater (theta1, 0.);
219 libmesh_assert_greater (theta2, 0.);
221 return std::make_pair(std::min(theta0, std::min(theta1,theta2)),
222 std::max(theta0, std::max(theta1,theta2)));
236 Real dot00 = v0 * v0;
237 Real dot01 = v0 * v1;
238 Real dot02 = v0 * v2;
239 Real dot11 = v1 * v1;
240 Real dot12 = v1 * v2;
243 if (std::abs(
triple_product(v2, v0, v1)) / std::max(dot00, dot11) > tol)
247 Real invDenom = 1 / (dot00 * dot11 - dot01 * dot01);
248 Real u = (dot11 * dot02 - dot01 * dot12) * invDenom;
249 Real v = (dot00 * dot12 - dot01 * dot02) * invDenom;
252 return (u > -tol) && (v > -tol) && (u + v < 1 + tol);
264 libmesh_assert_less (perm_num, 3);
266 for (
unsigned int i = 0; i != perm_num; ++i)
288 libmesh_assert_less (s, 3);
ElemType
Defines an enum for geometric element types.
void swap2boundaryedges(unsigned short e1, unsigned short e2, BoundaryInfo *boundary_info) const
Swaps two edges in boundary_info, if it is non-null.
Order
defines an enum for polynomial orders.
auto norm() const -> decltype(std::norm(T()))
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
static const int num_nodes
Geometric constants for Tri3.
virtual unsigned int n_sub_elem() const override
static const int num_sides
Geometric constants for all Tris.
static const unsigned int side_nodes_map[num_sides][nodes_per_side]
This maps the node of the side to element node numbers.
virtual Point true_centroid() const override
The centroid of a 3-node triangle is simply given by the average of its vertex positions.
T cross_norm(const TypeVector< T > &b, const TypeVector< T > &c)
Calls cross_norm_sq() and takes the square root of the result.
virtual bool is_node_on_side(const unsigned int n, const unsigned int s) const override
IOPackage
libMesh interfaces with several different software packages for the purposes of creating, reading, and writing mesh files.
virtual BoundingBox loose_bounding_box() const
std::pair< Real, Real > min_and_max_angle() const
virtual std::vector< unsigned int > nodes_on_side(const unsigned int s) 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.
virtual std::unique_ptr< Elem > build_side_ptr(const unsigned int i) override
virtual BoundingBox loose_bounding_box() const override
Builds a bounding box out of the nodal positions.
virtual bool has_invertible_map(Real tol) const override
The libMesh namespace provides an interface to certain functionality in the library.
static const int num_children
virtual void connectivity(const unsigned int sf, const IOPackage iop, std::vector< dof_id_type > &conn) const override
ElemType side_type(const unsigned int s) const override final
virtual bool is_edge(const unsigned int i) const override
void swap3neighbors(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three neighbor_ptrs, "rotating" them.
virtual unsigned int n_sides() const override final
void swap3nodes(unsigned int n1, unsigned int n2, unsigned int n3)
Swaps three node_ptrs, "rotating" them.
T triple_product(const TypeVector< T > &a, const TypeVector< T > &b, const TypeVector< T > &c)
void swap2nodes(unsigned int n1, unsigned int n2)
Swaps two node_ptrs.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
virtual bool contains_point(const Point &p, Real tol) const override
Specialization for tri3 elements.
static const int nodes_per_side
void swap2neighbors(unsigned int n1, unsigned int n2)
Swaps two neighbor_ptrs.
Defines a Cartesian bounding box by the two corner extremum.
virtual bool is_vertex(const unsigned int i) const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void permute(unsigned int perm_num) override final
Permutes the element (by swapping node and neighbor pointers) according to the specified index...
virtual Order default_order() 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 is_face(const unsigned int i) 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 Real volume() const override
An optimized method for computing the area of a 3-node triangle.
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
Point vertex_average() const
virtual std::vector< unsigned int > nodes_on_edge(const unsigned int e) const override